From 5f10f42fa80a218ae738382fa745c4c601aa6271 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Tue, 8 Mar 2016 10:52:40 +0100 Subject: [PATCH] Allow to exclude roles from plays with --exclude-roles command line parameter --- tasks/main.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 91910d1..495505c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,9 +5,12 @@ --- # file: roles/php/tasks/main.yml -- include: php.yml - when: role_php_completed is not defined +- block: + - include: php.yml + when: role_php_completed is not defined -- name: 'PHP | Remember that this role had been run' - set_fact: role_php_completed=true - when: role_php_completed is not defined + - name: 'PHP | Remember that this role had been run' + set_fact: role_php_completed=true + when: role_php_completed is not defined + + when: '"php" not in excluded_roles' -- GitLab