kubernetes-apps: retry get default token name

In some installation, it can take up to 3sec to get the value. Retrying
for 5 sec will ensure the command won't return 1.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/2271/head
Sébastien Han 2018-01-11 19:01:22 +01:00
parent fe57c13b51
commit 34bd47de79
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,9 @@
shell: "{{ bin_dir }}/kubectl get secrets -o custom-columns=name:{.metadata.name} --no-headers | grep -m1 default-token"
register: default_token
changed_when: false
until: default_token.rc == 0
delay: 1
retries: 5
- name: Rotate Tokens | Get default token data
command: "{{ bin_dir }}/kubectl get secrets {{ default_token.stdout }} -ojson"