mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
baremetal tweaks
* allow installs to not have hostname overriden with fqdn from inventory * calico-config no longer requires local as and will default to global * when cloudprovider is not defined, use the inventory_hostname for cni-calico * allow reset to not restart network (buggy nodes die with this cmd) * default kube_override_hostname to inventory_hostname instead of ansible_hostname
This commit is contained in:
@@ -29,12 +29,12 @@
|
||||
- name: Assign inventory name to unconfigured hostnames (non-CoreOS)
|
||||
hostname:
|
||||
name: "{{inventory_hostname}}"
|
||||
when: ansible_os_family not in ['CoreOS', 'Container Linux by CoreOS']
|
||||
when: ansible_os_family not in ['CoreOS', 'Container Linux by CoreOS'] and override_system_hostname
|
||||
|
||||
- name: Assign inventory name to unconfigured hostnames (CoreOS only)
|
||||
command: "hostnamectl set-hostname {{inventory_hostname}}"
|
||||
register: hostname_changed
|
||||
when: ansible_hostname == 'localhost' and ansible_os_family in ['CoreOS', 'Container Linux by CoreOS']
|
||||
when: ansible_hostname == 'localhost' and ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] and override_system_hostname
|
||||
|
||||
- name: Update hostname fact (CoreOS only)
|
||||
setup:
|
||||
|
||||
Reference in New Issue
Block a user