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
7580e59b
Unverified
Commit
7580e59b
authored
8 months ago
by
Max Gautier
Browse files
Options
Downloads
Patches
Plain Diff
Define k8s_cluster dynamically
This allows inventories to not define the k8s_cluster group manually.
parent
2ec1c938
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
playbooks/boilerplate.yml
+11
-9
11 additions, 9 deletions
playbooks/boilerplate.yml
tests/cloud_playbooks/roles/packet-ci/templates/inventory.j2
+0
-7
0 additions, 7 deletions
tests/cloud_playbooks/roles/packet-ci/templates/inventory.j2
with
11 additions
and
16 deletions
playbooks/boilerplate.yml
+
11
−
9
View file @
7580e59b
...
...
@@ -2,7 +2,9 @@
-
name
:
Check ansible version
import_playbook
:
ansible_version.yml
# These are inventory compatibility tasks to ensure we keep compatibility with old style group names
# These are inventory compatibility tasks with two purposes:
# - to ensure we keep compatibility with old style group names
# - to reduce inventory boilerplate (defining parent groups / empty groups)
-
name
:
Add kube-master nodes to kube_control_plane
hosts
:
kube-master
...
...
@@ -22,23 +24,23 @@
group_by
:
key
:
'
kube_node'
-
name
:
Add
k8s-cluste
r nodes to
k8s_cluste
r
hosts
:
k8s-cluste
r
-
name
:
Add
calico-r
r nodes to
calico_r
r
hosts
:
calico-r
r
gather_facts
:
false
tags
:
always
tasks
:
-
name
:
Add nodes to
k8s_cluste
r group
-
name
:
Add nodes to
calico_r
r group
group_by
:
key
:
'
k8s_cluste
r'
key
:
'
calico_r
r'
-
name
:
Add calico-rr nodes to calico_rr
hosts
:
calico
-
rr
-
name
:
Define k8s_cluster group
hosts
:
kube_node:kube_control_plane:
calico
_
rr
gather_facts
:
false
tags
:
always
tasks
:
-
name
:
Add nodes to
calico_r
r group
-
name
:
Add nodes to
k8s_cluste
r group
group_by
:
key
:
'
calico_r
r'
key
:
'
k8s_cluste
r'
-
name
:
Add no-floating nodes to no_floating
hosts
:
no-floating
...
...
This diff is collapsed.
Click to expand it.
tests/cloud_playbooks/roles/packet-ci/templates/inventory.j2
+
0
−
7
View file @
7580e59b
...
...
@@ -96,10 +96,3 @@ instance-2
instance-3
instance-4
{% endif %}
[k8s_cluster:children]
kube_node
kube_control_plane
calico_rr
[calico_rr]
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