Files
fedora-infra_ansible/roles/unbound/tasks/main.yml
Michael Scherer b705178a8a Refactor the copy of keys and certs for unbound
Also restart the server if the key is changed, and tags the task
2016-04-09 20:26:41 +00:00

44 lines
1005 B
YAML

- name: install unbound package
yum: pkg={{ item }} state=present
with_items:
- unbound
- policycoreutils-python
- name: install unbound config
copy: src=unbound.conf dest=/etc/unbound/unbound.conf mode=644
notify:
- restart unbound
- name: setup SELinux dns 80
command: touch /root/dns80 creates=/root/dns80
notify:
- semanage dns80
- name: setup SELinux dns 443
command: touch /root/dns443 creates=/root/dns443
notify:
- semanage dns443
- name: setup SELinux dns 8953
command: touch /root/dns8953 creates=/root/dns8953
notify:
- semanage dns8953
- name: copying unbound keys and certs
copy: src="{{ private }}/files/unbound/unbound_{{ item }}" dest=/etc/unbound/unbound_{{ item }} owner=root group=unbound mode=640
with_items:
- control.key
- control.pem
- server.key
- server.pem
notify:
- restart unbound
tags:
- config
- name: Enable and start unbound service
service: state=running enabled=true name=unbound
tags:
- service
- config