diff --git a/ansible-product_demos-1.2.2.tar.gz b/ansible-product_demos-1.2.2.tar.gz new file mode 100644 index 0000000..b8832bc Binary files /dev/null and b/ansible-product_demos-1.2.2.tar.gz differ diff --git a/ansible-product_demos-1.2.4.tar.gz b/ansible-product_demos-1.2.4.tar.gz new file mode 100644 index 0000000..c5cf9be Binary files /dev/null and b/ansible-product_demos-1.2.4.tar.gz differ diff --git a/galaxy.yml b/galaxy.yml index 55fed9f..0109a95 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,11 +1,13 @@ --- namespace: ansible name: product_demos -version: 1.2.1 +version: 1.2.4 readme: README.md authors: - Sean Cavanaugh @IPvSean + - David Rojas + - Colin McNaughton description: repository of demos to showcase Ansible features. diff --git a/roles/install_demo/tasks/azure_cred.yml b/roles/install_demo/tasks/azure.yml similarity index 86% rename from roles/install_demo/tasks/azure_cred.yml rename to roles/install_demo/tasks/azure.yml index defc986..bc4ec57 100644 --- a/roles/install_demo/tasks/azure_cred.yml +++ b/roles/install_demo/tasks/azure.yml @@ -2,7 +2,7 @@ - name: add azure credential tower_credential: name: azure_credential - description: Azure Service Principle + description: Azure Service Principle organization: "{{ vars[demo].project.organization }}" state: present kind: azure_rm @@ -13,9 +13,4 @@ tower_username: "{{ my_tower_username }}" tower_password: "{{ my_tower_password }}" tower_host: "{{ my_tower_host }}" - - - - - - + validate_certs: false diff --git a/roles/install_demo/tasks/main.yml b/roles/install_demo/tasks/main.yml index a06b4f3..2663f86 100644 --- a/roles/install_demo/tasks/main.yml +++ b/roles/install_demo/tasks/main.yml @@ -20,10 +20,11 @@ - "demo must be defined and be one of: {{ demo_list }}" - "full list can be found on https://github.com/ansible/product-demos" -- name: install Azure cred - include_tasks: azure_cred.yml - when: - - azure_demo == True +- name: setup public cloud credentials + include_tasks: "{{item}}" + with_first_found: + - "{{role_path}}/tasks/{{public_cloud}}.yml" + - "{{role_path}}/tasks/unsupported_cloud.yml" - name: install all job templates include_tasks: job_template_loop.yml diff --git a/roles/install_demo/tasks/unsupported_cloud.yml b/roles/install_demo/tasks/unsupported_cloud.yml new file mode 100644 index 0000000..383b0a7 --- /dev/null +++ b/roles/install_demo/tasks/unsupported_cloud.yml @@ -0,0 +1,16 @@ +- name: public cloud not supported + debug: + msg: "there is no public cloud credentials for this install, installing dummy creds" + +- name: add azure credential + tower_credential: + name: azure_credential + description: Azure Service Principle + organization: "{{ vars[demo].project.organization }}" + state: present + kind: azure_rm + subscription: "please replace me" + tower_username: "{{ my_tower_username }}" + tower_password: "{{ my_tower_password }}" + tower_host: "{{ my_tower_host }}" + validate_certs: false