nagios-nrpe: check-local now supports /etc/nagios/{nrpe.cfg,nrpe_local.cfg} + better completion
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2648|7|2641|6|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/348//ansiblelint">Evolix » ansible-roles » unstable #348</a> Details
gitea/ansible-roles/pipeline/head This commit looks good Details

This commit is contained in:
William Hirigoyen 2023-09-15 16:36:57 +02:00
parent f8b9361afd
commit 2c98717ebc
2 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,7 @@ _check_local_dynamic_completion() {
local cur;
cur=${COMP_WORDS[COMP_CWORD]};
COMPREPLY=();
COMPREPLY=( $( compgen -W '$(grep "\[check_" /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=]" "{print \$2}" | sed "s/check_//")' -- $cur ) );
COMPREPLY=( $( compgen -W '$(grep "\[check_" -Rs /etc/nagios/ | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=]" "{print \$2}" | sed "s/check_//" | sort | uniq)' -- $cur ) );
}
complete -F _check_local_dynamic_completion check-local

View File

@ -15,6 +15,10 @@
dest: /usr/local/bin/check-local
mode: "0755"
- name: Package bash-completion is intalled
ansible.builtin.apt:
name: bash-completion
- name: Completion for utilitary check-local is installed
ansible.builtin.copy:
src: check-local_completion