From ba312a5b5d25d57cf0722d491a9646e3e30499f9 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 18 Nov 2020 10:13:45 +0100 Subject: [PATCH] lint: ignore 302,303,505 errors ignore 302,303 and 505 errors [302] Using command rather than an argument to e.g. file [303] Using command rather than module [505] referenced files must exist they aren't relevant on these tasks. Signed-off-by: Guillaume Abrioux (cherry picked from commit 195d88fcda60e28e246245a1bf566b6e412b2ab3) --- infrastructure-playbooks/lv-create.yml | 2 +- infrastructure-playbooks/lv-teardown.yml | 2 +- infrastructure-playbooks/purge-cluster.yml | 6 +++--- infrastructure-playbooks/purge-container-cluster.yml | 7 +++---- infrastructure-playbooks/shrink-mds.yml | 2 +- infrastructure-playbooks/shrink-mgr.yml | 2 +- infrastructure-playbooks/shrink-rgw.yml | 2 +- ...rom-non-containerized-to-containerized-ceph-daemons.yml | 2 +- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/infrastructure-playbooks/lv-create.yml b/infrastructure-playbooks/lv-create.yml index 629c95c18..220a8cb34 100644 --- a/infrastructure-playbooks/lv-create.yml +++ b/infrastructure-playbooks/lv-create.yml @@ -23,7 +23,7 @@ - name: include vars of lv_vars.yaml include_vars: - file: lv_vars.yaml + file: lv_vars.yaml # noqa 505 failed_when: false # ensure nvme_device is set diff --git a/infrastructure-playbooks/lv-teardown.yml b/infrastructure-playbooks/lv-teardown.yml index 4b2f0e553..b9ea569cb 100644 --- a/infrastructure-playbooks/lv-teardown.yml +++ b/infrastructure-playbooks/lv-teardown.yml @@ -20,7 +20,7 @@ - name: include vars of lv_vars.yaml include_vars: - file: lv_vars.yaml + file: lv_vars.yaml # noqa 505 failed_when: false # need to check if lvm2 is installed diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index d8c625bec..11b9b420f 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -375,7 +375,7 @@ delegate_to: localhost - name: remove data - shell: rm -rf /var/lib/ceph/* + shell: rm -rf /var/lib/ceph/* # noqa 302 tasks: @@ -735,7 +735,7 @@ listen: "remove data" - name: remove data - shell: rm -rf /var/lib/ceph/* + shell: rm -rf /var/lib/ceph/* # noqa 302 listen: "remove data" tasks: @@ -838,7 +838,7 @@ state: absent - name: clean apt - command: apt-get clean + command: apt-get clean # noqa 303 when: ansible_pkg_mgr == 'apt' - name: purge ceph repo file in /etc/yum.repos.d diff --git a/infrastructure-playbooks/purge-container-cluster.yml b/infrastructure-playbooks/purge-container-cluster.yml index d4de370e3..8005970a7 100644 --- a/infrastructure-playbooks/purge-container-cluster.yml +++ b/infrastructure-playbooks/purge-container-cluster.yml @@ -267,8 +267,7 @@ name: ceph-facts - name: get all the running osds - shell: | - systemctl list-units --all | grep -oE "ceph-osd@([0-9]+).service" + shell: systemctl list-units --all | grep -oE "ceph-osd@([0-9]+).service" # noqa 303 register: osd_units changed_when: false ignore_errors: true @@ -666,13 +665,13 @@ - "{{ ceph_osd_docker_run_script_path | default('/usr/share') }}/ceph-osd-run.sh" - name: remove ceph data - shell: rm -rf /var/lib/ceph/* + shell: rm -rf /var/lib/ceph/* # noqa 302 changed_when: false # (todo): remove this when we are able to manage docker # service on atomic host. - name: remove docker data - shell: rm -rf /var/lib/docker/* + shell: rm -rf /var/lib/docker/* # noqa 302 when: not is_atomic | bool - name: purge fetch directory diff --git a/infrastructure-playbooks/shrink-mds.yml b/infrastructure-playbooks/shrink-mds.yml index 9c84b3518..3441e1960 100644 --- a/infrastructure-playbooks/shrink-mds.yml +++ b/infrastructure-playbooks/shrink-mds.yml @@ -111,7 +111,7 @@ failed_when: false - name: ensure that the mds is stopped - command: "systemctl is-active ceph-mds@{{ mds_to_kill_hostname }}" + command: "systemctl is-active ceph-mds@{{ mds_to_kill_hostname }}" # noqa 303 register: mds_to_kill_status failed_when: mds_to_kill_status.rc == 0 delegate_to: "{{ mds_to_kill }}" diff --git a/infrastructure-playbooks/shrink-mgr.yml b/infrastructure-playbooks/shrink-mgr.yml index 2f77662fc..02de185ec 100644 --- a/infrastructure-playbooks/shrink-mgr.yml +++ b/infrastructure-playbooks/shrink-mgr.yml @@ -106,7 +106,7 @@ failed_when: false - name: ensure that the mgr is stopped - command: "systemctl is-active ceph-mgr@{{ mgr_to_kill_hostname }}" + command: "systemctl is-active ceph-mgr@{{ mgr_to_kill_hostname }}" # noqa 303 register: mgr_to_kill_status failed_when: mgr_to_kill_status.rc == 0 delegate_to: "{{ mgr_to_kill }}" diff --git a/infrastructure-playbooks/shrink-rgw.yml b/infrastructure-playbooks/shrink-rgw.yml index 3131ef3f2..7739628fb 100644 --- a/infrastructure-playbooks/shrink-rgw.yml +++ b/infrastructure-playbooks/shrink-rgw.yml @@ -106,7 +106,7 @@ failed_when: false - name: ensure that the rgw is stopped - command: "systemctl is-active ceph-radosgw@rgw.{{ rgw_to_kill }}" + command: "systemctl is-active ceph-radosgw@rgw.{{ rgw_to_kill }}" # noqa 303 register: rgw_to_kill_status failed_when: rgw_to_kill_status.rc == 0 changed_when: false diff --git a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml index 7abbb0004..46b2b24da 100644 --- a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml +++ b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml @@ -248,7 +248,7 @@ # systemd module does not support --runtime option - name: disable ceph-osd@.service runtime-enabled - command: "systemctl disable --runtime {{ item }}" + command: "systemctl disable --runtime {{ item }}" # noqa 303 changed_when: false failed_when: false with_items: "{{ running_osds.stdout_lines | default([]) }}" -- 2.39.5