]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
lint: ignore 302,303,505 errors
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 18 Nov 2020 09:13:45 +0000 (10:13 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 23 Nov 2020 07:33:47 +0000 (08:33 +0100)
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 <gabrioux@redhat.com>
infrastructure-playbooks/cephadm-adopt.yml
infrastructure-playbooks/lv-create.yml
infrastructure-playbooks/lv-teardown.yml
infrastructure-playbooks/purge-cluster.yml
infrastructure-playbooks/purge-container-cluster.yml
infrastructure-playbooks/shrink-mds.yml
infrastructure-playbooks/shrink-mgr.yml
infrastructure-playbooks/shrink-rgw.yml
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index e25a08f9066a42a5d9396b69104781a8c66e576f..46b0f2f110f6ec50b5c1faee60fe4b0d55c4842f 100644 (file)
         CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
 
     - name: reset failed ceph-mon systemd unit
-      command: 'systemctl reset-failed ceph-mon@{{ ansible_hostname }}'
+      command: 'systemctl reset-failed ceph-mon@{{ ansible_hostname }}'  # noqa 303
       changed_when: false
       failed_when: false
       when: containerized_deployment | bool
         CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
 
     - name: reset failed ceph-mgr systemd unit
-      command: 'systemctl reset-failed ceph-mgr@{{ ansible_hostname }}'
+      command: 'systemctl reset-failed ceph-mgr@{{ ansible_hostname }}'  # noqa 303
       changed_when: false
       failed_when: false
       when: containerized_deployment | bool
       when: not containerized_deployment | bool
 
     - name: reset failed ceph-mds systemd unit
-      command: 'systemctl reset-failed ceph-mds@{{ ansible_hostname }}'
+      command: 'systemctl reset-failed ceph-mds@{{ ansible_hostname }}'  # noqa 303
       changed_when: false
       failed_when: false
       when: containerized_deployment | bool
       when: not containerized_deployment | bool
 
     - name: reset failed ceph-radosgw systemd unit
-      command: 'systemctl reset-failed ceph-radosgw@rgw.{{ ansible_hostname }}.{{ item.instance_name }}'
+      command: 'systemctl reset-failed ceph-radosgw@rgw.{{ ansible_hostname }}.{{ item.instance_name }}'  # noqa 303
       changed_when: false
       failed_when: false
       loop: '{{ rgw_instances }}'
       when: not containerized_deployment | bool
 
     - name: reset failed rbd-mirror systemd unit
-      command: 'systemctl reset-failed ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}'
+      command: 'systemctl reset-failed ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}'  # noqa 303
       changed_when: false
       failed_when: false
       when: containerized_deployment | bool
         - tcmu-runner
 
     - name: reset failed iscsigw systemd units
-      command: 'systemctl reset-failed {{ item }}'
+      command: 'systemctl reset-failed {{ item }}'  # noqa 303
       changed_when: false
       failed_when: false
       with_items:
index 629c95c18f922959cc5cd614c0bba2e38a03f011..220a8cb3499a405d13f0d9ab687653b1c370cd36 100644 (file)
@@ -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
index 4b2f0e55318f74e28a7fa56bdbca59cc1ae1595f..b9ea569cb72afc214f01327674ba8c9daace5239 100644 (file)
@@ -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
index 4d7a2e835978ad6732898a752fcd34e810b38e21..f571c62d6e7a9f62a07b2d25178c3a17faada0c9 100644 (file)
       delegate_to: localhost
 
   - name: remove data
-    shell: rm -rf /var/lib/ceph/*
+    shell: rm -rf /var/lib/ceph/*  # noqa 302
 
   tasks:
 
     listen: "remove data"
 
   - name: remove data
-    shell: rm -rf /var/lib/ceph/*
+    shell: rm -rf /var/lib/ceph/*  # noqa 302
     listen: "remove data"
 
   tasks:
       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
index a2fe68bf2c267a44e8f6a3ac311ee742531924bb..900c14ee2c375d1d71a717093f09d3cd34b6c199 100644 (file)
       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
       - "{{ 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
index 3c8aee3ecd05fb05ace160d53e531b03c9d37ab4..7c27a36c0f7bcc1d2fa5a866972dec80c79ada3f 100644 (file)
           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 }}"
index 2f77662fceb151e7e395204c9ec7b895facebf1a..02de185ecdeb2ed8f2e0ef28f217db682dd1d927 100644 (file)
           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 }}"
index 3131ef3f23f46702e5132f609c645c8d87ea95fc..7739628fb393c11ad353c692ab1c2aa3bc691135 100644 (file)
       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
index 8255aa90a2b5bb5c8d5f3fc958236f37a09b63ab..5ddd1b38c0aee7b5fb13483417bff23329977afd 100644 (file)
 
     # 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([]) }}"