mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-01-22 13:02:49 +03:00
sync with previous repo
This commit is contained in:
64
roles/matrix-common-after/tasks/awx_post.yml
Normal file
64
roles/matrix-common-after/tasks/awx_post.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
---
|
||||
|
||||
- name: Create user account @janitor
|
||||
command: |
|
||||
/usr/local/bin/matrix-synapse-register-user janitor {{ matrix_awx_janitor_user_password | quote }} 1
|
||||
register: cmd
|
||||
when: not matrix_awx_janitor_user_created|bool
|
||||
no_log: True
|
||||
|
||||
- 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:
|
||||
'matrix_awx_janitor_user_created': 'true'
|
||||
when: not matrix_awx_janitor_user_created|bool
|
||||
|
||||
- name: Create user account @dimension
|
||||
command: |
|
||||
/usr/local/bin/matrix-synapse-register-user dimension {{ matrix_awx_dimension_user_password | quote }} 0
|
||||
register: cmd
|
||||
when: not matrix_awx_dimension_user_created|bool
|
||||
no_log: True
|
||||
|
||||
- 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:
|
||||
'matrix_awx_dimension_user_created': 'true'
|
||||
when: not matrix_awx_dimension_user_created|bool
|
||||
|
||||
- name: Create user account @mjolnir
|
||||
command: |
|
||||
/usr/local/bin/matrix-synapse-register-user mjolnir {{ matrix_awx_mjolnir_user_password | quote }} 0
|
||||
register: cmd
|
||||
when: not matrix_awx_mjolnir_user_created|bool
|
||||
no_log: True
|
||||
|
||||
- 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:
|
||||
'matrix_awx_mjolnir_user_created': 'true'
|
||||
when: not matrix_awx_mjolnir_user_created|bool
|
||||
|
||||
- name: Ensure /chroot/website location has correct permissions
|
||||
file:
|
||||
path: /chroot/website
|
||||
state: directory
|
||||
owner: matrix
|
||||
group: matrix
|
||||
mode: '0770'
|
||||
when: customise_base_domain_website is defined
|
||||
Reference in New Issue
Block a user