mirror of https://github.com/ceph/ceph-ansible.git
add missing boolean filter
Otherwise this will generate an ansible warning about the missing filter. [DEPRECATION WARNING]: evaluating xxx as a bare variable, this behaviour will go away and you might need to add |bool to the expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle.. This feature will be removed in version 2.12. Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>pull/5858/head
parent
bf7b044c9a
commit
50104650e7
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
- name: set_fact container_run_cmd
|
- name: set_fact container_run_cmd
|
||||||
set_fact:
|
set_fact:
|
||||||
container_run_cmd: "{{ container_binary + ' run --rm --privileged=true --net=host --pid=host --ipc=host -v /dev:/dev -v /etc/ceph:/etc/ceph -v /var/lib/ceph:/var/lib/ceph -v /var/run:/var/run --entrypoint=' if containerized_deployment else '' }}ceph-volume {{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else '' }}"
|
container_run_cmd: "{{ container_binary + ' run --rm --privileged=true --net=host --pid=host --ipc=host -v /dev:/dev -v /etc/ceph:/etc/ceph -v /var/lib/ceph:/var/lib/ceph -v /var/run:/var/run --entrypoint=' if containerized_deployment | bool else '' }}ceph-volume {{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else '' }}"
|
||||||
|
|
||||||
- name: get ceph-volume lvm inventory data
|
- name: get ceph-volume lvm inventory data
|
||||||
command: "{{ container_run_cmd }} --cluster {{ cluster }} inventory --format json"
|
command: "{{ container_run_cmd }} --cluster {{ cluster }} inventory --format json"
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
destroy: false
|
destroy: false
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
loop: "{{ osd_fsid_list }}"
|
loop: "{{ osd_fsid_list }}"
|
||||||
when: osd_fsid_list is defined
|
when: osd_fsid_list is defined
|
||||||
|
@ -230,7 +230,7 @@
|
||||||
destroy: true
|
destroy: true
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
loop: "{{ osd_fsid_list }}"
|
loop: "{{ osd_fsid_list }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -154,8 +154,8 @@
|
||||||
- name: ensure /var/lib/ceph/bootstrap-rbd-mirror is present
|
- name: ensure /var/lib/ceph/bootstrap-rbd-mirror is present
|
||||||
file:
|
file:
|
||||||
path: /var/lib/ceph/bootstrap-rbd-mirror
|
path: /var/lib/ceph/bootstrap-rbd-mirror
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: '755'
|
mode: '755'
|
||||||
state: directory
|
state: directory
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
- ['bootstrap-rbd', 'bootstrap-rbd-mirror']
|
- ['bootstrap-rbd', 'bootstrap-rbd-mirror']
|
||||||
- "{{ groups[mon_group_name] }}" # so the key goes on all the nodes
|
- "{{ groups[mon_group_name] }}" # so the key goes on all the nodes
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
when:
|
when:
|
||||||
- cephx | bool
|
- cephx | bool
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
|
|
||||||
- name: set_fact container_run_cmd
|
- name: set_fact container_run_cmd
|
||||||
set_fact:
|
set_fact:
|
||||||
container_run_cmd: "{{ container_binary + ' run --rm --privileged=true --net=host --pid=host --ipc=host -v /dev:/dev -v /etc/ceph:/etc/ceph -v /var/lib/ceph:/var/lib/ceph -v /var/run:/var/run --entrypoint=' if containerized_deployment else '' }}ceph-volume {{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else '' }}"
|
container_run_cmd: "{{ container_binary + ' run --rm --privileged=true --net=host --pid=host --ipc=host -v /dev:/dev -v /etc/ceph:/etc/ceph -v /var/lib/ceph:/var/lib/ceph -v /var/run:/var/run --entrypoint=' if containerized_deployment | bool else '' }}ceph-volume {{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else '' }}"
|
||||||
|
|
||||||
- name: exit playbook, if can not connect to the cluster
|
- name: exit playbook, if can not connect to the cluster
|
||||||
command: "{{ container_exec_cmd }} timeout 5 ceph --cluster {{ cluster }} health"
|
command: "{{ container_exec_cmd }} timeout 5 ceph --cluster {{ cluster }} health"
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
osd_fsid: "{{ item.1 }}"
|
osd_fsid: "{{ item.1 }}"
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
delegate_to: "{{ item.0 }}"
|
delegate_to: "{{ item.0 }}"
|
||||||
loop: "{{ _osd_hosts }}"
|
loop: "{{ _osd_hosts }}"
|
||||||
|
|
|
@ -29,5 +29,5 @@
|
||||||
action: "inventory"
|
action: "inventory"
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
dest: "{{ ceph_conf_key_directory }}"
|
dest: "{{ ceph_conf_key_directory }}"
|
||||||
import_key: "{{ admin_key_presence }}"
|
import_key: "{{ admin_key_presence }}"
|
||||||
mode: "{{ item.mode|default(omit) }}"
|
mode: "{{ item.mode|default(omit) }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ keys }}"
|
- "{{ keys }}"
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
target_size_ratio: "{{ item.target_size_ratio | default(omit) }}"
|
target_size_ratio: "{{ item.target_size_ratio | default(omit) }}"
|
||||||
application: "{{ item.application | default(omit) }}"
|
application: "{{ item.application | default(omit) }}"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
with_items: "{{ pools }}"
|
with_items: "{{ pools }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.item.path }}"
|
dest: "{{ item.item.path }}"
|
||||||
content: "{{ item.stdout + '\n' }}"
|
content: "{{ item.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ _client_keys.results }}"
|
with_items: "{{ _client_keys.results }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
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('') if ceph_origin == 'repository' and ceph_repository == 'uca' else '' }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else '' }}"
|
default_release: "{{ ceph_stable_release_uca | default('') if ceph_origin == 'repository' and ceph_repository == 'uca' else '' }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports | bool else '' }}"
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
- name: copy red hat storage iso content for redhat systems
|
- name: copy red hat storage iso content for redhat systems
|
||||||
shell: cp -r {{ ceph_rhcs_mount_path }}/* {{ ceph_rhcs_repository_path }}
|
shell: cp -r {{ ceph_rhcs_mount_path }}/* {{ ceph_rhcs_repository_path }}
|
||||||
args:
|
args:
|
||||||
creates: "{{ ceph_rhcs_repository_path+'/README' if not rolling_update else 'dummy' }}"
|
creates: "{{ ceph_rhcs_repository_path+'/README' if not rolling_update | bool else 'dummy' }}"
|
||||||
|
|
||||||
- name: unmount red hat storage iso file for redhat systems
|
- name: unmount red hat storage iso file for redhat systems
|
||||||
mount:
|
mount:
|
||||||
|
|
|
@ -6,12 +6,12 @@ debian_ceph_pkgs:
|
||||||
- "ceph-common"
|
- "ceph-common"
|
||||||
- "{{ ((ceph_repository == 'rhcs') and (mon_group_name in group_names)) | ternary('ceph-mon', 'ceph-common') }}"
|
- "{{ ((ceph_repository == 'rhcs') and (mon_group_name in group_names)) | ternary('ceph-mon', 'ceph-common') }}"
|
||||||
- "{{ ((ceph_repository == 'rhcs') and (osd_group_name in group_names)) | ternary('ceph-osd', 'ceph-common') }}"
|
- "{{ ((ceph_repository == 'rhcs') and (osd_group_name in group_names)) | ternary('ceph-osd', 'ceph-common') }}"
|
||||||
- "{{ (ceph_test) | ternary('ceph-test', 'ceph-common') }}"
|
- "{{ (ceph_test | bool) | ternary('ceph-test', 'ceph-common') }}"
|
||||||
- "{{ (rgw_group_name in group_names) | ternary('radosgw', 'ceph-common') }}"
|
- "{{ (rgw_group_name in group_names) | ternary('radosgw', 'ceph-common') }}"
|
||||||
- "{{ ((ceph_repository == 'rhcs') and (client_group_name in group_names)) | ternary('ceph-fuse', 'ceph-common') }}"
|
- "{{ ((ceph_repository == 'rhcs') and (client_group_name in group_names)) | ternary('ceph-fuse', 'ceph-common') }}"
|
||||||
|
|
||||||
redhat_ceph_pkgs:
|
redhat_ceph_pkgs:
|
||||||
- "{{ (ceph_test) | ternary('ceph-test', 'ceph-common') }}"
|
- "{{ (ceph_test | bool) | ternary('ceph-test', 'ceph-common') }}"
|
||||||
- "ceph-common"
|
- "ceph-common"
|
||||||
- "{{ (mon_group_name in group_names) | ternary('ceph-mon', 'ceph-common') }}"
|
- "{{ (mon_group_name in group_names) | ternary('ceph-mon', 'ceph-common') }}"
|
||||||
- "{{ (osd_group_name in group_names) | ternary('ceph-osd', 'ceph-common') }}"
|
- "{{ (osd_group_name in group_names) | ternary('ceph-osd', 'ceph-common') }}"
|
||||||
|
@ -20,7 +20,7 @@ redhat_ceph_pkgs:
|
||||||
- "{{ (rgw_group_name in group_names) | ternary('ceph-radosgw', 'ceph-common') }}"
|
- "{{ (rgw_group_name in group_names) | ternary('ceph-radosgw', 'ceph-common') }}"
|
||||||
|
|
||||||
suse_ceph_pkgs:
|
suse_ceph_pkgs:
|
||||||
- "{{ (ceph_test) | ternary('ceph-test', 'ceph-common') }}"
|
- "{{ (ceph_test | bool) | ternary('ceph-test', 'ceph-common') }}"
|
||||||
- "ceph-common"
|
- "ceph-common"
|
||||||
- "{{ (mon_group_name in group_names) | ternary('ceph-mon', 'ceph-common') }}"
|
- "{{ (mon_group_name in group_names) | ternary('ceph-mon', 'ceph-common') }}"
|
||||||
- "{{ (osd_group_name in group_names) | ternary('ceph-osd', 'ceph-common') }}"
|
- "{{ (osd_group_name in group_names) | ternary('ceph-osd', 'ceph-common') }}"
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
register: rejected_devices
|
register: rejected_devices
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
PYTHONIOENCODING: utf-8
|
PYTHONIOENCODING: utf-8
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
register: lvm_batch_report
|
register: lvm_batch_report
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
PYTHONIOENCODING: utf-8
|
PYTHONIOENCODING: utf-8
|
||||||
when: _devices | default([]) | length > 0
|
when: _devices | default([]) | length > 0
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
register: lvm_list
|
register: lvm_list
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
PYTHONIOENCODING: utf-8
|
PYTHONIOENCODING: utf-8
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
file:
|
file:
|
||||||
path: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}.{{ item.instance_name }}"
|
path: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}.{{ item.instance_name }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_directories_mode | default('0755') }}"
|
mode: "{{ ceph_directories_mode | default('0755') }}"
|
||||||
with_items: "{{ rgw_instances }}"
|
with_items: "{{ rgw_instances }}"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
[global]
|
[global]
|
||||||
{% if not cephx %}
|
{% if not cephx | bool %}
|
||||||
auth cluster required = none
|
auth cluster required = none
|
||||||
auth service required = none
|
auth service required = none
|
||||||
auth client required = none
|
auth client required = none
|
||||||
|
@ -82,7 +82,7 @@ filestore xattr use omap = true
|
||||||
{% if osd_objectstore == 'bluestore' %}
|
{% if osd_objectstore == 'bluestore' %}
|
||||||
{% set _num_osds = num_osds | default(0) | int %}
|
{% set _num_osds = num_osds | default(0) | int %}
|
||||||
[osd]
|
[osd]
|
||||||
{% if is_hci and _num_osds > 0 %}
|
{% if is_hci | bool and _num_osds > 0 %}
|
||||||
{# hci_safety_factor is the safety factor for HCI deployments #}
|
{# hci_safety_factor is the safety factor for HCI deployments #}
|
||||||
{% if ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds > osd_memory_target %}
|
{% if ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds > osd_memory_target %}
|
||||||
{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds) | int %}
|
{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds) | int %}
|
||||||
|
@ -130,7 +130,7 @@ rgw_zone = {{ instance['rgw_zone'] }}
|
||||||
{% if inventory_hostname in groups.get(nfs_group_name, []) and inventory_hostname not in groups.get(rgw_group_name, []) %}
|
{% if inventory_hostname in groups.get(nfs_group_name, []) and inventory_hostname not in groups.get(rgw_group_name, []) %}
|
||||||
{% for host in groups[nfs_group_name] %}
|
{% for host in groups[nfs_group_name] %}
|
||||||
{% set _rgw_hostname = hostvars[host]['rgw_hostname'] | default(hostvars[host]['ansible_hostname']) %}
|
{% set _rgw_hostname = hostvars[host]['rgw_hostname'] | default(hostvars[host]['ansible_hostname']) %}
|
||||||
{% if nfs_obj_gw %}
|
{% if nfs_obj_gw | bool %}
|
||||||
[client.rgw.{{ _rgw_hostname }}]
|
[client.rgw.{{ _rgw_hostname }}]
|
||||||
host = {{ _rgw_hostname }}
|
host = {{ _rgw_hostname }}
|
||||||
keyring = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ _rgw_hostname }}/keyring
|
keyring = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ _rgw_hostname }}/keyring
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
dest: "{{ ceph_conf_key_directory }}"
|
dest: "{{ ceph_conf_key_directory }}"
|
||||||
import_key: True
|
import_key: True
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
delegate_to: "{{ groups.get(mon_group_name, [])[0] }}"
|
delegate_to: "{{ groups.get(mon_group_name, [])[0] }}"
|
||||||
run_once: True
|
run_once: True
|
||||||
|
@ -40,8 +40,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ ceph_conf_key_directory }}/{{ cluster }}.client.crash.keyring"
|
dest: "{{ ceph_conf_key_directory }}/{{ cluster }}.client.crash.keyring"
|
||||||
content: "{{ _crash_keys.stdout + '\n' }}"
|
content: "{{ _crash_keys.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ list_target_node }}"
|
with_items: "{{ list_target_node }}"
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
block:
|
block:
|
||||||
- name: set_fact container_exec_cmd
|
- name: set_fact container_exec_cmd
|
||||||
set_fact:
|
set_fact:
|
||||||
container_exec_cmd: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] if not rolling_update else hostvars[mon_host | default(groups[mon_group_name][0])]['ansible_hostname'] }}"
|
container_exec_cmd: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] if not rolling_update | bool else hostvars[mon_host | default(groups[mon_group_name][0])]['ansible_hostname'] }}"
|
||||||
when:
|
when:
|
||||||
- containerized_deployment | bool
|
- containerized_deployment | bool
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
current_fsid:
|
current_fsid:
|
||||||
rc: 1
|
rc: 1
|
||||||
when: rolling_update or groups.get(mon_group_name, []) | length == 0
|
when: rolling_update | bool or groups.get(mon_group_name, []) | length == 0
|
||||||
|
|
||||||
- name: create a local fetch directory if it does not exist
|
- name: create a local fetch directory if it does not exist
|
||||||
file:
|
file:
|
||||||
|
@ -346,7 +346,7 @@
|
||||||
|
|
||||||
- name: set_fact ceph_run_cmd
|
- name: set_fact ceph_run_cmd
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_run_cmd: "{{ container_binary + ' run --rm --net=host -v /etc/ceph:/etc/ceph:z -v /var/lib/ceph/:/var/lib/ceph/:z -v /var/log/ceph/:/var/log/ceph/:z --entrypoint=ceph ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else 'ceph' }}"
|
ceph_run_cmd: "{{ container_binary + ' run --rm --net=host -v /etc/ceph:/etc/ceph:z -v /var/lib/ceph/:/var/lib/ceph/:z -v /var/log/ceph/:/var/log/ceph/:z --entrypoint=ceph ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else 'ceph' }}"
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
RETRIES="{{ handler_health_mds_check_retries }}"
|
RETRIES="{{ handler_health_mds_check_retries }}"
|
||||||
DELAY="{{ handler_health_mds_check_delay }}"
|
DELAY="{{ handler_health_mds_check_delay }}"
|
||||||
MDS_NAME="{{ ansible_hostname }}"
|
MDS_NAME="{{ ansible_hostname }}"
|
||||||
{% if containerized_deployment %}
|
{% if containerized_deployment | bool %}
|
||||||
DOCKER_EXEC="{{ container_binary }} exec ceph-mds-{{ ansible_hostname }}"
|
DOCKER_EXEC="{{ container_binary }} exec ceph-mds-{{ ansible_hostname }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
RETRIES="{{ handler_health_mgr_check_retries }}"
|
RETRIES="{{ handler_health_mgr_check_retries }}"
|
||||||
DELAY="{{ handler_health_mgr_check_delay }}"
|
DELAY="{{ handler_health_mgr_check_delay }}"
|
||||||
MGR_NAME="{{ ansible_hostname }}"
|
MGR_NAME="{{ ansible_hostname }}"
|
||||||
{% if containerized_deployment %}
|
{% if containerized_deployment | bool %}
|
||||||
DOCKER_EXEC="{{ container_binary }} exec ceph-mgr-{{ ansible_hostname }}"
|
DOCKER_EXEC="{{ container_binary }} exec ceph-mgr-{{ ansible_hostname }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
RETRIES="{{ handler_health_mon_check_retries }}"
|
RETRIES="{{ handler_health_mon_check_retries }}"
|
||||||
DELAY="{{ handler_health_mon_check_delay }}"
|
DELAY="{{ handler_health_mon_check_delay }}"
|
||||||
MONITOR_NAME="{{ monitor_name }}"
|
MONITOR_NAME="{{ monitor_name }}"
|
||||||
{% if containerized_deployment %}
|
{% if containerized_deployment | bool %}
|
||||||
DOCKER_EXEC="{{ container_binary }} exec ceph-mon-{{ ansible_hostname }}"
|
DOCKER_EXEC="{{ container_binary }} exec ceph-mon-{{ ansible_hostname }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@ RETRIES="{{ handler_health_nfs_check_retries }}"
|
||||||
DELAY="{{ handler_health_nfs_check_delay }}"
|
DELAY="{{ handler_health_nfs_check_delay }}"
|
||||||
NFS_NAME="ceph-nfs@{{ ceph_nfs_service_suffix | default(ansible_hostname) }}"
|
NFS_NAME="ceph-nfs@{{ ceph_nfs_service_suffix | default(ansible_hostname) }}"
|
||||||
PID=/var/run/ganesha.pid
|
PID=/var/run/ganesha.pid
|
||||||
{% if containerized_deployment %}
|
{% if containerized_deployment | bool %}
|
||||||
DOCKER_EXEC="{{ container_binary }} exec ceph-nfs-{{ ceph_nfs_service_suffix | default(ansible_hostname) }}"
|
DOCKER_EXEC="{{ container_binary }} exec ceph-nfs-{{ ceph_nfs_service_suffix | default(ansible_hostname) }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# First, restart the daemon
|
# First, restart the daemon
|
||||||
{% if containerized_deployment -%}
|
{% if containerized_deployment | bool -%}
|
||||||
systemctl restart $NFS_NAME
|
systemctl restart $NFS_NAME
|
||||||
# Wait and ensure the pid exists after restarting the daemon
|
# Wait and ensure the pid exists after restarting the daemon
|
||||||
while [ $RETRIES -ne 0 ]; do
|
while [ $RETRIES -ne 0 ]; do
|
||||||
|
|
|
@ -61,7 +61,7 @@ for unit in $(systemctl list-units | grep -E "loaded * active" | grep -oE "ceph-
|
||||||
# We need to wait because it may take some time for the socket to actually exists
|
# We need to wait because it may take some time for the socket to actually exists
|
||||||
COUNT=10
|
COUNT=10
|
||||||
# Wait and ensure the socket exists after restarting the daemon
|
# Wait and ensure the socket exists after restarting the daemon
|
||||||
{% if containerized_deployment %}
|
{% if containerized_deployment | bool %}
|
||||||
osd_id=$(echo ${unit#ceph-osd@} | grep -oE '[0-9]+')
|
osd_id=$(echo ${unit#ceph-osd@} | grep -oE '[0-9]+')
|
||||||
container_id=$(get_container_id_from_dev_name "ceph-osd-${osd_id}")
|
container_id=$(get_container_id_from_dev_name "ceph-osd-${osd_id}")
|
||||||
container_exec="{{ container_binary }} exec $container_id"
|
container_exec="{{ container_binary }} exec $container_id"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
RETRIES="{{ handler_health_rbd_mirror_check_retries }}"
|
RETRIES="{{ handler_health_rbd_mirror_check_retries }}"
|
||||||
DELAY="{{ handler_health_rbd_mirror_check_delay }}"
|
DELAY="{{ handler_health_rbd_mirror_check_delay }}"
|
||||||
RBD_MIRROR_NAME="{{ ansible_hostname }}"
|
RBD_MIRROR_NAME="{{ ansible_hostname }}"
|
||||||
{% if containerized_deployment %}
|
{% if containerized_deployment | bool %}
|
||||||
DOCKER_EXEC="{{ container_binary }} exec ceph-rbd-mirror-{{ ansible_hostname }}"
|
DOCKER_EXEC="{{ container_binary }} exec ceph-rbd-mirror-{{ ansible_hostname }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.item.path }}"
|
dest: "{{ item.item.path }}"
|
||||||
content: "{{ item.stdout + '\n' }}"
|
content: "{{ item.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ _iscsi_keys.results }}"
|
with_items: "{{ _iscsi_keys.results }}"
|
||||||
when:
|
when:
|
||||||
|
@ -60,5 +60,5 @@
|
||||||
size: "{{ iscsi_pool_size | default(osd_pool_default_size) }}"
|
size: "{{ iscsi_pool_size | default(osd_pool_default_size) }}"
|
||||||
application: "rbd"
|
application: "rbd"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
|
@ -3,8 +3,8 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_directories_mode }}"
|
mode: "{{ ceph_directories_mode }}"
|
||||||
with_items:
|
with_items:
|
||||||
- /var/lib/ceph/bootstrap-mds/
|
- /var/lib/ceph/bootstrap-mds/
|
||||||
|
@ -26,8 +26,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.item.path }}"
|
dest: "{{ item.item.path }}"
|
||||||
content: "{{ item.stdout + '\n' }}"
|
content: "{{ item.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ _mds_keys.results }}"
|
with_items: "{{ _mds_keys.results }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
with_items: "{{ cephfs_pools }}"
|
with_items: "{{ cephfs_pools }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
|
|
||||||
- name: check and create ceph filesystem
|
- name: check and create ceph filesystem
|
||||||
|
@ -42,4 +42,4 @@
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
when:
|
when:
|
||||||
- mds_max_mds > 1
|
- mds_max_mds > 1
|
||||||
- not rolling_update
|
- not rolling_update | bool
|
||||||
|
|
|
@ -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('') if ceph_origin == 'repository' and ceph_repository == 'uca' else '' }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else '' }}"
|
default_release: "{{ ceph_stable_release_uca | default('') if ceph_origin == 'repository' and ceph_repository == 'uca' else '' }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports | bool else '' }}"
|
||||||
when:
|
when:
|
||||||
- mds_group_name in group_names
|
- mds_group_name in group_names
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/ceph/mds/{{ cluster }}-{{ ansible_hostname }}/keyring
|
creates: /var/lib/ceph/mds/{{ cluster }}-{{ ansible_hostname }}/keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: cephx
|
when: cephx | bool
|
||||||
|
|
||||||
- name: set mds key permissions
|
- name: set mds key permissions
|
||||||
file:
|
file:
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
owner: "ceph"
|
owner: "ceph"
|
||||||
group: "ceph"
|
group: "ceph"
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
when: cephx
|
when: cephx | bool
|
||||||
|
|
||||||
- name: ensure systemd service override directory exists
|
- name: ensure systemd service override directory exists
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
file:
|
file:
|
||||||
path: /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}
|
path: /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_directories_mode }}"
|
mode: "{{ ceph_directories_mode }}"
|
||||||
|
|
||||||
- name: fetch ceph mgr keyring
|
- name: fetch ceph mgr keyring
|
||||||
|
@ -16,12 +16,12 @@
|
||||||
mds: allow *
|
mds: allow *
|
||||||
cluster: "{{ cluster }}"
|
cluster: "{{ cluster }}"
|
||||||
secret: "{{ (mgr_secret != 'mgr_secret') | ternary(mgr_secret, omit) }}"
|
secret: "{{ (mgr_secret != 'mgr_secret') | ternary(mgr_secret, omit) }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "0400"
|
mode: "0400"
|
||||||
dest: "/var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring"
|
dest: "/var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
when: groups.get(mgr_group_name, []) | length == 0 # the key is present already since one of the mons created it in "create ceph mgr keyring(s)"
|
when: groups.get(mgr_group_name, []) | length == 0 # the key is present already since one of the mons created it in "create ceph mgr keyring(s)"
|
||||||
|
|
||||||
|
@ -37,11 +37,11 @@
|
||||||
mds: allow *
|
mds: allow *
|
||||||
cluster: "{{ cluster }}"
|
cluster: "{{ cluster }}"
|
||||||
secret: "{{ (mgr_secret != 'mgr_secret') | ternary(mgr_secret, omit) }}"
|
secret: "{{ (mgr_secret != 'mgr_secret') | ternary(mgr_secret, omit) }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "0400"
|
mode: "0400"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
with_items: "{{ groups.get(mgr_group_name, []) }}"
|
with_items: "{{ groups.get(mgr_group_name, []) }}"
|
||||||
run_once: True
|
run_once: True
|
||||||
|
@ -66,8 +66,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.item.path }}"
|
dest: "{{ item.item.path }}"
|
||||||
content: "{{ item.stdout + '\n' }}"
|
content: "{{ item.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ _mgr_keys.results }}"
|
with_items: "{{ _mgr_keys.results }}"
|
||||||
when:
|
when:
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
- name: set mgr key permissions
|
- name: set mgr key permissions
|
||||||
file:
|
file:
|
||||||
path: /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring
|
path: /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
when: cephx | bool
|
when: cephx | bool
|
||||||
|
|
|
@ -21,6 +21,6 @@
|
||||||
- name: include mgr_modules.yml
|
- name: include mgr_modules.yml
|
||||||
include_tasks: mgr_modules.yml
|
include_tasks: mgr_modules.yml
|
||||||
when:
|
when:
|
||||||
- ceph_mgr_modules | length > 0 or dashboard_enabled
|
- ceph_mgr_modules | length > 0 or dashboard_enabled | bool
|
||||||
- ((groups[mgr_group_name] | default([]) | length == 0 and inventory_hostname == groups[mon_group_name] | last) or
|
- ((groups[mgr_group_name] | default([]) | length == 0 and inventory_hostname == groups[mon_group_name] | last) or
|
||||||
(groups[mgr_group_name] | default([]) | length > 0 and inventory_hostname == groups[mgr_group_name] | last))
|
(groups[mgr_group_name] | default([]) | length > 0 and inventory_hostname == groups[mgr_group_name] | last))
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
apt:
|
apt:
|
||||||
name: '{{ ceph_mgr_packages }}'
|
name: '{{ ceph_mgr_packages }}'
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
default_release: "{{ ceph_stable_release_uca | default('') if ceph_origin == 'repository' and ceph_repository == 'uca' else ''}}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else '' }}"
|
default_release: "{{ ceph_stable_release_uca | default('') if ceph_origin == 'repository' and ceph_repository == 'uca' else ''}}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports | bool else '' }}"
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
ceph_key:
|
ceph_key:
|
||||||
state: fetch_initial_keys
|
state: fetch_initial_keys
|
||||||
cluster: "{{ cluster }}"
|
cluster: "{{ cluster }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "0400"
|
mode: "0400"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
CEPH_ROLLING_UPDATE: "{{ rolling_update }}"
|
CEPH_ROLLING_UPDATE: "{{ rolling_update }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -35,11 +35,11 @@
|
||||||
caps:
|
caps:
|
||||||
mon: allow *
|
mon: allow *
|
||||||
import_key: False
|
import_key: False
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "0400"
|
mode: "0400"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
|
|
||||||
- name: copy the initial key in /etc/ceph (for containers)
|
- name: copy the initial key in /etc/ceph (for containers)
|
||||||
|
@ -53,8 +53,8 @@
|
||||||
file:
|
file:
|
||||||
path: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}
|
path: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_directories_mode }}"
|
mode: "{{ ceph_directories_mode }}"
|
||||||
recurse: true
|
recurse: true
|
||||||
|
|
||||||
|
@ -65,11 +65,11 @@
|
||||||
caps: "{{ client_admin_ceph_authtool_cap }}"
|
caps: "{{ client_admin_ceph_authtool_cap }}"
|
||||||
import_key: False
|
import_key: False
|
||||||
cluster: "{{ cluster }}"
|
cluster: "{{ cluster }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "0400"
|
mode: "0400"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
register: create_custom_admin_secret
|
register: create_custom_admin_secret
|
||||||
when:
|
when:
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
- name: set_fact ceph-authtool container command
|
- name: set_fact ceph-authtool container command
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_authtool_cmd: "{{ container_binary + ' run --net=host --rm -v /var/lib/ceph:/var/lib/ceph:z -v /etc/ceph/:/etc/ceph/:z --entrypoint=ceph-authtool ' + ceph_client_docker_registry + '/' + ceph_client_docker_image + ':' + ceph_client_docker_image_tag if containerized_deployment else 'ceph-authtool' }}"
|
ceph_authtool_cmd: "{{ container_binary + ' run --net=host --rm -v /var/lib/ceph:/var/lib/ceph:z -v /etc/ceph/:/etc/ceph/:z --entrypoint=ceph-authtool ' + ceph_client_docker_registry + '/' + ceph_client_docker_image + ':' + ceph_client_docker_image_tag if containerized_deployment | bool else 'ceph-authtool' }}"
|
||||||
|
|
||||||
- name: import admin keyring into mon keyring
|
- name: import admin keyring into mon keyring
|
||||||
command: >
|
command: >
|
||||||
|
@ -91,14 +91,14 @@
|
||||||
|
|
||||||
- name: set_fact ceph-mon container command
|
- name: set_fact ceph-mon container command
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_mon_cmd: "{{ container_binary + ' run --rm --net=host -v /var/lib/ceph/:/var/lib/ceph:z -v /etc/ceph/:/etc/ceph/:z --entrypoint=ceph-mon ' + ceph_client_docker_registry + '/' + ceph_client_docker_image + ':' +ceph_client_docker_image_tag if containerized_deployment else 'ceph-mon' }}"
|
ceph_mon_cmd: "{{ container_binary + ' run --rm --net=host -v /var/lib/ceph/:/var/lib/ceph:z -v /etc/ceph/:/etc/ceph/:z --entrypoint=ceph-mon ' + ceph_client_docker_registry + '/' + ceph_client_docker_image + ':' +ceph_client_docker_image_tag if containerized_deployment | bool else 'ceph-mon' }}"
|
||||||
|
|
||||||
- name: ceph monitor mkfs with keyring
|
- name: ceph monitor mkfs with keyring
|
||||||
command: >
|
command: >
|
||||||
{{ ceph_mon_cmd }}
|
{{ ceph_mon_cmd }}
|
||||||
--cluster {{ cluster }}
|
--cluster {{ cluster }}
|
||||||
--setuser "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
--setuser "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
--setgroup "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
--setgroup "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
--mkfs
|
--mkfs
|
||||||
-i {{ monitor_name }}
|
-i {{ monitor_name }}
|
||||||
--fsid {{ fsid }}
|
--fsid {{ fsid }}
|
||||||
|
@ -111,8 +111,8 @@
|
||||||
command: >
|
command: >
|
||||||
{{ ceph_mon_cmd }}
|
{{ ceph_mon_cmd }}
|
||||||
--cluster {{ cluster }}
|
--cluster {{ cluster }}
|
||||||
--setuser "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
--setuser "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
--setgroup "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
--setgroup "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
--mkfs
|
--mkfs
|
||||||
-i {{ monitor_name }}
|
-i {{ monitor_name }}
|
||||||
--fsid {{ fsid }}
|
--fsid {{ fsid }}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
- name: start the monitor service
|
- name: start the monitor service
|
||||||
systemd:
|
systemd:
|
||||||
name: ceph-mon@{{ monitor_name if not containerized_deployment else ansible_hostname }}
|
name: ceph-mon@{{ monitor_name if not containerized_deployment | bool else ansible_hostname }}
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
masked: no
|
masked: no
|
||||||
|
|
|
@ -28,10 +28,10 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
|
||||||
{% if ansible_distribution == 'RedHat' -%}
|
{% if ansible_distribution == 'RedHat' -%}
|
||||||
-v /etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:z \
|
-v /etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:z \
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{% if mon_docker_privileged -%}
|
{% if mon_docker_privileged | bool -%}
|
||||||
--privileged \
|
--privileged \
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{% if mon_docker_net_host -%}
|
{% if mon_docker_net_host | bool -%}
|
||||||
--net=host \
|
--net=host \
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
-e IP_VERSION={{ ip_version[-1:] }} \
|
-e IP_VERSION={{ ip_version[-1:] }} \
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
file:
|
file:
|
||||||
path: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ item }}"
|
path: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ ceph_nfs_ceph_user }}"
|
- "{{ ceph_nfs_ceph_user }}"
|
||||||
|
@ -51,8 +51,8 @@
|
||||||
dest: "{{ item.1 }}"
|
dest: "{{ item.1 }}"
|
||||||
content: "{{ item.0.content | b64decode }}"
|
content: "{{ item.0.content | b64decode }}"
|
||||||
mode: "{{ item.0.item.get('mode', '0600') }}"
|
mode: "{{ item.0.item.get('mode', '0600') }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
with_nested:
|
with_nested:
|
||||||
- "{{ hostvars[groups['_filtered_clients'][0]]['slurp_client_keys']['results'] | default([]) }}"
|
- "{{ hostvars[groups['_filtered_clients'][0]]['slurp_client_keys']['results'] | default([]) }}"
|
||||||
- ['/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ceph_nfs_ceph_user }}/keyring', '/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}/keyring']
|
- ['/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ceph_nfs_ceph_user }}/keyring', '/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}/keyring']
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.item.path }}"
|
dest: "{{ item.item.path }}"
|
||||||
content: "{{ item.stdout + '\n' }}"
|
content: "{{ item.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ _rgw_keys.results }}"
|
with_items: "{{ _rgw_keys.results }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -63,8 +63,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.item.path }}"
|
dest: "{{ item.item.path }}"
|
||||||
content: "{{ item.stdout + '\n' }}"
|
content: "{{ item.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ _rgw_keys.results }}"
|
with_items: "{{ _rgw_keys.results }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
when: nfs_file_gw
|
when: nfs_file_gw | bool
|
||||||
|
|
||||||
- name: install redhat nfs-ganesha-rgw and ceph-radosgw packages
|
- name: install redhat nfs-ganesha-rgw and ceph-radosgw packages
|
||||||
package:
|
package:
|
||||||
|
|
|
@ -26,7 +26,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
|
||||||
-v /var/run/ceph:/var/run/ceph:z \
|
-v /var/run/ceph:/var/run/ceph:z \
|
||||||
-v /var/log/ceph:/var/log/ceph:z \
|
-v /var/log/ceph:/var/log/ceph:z \
|
||||||
-v /var/log/ganesha:/var/log/ganesha:z \
|
-v /var/log/ganesha:/var/log/ganesha:z \
|
||||||
{% if ceph_nfs_dynamic_exports %}
|
{% if ceph_nfs_dynamic_exports | bool %}
|
||||||
--privileged \
|
--privileged \
|
||||||
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
|
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
|
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
{% if ceph_nfs_dynamic_exports and not ceph_nfs_rados_backend %}
|
{% if ceph_nfs_dynamic_exports | bool and not ceph_nfs_rados_backend | bool %}
|
||||||
%include /etc/ganesha/export.d/INDEX.conf
|
%include /etc/ganesha/export.d/INDEX.conf
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ NFS_Core_Param
|
||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if ceph_nfs_disable_caching or nfs_file_gw %}
|
{% if ceph_nfs_disable_caching | bool or nfs_file_gw | bool %}
|
||||||
EXPORT_DEFAULTS {
|
EXPORT_DEFAULTS {
|
||||||
Attr_Expiration_Time = 0;
|
Attr_Expiration_Time = 0;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ CACHEINODE {
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if ceph_nfs_rados_backend %}
|
{% if ceph_nfs_rados_backend | bool %}
|
||||||
RADOS_URLS {
|
RADOS_URLS {
|
||||||
ceph_conf = '/etc/ceph/{{ cluster }}.conf';
|
ceph_conf = '/etc/ceph/{{ cluster }}.conf';
|
||||||
userid = "{{ ceph_nfs_ceph_user }}";
|
userid = "{{ ceph_nfs_ceph_user }}";
|
||||||
|
@ -42,7 +42,7 @@ RADOS_KV {
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if nfs_file_gw %}
|
{% if nfs_file_gw | bool %}
|
||||||
EXPORT
|
EXPORT
|
||||||
{
|
{
|
||||||
Export_id={{ ceph_nfs_ceph_export_id }};
|
Export_id={{ ceph_nfs_ceph_export_id }};
|
||||||
|
@ -71,7 +71,7 @@ EXPORT
|
||||||
{{ ganesha_ceph_export_overrides | default(None) }}
|
{{ ganesha_ceph_export_overrides | default(None) }}
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if nfs_obj_gw %}
|
{% if nfs_obj_gw | bool %}
|
||||||
EXPORT
|
EXPORT
|
||||||
{
|
{
|
||||||
Export_id={{ ceph_nfs_rgw_export_id }};
|
Export_id={{ ceph_nfs_rgw_export_id }};
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_directories_mode }}"
|
mode: "{{ ceph_directories_mode }}"
|
||||||
when: cephx | bool
|
when: cephx | bool
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.item.path }}"
|
dest: "{{ item.item.path }}"
|
||||||
content: "{{ item.stdout + '\n' }}"
|
content: "{{ item.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ _osd_keys.results }}"
|
with_items: "{{ _osd_keys.results }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
with_items: "{{ openstack_pools }}"
|
with_items: "{{ openstack_pools }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
|
|
||||||
- name: create openstack cephx key(s)
|
- name: create openstack cephx key(s)
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
cluster: "{{ cluster }}"
|
cluster: "{{ cluster }}"
|
||||||
mode: "{{ item.mode|default(omit) }}"
|
mode: "{{ item.mode|default(omit) }}"
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
with_items: "{{ openstack_keys }}"
|
with_items: "{{ openstack_keys }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
@ -47,8 +47,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "/etc/ceph/{{ cluster }}.{{ item.0.item.name }}.keyring"
|
dest: "/etc/ceph/{{ cluster }}.{{ item.0.item.name }}.keyring"
|
||||||
content: "{{ item.0.stdout + '\n' }}"
|
content: "{{ item.0.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ item.0.item.mode }}"
|
mode: "{{ item.0.item.mode }}"
|
||||||
with_nested:
|
with_nested:
|
||||||
- "{{ _osp_keys.results }}"
|
- "{{ _osp_keys.results }}"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
action: "batch"
|
action: "batch"
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
PYTHONIOENCODING: utf-8
|
PYTHONIOENCODING: utf-8
|
||||||
when: _devices | default([]) | length > 0
|
when: _devices | default([]) | length > 0
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
wal_vg: "{{ item.wal_vg|default(omit) }}"
|
wal_vg: "{{ item.wal_vg|default(omit) }}"
|
||||||
crush_device_class: "{{ item.crush_device_class|default(omit) }}"
|
crush_device_class: "{{ item.crush_device_class|default(omit) }}"
|
||||||
dmcrypt: "{{ dmcrypt|default(omit) }}"
|
dmcrypt: "{{ dmcrypt|default(omit) }}"
|
||||||
action: "{{ 'prepare' if containerized_deployment else 'create' }}"
|
action: "{{ 'prepare' if containerized_deployment | bool else 'create' }}"
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
PYTHONIOENCODING: utf-8
|
PYTHONIOENCODING: utf-8
|
||||||
with_items: "{{ lvm_volumes }}"
|
with_items: "{{ lvm_volumes }}"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
- name: set_fact docker_exec_start_osd
|
- name: set_fact docker_exec_start_osd
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_exec_start_osd: "{{ '{{ container_binary }} run --rm --net=host --privileged=true -v /var/run/udev/:/var/run/udev/:z -v /run/lvm/:/run/lvm/ -v /etc/ceph:/etc/ceph:z -v /dev:/dev --entrypoint=ceph-volume ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else 'ceph-volume' }}"
|
docker_exec_start_osd: "{{ '{{ container_binary }} run --rm --net=host --privileged=true -v /var/run/udev/:/var/run/udev/:z -v /run/lvm/:/run/lvm/ -v /etc/ceph:/etc/ceph:z -v /dev:/dev --entrypoint=ceph-volume ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else 'ceph-volume' }}"
|
||||||
|
|
||||||
- name: collect osd ids
|
- name: collect osd ids
|
||||||
command: "{{ docker_exec_start_osd }} lvm list --format json"
|
command: "{{ docker_exec_start_osd }} lvm list --format json"
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.item.path }}"
|
dest: "{{ item.item.path }}"
|
||||||
content: "{{ item.stdout + '\n' }}"
|
content: "{{ item.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ _rbd_mirror_keys.results }}"
|
with_items: "{{ _rbd_mirror_keys.results }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_directories_mode }}"
|
mode: "{{ ceph_directories_mode }}"
|
||||||
with_items: "{{ rbd_client_admin_socket_path }}"
|
with_items: "{{ rbd_client_admin_socket_path }}"
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item.item.path }}"
|
dest: "{{ item.item.path }}"
|
||||||
content: "{{ item.stdout + '\n' }}"
|
content: "{{ item.stdout + '\n' }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ _rgw_keys.results }}"
|
with_items: "{{ _rgw_keys.results }}"
|
||||||
when:
|
when:
|
||||||
|
@ -36,8 +36,8 @@
|
||||||
copy:
|
copy:
|
||||||
content: "{{ radosgw_frontend_ssl_certificate_data }}"
|
content: "{{ radosgw_frontend_ssl_certificate_data }}"
|
||||||
dest: "{{ radosgw_frontend_ssl_certificate }}"
|
dest: "{{ radosgw_frontend_ssl_certificate }}"
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
|
||||||
mode: 0440
|
mode: 0440
|
||||||
when: radosgw_frontend_ssl_certificate | length > 0 and radosgw_frontend_ssl_certificate_data | length > 0
|
when: radosgw_frontend_ssl_certificate | length > 0 and radosgw_frontend_ssl_certificate_data | length > 0
|
||||||
notify: restart ceph rgws
|
notify: restart ceph rgws
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
- item.value.type is defined
|
- item.value.type is defined
|
||||||
- item.value.type == 'ec'
|
- item.value.type == 'ec'
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
|
|
||||||
- name: create replicated pools for rgw
|
- name: create replicated pools for rgw
|
||||||
|
@ -61,5 +61,5 @@
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
when: item.value.type is not defined or item.value.type == 'replicated'
|
when: item.value.type is not defined or item.value.type == 'replicated'
|
||||||
environment:
|
environment:
|
||||||
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
||||||
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
fail:
|
fail:
|
||||||
msg: "ceph_nfs_rgw_access_key and ceph_nfs_rgw_secret_key must be set if nfs_obj_gw is True"
|
msg: "ceph_nfs_rgw_access_key and ceph_nfs_rgw_secret_key must be set if nfs_obj_gw is True"
|
||||||
when:
|
when:
|
||||||
- nfs_obj_gw
|
- nfs_obj_gw | bool
|
||||||
- groups.get(mon_group_name, []) | length == 0
|
- groups.get(mon_group_name, []) | length == 0
|
||||||
- (ceph_nfs_rgw_access_key is undefined or ceph_nfs_rgw_secret_key is undefined)
|
- (ceph_nfs_rgw_access_key is undefined or ceph_nfs_rgw_secret_key is undefined)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue