Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
0e2d3fb9
Commit
0e2d3fb9
authored
6 years ago
by
rongzhang
Browse files
Options
Downloads
Patches
Plain Diff
Fix OpenSuse set hostname
parent
af5e05d0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/bootstrap-os/tasks/main.yml
+2
-3
2 additions, 3 deletions
roles/bootstrap-os/tasks/main.yml
with
2 additions
and
3 deletions
roles/bootstrap-os/tasks/main.yml
+
2
−
3
View file @
0e2d3fb9
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment