This reverts commit f8fdc0cd93
.
This commit is contained in:
parent
64f48bf84c
commit
50751bb610
22 changed files with 118 additions and 31 deletions
|
@ -8,9 +8,11 @@
|
||||||
- "inventory_hostname == groups['kube-master'][0]"
|
- "inventory_hostname == groups['kube-master'][0]"
|
||||||
- name: "Kubernetes Apps | Install and configure MetalLB"
|
- name: "Kubernetes Apps | Install and configure MetalLB"
|
||||||
kube:
|
kube:
|
||||||
|
name: "MetalLB"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ rendering.results | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
filename: "{{ kube_config_dir }}/{{ item.item }}"
|
||||||
state: "{{ item.changed | ternary('latest','present') }}"
|
state: "{{ item.changed | ternary('latest','present') }}"
|
||||||
become: true
|
become: true
|
||||||
|
with_items: "{{ rendering.results }}"
|
||||||
when:
|
when:
|
||||||
- "inventory_hostname == groups['kube-master'][0]"
|
- "inventory_hostname == groups['kube-master'][0]"
|
||||||
|
|
|
@ -10,8 +10,11 @@
|
||||||
|
|
||||||
- name: Kubernetes Apps | Set GlusterFS endpoint and PV
|
- name: Kubernetes Apps | Set GlusterFS endpoint and PV
|
||||||
kube:
|
kube:
|
||||||
|
name: glusterfs
|
||||||
namespace: default
|
namespace: default
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ gluster_pv.results | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.dest}}"
|
||||||
state: "{{item.changed | ternary('latest','present') }}"
|
state: "{{item.changed | ternary('latest','present') }}"
|
||||||
|
with_items: "{{ gluster_pv.results }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0] and groups['gfs-cluster'] is defined
|
when: inventory_hostname == groups['kube-master'][0] and groups['gfs-cluster'] is defined
|
||||||
|
|
|
@ -21,8 +21,11 @@
|
||||||
|
|
||||||
- name: Kubernetes Apps | Start dashboard
|
- name: Kubernetes Apps | Start dashboard
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items: "{{ manifests.results }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -38,13 +38,20 @@
|
||||||
|
|
||||||
- name: Kubernetes Apps | Start Resources
|
- name: Kubernetes Apps | Start Resources
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ (coredns_manifests.results|default([]) + coredns_secondary_manifests.results|default([]) + nodelocaldns_manifests.results|default([])) | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items:
|
||||||
|
- "{{ coredns_manifests.results | default({}) }}"
|
||||||
|
- "{{ coredns_secondary_manifests.results | default({}) }}"
|
||||||
|
- "{{ nodelocaldns_manifests.results | default({}) }}"
|
||||||
when:
|
when:
|
||||||
- dns_mode != 'none'
|
- dns_mode != 'none'
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
- not item is skipped
|
||||||
register: resource_result
|
register: resource_result
|
||||||
until: resource_result is succeeded
|
until: resource_result is succeeded
|
||||||
retries: 4
|
retries: 4
|
||||||
|
@ -52,6 +59,8 @@
|
||||||
tags:
|
tags:
|
||||||
- coredns
|
- coredns
|
||||||
- nodelocaldns
|
- nodelocaldns
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.item.file }}"
|
||||||
|
|
||||||
- name: Kubernetes Apps | Netchecker
|
- name: Kubernetes Apps | Netchecker
|
||||||
import_tasks: tasks/netchecker.yml
|
import_tasks: tasks/netchecker.yml
|
||||||
|
|
|
@ -62,8 +62,11 @@
|
||||||
|
|
||||||
- name: Kubernetes Apps | Start Netchecker Resources
|
- name: Kubernetes Apps | Start Netchecker Resources
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{item.item.name}}"
|
||||||
namespace: "{{netcheck_namespace}}"
|
namespace: "{{netcheck_namespace}}"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
with_items: "{{ manifests.results }}"
|
||||||
|
when: inventory_hostname == groups['kube-master'][0] and not item is skipped
|
||||||
|
|
|
@ -41,16 +41,21 @@
|
||||||
|
|
||||||
- name: Kubernetes Apps | Add policies, roles, bindings for PodSecurityPolicy
|
- name: Kubernetes Apps | Add policies, roles, bindings for PodSecurityPolicy
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{item.item.name}}"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ psp_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
retries: 10
|
retries: 10
|
||||||
delay: 6
|
delay: 6
|
||||||
|
with_items: "{{ psp_manifests.results }}"
|
||||||
when:
|
when:
|
||||||
- podsecuritypolicy_enabled
|
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
- not item is skipped
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.item.file }}"
|
||||||
|
|
||||||
- name: Kubernetes Apps | Add ClusterRoleBinding to admit nodes
|
- name: Kubernetes Apps | Add ClusterRoleBinding to admit nodes
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -42,9 +42,13 @@
|
||||||
|
|
||||||
- name: Container Engine Acceleration Nvidia GPU | Apply manifests for nvidia accelerators
|
- name: Container Engine Acceleration Nvidia GPU | Apply manifests for nvidia accelerators
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ container_engine_accelerator_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/addons/container_engine_accelerator/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/addons/container_engine_accelerator/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items:
|
||||||
|
- "{{container_engine_accelerator_manifests.results}}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['kube-master'][0] and nvidia_driver_install_container and nvidia_driver_install_supported
|
- inventory_hostname == groups['kube-master'][0] and nvidia_driver_install_container and nvidia_driver_install_supported
|
||||||
|
|
|
@ -69,8 +69,11 @@
|
||||||
|
|
||||||
- name: CephFS Provisioner | Apply manifests
|
- name: CephFS Provisioner | Apply manifests
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "{{ cephfs_provisioner_namespace }}"
|
namespace: "{{ cephfs_provisioner_namespace }}"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ cephfs_provisioner_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/addons/cephfs_provisioner/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/addons/cephfs_provisioner/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items: "{{ cephfs_provisioner_manifests.results }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -30,8 +30,11 @@
|
||||||
|
|
||||||
- name: Local Path Provisioner | Apply manifests
|
- name: Local Path Provisioner | Apply manifests
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "{{ local_path_provisioner_namespace }}"
|
namespace: "{{ local_path_provisioner_namespace }}"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ local_path_provisioner_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/addons/local_path_provisioner/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/addons/local_path_provisioner/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items: "{{ local_path_provisioner_manifests.results }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -50,8 +50,13 @@
|
||||||
|
|
||||||
- name: Local Volume Provisioner | Apply manifests
|
- name: Local Volume Provisioner | Apply manifests
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "{{ local_volume_provisioner_namespace }}"
|
namespace: "{{ local_volume_provisioner_namespace }}"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ local_volume_provisioner_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/addons/local_volume_provisioner/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/addons/local_volume_provisioner/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items: "{{ local_volume_provisioner_manifests.results }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.item.file }}"
|
||||||
|
|
|
@ -20,10 +20,13 @@
|
||||||
|
|
||||||
- name: Helm | Apply Helm Manifests (RBAC)
|
- name: Helm | Apply Helm Manifests (RBAC)
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{item.item.name}}"
|
||||||
namespace: "{{ tiller_namespace }}"
|
namespace: "{{ tiller_namespace }}"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items: "{{ manifests.results }}"
|
||||||
when:
|
when:
|
||||||
- dns_mode != 'none'
|
- dns_mode != 'none'
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -47,8 +47,12 @@
|
||||||
|
|
||||||
- name: Cert Manager | Apply manifests
|
- name: Cert Manager | Apply manifests
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "{{ cert_manager_namespace }}"
|
namespace: "{{ cert_manager_namespace }}"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ cert_manager_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/addons/cert_manager/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/addons/cert_manager/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
with_items: "{{ cert_manager_manifests.results }}"
|
||||||
|
when:
|
||||||
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -61,9 +61,12 @@
|
||||||
|
|
||||||
- name: NGINX Ingress Controller | Apply manifests
|
- name: NGINX Ingress Controller | Apply manifests
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "{{ ingress_nginx_namespace }}"
|
namespace: "{{ ingress_nginx_namespace }}"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ ingress_nginx_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/addons/ingress_nginx/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/addons/ingress_nginx/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items: "{{ ingress_nginx_manifests.results }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -47,8 +47,11 @@
|
||||||
|
|
||||||
- name: Metrics Server | Apply manifests
|
- name: Metrics Server | Apply manifests
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ metrics_server_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/addons/metrics_server/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/addons/metrics_server/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items: "{{ metrics_server_manifests.results }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -1,12 +1,18 @@
|
||||||
---
|
---
|
||||||
- name: Start Calico resources
|
- name: Start Calico resources
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{item.item.name}}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ calico_node_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items:
|
||||||
|
- "{{ calico_node_manifests.results }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0] and not item is skipped
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.item.file }}"
|
||||||
|
|
||||||
- name: "calico upgrade complete"
|
- name: "calico upgrade complete"
|
||||||
shell: "{{ bin_dir }}/calico-upgrade complete --no-prompts --apiconfigv1 /etc/calico/etcdv2.yml --apiconfigv3 /etc/calico/etcdv3.yml"
|
shell: "{{ bin_dir }}/calico-upgrade complete --no-prompts --apiconfigv1 /etc/calico/etcdv2.yml --apiconfigv3 /etc/calico/etcdv3.yml"
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
---
|
---
|
||||||
- name: Canal | Start Resources
|
- name: Canal | Start Resources
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{item.item.name}}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ canal_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
with_items: "{{ canal_manifests.results }}"
|
||||||
|
when: inventory_hostname == groups['kube-master'][0] and not item is skipped
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
---
|
---
|
||||||
- name: Cilium | Start Resources
|
- name: Cilium | Start Resources
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{item.item.name}}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ cilium_node_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
with_items: "{{ cilium_node_manifests.results }}"
|
||||||
|
when: inventory_hostname == groups['kube-master'][0] and not item is skipped
|
||||||
|
|
||||||
- name: Cilium | Wait for pods to run
|
- name: Cilium | Wait for pods to run
|
||||||
command: "{{bin_dir}}/kubectl -n kube-system get pods -l k8s-app=cilium -o jsonpath='{.items[?(@.status.containerStatuses[0].ready==false)].metadata.name}'" # noqa 601
|
command: "{{bin_dir}}/kubectl -n kube-system get pods -l k8s-app=cilium -o jsonpath='{.items[?(@.status.containerStatuses[0].ready==false)].metadata.name}'" # noqa 601
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
|
|
||||||
- name: Contiv | Create Kubernetes resources
|
- name: Contiv | Create Kubernetes resources
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{contiv_manifests_results.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', contiv_config_dir+'/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ contiv_config_dir }}/{{ item.item.file }}"
|
||||||
state: "{{ item.changed | ternary('latest','present') }}"
|
state: "{{ item.changed | ternary('latest','present') }}"
|
||||||
|
with_items: "{{ contiv_manifests_results.results }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
- import_tasks: configure.yml
|
- import_tasks: configure.yml
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
---
|
---
|
||||||
- name: Flannel | Start Resources
|
- name: Flannel | Start Resources
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{item.item.name}}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ flannel_node_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
with_items: "{{ flannel_node_manifests.results }}"
|
||||||
|
when: inventory_hostname == groups['kube-master'][0] and not item is skipped
|
||||||
|
|
||||||
- name: Flannel | Wait for flannel subnet.env file presence
|
- name: Flannel | Wait for flannel subnet.env file presence
|
||||||
wait_for:
|
wait_for:
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
---
|
---
|
||||||
- name: Multus | Start resources
|
- name: Multus | Start resources
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{item.item.name}}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ (multus_manifest_1.results + multus_manifest_2.results) | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
with_items: "{{ multus_manifest_1.results }} + {{multus_manifest_2.results }}"
|
||||||
|
when: inventory_hostname == groups['kube-master'][0] and not item|skipped
|
||||||
|
|
|
@ -24,9 +24,16 @@
|
||||||
|
|
||||||
- name: Start of Calico kube controllers
|
- name: Start of Calico kube controllers
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{item.item.name}}"
|
||||||
namespace: "kube-system"
|
namespace: "kube-system"
|
||||||
kubectl: "{{bin_dir}}/kubectl"
|
kubectl: "{{bin_dir}}/kubectl"
|
||||||
filename: "{{ calico_node_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
resource: "{{item.item.type}}"
|
||||||
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items:
|
||||||
|
- "{{ calico_kube_manifests.results }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
- not item is skipped
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.item.file }}"
|
|
@ -42,10 +42,13 @@
|
||||||
|
|
||||||
- name: Registry | Apply manifests
|
- name: Registry | Apply manifests
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "{{ registry_namespace }}"
|
namespace: "{{ registry_namespace }}"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ registry_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/addons/registry/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/addons/registry/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items: "{{ registry_manifests.results }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
||||||
- name: Registry | Create PVC manifests
|
- name: Registry | Create PVC manifests
|
||||||
|
@ -62,10 +65,13 @@
|
||||||
|
|
||||||
- name: Registry | Apply PVC manifests
|
- name: Registry | Apply PVC manifests
|
||||||
kube:
|
kube:
|
||||||
|
name: "{{ item.item.name }}"
|
||||||
namespace: "{{ registry_namespace }}"
|
namespace: "{{ registry_namespace }}"
|
||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
filename: "{{ registry_manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/addons/registry/\\1') | list }}"
|
resource: "{{ item.item.type }}"
|
||||||
|
filename: "{{ kube_config_dir }}/addons/registry/{{ item.item.file }}"
|
||||||
state: "latest"
|
state: "latest"
|
||||||
|
with_items: "{{ registry_manifests.results }}"
|
||||||
when:
|
when:
|
||||||
- registry_storage_class != none and registry_storage_class != ""
|
- registry_storage_class != none and registry_storage_class != ""
|
||||||
- registry_disk_size != none and registry_disk_size != ""
|
- registry_disk_size != none and registry_disk_size != ""
|
||||||
|
|
Loading…
Reference in a new issue