Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional ability to activate command_prefix #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ nagios_nrpe_server_bind_address: 127.0.0.1
nagios_nrpe_server_port: 5666
nagios_nrpe_server_allowed_hosts: 127.0.0.1
nagios_nrpe_server_dont_blame_nrpe: 0
nagios_nrpe_server_plugins_src_dir: plugins
nagios_nrpe_server_plugins_src_dir: plugins
nagios_nrpe_server_command_prefix_enable: false
nagios_nrpe_server_command_prefix_path: /usr/bin/sudo
10 changes: 3 additions & 7 deletions templates/nrpe.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ allow_bash_command_substitution=0
# without asking for a password. If you do this, make sure you don't give
# random users write access to that directory or its contents!

# command_prefix=/usr/bin/sudo
{% if nagios_nrpe_server_command_prefix_enable %}
command_prefix={{ nagios_nrpe_server_command_prefix_path }}
{% endif %}

# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
Expand Down Expand Up @@ -199,12 +201,6 @@ connection_timeout=300
#command[check_disk]={{ nagios_nrpe_server_plugins_dir }}/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]={{ nagios_nrpe_server_plugins_dir }}/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

{% if 'ansible_os_family' != 'Archlinux' %}
#
# local configuration:
# if you'd prefer, you can instead place directives here
include={{ nagios_nrpe_server_dir }}/nrpe_local.cfg
{% endif %}
include={{ nagios_nrpe_server_dir }}/nrpe_ansible.cfg

{% if 'ansible_os_family' != 'Archlinux' %}
Expand Down