You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
768 B

4 years ago
#
# Create user and define if they are admin
#
# /usr/local/bin/matrix-synapse-register-user <your_username> <your_password> <admin access: 0 or 1>
#
- name: Set admin bool to zero
set_fact:
admin_bool: 0
when: admin_access == 'false'
- name: Examine if server admin set
4 years ago
set_fact:
4 years ago
admin_bool: 1
when: admin_access == 'true'
4 years ago
4 years ago
- name: Set boolean value to exit playbook
set_fact:
end_playbook: true
- name: Create user account
command: |
4 years ago
/usr/local/bin/matrix-synapse-register-user {{ new_username | quote }} {{ new_password | quote }} {{ admin_bool }}
4 years ago
register: cmd
- name: Result
debug: msg="{{ cmd.stdout }}"
4 years ago
4 years ago
- name: End playbook if this task list is called.
meta: end_play
when: end_playbook is defined and end_playbook|bool