Matrix Docker Ansible eploy
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

46 linhas
1.8 KiB

  1. ---
  2. - name: Record Jitsi 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: '# Jitsi Settings Start'
  9. with_dict:
  10. 'matrix_jitsi_enabled': '{{ matrix_jitsi_enabled }}'
  11. 'matrix_jitsi_web_config_defaultLanguage': '{{ matrix_jitsi_web_config_defaultLanguage | trim }}'
  12. - name: Save new 'Configure Jitsi' survey.json to the AWX tower, template
  13. delegate_to: 127.0.0.1
  14. template:
  15. src: 'roles/matrix-awx/surveys/configure_jitsi.json.j2'
  16. dest: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_jitsi.json'
  17. - name: Copy new 'Configure Jitsi' survey.json to target machine
  18. copy:
  19. src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_jitsi.json'
  20. dest: '/matrix/awx/configure_jitsi.json'
  21. mode: '0660'
  22. - name: Recreate 'Configure Jitsi' job template
  23. delegate_to: 127.0.0.1
  24. awx.awx.tower_job_template:
  25. name: "{{ matrix_domain }} - 1 - Configure Jitsi"
  26. description: "Configure Jitsi conferencing settings."
  27. extra_vars: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/extra_vars.json') }}"
  28. job_type: run
  29. job_tags: "start,setup-jitsi"
  30. inventory: "{{ member_id }}"
  31. project: "{{ member_id }} - Matrix Docker Ansible Deploy"
  32. playbook: setup.yml
  33. credential: "{{ member_id }} - AWX SSH Key"
  34. survey_enabled: true
  35. survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_jitsi.json') }}"
  36. become_enabled: true
  37. state: present
  38. verbosity: 1
  39. tower_host: "https://{{ awx_host }}"
  40. tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
  41. validate_certs: true