nagios-nrpe: check-local now supports /etc/nagios/{nrpe.cfg,nrpe_local.cfg} + better completion
All checks were successful
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>
gitea/ansible-roles/pipeline/head This commit looks good
All checks were successful
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>
gitea/ansible-roles/pipeline/head This commit looks good
This commit is contained in:
parent
f8b9361afd
commit
2c98717ebc
|
@ -4,7 +4,7 @@ _check_local_dynamic_completion() {
|
||||||
local cur;
|
local cur;
|
||||||
cur=${COMP_WORDS[COMP_CWORD]};
|
cur=${COMP_WORDS[COMP_CWORD]};
|
||||||
COMPREPLY=();
|
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
|
complete -F _check_local_dynamic_completion check-local
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
dest: /usr/local/bin/check-local
|
dest: /usr/local/bin/check-local
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Package bash-completion is intalled
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: bash-completion
|
||||||
|
|
||||||
- name: Completion for utilitary check-local is installed
|
- name: Completion for utilitary check-local is installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: check-local_completion
|
src: check-local_completion
|
||||||
|
|
Loading…
Reference in a new issue