Browse Source
Bugfix/11936 - backup: "{{ leave_etc_backup_files }}" (#11937)
* Adding the var: leave_etc_backup_files
* Fix for #11936 - backup: "{{ leave_etc_backup_files }}"
pull/11941/head
Bas
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with
11 additions and
10 deletions
-
roles/kubernetes/preinstall/defaults/main.yml
-
roles/kubernetes/preinstall/tasks/0063-networkmanager-dns.yml
-
roles/kubernetes/preinstall/tasks/0080-system-configurations.yml
-
roles/kubernetes/preinstall/tasks/0090-etchosts.yml
-
roles/kubernetes/preinstall/tasks/0100-dhclient-hooks.yml
-
roles/kubernetes/preinstall/tasks/0110-dhclient-hooks-undo.yml
|
@ -1,7 +1,8 @@ |
|
|
--- |
|
|
--- |
|
|
# Set to true to allow pre-checks to fail and continue deployment |
|
|
# Set to true to allow pre-checks to fail and continue deployment |
|
|
ignore_assert_errors: false |
|
|
ignore_assert_errors: false |
|
|
|
|
|
|
|
|
|
|
|
# Set to false to disable the backup parameter, set to true to accumulate backups of config files. |
|
|
|
|
|
leave_etc_backup_files: true |
|
|
nameservers: [] |
|
|
nameservers: [] |
|
|
cloud_resolver: [] |
|
|
cloud_resolver: [] |
|
|
disable_host_nameservers: false |
|
|
disable_host_nameservers: false |
|
|
|
@ -6,7 +6,7 @@ |
|
|
option: servers |
|
|
option: servers |
|
|
value: "{{ nameserverentries | join(',') }}" |
|
|
value: "{{ nameserverentries | join(',') }}" |
|
|
mode: '0600' |
|
|
mode: '0600' |
|
|
backup: true |
|
|
|
|
|
|
|
|
backup: "{{ leave_etc_backup_files }}" |
|
|
when: |
|
|
when: |
|
|
- ('127.0.0.53' not in nameserverentries |
|
|
- ('127.0.0.53' not in nameserverentries |
|
|
or systemd_resolved_enabled.rc != 0) |
|
|
or systemd_resolved_enabled.rc != 0) |
|
@ -24,7 +24,7 @@ |
|
|
option: searches |
|
|
option: searches |
|
|
value: "{{ (default_searchdomains | default([]) + searchdomains) | join(',') }}" |
|
|
value: "{{ (default_searchdomains | default([]) + searchdomains) | join(',') }}" |
|
|
mode: '0600' |
|
|
mode: '0600' |
|
|
backup: true |
|
|
|
|
|
|
|
|
backup: "{{ leave_etc_backup_files }}" |
|
|
notify: Preinstall | update resolvconf for networkmanager |
|
|
notify: Preinstall | update resolvconf for networkmanager |
|
|
|
|
|
|
|
|
- name: NetworkManager | Add DNS options to NM configuration |
|
|
- name: NetworkManager | Add DNS options to NM configuration |
|
@ -34,5 +34,5 @@ |
|
|
option: options |
|
|
option: options |
|
|
value: "ndots:{{ ndots }},timeout:{{ dns_timeout | default('2') }},attempts:{{ dns_attempts | default('2') }}" |
|
|
value: "ndots:{{ ndots }},timeout:{{ dns_timeout | default('2') }},attempts:{{ dns_attempts | default('2') }}" |
|
|
mode: '0600' |
|
|
mode: '0600' |
|
|
backup: true |
|
|
|
|
|
|
|
|
backup: "{{ leave_etc_backup_files }}" |
|
|
notify: Preinstall | update resolvconf for networkmanager |
|
|
notify: Preinstall | update resolvconf for networkmanager |
|
@ -28,7 +28,7 @@ |
|
|
line: "precedence ::ffff:0:0/96 100" |
|
|
line: "precedence ::ffff:0:0/96 100" |
|
|
state: present |
|
|
state: present |
|
|
create: true |
|
|
create: true |
|
|
backup: true |
|
|
|
|
|
|
|
|
backup: "{{ leave_etc_backup_files }}" |
|
|
mode: "0644" |
|
|
mode: "0644" |
|
|
when: |
|
|
when: |
|
|
- disable_ipv6_dns |
|
|
- disable_ipv6_dns |
|
|
|
@ -25,7 +25,7 @@ |
|
|
block: "{{ hostvars.localhost.etc_hosts_inventory_block }}" |
|
|
block: "{{ hostvars.localhost.etc_hosts_inventory_block }}" |
|
|
state: "{{ 'present' if populate_inventory_to_hosts_file else 'absent' }}" |
|
|
state: "{{ 'present' if populate_inventory_to_hosts_file else 'absent' }}" |
|
|
create: true |
|
|
create: true |
|
|
backup: true |
|
|
|
|
|
|
|
|
backup: "{{ leave_etc_backup_files }}" |
|
|
unsafe_writes: true |
|
|
unsafe_writes: true |
|
|
marker: "# Ansible inventory hosts {mark}" |
|
|
marker: "# Ansible inventory hosts {mark}" |
|
|
mode: "0644" |
|
|
mode: "0644" |
|
@ -36,7 +36,7 @@ |
|
|
regexp: ".*{{ apiserver_loadbalancer_domain_name }}$" |
|
|
regexp: ".*{{ apiserver_loadbalancer_domain_name }}$" |
|
|
line: "{{ loadbalancer_apiserver.address }} {{ apiserver_loadbalancer_domain_name }}" |
|
|
line: "{{ loadbalancer_apiserver.address }} {{ apiserver_loadbalancer_domain_name }}" |
|
|
state: present |
|
|
state: present |
|
|
backup: true |
|
|
|
|
|
|
|
|
backup: "{{ leave_etc_backup_files }}" |
|
|
unsafe_writes: true |
|
|
unsafe_writes: true |
|
|
when: |
|
|
when: |
|
|
- populate_loadbalancer_apiserver_to_hosts_file |
|
|
- populate_loadbalancer_apiserver_to_hosts_file |
|
@ -74,7 +74,7 @@ |
|
|
line: "{{ item.key }} {{ item.value | join(' ') }}" |
|
|
line: "{{ item.key }} {{ item.value | join(' ') }}" |
|
|
regexp: "^{{ item.key }}.*$" |
|
|
regexp: "^{{ item.key }}.*$" |
|
|
state: present |
|
|
state: present |
|
|
backup: true |
|
|
|
|
|
|
|
|
backup: "{{ leave_etc_backup_files }}" |
|
|
unsafe_writes: true |
|
|
unsafe_writes: true |
|
|
loop: "{{ etc_hosts_localhosts_dict_target | default({}) | dict2items }}" |
|
|
loop: "{{ etc_hosts_localhosts_dict_target | default({}) | dict2items }}" |
|
|
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ |
|
|
create: true |
|
|
create: true |
|
|
state: present |
|
|
state: present |
|
|
insertbefore: BOF |
|
|
insertbefore: BOF |
|
|
backup: true |
|
|
|
|
|
|
|
|
backup: "{{ leave_etc_backup_files }}" |
|
|
marker: "# Ansible entries {mark}" |
|
|
marker: "# Ansible entries {mark}" |
|
|
mode: "0644" |
|
|
mode: "0644" |
|
|
notify: Preinstall | propagate resolvconf to k8s components |
|
|
notify: Preinstall | propagate resolvconf to k8s components |
|
|
|
@ -7,7 +7,7 @@ |
|
|
blockinfile: |
|
|
blockinfile: |
|
|
path: "{{ dhclientconffile }}" |
|
|
path: "{{ dhclientconffile }}" |
|
|
state: absent |
|
|
state: absent |
|
|
backup: true |
|
|
|
|
|
|
|
|
backup: "{{ leave_etc_backup_files }}" |
|
|
marker: "# Ansible entries {mark}" |
|
|
marker: "# Ansible entries {mark}" |
|
|
notify: Preinstall | propagate resolvconf to k8s components |
|
|
notify: Preinstall | propagate resolvconf to k8s components |
|
|
|
|
|
|
|
|