Skip to content
Snippets Groups Projects
Commit 0e2d3fb9 authored by rongzhang's avatar rongzhang
Browse files

Fix OpenSuse set hostname

parent af5e05d0
No related branches found
No related tags found
No related merge requests found
......@@ -58,15 +58,14 @@
name: "{{inventory_hostname}}"
when:
- override_system_hostname
- ansible_distribution not in ['openSUSE Tumbleweed']
- ansible_os_family not in ['CoreOS', 'Container Linux by CoreOS']
- ansible_os_family not in ['Suse', 'CoreOS', 'Container Linux by CoreOS']
- name: Assign inventory name to unconfigured hostnames (CoreOS and Tumbleweed only)
command: "hostnamectl set-hostname {{inventory_hostname}}"
register: hostname_changed
when:
- ansible_distribution in ['openSUSE Tumbleweed'] or ansible_os_family in ['CoreOS', 'Container Linux by CoreOS']
- override_system_hostname
- ansible_os_family in ['Suse', 'CoreOS', 'Container Linux by CoreOS']
- name: Update hostname fact (CoreOS and Tumbleweed only)
setup:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment