forked from ISTI-ansible-roles/ansible-roles
Failed attempt to automatically setup a different list of resolvers.
This commit is contained in:
parent
92622b285e
commit
b7ca1b5c22
|
@ -100,19 +100,16 @@ pki_subdirs:
|
||||||
|
|
||||||
# Install our /etc/resolv.conf
|
# Install our /etc/resolv.conf
|
||||||
install_resolvconf: True
|
install_resolvconf: True
|
||||||
resolv_conf_domain: d4science.org
|
resolv_conf_domain: example.org
|
||||||
|
resolv_conf_use_openstack_settings: True
|
||||||
|
|
||||||
resolv_conf_search:
|
resolv_conf_search:
|
||||||
- 'd4science.org'
|
- 'example.org'
|
||||||
- 'd4science.net'
|
- 'example.com'
|
||||||
- 'd4science.eu'
|
|
||||||
- 'research-infrastructures.eu'
|
|
||||||
- 'isti.cnr.it'
|
|
||||||
|
|
||||||
resolv_conf_ip:
|
resolv_conf_ip:
|
||||||
- '146.48.122.10'
|
- '8.8.8.8'
|
||||||
- '146.48.80.4'
|
- '1.1.1.1'
|
||||||
- '146.48.80.3'
|
|
||||||
|
|
||||||
# Install nscd if requested
|
# Install nscd if requested
|
||||||
install_nscd: False
|
install_nscd: False
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
---
|
---
|
||||||
- name: Install the system resolv.conf
|
- block:
|
||||||
template: src=resolv.conf dest=/etc/resolv.conf owner=root group=root mode=0644
|
# - name: Find the Openstack region, if any
|
||||||
|
# set_fact: openstack_region_name={{ location.region_name|replace('-','_') }} cacheable=True
|
||||||
|
# when: location.region_name is defined
|
||||||
|
|
||||||
|
- name: Install the system resolv.conf
|
||||||
|
template: src=resolv.conf dest=/etc/resolv.conf owner=root group=root mode=0644
|
||||||
|
|
||||||
when: install_resolvconf
|
when: install_resolvconf
|
||||||
tags: resolvconf
|
tags: resolvconf
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,15 @@ domain {{ resolv_conf_domain }}
|
||||||
{% if resolv_conf_search is defined %}
|
{% if resolv_conf_search is defined %}
|
||||||
search {% for dom in resolv_conf_search %} {{ dom }}{% endfor %}
|
search {% for dom in resolv_conf_search %} {{ dom }}{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
# {% if resolv_conf_use_openstack_settings and openstack_region_name is defined %}
|
||||||
|
# {% for ip in ['resolv_conf_ip_' + 'openstack_region_name'] %}
|
||||||
|
# nameserver {{ ip }}
|
||||||
|
# {% endfor %}
|
||||||
|
# {% else %}
|
||||||
|
|
||||||
{% for address in resolv_conf_ip %}
|
{% for address in resolv_conf_ip %}
|
||||||
nameserver {{ address }}
|
nameserver {{ address }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
# {% endif %}
|
||||||
|
|
Loading…
Reference in New Issue