Skip to content
Snippets Groups Projects
Commit d22011bb authored by Lars Beckers's avatar Lars Beckers
Browse files

basic-system: change conditions on systemd-journal-persistent

parent 6fab2956
Branches
No related tags found
No related merge requests found
...@@ -8,33 +8,36 @@ ...@@ -8,33 +8,36 @@
- sysctl - sysctl
- config - config
- name: ensure rsyslog is absent without broken dependecies
apt: name=rsyslog state=absent purge=yes dpkg_options="force-confdef,force-confold,force-depends"
when:
- ansible_distribution_major_version|int >= 9
- syslogserver is defined
- syslogserver.split(":")[0] != ansible_fqdn
tags:
- config
- syslog
- name: ensure system journal is a system-log-daemon with our package - name: ensure system journal is a system-log-daemon with our package
apt: name=systemd-journal-persistent state=present apt: name=systemd-journal-persistent state=present
when: when:
- syslogserver is not defined or syslogserver.split(":")[0] != ansible_fqdn - syslogserver is not defined or syslogserver.split(":")[0] != ansible_fqdn
- ansible_distribution_major_version|int >= 9 - ansible_distribution_major_version|int >= 9
register: syslog_provider
tags: tags:
- config - config
- syslog - syslog
- name: ensure systemd journal is presistent - name: ensure systemd journal is presistent
file: path=/var/log/journal state=directory file: path=/var/log/journal state=directory
when:
- ansible_distribution_major_version|int < 9
notify: notify:
- configure journal directory - configure journal directory
tags: tags:
- config - config
- syslog - syslog
- name: ensure rsyslog is absent without broken dependecies
apt: name=rsyslog state=absent purge=yes dpkg_options="force-confdef,force-confold,force-depends"
when:
- not syslog_provider.skipped
- ansible_distribution_major_version|int >= 9
- syslogserver is not defined or syslogserver.split(":")[0] != ansible_fqdn
tags:
- config
- syslog
- name: ensure rsyslog is running and enabled - name: ensure rsyslog is running and enabled
service: name=rsyslog state=running enabled=yes service: name=rsyslog state=running enabled=yes
when: when:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment