Use command when the tasks does not have any pipes or wilcards.
Signed-off-by: Sébastien Han <seb@redhat.com>
- 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:
# 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
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
# 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 \
- item.0.partitions|length == 0
- name: automatic prepare ceph containerized osd disk collocated
- shell: |
+ command: |
docker run --net=host \
--pid=host \
--privileged=true \
# 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 \
- 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 \