diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c57a5..b0271d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/README.md b/README.md index d720713..2fb0389 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/defaults/main.yml b/defaults/main.yml index 57677f2..5594512 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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' + + # ]]] # ]]] diff --git a/templates/etc/default/arpwatch.j2 b/templates/etc/default/arpwatch.j2 index 407c82a..ce3e2c6 100644 --- a/templates/etc/default/arpwatch.j2 +++ b/templates/etc/default/arpwatch.j2 @@ -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 }}"