mirror of https://github.com/ceph/ceph-ansible.git
commit
847d206005
|
@ -23,6 +23,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=644
|
mode=644
|
||||||
|
changed_when: false
|
||||||
with_together:
|
with_together:
|
||||||
- ceph_config_keys
|
- ceph_config_keys
|
||||||
- statconfig.results
|
- statconfig.results
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
---
|
|
||||||
- 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: create bootstrap directories
|
|
||||||
file: >
|
|
||||||
path=/var/lib/ceph/bootstrap-{{ item }}
|
|
||||||
state=directory
|
|
||||||
with_items:
|
|
||||||
- osd
|
|
||||||
- mds
|
|
||||||
- rgw
|
|
||||||
|
|
||||||
# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
|
|
||||||
- name: install docker-py
|
|
||||||
pip: >
|
|
||||||
name=docker-py
|
|
||||||
version=1.1.0
|
|
||||||
|
|
||||||
- name: stat for ceph config and keys
|
|
||||||
local_action: stat path={{ item }}
|
|
||||||
with_items: ceph_config_keys
|
|
||||||
changed_when: false
|
|
||||||
sudo: false
|
|
||||||
failed_when: false
|
|
||||||
register: statconfig
|
|
||||||
|
|
||||||
- name: try to fetch ceph config and keys
|
|
||||||
copy: >
|
|
||||||
src=fetch/docker_mon_files/{{ item.0 }}
|
|
||||||
dest={{ item.0 }}
|
|
||||||
owner=root
|
|
||||||
group=root
|
|
||||||
mode=644
|
|
||||||
with_together:
|
|
||||||
- ceph_config_keys
|
|
||||||
- statconfig.results
|
|
||||||
when: item.1.stat.exists == true
|
|
||||||
|
|
||||||
- name: run the ceph monitor docker image
|
|
||||||
docker: >
|
|
||||||
image="{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}"
|
|
||||||
name="{{ ansible_hostname }}"
|
|
||||||
net="host"
|
|
||||||
state="running"
|
|
||||||
env="MON_IP={{ hostvars[inventory_hostname]['ansible_' + ceph_mon_docker_interface]['ipv4']['address'] }},CEPH_DAEMON=MON,CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }},{{ ceph_mon_extra_envs }}"
|
|
||||||
volumes="/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph"
|
|
||||||
|
|
||||||
- name: push ceph files to the ansible server
|
|
||||||
fetch: >
|
|
||||||
src={{ item.0 }}
|
|
||||||
dest=fetch/docker_mon_files/{{ item.0 }}
|
|
||||||
flat=yes
|
|
||||||
with_together:
|
|
||||||
- ceph_config_keys
|
|
||||||
- statconfig.results
|
|
||||||
when: item.1.stat.exists == false
|
|
|
@ -25,6 +25,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=644
|
mode=644
|
||||||
|
changed_when: false
|
||||||
with_together:
|
with_together:
|
||||||
- ceph_config_keys
|
- ceph_config_keys
|
||||||
- statconfig.results
|
- statconfig.results
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=644
|
mode=644
|
||||||
|
changed_when: false
|
||||||
with_together:
|
with_together:
|
||||||
- ceph_config_keys
|
- ceph_config_keys
|
||||||
- statconfig.results
|
- statconfig.results
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=644
|
mode=644
|
||||||
|
changed_when: false
|
||||||
with_together:
|
with_together:
|
||||||
- ceph_config_keys
|
- ceph_config_keys
|
||||||
- statconfig.results
|
- statconfig.results
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=644
|
mode=644
|
||||||
|
changed_when: false
|
||||||
with_together:
|
with_together:
|
||||||
- ceph_config_keys
|
- ceph_config_keys
|
||||||
- statconfig.results
|
- statconfig.results
|
||||||
|
|
Loading…
Reference in New Issue