ansible-lint: Fix commands that are also available as module (#4619)

pull/4450/head
MarkusTeufelberger 2019-04-24 07:18:00 +02:00 committed by Kubernetes Prow Robot
parent 6df8111cd4
commit 424e59805f
13 changed files with 20 additions and 48 deletions

View File

@ -10,7 +10,6 @@ skip_list:
- '206' - '206'
- '301' - '301'
- '302' - '302'
- '303'
- '305' - '305'
- '306' - '306'
- '404' - '404'

View File

@ -9,7 +9,8 @@
- Docker | wait for docker - Docker | wait for docker
- name: Docker | reload systemd - name: Docker | reload systemd
shell: systemctl daemon-reload systemd:
daemon_reload: true
- name: Docker | reload docker.socket - name: Docker | reload docker.socket
service: service:

View File

@ -12,6 +12,7 @@
when: http_proxy is defined or https_proxy is defined when: http_proxy is defined or https_proxy is defined
- name: get systemd version - name: get systemd version
# noqa 303 - systemctl is called intentionally here
shell: systemctl --version | head -n 1 | cut -d " " -f 2 shell: systemctl --version | head -n 1 | cut -d " " -f 2
register: systemd_version register: systemd_version
when: not is_atomic when: not is_atomic

View File

@ -17,7 +17,8 @@
- import_tasks: backup.yml - import_tasks: backup.yml
- name: etcd | reload systemd - name: etcd | reload systemd
command: systemctl daemon-reload systemd:
daemon_reload: true
- name: reload etcd - name: reload etcd
service: service:

View File

@ -45,7 +45,8 @@
when: is_etcd_master and etcd_events_cluster_setup when: is_etcd_master and etcd_events_cluster_setup
- name: Configure | reload systemd - name: Configure | reload systemd
command: systemctl daemon-reload systemd:
daemon_reload: true
when: is_etcd_master when: is_etcd_master
- name: Configure | Ensure etcd is running - name: Configure | Ensure etcd is running

View File

@ -57,6 +57,7 @@
- "{{ helm_client_certs }}" - "{{ helm_client_certs }}"
- name: Gen_helm_tiller_certs | Gather 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" shell: "tar cfz - -C {{ helm_home_dir }} -T /dev/stdin <<< {{ helm_client_certs|join(' ') }} | base64 --wrap=0"
args: args:
executable: /bin/bash executable: /bin/bash

View File

@ -32,7 +32,8 @@
- Master | wait for kube-controller-manager - Master | wait for kube-controller-manager
- name: Master | reload systemd - name: Master | reload systemd
command: systemctl daemon-reload systemd:
daemon_reload: true
- name: Master | reload kubelet - name: Master | reload kubelet
service: service:

View File

@ -6,7 +6,8 @@
- Kubelet | reload kubelet - Kubelet | reload kubelet
- name: Kubelet | reload systemd - name: Kubelet | reload systemd
command: systemctl daemon-reload systemd:
daemon_reload: true
- name: Kubelet | reload kubelet - name: Kubelet | reload kubelet
service: service:

View File

@ -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 - name: Update package management cache (zypper) - SUSE
shell: zypper -n --gpg-auto-import-keys ref shell: zypper -n --gpg-auto-import-keys ref
register: make_cache_output register: make_cache_output

View File

@ -6,7 +6,8 @@
- Calico-rr | reload calico-rr - Calico-rr | reload calico-rr
- name: Calico-rr | reload systemd - name: Calico-rr | reload systemd
shell: systemctl daemon-reload systemd:
daemon_reload: true
- name: Calico-rr | reload calico-rr - name: Calico-rr | reload calico-rr
service: service:

View File

@ -6,7 +6,8 @@
- Kubelet | reload kubelet - Kubelet | reload kubelet
- name: Kubelet | reload systemd - name: Kubelet | reload systemd
command: systemctl daemon-reload systemd:
daemon_reload: true
- name: Kubelet | reload kubelet - name: Kubelet | reload kubelet
service: service:

View File

@ -23,7 +23,8 @@
- Flannel | wait for docker - Flannel | wait for docker
- name: Flannel | reload systemd - name: Flannel | reload systemd
shell: systemctl daemon-reload systemd:
daemon_reload: true
- name: Flannel | reload docker.socket - name: Flannel | reload docker.socket
service: service:

View File

@ -47,7 +47,8 @@
- docker - docker
- name: reset | systemctl daemon-reload - name: reset | systemctl daemon-reload
command: systemctl daemon-reload systemd:
daemon_reload: true
when: services_removed.changed or docker_dropins_removed.changed when: services_removed.changed or docker_dropins_removed.changed
- name: reset | remove all containers - name: reset | remove all containers