From: Oleg Broytman Date: Wed, 31 Jul 2019 16:01:24 +0000 (+0300) Subject: Feat: Add `init-logcheck` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;ds=sidebyside;h=4ff687aa26bffc8e0dd94445ee77395327e0b179;p=ansible.git Feat: Add `init-logcheck` Fast version of role logcheck to be used in dependencies. --- diff --git a/playbooks/debian/roles/apache/meta/main.yml b/playbooks/debian/roles/apache/meta/main.yml index d2e2f89..1d59f7a 100644 --- a/playbooks/debian/roles/apache/meta/main.yml +++ b/playbooks/debian/roles/apache/meta/main.yml @@ -1 +1 @@ -dependencies: ['init-system', 'firewall', 'logcheck'] +dependencies: ['init-system', 'firewall', 'init-logcheck'] diff --git a/playbooks/debian/roles/init-logcheck/README.txt b/playbooks/debian/roles/init-logcheck/README.txt new file mode 100644 index 0000000..7bd10c2 --- /dev/null +++ b/playbooks/debian/roles/init-logcheck/README.txt @@ -0,0 +1 @@ +Fast version of role logcheck - it just checks if logcheck is installed. diff --git a/playbooks/debian/roles/init-logcheck/tasks/main.yml b/playbooks/debian/roles/init-logcheck/tasks/main.yml new file mode 100644 index 0000000..a0960a5 --- /dev/null +++ b/playbooks/debian/roles/init-logcheck/tasks/main.yml @@ -0,0 +1,10 @@ +- name: Check logcheck + stat: + path: /etc/logcheck/logcheck.conf + register: logcheck_exists + changed_when: not logcheck_exists.stat.exists + +- name: Install logcheck if not installed + import_role: + name: logcheck + when: not logcheck_exists.stat.exists diff --git a/playbooks/debian/roles/named/meta/main.yml b/playbooks/debian/roles/named/meta/main.yml index d2e2f89..1d59f7a 100644 --- a/playbooks/debian/roles/named/meta/main.yml +++ b/playbooks/debian/roles/named/meta/main.yml @@ -1 +1 @@ -dependencies: ['init-system', 'firewall', 'logcheck'] +dependencies: ['init-system', 'firewall', 'init-logcheck']