Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

45 líneas
1.8 KiB

  1. ---
  2. - name: Record Mailer variables locally on AWX
  3. delegate_to: 127.0.0.1
  4. lineinfile:
  5. path: '{{ awx_cached_matrix_vars }}'
  6. regexp: "^#? *{{ item.key | regex_escape() }}:"
  7. line: "{{ item.key }}: {{ item.value }}"
  8. insertafter: '# Email Settings Start'
  9. with_dict:
  10. 'matrix_mailer_relay_use': '{{ matrix_mailer_relay_use }}'
  11. - name: Save new 'Configure Email Relay' survey.json to the AWX tower, template
  12. delegate_to: 127.0.0.1
  13. template:
  14. src: 'roles/matrix-awx/surveys/configure_email_relay.json.j2'
  15. dest: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_email_relay.json'
  16. - name: Copy new 'Configure Email Relay' survey.json to target machine
  17. copy:
  18. src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_email_relay.json'
  19. dest: '/matrix/awx/configure_email_relay.json'
  20. mode: '0660'
  21. - name: Recreate 'Configure Email Relay' job template
  22. delegate_to: 127.0.0.1
  23. awx.awx.tower_job_template:
  24. name: "{{ matrix_domain }} - 1 - Configure Email Relay"
  25. description: "Enable MailGun relay to increase verification email reliability."
  26. extra_vars: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/extra_vars.json') }}"
  27. job_type: run
  28. job_tags: "start,setup-mailer"
  29. inventory: "{{ member_id }}"
  30. project: "{{ member_id }} - Matrix Docker Ansible Deploy"
  31. playbook: setup.yml
  32. credential: "{{ member_id }} - AWX SSH Key"
  33. survey_enabled: true
  34. survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_email_relay.json') }}"
  35. become_enabled: true
  36. state: present
  37. verbosity: 1
  38. tower_host: "https://{{ awx_host }}"
  39. tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
  40. validate_certs: true