@ -5,7 +5,7 @@
- name: Add domain/search/nameservers/options to resolv.conf
blockinfile:
dest: "{{resolvconffile}}"
path: "{{resolvconffile}}"
block: |-
{% for item in [domainentry] + [searchentries] + nameserverentries.split(',') -%}
{{ item }}
@ -17,7 +17,6 @@
insertbefore: BOF
create: yes
backup: yes
follow: yes
marker: "# Ansible entries {mark}"
notify: Preinstall | restart network
@ -1,7 +1,7 @@
---
- name: Hosts | populate inventory into hosts file
dest: /etc/hosts
path: /etc/hosts
{% for item in (groups['k8s-cluster'] + groups['etcd'] + groups['calico-rr']|default([]))|unique -%}{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(hostvars[item]['ansible_default_ipv4']['address'])) }}{% if (item != hostvars[item]['ansible_hostname']) %} {{ hostvars[item]['ansible_hostname'] }}.{{ dns_domain }} {{ hostvars[item]['ansible_hostname'] }}{% endif %} {{ item }} {{ item }}.{{ dns_domain }}
{% endfor %}
@ -5,12 +5,11 @@
{% for item in [ supersede_domain, supersede_search, supersede_nameserver ] -%}
dest: "{{dhclientconffile}}"
path: "{{dhclientconffile}}"
state: present
when: dhclientconffile is defined
@ -5,10 +5,9 @@
- name: Remove kubespray specific config from dhclient config
state: absent
@ -177,9 +177,8 @@
- name: reset | remove dns settings from dhclient.conf
dest: "{{ item }}"
path: "{{ item }}"
failed_when: false
with_items:
@ -191,9 +190,8 @@
- name: reset | remove host entries from /etc/hosts
dest: "/etc/hosts"
path: "/etc/hosts"
marker: "# Ansible inventory hosts {mark}"
tags:
- files