The resolv.conf file is now parametric.

This commit is contained in:
Andrea Dell'Amico 2018-05-04 19:47:39 +02:00
parent f3ad3c6bab
commit 3ef6eaf3a9
3 changed files with 23 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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 %}