Use fully-qualified module names for builtin Ansible modules
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1939
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-matrix-registration-bot.service'] }}"
|
||||
when: matrix_bot_matrix_registration_bot_enabled|bool
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Ensure matrix-registration-bot paths exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
@ -14,7 +14,7 @@
|
||||
when: "item.when|bool"
|
||||
|
||||
- name: Ensure matrix-registration-bot configuration file created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/config/config.yml.j2"
|
||||
dest: "{{ matrix_bot_matrix_registration_bot_config_path }}/config.yml"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -34,7 +34,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure matrix-registration-bot repository is present on self-build
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_matrix_registration_bot_docker_repo }}"
|
||||
dest: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
@ -56,18 +56,18 @@
|
||||
when: "matrix_bot_matrix_registration_bot_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure matrix-bot-matrix-registration-bot.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-registration-bot.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-bot-matrix-registration-bot.service"
|
||||
mode: 0644
|
||||
register: matrix_bot_matrix_registration_bot_systemd_service_result
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-bot-matrix-registration-bot.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_bot_matrix_registration_bot_systemd_service_result.changed|bool"
|
||||
|
||||
- name: Ensure matrix-bot-matrix-registration-bot.service restarted, if necessary
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "matrix-bot-matrix-registration-bot.service"
|
||||
state: restarted
|
||||
|
@ -6,7 +6,7 @@
|
||||
register: matrix_bot_matrix_registration_bot_service_stat
|
||||
|
||||
- name: Ensure matrix-matrix-registration-bot is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-bot-matrix-registration-bot
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -15,18 +15,18 @@
|
||||
when: "matrix_bot_matrix_registration_bot_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure matrix-bot-matrix-registration-bot.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-bot-matrix-registration-bot.service"
|
||||
state: absent
|
||||
when: "matrix_bot_matrix_registration_bot_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-bot-matrix-registration-bot.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_bot_matrix_registration_bot_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure Matrix matrix-registration-bot paths don't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_bot_matrix_registration_bot_base_path }}"
|
||||
state: absent
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Fail if required settings not defined
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item }}`).
|
||||
when: "vars[item] == ''"
|
||||
|
Reference in New Issue
Block a user