Fix ansible syntax to avoid ansible warnings (again) (#3509)

* Fix ansible syntax to avoid ansible warnings (again)

* warn: false on tar -cfz

* wrong placement of warn:false
This commit is contained in:
Erwan Miran
2018-10-16 08:47:04 +02:00
committed by k8s-ci-robot
parent 6549b8f8ae
commit fcd8d850dc
4 changed files with 10 additions and 12 deletions

View File

@@ -57,12 +57,8 @@
- name: "Check_certs | Set 'sync_certs' to true"
set_fact:
sync_certs: true
when: |-
{%- set certs = {'sync': False} -%}
{% if gen_node_certs[inventory_hostname] or
(not etcdcert_node.results[0].stat.exists|default(False)) or
(not etcdcert_node.results[1].stat.exists|default(False)) or
(etcdcert_node.results[1].stat.checksum|default('') != etcdcert_master.files|selectattr("path", "equalto", etcdcert_node.results[1].stat.path)|map(attribute="checksum")|first|default('')) -%}
{%- set _ = certs.update({'sync': True}) -%}
{% endif %}
{{ certs.sync }}
when:
- gen_node_certs[inventory_hostname] or
(not etcdcert_node.results[0].stat.exists|default(false)) or
(not etcdcert_node.results[1].stat.exists|default(false)) or
(etcdcert_node.results[1].stat.checksum|default('') != etcdcert_master.files|selectattr("path", "equalto", etcdcert_node.results[1].stat.path)|map(attribute="checksum")|first|default(''))