From 87d53fea08d270830da2032f05daff20305d3ae2 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 2 Oct 2020 13:05:01 +0200 Subject: [PATCH] lint: variables should have spaces before and after Fix ansible lint 206 error: [206] Variables should have spaces before and after: {{ var_name }} Signed-off-by: Guillaume Abrioux (cherry picked from commit 9fba6eecfa5de7415ebe6ba6a1ab496412de8eed) --- infrastructure-playbooks/purge-cluster.yml | 4 ++-- infrastructure-playbooks/purge-iscsi-gateways.yml | 2 +- infrastructure-playbooks/shrink-mgr.yml | 2 +- infrastructure-playbooks/shrink-osd.yml | 2 +- infrastructure-playbooks/shrink-rgw.yml | 2 +- ...h-from-non-containerized-to-containerized-ceph-daemons.yml | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index 3320a5c9e..8f503a54e 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -270,7 +270,7 @@ - name: stop ceph mgrs with systemd service: - name: ceph-mgr@{{ ansible_hostname}} + name: ceph-mgr@{{ ansible_hostname }} state: stopped enabled: no failed_when: false @@ -396,7 +396,7 @@ - name: stop ceph-osd with systemd service: - name: ceph-osd@{{item}} + name: ceph-osd@{{ item }} state: stopped enabled: no with_items: "{{ osd_ids.stdout_lines }}" diff --git a/infrastructure-playbooks/purge-iscsi-gateways.yml b/infrastructure-playbooks/purge-iscsi-gateways.yml index 96b632a9e..9c478736e 100644 --- a/infrastructure-playbooks/purge-iscsi-gateways.yml +++ b/infrastructure-playbooks/purge-iscsi-gateways.yml @@ -24,7 +24,7 @@ - iscsigws become: yes vars: - - igw_purge_type: "{{hostvars['localhost']['igw_purge_type']}}" + - igw_purge_type: "{{ hostvars['localhost']['igw_purge_type'] }}" tasks: - name: stopping and disabling iscsi daemons diff --git a/infrastructure-playbooks/shrink-mgr.yml b/infrastructure-playbooks/shrink-mgr.yml index c4fbc0f90..2f77662fc 100644 --- a/infrastructure-playbooks/shrink-mgr.yml +++ b/infrastructure-playbooks/shrink-mgr.yml @@ -52,7 +52,7 @@ - name: get total number of mgrs in cluster block: - name: save mgr dump output - command: "{{ container_exec_cmd | default('') }} ceph --cluster {{cluster}} mgr dump -f json" + command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} mgr dump -f json" register: mgr_dump - name: get active and standbys mgr list diff --git a/infrastructure-playbooks/shrink-osd.yml b/infrastructure-playbooks/shrink-osd.yml index c2d7dddb2..9c0454db6 100644 --- a/infrastructure-playbooks/shrink-osd.yml +++ b/infrastructure-playbooks/shrink-osd.yml @@ -180,7 +180,7 @@ - name: add pkname information in ceph_osd_data_json set_fact: - ceph_osd_data_json: "{{ ceph_osd_data_json | default({}) | combine({item.item[2]: {'pkname_data': '/dev/' + item.stdout}}, recursive=True) }}" + ceph_osd_data_json: "{{ ceph_osd_data_json | default({}) | combine({item.item[2]: {'pkname_data': '/dev/' + item.stdout }}, recursive=True) }}" loop: "{{ parent_device_data_part.results }}" when: item.skipped is undefined diff --git a/infrastructure-playbooks/shrink-rgw.yml b/infrastructure-playbooks/shrink-rgw.yml index 219ae310d..8c0902b6a 100644 --- a/infrastructure-playbooks/shrink-rgw.yml +++ b/infrastructure-playbooks/shrink-rgw.yml @@ -133,5 +133,5 @@ delegate_to: "{{ rgw_host }}" post_tasks: - name: show ceph health - command: "{{ container_exec_cmd | default('')}} ceph --cluster {{ cluster }} -s" + command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} -s" 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 199169ac3..7abbb0004 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 @@ -251,7 +251,7 @@ command: "systemctl disable --runtime {{ item }}" changed_when: false failed_when: false - with_items: "{{ running_osds.stdout_lines | default([])}}" + with_items: "{{ running_osds.stdout_lines | default([]) }}" when: item.startswith('ceph-osd@') - name: stop/disable/mask non-containerized ceph osd(s) (if any) @@ -259,7 +259,7 @@ name: "{{ item }}" state: stopped enabled: no - with_items: "{{ running_osds.stdout_lines | default([])}}" + with_items: "{{ running_osds.stdout_lines | default([]) }}" when: running_osds != [] - name: disable ceph.target