-
Notifications
You must be signed in to change notification settings - Fork 54
fix: when in fips mode and in a disconnected environment, remove the non fips openshift-install #196
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
Open
prb112
wants to merge
1
commit into
ocp-power-automation:main
Choose a base branch
from
prb112:fix-fips-disconnected
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+29
−0
Open
fix: when in fips mode and in a disconnected environment, remove the non fips openshift-install #196
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 hidden or 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 |
|---|---|---|
|
|
@@ -31,6 +31,13 @@ | |
| args: | ||
| chdir: "{{ tools_dir }}" | ||
|
|
||
| - name: Extract OCP4 tools from release image ( local-registry ) | ||
| when: enable_local_registry | ||
| shell: | | ||
| oc adm release extract --tools {{ release_image_override }} --registry-config='{{ ansible_env.HOME }}/.openshift/pull-secret-updated' | ||
| args: | ||
| chdir: "{{ tools_dir }}" | ||
|
|
||
| - name: Create pull-secret file | ||
| when: not enable_local_registry | ||
| copy: | ||
|
|
@@ -57,6 +64,28 @@ | |
| remote_src: yes | ||
| with_items: "{{ find_result.files }}" | ||
|
|
||
| - name: Check if openshift-install binary exists | ||
| ansible.builtin.stat: | ||
| path: "/usr/local/bin/openshift-install" | ||
| register: binary_check | ||
prb112 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Remove openshift-install binary when FIPS is enabled | ||
| ansible.builtin.file: | ||
| path: "/usr/local/bin/openshift-install" | ||
| state: absent | ||
| when: | ||
| - fips_compliant | ||
| - binary_check.stat.exists | ||
|
|
||
| - name: Link openshift-install-fips to openshift-install | ||
| file: | ||
| src: "/usr/local/bin/openshift-install-fips" | ||
| dest: "/usr/local/bin/openshift-install" | ||
| state: link | ||
| when: | ||
| - fips_compliant # FIPS is enabled | ||
| - binary_check.stat.exists | ||
|
Comment on lines
+80
to
+87
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see the same task done at helpernode at https://github.com/redhat-cop/ocp4-helpernode/blob/main/tasks/main.yml#L565-L570 |
||
|
|
||
| - name: Remove tools directory | ||
| file: | ||
| path: "{{ tools_dir }}" | ||
|
|
||
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.
I see the same task just above this one. Any difference you see?