1
0
Fork 0

Rename handler

This commit is contained in:
Alex Kotov 2020-07-03 09:29:09 +05:00
parent 7327dc1b2d
commit 571e3cda62
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 18 additions and 18 deletions

View file

@ -1,12 +1,12 @@
--- ---
- name: Load, enable and [re]start systemd service - name: Restart Nginx
systemd:
name: nginx
state: restarted
- name: Load, enable and restart Matrix Synapse
systemd: systemd:
name: '{{ matrix__synapse__service }}' name: '{{ matrix__synapse__service }}'
daemon_reload: true daemon_reload: true
enabled: true enabled: true
state: restarted state: restarted
- name: Restart Nginx
systemd:
name: nginx
state: restarted

View file

@ -13,13 +13,13 @@
- python3-setuptools - python3-setuptools
- sqlite3 - sqlite3
- virtualenv - virtualenv
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Create Matrix Synapse system group - name: Create Matrix Synapse system group
group: group:
name: '{{ matrix__synapse__group }}' name: '{{ matrix__synapse__group }}'
system: true system: true
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Create Matrix Synapse system user - name: Create Matrix Synapse system user
user: user:
@ -27,7 +27,7 @@
group: '{{ matrix__synapse__group }}' group: '{{ matrix__synapse__group }}'
system: true system: true
create_home: false create_home: false
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Create Matrix directories - name: Create Matrix directories
file: file:
@ -42,7 +42,7 @@
- '{{ matrix__lib_dir }}' - '{{ matrix__lib_dir }}'
- '{{ matrix__log_dir }}' - '{{ matrix__log_dir }}'
- '{{ matrix__run_dir }}' - '{{ matrix__run_dir }}'
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Create Matrix Synapse directories - name: Create Matrix Synapse directories
file: file:
@ -57,7 +57,7 @@
- '{{ matrix__synapse__lib_dir }}' - '{{ matrix__synapse__lib_dir }}'
- '{{ matrix__synapse__log_dir }}' - '{{ matrix__synapse__log_dir }}'
- '{{ matrix__synapse__run_dir }}' - '{{ matrix__synapse__run_dir }}'
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Create Matrix Synapse config - name: Create Matrix Synapse config
template: template:
@ -66,7 +66,7 @@
mode: 'u=rw,g=rw,o=' mode: 'u=rw,g=rw,o='
owner: '{{ matrix__synapse__user }}' owner: '{{ matrix__synapse__user }}'
group: '{{ matrix__synapse__group }}' group: '{{ matrix__synapse__group }}'
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Create Matrix Synapse log config - name: Create Matrix Synapse log config
template: template:
@ -75,7 +75,7 @@
mode: 'u=rw,g=rw,o=r' mode: 'u=rw,g=rw,o=r'
owner: '{{ matrix__synapse__user }}' owner: '{{ matrix__synapse__user }}'
group: '{{ matrix__synapse__group }}' group: '{{ matrix__synapse__group }}'
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Create Matrix Synapse signing key - name: Create Matrix Synapse signing key
copy: copy:
@ -84,7 +84,7 @@
mode: 'u=rw,g=rw,o=' mode: 'u=rw,g=rw,o='
owner: '{{ matrix__synapse__user }}' owner: '{{ matrix__synapse__user }}'
group: '{{ matrix__synapse__group }}' group: '{{ matrix__synapse__group }}'
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Create Python virtual env - name: Create Python virtual env
become_user: '{{ matrix__synapse__user }}' become_user: '{{ matrix__synapse__user }}'
@ -95,7 +95,7 @@
- '-p' - '-p'
- 'python3' - 'python3'
creates: '{{ matrix__synapse__venv_dir }}' creates: '{{ matrix__synapse__venv_dir }}'
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Check Python packages - name: Check Python packages
command: command:
@ -123,7 +123,7 @@
- 'pip' - 'pip'
- 'setuptools' - 'setuptools'
when: packages_info | json_query('results[*].rc') | difference([0]) != [] when: packages_info | json_query('results[*].rc') | difference([0]) != []
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Install Python packages - name: Install Python packages
become_user: '{{ matrix__synapse__user }}' become_user: '{{ matrix__synapse__user }}'
@ -135,7 +135,7 @@
- 'lxml' - 'lxml'
- 'netaddr' - 'netaddr'
when: packages_info | json_query('results[*].rc') | difference([0]) != [] when: packages_info | json_query('results[*].rc') | difference([0]) != []
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse
- name: Create systemd service - name: Create systemd service
template: template:
@ -144,4 +144,4 @@
mode: 'u=rw,g=rw,o=r' mode: 'u=rw,g=rw,o=r'
owner: root owner: root
group: root group: root
notify: Load, enable and [re]start systemd service notify: Load, enable and restart Matrix Synapse