mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-24 10:31:56 +08:00
44 lines
1005 B
YAML
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
|