mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-22 12:35:51 +00:00
Using ansible.builtin where possible
This commit is contained in:
parent
47caba38fb
commit
0ee44adde8
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Ensure Conduit config path exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_conduit_config_path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
@ -10,7 +10,7 @@
|
||||
when: "matrix_conduit_enabled|bool"
|
||||
|
||||
- name: Ensure Conduit data path exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_conduit_data_path }}"
|
||||
state: directory
|
||||
mode: 0770
|
||||
|
@ -11,7 +11,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure Conduit configuration installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/conduit/conduit.toml.j2"
|
||||
dest: "{{ matrix_conduit_config_path }}/conduit.toml"
|
||||
mode: 0644
|
||||
@ -19,13 +19,13 @@
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure matrix-conduit.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/conduit/systemd/matrix-conduit.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-conduit.service"
|
||||
mode: 0644
|
||||
register: matrix_conduit_systemd_service_result
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-conduit.service installation
|
||||
service:
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
when: "matrix_conduit_systemd_service_result.changed|bool"
|
||||
|
@ -1,12 +1,12 @@
|
||||
---
|
||||
|
||||
- name: Check existence of matrix-conduit service
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: "{{ matrix_systemd_path }}/matrix-conduit.service"
|
||||
register: matrix_conduit_service_stat
|
||||
|
||||
- name: Ensure matrix-conduit is stopped
|
||||
service:
|
||||
ansible.builtin.systemd:
|
||||
name: matrix-conduit
|
||||
state: stopped
|
||||
daemon_reload: true
|
||||
@ -14,13 +14,13 @@
|
||||
when: "matrix_conduit_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure matrix-conduit.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-conduit.service"
|
||||
state: absent
|
||||
when: "matrix_conduit_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-conduit.service removal
|
||||
service:
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
when: "matrix_conduit_service_stat.stat.exists"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-conduit.service'] }}"
|
||||
when: matrix_conduit_enabled|bool
|
||||
|
@ -11,7 +11,7 @@
|
||||
- setup-conduit
|
||||
|
||||
- name: Mark matrix-conduit role as executed
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
matrix_conduit_role_executed: true
|
||||
tags:
|
||||
- always
|
||||
|
Loading…
Reference in New Issue
Block a user