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

44 строки
1.9 KiB

  1. - name: Record Synapse Admin 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: '# Synapse Admin Settings Start'
  8. with_dict:
  9. 'matrix_synapse_admin_enabled': '{{ matrix_synapse_admin_enabled }}'
  10. - name: Save new 'Configure Synapse Admin' survey.json to the AWX tower, template
  11. delegate_to: 127.0.0.1
  12. template:
  13. src: 'roles/matrix-awx/surveys/configure_synapse_admin.json.j2'
  14. dest: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_synapse_admin.json'
  15. - name: Copy new 'Configure Synapse Admin' survey.json to target machine
  16. copy:
  17. src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_synapse_admin.json'
  18. dest: '/matrix/awx/configure_synapse_admin.json'
  19. mode: '0660'
  20. - name: Recreate 'Configure Synapse Admin' job template
  21. delegate_to: 127.0.0.1
  22. awx.awx.tower_job_template:
  23. name: "{{ matrix_domain }} - 1 - Configure Synapse Admin"
  24. description: "Configure 'Synapse Admin', a moderation tool to help you manage your server."
  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-all"
  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_synapse_admin.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