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-honoroit.service'] }}"
|
||||
when: matrix_bot_honoroit_enabled|bool
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_bot_honoroit_requires_restart: false
|
||||
|
||||
- block:
|
||||
@ -9,7 +9,7 @@
|
||||
register: matrix_bot_honoroit_sqlite_database_path_local_stat_result
|
||||
|
||||
- block:
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_postgres_db_migration_request:
|
||||
src: "{{ matrix_bot_honoroit_sqlite_database_path_local }}"
|
||||
dst: "{{ matrix_bot_honoroit_database_connection_string }}"
|
||||
@ -20,13 +20,13 @@
|
||||
|
||||
- import_tasks: "{{ role_path }}/../matrix-postgres/tasks/util/migrate_db_to_postgres.yml"
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_bot_honoroit_requires_restart: true
|
||||
when: "matrix_bot_honoroit_sqlite_database_path_local_stat_result.stat.exists|bool"
|
||||
when: "matrix_bot_honoroit_database_engine == 'postgres'"
|
||||
|
||||
- name: Ensure honoroit paths exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
@ -40,7 +40,7 @@
|
||||
when: "item.when|bool"
|
||||
|
||||
- name: Ensure honoroit environment variables file created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/env.j2"
|
||||
dest: "{{ matrix_bot_honoroit_config_path }}/env"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -60,7 +60,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure honoroit repository is present on self-build
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_honoroit_docker_repo }}"
|
||||
dest: "{{ matrix_bot_honoroit_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
@ -82,19 +82,19 @@
|
||||
when: "matrix_bot_honoroit_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure matrix-bot-honoroit.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-bot-honoroit.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-bot-honoroit.service"
|
||||
mode: 0644
|
||||
register: matrix_bot_honoroit_systemd_service_result
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-bot-honoroit.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_bot_honoroit_systemd_service_result.changed|bool"
|
||||
|
||||
- name: Ensure matrix-bot-honoroit.service restarted, if necessary
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "matrix-bot-honoroit.service"
|
||||
state: restarted
|
||||
when: "matrix_bot_honoroit_requires_restart|bool"
|
||||
|
@ -6,7 +6,7 @@
|
||||
register: matrix_bot_honoroit_service_stat
|
||||
|
||||
- name: Ensure matrix-honoroit is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-bot-honoroit
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -15,18 +15,18 @@
|
||||
when: "matrix_bot_honoroit_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure matrix-bot-honoroit.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-bot-honoroit.service"
|
||||
state: absent
|
||||
when: "matrix_bot_honoroit_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-bot-honoroit.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_bot_honoroit_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure Matrix honoroit paths don't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_bot_honoroit_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