mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +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,13 +1,13 @@
|
||||
---
|
||||
- name: reset_calico_cni
|
||||
- name: Reset_calico_cni
|
||||
command: /bin/true
|
||||
when: calico_cni_config is defined
|
||||
notify:
|
||||
- delete 10-calico.conflist
|
||||
- Delete 10-calico.conflist
|
||||
- Calico | delete calico-node docker containers
|
||||
- Calico | delete calico-node crio/containerd containers
|
||||
|
||||
- name: delete 10-calico.conflist
|
||||
- name: Delete 10-calico.conflist
|
||||
file:
|
||||
path: /etc/cni/net.d/10-calico.conflist
|
||||
state: absent
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
---
|
||||
# Workaround to retry a block of tasks, ansible doesn't have a direct way to do it,
|
||||
# you can follow the block loop request in: https://github.com/ansible/ansible/issues/46203
|
||||
- block:
|
||||
- name: Calico-rr | Configure route reflector
|
||||
block:
|
||||
- name: Set the retry count
|
||||
set_fact:
|
||||
retry_count: "{{ 0 if retry_count is undefined else retry_count | int + 1 }}"
|
||||
|
||||
@@ -119,7 +119,8 @@
|
||||
- calico_pool_cidr_ipv6 is defined
|
||||
- enable_dual_stack_networks
|
||||
|
||||
- block:
|
||||
- name: Calico | kdd specific configuration
|
||||
block:
|
||||
- name: Calico | Check if extra directory is needed
|
||||
stat:
|
||||
path: "{{ local_release_dir }}/calico-{{ calico_version }}-kdd-crds/{{ 'kdd' if (calico_version is version('v3.22.3', '<')) else 'crd' }}"
|
||||
@@ -157,7 +158,8 @@
|
||||
- inventory_hostname in groups['kube_control_plane']
|
||||
- calico_datastore == "kdd"
|
||||
|
||||
- block:
|
||||
- name: Calico | Configure Felix
|
||||
block:
|
||||
- name: Calico | Get existing FelixConfiguration
|
||||
command: "{{ bin_dir }}/calicoctl.sh get felixconfig default -o json"
|
||||
register: _felix_cmd
|
||||
@@ -201,7 +203,8 @@
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
- block:
|
||||
- name: Calico | Configure Calico IP Pool
|
||||
block:
|
||||
- name: Calico | Get existing calico network pool
|
||||
command: "{{ bin_dir }}/calicoctl.sh get ippool {{ calico_pool_name }} -o json"
|
||||
register: _calico_pool_cmd
|
||||
@@ -240,7 +243,8 @@
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
- block:
|
||||
- name: Calico | Configure Calico IPv6 Pool
|
||||
block:
|
||||
- name: Calico | Get existing calico ipv6 network pool
|
||||
command: "{{ bin_dir }}/calicoctl.sh get ippool {{ calico_pool_name }}-ipv6 -o json"
|
||||
register: _calico_pool_ipv6_cmd
|
||||
@@ -300,7 +304,8 @@
|
||||
- inventory_hostname in groups['k8s_cluster']
|
||||
run_once: yes
|
||||
|
||||
- block:
|
||||
- name: Calico | Configure Calico BGP
|
||||
block:
|
||||
- name: Calico | Get existing BGP Configuration
|
||||
command: "{{ bin_dir }}/calicoctl.sh get bgpconfig default -o json"
|
||||
register: _bgp_config_cmd
|
||||
@@ -463,10 +468,12 @@
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
- calico_datastore == "kdd"
|
||||
|
||||
- include_tasks: peer_with_calico_rr.yml
|
||||
- name: Calico | Peer with Calico Route Reflector
|
||||
include_tasks: peer_with_calico_rr.yml
|
||||
when:
|
||||
- peer_with_calico_rr | default(false)
|
||||
|
||||
- include_tasks: peer_with_router.yml
|
||||
- name: Calico | Peer with the router
|
||||
include_tasks: peer_with_router.yml
|
||||
when:
|
||||
- peer_with_router | default(false)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
---
|
||||
- import_tasks: pre.yml
|
||||
- name: Calico Pre tasks
|
||||
import_tasks: pre.yml
|
||||
|
||||
- import_tasks: repos.yml
|
||||
- name: Calico repos
|
||||
import_tasks: repos.yml
|
||||
|
||||
- include_tasks: install.yml
|
||||
- name: Calico install
|
||||
include_tasks: install.yml
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
register: calico_cni_config_slurp
|
||||
failed_when: false
|
||||
|
||||
- block:
|
||||
- name: Gather calico facts
|
||||
block:
|
||||
- name: Set fact calico_cni_config from slurped CNI config
|
||||
set_fact:
|
||||
calico_cni_config: "{{ calico_cni_config_slurp['content'] | b64decode | from_json }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: reset | check vxlan.calico network device
|
||||
- name: Reset | check vxlan.calico network device
|
||||
stat:
|
||||
path: /sys/class/net/vxlan.calico
|
||||
get_attributes: no
|
||||
@@ -7,11 +7,11 @@
|
||||
get_mime: no
|
||||
register: vxlan
|
||||
|
||||
- name: reset | remove the network vxlan.calico device created by calico
|
||||
- name: Reset | remove the network vxlan.calico device created by calico
|
||||
command: ip link del vxlan.calico
|
||||
when: vxlan.stat.exists
|
||||
|
||||
- name: reset | check dummy0 network device
|
||||
- name: Reset | check dummy0 network device
|
||||
stat:
|
||||
path: /sys/class/net/dummy0
|
||||
get_attributes: no
|
||||
@@ -19,11 +19,11 @@
|
||||
get_mime: no
|
||||
register: dummy0
|
||||
|
||||
- name: reset | remove the network device created by calico
|
||||
- name: Reset | remove the network device created by calico
|
||||
command: ip link del dummy0
|
||||
when: dummy0.stat.exists
|
||||
|
||||
- name: reset | get and remove remaining routes set by bird
|
||||
- name: Reset | get and remove remaining routes set by bird
|
||||
shell: set -o pipefail && ip route show proto bird | xargs -i bash -c "ip route del {} proto bird "
|
||||
args:
|
||||
executable: /bin/bash
|
||||
|
||||
Reference in New Issue
Block a user