Skip to content

Commit 69485e3

Browse files
Merge pull request #122 from swapnil-bobade27/update-global-secret
Updating authfile location
2 parents 27c0549 + f8ece7f commit 69485e3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

playbooks/roles/global-secret-update/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

playbooks/roles/global-secret-update/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
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

@@ -62,7 +62,7 @@
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

@@ -74,7 +74,7 @@
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

0 commit comments

Comments
 (0)