matrix-docker-ansible-deploy/roles/matrix-common-after/tasks/awx_post.yml

65 lines
2.2 KiB
YAML
Raw Normal View History

2021-02-20 10:19:17 +01:00
---
2021-04-04 05:41:06 +02:00
- name: Create user account @janitor
2021-02-20 10:19:17 +01:00
command: |
2021-02-28 15:21:40 +01:00
/usr/local/bin/matrix-synapse-register-user janitor {{ matrix_awx_janitor_user_password | quote }} 1
2021-02-20 10:19:17 +01:00
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
2021-04-04 05:41:06 +02:00
- 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
2021-05-10 12:50:10 +02:00
2021-05-11 07:55:13 +02:00
- name: Create user account @mjolnir
2021-05-10 12:50:10 +02:00
command: |
2021-05-11 08:05:45 +02:00
/usr/local/bin/matrix-synapse-register-user mjolnir {{ matrix_awx_mjolnir_user_password | quote }} 0
2021-05-10 12:50:10 +02:00
register: cmd
2021-05-11 07:58:42 +02:00
when: not matrix_awx_mjolnir_user_created|bool
2021-05-10 12:50:10 +02:00
no_log: True
2021-04-26 14:00:32 +02:00
2021-05-10 12:50:10 +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-05-11 07:55:13 +02:00
'matrix_awx_mjolnir_user_created': 'true'
2021-05-11 07:58:42 +02:00
when: not matrix_awx_mjolnir_user_created|bool
2021-05-10 12:50:10 +02:00
2021-04-26 14:00:32 +02:00
- name: Ensure /chroot/website location has correct permissions
file:
path: /chroot/website
state: directory
owner: matrix
group: matrix
2021-08-11 11:32:38 +02:00
mode: '0770'
2021-04-26 14:00:32 +02:00
when: customise_base_domain_website is defined