Compare commits

..

No commits in common. "82564f655e34356f993b58e962e2c5e151143be7" and "4126ae49d98436c29a0f8e3e9a2f0baedb107349" have entirely different histories.

5 changed files with 11 additions and 19 deletions

View File

@ -1,11 +1,3 @@
## v1.2.0
### Fix
* Replace flatten jinja filter with **list**.
* Call module with FQCN.
### Enhancements
* Use comment jinja filter with ansible_managed to allow multi-lines comment.
## v1.1.2 ## v1.1.2

View File

@ -11,7 +11,7 @@
# #
# List of base packages to install. # List of base packages to install.
xymon_server__base_packages: xymon_server__base_packages:
- xymon - 'xymon'
# ]]] # ]]]
# .. envvar:: xymon_server__deploy_state [[[ # .. envvar:: xymon_server__deploy_state [[[

View File

@ -5,8 +5,8 @@
# 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
ansible.builtin.package: package:
name: '{{ xymon_server__base_packages | list }}' name: '{{ xymon_server__base_packages | flatten }}'
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
register: server_pkg_result register: server_pkg_result
@ -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
ansible.builtin.file: 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
ansible.builtin.template: 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
ansible.builtin.template: 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
ansible.builtin.service: 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))

View File

@ -1,4 +1,4 @@
# {{ ansible_managed | comment }} # {{ ansible_managed }}
# #
# Master configuration file for Xymon # Master configuration file for Xymon
# #
@ -20,6 +20,6 @@
#page common Common #page common Common
#group-except sslcert|bbd|xymond|xymongen|xymonnet|xymonproxy <font size="+1">Test</font> #group-except sslcert|bbd|xymond|xymongen|xymonnet|xymonproxy <font size="+1">Test</font>
#include hosts.d/common.cfg #include hosts.d/common.cfg

View File

@ -1,4 +1,4 @@
# {{ ansible_managed | comment }} # {{ ansible_managed }}
#192.168.0.1 www.{{ ansible_domain }} # apt libs SSH apache https://www.{{ ansible_domain }} #192.168.0.1 www.{{ ansible_domain }} # apt libs SSH apache https://www.{{ ansible_domain }}
#192.168.0.2 pxe.{{ ansible_domain }} # apt libs SSH DESCR:PXE CLIENT:deploy #192.168.0.2 pxe.{{ ansible_domain }} # apt libs SSH DESCR:PXE CLIENT:deploy