diff --git a/CHANGELOG.md b/CHANGELOG.md index 373fe19..068fee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## v2.X.Y ### Enhancements +* All vars now starts with "xymon_cli__" for more readability. + No backward compatibility with old variable naming! Update your configuration! * Add megaraid probe management. * Add net probe management. * Add configuration file for `net` script (/etc/xymon/net.yaml) and diff --git a/README.md b/README.md index 5277576..cfb31b0 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,17 @@ Manage Xymon (client) installation and configuration. ## Role Variables -* **xymon_cli_manage** : If `xymon-client` should be managed with this role [default : `true`]. -* **xymon_cli_pkg_state** : State of new `xymon-client` package(s) [default : `present`]. -* **xymon_cli_default_conf_path** : Configuration file for `xymon-client` [default : `/etc/default/xymon-client`]. -* **xymon_cli_default_conf_tpl** : Template used to generate the previous config file [default : `etc/default/xymon-client.j2`]. -* **xymon_cli_hostname** : Allow to override default value of CLIENTHOSTNAME var [default : `{{ ansible_fqdn }}`]. -* **xymon_user_groups** : List of 'xymon' user's groups [default : `xymon`]. -* **xymon_cli_service_manage** : If `xymon-client` service should be managed with this role [default : `true`]. -* **xymon_cli_service_name** : `xymon-client` service name [default : `xymon-client`]. -* **xymon_cli_service_enabled** : Set `xymon-client` service available at startup [default : `true`]. -* **xymon_srv_list** : The list of Xymon servers (you must give an hostname, IP,… reachable from any clients) [defaults : `monitoring.{{ ansible_domain }}`]. -* **xymon_plug_manage** : If this role should manage plugins configuration [default : `true`]. +* **xymon_cli__manage** : If `xymon-client` should be managed with this role [default : `true`]. +* **xymon_cli__pkg_state** : State of new `xymon-client` package(s) [default : `present`]. +* **xymon_cli__default_conf_path** : Configuration file for `xymon-client` [default : `/etc/default/xymon-client`]. +* **xymon_cli__default_conf_tpl** : Template used to generate the previous config file [default : `etc/default/xymon-client.j2`]. +* **xymon_cli__hostname** : Allow to override default value of CLIENTHOSTNAME var [default : `{{ ansible_fqdn }}`]. +* **xymon_cli__user_groups** : List of 'xymon' user's groups [default : `xymon`]. +* **xymon_cli__service_manage** : If `xymon-client` service should be managed with this role [default : `true`]. +* **xymon_cli__service_name** : `xymon-client` service name [default : `xymon-client`]. +* **xymon_cli__service_enabled** : Set `xymon-client` service available at startup [default : `true`]. +* **xymon_cli__srv_list** : The list of Xymon servers (you must give an hostname, IP,… reachable from any clients) [defaults : `monitoring.{{ ansible_domain }}`]. +* **xymon_cli__plug_manage** : If this role should manage plugins configuration [default : `true`]. ### Plugins Variables @@ -39,15 +39,15 @@ Manage Xymon (client) installation and configuration. Variables for the APT plugin from hobbit-plugins. The plugin check for outstanding updates. -* **xymon_plug_apt_state** : The state of plugin `apt` [default : `true`]. -* **xymon_plug_apt_package** : The packages to install to provide `apt` plugin [default : `[ 'libtimedate-perl' ]`]. -* **xymon_plug_apt_path** : Configuration file for the `apt` plugin [default : `/etc/xymon/clientlaunch.d/apt.cfg`]. -* **xymon_plug_apt_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/apt.cfg.j2`]. -* **xymon_plug_apt_interval** : Time between each run of the `apt` plugin [default : `5m`]. -* **xymon_plug_apt_default_whitelist** : Default list of allowed packages not installed from repositories [default : `[]`]. -* **xymon_plug_apt_whitelist** : All hosts list of allowed packages not installed from repositories [default : `[]`]. -* **xymon_plug_apt_group_whitelist** : Group list of allowed packages not installed from repositories [default : `[]`]. -* **xymon_plug_apt_host_whitelist** : Host list of allowed packages not installed from repositories [default : `[]`]. +* **xymon_cli__plug_apt_state** : The state of plugin `apt` [default : `true`]. +* **xymon_cli__plug_apt_package** : The packages to install to provide `apt` plugin [default : `[ 'libtimedate-perl' ]`]. +* **xymon_cli__plug_apt_path** : Configuration file for the `apt` plugin [default : `/etc/xymon/clientlaunch.d/apt.cfg`]. +* **xymon_cli__plug_apt_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/apt.cfg.j2`]. +* **xymon_cli__plug_apt_interval** : Time between each run of the `apt` plugin [default : `5m`]. +* **xymon_cli__plug_apt_default_whitelist** : Default list of allowed packages not installed from repositories [default : `[]`]. +* **xymon_cli__plug_apt_whitelist** : All hosts list of allowed packages not installed from repositories [default : `[]`]. +* **xymon_cli__plug_apt_group_whitelist** : Group list of allowed packages not installed from repositories [default : `[]`]. +* **xymon_cli__plug_apt_host_whitelist** : Host list of allowed packages not installed from repositories [default : `[]`]. #### IPMI @@ -65,15 +65,15 @@ sensors and event log. Variables for the Libs plugin from hobbit-plugins. The plugin check for running processes with upgraded libraries. -* **xymon_plug_libs_state** : The state of plugin `libs` [default : `true`]. -* **xymon_plug_libs_package** : The packages to install to provide `libs` plugin [default : `[ 'binutils', 'lsof', 'libyaml-tiny-perl', 'libfile-slurp-perl', 'libsort-naturally-perl' ]`]. -* **xymon_plug_libs_path** : Configuration file for the `libs` plugin [default : `/etc/xymon/clientlaunch.d/libs.cfg`]. -* **xymon_plug_libs_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/libs.cfg.j2`]. -* **xymon_plug_libs_interval** : Time between each run of the `libs` plugin [default : `5m`]. -* **xymon_plug_libs_default_whitelist** : Default whitelist of processes that should not be monitored with `libs` plugin. -* **xymon_plug_libs_whitelist** : All hosts whitelist of processes that should not be monitored with `libs` plugin. -* **xymon_plug_libs_group_whitelist** : Group whitelist of processes that should not be monitored with `libs` plugin. -* **xymon_plug_libs_host_whitelist** : Host whitelist of processes that should not be monitored with `libs` plugin. +* **xymon_cli__plug_libs_state** : The state of plugin `libs` [default : `true`]. +* **xymon_cli__plug_libs_package** : The packages to install to provide `libs` plugin [default : `[ 'binutils', 'lsof', 'libyaml-tiny-perl', 'libfile-slurp-perl', 'libsort-naturally-perl' ]`]. +* **xymon_cli__plug_libs_path** : Configuration file for the `libs` plugin [default : `/etc/xymon/clientlaunch.d/libs.cfg`]. +* **xymon_cli__plug_libs_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/libs.cfg.j2`]. +* **xymon_cli__plug_libs_interval** : Time between each run of the `libs` plugin [default : `5m`]. +* **xymon_cli__plug_libs_default_whitelist** : Default whitelist of processes that should not be monitored with `libs` plugin. +* **xymon_cli__plug_libs_whitelist** : All hosts whitelist of processes that should not be monitored with `libs` plugin. +* **xymon_cli__plug_libs_group_whitelist** : Group whitelist of processes that should not be monitored with `libs` plugin. +* **xymon_cli__plug_libs_host_whitelist** : Host whitelist of processes that should not be monitored with `libs` plugin. #### Net @@ -96,11 +96,11 @@ the project for more informations. Variables for the Mq plugin from hobbit-plugins. The plugin check Postfix's mail queue. -* **xymon_plug_mq_state** : The state of plugin `mq` [default : `true`]. -* **xymon_plug_mq_package** : The packages to install to provide `mq` plugin [default : `[ 'libtimedate-perl' ]`]. -* **xymon_plug_mq_path** : Configuration file for the `mq` plugin [default : `/etc/xymon/clientlaunch.d/mq.cfg`]. -* **xymon_plug_mq_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/mq.cfg.j2`]. -* **xymon_plug_mq_interval** : Time between each run of the `mq` plugin [default : `5m`]. +* **xymon_cli__plug_mq_state** : The state of plugin `mq` [default : `true`]. +* **xymon_cli__plug_mq_package** : The packages to install to provide `mq` plugin [default : `[ 'libtimedate-perl' ]`]. +* **xymon_cli__plug_mq_path** : Configuration file for the `mq` plugin [default : `/etc/xymon/clientlaunch.d/mq.cfg`]. +* **xymon_cli__plug_mq_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/mq.cfg.j2`]. +* **xymon_cli__plug_mq_interval** : Time between each run of the `mq` plugin [default : `5m`]. #### Net @@ -226,7 +226,7 @@ xymon_cli__plug_temp_state: '{{ True Please see default value by Operating System file in [vars][vars directory] directory. -* **xymon_cli_pkg_list** : The list of packages to install to provide `xymon-client`. +* **xymon_cli__pkg_list** : The list of packages to install to provide `xymon-client`. ## Example Playbook diff --git a/defaults/main.yml b/defaults/main.yml index 4006064..5ed4b2f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,12 +7,12 @@ # Packages and installation [[[ # ----------------------------- -# .. envvar:: xymon_cli_manage [[[ +# .. envvar:: xymon_cli__manage [[[ # # If this role should manage the installation of Xymon client -xymon_cli_manage: true +xymon_cli__manage: true # ]]] -# .. envvar:: xymon_cli_pkg_state [[[ +# .. envvar:: xymon_cli__pkg_state [[[ # # What is the desired state which this role's packages should be? # Possible options: @@ -23,45 +23,45 @@ xymon_cli_manage: true # ``absent`` # Ensure to remove the packages. # -xymon_cli_pkg_state: 'present' +xymon_cli__pkg_state: 'present' # ]]] # ]]] # Server configuration and service [[[ # ------------------------------------ ## conf -xymon_cli_default_conf_path: '/etc/default/xymon-client' -xymon_cli_default_conf_tpl: 'etc/default/xymon-client.j2' -xymon_cli_hostname: "{{ ansible_fqdn }}" -xymon_user_groups: 'xymon' +xymon_cli__default_conf_path: '/etc/default/xymon-client' +xymon_cli__default_conf_tpl: 'etc/default/xymon-client.j2' +xymon_cli__hostname: "{{ ansible_fqdn }}" +xymon_cli__user_groups: 'xymon' ## service -xymon_cli_service_manage: true -xymon_cli_service_name: 'xymon-client' -xymon_cli_service_enabled: true +xymon_cli__service_manage: true +xymon_cli__service_name: 'xymon-client' +xymon_cli__service_enabled: true # server -xymon_srv_list: "monitoring.{{ ansible_domain }}" +xymon_cli__srv_list: "monitoring.{{ ansible_domain }}" # ]]] # Plugins management [[[ # ---------------------- -xymon_plug_manage: true +xymon_cli__plug_manage: true ## Plugin apt [[[ -xymon_plug_apt_state: true -xymon_plug_apt_package: [ 'aptitude', 'dctrl-tools' ] -xymon_plug_apt_path: '/etc/xymon/clientlaunch.d/apt.cfg' -xymon_plug_apt_tpl: 'etc/xymon/clientlaunch.d/apt.cfg.j2' -xymon_plug_apt_interval: '5m' -xymon_plug_apt_default_whitelist: [] -xymon_plug_apt_whitelist: [] -xymon_plug_apt_group_whitelist: [] -xymon_plug_apt_host_whitelist: [] -xymon_plug_apt_combined_whitelist: '{{ xymon_plug_apt_default_whitelist - + xymon_plug_apt_whitelist - + xymon_plug_apt_group_whitelist - + xymon_plug_apt_host_whitelist }}' +xymon_cli__plug_apt_state: true +xymon_cli__plug_apt_package: [ 'aptitude', 'dctrl-tools' ] +xymon_cli__plug_apt_path: '/etc/xymon/clientlaunch.d/apt.cfg' +xymon_cli__plug_apt_tpl: 'etc/xymon/clientlaunch.d/apt.cfg.j2' +xymon_cli__plug_apt_interval: '5m' +xymon_cli__plug_apt_default_whitelist: [] +xymon_cli__plug_apt_whitelist: [] +xymon_cli__plug_apt_group_whitelist: [] +xymon_cli__plug_apt_host_whitelist: [] +xymon_cli__plug_apt_combined_whitelist: '{{ xymon_cli__plug_apt_default_whitelist + + xymon_cli__plug_apt_whitelist + + xymon_cli__plug_apt_group_whitelist + + xymon_cli__plug_apt_host_whitelist }}' ## ]]] ## Plugin ipmi [[[ @@ -73,13 +73,13 @@ xymon_cli__plug_ipmi_interval: '5m' ## ]]] ## Plugin libs [[[ -xymon_plug_libs_state: true -xymon_plug_libs_package: [ 'binutils', 'lsof', 'libyaml-tiny-perl', 'libfile-slurp-perl', 'libsort-naturally-perl' ] -xymon_plug_libs_path: '/etc/xymon/clientlaunch.d/libs.cfg' -xymon_plug_libs_tpl: 'etc/xymon/clientlaunch.d/libs.cfg.j2' -xymon_plug_libs_interval: '5m' +xymon_cli__plug_libs_state: true +xymon_cli__plug_libs_package: [ 'binutils', 'lsof', 'libyaml-tiny-perl', 'libfile-slurp-perl', 'libsort-naturally-perl' ] +xymon_cli__plug_libs_path: '/etc/xymon/clientlaunch.d/libs.cfg' +xymon_cli__plug_libs_tpl: 'etc/xymon/clientlaunch.d/libs.cfg.j2' +xymon_cli__plug_libs_interval: '5m' -xymon_plug_libs_default_whitelist: +xymon_cli__plug_libs_default_whitelist: /lib/systemd/systemd: - '.*' /usr/lib/x86_64-linux-gnu/sssd/sssd_be: @@ -94,9 +94,9 @@ xymon_plug_libs_default_whitelist: - '.*' /sbin/multipathd: - '.*' -xymon_plug_libs_whitelist: {} -xymon_plug_libs_group_whitelist: {} -xymon_plug_libs_host_whitelist: {} +xymon_cli__plug_libs_whitelist: {} +xymon_cli__plug_libs_group_whitelist: {} +xymon_cli__plug_libs_host_whitelist: {} # ]]] ## Plugin Megaraid [[[ @@ -108,11 +108,11 @@ xymon_cli__plug_megaraid_interval: '5m' ## ]]] ## Plugin mq [[[ -xymon_plug_mq_state: true -xymon_plug_mq_package: ['libtimedate-perl'] -xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg' -xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2' -xymon_plug_mq_interval: '5m' +xymon_cli__plug_mq_state: true +xymon_cli__plug_mq_package: ['libtimedate-perl'] +xymon_cli__plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg' +xymon_cli__plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2' +xymon_cli__plug_mq_interval: '5m' ## ]]] ## Plugin net [[[ @@ -192,11 +192,11 @@ xymon_cli__plug_zfs_interval: '5m' # # Combined packages vars of all enabled plugins. # -xymon_cli__plug_combined_packages: '{{ ((xymon_plug_apt_package if xymon_plug_apt_state|bool else []) +xymon_cli__plug_combined_packages: '{{ ((xymon_cli__plug_apt_package if xymon_cli__plug_apt_state|bool else []) + (xymon_cli__plug_ipmi_package if xymon_cli__plug_ipmi_state|bool else []) - + (xymon_plug_libs_package if xymon_plug_libs_state|bool else []) + + (xymon_cli__plug_libs_package if xymon_cli__plug_libs_state|bool else []) + (xymon_cli__plug_megaraid_package if xymon_cli__plug_megaraid_state|bool else []) - + (xymon_plug_mq_package if xymon_plug_mq_state|bool else []) + + (xymon_cli__plug_mq_package if xymon_cli__plug_mq_state|bool else []) + (xymon_cli__plug_net_package if xymon_cli__plug_net_state|bool else []) + (xymon_cli__plug_smartoverall_package if xymon_cli__plug_smartoverall_state|bool else []) + (xymon_cli__plug_smart_package if xymon_cli__plug_smart_state|bool else []) @@ -209,20 +209,20 @@ xymon_cli__plug_combined_packages: '{{ ((xymon_plug_apt_package if # xymon_cli__plug_combined_clientlaunch: - name: apt - path: '{{ xymon_plug_apt_path }}' - template: '{{ xymon_plug_apt_tpl }}' + path: '{{ xymon_cli__plug_apt_path }}' + template: '{{ xymon_cli__plug_apt_tpl }}' - name: ipmi path: '{{ xymon_cli__plug_ipmi_path }}' template: '{{ xymon_cli__plug_ipmi_tpl }}' - name: libs - path: '{{ xymon_plug_libs_path }}' - template: '{{ xymon_plug_libs_tpl }}' + path: '{{ xymon_cli__plug_libs_path }}' + template: '{{ xymon_cli__plug_libs_tpl }}' - name: megaraid path: '{{ xymon_cli__plug_megaraid_path }}' template: '{{ xymon_cli__plug_megaraid_tpl }}' - name: mq - path: '{{ xymon_plug_mq_path }}' - template: '{{ xymon_plug_mq_tpl }}' + path: '{{ xymon_cli__plug_mq_path }}' + template: '{{ xymon_cli__plug_mq_tpl }}' - name: net path: '{{ xymon_cli__plug_net_path }}' template: '{{ xymon_cli__plug_net_tpl }}' diff --git a/handlers/main.yml b/handlers/main.yml index 2dd52b8..27ace5a 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,5 +1,5 @@ --- # handlers file for ipr.ansible.xymon - name: restart xymon-client service - service: name={{ xymon_cli_service_name }} state=restarted - when: xymon_cli_service_manage + service: name={{ xymon_cli__service_name }} state=restarted + when: xymon_cli__service_manage diff --git a/tasks/main.yml b/tasks/main.yml index 424d38a..fbb7db3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -14,41 +14,41 @@ - name: client package package: name: '{{ item }}' - state: '{{ xymon_cli_pkg_state }}' + state: '{{ xymon_cli__pkg_state }}' with_items: - - '{{ xymon_cli_pkg_list | to_nice_json }}' + - '{{ xymon_cli__pkg_list | to_nice_json }}' register: cli_result until: cli_result is success - when: xymon_cli_manage|bool + when: xymon_cli__manage|bool # Manage client configuration [[[1 - name: CONFIG xymon-client service template: - src: '{{ xymon_cli_default_conf_tpl }}' - dest: '{{ xymon_cli_default_conf_path }}' + src: '{{ xymon_cli__default_conf_tpl }}' + dest: '{{ xymon_cli__default_conf_path }}' owner: root group: root mode: 0644 backup: true - when: xymon_cli_manage|bool + when: xymon_cli__manage|bool notify: restart xymon-client service - name: CONFIG xymon user's groups user: name: xymon - groups: '{{ xymon_user_groups }}' + groups: '{{ xymon_cli__user_groups }}' append: true - when: xymon_cli_manage|bool + when: xymon_cli__manage|bool notify: restart xymon-client service # Manage service [[[1 -- name: SERVICE manage '{{ xymon_cli_service_name }}' +- name: SERVICE manage '{{ xymon_cli__service_name }}' service: - name: '{{ xymon_cli_service_name }}' + name: '{{ xymon_cli__service_name }}' state: started - enabled: '{{ xymon_cli_service_enabled }}' - when: (xymon_cli_manage|bool and - xymon_cli_service_manage|bool) + enabled: '{{ xymon_cli__service_enabled }}' + when: (xymon_cli__manage|bool and + xymon_cli__service_manage|bool) # Manage all plugins's dependencies [[[1 - name: PLUGINS dependencies @@ -57,8 +57,8 @@ state: 'present' with_items: - '{{ xymon_cli__plug_combined_packages | to_nice_json }}' - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool) + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool) register: combined_packages_plug_result until: combined_packages_plug_result is success notify: restart xymon-client service @@ -73,8 +73,8 @@ mode: 0644 with_items: - '{{ xymon_cli__plug_combined_clientlaunch }}' - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool) + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool) notify: restart xymon-client service # Manage apt plugin [[[1 @@ -85,8 +85,8 @@ owner: root group: root mode: 0644 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool) + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool) notify: restart xymon-client service # Manage libs plugin [[[1 @@ -97,8 +97,8 @@ owner: root group: root mode: 0644 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool) + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool) notify: restart xymon-client service # Manage net plugin [[[1 @@ -109,8 +109,8 @@ owner: root group: root mode: 0644 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool) + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool) notify: restart xymon-client service # Manage sge plugin [[[1 @@ -121,8 +121,8 @@ owner: root group: xymon mode: 0755 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool and + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool and xymon_cli__plug_sge_script_url|length == 0 ) notify: restart xymon-client service @@ -133,8 +133,8 @@ owner: root group: xymon mode: 0755 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool and + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool and xymon_cli__plug_sge_script_url|length > 0 ) notify: restart xymon-client service @@ -146,8 +146,8 @@ owner: root group: xymon mode: 0755 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool and + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool and xymon_cli__plug_smartoverall_script_url|length == 0 ) notify: restart xymon-client service @@ -158,8 +158,8 @@ owner: root group: xymon mode: 0755 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool and + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool and xymon_cli__plug_smartoverall_script_url|length > 0 ) notify: restart xymon-client service @@ -171,8 +171,8 @@ owner: root group: xymon mode: 0755 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool and + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool and xymon_cli__plug_smart_script_url|length == 0 ) notify: restart xymon-client service @@ -183,8 +183,8 @@ owner: root group: xymon mode: 0755 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool and + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool and xymon_cli__plug_smart_script_url|length > 0 ) notify: restart xymon-client service @@ -196,6 +196,6 @@ owner: root group: xymon mode: 0755 - when: (xymon_cli_manage|bool and - xymon_plug_manage|bool) + when: (xymon_cli__manage|bool and + xymon_cli__plug_manage|bool) notify: restart xymon-client service diff --git a/templates/etc/default/xymon-client.j2 b/templates/etc/default/xymon-client.j2 index 5f8d3d5..2dda1e0 100644 --- a/templates/etc/default/xymon-client.j2 +++ b/templates/etc/default/xymon-client.j2 @@ -13,7 +13,7 @@ # or (multiple servers) # XYMONSERVERS="10.0.0.1 192.168.1.1" -XYMONSERVERS="{{ xymon_srv_list }}" +XYMONSERVERS="{{ xymon_cli__srv_list }}" # The defaults usually suffice for the rest of this file, # but you can tweak the hostname that the client reports @@ -23,7 +23,7 @@ XYMONSERVERS="{{ xymon_srv_list }}" # CLIENTHOSTNAME="" # CLIENTOS="rhel3" -CLIENTHOSTNAME="{{ xymon_cli_hostname }}" +CLIENTHOSTNAME="{{ xymon_cli__hostname }}" # Optionally mount a tmpfs on /var/lib/xymon/tmp. On client systems this has # the advantage that client reports will continue to work even if the /var diff --git a/templates/etc/xymon/apt_no_repo_accept.j2 b/templates/etc/xymon/apt_no_repo_accept.j2 index 1680ca9..6804724 100644 --- a/templates/etc/xymon/apt_no_repo_accept.j2 +++ b/templates/etc/xymon/apt_no_repo_accept.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} ## From ipr-cnrs.xymon role -{% for package in xymon_plug_apt_combined_whitelist %} +{% for package in xymon_cli__plug_apt_combined_whitelist %} {{ package }} {% endfor %} diff --git a/templates/etc/xymon/clientlaunch.d/apt.cfg.j2 b/templates/etc/xymon/clientlaunch.d/apt.cfg.j2 index 8617fd7..0898631 100644 --- a/templates/etc/xymon/clientlaunch.d/apt.cfg.j2 +++ b/templates/etc/xymon/clientlaunch.d/apt.cfg.j2 @@ -1,8 +1,8 @@ [apt] # {{ ansible_managed }} ## From ipr-cnrs.xymon role - {{ '#DISABLED' if xymon_plug_apt_state else 'DISABLED' }} + {{ '#DISABLED' if xymon_cli__plug_apt_state else 'DISABLED' }} ENVFILE /etc/xymon/xymonclient.cfg CMD $XYMONCLIENTHOME/ext/apt LOGFILE /var/log/xymon/xymonclient.log - INTERVAL {{ xymon_plug_apt_interval }} + INTERVAL {{ xymon_cli__plug_apt_interval }} diff --git a/templates/etc/xymon/clientlaunch.d/libs.cfg.j2 b/templates/etc/xymon/clientlaunch.d/libs.cfg.j2 index 1acb907..a647c53 100644 --- a/templates/etc/xymon/clientlaunch.d/libs.cfg.j2 +++ b/templates/etc/xymon/clientlaunch.d/libs.cfg.j2 @@ -1,8 +1,8 @@ [libs] # {{ ansible_managed }} ## From ipr-cnrs.xymon role - {{ '#DISABLED' if xymon_plug_libs_state else 'DISABLED' }} + {{ '#DISABLED' if xymon_cli__plug_libs_state else 'DISABLED' }} ENVFILE /etc/xymon/xymonclient.cfg CMD $XYMONCLIENTHOME/ext/libs LOGFILE /var/log/xymon/xymonclient.log - INTERVAL {{ xymon_plug_libs_interval }} + INTERVAL {{ xymon_cli__plug_libs_interval }} diff --git a/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 b/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 index 833930d..ef64224 100644 --- a/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 +++ b/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 @@ -1,8 +1,8 @@ [mq] # {{ ansible_managed }} ## From ipr-cnrs.xymon role - {{ '#DISABLED' if xymon_plug_mq_state else 'DISABLED' }} + {{ '#DISABLED' if xymon_cli__plug_mq_state else 'DISABLED' }} ENVFILE /etc/xymon/xymonclient.cfg CMD $XYMONCLIENTHOME/ext/mq LOGFILE /var/log/xymon/xymonclient.log - INTERVAL {{ xymon_plug_mq_interval }} + INTERVAL {{ xymon_cli__plug_mq_interval }} diff --git a/templates/etc/xymon/libs.local.yaml.j2 b/templates/etc/xymon/libs.local.yaml.j2 index e7df067..41d9dd1 100644 --- a/templates/etc/xymon/libs.local.yaml.j2 +++ b/templates/etc/xymon/libs.local.yaml.j2 @@ -1,9 +1,9 @@ # {{ ansible_managed }} ## From ipr-cnrs.xymon role -{% set inputmerged = xymon_plug_libs_default_whitelist.copy() %} -{% set _ = inputmerged.update(xymon_plug_libs_whitelist) %} -{% set _ = inputmerged.update(xymon_plug_libs_group_whitelist) %} -{% set _ = inputmerged.update(xymon_plug_libs_host_whitelist) %} +{% set inputmerged = xymon_cli__plug_libs_default_whitelist.copy() %} +{% set _ = inputmerged.update(xymon_cli__plug_libs_whitelist) %} +{% set _ = inputmerged.update(xymon_cli__plug_libs_group_whitelist) %} +{% set _ = inputmerged.update(xymon_cli__plug_libs_host_whitelist) %} --- whitelist: {% for group, rules in inputmerged|dictsort %} diff --git a/templates/usr/lib/xymon/client/ext/zfs.j2 b/templates/usr/lib/xymon/client/ext/zfs.j2 index 9bc2624..505ab8b 100755 --- a/templates/usr/lib/xymon/client/ext/zfs.j2 +++ b/templates/usr/lib/xymon/client/ext/zfs.j2 @@ -122,6 +122,6 @@ then fi # What: Sent out the final bb message to hobbit server. $XYMON $XYMONSRV $XYMONSERVERS "status $MACHINE.$TEST $DISPCOLOR `date` $FIRST_LINE $STRING" -echo "$XYMON $XYMONSRV $XYMONSERVERS --debug status $MACHINE.$TEST $DISPCOLOR `date` $FIRST_LINE $STRING" > /tmp/xymon_zfs +echo "$XYMON $XYMONSRV $XYMONSERVERS --debug status $MACHINE.$TEST $DISPCOLOR `date` $FIRST_LINE $STRING" > /tmp/xymon_cli__zfs $XYMON $XYMONSRV $XYMONSERVERS "data $MACHINE.$TEST $DISPCOLOR $(echo; echo "$DATA" ;echo;echo)" diff --git a/vars/debian.yml b/vars/debian.yml index 8f1b4e6..adeb600 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -1,5 +1,5 @@ --- # vars file for Debian-based distros -xymon_cli_pkg_list: +xymon_cli__pkg_list: - xymon-client - hobbit-plugins