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

42 строки
1.2 KiB

  1. ---
  2. #
  3. # Create user and define if they are admin
  4. #
  5. # /usr/local/bin/matrix-synapse-register-user <your_username> <your_password> <admin access: 0 or 1>
  6. #
  7. - name: Set admin bool to zero
  8. set_fact:
  9. awx_admin_bool: 0
  10. when: awx_admin_access == 'false'
  11. - name: Examine if server admin set
  12. set_fact:
  13. awx_admin_bool: 1
  14. when: awx_admin_access == 'true'
  15. - name: Create user account
  16. command: |
  17. /usr/local/bin/matrix-synapse-register-user {{ awx_new_username | quote }} {{ awx_new_password | quote }} {{ awx_admin_bool }}
  18. register: awx_cmd_output
  19. - name: Delete the AWX session token for executing modules
  20. awx.awx.tower_token:
  21. description: 'AWX Session Token'
  22. scope: "write"
  23. state: absent
  24. existing_token_id: "{{ awx_session_token.ansible_facts.tower_token.id }}"
  25. tower_host: "https://{{ awx_host }}"
  26. tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
  27. - name: Set boolean value to exit playbook
  28. set_fact:
  29. awx_end_playbook: true
  30. - name: Result
  31. debug: msg="{{ awx_cmd_output.stdout }}"
  32. - name: End playbook if this task list is called.
  33. meta: end_play
  34. when: awx_end_playbook is defined and awx_end_playbook|bool