Removing duplicated roles for calico-rr and sync_file improvement
This commit is contained in:
parent
7cb7eee29d
commit
a7595b9fa9
3 changed files with 4 additions and 6 deletions
|
@ -45,7 +45,7 @@
|
||||||
- { role: kargo-defaults}
|
- { role: kargo-defaults}
|
||||||
- { role: etcd, tags: etcd, etcd_cluster_setup: true }
|
- { role: etcd, tags: etcd, etcd_cluster_setup: true }
|
||||||
|
|
||||||
- hosts: k8s-cluster
|
- hosts: k8s-cluster:calico-rr
|
||||||
any_errors_fatal: true
|
any_errors_fatal: true
|
||||||
roles:
|
roles:
|
||||||
- { role: kargo-defaults}
|
- { role: kargo-defaults}
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
- role: etcd
|
|
||||||
- role: docker
|
|
||||||
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
|
|
||||||
- role: download
|
- role: download
|
||||||
file: "{{ downloads.calico_rr }}"
|
file: "{{ downloads.calico_rr }}"
|
||||||
|
|
|
@ -30,13 +30,14 @@
|
||||||
register: sync_file_key_stat
|
register: sync_file_key_stat
|
||||||
when: sync_file_is_cert|d()
|
when: sync_file_is_cert|d()
|
||||||
|
|
||||||
|
# .get() is used for situations where not all nodes in sync_file_srcs are included in current play
|
||||||
- name: "sync_file | Combine all possible file sync sources"
|
- name: "sync_file | Combine all possible file sync sources"
|
||||||
set_fact:
|
set_fact:
|
||||||
sync_file_srcs: "{{ sync_file_srcs|default([]) + [host_item] }}"
|
sync_file_srcs: "{{ sync_file_srcs|default([]) + [host_item] }}"
|
||||||
with_items: "{{ sync_file_hosts | unique }}"
|
with_items: "{{ sync_file_hosts | unique }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: host_item
|
loop_var: host_item
|
||||||
when: hostvars[host_item]["sync_file_stat"]["stat"]["exists"]|bool
|
when: hostvars[host_item].get("sync_file_stat", {}).get("stat", {}).get("exists") | bool
|
||||||
|
|
||||||
- name: "sync_file | Combine all possible key file sync sources"
|
- name: "sync_file | Combine all possible key file sync sources"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -44,7 +45,7 @@
|
||||||
with_items: "{{ sync_file_hosts | unique }}"
|
with_items: "{{ sync_file_hosts | unique }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: host_item
|
loop_var: host_item
|
||||||
when: sync_file_is_cert|d() and hostvars[host_item]["sync_file_key_stat"]["stat"]["exists"]|bool
|
when: sync_file_is_cert|d() and hostvars[host_item].get("sync_file_key_stat", {}).get("stat", {}).get("exists") | bool
|
||||||
|
|
||||||
- name: "sync_file | Remove sync sources with files that do not match sync_file_srcs|first"
|
- name: "sync_file | Remove sync sources with files that do not match sync_file_srcs|first"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
Loading…
Reference in a new issue