mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-23 14:06:03 -03:30
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
@@ -5,33 +5,33 @@
|
||||
when:
|
||||
- not (allow_unsupported_distribution_setup | default(false)) and (ansible_distribution not in containerd_supported_distributions)
|
||||
|
||||
- name: containerd | Remove any package manager controlled containerd package
|
||||
- name: Containerd | Remove any package manager controlled containerd package
|
||||
package:
|
||||
name: "{{ containerd_package }}"
|
||||
state: absent
|
||||
when:
|
||||
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
|
||||
|
||||
- name: containerd | Remove containerd repository
|
||||
- name: Containerd | Remove containerd repository
|
||||
file:
|
||||
path: "{{ yum_repo_dir }}/containerd.repo"
|
||||
state: absent
|
||||
when:
|
||||
- ansible_os_family in ['RedHat']
|
||||
|
||||
- name: containerd | Remove containerd repository
|
||||
- name: Containerd | Remove containerd repository
|
||||
apt_repository:
|
||||
repo: "{{ item }}"
|
||||
state: absent
|
||||
with_items: "{{ containerd_repo_info.repos }}"
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
- name: containerd | Download containerd
|
||||
- name: Containerd | Download containerd
|
||||
include_tasks: "../../../download/tasks/download_file.yml"
|
||||
vars:
|
||||
download: "{{ download_defaults | combine(downloads.containerd) }}"
|
||||
|
||||
- name: containerd | Unpack containerd archive
|
||||
- name: Containerd | Unpack containerd archive
|
||||
unarchive:
|
||||
src: "{{ downloads.containerd.dest }}"
|
||||
dest: "{{ containerd_bin_dir }}"
|
||||
@@ -39,9 +39,9 @@
|
||||
remote_src: yes
|
||||
extra_opts:
|
||||
- --strip-components=1
|
||||
notify: restart containerd
|
||||
notify: Restart containerd
|
||||
|
||||
- name: containerd | Remove orphaned binary
|
||||
- name: Containerd | Remove orphaned binary
|
||||
file:
|
||||
path: "/usr/bin/{{ item }}"
|
||||
state: absent
|
||||
@@ -56,14 +56,14 @@
|
||||
- containerd-shim-runc-v2
|
||||
- ctr
|
||||
|
||||
- name: containerd | Generate systemd service for containerd
|
||||
- name: Containerd | Generate systemd service for containerd
|
||||
template:
|
||||
src: containerd.service.j2
|
||||
dest: /etc/systemd/system/containerd.service
|
||||
mode: 0644
|
||||
notify: restart containerd
|
||||
notify: Restart containerd
|
||||
|
||||
- name: containerd | Ensure containerd directories exist
|
||||
- name: Containerd | Ensure containerd directories exist
|
||||
file:
|
||||
dest: "{{ item }}"
|
||||
state: directory
|
||||
@@ -76,50 +76,51 @@
|
||||
- "{{ containerd_storage_dir }}"
|
||||
- "{{ containerd_state_dir }}"
|
||||
|
||||
- name: containerd | Write containerd proxy drop-in
|
||||
- name: Containerd | Write containerd proxy drop-in
|
||||
template:
|
||||
src: http-proxy.conf.j2
|
||||
dest: "{{ containerd_systemd_dir }}/http-proxy.conf"
|
||||
mode: 0644
|
||||
notify: restart containerd
|
||||
notify: Restart containerd
|
||||
when: http_proxy is defined or https_proxy is defined
|
||||
|
||||
- name: containerd | Generate default base_runtime_spec
|
||||
- name: Containerd | Generate default base_runtime_spec
|
||||
register: ctr_oci_spec
|
||||
command: "{{ containerd_bin_dir }}/ctr oci spec"
|
||||
check_mode: false
|
||||
changed_when: false
|
||||
|
||||
- name: containerd | Store generated default base_runtime_spec
|
||||
- name: Containerd | Store generated default base_runtime_spec
|
||||
set_fact:
|
||||
containerd_default_base_runtime_spec: "{{ ctr_oci_spec.stdout | from_json }}"
|
||||
|
||||
- name: containerd | Write base_runtime_specs
|
||||
- name: Containerd | Write base_runtime_specs
|
||||
copy:
|
||||
content: "{{ item.value }}"
|
||||
dest: "{{ containerd_cfg_dir }}/{{ item.key }}"
|
||||
owner: "root"
|
||||
mode: 0644
|
||||
with_dict: "{{ containerd_base_runtime_specs | default({}) }}"
|
||||
notify: restart containerd
|
||||
notify: Restart containerd
|
||||
|
||||
- name: containerd | Copy containerd config file
|
||||
- name: Containerd | Copy containerd config file
|
||||
template:
|
||||
src: config.toml.j2
|
||||
dest: "{{ containerd_cfg_dir }}/config.toml"
|
||||
owner: "root"
|
||||
mode: 0640
|
||||
notify: restart containerd
|
||||
notify: Restart containerd
|
||||
|
||||
- block:
|
||||
- name: containerd | Create registry directories
|
||||
- name: Containerd | Configure containerd registries
|
||||
block:
|
||||
- name: Containerd | Create registry directories
|
||||
file:
|
||||
path: "{{ containerd_cfg_dir }}/certs.d/{{ item.key }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
recurse: true
|
||||
with_dict: "{{ containerd_insecure_registries }}"
|
||||
- name: containerd | Write hosts.toml file
|
||||
- name: Containerd | Write hosts.toml file
|
||||
blockinfile:
|
||||
path: "{{ containerd_cfg_dir }}/certs.d/{{ item.key }}/hosts.toml"
|
||||
mode: 0640
|
||||
@@ -134,10 +135,10 @@
|
||||
|
||||
# you can sometimes end up in a state where everything is installed
|
||||
# but containerd was not started / enabled
|
||||
- name: containerd | Flush handlers
|
||||
- name: Containerd | Flush handlers
|
||||
meta: flush_handlers
|
||||
|
||||
- name: containerd | Ensure containerd is started and enabled
|
||||
- name: Containerd | Ensure containerd is started and enabled
|
||||
systemd:
|
||||
name: containerd
|
||||
daemon_reload: yes
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: containerd | Remove containerd repository for RedHat os family
|
||||
- name: Containerd | Remove containerd repository for RedHat os family
|
||||
file:
|
||||
path: "{{ yum_repo_dir }}/containerd.repo"
|
||||
state: absent
|
||||
@@ -8,7 +8,7 @@
|
||||
tags:
|
||||
- reset_containerd
|
||||
|
||||
- name: containerd | Remove containerd repository for Debian os family
|
||||
- name: Containerd | Remove containerd repository for Debian os family
|
||||
apt_repository:
|
||||
repo: "{{ item }}"
|
||||
state: absent
|
||||
@@ -17,7 +17,7 @@
|
||||
tags:
|
||||
- reset_containerd
|
||||
|
||||
- name: containerd | Stop containerd service
|
||||
- name: Containerd | Stop containerd service
|
||||
service:
|
||||
name: containerd
|
||||
daemon_reload: true
|
||||
@@ -26,7 +26,7 @@
|
||||
tags:
|
||||
- reset_containerd
|
||||
|
||||
- name: containerd | Remove configuration files
|
||||
- name: Containerd | Remove configuration files
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
|
||||
Reference in New Issue
Block a user