mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Comply with ansible-lint
Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Disable services
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
@@ -9,14 +9,14 @@
|
||||
- k3s
|
||||
- k3s-node
|
||||
|
||||
- name: pkill -9 -f "k3s/data/[^/]+/bin/containerd-shim-runc"
|
||||
- name: Pkill k3s container runtimes"
|
||||
register: pkill_containerd_shim_runc
|
||||
command: pkill -9 -f "k3s/data/[^/]+/bin/containerd-shim-runc"
|
||||
ansible.builtin.command: pkill -9 -f "k3s/data/[^/]+/bin/containerd-shim-runc"
|
||||
changed_when: "pkill_containerd_shim_runc.rc == 0"
|
||||
failed_when: false
|
||||
|
||||
- name: Umount k3s filesystems
|
||||
include_tasks: umount_with_children.yml
|
||||
ansible.builtin.include_tasks: umount_with_children.yml
|
||||
with_items:
|
||||
- /run/k3s
|
||||
- /var/lib/kubelet
|
||||
@@ -26,7 +26,7 @@
|
||||
loop_var: mounted_fs
|
||||
|
||||
- name: Remove service files, binaries and data
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
@@ -37,6 +37,6 @@
|
||||
- /var/lib/kubelet
|
||||
- /var/lib/rancher/k3s
|
||||
|
||||
- name: daemon_reload
|
||||
systemd:
|
||||
- name: Daemon_reload
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Get the list of mounted filesystems
|
||||
shell: set -o pipefail && cat /proc/mounts | awk '{ print $2}' | grep -E "^{{ mounted_fs }}"
|
||||
ansible.builtin.shell: set -o pipefail && cat /proc/mounts | awk '{ print $2}' | grep -E "^{{ mounted_fs }}"
|
||||
register: get_mounted_filesystems
|
||||
args:
|
||||
executable: /bin/bash
|
||||
@@ -9,7 +9,7 @@
|
||||
check_mode: false
|
||||
|
||||
- name: Umount filesystem
|
||||
mount:
|
||||
ansible.posix.mount:
|
||||
path: "{{ item }}"
|
||||
state: unmounted
|
||||
with_items:
|
||||
|
||||
Reference in New Issue
Block a user