Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
common
Commits
7e4609e6
Commit
7e4609e6
authored
6 years ago
by
Thomas Schneider
Browse files
Options
Downloads
Patches
Plain Diff
Allow configuring systemd-journald disk usage
parent
3e05012d
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
basic-system/handlers/main.yml
+3
-0
3 additions, 0 deletions
basic-system/handlers/main.yml
basic-system/tasks/logging.yml
+21
-1
21 additions, 1 deletion
basic-system/tasks/logging.yml
basic-system/templates/size.conf.j2
+15
-0
15 additions, 0 deletions
basic-system/templates/size.conf.j2
with
39 additions
and
1 deletion
basic-system/handlers/main.yml
+
3
−
0
View file @
7e4609e6
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
-
name
:
restart rsyslogd
-
name
:
restart rsyslogd
service
:
name=rsyslog state=restarted
service
:
name=rsyslog state=restarted
-
name
:
restart systemd-journald
systemd
:
name=systemd-journald.service state=restarted
-
name
:
configure journal directory
-
name
:
configure journal directory
command
:
systemd-tmpfiles --create --prefix /var/log/journal
command
:
systemd-tmpfiles --create --prefix /var/log/journal
...
...
This diff is collapsed.
Click to expand it.
basic-system/tasks/logging.yml
+
21
−
1
View file @
7e4609e6
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
-
syslog
-
syslog
-
journal
-
journal
-
name
:
ensure systemd journal is p
r
esistent
-
name
:
ensure systemd journal is pe
r
sistent
file
:
file
:
path
:
/var/log/journal
path
:
/var/log/journal
state
:
directory
state
:
directory
...
@@ -48,6 +48,26 @@
...
@@ -48,6 +48,26 @@
tags
:
tags
:
-
syslog
-
syslog
-
name
:
create systemd-journald config directory
file
:
path
:
/etc/systemd/journald.conf.d
state
:
directory
mode
:
'
0755'
tags
:
-
config
-
syslog
-
name
:
configure journal size limits
template
:
src
:
size.conf.j2
dest
:
/etc/systemd/journald.conf.d/size.conf
mode
:
'
0644'
notify
:
restart systemd-journald
tags
:
-
config
-
syslog
-
service
-
name
:
ensure rsyslog is running and enabled
-
name
:
ensure rsyslog is running and enabled
service
:
service
:
name
:
rsyslog
name
:
rsyslog
...
...
This diff is collapsed.
Click to expand it.
basic-system/templates/size.conf.j2
0 → 100644
+
15
−
0
View file @
7e4609e6
[Journal]
{% if systemd_journald is defined %}
{% if systemd_journald.system_max_use is defined %}
SystemMaxUse={{ systemd_journald.system_max_use }}
{% endif %}
{% if systemd_journald.system_keep_free is defined %}
SystemKeepFree={{ systemd_journald.system_keep_free }}
{% endif %}
{% if systemd_journald.system_max_file_size is defined %}
SystemMaxFileSize={{ systemd_journald.system_max_file_size }}
{% endif %}
{% if systemd_journald.system_max_files is defined %}
SystemMaxFiles={{ systemd_journald.system_max_files }}
{% endif %}
{% endif %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment