From 9bde39da78e761ce1e2bf3abe60c45f351c1a0a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Fri, 22 Jun 2018 15:24:32 +0200 Subject: [PATCH] Some yamllint fix --- CHANGELOG.md | 1 + defaults/main.yml | 63 +++++++++++++++++++++++++++++++++-------------- tasks/main.yml | 39 +++++++++++++++-------------- 3 files changed, 66 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5f52d5..2cfe560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Ensure to not override groups of 'xymon' user. * Add possibility to install `apt` plugin dependencies. * Ensure to apply the config only if wanted. +* Some yamllint fix. ## v1.1 diff --git a/defaults/main.yml b/defaults/main.yml index b68593e..1d7f980 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,10 +1,33 @@ --- -# defaults file for ipr.ansible.xymon +# .. vim: foldmarker=[[[,]]]:foldmethod=marker -# client -## packages +# ipr.ansible.xymon default variables [[[ +# ======================================= + +# Packages and installation [[[ +# ----------------------------- + +# .. envvar:: xymon_cli_manage [[[ +# +# If this role should manage the installation of Xymon client xymon_cli_manage: true + # ]]] +# .. envvar:: xymon_cli_pkg_state [[[ +# +# What is the desired state which this role's packages should be? +# Possible options: +# +# ``installed`` +# Default. Ensure the packages are installed. +# +# ``absent`` +# Ensure to remove the packages. +# xymon_cli_pkg_state: 'installed' + # ]]] + # ]]] +# Server configuration and service [[[ +# ------------------------------------ ## conf xymon_cli_default_conf_path: '/etc/default/xymon-client' @@ -19,28 +42,28 @@ xymon_cli_service_enabled: true # server xymon_srv_list: "monitoring.{{ ansible_domain }}" + # ]]] +# Plugins management [[[ +# ---------------------- -# plugins {{{ +# plugins [[[ xymon_plug_manage: true -## apt {{{ -xymon_plug_apt_state: True -xymon_plug_apt_package: [ 'dctrl-tools' ] +## Plugin apt [[[ +xymon_plug_apt_state: true +xymon_plug_apt_package: ['dctrl-tools'] xymon_plug_apt_path: '/etc/xymon/clientlaunch.d/apt.cfg' xymon_plug_apt_tpl: 'etc/xymon/clientlaunch.d/apt.cfg.j2' - -## }}} - -## mq {{{ +## ]]] +## Plugin mq [[[ xymon_plug_mq_state: true -xymon_plug_mq_package: [ 'libtimedate-perl' ] +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' -## }}} - -# libs {{{ +## ]]] +## Plugin libs [[[ xymon_plug_libs_state: true -xymon_plug_libs_package: [ 'binutils', 'lsof', 'libyaml-tiny-perl', 'libsort-naturally-perl' ] +xymon_plug_libs_package: ['binutils', 'lsof', 'libyaml-tiny-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' @@ -56,6 +79,8 @@ xymon_plug_libs_default_whitelist: xymon_plug_libs_group_whitelist: {} xymon_plug_libs_host_whitelist: {} -## }}} -# -# }}} +## ]]] + # ]]] + +# ]]] + # ]]] diff --git a/tasks/main.yml b/tasks/main.yml index 6ca711b..d6ce260 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,6 @@ --- +# .. vim: foldmarker=[[[,]]]:foldmethod=marker +# # tasks file for ipr.ansible.xymon - name: Load specific OS vars for xymon @@ -8,7 +10,7 @@ - "{{ ansible_distribution|lower }}.yml" - "{{ ansible_os_family|lower }}.yml" -# client {{{ +# Manage required client packages [[[1 - name: client package package: name: '{{ item }}' @@ -17,13 +19,14 @@ - '{{ xymon_cli_pkg_list }}' 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 }}' - owner: root - group: root - mode: 0644 + owner: root + group: root + mode: 0644 backup: true when: xymon_cli_manage|bool notify: restart xymon-client service @@ -32,11 +35,11 @@ user: name: xymon groups: '{{ xymon_user_groups }}' - append: True + append: true when: xymon_cli_manage|bool notify: restart xymon-client service -## service +# Manage service [[[1 - name: SERVICE manage '{{ xymon_cli_service_name }}' service: name: '{{ xymon_cli_service_name }}' @@ -44,9 +47,8 @@ enabled: '{{ xymon_cli_service_enabled }}' when: (xymon_cli_manage|bool and xymon_cli_service_manage|bool) -# }}} -# plugins {{{ +# Manage apt plugin [[[1 - name: PLUGIN apt packages package: name: '{{ item }}' @@ -61,13 +63,14 @@ template: src: '{{ xymon_plug_apt_tpl }}' dest: '{{ xymon_plug_apt_path }}' - owner: root - group: root - mode: 0644 + owner: root + group: root + mode: 0644 when: (xymon_cli_manage|bool and xymon_plug_manage|bool) notify: restart xymon-client service +# Manage mq plugin [[[1 - name: PLUGIN mq packages package: name: '{{ item }}' @@ -82,13 +85,14 @@ template: src: '{{ xymon_plug_mq_tpl }}' dest: '{{ xymon_plug_mq_path }}' - owner: root - group: root - mode: 0644 + owner: root + group: root + mode: 0644 when: (xymon_cli_manage|bool and xymon_plug_manage|bool) notify: restart xymon-client service +# Manage libs plugin [[[1 - name: PLUGIN libs packages package: name: '{{ item }}' @@ -103,9 +107,9 @@ template: src: '{{ xymon_plug_libs_tpl }}' dest: '{{ xymon_plug_libs_path }}' - owner: root - group: root - mode: 0644 + owner: root + group: root + mode: 0644 when: (xymon_cli_manage|bool and xymon_plug_manage|bool) notify: restart xymon-client service @@ -121,4 +125,3 @@ xymon_plug_manage|bool) notify: restart xymon-client service -# }}}