Refactor the copy of keys and certs for unbound
Also restart the server if the key is changed, and tags the task
This commit is contained in:
parent
9cea8170d4
commit
b705178a8a
1 changed files with 11 additions and 11 deletions
|
@ -24,17 +24,17 @@
|
||||||
notify:
|
notify:
|
||||||
- semanage dns8953
|
- semanage dns8953
|
||||||
|
|
||||||
- name: copying unbound control key
|
- name: copying unbound keys and certs
|
||||||
copy: src="{{ private }}/files/unbound/unbound_control.key" dest=/etc/unbound/unbound_control.key owner=root group=unbound mode=640
|
copy: src="{{ private }}/files/unbound/unbound_{{ item }}" dest=/etc/unbound/unbound_{{ item }} owner=root group=unbound mode=640
|
||||||
|
with_items:
|
||||||
- name: copying unbound control pem
|
- control.key
|
||||||
copy: src="{{ private }}/files/unbound/unbound_control.pem" dest=/etc/unbound/unbound_control.pem owner=root group=unbound mode=640
|
- control.pem
|
||||||
|
- server.key
|
||||||
- name: copying unbound server key
|
- server.pem
|
||||||
copy: src="{{ private }}/files/unbound/unbound_server.key" dest=/etc/unbound/unbound_server.key owner=root group=unbound mode=640
|
notify:
|
||||||
|
- restart unbound
|
||||||
- name: copying unbound server pem
|
tags:
|
||||||
copy: src="{{ private }}/files/unbound/unbound_server.pem" dest=/etc/unbound/unbound_server.pem owner=root group=unbound mode=640
|
- config
|
||||||
|
|
||||||
- name: Enable and start unbound service
|
- name: Enable and start unbound service
|
||||||
service: state=running enabled=true name=unbound
|
service: state=running enabled=true name=unbound
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue