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.
 
 

44 righe
1.8 KiB

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