Skip to content

Commit

Permalink
Remove local dockerconfig.json when no dockerhub creds
Browse files Browse the repository at this point in the history
  • Loading branch information
Mao-hsiang Lien committed Jan 6, 2022
1 parent a1f9ffd commit 66979a8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tasks/generate_templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
( 'user' in kops_dockerconfig_creds ) and
( 'token' in kops_dockerconfig_creds )
- name: "({{ cluster.name }}) delete dockerconfig.json"
file:
state: absent
path: "{{ kops_default_build_directory}}/{{ cluster.name }}/dockerconfig.json"
when:
- kops_dockerconfig_creds is not defined
- kops_update is defined
- kops_update == 'state' or kops_update == 'update' or kops_update == 'all'

- name: "({{ cluster.name }}) generate dockerhub credential for kubernetes"
template:
src: "{{ item }}.j2"
Expand Down

0 comments on commit 66979a8

Please sign in to comment.