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
b8562af2
You need to sign in or sign up before continuing.
Commit
b8562af2
authored
4 years ago
by
Lars Beckers
Browse files
Options
Downloads
Patches
Plain Diff
basic-system: safeguard journal persistence from bullseye and remove support for jessie's rsyslog
parent
7ab78ebe
Branches
Branches containing commit
No related tags found
1 merge request
!15
Bullseye Compatibility
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
basic-system/defaults/main.yml
+1
-1
1 addition, 1 deletion
basic-system/defaults/main.yml
basic-system/tasks/logging.yml
+4
-39
4 additions, 39 deletions
basic-system/tasks/logging.yml
with
5 additions
and
40 deletions
basic-system/defaults/main.yml
+
1
−
1
View file @
b8562af2
...
@@ -6,7 +6,7 @@ hosts_additionals: []
...
@@ -6,7 +6,7 @@ hosts_additionals: []
etckeeper
:
true
etckeeper
:
true
rsyslog_needed
:
false
rsyslog_needed
:
false
hosts_precious
:
false
hosts_precious
:
false
journal_persitent_with_package
:
true
journal_persi
s
tent_with_package
:
true
logrotate_period
:
'
daily'
# 'weekly' is newer default
logrotate_period
:
'
daily'
# 'weekly' is newer default
logrotate_backlogs
:
7
# default is 7 for daily, 4 for weekly
logrotate_backlogs
:
7
# default is 7 for daily, 4 for weekly
common_sysctl_file
:
'
/etc/sysctl.conf'
common_sysctl_file
:
'
/etc/sysctl.conf'
This diff is collapsed.
Click to expand it.
basic-system/tasks/logging.yml
+
4
−
39
View file @
b8562af2
...
@@ -17,11 +17,8 @@
...
@@ -17,11 +17,8 @@
name
:
systemd-journal-persistent
name
:
systemd-journal-persistent
state
:
present
state
:
present
when
:
when
:
-
syslogserver is not defined or syslogserver.split(":")[0] != ansible_fqdn
-
ansible_distribution_major_version|int(default=99) <
11
-
ansible_distribution_major_version|int >=
9
-
journal_persistent_with_package
-
not rsyslog_needed
-
journal_persitent_with_package
register
:
syslog_provider
tags
:
tags
:
-
syslog
-
syslog
-
journal
-
journal
...
@@ -31,9 +28,8 @@
...
@@ -31,9 +28,8 @@
path
:
/var/log/journal
path
:
/var/log/journal
state
:
directory
state
:
directory
when
:
when
:
-
(ansible_distribution_major_version|int < 9) or
-
ansible_distribution_major_version|int(default=99) <
11
(not journal_persitent_with_package)
-
not journal_persistent_with_package
register
:
syslog_provider
notify
:
notify
:
-
configure journal directory
-
configure journal directory
tags
:
tags
:
...
@@ -47,8 +43,6 @@
...
@@ -47,8 +43,6 @@
purge
:
true
purge
:
true
dpkg_options
:
"
force-confdef,force-confold,force-depends"
dpkg_options
:
"
force-confdef,force-confold,force-depends"
when
:
when
:
-
not syslog_provider is skipped
-
ansible_distribution_major_version|int >=
9
-
syslogserver is not defined or syslogserver.split(":")[0] != ansible_fqdn
-
syslogserver is not defined or syslogserver.split(":")[0] != ansible_fqdn
tags
:
tags
:
-
syslog
-
syslog
...
@@ -73,35 +67,6 @@
...
@@ -73,35 +67,6 @@
-
syslog
-
syslog
-
service
-
service
-
name
:
ensure rsyslog is running and enabled
service
:
name
:
rsyslog
state
:
started
enabled
:
true
when
:
-
syslogserver is defined
-
syslogserver|length >
0
-
ansible_distribution_major_version|int <
9
tags
:
-
syslog
-
name
:
ensure that central logging works
template
:
src
:
rsyslog.conf.j2
dest
:
/etc/rsyslog.conf
owner
:
root
group
:
root
mode
:
'
0644'
when
:
-
syslogserver is defined
-
syslogserver|length >
0
-
syslogserver.split(":")[0] != ansible_fqdn
-
ansible_distribution_major_version|int <
9
notify
:
-
restart rsyslogd
tags
:
-
syslog
-
name
:
ensure our logrotate.conf is present
-
name
:
ensure our logrotate.conf is present
template
:
template
:
src
:
logrotate.conf.j2
src
:
logrotate.conf.j2
...
...
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