mirror of https://github.com/ceph/ceph-ansible.git
lint: yaml space before and after {{ }}
Fix tasks using variables that did not have space before and after {{ }} Signed-off-by: Sébastien Han <seb@redhat.com>pull/3311/head
parent
1f8d58002c
commit
2cd0d2f1e6
|
@ -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:
|
stat:
|
||||||
path: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring
|
path: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring
|
||||||
register: initial_mon_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:
|
fail:
|
||||||
msg: "/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring not found"
|
msg: "/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring not found"
|
||||||
when:
|
when:
|
||||||
- not initial_mon_keyring.stat.exists
|
- not initial_mon_keyring.stat.exists
|
||||||
|
|
||||||
- name: get existing initial mon keyring if it already exists but not monitor_keyring.conf in {{ fetch_directory }}
|
- name: get existing initial mon keyring if it already exists but not monitor_keyring.conf in {{ fetch_directory }}
|
||||||
shell: |
|
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
|
register: monitor_keyring
|
||||||
when:
|
when:
|
||||||
- not monitor_keyring_conf.stat.exists
|
- not monitor_keyring_conf.stat.exists
|
||||||
|
|
||||||
- name: test existing initial mon keyring
|
- 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
|
changed_when: false
|
||||||
register: test_initial_monitor_keyring
|
register: test_initial_monitor_keyring
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
- name: copy rundep
|
- name: copy rundep
|
||||||
copy:
|
copy:
|
||||||
src: "{{ansible_dir}}/rundep"
|
src: "{{ ansible_dir }}/rundep"
|
||||||
dest: "{{ item }}"
|
dest: "{{ item }}"
|
||||||
with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
|
with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
|
||||||
when:
|
when:
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
- name: synchronize ceph install
|
- name: synchronize ceph install
|
||||||
synchronize:
|
synchronize:
|
||||||
src: "{{ceph_installation_dir}}/"
|
src: "{{ ceph_installation_dir }}/"
|
||||||
dest: "/"
|
dest: "/"
|
||||||
|
|
||||||
- name: create user group ceph
|
- name: create user group ceph
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
name: "{{ debian_ceph_pkgs | unique }}"
|
name: "{{ debian_ceph_pkgs | unique }}"
|
||||||
update_cache: no
|
update_cache: no
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
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 '' }}"
|
||||||
|
|
|
@ -45,6 +45,6 @@
|
||||||
|
|
||||||
- name: set_fact _current_monitor_address
|
- name: set_fact _current_monitor_address
|
||||||
set_fact:
|
set_fact:
|
||||||
_current_monitor_address: "{{ item.addr }}"
|
_current_monitor_address: "{{ item.addr }}"
|
||||||
with_items: "{{ _monitor_addresses }}"
|
with_items: "{{ _monitor_addresses }}"
|
||||||
when: inventory_hostname == item.name
|
when: inventory_hostname == item.name
|
|
@ -176,8 +176,8 @@
|
||||||
- nfs_group_name in group_names
|
- nfs_group_name in group_names
|
||||||
- ceph_nfs_container_inspect_before_pull.get('rc') == 0
|
- ceph_nfs_container_inspect_before_pull.get('rc') == 0
|
||||||
|
|
||||||
- name: "pulling {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} image"
|
- 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 }}"
|
command: "timeout {{ docker_pull_timeout }} docker pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: docker_image
|
register: docker_image
|
||||||
until: docker_image.rc == 0
|
until: docker_image.rc == 0
|
||||||
|
@ -186,8 +186,8 @@
|
||||||
when:
|
when:
|
||||||
- (ceph_docker_dev_image is undefined or not ceph_docker_dev_image)
|
- (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"
|
- 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 }}"
|
command: "docker inspect {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: image_inspect_after_pull
|
register: image_inspect_after_pull
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
- fetch_container_image
|
- fetch_container_image
|
||||||
|
|
||||||
- name: get ceph version
|
- 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
|
changed_when: false
|
||||||
check_mode: no
|
check_mode: no
|
||||||
register: ceph_version
|
register: ceph_version
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
|
||||||
- name: create a rbd pool if it doesn't exist
|
- 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
|
changed_when: false
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
apt:
|
apt:
|
||||||
name: ceph-mds
|
name: ceph-mds
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
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:
|
when:
|
||||||
- mds_group_name in group_names
|
- mds_group_name in group_names
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
apt:
|
apt:
|
||||||
name: ceph-mgr
|
name: ceph-mgr
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
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:
|
when:
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
- containerized_deployment
|
- containerized_deployment
|
||||||
|
|
||||||
- name: check if "{{ ceph_nfs_rgw_user }}" exists
|
- 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
|
run_once: true
|
||||||
register: rgwuser_exists
|
register: rgwuser_exists
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
- nfs_obj_gw
|
- nfs_obj_gw
|
||||||
|
|
||||||
- name: create rgw nfs user "{{ ceph_nfs_rgw_user }}"
|
- 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
|
run_once: true
|
||||||
register: rgwuser
|
register: rgwuser
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: update period
|
- 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] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
- rgw_create_pools is defined
|
- rgw_create_pools is defined
|
||||||
block:
|
block:
|
||||||
- name: create rgw pools if rgw_create_pools is defined
|
- 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
|
changed_when: false
|
||||||
with_dict: "{{ rgw_create_pools }}"
|
with_dict: "{{ rgw_create_pools }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
|
|
||||||
# post-tasks for upcoming import -
|
# post-tasks for upcoming import -
|
||||||
- name: "pull {{ ceph_docker_image }} image"
|
- 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
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- is_atomic
|
- is_atomic
|
||||||
|
|
Loading…
Reference in New Issue