From 47138ce7977f2b88a41866ccd988fd0eed311df4 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 28 Jul 2019 19:25:06 +0300 Subject: [PATCH] Feat: Declare dependencies between roles Also remove dependent roles from playbooks. --- playbooks/debian/init-system.yml | 1 - playbooks/debian/roles/add-apache-vhost/meta/main.yml | 2 +- playbooks/debian/roles/apache/meta/main.yml | 1 + playbooks/debian/roles/install-dehydrated/meta/main.yml | 1 + playbooks/debian/roles/phd/meta/main.yml | 1 + playbooks/debian/roles/root/meta/main.yml | 1 + playbooks/debian/roles/sudo/meta/main.yml | 1 + 7 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 playbooks/debian/roles/apache/meta/main.yml create mode 100644 playbooks/debian/roles/install-dehydrated/meta/main.yml create mode 100644 playbooks/debian/roles/phd/meta/main.yml create mode 100644 playbooks/debian/roles/root/meta/main.yml create mode 100644 playbooks/debian/roles/sudo/meta/main.yml diff --git a/playbooks/debian/init-system.yml b/playbooks/debian/init-system.yml index 1015ebd..ad82015 100644 --- a/playbooks/debian/init-system.yml +++ b/playbooks/debian/init-system.yml @@ -2,6 +2,5 @@ hosts: "{{ hosts | default('servers') }}" gather_facts: false roles: - - init-system - sudo - phd diff --git a/playbooks/debian/roles/add-apache-vhost/meta/main.yml b/playbooks/debian/roles/add-apache-vhost/meta/main.yml index 342147e..99e61b3 100644 --- a/playbooks/debian/roles/add-apache-vhost/meta/main.yml +++ b/playbooks/debian/roles/add-apache-vhost/meta/main.yml @@ -1 +1 @@ -dependencies: ['install-dehydrated'] +dependencies: ['apache', 'install-dehydrated'] diff --git a/playbooks/debian/roles/apache/meta/main.yml b/playbooks/debian/roles/apache/meta/main.yml new file mode 100644 index 0000000..ee83d2b --- /dev/null +++ b/playbooks/debian/roles/apache/meta/main.yml @@ -0,0 +1 @@ +dependencies: ['firewall', 'logcheck'] diff --git a/playbooks/debian/roles/install-dehydrated/meta/main.yml b/playbooks/debian/roles/install-dehydrated/meta/main.yml new file mode 100644 index 0000000..c84c3cf --- /dev/null +++ b/playbooks/debian/roles/install-dehydrated/meta/main.yml @@ -0,0 +1 @@ +dependencies: ['apache'] diff --git a/playbooks/debian/roles/phd/meta/main.yml b/playbooks/debian/roles/phd/meta/main.yml new file mode 100644 index 0000000..8f82bb2 --- /dev/null +++ b/playbooks/debian/roles/phd/meta/main.yml @@ -0,0 +1 @@ +dependencies: ['init-system'] diff --git a/playbooks/debian/roles/root/meta/main.yml b/playbooks/debian/roles/root/meta/main.yml new file mode 100644 index 0000000..3c93994 --- /dev/null +++ b/playbooks/debian/roles/root/meta/main.yml @@ -0,0 +1 @@ +dependencies: ['phd'] diff --git a/playbooks/debian/roles/sudo/meta/main.yml b/playbooks/debian/roles/sudo/meta/main.yml new file mode 100644 index 0000000..8f82bb2 --- /dev/null +++ b/playbooks/debian/roles/sudo/meta/main.yml @@ -0,0 +1 @@ +dependencies: ['init-system'] -- 2.39.5