Some yamllint fix

This commit is contained in:
Jeremy Gardais 2018-06-22 15:24:32 +02:00
parent 9b7c3b9003
commit 9bde39da78
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
3 changed files with 66 additions and 37 deletions

View File

@ -5,6 +5,7 @@
* Ensure to not override groups of 'xymon' user. * Ensure to not override groups of 'xymon' user.
* Add possibility to install `apt` plugin dependencies. * Add possibility to install `apt` plugin dependencies.
* Ensure to apply the config only if wanted. * Ensure to apply the config only if wanted.
* Some yamllint fix.
## v1.1 ## v1.1

View File

@ -1,10 +1,33 @@
--- ---
# defaults file for ipr.ansible.xymon # .. vim: foldmarker=[[[,]]]:foldmethod=marker
# client # ipr.ansible.xymon default variables [[[
## packages # =======================================
# Packages and installation [[[
# -----------------------------
# .. 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 [[[
#
# 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' xymon_cli_pkg_state: 'installed'
# ]]]
# ]]]
# Server configuration and service [[[
# ------------------------------------
## conf ## conf
xymon_cli_default_conf_path: '/etc/default/xymon-client' xymon_cli_default_conf_path: '/etc/default/xymon-client'
@ -19,28 +42,28 @@ xymon_cli_service_enabled: true
# server # server
xymon_srv_list: "monitoring.{{ ansible_domain }}" xymon_srv_list: "monitoring.{{ ansible_domain }}"
# ]]]
# Plugins management [[[
# ----------------------
# plugins {{{ # plugins [[[
xymon_plug_manage: true xymon_plug_manage: true
## apt {{{ ## Plugin apt [[[
xymon_plug_apt_state: True xymon_plug_apt_state: true
xymon_plug_apt_package: [ 'dctrl-tools' ] xymon_plug_apt_package: ['dctrl-tools']
xymon_plug_apt_path: '/etc/xymon/clientlaunch.d/apt.cfg' xymon_plug_apt_path: '/etc/xymon/clientlaunch.d/apt.cfg'
xymon_plug_apt_tpl: 'etc/xymon/clientlaunch.d/apt.cfg.j2' xymon_plug_apt_tpl: 'etc/xymon/clientlaunch.d/apt.cfg.j2'
## ]]]
## }}} ## Plugin mq [[[
## mq {{{
xymon_plug_mq_state: true 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_path: '/etc/xymon/clientlaunch.d/mq.cfg'
xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2' xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2'
## }}} ## ]]]
## Plugin libs [[[
# libs {{{
xymon_plug_libs_state: true 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_path: '/etc/xymon/clientlaunch.d/libs.cfg'
xymon_plug_libs_tpl: 'etc/xymon/clientlaunch.d/libs.cfg.j2' 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_group_whitelist: {}
xymon_plug_libs_host_whitelist: {} xymon_plug_libs_host_whitelist: {}
## }}} ## ]]]
# # ]]]
# }}}
# ]]]
# ]]]

View File

@ -1,4 +1,6 @@
--- ---
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
# 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
@ -8,7 +10,7 @@
- "{{ ansible_distribution|lower }}.yml" - "{{ ansible_distribution|lower }}.yml"
- "{{ ansible_os_family|lower }}.yml" - "{{ ansible_os_family|lower }}.yml"
# client {{{ # Manage required client packages [[[1
- name: client package - name: client package
package: package:
name: '{{ item }}' name: '{{ item }}'
@ -17,6 +19,7 @@
- '{{ xymon_cli_pkg_list }}' - '{{ xymon_cli_pkg_list }}'
when: xymon_cli_manage|bool when: xymon_cli_manage|bool
# Manage client configuration [[[1
- name: CONFIG xymon-client service - name: CONFIG xymon-client service
template: template:
src: '{{ xymon_cli_default_conf_tpl }}' src: '{{ xymon_cli_default_conf_tpl }}'
@ -32,11 +35,11 @@
user: user:
name: xymon name: xymon
groups: '{{ xymon_user_groups }}' groups: '{{ xymon_user_groups }}'
append: True append: true
when: xymon_cli_manage|bool when: xymon_cli_manage|bool
notify: restart xymon-client service notify: restart xymon-client service
## service # Manage service [[[1
- name: SERVICE manage '{{ xymon_cli_service_name }}' - name: SERVICE manage '{{ xymon_cli_service_name }}'
service: service:
name: '{{ xymon_cli_service_name }}' name: '{{ xymon_cli_service_name }}'
@ -44,9 +47,8 @@
enabled: '{{ xymon_cli_service_enabled }}' enabled: '{{ xymon_cli_service_enabled }}'
when: (xymon_cli_manage|bool and when: (xymon_cli_manage|bool and
xymon_cli_service_manage|bool) xymon_cli_service_manage|bool)
# }}}
# plugins {{{ # Manage apt plugin [[[1
- name: PLUGIN apt packages - name: PLUGIN apt packages
package: package:
name: '{{ item }}' name: '{{ item }}'
@ -68,6 +70,7 @@
xymon_plug_manage|bool) xymon_plug_manage|bool)
notify: restart xymon-client service notify: restart xymon-client service
# Manage mq plugin [[[1
- name: PLUGIN mq packages - name: PLUGIN mq packages
package: package:
name: '{{ item }}' name: '{{ item }}'
@ -89,6 +92,7 @@
xymon_plug_manage|bool) xymon_plug_manage|bool)
notify: restart xymon-client service notify: restart xymon-client service
# Manage libs plugin [[[1
- name: PLUGIN libs packages - name: PLUGIN libs packages
package: package:
name: '{{ item }}' name: '{{ item }}'
@ -121,4 +125,3 @@
xymon_plug_manage|bool) xymon_plug_manage|bool)
notify: restart xymon-client service notify: restart xymon-client service
# }}}