mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-07 01:17:39 -02:30
Use hostname module to set hostname, and do it for all Os not only CoreOS
This commit is contained in:
@@ -16,4 +16,15 @@
|
||||
register: ostree
|
||||
|
||||
- set_fact:
|
||||
is_atomic: "{{ ostree.stat.exists }}"
|
||||
is_atomic: "{{ ostree.stat.exists }}"
|
||||
|
||||
- name: Gather nodes hostnames
|
||||
setup:
|
||||
gather_subset: '!all'
|
||||
filter: ansible_hostname
|
||||
|
||||
- name: Assign inventory name to unconfigured hostnames
|
||||
hostname:
|
||||
name: "{{inventory_hostname}}"
|
||||
when: ansible_hostname == 'localhost'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user