Hacky little script to restart unbound (it doesn't start on boot due to selinux issues)
This commit is contained in:
parent
804d2948dd
commit
5e3dd3803f
1 changed files with 20 additions and 0 deletions
20
playbooks/restart_unbound.yml
Normal file
20
playbooks/restart_unbound.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# This playboook restarts unbound on a host
|
||||||
|
#
|
||||||
|
# requires --extra-vars="target=somevhostname"
|
||||||
|
#
|
||||||
|
|
||||||
|
- name: find instances
|
||||||
|
hosts: "{{ target }}"
|
||||||
|
accelerate: true
|
||||||
|
gather_facts: False
|
||||||
|
user: root
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: set selinux permissive
|
||||||
|
selinux: policy=targeted state=permissive
|
||||||
|
|
||||||
|
- name: restart unbound
|
||||||
|
service: name=unbound state=restarted
|
||||||
|
|
||||||
|
- name: set selinux back to enforcing
|
||||||
|
selinux: policy=targeted state=enforcing
|
Loading…
Add table
Add a link
Reference in a new issue