-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor initialize groups tasks used for byo #3895
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,4 @@ | ||
--- | ||
- name: Create initial host groups for localhost | ||
hosts: localhost | ||
connection: local | ||
become: no | ||
gather_facts: no | ||
tags: | ||
- always | ||
tasks: | ||
- include_vars: ../../byo/openshift-cluster/cluster_hosts.yml | ||
- name: Evaluate group l_oo_all_hosts | ||
add_host: | ||
name: "{{ item }}" | ||
groups: l_oo_all_hosts | ||
with_items: "{{ g_all_hosts | default([]) }}" | ||
changed_when: False | ||
|
||
- name: Create initial host groups for all hosts | ||
hosts: l_oo_all_hosts | ||
gather_facts: no | ||
tags: | ||
- always | ||
tasks: | ||
- include_vars: ../../byo/openshift-cluster/cluster_hosts.yml | ||
- include: initialize_groups.yml | ||
|
||
- include: ../../common/openshift-cluster/enable_dnsmasq.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
- name: Create initial host groups for localhost | ||
hosts: localhost | ||
connection: local | ||
become: no | ||
gather_facts: no | ||
tags: | ||
- always | ||
tasks: | ||
- include_vars: cluster_hosts.yml | ||
- name: Evaluate group l_oo_all_hosts | ||
add_host: | ||
name: "{{ item }}" | ||
groups: l_oo_all_hosts | ||
with_items: "{{ g_all_hosts | default([]) }}" | ||
changed_when: no | ||
|
||
- name: Create initial host groups for all hosts | ||
hosts: l_oo_all_hosts | ||
gather_facts: no | ||
tags: | ||
- always | ||
tasks: | ||
- include_vars: cluster_hosts.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
playbooks/byo/openshift-cluster/redeploy-etcd-certificates.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
playbooks/byo/openshift-cluster/redeploy-master-certificates.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
playbooks/byo/openshift-cluster/redeploy-node-certificates.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
playbooks/byo/openshift-cluster/redeploy-registry-certificates.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
playbooks/byo/openshift-cluster/redeploy-router-certificates.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 1 addition & 23 deletions
24
playbooks/byo/openshift-cluster/upgrades/docker/upgrade.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,5 @@ | ||
--- | ||
# Playbook to upgrade Docker to the max allowable version for an OpenShift cluster. | ||
- name: Create initial host groups for localhost | ||
hosts: localhost | ||
connection: local | ||
become: no | ||
gather_facts: no | ||
tags: | ||
- always | ||
tasks: | ||
- include_vars: ../../cluster_hosts.yml | ||
- name: Evaluate group l_oo_all_hosts | ||
add_host: | ||
name: "{{ item }}" | ||
groups: l_oo_all_hosts | ||
with_items: "{{ g_all_hosts | default([]) }}" | ||
changed_when: False | ||
|
||
- name: Create initial host groups for all hosts | ||
hosts: l_oo_all_hosts | ||
gather_facts: no | ||
tags: | ||
- always | ||
tasks: | ||
- include_vars: ../../cluster_hosts.yml | ||
- include: ../../initialize_groups.yml | ||
|
||
- include: ../../../../common/openshift-cluster/upgrades/docker/docker_upgrade.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,4 @@ | ||
--- | ||
- name: Create initial host groups for localhost | ||
hosts: localhost | ||
connection: local | ||
become: no | ||
gather_facts: no | ||
tags: | ||
- always | ||
tasks: | ||
- include_vars: ../cluster_hosts.yml | ||
- name: Evaluate group l_oo_all_hosts | ||
add_host: | ||
name: "{{ item }}" | ||
groups: l_oo_all_hosts | ||
with_items: "{{ g_all_hosts | default([]) }}" | ||
changed_when: False | ||
|
||
- name: Create initial host groups for all hosts | ||
hosts: l_oo_all_hosts | ||
gather_facts: no | ||
tags: | ||
- always | ||
tasks: | ||
- include_vars: ../cluster_hosts.yml | ||
- include: ../initialize_groups.yml | ||
|
||
- include: ../../../common/openshift-cluster/upgrades/etcd/main.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the significance of putting
l_
on this variable? This is for my own sake. I've seen this pattern used else where in this repo.I generally shy away from naming variables with
l
as it appears to the viewer asl
,L
,|
, or even1
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local, something internal to the role that one should never expect to set from the outside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sdodson, thanks for the explanation. The irony of it is, if its internal to a role, then why are we in a playbook defining it? At that point it becomes global. Its fine for now but I'd prefer if we moved away from
l_
. I'd prefergroup_
or something that denotes our intention.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kwoodson From what I've been able to dig out, the
l_oo_all_hosts
group was supposed to be something that was only referenced in the original playbook for creating the allg_
group names, which are then processed into theoo_
group names. The group name initialization process is something I have a card for to come back to. I've found where thisl_oo_all_hosts
group name has been used in other places, outside of the original playbook (probably by mistake), which should be corrected.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sdodson @mtnbikenc, Thanks for the explanations.