From 5e3dd3803fa787398be0d5174ec5a8105c47e1fe Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 22 Nov 2013 16:21:31 +0000 Subject: [PATCH] Hacky little script to restart unbound (it doesn't start on boot due to selinux issues) --- playbooks/restart_unbound.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 playbooks/restart_unbound.yml diff --git a/playbooks/restart_unbound.yml b/playbooks/restart_unbound.yml new file mode 100644 index 0000000000..475f76d63e --- /dev/null +++ b/playbooks/restart_unbound.yml @@ -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