diff --git a/playbooks/deploy_application.yml b/playbooks/deploy_application.yml deleted file mode 100644 index 5ce6166..0000000 --- a/playbooks/deploy_application.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: setup deploy_application.yml demo - hosts: localhost - gather_facts: false - become: yes - tasks: - - - name: Conditional role - include_role: - name: "{{playbook_dir}}/../deploy_application" diff --git a/playbooks/install_deploy_application.yml b/playbooks/install_deploy_application.yml new file mode 100644 index 0000000..f85b5f2 --- /dev/null +++ b/playbooks/install_deploy_application.yml @@ -0,0 +1,11 @@ +--- +- name: setup deploy application demo + hosts: localhost + gather_facts: false + connection: local + + tasks: + + - name: install demo + include_role: + name: "../roles/deploy_application" diff --git a/roles/deploy_application/tasks/main.yml b/roles/deploy_application/tasks/main.yml index 6e9e07c..6f7efe1 100644 --- a/roles/deploy_application/tasks/main.yml +++ b/roles/deploy_application/tasks/main.yml @@ -1,18 +1,27 @@ --- -- name: setup deploy_application.yml demo - hosts: localhost - gather_facts: false - become: yes - tasks: +- name: add tower project + tower_project: + name: "Ansible official demo project" + description: "prescriptive demos from Red Hat Management Buisness Unit" + organization: "Default" + scm_type: git + scm_url: https://github.com/ansible/product-demos + tower_username: "{{my_tower_username}}" + tower_password: "{{my_tower_password}}" + tower_host: "{{my_tower_host}}" + validate_certs: no - - name: add tower project - tower_project: - name: "Ansible official demo project" - description: "prescriptive demos from Red Hat Management Buisness Unit" - organization: "Default" - scm_type: git - scm_url: https://github.com/ansible/product-demos - tower_username: "{{my_tower_username}}" - tower_password: "{{my_tower_password}}" - tower_host: "{{my_tower_host}}" - validate_certs: no +- name: add deploy application job template + tower_job_template: + name: "Deploy Application (survey)" + job_type: "run" + inventory: "Workshop Inventory" + project: "Ansible official demo project" + playbook: "roles/deploy_application/tasks/deploy_application.yml" + credential: "Demo Credential" + tower_username: "{{my_tower_username}}" + tower_password: "{{my_tower_password}}" + tower_host: "{{my_tower_host}}" + validate_certs: no + # survey_enabled: yes + # survey_spec: "{{ lookup('file', 'my_survey.json') }}"