forked from ISTI-ansible-roles/ansible-roles
The resolv.conf file is now parametric.
This commit is contained in:
parent
f3ad3c6bab
commit
3ef6eaf3a9
|
@ -100,6 +100,19 @@ pki_subdirs:
|
|||
|
||||
# Install our /etc/resolv.conf
|
||||
install_resolvconf: True
|
||||
resolv_conf_domain: d4science.org
|
||||
|
||||
resolv_conf_search:
|
||||
- 'd4science.org'
|
||||
- 'd4science.net'
|
||||
- 'd4science.eu'
|
||||
- 'research-infrastructures.eu'
|
||||
- 'isti.cnr.it'
|
||||
|
||||
resolv_conf_ip:
|
||||
- '146.48.122.10'
|
||||
- '146.48.80.4'
|
||||
- '146.48.80.3'
|
||||
|
||||
# Install nscd if requested
|
||||
install_nscd: False
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Install the system resolv.conf
|
||||
copy: src=resolv.conf dest=/etc/resolv.conf owner=root group=root mode=0644
|
||||
template: src=resolv.conf dest=/etc/resolv.conf owner=root group=root mode=0644
|
||||
when: install_resolvconf
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
search d4science.org d4science.net research-infrastructures.eu isti.cnr.it
|
||||
nameserver 146.48.122.10
|
||||
nameserver 146.48.80.4
|
||||
nameserver 146.48.80.3
|
||||
{% if resolv_conf_domain is defined %}
|
||||
domain {{ resolv_conf_domain }}
|
||||
{% endif %}
|
||||
{% if resolv_conf_search is defined %}
|
||||
search {% for dom in resolv_conf_search %} {{ dom }}{% endfor %}
|
||||
{% endif %}
|
||||
{% for address in resolv_conf_ip %}
|
||||
nameserver {{ address }}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue