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
61b2d754
Commit
61b2d754
authored
8 years ago
by
Paweł Skrzyński
Browse files
Options
Downloads
Patches
Plain Diff
Use hostname module to set hostname, and do it for all Os not only CoreOS
parent
c2c334d2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/bootstrap-os/tasks/bootstrap-coreos.yml
+0
-8
0 additions, 8 deletions
roles/bootstrap-os/tasks/bootstrap-coreos.yml
roles/bootstrap-os/tasks/main.yml
+12
-1
12 additions, 1 deletion
roles/bootstrap-os/tasks/main.yml
with
12 additions
and
9 deletions
roles/bootstrap-os/tasks/bootstrap-coreos.yml
+
0
−
8
View file @
61b2d754
...
...
@@ -50,11 +50,3 @@
name
:
"
{{
item
}}"
with_items
:
"
{{pip_python_modules}}"
-
name
:
Check configured hostname
shell
:
hostname
register
:
configured_hostname
check_mode
:
no
-
name
:
Assign inventory name to unconfigured hostnames
shell
:
sh -c "echo \"{{inventory_hostname}}\" > /etc/hostname; hostname \"{{inventory_hostname}}\""
when
:
(configured_hostname.stdout == 'localhost')
This diff is collapsed.
Click to expand it.
roles/bootstrap-os/tasks/main.yml
+
12
−
1
View file @
61b2d754
...
...
@@ -16,4 +16,15 @@
register
:
ostree
-
set_fact
:
is_atomic
:
"
{{
ostree.stat.exists
}}"
\ No newline at end of file
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'
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