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_resolvconf: True
|
||||
resolv_conf_domain: d4science.org
|
||||
resolv_conf_domain: example.org
|
||||
resolv_conf_use_openstack_settings: True
|
||||
|
||||
resolv_conf_search:
|
||||
- 'd4science.org'
|
||||
- 'd4science.net'
|
||||
- 'd4science.eu'
|
||||
- 'research-infrastructures.eu'
|
||||
- 'isti.cnr.it'
|
||||
- 'example.org'
|
||||
- 'example.com'
|
||||
|
||||
resolv_conf_ip:
|
||||
- '146.48.122.10'
|
||||
- '146.48.80.4'
|
||||
- '146.48.80.3'
|
||||
- '8.8.8.8'
|
||||
- '1.1.1.1'
|
||||
|
||||
# Install nscd if requested
|
||||
install_nscd: False
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
- name: Install the system resolv.conf
|
||||
template: src=resolv.conf dest=/etc/resolv.conf owner=root group=root mode=0644
|
||||
- block:
|
||||
# - 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
|
||||
tags: resolvconf
|
||||
|
||||
|
|
|
@ -4,6 +4,15 @@ domain {{ resolv_conf_domain }}
|
|||
{% if resolv_conf_search is defined %}
|
||||
search {% for dom in resolv_conf_search %} {{ dom }}{% endfor %}
|
||||
{% 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 %}
|
||||
nameserver {{ address }}
|
||||
{% endfor %}
|
||||
|
||||
# {% endif %}
|
||||
|
|
Loading…
Reference in New Issue