27 lines
819 B
YAML
27 lines
819 B
YAML
# Actualiza la configuracion de Unbound con un archivo en ~/ansible/unbound.conf
|
|
---
|
|
- name:
|
|
hosts: all
|
|
remote_user: root
|
|
|
|
tasks:
|
|
- name: "Copiar unbound.conf (para Debians)"
|
|
copy:
|
|
src: /home/ansible/ansible/unbound.conf
|
|
dest: /etc/unbound/unbound.conf
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
- name: "Copiar unbound.conf (para FreeBSDs)"
|
|
copy:
|
|
src: /home/ansible/ansible/unbound.conf
|
|
dest: /usr/local/etc/unbound/unbound.conf
|
|
when: ansible_facts['os_family'] == "FreeBSD"
|
|
- name: "Reiniciar unbound (Debian)"
|
|
systemd_service:
|
|
name: unbound
|
|
state: restarted
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
- name: "Reiniciar unbound (FreeBSD)"
|
|
service:
|
|
name: unbound
|
|
state: restarted
|
|
when: ansible_facts['os_family'] == "FreeBSD"
|