File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
playbooks/roles/global-secret-update Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ This is a role which is created for global secret update. This can be used in di
55
66### It performs following operations:
77- Set ` disableAllDefaultSources ` to true
8- - Get pull secret and store it in root location as /root /authfile
8+ - Get pull secret and store it in root location as $HOME /authfile
99- Get ` username ` , ` password ` and ` registry ` from ocp secret named as ` podman-secret `
1010- Podman login and then set pull secret
1111
Original file line number Diff line number Diff line change 1616# Get pull seret and store it in root location
1717- name : Getting pull Secret
1818 shell : |
19- oc get secret/pull-secret -n openshift-config -o json | jq -r '.data.".dockerconfigjson"' | base64 -d > /root /authfile
19+ oc get secret/pull-secret -n openshift-config -o json | jq -r '.data.".dockerconfigjson"' | base64 -d > $HOME /authfile
2020 register : output
2121 ignore_errors : yes
2222
6262# Podman login
6363- name : Podman Login
6464 shell : |
65- podman login --authfile /root /authfile --username {{ podman_username.stdout | quote }} --password {{ podman_password.stdout | quote}} {{ podman_registry.stdout }}
65+ podman login --authfile $HOME /authfile --username {{ podman_username.stdout | quote }} --password {{ podman_password.stdout | quote}} {{ podman_registry.stdout }}
6666 register : output
6767 ignore_errors : yes
6868
7474# Setting pullsecret
7575- name : Set data/pullsecret
7676 shell : |
77- oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=/root /authfile
77+ oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=$HOME /authfile
7878 register : output
7979 ignore_errors : yes
8080
You can’t perform that action at this time.
0 commit comments