From 95e702e388dbe3f3e59516ad99ea2ccb34057987 Mon Sep 17 00:00:00 2001 From: James Oguya Date: Sat, 27 Jun 2015 20:50:09 +0300 Subject: [PATCH] Run roles on Ubuntu hosts only I think it's a good idea to only run/include a role if the remote host is running Ubuntu OS - doesn't hurt to do an extra check even though the README clearly assumes so. Signed-off-by: James Oguya --- web.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web.yml b/web.yml index 7d40ad7..46c0238 100644 --- a/web.yml +++ b/web.yml @@ -6,11 +6,11 @@ user: provisioning sudo: yes roles: - - common - - mariadb - - nginx - - php5-fpm - - munin + - { role: common, when: ansible_distribution == 'Ubuntu' } + - { role: mariadb, when: ansible_distribution == 'Ubuntu' } + - { role: nginx, when: ansible_distribution == 'Ubuntu' } + - { role: php5-fpm, when: ansible_distribution == 'Ubuntu' } + - { role: munin, when: ansible_distribution == 'Ubuntu' } vars_files: - vars/ipsets.yml - "vars/{{ ansible_distribution }}.yml"