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

@@ -11,7 +11,7 @@
- name: Install python on fedora
raw: "dnf install --assumeyes --quiet python"
when: "{{ need_bootstrap.results | map(attribute='rc') | sort | last | bool }}"
when: need_bootstrap.results | map(attribute='rc') | sort | last | bool
- name: Install required python packages
dnf:

View File

@@ -21,6 +21,6 @@
when:
- not skip_downloads|default(false)
- item.value.enabled
- "{{ item.value.container | default(False) }}"
- item.value.container | default(false)
- download_run_once
- group_names | intersect(download.groups) | length

View File

@@ -17,5 +17,5 @@
register: weave_status
retries: 180
delay: 5
until: "{{ weave_status.status == 200 and 'Status: ready' in weave_status.content }}"
until: "weave_status.status == 200 and 'Status: ready' in weave_status.content"
when: inventory_hostname == groups['kube-master'][0]

View File

@@ -123,7 +123,7 @@
when: inventory_hostname in groups['kube-master'] and
inventory_hostname != groups['kube-master'][0] and
(not item in kubecert_node.files | map(attribute='path') | map("basename") | list or
kubecert_node.files | selectattr("path", "equalto", "{{ kube_cert_dir }}/{{ item }}") | map(attribute="checksum")|first|default('') != kubecert_master.files | selectattr("path", "equalto", "{{ kube_cert_dir }}/{{ item }}") | map(attribute="checksum")|first|default(''))
kubecert_node.files | selectattr("path", "equalto", '%s/%s'|format(kube_cert_dir, item)) | map(attribute="checksum")|first|default('') != kubecert_master.files | selectattr("path", "equalto", '%s/%s'|format(kube_cert_dir, item)) | map(attribute="checksum")|first|default(''))
with_items:
- "{{ my_master_certs + all_node_certs }}"
@@ -133,7 +133,7 @@
when: inventory_hostname in groups['kube-node'] and
inventory_hostname != groups['kube-master'][0] and
(not item in kubecert_node.files | map(attribute='path') | map("basename") | list or
kubecert_node.files | selectattr("path", "equalto", "{{ kube_cert_dir }}/{{ item }}") | map(attribute="checksum")|first|default('') != kubecert_master.files | selectattr("path", "equalto", "{{ kube_cert_dir }}/{{ item }}") | map(attribute="checksum")|first|default(''))
kubecert_node.files | selectattr("path", "equalto", '%s/%s'|format(kube_cert_dir, item)) | map(attribute="checksum")|first|default('') != kubecert_master.files | selectattr("path", "equalto", '%s/%s'|format(kube_cert_dir, item)) | map(attribute="checksum")|first|default(''))
with_items:
- "{{ my_node_certs }}"

View File

@@ -81,6 +81,7 @@
shell: mount | grep /var/lib/kubelet/ | awk '{print $3}' | tac
check_mode: no
register: mounted_dirs
warn: false
tags:
- mounts
@@ -209,7 +210,9 @@
networking
{%- endif %}
state: restarted
when: ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] and reset_restart_network
when:
- ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"]
- reset_restart_network
tags:
- services
- network