resolv role
This commit is contained in:
parent
0e300c93e0
commit
9bb40e7798
|
@ -7,6 +7,12 @@ hosts:
|
||||||
name: localhost
|
name: localhost
|
||||||
- ip: 127.0.1.1
|
- ip: 127.0.1.1
|
||||||
name: test-playbook.lab.dc.verdnatura.es test-playbook
|
name: test-playbook.lab.dc.verdnatura.es test-playbook
|
||||||
|
|
||||||
|
domain_name: verdnatura.es
|
||||||
|
search_name: verdnatura.es
|
||||||
|
resolvs:
|
||||||
|
- ip: 10.0.0.4
|
||||||
|
- ip: 10.0.0.5
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
### FAIL2BAN ####################################################################
|
### FAIL2BAN ####################################################################
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
- name: Replace old /etc/resolv.conf with new /etc/resolv.conf
|
||||||
|
template:
|
||||||
|
src: resolv.j2
|
||||||
|
dest: "{{ path_resolv }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
backup: true
|
||||||
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
@ -0,0 +1,7 @@
|
||||||
|
domain {{ domain_name | default('verdnatura.es') }}
|
||||||
|
search {{ search_name | default('verdnatura.es') }}
|
||||||
|
{% if resolvs is defined %}
|
||||||
|
{% for resolv in resolvs %}
|
||||||
|
nameserver {{resolv.ip}}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
# vars file
|
||||||
|
path_resolv: /etc/resolv.conf
|
Loading…
Reference in New Issue