diff --git a/roles/ceph-common/tasks/facts_mon_fsid.yml b/roles/ceph-common/tasks/facts_mon_fsid.yml index ebb1a8a1b..157c384f3 100644 --- a/roles/ceph-common/tasks/facts_mon_fsid.yml +++ b/roles/ceph-common/tasks/facts_mon_fsid.yml @@ -1,24 +1,24 @@ --- -- name: check if /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring already exists +- name: check if /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring already exists stat: - path: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring + path: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring register: initial_mon_keyring -- name: fail if /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring doesn't exist +- name: fail if /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring doesn't exist fail: - msg: "/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring not found" + msg: "/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring not found" when: - not initial_mon_keyring.stat.exists - name: get existing initial mon keyring if it already exists but not monitor_keyring.conf in {{ fetch_directory }} shell: | - grep key /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring | sed 's/^.*= //' + grep key /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring | sed 's/^.*= //' register: monitor_keyring when: - not monitor_keyring_conf.stat.exists - name: test existing initial mon keyring - command: ceph --connect-timeout 3 --cluster {{ cluster }} --keyring /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring -n mon. fsid + command: ceph --connect-timeout 3 --cluster {{ cluster }} --keyring /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring -n mon. fsid changed_when: false register: test_initial_monitor_keyring ignore_errors: true diff --git a/roles/ceph-common/tasks/installs/configure_redhat_local_installation.yml b/roles/ceph-common/tasks/installs/configure_redhat_local_installation.yml index eebb61449..5edd179dc 100644 --- a/roles/ceph-common/tasks/installs/configure_redhat_local_installation.yml +++ b/roles/ceph-common/tasks/installs/configure_redhat_local_installation.yml @@ -14,7 +14,7 @@ - name: copy rundep copy: - src: "{{ansible_dir}}/rundep" + src: "{{ ansible_dir }}/rundep" dest: "{{ item }}" with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}" when: @@ -34,7 +34,7 @@ - name: synchronize ceph install synchronize: - src: "{{ceph_installation_dir}}/" + src: "{{ ceph_installation_dir }}/" dest: "/" - name: create user group ceph diff --git a/roles/ceph-common/tasks/installs/install_debian_packages.yml b/roles/ceph-common/tasks/installs/install_debian_packages.yml index 9302cfe12..fc14e01ac 100644 --- a/roles/ceph-common/tasks/installs/install_debian_packages.yml +++ b/roles/ceph-common/tasks/installs/install_debian_packages.yml @@ -4,4 +4,4 @@ name: "{{ debian_ceph_pkgs | unique }}" update_cache: no state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" - default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}" + default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else '' }}" diff --git a/roles/ceph-defaults/tasks/set_monitor_address.yml b/roles/ceph-defaults/tasks/set_monitor_address.yml index 271f5cf22..7ac15343a 100644 --- a/roles/ceph-defaults/tasks/set_monitor_address.yml +++ b/roles/ceph-defaults/tasks/set_monitor_address.yml @@ -45,6 +45,6 @@ - name: set_fact _current_monitor_address set_fact: - _current_monitor_address: "{{ item.addr }}" + _current_monitor_address: "{{ item.addr }}" with_items: "{{ _monitor_addresses }}" when: inventory_hostname == item.name \ No newline at end of file diff --git a/roles/ceph-docker-common/tasks/fetch_image.yml b/roles/ceph-docker-common/tasks/fetch_image.yml index 0144709fc..4f3e5c8c8 100644 --- a/roles/ceph-docker-common/tasks/fetch_image.yml +++ b/roles/ceph-docker-common/tasks/fetch_image.yml @@ -176,8 +176,8 @@ - nfs_group_name in group_names - ceph_nfs_container_inspect_before_pull.get('rc') == 0 -- name: "pulling {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} image" - command: "timeout {{ docker_pull_timeout }} docker pull {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" +- name: "pulling {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} image" + command: "timeout {{ docker_pull_timeout }} docker pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" changed_when: false register: docker_image until: docker_image.rc == 0 @@ -186,8 +186,8 @@ when: - (ceph_docker_dev_image is undefined or not ceph_docker_dev_image) -- name: "inspecting {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} image after pulling" - command: "docker inspect {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" +- name: "inspecting {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} image after pulling" + command: "docker inspect {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" changed_when: false failed_when: false register: image_inspect_after_pull diff --git a/roles/ceph-docker-common/tasks/main.yml b/roles/ceph-docker-common/tasks/main.yml index e04450409..c30b0a89f 100644 --- a/roles/ceph-docker-common/tasks/main.yml +++ b/roles/ceph-docker-common/tasks/main.yml @@ -82,7 +82,7 @@ - fetch_container_image - name: get ceph version - command: docker run --rm --entrypoint /usr/bin/ceph {{ ceph_client_docker_registry}}/{{ ceph_client_docker_image }}:{{ ceph_client_docker_image_tag }} --version + command: docker run --rm --entrypoint /usr/bin/ceph {{ ceph_client_docker_registry }}/{{ ceph_client_docker_image }}:{{ ceph_client_docker_image_tag }} --version changed_when: false check_mode: no register: ceph_version diff --git a/roles/ceph-iscsi-gw/tasks/common.yml b/roles/ceph-iscsi-gw/tasks/common.yml index 9f54ebde2..2d672c260 100644 --- a/roles/ceph-iscsi-gw/tasks/common.yml +++ b/roles/ceph-iscsi-gw/tasks/common.yml @@ -42,7 +42,7 @@ delegate_to: "{{ groups[mon_group_name][0] }}" - name: create a rbd pool if it doesn't exist - command: "{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd pool create rbd {{ (osd_pool_default_pg_num.stdout | from_json).osd_pool_default_pg_num }}" + command: "{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd pool create rbd {{ (osd_pool_default_pg_num.stdout | from_json).osd_pool_default_pg_num }}" changed_when: false delegate_to: "{{ groups[mon_group_name][0] }}" diff --git a/roles/ceph-mds/tasks/non_containerized.yml b/roles/ceph-mds/tasks/non_containerized.yml index e99d1e7eb..3546dd646 100644 --- a/roles/ceph-mds/tasks/non_containerized.yml +++ b/roles/ceph-mds/tasks/non_containerized.yml @@ -3,7 +3,7 @@ apt: name: ceph-mds state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" - default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}" + default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else '' }}" when: - mds_group_name in group_names - ansible_os_family == 'Debian' diff --git a/roles/ceph-mgr/tasks/pre_requisite.yml b/roles/ceph-mgr/tasks/pre_requisite.yml index fbe76c8d8..21d604897 100644 --- a/roles/ceph-mgr/tasks/pre_requisite.yml +++ b/roles/ceph-mgr/tasks/pre_requisite.yml @@ -10,7 +10,7 @@ apt: name: ceph-mgr state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" - default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}" + default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else '' }}" when: - ansible_os_family == 'Debian' diff --git a/roles/ceph-nfs/tasks/create_rgw_nfs_user.yml b/roles/ceph-nfs/tasks/create_rgw_nfs_user.yml index 73f6e3690..2df847908 100644 --- a/roles/ceph-nfs/tasks/create_rgw_nfs_user.yml +++ b/roles/ceph-nfs/tasks/create_rgw_nfs_user.yml @@ -6,7 +6,7 @@ - containerized_deployment - name: check if "{{ ceph_nfs_rgw_user }}" exists - command: "{{ docker_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user info --uid={{ ceph_nfs_rgw_user }}" + command: "{{ docker_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user info --uid={{ ceph_nfs_rgw_user }}" run_once: true register: rgwuser_exists changed_when: false @@ -16,7 +16,7 @@ - nfs_obj_gw - name: create rgw nfs user "{{ ceph_nfs_rgw_user }}" - command: "{{ docker_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user create --uid={{ ceph_nfs_rgw_user }} --display-name='RGW NFS User'" + command: "{{ docker_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user create --uid={{ ceph_nfs_rgw_user }} --display-name='RGW NFS User'" run_once: true register: rgwuser changed_when: false diff --git a/roles/ceph-rgw/handlers/main.yml b/roles/ceph-rgw/handlers/main.yml index f4b6318ca..129078767 100644 --- a/roles/ceph-rgw/handlers/main.yml +++ b/roles/ceph-rgw/handlers/main.yml @@ -1,6 +1,6 @@ --- - name: update period - command: "{{ docker_exec_cmd }} radosgw-admin --cluster {{ cluster }} period update --commit" + command: "{{ docker_exec_cmd }} radosgw-admin --cluster {{ cluster }} period update --commit" delegate_to: "{{ groups[mon_group_name][0] }}" run_once: true diff --git a/roles/ceph-rgw/tasks/main.yml b/roles/ceph-rgw/tasks/main.yml index 2d62cb372..729e4cb93 100644 --- a/roles/ceph-rgw/tasks/main.yml +++ b/roles/ceph-rgw/tasks/main.yml @@ -27,7 +27,7 @@ - rgw_create_pools is defined block: - name: create rgw pools if rgw_create_pools is defined - command: "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num }}" + command: "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num }}" changed_when: false with_dict: "{{ rgw_create_pools }}" delegate_to: "{{ groups[mon_group_name][0] }}" diff --git a/site-docker.yml.sample b/site-docker.yml.sample index 7d46c670c..7c230626b 100644 --- a/site-docker.yml.sample +++ b/site-docker.yml.sample @@ -74,7 +74,7 @@ # post-tasks for upcoming import - - name: "pull {{ ceph_docker_image }} image" - command: "docker pull {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" + command: "docker pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" changed_when: false when: - is_atomic