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

41 строка
1.1 KiB

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