Adapt for Buster start with arpwatch v2.1a15-7

This commit is contained in:
Jeremy Gardais 2020-04-27 20:36:21 +02:00
parent 144c02977b
commit f06e7c355c
5 changed files with 22 additions and 4 deletions

View File

@ -1,3 +1,9 @@
## v2.X.Y
### Features
* Adapt for Debian Buster (start with arpwatch version 2.1a15-7)
## v1.0.2
### Fix

View File

@ -18,6 +18,7 @@ Manage Arpwatch installation and configuration.
* **arpwatch__enabled**: Enable or disable support for Arpwatch on a given host [default: `True`].
* **arpwatch__service_manage**: If the arpwatch service should be managed [default: `True`].
* **arpwatch__service_name**: The service name to manage [default: `arpwatch`].
* **arpwatch__conf_interfaces**: List of network interfaces where arpwatch should listen [default: `[ '{{ ansible_default_ipv4.interface }}' ]`].
* **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`].
@ -39,7 +40,7 @@ This role will:
* 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 start an `arpwatch` process for the main network interface at least.
* Ensure to restart `arpwatch` service if configuration changed.
## Development

View File

@ -46,6 +46,13 @@ arpwatch__service_manage: True
# Configuration [[[
# -----------------------------
# .. envvar:: arpwatch__conf_interfaces [[[.
# List of network interfaces that should have a running arpwatch process.
#
# By default, only listen on the main network interface.
arpwatch__conf_interfaces: [ '{{ ansible_default_ipv4.interface }}' ]
# ]]]
# .. envvar:: arpwatch__conf_src [[[.
# Template used to provide configuration file.
#

View File

@ -2,8 +2,10 @@
# handlers file for arpwatch
- name: restart arpwatch service
service:
name: '{{ arpwatch__service_name }}'
name: '{{ arpwatch__service_name }}@{{ item }}'
state: '{{ "restarted" if (arpwatch__enabled | d(True) | bool and
(arpwatch__service_manage | d(True) | bool))
else "stopped" }}'
enabled: '{{ arpwatch__service_manage | d(True) | bool }}'
with_items:
- '{{ arpwatch__conf_interfaces }}'

View File

@ -41,11 +41,13 @@
# ]]]
# Manage service [[[1
- name: Manage arpwatch service
- name: Manage arpwatch service by network interface
service:
name: '{{ arpwatch__service_name }}'
name: '{{ arpwatch__service_name }}@{{ item }}'
state: '{{ "started" if ((arpwatch__enabled | d(True) | bool) and
(arpwatch__service_manage | d(True) | bool))
else "stopped" }}'
enabled: '{{ ((arpwatch__enabled | d(True) | bool) and
(arpwatch__service_manage | d(True) | bool)) }}'
with_items:
- '{{ arpwatch__conf_interfaces }}'