diff --git a/.ansible-lint b/.ansible-lint index 7f1c3a16a7547ba4491d8a530c8d63c25e894f34..d622584aed6a73c284bc4ec6570446fa8ad2fa79 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -10,7 +10,6 @@ skip_list: - '206' - '301' - '302' - - '303' - '305' - '306' - '404' diff --git a/roles/container-engine/docker/handlers/main.yml b/roles/container-engine/docker/handlers/main.yml index a43d843ee3757533d9b50c7ef8adcbda427e9cb4..2847088e12b88a90e8d5e1bae70cbc7016eae21d 100644 --- a/roles/container-engine/docker/handlers/main.yml +++ b/roles/container-engine/docker/handlers/main.yml @@ -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: diff --git a/roles/container-engine/docker/tasks/systemd.yml b/roles/container-engine/docker/tasks/systemd.yml index e37d7cc47b1c016f653cbc9db0ad6da9c17a7819..25b4ad942dc0470915e6a82cefe4f84d47b07b41 100644 --- a/roles/container-engine/docker/tasks/systemd.yml +++ b/roles/container-engine/docker/tasks/systemd.yml @@ -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 diff --git a/roles/etcd/handlers/main.yml b/roles/etcd/handlers/main.yml index 3a46978a68d271cbde34004bfbd4d09a649f98bf..d9709fd561679f1881a8e3112316f3c27cc4fe64 100644 --- a/roles/etcd/handlers/main.yml +++ b/roles/etcd/handlers/main.yml @@ -17,7 +17,8 @@ - import_tasks: backup.yml - name: etcd | reload systemd - command: systemctl daemon-reload + systemd: + daemon_reload: true - name: reload etcd service: diff --git a/roles/etcd/tasks/configure.yml b/roles/etcd/tasks/configure.yml index ded28fc603c16e3b5291f5397fda01bc20161e1e..2470217bc86e96be9d371dd2be43809943e95105 100644 --- a/roles/etcd/tasks/configure.yml +++ b/roles/etcd/tasks/configure.yml @@ -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 diff --git a/roles/kubernetes-apps/helm/tasks/gen_helm_tiller_certs.yml b/roles/kubernetes-apps/helm/tasks/gen_helm_tiller_certs.yml index 8c755e3b459f0b517ef94c4c44d7a3a92ffd0d9c..69d0cd2f93ef3b205cadb53c9e96b7227c1ac6da 100644 --- a/roles/kubernetes-apps/helm/tasks/gen_helm_tiller_certs.yml +++ b/roles/kubernetes-apps/helm/tasks/gen_helm_tiller_certs.yml @@ -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 diff --git a/roles/kubernetes/master/handlers/main.yml b/roles/kubernetes/master/handlers/main.yml index a2df028c636ccb16d04b920fc9ace16b607bf001..8e753e56aee298d5a62f7cf61e57ada6be3f0bca 100644 --- a/roles/kubernetes/master/handlers/main.yml +++ b/roles/kubernetes/master/handlers/main.yml @@ -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: diff --git a/roles/kubernetes/node/handlers/main.yml b/roles/kubernetes/node/handlers/main.yml index 00525b9954183c06ba91e335275024410d8be557..352a5a652180b6f848f860008d789941a0666ad7 100644 --- a/roles/kubernetes/node/handlers/main.yml +++ b/roles/kubernetes/node/handlers/main.yml @@ -6,7 +6,8 @@ - Kubelet | reload kubelet - name: Kubelet | reload systemd - command: systemctl daemon-reload + systemd: + daemon_reload: true - name: Kubelet | reload kubelet service: diff --git a/roles/kubernetes/preinstall/tasks/0070-system-packages.yml b/roles/kubernetes/preinstall/tasks/0070-system-packages.yml index c8ab5d1c2c61a77562421307ff20189bf5b72e65..65cacc656752e13b03e3025678ca46f6071b92ec 100644 --- a/roles/kubernetes/preinstall/tasks/0070-system-packages.yml +++ b/roles/kubernetes/preinstall/tasks/0070-system-packages.yml @@ -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 diff --git a/roles/network_plugin/calico/rr/handlers/main.yml b/roles/network_plugin/calico/rr/handlers/main.yml index cb166bda1da5b82106f51ec9ed9b210b6632cc50..1436649e357a92621d2bf631cefa708a4f7143d0 100644 --- a/roles/network_plugin/calico/rr/handlers/main.yml +++ b/roles/network_plugin/calico/rr/handlers/main.yml @@ -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: diff --git a/roles/network_plugin/cilium/handlers/main.yml b/roles/network_plugin/cilium/handlers/main.yml index 00525b9954183c06ba91e335275024410d8be557..352a5a652180b6f848f860008d789941a0666ad7 100644 --- a/roles/network_plugin/cilium/handlers/main.yml +++ b/roles/network_plugin/cilium/handlers/main.yml @@ -6,7 +6,8 @@ - Kubelet | reload kubelet - name: Kubelet | reload systemd - command: systemctl daemon-reload + systemd: + daemon_reload: true - name: Kubelet | reload kubelet service: diff --git a/roles/network_plugin/flannel/handlers/main.yml b/roles/network_plugin/flannel/handlers/main.yml index 00c5667b0d497c2d76e08cbdc882ae3f317304fa..a66cdadbcef67d2fb167a9d8f67d42f32c145c69 100644 --- a/roles/network_plugin/flannel/handlers/main.yml +++ b/roles/network_plugin/flannel/handlers/main.yml @@ -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: diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml index 98f3b51a3fde10b4445143c967be113c1a28e5e8..072ce27dc9e9d7b3409debdc271ae0eb8ae5e8d5 100644 --- a/roles/reset/tasks/main.yml +++ b/roles/reset/tasks/main.yml @@ -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