From 6c6ff1b112aa6579c196ebc3517d2be688119cac Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 22 Aug 2016 16:34:05 +0300 Subject: [PATCH] roles/common: Use ansible facts to reduce includes --- roles/common/tasks/main.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index e3a7ba3..148889a 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -17,20 +17,10 @@ service: name=systemd-timesyncd enabled=yes tags: ntp -- include: packages_Ubuntu.yml - when: ansible_distribution == 'Ubuntu' +- include: packages_{{ ansible_distribution }}.yml tags: packages -- include: packages_Debian.yml - when: ansible_distribution == 'Debian' - tags: packages - -- include: iptables_Ubuntu.yml - when: ansible_distribution == 'Ubuntu' - tags: firewall - -- include: iptables_Debian.yml - when: ansible_distribution == 'Debian' +- include: iptables_{{ ansible_distribution }}.yml tags: firewall - include: sshd.yml