Call modules with FQCN

This commit is contained in:
GARDAIS Jeremy 2024-09-04 15:36:27 +02:00
parent 4619ff903d
commit 2ab819bac4
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
2 changed files with 6 additions and 5 deletions

View File

@ -2,6 +2,7 @@
### Fix ### Fix
* Replace flatten jinja filter with **list**. * Replace flatten jinja filter with **list**.
* Call module with FQCN.
## v1.1.2 ## v1.1.2

View File

@ -5,7 +5,7 @@
# Server Manage required system packages [[[1 # Server Manage required system packages [[[1
- name: Ensure required packages are in there desired state - name: Ensure required packages are in there desired state
package: ansible.builtin.package:
name: '{{ xymon_server__base_packages | list }}' name: '{{ xymon_server__base_packages | list }}'
state: '{{ "present" if (xymon_server__deploy_state == "present") else "absent" }}' state: '{{ "present" if (xymon_server__deploy_state == "present") else "absent" }}'
install_recommends: False install_recommends: False
@ -15,7 +15,7 @@
# Server Manage /etc configuration files [[[1 # Server Manage /etc configuration files [[[1
- name: Ensure /etc directory structure exists - name: Ensure /etc directory structure exists
file: ansible.builtin.file:
path: '/etc/xymon/{{ item.path }}' path: '/etc/xymon/{{ item.path }}'
state: directory state: directory
with_filetree: '{{ xymon_server__etc_src }}' with_filetree: '{{ xymon_server__etc_src }}'
@ -23,7 +23,7 @@
notify: ['restart xymon server service'] notify: ['restart xymon server service']
- name: Generate Xymon configuration files - name: Generate Xymon configuration files
template: ansible.builtin.template:
src: '{{ item.src }}' src: '{{ item.src }}'
dest: "/etc/xymon/{{ item.path | replace('.j2','') }}" dest: "/etc/xymon/{{ item.path | replace('.j2','') }}"
mode: '{{ item.mode }}' mode: '{{ item.mode }}'
@ -32,7 +32,7 @@
notify: ['restart xymon server service'] notify: ['restart xymon server service']
- name: Generate Xymon configuration symlinks - name: Generate Xymon configuration symlinks
template: ansible.builtin.template:
src: '{{ item.src }}' src: '{{ item.src }}'
dest: "/etc/xymon/{{ item.path }}" dest: "/etc/xymon/{{ item.path }}"
mode: '{{ item.mode }}' mode: '{{ item.mode }}'
@ -45,7 +45,7 @@
# Manage service [[[1 # Manage service [[[1
- name: Manage Xymon server service - name: Manage Xymon server service
service: ansible.builtin.service:
name: '{{ xymon_server__service_name }}' name: '{{ xymon_server__service_name }}'
state: '{{ "started" if (xymon_server__deploy_state == "present" and state: '{{ "started" if (xymon_server__deploy_state == "present" and
(xymon_server__service_manage | d(True) | bool)) (xymon_server__service_manage | d(True) | bool))