5014dd8642
dhcp-probe script is used to scan the network for unauthorized DHCP servers.
29 lines
665 B
YAML
29 lines
665 B
YAML
---
|
|
|
|
- name: Create dhcp-probe lib directory
|
|
file:
|
|
path: '{{ ansible_local.root.lib + "/dhcp-probe" }}'
|
|
state: 'directory'
|
|
owner: 'root'
|
|
group: 'root'
|
|
mode: '0755'
|
|
|
|
- name: Manage dhcp-probe notification scripts
|
|
template:
|
|
src: 'usr/local/lib/dhcp-probe/{{ item }}.j2'
|
|
dest: '{{ ansible_local.root.lib + "/dhcp-probe/" + item }}'
|
|
owner: 'root'
|
|
group: 'root'
|
|
mode: '0755'
|
|
with_items: [ 'dhcp_probe_notify2', 'mail-throttled' ]
|
|
|
|
- name: Configure dhcp-probe
|
|
template:
|
|
src: 'etc/dhcp_probe.cf.j2'
|
|
dest: '/etc/dhcp_probe.cf'
|
|
owner: 'root'
|
|
group: 'root'
|
|
mode: '0644'
|
|
notify: [ 'Restart dhcp-probe' ]
|
|
|