Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

34 строки
954 B

  1. - name: Run export of /matrix/ and snapshot the database simultaneously
  2. command: "{{ item }}"
  3. with_items:
  4. - /bin/sh /usr/local/bin/awx-export-service.sh 1 0
  5. - /bin/sh /usr/local/bin/awx-export-service.sh 0 1
  6. register: _create_instances
  7. async: 3600 # Maximum runtime in seconds.
  8. poll: 0 # Fire and continue (never poll)
  9. - name: Wait for both of these jobs to finish
  10. async_status:
  11. jid: "{{ item.ansible_job_id }}"
  12. register: _jobs
  13. until: _jobs.finished
  14. delay: 5 # Check every 5 seconds.
  15. retries: 720 # Retry for a full hour.
  16. with_items: "{{ _create_instances.results }}"
  17. - name: Schedule deletion of the export in 24 hours
  18. at:
  19. command: rm /chroot/export/matrix*
  20. count: 1
  21. units: days
  22. unique: yes
  23. - name: Set boolean value to exit playbook
  24. set_fact:
  25. end_playbook: true
  26. - name: End playbook if this task list is called.
  27. meta: end_play
  28. when: end_playbook is defined and end_playbook|bool