Compare commits

...

2 Commits

2 changed files with 24 additions and 24 deletions

View File

@ -1,4 +1,8 @@
## vX.Y.Z
## v2.0.3
### Fix
* Use flatten to manage packages list.
* Prefix module with "ansible.builtin.".
### Enhancements
* Works with Debian Bullseye

View File

@ -4,7 +4,7 @@
# tasks file for ipr.ansible.xymon
- name: Load specific OS vars for xymon
include_vars: "{{ item }}"
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}.yml"
- "{{ ansible_distribution|lower }}.yml"
@ -12,18 +12,16 @@
# Manage required client packages [[[1
- name: client package
package:
name: '{{ item }}'
ansible.builtin.package:
name: '{{ xymon_cli__pkg_list | flatten }}'
state: '{{ xymon_cli__pkg_state }}'
with_items:
- '{{ xymon_cli__pkg_list | to_nice_json }}'
register: cli_result
until: cli_result is success
when: xymon_cli__manage|bool
# Manage client configuration [[[1
- name: CONFIG xymon-client service
template:
ansible.builtin.template:
src: '{{ xymon_cli__default_conf_tpl }}'
dest: '{{ xymon_cli__default_conf_path }}'
owner: root
@ -34,7 +32,7 @@
notify: restart xymon-client service
- name: CONFIG xymon user's groups
user:
ansible.builtin.user:
name: xymon
groups: '{{ xymon_cli__user_groups }}'
append: true
@ -43,7 +41,7 @@
# Manage service [[[1
- name: SERVICE manage '{{ xymon_cli__service_name }}'
service:
ansible.builtin.service:
name: '{{ xymon_cli__service_name }}'
state: started
enabled: '{{ xymon_cli__service_enabled }}'
@ -52,11 +50,9 @@
# Manage all plugins's packages [[[1
- name: PLUGINS package and dependencies
package:
name: '{{ item }}'
ansible.builtin.package:
name: '{{ xymon_cli__plug_combined_packages | flatten }}'
state: 'present'
with_items:
- '{{ xymon_cli__plug_combined_packages | to_nice_json }}'
when: (xymon_cli__manage|bool and
xymon_cli__plug_manage|bool)
register: combined_packages_plug_result
@ -65,7 +61,7 @@
# Manage plugins clientlaunch files [[[1
- name: PLUGINS clientlaunch files
template:
ansible.builtin.template:
src: '{{ item.template }}'
dest: '{{ item.path }}'
owner: root
@ -79,7 +75,7 @@
# Manage apt plugin [[[1
- name: PLUGIN apt no_repo_accept whitelist
template:
ansible.builtin.template:
src: 'etc/xymon/apt_no_repo_accept.j2'
dest: '/etc/xymon/apt_no_repo_accept'
owner: root
@ -91,7 +87,7 @@
# Manage libs plugin [[[1
- name: PLUGIN libs whitelist
template:
ansible.builtin.template:
src: 'etc/xymon/libs.local.yaml.j2'
dest: '/etc/xymon/libs.local.yaml'
owner: root
@ -103,7 +99,7 @@
# Manage net plugin [[[1
- name: PLUGIN net config template
template:
ansible.builtin.template:
src: '{{ xymon_cli__plug_net_conf_tpl }}'
dest: '{{ xymon_cli__plug_net_conf_path }}'
owner: root
@ -115,7 +111,7 @@
# Manage sge plugin [[[1
- name: PLUGIN sge script file from template
template:
ansible.builtin.template:
src: '{{ xymon_cli__plug_sge_script_tpl }}'
dest: '{{ xymon_cli__plug_sge_script_path }}'
owner: root
@ -127,7 +123,7 @@
notify: restart xymon-client service
- name: PLUGIN sge script file from URL
get_url:
ansible.builtin.get_url:
url: '{{ xymon_cli__plug_sge_script_url }}'
dest: '{{ xymon_cli__plug_sge_script_path }}'
owner: root
@ -140,7 +136,7 @@
# Manage smartoverall plugin [[[1
- name: PLUGIN smartoverall script file from template
template:
ansible.builtin.template:
src: '{{ xymon_cli__plug_smartoverall_script_tpl }}'
dest: '{{ xymon_cli__plug_smartoverall_script_path }}'
owner: root
@ -152,7 +148,7 @@
notify: restart xymon-client service
- name: PLUGIN smartoverall script file from URL
get_url:
ansible.builtin.get_url:
url: '{{ xymon_cli__plug_smartoverall_script_url }}'
dest: '{{ xymon_cli__plug_smartoverall_script_path }}'
owner: root
@ -165,7 +161,7 @@
# Manage smart plugin [[[1
- name: PLUGIN smart script file from template
template:
ansible.builtin.template:
src: '{{ xymon_cli__plug_smart_script_tpl }}'
dest: '{{ xymon_cli__plug_smart_script_path }}'
owner: root
@ -177,7 +173,7 @@
notify: restart xymon-client service
- name: PLUGIN smart script file from URL
get_url:
ansible.builtin.get_url:
url: '{{ xymon_cli__plug_smart_script_url }}'
dest: '{{ xymon_cli__plug_smart_script_path }}'
owner: root
@ -190,7 +186,7 @@
# Manage zfs plugin [[[1
- name: PLUGIN zfs script file
template:
ansible.builtin.template:
src: '{{ xymon_cli__plug_zfs_script_tpl }}'
dest: '{{ xymon_cli__plug_zfs_script_path }}'
owner: root