diff --git a/tasks/generate_templates.yml b/tasks/generate_templates.yml index ca3a1d6..7187742 100644 --- a/tasks/generate_templates.yml +++ b/tasks/generate_templates.yml @@ -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"