Compare commits

..

No commits in common. "c6115085a9e5b73e99b79d3d23488a85888419f7" and "23a0dfa5580dcbbbb027ebb7fab223961214be0d" have entirely different histories.

2 changed files with 24 additions and 24 deletions

View File

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

View File

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