mirror of https://github.com/ceph/ceph-ansible.git
parent
de99f9fb75
commit
c2b5118c1b
|
@ -3,8 +3,7 @@
|
||||||
raw: stat $HOME/.python
|
raw: stat $HOME/.python
|
||||||
register: need_python
|
register: need_python
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- include: install_pypy.yml
|
- include: install_pypy.yml
|
||||||
when: need_python | failed
|
when: need_python | failed
|
||||||
|
@ -13,8 +12,7 @@
|
||||||
raw: stat $HOME/.pip
|
raw: stat $HOME/.pip
|
||||||
register: need_pip
|
register: need_pip
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- include: install_pip.yml
|
- include: install_pip.yml
|
||||||
when: need_pip | failed and need_python | failed
|
when: need_pip | failed and need_python | failed
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: nmapexist
|
register: nmapexist
|
||||||
run_once: true
|
run_once: true
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: inform that nmap is not present
|
- name: inform that nmap is not present
|
||||||
debug:
|
debug:
|
||||||
|
@ -20,11 +19,10 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: monportstate
|
register: monportstate
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- mon_group_name in group_names
|
- mon_group_name in group_names
|
||||||
- nmapexist.rc == 0
|
- nmapexist.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: fail if monitor port is filtered
|
- name: fail if monitor port is filtered
|
||||||
fail:
|
fail:
|
||||||
|
@ -39,11 +37,10 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: osdrangestate
|
register: osdrangestate
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- osd_group_name in group_names
|
- osd_group_name in group_names
|
||||||
- nmapexist.rc == 0
|
- nmapexist.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: fail if osd and mds range is filtered (osd hosts)
|
- name: fail if osd and mds range is filtered (osd hosts)
|
||||||
fail:
|
fail:
|
||||||
|
@ -58,11 +55,10 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: mdsrangestate
|
register: mdsrangestate
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- mds_group_name in group_names
|
- mds_group_name in group_names
|
||||||
- nmapexist.rc == 0
|
- nmapexist.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: fail if osd and mds range is filtered (mds hosts)
|
- name: fail if osd and mds range is filtered (mds hosts)
|
||||||
fail:
|
fail:
|
||||||
|
@ -77,11 +73,10 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: rgwportstate
|
register: rgwportstate
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- rgw_group_name in group_names
|
- rgw_group_name in group_names
|
||||||
- nmapexist.rc == 0
|
- nmapexist.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: fail if rados gateway port is filtered
|
- name: fail if rados gateway port is filtered
|
||||||
fail:
|
fail:
|
||||||
|
@ -96,11 +91,10 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: nfsportstate
|
register: nfsportstate
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- nfs_group_name in group_names
|
- nfs_group_name in group_names
|
||||||
- nmapexist.rc == 0
|
- nmapexist.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: fail if NFS ports are filtered
|
- name: fail if NFS ports are filtered
|
||||||
fail:
|
fail:
|
||||||
|
|
|
@ -30,12 +30,11 @@
|
||||||
register: subscription
|
register: subscription
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- ansible_distribution == 'Red Hat Enterprise Linux'
|
- ansible_distribution == 'Red Hat Enterprise Linux'
|
||||||
- ceph_repository == 'rhcs'
|
- ceph_repository == 'rhcs'
|
||||||
- ceph_repository_type == 'cdn'
|
- ceph_repository_type == 'cdn'
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: fail on unregistered red hat rhcs linux
|
- name: fail on unregistered red hat rhcs linux
|
||||||
fail:
|
fail:
|
||||||
|
|
|
@ -23,10 +23,9 @@
|
||||||
stat:
|
stat:
|
||||||
path: /etc/default/ceph
|
path: /etc/default/ceph
|
||||||
register: etc_default_ceph
|
register: etc_default_ceph
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == "Debian"
|
- ansible_os_family == "Debian"
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: configure cluster name
|
- name: configure cluster name
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
|
@ -4,10 +4,9 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: rhcs_mon_repo
|
register: rhcs_mon_repo
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- mon_group_name in group_names
|
- mon_group_name in group_names
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: enable red hat storage monitor repository
|
- name: enable red hat storage monitor repository
|
||||||
command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
|
command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
|
||||||
|
@ -21,10 +20,9 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: rhcs_osd_repo
|
register: rhcs_osd_repo
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- osd_group_name in group_names
|
- osd_group_name in group_names
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: enable red hat storage osd repository
|
- name: enable red hat storage osd repository
|
||||||
command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
|
command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
|
||||||
|
@ -38,10 +36,9 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: rhcs_rgw_mds_nfs_repo
|
register: rhcs_rgw_mds_nfs_repo
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- (rgw_group_name in group_names or mds_group_name in group_names or nfs_group_name in group_names)
|
- (rgw_group_name in group_names or mds_group_name in group_names or nfs_group_name in group_names)
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: enable red hat storage rados gateway / mds repository
|
- name: enable red hat storage rados gateway / mds repository
|
||||||
command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
|
command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
|
||||||
|
|
|
@ -57,9 +57,8 @@
|
||||||
- name: get ceph version
|
- name: get ceph version
|
||||||
command: ceph --version
|
command: ceph --version
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: yes
|
||||||
register: ceph_version
|
register: ceph_version
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set_fact ceph_version
|
- name: set_fact ceph_version
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -33,9 +33,8 @@
|
||||||
command: sysctl -b vm.min_free_kbytes
|
command: sysctl -b vm.min_free_kbytes
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: yes
|
||||||
register: default_vm_min_free_kbytes
|
register: default_vm_min_free_kbytes
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set_fact vm_min_free_kbytes
|
- name: set_fact vm_min_free_kbytes
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -88,11 +88,10 @@
|
||||||
removes="{{ fetch_directory }}/ceph_cluster_uuid.conf"
|
removes="{{ fetch_directory }}/ceph_cluster_uuid.conf"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: cluster_uuid
|
register: cluster_uuid
|
||||||
|
always_run: true
|
||||||
become: false
|
become: false
|
||||||
when:
|
when:
|
||||||
- generate_fsid
|
- generate_fsid
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: ensure /etc/ceph exists
|
- name: ensure /etc/ceph exists
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -4,67 +4,60 @@
|
||||||
register: ceph_mon_container_stat
|
register: ceph_mon_container_stat
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(mon_group_name, [])
|
- inventory_hostname in groups.get(mon_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check for an osd container
|
- name: check for an osd container
|
||||||
command: "docker ps -q --filter='name=ceph-osd-{{ ansible_hostname }}'"
|
command: "docker ps -q --filter='name=ceph-osd-{{ ansible_hostname }}'"
|
||||||
register: ceph_osd_container_stat
|
register: ceph_osd_container_stat
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(osd_group_name, [])
|
- inventory_hostname in groups.get(osd_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check for a mds container
|
- name: check for a mds container
|
||||||
command: "docker ps -q --filter='name=ceph-mds-{{ ansible_hostname }}'"
|
command: "docker ps -q --filter='name=ceph-mds-{{ ansible_hostname }}'"
|
||||||
register: ceph_mds_container_stat
|
register: ceph_mds_container_stat
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(mds_group_name, [])
|
- inventory_hostname in groups.get(mds_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check for a rgw container
|
- name: check for a rgw container
|
||||||
command: "docker ps -q --filter='name=ceph-rgw-{{ ansible_hostname }}'"
|
command: "docker ps -q --filter='name=ceph-rgw-{{ ansible_hostname }}'"
|
||||||
register: ceph_rgw_container_stat
|
register: ceph_rgw_container_stat
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(rgw_group_name, [])
|
- inventory_hostname in groups.get(rgw_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check for a mgr container
|
- name: check for a mgr container
|
||||||
command: "docker ps -q --filter='name=ceph-mgr-{{ ansible_hostname }}'"
|
command: "docker ps -q --filter='name=ceph-mgr-{{ ansible_hostname }}'"
|
||||||
register: ceph_mgr_container_stat
|
register: ceph_mgr_container_stat
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(mgr_group_name, [])
|
- inventory_hostname in groups.get(mgr_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check for a rbd mirror container
|
- name: check for a rbd mirror container
|
||||||
command: "docker ps -q --filter='name=ceph-rbd-mirror-{{ ansible_hostname }}'"
|
command: "docker ps -q --filter='name=ceph-rbd-mirror-{{ ansible_hostname }}'"
|
||||||
register: ceph_rbd_mirror_container_stat
|
register: ceph_rbd_mirror_container_stat
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(rbdmirror_group_name, [])
|
- inventory_hostname in groups.get(rbdmirror_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check for a nfs container
|
- name: check for a nfs container
|
||||||
command: "docker ps -q --filter='name=ceph-nfs-{{ ansible_hostname }}'"
|
command: "docker ps -q --filter='name=ceph-nfs-{{ ansible_hostname }}'"
|
||||||
register: ceph_nfs_container_stat
|
register: ceph_nfs_container_stat
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(nfs_group_name, [])
|
- inventory_hostname in groups.get(nfs_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
|
@ -3,22 +3,20 @@
|
||||||
shell: stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-mon*.asok
|
shell: stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-mon*.asok
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: mon_socket_stat
|
register: mon_socket_stat
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(mon_group_name, [])
|
- inventory_hostname in groups.get(mon_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the ceph mon socket is in-use
|
- name: check if the ceph mon socket is in-use
|
||||||
command: fuser --silent {{ mon_socket_stat.stdout }}
|
command: fuser --silent {{ mon_socket_stat.stdout }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: mon_socket
|
register: mon_socket
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(mon_group_name, [])
|
- inventory_hostname in groups.get(mon_group_name, [])
|
||||||
- mon_socket_stat.rc == 0
|
- mon_socket_stat.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: remove ceph mon socket if exists and not used by a process
|
- name: remove ceph mon socket if exists and not used by a process
|
||||||
file:
|
file:
|
||||||
|
@ -34,22 +32,20 @@
|
||||||
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-osd*.asok
|
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-osd*.asok
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_socket_stat
|
register: osd_socket_stat
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(osd_group_name, [])
|
- inventory_hostname in groups.get(osd_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the ceph osd socket is in-use
|
- name: check if the ceph osd socket is in-use
|
||||||
command: fuser --silent {{ osd_socket_stat.stdout }}
|
command: fuser --silent {{ osd_socket_stat.stdout }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_socket
|
register: osd_socket
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(osd_group_name, [])
|
- inventory_hostname in groups.get(osd_group_name, [])
|
||||||
- osd_socket_stat.rc == 0
|
- osd_socket_stat.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: remove ceph osd socket if exists and not used by a process
|
- name: remove ceph osd socket if exists and not used by a process
|
||||||
file:
|
file:
|
||||||
|
@ -65,22 +61,20 @@
|
||||||
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-mds*.asok
|
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-mds*.asok
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: mds_socket_stat
|
register: mds_socket_stat
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(mds_group_name, [])
|
- inventory_hostname in groups.get(mds_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the ceph mds socket is in-use
|
- name: check if the ceph mds socket is in-use
|
||||||
command: fuser --silent {{ mds_socket_stat.stdout }}
|
command: fuser --silent {{ mds_socket_stat.stdout }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: mds_socket
|
register: mds_socket
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(mds_group_name, [])
|
- inventory_hostname in groups.get(mds_group_name, [])
|
||||||
- mds_socket_stat.rc == 0
|
- mds_socket_stat.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: remove ceph mds socket if exists and not used by a process
|
- name: remove ceph mds socket if exists and not used by a process
|
||||||
file:
|
file:
|
||||||
|
@ -96,22 +90,20 @@
|
||||||
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rgw*.asok
|
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rgw*.asok
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: rgw_socket_stat
|
register: rgw_socket_stat
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(rgw_group_name, [])
|
- inventory_hostname in groups.get(rgw_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the ceph rgw socket is in-use
|
- name: check if the ceph rgw socket is in-use
|
||||||
command: fuser --silent {{ rgw_socket_stat.stdout }}
|
command: fuser --silent {{ rgw_socket_stat.stdout }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: rgw_socket
|
register: rgw_socket
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(rgw_group_name, [])
|
- inventory_hostname in groups.get(rgw_group_name, [])
|
||||||
- rgw_socket_stat.rc == 0
|
- rgw_socket_stat.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: remove ceph rgw socket if exists and not used by a process
|
- name: remove ceph rgw socket if exists and not used by a process
|
||||||
file:
|
file:
|
||||||
|
@ -127,22 +119,20 @@
|
||||||
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-mgr*.asok
|
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-mgr*.asok
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: mgr_socket_stat
|
register: mgr_socket_stat
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(mgr_group_name, [])
|
- inventory_hostname in groups.get(mgr_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the ceph mgr socket is in-use
|
- name: check if the ceph mgr socket is in-use
|
||||||
command: fuser --silent {{ mgr_socket_stat.stdout }}
|
command: fuser --silent {{ mgr_socket_stat.stdout }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: mgr_socket
|
register: mgr_socket
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(mgr_group_name, [])
|
- inventory_hostname in groups.get(mgr_group_name, [])
|
||||||
- mgr_socket_stat.rc == 0
|
- mgr_socket_stat.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: remove ceph mgr socket if exists and not used by a process
|
- name: remove ceph mgr socket if exists and not used by a process
|
||||||
file:
|
file:
|
||||||
|
@ -158,22 +148,20 @@
|
||||||
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rbd-mirror*.asok
|
stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rbd-mirror*.asok
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: rbd_mirror_socket_stat
|
register: rbd_mirror_socket_stat
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(rbdmirror_group_name, [])
|
- inventory_hostname in groups.get(rbdmirror_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the ceph rbd mirror socket is in-use
|
- name: check if the ceph rbd mirror socket is in-use
|
||||||
command: fuser --silent {{ rbd_mirror_socket_stat.stdout }}
|
command: fuser --silent {{ rbd_mirror_socket_stat.stdout }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: rbd_mirror_socket
|
register: rbd_mirror_socket
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(rbdmirror_group_name, [])
|
- inventory_hostname in groups.get(rbdmirror_group_name, [])
|
||||||
- rbd_mirror_socket_stat.rc == 0
|
- rbd_mirror_socket_stat.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: remove ceph rbd mirror socket if exists and not used by a process
|
- name: remove ceph rbd mirror socket if exists and not used by a process
|
||||||
file:
|
file:
|
||||||
|
@ -188,22 +176,20 @@
|
||||||
command: stat --printf=%n /var/run/ganesha.pid
|
command: stat --printf=%n /var/run/ganesha.pid
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: nfs_socket_stat
|
register: nfs_socket_stat
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(nfs_group_name, [])
|
- inventory_hostname in groups.get(nfs_group_name, [])
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the ceph nfs ganesha socket is in-use
|
- name: check if the ceph nfs ganesha socket is in-use
|
||||||
command: fuser --silent {{ nfs_socket_stat.stdout }}
|
command: fuser --silent {{ nfs_socket_stat.stdout }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: nfs_socket
|
register: nfs_socket
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups.get(nfs_group_name, [])
|
- inventory_hostname in groups.get(nfs_group_name, [])
|
||||||
- nfs_socket_stat.rc == 0
|
- nfs_socket_stat.rc == 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: remove ceph nfs ganesha socket if exists and not used by a process
|
- name: remove ceph nfs ganesha socket if exists and not used by a process
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -18,13 +18,12 @@
|
||||||
command: "{{ docker_exec_cmd }} ceph --connect-timeout 3 --cluster {{ cluster }} fsid"
|
command: "{{ docker_exec_cmd }} ceph --connect-timeout 3 --cluster {{ cluster }} fsid"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: yes
|
||||||
register: ceph_current_fsid
|
register: ceph_current_fsid
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
when:
|
when:
|
||||||
- not rolling_update
|
- not rolling_update
|
||||||
- groups.get(mon_group_name, []) | length > 0
|
- groups.get(mon_group_name, []) | length > 0
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
# We want this check to be run only on the first node
|
# We want this check to be run only on the first node
|
||||||
- name: check if {{ fetch_directory }} directory exists
|
- name: check if {{ fetch_directory }} directory exists
|
||||||
|
@ -83,10 +82,9 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: cluster_uuid
|
register: cluster_uuid
|
||||||
become: false
|
become: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- generate_fsid
|
- generate_fsid
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set_fact fsid
|
- name: set_fact fsid
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -5,6 +5,5 @@
|
||||||
warn: no
|
warn: no
|
||||||
register: ntp_pkg_query
|
register: ntp_pkg_query
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
always_run: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
|
@ -3,11 +3,10 @@
|
||||||
command: dpkg -s ntp
|
command: dpkg -s ntp
|
||||||
register: ntp_pkg_query
|
register: ntp_pkg_query
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
always_run: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: install ntp on debian
|
- name: install ntp on debian
|
||||||
package:
|
package:
|
||||||
|
|
|
@ -5,11 +5,10 @@
|
||||||
warn: no
|
warn: no
|
||||||
register: ntp_pkg_query
|
register: ntp_pkg_query
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
always_run: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'RedHat'
|
- ansible_os_family == 'RedHat'
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: install ntp on redhat
|
- name: install ntp on redhat
|
||||||
package:
|
package:
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
stat:
|
stat:
|
||||||
path: /run/ostree-booted
|
path: /run/ostree-booted
|
||||||
register: stat_ostree
|
register: stat_ostree
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set_fact is_atomic
|
- name: set_fact is_atomic
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -39,9 +38,8 @@
|
||||||
- name: get docker version
|
- name: get docker version
|
||||||
command: docker --version
|
command: docker --version
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: yes
|
||||||
register: docker_version
|
register: docker_version
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set_fact docker_version docker_version.stdout.split
|
- name: set_fact docker_version docker_version.stdout.split
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -58,8 +56,7 @@
|
||||||
register: ceph_health
|
register: ceph_health
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: include checks.yml
|
- name: include checks.yml
|
||||||
include: checks.yml
|
include: checks.yml
|
||||||
|
@ -99,9 +96,8 @@
|
||||||
- name: get ceph version
|
- name: get ceph version
|
||||||
command: docker run --entrypoint /usr/bin/ceph {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} --version
|
command: docker run --entrypoint /usr/bin/ceph {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} --version
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: yes
|
||||||
register: ceph_version
|
register: ceph_version
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set_fact ceph_version ceph_version.stdout.split
|
- name: set_fact ceph_version ceph_version.stdout.split
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -3,5 +3,4 @@
|
||||||
command: getenforce
|
command: getenforce
|
||||||
register: sestatus
|
register: sestatus
|
||||||
changed_when: false
|
changed_when: false
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
|
@ -34,6 +34,5 @@
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: statconfig
|
register: statconfig
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
shell: ls -1 /etc/ceph/*.keyring
|
shell: ls -1 /etc/ceph/*.keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: ceph_keys
|
register: ceph_keys
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set keys permissions
|
- name: set keys permissions
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -12,9 +12,8 @@
|
||||||
with_items: "{{ crt_files }}"
|
with_items: "{{ crt_files }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: crt_files_exist
|
register: crt_files_exist
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: try to fetch crt file(s)
|
- name: try to fetch crt file(s)
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -14,9 +14,8 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: try to fetch ceph config and keys
|
- name: try to fetch ceph config and keys
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -11,9 +11,8 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: try to fetch ceph config and keys
|
- name: try to fetch ceph config and keys
|
||||||
copy:
|
copy:
|
||||||
|
@ -31,10 +30,9 @@
|
||||||
- name: "copy mgr key to /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring"
|
- name: "copy mgr key to /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring"
|
||||||
command: cp /etc/ceph/{{ cluster }}.mgr.{{ ansible_hostname }}.keyring /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring
|
command: cp /etc/ceph/{{ cluster }}.mgr.{{ ansible_hostname }}.keyring /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: true
|
||||||
with_items: "{{ statconfig.results }}"
|
with_items: "{{ statconfig.results }}"
|
||||||
when: item.stat.exists == true
|
when: item.stat.exists == true
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set ceph mgr key permission
|
- name: set ceph mgr key permission
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -4,20 +4,18 @@
|
||||||
args:
|
args:
|
||||||
creates: /etc/ceph/{{ cluster }}.client.admin.keyring
|
creates: /etc/ceph/{{ cluster }}.client.admin.keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- cephx
|
- cephx
|
||||||
- ceph_release_num[ceph_release] >= ceph_release_num.luminous
|
- ceph_release_num[ceph_release] >= ceph_release_num.luminous
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: collect admin and bootstrap keys
|
- name: collect admin and bootstrap keys
|
||||||
command: ceph-create-keys --cluster {{ cluster }} -i {{ monitor_name }}
|
command: ceph-create-keys --cluster {{ cluster }} -i {{ monitor_name }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- cephx
|
- cephx
|
||||||
- ceph_release_num[ceph_release] < ceph_release_num.luminous
|
- ceph_release_num[ceph_release] < ceph_release_num.luminous
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
# NOTE (leseb): wait for mon discovery and quorum resolution
|
# NOTE (leseb): wait for mon discovery and quorum resolution
|
||||||
# the admin key is not instantaneously created so we have to wait a bit
|
# the admin key is not instantaneously created so we have to wait a bit
|
||||||
|
@ -44,21 +42,19 @@
|
||||||
command: ceph --cluster {{ cluster }} config-key get initial_mon_keyring
|
command: ceph --cluster {{ cluster }} config-key get initial_mon_keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
always_run: true
|
||||||
run_once: true
|
run_once: true
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: is_initial_mon_keyring_in_kv
|
register: is_initial_mon_keyring_in_kv
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: put initial mon keyring in mon kv store
|
- name: put initial mon keyring in mon kv store
|
||||||
command: ceph --cluster {{ cluster }} config-key put initial_mon_keyring {{ monitor_keyring.stdout }}
|
command: ceph --cluster {{ cluster }} config-key put initial_mon_keyring {{ monitor_keyring.stdout }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: true
|
||||||
run_once: true
|
run_once: true
|
||||||
when:
|
when:
|
||||||
- is_initial_mon_keyring_in_kv.rc != 0
|
- is_initial_mon_keyring_in_kv.rc != 0
|
||||||
- cephx
|
- cephx
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: create ceph rest api keyring when mon is not containerized
|
- name: create ceph rest api keyring when mon is not containerized
|
||||||
command: ceph --cluster {{ cluster }} auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/{{ cluster }}.client.restapi.keyring
|
command: ceph --cluster {{ cluster }} auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/{{ cluster }}.client.restapi.keyring
|
||||||
|
@ -91,10 +87,9 @@
|
||||||
shell: ls -1 /etc/ceph/*.keyring
|
shell: ls -1 /etc/ceph/*.keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: ceph_keys
|
register: ceph_keys
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- cephx
|
- cephx
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set keys permissions
|
- name: set keys permissions
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -12,9 +12,8 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: monitor_keyring
|
register: monitor_keyring
|
||||||
become: false
|
become: false
|
||||||
|
always_run: true
|
||||||
when: cephx
|
when: cephx
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: create monitor initial keyring
|
- name: create monitor initial keyring
|
||||||
command: ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ monitor_name }} --create-keyring --name=mon. --add-key={{ monitor_secret }} --cap mon 'allow *'
|
command: ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ monitor_name }} --create-keyring --name=mon. --add-key={{ monitor_secret }} --cap mon 'allow *'
|
||||||
|
|
|
@ -47,8 +47,7 @@
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: statconfig
|
register: statconfig
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: try to copy ceph config and keys
|
- name: try to copy ceph config and keys
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -110,10 +110,9 @@
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: stat_mgr_keys
|
register: stat_mgr_keys
|
||||||
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- "{{ groups.get(mgr_group_name, []) | length > 0 }}"
|
- "{{ groups.get(mgr_group_name, []) | length > 0 }}"
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: fetch ceph mgr key(s)
|
- name: fetch ceph mgr key(s)
|
||||||
fetch:
|
fetch:
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
- name: collect all the pools
|
- name: collect all the pools
|
||||||
command: rados --cluster {{ cluster }} lspools
|
command: rados --cluster {{ cluster }} lspools
|
||||||
register: ceph_pools
|
register: ceph_pools
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: secure the cluster
|
- name: secure the cluster
|
||||||
command: ceph --cluster {{ cluster }} osd pool set {{ item[0] }} {{ item[1] }} true
|
command: ceph --cluster {{ cluster }} osd pool set {{ item[0] }} {{ item[1] }} true
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
register: selinuxstatus
|
register: selinuxstatus
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: install policycoreutils-python to get semanage
|
- name: install policycoreutils-python to get semanage
|
||||||
package:
|
package:
|
||||||
|
|
|
@ -10,9 +10,8 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: try to fetch config and keys
|
- name: try to fetch config and keys
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -42,11 +42,10 @@
|
||||||
- "{{ dedicated_devices|unique }}"
|
- "{{ dedicated_devices|unique }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: journal_partition_status
|
register: journal_partition_status
|
||||||
when:
|
when:
|
||||||
- osd_scenario == 'non-collocated'
|
- osd_scenario == 'non-collocated'
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: fix partitions gpt header or labels of the journal device(s)
|
- name: fix partitions gpt header or labels of the journal device(s)
|
||||||
shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}"
|
shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}"
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
- "{{ devices }}"
|
- "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_partition_status_results
|
register: osd_partition_status_results
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
# NOTE: The following calls to sgdisk are retried because sgdisk is known to
|
# NOTE: The following calls to sgdisk are retried because sgdisk is known to
|
||||||
# fully wipe a device the first time around. There is no need to halt execution
|
# fully wipe a device the first time around. There is no need to halt execution
|
||||||
|
|
|
@ -15,9 +15,8 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: try to copy ceph config and keys
|
- name: try to copy ceph config and keys
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -40,9 +40,8 @@
|
||||||
- "{{ devices }}"
|
- "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: parted_results
|
register: parted_results
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: include copy_configs.yml
|
- name: include copy_configs.yml
|
||||||
include: copy_configs.yml
|
include: copy_configs.yml
|
||||||
|
|
|
@ -4,18 +4,16 @@
|
||||||
with_items: "{{ devices }}"
|
with_items: "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_path
|
register: osd_path
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: get osd id
|
- name: get osd id
|
||||||
command: cat {{ item.stdout }}/whoami
|
command: cat {{ item.stdout }}/whoami
|
||||||
with_items: "{{ osd_path.results }}"
|
with_items: "{{ osd_path.results }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_id_non_dir_scenario
|
register: osd_id_non_dir_scenario
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
# NOTE (leseb): we must do this because of
|
# NOTE (leseb): we must do this because of
|
||||||
# https://github.com/ansible/ansible/issues/4297
|
# https://github.com/ansible/ansible/issues/4297
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
ls /var/lib/ceph/osd/ | sed 's/.*-//'
|
ls /var/lib/ceph/osd/ | sed 's/.*-//'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_id
|
register: osd_id
|
||||||
until: osd_id.stdout_lines|length == devices|unique|length
|
until: osd_id.stdout_lines|length == devices|unique|length
|
||||||
retries: 10
|
retries: 10
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: ensure systemd service override directory exists
|
- name: ensure systemd service override directory exists
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -17,10 +17,9 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
when: "item | length > 0"
|
when: "item | length > 0"
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: try to fetch ceph config and keys
|
- name: try to fetch ceph config and keys
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
become: false
|
become: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: try to fetch ceph config and keys
|
- name: try to fetch ceph config and keys
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -3,9 +3,8 @@
|
||||||
shell: "pgrep -f ceph-rest-api"
|
shell: "pgrep -f ceph-rest-api"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: restapi_status
|
register: restapi_status
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: start ceph rest api
|
- name: start ceph rest api
|
||||||
shell: "nohup ceph-rest-api --conf /etc/ceph/{{ cluster }}.conf &"
|
shell: "nohup ceph-rest-api --conf /etc/ceph/{{ cluster }}.conf &"
|
||||||
|
|
|
@ -10,9 +10,8 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: false
|
become: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
always_run: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: try to fetch ceph config and keys
|
- name: try to fetch ceph config and keys
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -4,29 +4,25 @@
|
||||||
register: realmcheck
|
register: realmcheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
changed_when: False
|
changed_when: False
|
||||||
tags:
|
always_run: True
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the zonegroup already exists
|
- name: check if the zonegroup already exists
|
||||||
command: radosgw-admin zonegroup get --rgw-zonegroup={{ rgw_zonegroup }}
|
command: radosgw-admin zonegroup get --rgw-zonegroup={{ rgw_zonegroup }}
|
||||||
register: zonegroupcheck
|
register: zonegroupcheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
changed_when: False
|
changed_when: False
|
||||||
tags:
|
always_run: True
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the zone already exists
|
- name: check if the zone already exists
|
||||||
command: radosgw-admin zone get --rgw-zone={{ rgw_zone }}
|
command: radosgw-admin zone get --rgw-zone={{ rgw_zone }}
|
||||||
register: zonecheck
|
register: zonecheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
changed_when: False
|
changed_when: False
|
||||||
tags:
|
always_run: True
|
||||||
- always
|
|
||||||
|
|
||||||
- name: check if the system user already exists
|
- name: check if the system user already exists
|
||||||
command: radosgw-admin user info --uid=zone.user
|
command: radosgw-admin user info --uid=zone.user
|
||||||
register: usercheck
|
register: usercheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
changed_when: False
|
changed_when: False
|
||||||
tags:
|
always_run: True
|
||||||
- always
|
|
||||||
|
|
|
@ -53,8 +53,7 @@
|
||||||
stat:
|
stat:
|
||||||
path: /run/ostree-booted
|
path: /run/ostree-booted
|
||||||
register: stat_ostree
|
register: stat_ostree
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set fact for using Atomic host
|
- name: set fact for using Atomic host
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -126,7 +125,7 @@
|
||||||
- name: set MTU on eth2
|
- name: set MTU on eth2
|
||||||
command: "ifconfig eth2 mtu 1400 up"
|
command: "ifconfig eth2 mtu 1400 up"
|
||||||
|
|
||||||
- hosts: mdss:rgws:clients
|
- hosts: mdss:rgws:clients
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
- name: check if it is Atomic host
|
- name: check if it is Atomic host
|
||||||
stat: path=/run/ostree-booted
|
stat: path=/run/ostree-booted
|
||||||
register: stat_ostree
|
register: stat_ostree
|
||||||
tags:
|
always_run: true
|
||||||
- always
|
|
||||||
|
|
||||||
- name: set fact for using Atomic host
|
- name: set fact for using Atomic host
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
Loading…
Reference in New Issue