mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-17 08:57:36 -02: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
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: check if fedora coreos
|
||||
- name: Check if fedora coreos
|
||||
stat:
|
||||
path: /run/ostree-booted
|
||||
get_attributes: no
|
||||
@@ -7,18 +7,18 @@
|
||||
get_mime: no
|
||||
register: ostree
|
||||
|
||||
- name: set is_ostree
|
||||
- name: Set is_ostree
|
||||
set_fact:
|
||||
is_ostree: "{{ ostree.stat.exists }}"
|
||||
|
||||
- name: set docker_version for openEuler
|
||||
- name: Set docker_version for openEuler
|
||||
set_fact:
|
||||
docker_version: '19.03'
|
||||
when: ansible_distribution == "openEuler"
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- name: gather os specific variables
|
||||
- name: Gather os specific variables
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- files:
|
||||
@@ -44,14 +44,16 @@
|
||||
msg: "SUSE distributions always install Docker from the distro repos"
|
||||
when: ansible_pkg_mgr == 'zypper'
|
||||
|
||||
- include_tasks: set_facts_dns.yml
|
||||
- name: Gather DNS facts
|
||||
include_tasks: set_facts_dns.yml
|
||||
when: dns_mode != 'none' and resolvconf_mode == 'docker_dns'
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- import_tasks: pre-upgrade.yml
|
||||
- name: Pre-upgrade docker
|
||||
import_tasks: pre-upgrade.yml
|
||||
|
||||
- name: ensure docker-ce repository public key is installed
|
||||
- name: Ensure docker-ce repository public key is installed
|
||||
apt_key:
|
||||
id: "{{ item }}"
|
||||
url: "{{ docker_repo_key_info.url }}"
|
||||
@@ -64,7 +66,7 @@
|
||||
environment: "{{ proxy_env }}"
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
- name: ensure docker-ce repository is enabled
|
||||
- name: Ensure docker-ce repository is enabled
|
||||
apt_repository:
|
||||
repo: "{{ item }}"
|
||||
state: present
|
||||
@@ -99,7 +101,7 @@
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
|
||||
- name: ensure docker packages are installed
|
||||
- name: Ensure docker packages are installed
|
||||
package:
|
||||
name: "{{ docker_package_info.pkgs }}"
|
||||
state: "{{ docker_package_info.state | default('present') }}"
|
||||
@@ -117,7 +119,7 @@
|
||||
until: docker_task_result is succeeded
|
||||
retries: 4
|
||||
delay: "{{ retry_stagger | d(3) }}"
|
||||
notify: restart docker
|
||||
notify: Restart docker
|
||||
when:
|
||||
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
- not is_ostree
|
||||
@@ -135,9 +137,9 @@
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
|
||||
- name: ensure docker started, remove our config if docker start failed and try again
|
||||
- name: Ensure docker started, remove our config if docker start failed and try again
|
||||
block:
|
||||
- name: ensure service is started if docker packages are already present
|
||||
- name: Ensure service is started if docker packages are already present
|
||||
service:
|
||||
name: docker
|
||||
state: started
|
||||
@@ -145,7 +147,7 @@
|
||||
rescue:
|
||||
- debug: # noqa name[missing]
|
||||
msg: "Docker start failed. Try to remove our config"
|
||||
- name: remove kubespray generated config
|
||||
- name: Remove kubespray generated config
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
@@ -154,13 +156,14 @@
|
||||
- /etc/systemd/system/docker.service.d/docker-options.conf
|
||||
- /etc/systemd/system/docker.service.d/docker-dns.conf
|
||||
- /etc/systemd/system/docker.service.d/docker-orphan-cleanup.conf
|
||||
notify: restart docker
|
||||
notify: Restart docker
|
||||
|
||||
- name: flush handlers so we can wait for docker to come up
|
||||
- name: Flush handlers so we can wait for docker to come up
|
||||
meta: flush_handlers
|
||||
|
||||
# Install each plugin using a looped include to make error handling in the included task simpler.
|
||||
- include_tasks: docker_plugin.yml
|
||||
- name: Install docker plugin
|
||||
include_tasks: docker_plugin.yml
|
||||
loop: "{{ docker_plugins }}"
|
||||
loop_control:
|
||||
loop_var: docker_plugin
|
||||
@@ -168,7 +171,7 @@
|
||||
- name: Set docker systemd config
|
||||
import_tasks: systemd.yml
|
||||
|
||||
- name: ensure docker service is started and enabled
|
||||
- name: Ensure docker service is started and enabled
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
enabled: yes
|
||||
|
||||
Reference in New Issue
Block a user