Skip to content
Snippets Groups Projects
Commit b4aaa7b9 authored by Gabor Lekeny's avatar Gabor Lekeny Committed by Kubernetes Prow Robot
Browse files

Speed up tasks (#4278)

* fact gathering should run only once per node
* eliminate ansible version check, it is at the beginning of each
  playbook
parent c386172b
Branches
Tags
No related merge requests found
...@@ -35,13 +35,14 @@ ...@@ -35,13 +35,14 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
vars: vars:
ansible_ssh_pipelining: true ansible_ssh_pipelining: true
gather_facts: true gather_facts: false
pre_tasks: pre_tasks:
- name: gather facts from all instances - name: gather facts from all instances
setup: setup:
delegate_to: "{{item}}" delegate_to: "{{item}}"
delegate_facts: True delegate_facts: true
with_items: "{{ groups['k8s-cluster'] + groups['etcd'] + groups['calico-rr']|default([]) }}" with_items: "{{ groups['k8s-cluster'] + groups['etcd'] + groups['calico-rr']|default([]) }}"
run_once: true
- hosts: k8s-cluster:etcd:calico-rr - hosts: k8s-cluster:etcd:calico-rr
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
......
--- ---
- name: Stop if ansible version is too low
assert:
that:
- ansible_version.full is version('2.3.0', '>=')
run_once: yes
- name: Stop if either kube-master, kube-node or etcd is empty - name: Stop if either kube-master, kube-node or etcd is empty
assert: assert:
that: groups.get('{{ item }}') that: groups.get('{{ item }}')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment