Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

46 righe
1.6 KiB

  1. - name: Delete the servers directory on AWX
  2. delegate_to: 127.0.0.1
  3. file:
  4. path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/'
  5. state: absent
  6. - name: Save new 'Delete Job Template' survey.json to the AWX tower, template
  7. delegate_to: 127.0.0.1
  8. template:
  9. src: '{{ role_path }}/templates/delete_job_template.json.j2'
  10. dest: '/var/lib/awx/projects/hosting/delete_job_template.json'
  11. - name: Re-create '00 - Cleanup Deletion Template' job template
  12. delegate_to: 127.0.0.1
  13. awx.awx.tower_job_template:
  14. name: "00 - Cleanup Deletion Template"
  15. description: "Deletes the remaining '<< SUBSCRIPTION DELETION IN PROGRESS >>' job template."
  16. job_type: run
  17. inventory: "{{ org_name }} [Admin]"
  18. project: "Ansible Create Delete Subscription Membership"
  19. playbook: cleanup_deletion_job_template.yml
  20. extra_vars: "{{ lookup('file', '/var/lib/awx/projects/hosting/delete_job_template.json') }}"
  21. ask_extra_vars: yes
  22. state: present
  23. verbosity: 1
  24. tower_host: "https://{{ tower_host }}"
  25. tower_oauthtoken: "{{ tower_token.stdout }}"
  26. validate_certs: yes
  27. - name: Launch '00 - Cleanup Deletion Template' job template before ending
  28. delegate_to: 127.0.0.1
  29. awx.awx.tower_job_launch:
  30. job_template: "00 - Cleanup Deletion Template"
  31. tower_host: "https://{{ tower_host }}"
  32. tower_oauthtoken: "{{ tower_token.stdout }}"
  33. validate_certs: yes
  34. - name: Set boolean value to exit playbook
  35. set_fact:
  36. end_playbook: true
  37. - name: End playbook if this task list is called.
  38. meta: end_play
  39. when: end_playbook is defined and end_playbook|bools