ansible-lint: Fix commands that are also available as module (#4619)
This commit is contained in:
parent
6df8111cd4
commit
424e59805f
13 changed files with 20 additions and 48 deletions
|
@ -10,7 +10,6 @@ skip_list:
|
|||
- '206'
|
||||
- '301'
|
||||
- '302'
|
||||
- '303'
|
||||
- '305'
|
||||
- '306'
|
||||
- '404'
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
- Docker | wait for docker
|
||||
|
||||
- name: Docker | reload systemd
|
||||
shell: systemctl daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Docker | reload docker.socket
|
||||
service:
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
when: http_proxy is defined or https_proxy is defined
|
||||
|
||||
- name: get systemd version
|
||||
# noqa 303 - systemctl is called intentionally here
|
||||
shell: systemctl --version | head -n 1 | cut -d " " -f 2
|
||||
register: systemd_version
|
||||
when: not is_atomic
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
- import_tasks: backup.yml
|
||||
|
||||
- name: etcd | reload systemd
|
||||
command: systemctl daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: reload etcd
|
||||
service:
|
||||
|
|
|
@ -45,7 +45,8 @@
|
|||
when: is_etcd_master and etcd_events_cluster_setup
|
||||
|
||||
- name: Configure | reload systemd
|
||||
command: systemctl daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
when: is_etcd_master
|
||||
|
||||
- name: Configure | Ensure etcd is running
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
- "{{ helm_client_certs }}"
|
||||
|
||||
- name: Gen_helm_tiller_certs | Gather helm client certs
|
||||
# noqa 303 - tar is called intentionally here, but maybe this should be done with the slurp module
|
||||
shell: "tar cfz - -C {{ helm_home_dir }} -T /dev/stdin <<< {{ helm_client_certs|join(' ') }} | base64 --wrap=0"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
- Master | wait for kube-controller-manager
|
||||
|
||||
- name: Master | reload systemd
|
||||
command: systemctl daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Master | reload kubelet
|
||||
service:
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
- Kubelet | reload kubelet
|
||||
|
||||
- name: Kubelet | reload systemd
|
||||
command: systemctl daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Kubelet | reload kubelet
|
||||
service:
|
||||
|
|
|
@ -1,42 +1,4 @@
|
|||
---
|
||||
- name: Update package management cache (YUM)
|
||||
yum:
|
||||
update_cache: yes
|
||||
name: '*'
|
||||
register: yum_task_result
|
||||
until: yum_task_result is succeeded
|
||||
retries: 4
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
- ansible_distribution != 'RedHat'
|
||||
- not is_atomic
|
||||
|
||||
- name: Expire management cache (YUM) for Updation - Redhat
|
||||
shell: yum clean expire-cache
|
||||
register: expire_cache_output
|
||||
until: expire_cache_output is succeeded
|
||||
retries: 4
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
- ansible_distribution == 'RedHat'
|
||||
- not is_atomic
|
||||
tags: bootstrap-os
|
||||
|
||||
- name: Update package management cache (YUM) - Redhat
|
||||
shell: yum makecache
|
||||
register: make_cache_output
|
||||
until: make_cache_output is succeeded
|
||||
retries: 4
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
- ansible_distribution == 'RedHat'
|
||||
- expire_cache_output.rc == 0
|
||||
- not is_atomic
|
||||
tags: bootstrap-os
|
||||
|
||||
- name: Update package management cache (zypper) - SUSE
|
||||
shell: zypper -n --gpg-auto-import-keys ref
|
||||
register: make_cache_output
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
- Calico-rr | reload calico-rr
|
||||
|
||||
- name: Calico-rr | reload systemd
|
||||
shell: systemctl daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Calico-rr | reload calico-rr
|
||||
service:
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
- Kubelet | reload kubelet
|
||||
|
||||
- name: Kubelet | reload systemd
|
||||
command: systemctl daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Kubelet | reload kubelet
|
||||
service:
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
- Flannel | wait for docker
|
||||
|
||||
- name: Flannel | reload systemd
|
||||
shell: systemctl daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Flannel | reload docker.socket
|
||||
service:
|
||||
|
|
|
@ -47,7 +47,8 @@
|
|||
- docker
|
||||
|
||||
- name: reset | systemctl daemon-reload
|
||||
command: systemctl daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
when: services_removed.changed or docker_dropins_removed.changed
|
||||
|
||||
- name: reset | remove all containers
|
||||
|
|
Loading…
Reference in a new issue