Allow to set arguments to pass Arpwatch service

This commit is contained in:
Jeremy Gardais 2018-04-23 13:57:04 +02:00
parent 58d981bea7
commit 29984c26e0
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
4 changed files with 14 additions and 1 deletions

View File

@ -5,3 +5,4 @@
* Install Arpwatch.
* Ensure the service is in the desired state.
* Allow to set the user that run Arpwatch.
* Allow to set arguments to pass Arpwatch service.

View File

@ -20,6 +20,7 @@ Manage Arpwatch installation and configuration.
* **arpwatch__service_name**: The service name to manage [default: `arpwatch`].
* **arpwatch__conf_src**: Template used to provide configuration file [default: `../templates/etc/arpwatch.conf.j2`].
* **arpwatch__conf_username**: Username that should run Arpwatch [default: `arpwatch`].
* **arpwatch__conf_args**: Arguments to apply to Arpwatch [default: `-N -p`].
## Example Playbook
@ -37,6 +38,7 @@ This role will:
* Install needed packages to provide `arpwatch` service.
* Manage `arpwatch` configuration (/etc/arpwatch.conf).
* Allow to set the user that run Arpwatch.
* Allow to set arguments to pass Arpwatch service.
* Ensure `arpwatch` service is enabled and started.
* Ensure to restart `arpwatch` service if configuration changed.

View File

@ -63,5 +63,15 @@ arpwatch__conf_src: '../templates/etc/arpwatch.conf.j2'
arpwatch__conf_username: 'arpwatch'
# ]]]
# .. envvar:: arpwatch__conf_args [[[.
# Arguments to apply to Arpwatch.
#
# The value should be a string with all arguments separated by a whitespace.
# See the manual for more informations.
# ``-N -p``
# Default.
arpwatch__conf_args: '-N -p'
# ]]]
# ]]]

View File

@ -3,7 +3,7 @@
# Global options for arpwatch(8).
# Debian: don't report bogons, don't use PROMISC.
ARGS="-N -p"
ARGS="{{ arpwatch__conf_args }}"
# Debian: run as `{{ arpwatch__conf_username }}' user. Empty this to run as root.
RUNAS="{{ arpwatch__conf_username }}"