mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #424 from ceph/docker-checks
Add safety checks prior to deploy a cluster in containerspull/425/head
commit
a757827c9c
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
- name: set config and keys paths
|
||||
set_fact:
|
||||
ceph_config_keys:
|
||||
- /etc/ceph/ceph.client.admin.keyring
|
||||
- /etc/ceph/ceph.conf
|
||||
- /etc/ceph/monmap
|
||||
- /etc/ceph/ceph.mon.keyring
|
||||
- /var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
- /var/lib/ceph/bootstrap-mds/ceph.keyring
|
||||
|
||||
- name: stat for ceph config and keys
|
||||
stat:
|
||||
path: {{ item }}
|
||||
with_items: ceph_config_keys
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: statleftover
|
||||
|
||||
- name: fail if we find existing cluster files
|
||||
fail:
|
||||
msg: "looks like no cluster is running but ceph files are present, please remove them"
|
||||
with_together:
|
||||
- ceph_config_keys
|
||||
- statleftover.results
|
||||
when: item.1.stat.exists == true
|
|
@ -1,4 +1,13 @@
|
|||
---
|
||||
- name: check if a cluster is already running
|
||||
shell: "docker ps | grep -sq 'ceph/daemon'"
|
||||
register: ceph_health
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- include: checks.yml
|
||||
when: ceph_health.rc != 0
|
||||
|
||||
- include: pre_requisite.yml
|
||||
- include: fetch_configs.yml
|
||||
- include: start_docker_mds.yml
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
- name: set config and keys paths
|
||||
set_fact:
|
||||
ceph_config_keys:
|
||||
- /etc/ceph/ceph.client.admin.keyring
|
||||
- /etc/ceph/ceph.conf
|
||||
- /etc/ceph/monmap
|
||||
- /etc/ceph/ceph.mon.keyring
|
||||
- /var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
- /var/lib/ceph/bootstrap-mds/ceph.keyring
|
||||
|
||||
- name: stat for ceph config and keys
|
||||
stat:
|
||||
path: {{ item }}
|
||||
with_items: ceph_config_keys
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: statleftover
|
||||
|
||||
- name: fail if we find existing cluster files
|
||||
fail:
|
||||
msg: "looks like no cluster is running but ceph files are present, please remove them"
|
||||
with_together:
|
||||
- ceph_config_keys
|
||||
- statleftover.results
|
||||
when: item.1.stat.exists == true
|
|
@ -1,4 +1,13 @@
|
|||
---
|
||||
- name: check if a cluster is already running
|
||||
shell: "docker ps | grep -sq 'ceph/daemon'"
|
||||
register: ceph_health
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- include: checks.yml
|
||||
when: ceph_health.rc != 0
|
||||
|
||||
- include: pre_requisite.yml
|
||||
- include: fetch_configs.yml
|
||||
- include: start_docker_monitor.yml
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
- name: set config and keys paths
|
||||
set_fact:
|
||||
ceph_config_keys:
|
||||
- /etc/ceph/ceph.client.admin.keyring
|
||||
- /etc/ceph/ceph.conf
|
||||
- /etc/ceph/monmap
|
||||
- /etc/ceph/ceph.mon.keyring
|
||||
- /var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
- /var/lib/ceph/bootstrap-mds/ceph.keyring
|
||||
|
||||
- name: stat for ceph config and keys
|
||||
stat:
|
||||
path: {{ item }}
|
||||
with_items: ceph_config_keys
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: statleftover
|
||||
|
||||
- name: fail if we find existing cluster files
|
||||
fail:
|
||||
msg: "looks like no cluster is running but ceph files are present, please remove them"
|
||||
with_together:
|
||||
- ceph_config_keys
|
||||
- statleftover.results
|
||||
when: item.1.stat.exists == true
|
|
@ -1,4 +1,13 @@
|
|||
---
|
||||
- name: check if a cluster is already running
|
||||
shell: "docker ps | grep -sq 'ceph/daemon'"
|
||||
register: ceph_health
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- include: checks.yml
|
||||
when: ceph_health.rc != 0
|
||||
|
||||
- include: pre_requisite.yml
|
||||
- include: fetch_configs.yml
|
||||
- include: start_docker_osd.yml
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
- name: set config and keys paths
|
||||
set_fact:
|
||||
ceph_config_keys:
|
||||
- /etc/ceph/ceph.client.admin.keyring
|
||||
- /etc/ceph/ceph.conf
|
||||
- /etc/ceph/monmap
|
||||
- /etc/ceph/ceph.mon.keyring
|
||||
- /var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
- /var/lib/ceph/bootstrap-mds/ceph.keyring
|
||||
|
||||
- name: stat for ceph config and keys
|
||||
stat:
|
||||
path: {{ item }}
|
||||
with_items: ceph_config_keys
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: statleftover
|
||||
|
||||
- name: fail if we find existing cluster files
|
||||
fail:
|
||||
msg: "looks like no cluster is running but ceph files are present, please remove them"
|
||||
with_together:
|
||||
- ceph_config_keys
|
||||
- statleftover.results
|
||||
when: item.1.stat.exists == true
|
|
@ -1,4 +1,13 @@
|
|||
---
|
||||
- name: check if a cluster is already running
|
||||
shell: "docker ps | grep -sq 'ceph/daemon'"
|
||||
register: ceph_health
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- include: checks.yml
|
||||
when: ceph_health.rc != 0
|
||||
|
||||
- include: pre_requisite.yml
|
||||
- include: fetch_configs.yml
|
||||
- include: start_docker_rgw.yml
|
||||
|
|
Loading…
Reference in New Issue