Fix ansible syntax to avoid ansible warnings (#3499)

This commit is contained in:
Erwan Miran
2018-10-11 09:45:00 +02:00
committed by k8s-ci-robot
parent cdce8c81da
commit dd5327ef9e
7 changed files with 18 additions and 13 deletions

View File

@@ -3,7 +3,9 @@
tasks:
- name: Test tunl0 routes
shell: "! /sbin/ip ro | grep '/26 via' | grep -v tunl0"
when: (ipip|default(false) or cloud_provider is defined) and (kube_network_plugin == 'calico')
when:
- (ipip|default(false) or cloud_provider is defined)
- kube_network_plugin == 'calico'
- hosts: k8s-cluster
vars:
@@ -35,7 +37,7 @@
run_once: true
delegate_to: "{{groups['kube-master'][0]}}"
register: nca_pod
until: "{{ nca_pod.stdout_lines|length }} >= {{ groups['kube-node']|intersect(play_hosts)|length * 2 }}"
until: nca_pod.stdout_lines|length >= groups['kube-node']|intersect(play_hosts)|length * 2
retries: 3
delay: 10
@@ -46,9 +48,9 @@
register: agents
retries: 18
delay: "{{ agent_report_interval }}"
until: "{{ agents.content|length > 0 and
until: agents.content|length > 0 and
agents.content[0] == '{' and
agents.content|from_json|length >= groups['kube-node']|intersect(play_hosts)|length * 2 }}"
agents.content|from_json|length >= groups['kube-node']|intersect(play_hosts)|length * 2
failed_when: false
no_log: true