2021-08-13 10:05:57 +02:00
|
|
|
---
|
|
|
|
|
2021-12-06 05:54:31 +02:00
|
|
|
- name: Create user account @admin-janitor
|
2021-08-13 10:05:57 +02:00
|
|
|
command: |
|
2021-12-06 05:54:31 +02:00
|
|
|
/usr/local/bin/matrix-synapse-register-user admin-janitor {{ awx_janitor_user_password | quote }} 1
|
2021-08-13 10:05:57 +02:00
|
|
|
register: cmd
|
2021-10-10 07:23:49 +02:00
|
|
|
when: not awx_janitor_user_created|bool
|
2021-12-06 05:54:31 +02:00
|
|
|
no_log: false
|
2022-02-05 22:32:54 +02:00
|
|
|
|
2021-08-13 10:05:57 +02:00
|
|
|
- name: Update AWX janitor user created variable
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
lineinfile:
|
|
|
|
path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
|
|
|
|
regexp: "^#? *{{ item.key | regex_escape() }}:"
|
|
|
|
line: "{{ item.key }}: {{ item.value }}"
|
|
|
|
insertafter: 'AWX Settings'
|
|
|
|
with_dict:
|
2021-10-10 07:23:49 +02:00
|
|
|
'awx_janitor_user_created': 'true'
|
|
|
|
when: not awx_janitor_user_created|bool
|
2021-08-13 10:05:57 +02:00
|
|
|
|
2021-12-06 05:54:31 +02:00
|
|
|
- name: Create user account @admin-dimension
|
2021-08-13 10:05:57 +02:00
|
|
|
command: |
|
2021-12-06 05:54:31 +02:00
|
|
|
/usr/local/bin/matrix-synapse-register-user admin-dimension {{ awx_dimension_user_password | quote }} 0
|
2021-08-13 10:05:57 +02:00
|
|
|
register: cmd
|
2021-10-10 07:23:49 +02:00
|
|
|
when: not awx_dimension_user_created|bool
|
2021-12-06 05:54:31 +02:00
|
|
|
no_log: false
|
2022-02-05 22:32:54 +02:00
|
|
|
|
2021-08-13 10:05:57 +02:00
|
|
|
- name: Update AWX dimension user created variable
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
lineinfile:
|
|
|
|
path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
|
|
|
|
regexp: "^#? *{{ item.key | regex_escape() }}:"
|
|
|
|
line: "{{ item.key }}: {{ item.value }}"
|
|
|
|
insertafter: 'AWX Settings'
|
|
|
|
with_dict:
|
2021-10-10 07:23:49 +02:00
|
|
|
'awx_dimension_user_created': 'true'
|
|
|
|
when: not awx_dimension_user_created|bool
|
2021-08-13 10:05:57 +02:00
|
|
|
|
2021-12-06 05:54:31 +02:00
|
|
|
- name: Create user account @admin-mjolnir
|
2021-08-13 10:05:57 +02:00
|
|
|
command: |
|
2021-12-06 05:54:31 +02:00
|
|
|
/usr/local/bin/matrix-synapse-register-user admin-mjolnir {{ awx_mjolnir_user_password | quote }} 0
|
2021-08-13 10:05:57 +02:00
|
|
|
register: cmd
|
2021-10-10 07:23:49 +02:00
|
|
|
when: not awx_mjolnir_user_created|bool
|
2021-12-06 05:54:31 +02:00
|
|
|
no_log: false
|
2022-02-05 22:32:54 +02:00
|
|
|
|
2021-08-13 10:05:57 +02:00
|
|
|
- name: Update AWX dimension user created variable
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
lineinfile:
|
|
|
|
path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
|
|
|
|
regexp: "^#? *{{ item.key | regex_escape() }}:"
|
|
|
|
line: "{{ item.key }}: {{ item.value }}"
|
|
|
|
insertafter: 'AWX Settings'
|
|
|
|
with_dict:
|
2021-10-10 07:23:49 +02:00
|
|
|
'awx_mjolnir_user_created': 'true'
|
|
|
|
when: not awx_mjolnir_user_created|bool
|
2021-08-13 10:05:57 +02:00
|
|
|
|
|
|
|
- name: Ensure /chroot/website location has correct permissions
|
|
|
|
file:
|
|
|
|
path: /chroot/website
|
|
|
|
state: directory
|
|
|
|
owner: matrix
|
|
|
|
group: matrix
|
|
|
|
mode: '0770'
|
2021-10-10 07:23:49 +02:00
|
|
|
when: awx_customise_base_domain_website is defined
|
2021-10-19 11:45:15 +02:00
|
|
|
|
2021-10-20 12:00:55 +02:00
|
|
|
- name: Collect Discord AppService bot invite link if file exists
|
|
|
|
command:
|
|
|
|
cat /matrix/appservice-discord/config/invite_link
|
|
|
|
register: awx_discord_appservice_link
|
2021-10-21 03:47:07 +02:00
|
|
|
when: awx_appservice_discord_admin_user is defined
|
|
|
|
args:
|
|
|
|
removes: /matrix/appservice-discord/config/invite_link
|
2021-10-20 12:00:55 +02:00
|
|
|
|
|
|
|
- name: Print Discord AppService bot link for user
|
2021-10-19 11:45:15 +02:00
|
|
|
debug:
|
|
|
|
msg: "{{ awx_discord_appservice_link.stdout }}"
|
2021-10-21 03:47:07 +02:00
|
|
|
when: awx_discord_appservice_link.stdout is defined
|