]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
lint: use command instead of shell
authorSébastien Han <seb@redhat.com>
Tue, 30 Oct 2018 16:16:05 +0000 (17:16 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 31 Oct 2018 13:18:36 +0000 (14:18 +0100)
Use command when the tasks does not have any pipes or wilcards.

Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-iscsi-gw/tasks/deploy_ssl_keys.yml
roles/ceph-mon/tasks/set_osd_pool_default_pg_num.yml
roles/ceph-nfs/tasks/start_nfs.yml
roles/ceph-osd/tasks/scenarios/collocated.yml
roles/ceph-osd/tasks/scenarios/non-collocated.yml

index 468270eafa3d2c8be68657ff3490e1e786014f55..f4979f2cbc839309d9e3b63752428918a50a2b9a 100644 (file)
@@ -19,7 +19,7 @@
 
 - name: create ssl crt/key files
   local_action:
-    module: shell openssl req -newkey rsa:2048 -nodes -keyout {{ fetch_directory }}/{{ fsid }}/iscsi-gateway.key -x509 -days 365 -out {{ fetch_directory }}/{{ fsid }}/iscsi-gateway.crt -subj "/C=US/ST=./L=./O=RedHat/OU=Linux/CN={{ ansible_hostname }}"
+    module: command openssl req -newkey rsa:2048 -nodes -keyout {{ fetch_directory }}/{{ fsid }}/iscsi-gateway.key -x509 -days 365 -out {{ fetch_directory }}/{{ fsid }}/iscsi-gateway.crt -subj "/C=US/ST=./L=./O=RedHat/OU=Linux/CN={{ ansible_hostname }}"
   run_once: True
   with_items: "{{ crt_files_exist.results }}"
   when:
index f9a3c206fbf2f0a6412f18e23a9f23923b310b09..a620970309213ca55cdc0c053fb432d28bf68070 100644 (file)
@@ -3,8 +3,7 @@
 # the same behaviour
 #
 - name: get default value for osd_pool_default_pg_num
-  shell: |
-   {{ docker_exec_cmd }} ceph --cluster {{ cluster }} daemon mon.{{ monitor_name }} config get osd_pool_default_pg_num
+  command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} daemon mon.{{ monitor_name }} config get osd_pool_default_pg_num"
   failed_when: false
   changed_when: false
   run_once: true
index 53850bb0e5f5a0e9ff7945709a7219ef22840f5e..11ec5e76359159b0e35ce3e414d6e33af75baf7f 100644 (file)
@@ -17,7 +17,7 @@
   run_once: true
 
 - name: create an empty rados index object
-  shell: "{{ docker_exec_cmd_nfs | default('') }} rados -p {{ cephfs_data }} --cluster {{ cluster }} put {{ ceph_nfs_rados_export_index }} /dev/null"
+  command: "{{ docker_exec_cmd_nfs | default('') }} rados -p {{ cephfs_data }} --cluster {{ cluster }} put {{ ceph_nfs_rados_export_index }} /dev/null"
   when:
     - ceph_nfs_rados_backend
     - rados_index_exists.rc != 0
index 51354c3eeee262dde605988fa7e0f7b46be70fde..5c99309cff4b382f867a25205e35ef5e5b71c819 100644 (file)
@@ -3,7 +3,7 @@
 # to ensure osd disk prepare finishes before
 # starting the next task
 - name: prepare ceph containerized osd disk collocated
-  shell: |
+  command: |
     docker run --net=host \
     --pid=host \
     --privileged=true \
@@ -28,7 +28,7 @@
     - item.0.partitions|length == 0
 
 - name: automatic prepare ceph containerized osd disk collocated
-  shell: |
+  command: |
     docker run --net=host \
     --pid=host \
     --privileged=true \
index 92b09d3ce67a131d367f039f8f36810e2f445ef2..aa9a862beea316cc779dc93c9cbe34312adfd650 100644 (file)
@@ -3,7 +3,7 @@
 # to ensure osd disk prepare finishes before
 # starting the next task
 - name: prepare ceph "{{ osd_objectstore }}" containerized osd disk(s) non-collocated
-  shell: |
+  command: |
     docker run --net=host \
     --pid=host \
     --privileged=true \
@@ -30,7 +30,7 @@
     - item.0.partitions|length == 0
 
 - name: prepare ceph "{{ osd_objectstore }}" containerized osd disk(s) non-collocated with a dedicated device for db and wal
-  shell: |
+  command: |
     docker run --net=host \
     --pid=host \
     --privileged=true \