mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-04 08:48:42 +03:00
Resolve ansible-lint name errors (#10253)
* project: fix ansible-lint name Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: ignore jinja template error in names Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: capitalize ansible name Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: update notify after name capitalization Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> --------- Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
This commit is contained in:
committed by
GitHub
parent
b9e3861385
commit
36e5d742dc
@@ -1,5 +1,6 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
- name: Check Ansible version
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
become: no
|
||||
vars:
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
- name: Ensure compatibility with old groups
|
||||
import_playbook: legacy_groups.yml
|
||||
|
||||
- hosts: bastion[0]
|
||||
- name: Install bastion ssh config
|
||||
hosts: bastion[0]
|
||||
gather_facts: False
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
@@ -16,7 +17,8 @@
|
||||
tags: always
|
||||
import_playbook: facts.yml
|
||||
|
||||
- hosts: k8s_cluster:etcd
|
||||
- name: Prepare for etcd install
|
||||
hosts: k8s_cluster:etcd
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -26,7 +28,8 @@
|
||||
- { role: "container-engine", tags: "container-engine", when: deploy_container_engine }
|
||||
- { role: download, tags: download, when: "not skip_downloads" }
|
||||
|
||||
- hosts: etcd:kube_control_plane
|
||||
- name: Install etcd
|
||||
hosts: etcd:kube_control_plane
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -39,7 +42,8 @@
|
||||
etcd_events_cluster_setup: "{{ etcd_events_cluster_enabled }}"
|
||||
when: etcd_deployment_type != "kubeadm"
|
||||
|
||||
- hosts: k8s_cluster
|
||||
- name: Install etcd certs on nodes if required
|
||||
hosts: k8s_cluster
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -55,7 +59,8 @@
|
||||
- kube_network_plugin in ["calico", "flannel", "canal", "cilium"] or cilium_deploy_additionally | default(false) | bool
|
||||
- kube_network_plugin != "calico" or calico_datastore == "etcd"
|
||||
|
||||
- hosts: k8s_cluster
|
||||
- name: Install Kubernetes nodes
|
||||
hosts: k8s_cluster
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -63,7 +68,8 @@
|
||||
- { role: kubespray-defaults }
|
||||
- { role: kubernetes/node, tags: node }
|
||||
|
||||
- hosts: kube_control_plane
|
||||
- name: Install the control plane
|
||||
hosts: kube_control_plane
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -73,7 +79,8 @@
|
||||
- { role: kubernetes/client, tags: client }
|
||||
- { role: kubernetes-apps/cluster_roles, tags: cluster-roles }
|
||||
|
||||
- hosts: k8s_cluster
|
||||
- name: Invoke kubeadm and install a CNI
|
||||
hosts: k8s_cluster
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -84,7 +91,8 @@
|
||||
- { role: network_plugin, tags: network }
|
||||
- { role: kubernetes-apps/kubelet-csr-approver, tags: kubelet-csr-approver }
|
||||
|
||||
- hosts: calico_rr
|
||||
- name: Install Calico Route Reflector
|
||||
hosts: calico_rr
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -92,7 +100,8 @@
|
||||
- { role: kubespray-defaults }
|
||||
- { role: network_plugin/calico/rr, tags: ['network', 'calico_rr'] }
|
||||
|
||||
- hosts: kube_control_plane[0]
|
||||
- name: Patch Kubernetes for Windows
|
||||
hosts: kube_control_plane[0]
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -100,7 +109,8 @@
|
||||
- { role: kubespray-defaults }
|
||||
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] }
|
||||
|
||||
- hosts: kube_control_plane
|
||||
- name: Install Kubernetes apps
|
||||
hosts: kube_control_plane
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
- hosts: k8s_cluster:etcd:calico_rr
|
||||
- name: Bootstrap hosts for Ansible
|
||||
hosts: k8s_cluster:etcd:calico_rr
|
||||
strategy: linear
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
gather_facts: false
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
gather_facts: false
|
||||
tags: always
|
||||
tasks:
|
||||
- name: add nodes to kube_control_plane group
|
||||
- name: Add nodes to kube_control_plane group
|
||||
group_by:
|
||||
key: 'kube_control_plane'
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
gather_facts: false
|
||||
tags: always
|
||||
tasks:
|
||||
- name: add nodes to kube_node group
|
||||
- name: Add nodes to kube_node group
|
||||
group_by:
|
||||
key: 'kube_node'
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
gather_facts: false
|
||||
tags: always
|
||||
tasks:
|
||||
- name: add nodes to k8s_cluster group
|
||||
- name: Add nodes to k8s_cluster group
|
||||
group_by:
|
||||
key: 'k8s_cluster'
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
gather_facts: false
|
||||
tags: always
|
||||
tasks:
|
||||
- name: add nodes to calico_rr group
|
||||
- name: Add nodes to calico_rr group
|
||||
group_by:
|
||||
key: 'calico_rr'
|
||||
|
||||
@@ -42,6 +42,6 @@
|
||||
gather_facts: false
|
||||
tags: always
|
||||
tasks:
|
||||
- name: add nodes to no-floating group
|
||||
- name: Add nodes to no-floating group
|
||||
group_by:
|
||||
key: 'no_floating'
|
||||
|
||||
@@ -5,29 +5,34 @@
|
||||
- name: Ensure compatibility with old groups
|
||||
import_playbook: legacy_groups.yml
|
||||
|
||||
- hosts: bastion[0]
|
||||
- name: Install bastion ssh config
|
||||
hosts: bastion[0]
|
||||
gather_facts: False
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
- { role: kubespray-defaults}
|
||||
- { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
|
||||
|
||||
- hosts: etcd[0]
|
||||
- name: Recover etcd
|
||||
hosts: etcd[0]
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
- { role: kubespray-defaults}
|
||||
- role: recover_control_plane/etcd
|
||||
when: etcd_deployment_type != "kubeadm"
|
||||
|
||||
- hosts: kube_control_plane[0]
|
||||
- name: Recover control plane
|
||||
hosts: kube_control_plane[0]
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
- { role: kubespray-defaults}
|
||||
- { role: recover_control_plane/control-plane }
|
||||
|
||||
- import_playbook: cluster.yml
|
||||
- name: Apply whole cluster install
|
||||
import_playbook: cluster.yml
|
||||
|
||||
- hosts: kube_control_plane
|
||||
- name: Perform post recover tasks
|
||||
hosts: kube_control_plane
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
- { role: kubespray-defaults}
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
- name: Ensure compatibility with old groups
|
||||
import_playbook: legacy_groups.yml
|
||||
|
||||
- hosts: bastion[0]
|
||||
- name: Install bastion ssh config
|
||||
hosts: bastion[0]
|
||||
gather_facts: False
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
- { role: kubespray-defaults }
|
||||
- { role: bastion-ssh-config, tags: ["localhost", "bastion"] }
|
||||
|
||||
- hosts: "{{ node | default('etcd:k8s_cluster:calico_rr') }}"
|
||||
- name: Confirm node removal
|
||||
hosts: "{{ node | default('etcd:k8s_cluster:calico_rr') }}"
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- name: Confirm Execution
|
||||
@@ -32,7 +34,8 @@
|
||||
import_playbook: facts.yml
|
||||
when: reset_nodes | default(True) | bool
|
||||
|
||||
- hosts: "{{ node | default('kube_node') }}"
|
||||
- name: Reset node
|
||||
hosts: "{{ node | default('kube_node') }}"
|
||||
gather_facts: no
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
@@ -42,7 +45,8 @@
|
||||
- { role: reset, tags: reset, when: reset_nodes | default(True) | bool }
|
||||
|
||||
# Currently cannot remove first master or etcd
|
||||
- hosts: "{{ node | default('kube_control_plane[1:]:etcd[1:]') }}"
|
||||
- name: Post node removal
|
||||
hosts: "{{ node | default('kube_control_plane[1:]:etcd[1:]') }}"
|
||||
gather_facts: no
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
- name: Ensure compatibility with old groups
|
||||
import_playbook: legacy_groups.yml
|
||||
|
||||
- hosts: bastion[0]
|
||||
- name: Install bastion ssh config
|
||||
hosts: bastion[0]
|
||||
gather_facts: False
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
@@ -15,7 +16,8 @@
|
||||
- name: Gather facts
|
||||
import_playbook: facts.yml
|
||||
|
||||
- hosts: etcd:k8s_cluster:calico_rr
|
||||
- name: Reset cluster
|
||||
hosts: etcd:k8s_cluster:calico_rr
|
||||
gather_facts: False
|
||||
pre_tasks:
|
||||
- name: Reset Confirmation
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
- name: Ensure compatibility with old groups
|
||||
import_playbook: legacy_groups.yml
|
||||
|
||||
- hosts: bastion[0]
|
||||
- name: Install bastion ssh config
|
||||
hosts: bastion[0]
|
||||
gather_facts: False
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
@@ -88,7 +89,7 @@
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
register: kubeadm_upload_cert
|
||||
changed_when: false
|
||||
- name: set fact 'kubeadm_certificate_key' for later use
|
||||
- name: Set fact 'kubeadm_certificate_key' for later use
|
||||
set_fact:
|
||||
kubeadm_certificate_key: "{{ kubeadm_upload_cert.stdout_lines[-1] | trim }}"
|
||||
when: kubeadm_certificate_key is not defined
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
- name: Ensure compatibility with old groups
|
||||
import_playbook: legacy_groups.yml
|
||||
|
||||
- hosts: bastion[0]
|
||||
- name: Install bastion ssh config
|
||||
hosts: bastion[0]
|
||||
gather_facts: False
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
@@ -46,7 +47,8 @@
|
||||
- { role: kubespray-defaults }
|
||||
- { role: container-engine, tags: "container-engine", when: deploy_container_engine }
|
||||
|
||||
- hosts: etcd:kube_control_plane
|
||||
- name: Install etcd
|
||||
hosts: etcd:kube_control_plane
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -59,7 +61,8 @@
|
||||
etcd_events_cluster_setup: "{{ etcd_events_cluster_enabled }}"
|
||||
when: etcd_deployment_type != "kubeadm"
|
||||
|
||||
- hosts: k8s_cluster
|
||||
- name: Install etcd certs on nodes if required
|
||||
hosts: k8s_cluster
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -126,7 +129,8 @@
|
||||
- { role: kubernetes/node-label, tags: node-label }
|
||||
- { role: upgrade/post-upgrade, tags: post-upgrade }
|
||||
|
||||
- hosts: kube_control_plane[0]
|
||||
- name: Patch Kubernetes for Windows
|
||||
hosts: kube_control_plane[0]
|
||||
gather_facts: False
|
||||
any_errors_fatal: true
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -134,7 +138,8 @@
|
||||
- { role: kubespray-defaults }
|
||||
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] }
|
||||
|
||||
- hosts: calico_rr
|
||||
- name: Install Calico Route Reflector
|
||||
hosts: calico_rr
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
@@ -142,7 +147,8 @@
|
||||
- { role: kubespray-defaults }
|
||||
- { role: network_plugin/calico/rr, tags: network }
|
||||
|
||||
- hosts: kube_control_plane
|
||||
- name: Install Kubernetes apps
|
||||
hosts: kube_control_plane
|
||||
gather_facts: False
|
||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
||||
environment: "{{ proxy_disable_env }}"
|
||||
|
||||
Reference in New Issue
Block a user