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,7 +1,7 @@
|
||||
---
|
||||
# Ansible outputs the message in the `item=` field.
|
||||
# It's unnecessary to output it again in the actual message, so we don't.
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: ""
|
||||
with_items: "{{ matrix_playbook_runtime_results }}"
|
||||
when: "matrix_playbook_runtime_results is defined and matrix_playbook_runtime_results|length > 0"
|
||||
|
@ -1,4 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Run Docker System Prune
|
||||
command: "{{ matrix_host_command_docker }} system prune -a -f"
|
||||
ansible.builtin.command: "{{ matrix_host_command_docker }} system prune -a -f"
|
||||
|
@ -1,22 +1,22 @@
|
||||
---
|
||||
|
||||
- name: Determine whether we should make services autostart
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
matrix_services_autostart_enabled_bool: "{{ true if matrix_services_autostart_enabled|default('') == '' else matrix_services_autostart_enabled|bool }}"
|
||||
|
||||
- name: Ensure systemd is reloaded
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Ensure Matrix services are stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
with_items: "{{ matrix_systemd_services_list }}"
|
||||
when: not ansible_check_mode
|
||||
|
||||
- name: Ensure Matrix services are started
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "{{ item }}"
|
||||
enabled: "{{ matrix_services_autostart_enabled_bool }}"
|
||||
state: started
|
||||
@ -39,7 +39,7 @@
|
||||
service_facts:
|
||||
|
||||
- name: Fail if service isn't detected to be running
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
{{ item }} was not detected to be running.
|
||||
It's possible that there's a configuration problem or another service on your server interferes with it (uses the same ports, etc.).
|
||||
@ -57,13 +57,13 @@
|
||||
# service_facts is not collecting the data successfully.
|
||||
# Therefore iterating here manually
|
||||
- name: Fetch systemd information
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ item }}"
|
||||
register: systemdstatus
|
||||
with_items: "{{ matrix_systemd_services_list }}"
|
||||
|
||||
- name: Fail if service isn't detected to be running
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
{{ item.item }} was not detected to be running.
|
||||
It's possible that there's a configuration problem or another service on your server interferes with it (uses the same ports, etc.).
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Ensure Matrix services stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
with_items: "{{ matrix_systemd_services_list }}"
|
||||
|
Reference in New Issue
Block a user