lint: use command instead of shell

Use command when the tasks does not have any pipes or wilcards.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/3285/head
Sébastien Han 2018-10-30 17:16:05 +01:00 committed by Guillaume Abrioux
parent cfd60411bc
commit a882ad7ade
5 changed files with 7 additions and 8 deletions

View 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:

View 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

View 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

View 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 \

View 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 \