-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idempotency fixes for etcd certs and resolvconf tasks #1138
Conversation
ci check this |
b161446
to
f6b72fa
Compare
@bogdando are you free to check this out? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
backup: yes | ||
follow: yes | ||
with_nested: | ||
- "{{ [resolvconffile] + [base|default('')] + [head|default('')] }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may use map extract patter to have more understandable format
- "{{ [ resolvconffile, base|default(''), head|default('') ] | difference(['']) }}"
in this case you will not need to have 'when: item[0] != ""' condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll follow up with a small patch to fix this
@@ -114,7 +118,9 @@ | |||
- name: Gen_certs | Prepare tempfile for unpacking certs | |||
shell: mktemp /tmp/certsXXXXX.tar.gz | |||
register: cert_tempfile | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO
delegate_to: "{{groups['etcd']}}"
when: sync_certs|default(false) and inventory_hostname != groups['etcd'][0]
looks better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't work that way... you have to loop with multiple delegate_to targets (which is slower). And we use the same rule many times.
add doc about managing e2e tests
No description provided.