From 1b56aed513e4a0cf48a4c55f49adf1dbb9e2f49c Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Fri, 2 Sep 2016 12:18:11 +0000 Subject: [PATCH] Ability to run the launcher against a particular cloud When we feed a resources.yaml file containing the 'clouds' dict containing the definitions, the role will happily process all of them. This is good, but it would also be nice to specify on the command line that we only want to run the launcher against a specific cloud. With this change, we can just pass -e "cloud=foocloud" to ansible-playbook and the launcher will just process the resources for cloud 'foocloud'. Change-Id: I37cddfbbbb83203ed62434dccac60511f726c6a4 --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 34c28f6..28687a9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,5 @@ --- - include: create_clouds_resources.yml - with_items: "{{ clouds }}" + with_items: "{{ clouds if cloud is not defined else clouds|selectattr('name', 'equalto', cloud)|list }}" loop_control: loop_var: item_cloud