mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Bugfix/11936 - backup: "{{ leave_etc_backup_files }}" (#11937)
* Adding the var: leave_etc_backup_files * Fix for #11936 - backup: "{{ leave_etc_backup_files }}"
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user