mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #395 from mattt416/make_fetch_configurable
Make fetch directory configurablepull/396/head
commit
cc11187430
|
@ -4,6 +4,12 @@
|
|||
# Dummy variable to avoid error because ansible does not recognize the file as a good configuration file when no variable in it.
|
||||
dummy:
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
#fetch_directory: fetch/
|
||||
|
||||
#########
|
||||
# INSTALL
|
||||
#########
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
---
|
||||
|
||||
dummy:
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
#cephx: true
|
||||
|
||||
#fetch_directory: fetch/
|
||||
|
||||
|
||||
##########
|
||||
# DOCKER #
|
||||
|
|
|
@ -33,6 +33,8 @@ dummy:
|
|||
# - nosizechange
|
||||
#
|
||||
|
||||
#fetch_directory: fetch/
|
||||
|
||||
#############
|
||||
# OPENSTACK #
|
||||
#############
|
||||
|
|
|
@ -5,6 +5,12 @@
|
|||
# Dummy variable to avoid error because ansible does not recognize the file as a good configuration file when no variable in it.
|
||||
dummy:
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
#fetch_directory: fetch/
|
||||
|
||||
####################
|
||||
# OSD CRUSH LOCATION
|
||||
####################
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
# Dummy variable to avoid error because ansible does not recognize the file as a good configuration file when no variable in it.
|
||||
dummy:
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
#fetch_directory: fetch/
|
||||
|
||||
##########
|
||||
# DOCKER #
|
||||
##########
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
dummy:
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
## Ceph options
|
||||
#
|
||||
#cephx: true
|
||||
|
@ -10,6 +14,8 @@ dummy:
|
|||
# allowing root to not require tty
|
||||
#radosgw_user: root
|
||||
|
||||
#fetch_directory: fetch/
|
||||
|
||||
##########
|
||||
# DOCKER #
|
||||
##########
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
# You can override vars by using host or group vars
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
fetch_directory: fetch/
|
||||
|
||||
###########
|
||||
# INSTALL #
|
||||
###########
|
||||
|
|
|
@ -50,21 +50,21 @@
|
|||
register: socketrgw
|
||||
|
||||
- name: create a local fetch directory if it doesn't exist
|
||||
local_action: file path=fetch state=directory
|
||||
local_action: file path={{ fetch_directory }} state=directory
|
||||
changed_when: false
|
||||
sudo: false
|
||||
run_once: true
|
||||
|
||||
- name: generate cluster uuid
|
||||
local_action: shell uuidgen | tee fetch/ceph_cluster_uuid.conf
|
||||
creates=fetch/ceph_cluster_uuid.conf
|
||||
local_action: shell uuidgen | tee {{ fetch_directory }}/ceph_cluster_uuid.conf
|
||||
creates={{ fetch_directory }}/ceph_cluster_uuid.conf
|
||||
register: cluster_uuid
|
||||
sudo: false
|
||||
when: fsid != '4a158d27-f750-41d5-9e7f-26ce4c9d2d45'
|
||||
|
||||
- name: read cluster uuid if it already exists
|
||||
local_action: command cat fetch/ceph_cluster_uuid.conf
|
||||
removes=fetch/ceph_cluster_uuid.conf
|
||||
local_action: command cat {{ fetch_directory }}/ceph_cluster_uuid.conf
|
||||
removes={{ fetch_directory }}/ceph_cluster_uuid.conf
|
||||
changed_when: false
|
||||
register: cluster_uuid
|
||||
sudo: false
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
# You can override vars by using host or group vars
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
fetch_directory: fetch/
|
||||
|
||||
cephx: true
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: try to fetch ceph config and keys
|
||||
copy: >
|
||||
src=fetch/docker_mon_files/{{ item.0 }}
|
||||
src={{ fetch_directory }}/docker_mon_files/{{ item.0 }}
|
||||
dest={{ item.0 }}
|
||||
owner=root
|
||||
group=root
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: copy mds bootstrap key
|
||||
copy: >
|
||||
src=fetch/{{ fsid }}/var/lib/ceph/bootstrap-mds/ceph.keyring
|
||||
src={{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-mds/ceph.keyring
|
||||
dest=/var/lib/ceph/bootstrap-mds/ceph.keyring
|
||||
owner=root
|
||||
group=root
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
# GENERAL #
|
||||
###########
|
||||
|
||||
fetch_directory: fetch/
|
||||
|
||||
rgw_group_name: rgws
|
||||
|
||||
# ACTIVATE BOTH FSID AND MONITOR_SECRET VARIABLES FOR NON-VAGRANT DEPLOYMENT
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
- name: copy keys to the ansible server
|
||||
fetch: >
|
||||
src={{ item }}
|
||||
dest=fetch/{{ fsid }}/{{ item }}
|
||||
dest={{ fetch_directory }}/{{ fsid }}/{{ item }}
|
||||
flat=yes
|
||||
with_items:
|
||||
- "{{ ceph_keys.stdout_lines }}"
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
- name: generate monitor initial keyring
|
||||
local_action: >
|
||||
shell python -c "import os ; import struct ; import time; import base64 ; key = os.urandom(16) ; header = struct.pack('<hiih',1,int(time.time()),0,len(key)) ; print base64.b64encode(header + key)" | tee fetch/monitor_keyring.conf
|
||||
creates=fetch/monitor_keyring.conf
|
||||
shell python -c "import os ; import struct ; import time; import base64 ; key = os.urandom(16) ; header = struct.pack('<hiih',1,int(time.time()),0,len(key)) ; print base64.b64encode(header + key)" | tee {{ fetch_directory }}/monitor_keyring.conf
|
||||
creates={{ fetch_directory }}/monitor_keyring.conf
|
||||
register: monitor_keyring
|
||||
sudo: false
|
||||
when: monitor_secret != 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw=='
|
||||
|
||||
- name: read monitor initial keyring if it already exists
|
||||
local_action: >
|
||||
command cat fetch/monitor_keyring.conf
|
||||
removes=fetch/monitor_keyring.conf
|
||||
command cat {{ fetch_directory }}/monitor_keyring.conf
|
||||
removes={{ fetch_directory }}/monitor_keyring.conf
|
||||
changed_when: false
|
||||
register: monitor_keyring
|
||||
sudo: false
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
- name: push ceph files to the ansible server
|
||||
fetch: >
|
||||
src={{ item.0 }}
|
||||
dest=fetch/docker_mon_files/{{ item.0 }}
|
||||
dest={{ fetch_directory }}/docker_mon_files/{{ item.0 }}
|
||||
flat=yes
|
||||
with_together:
|
||||
- ceph_config_keys
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
- name: try to fetch ceph config and keys
|
||||
copy: >
|
||||
src=fetch/docker_mon_files/{{ item.0 }}
|
||||
src={{ fetch_directory }}/docker_mon_files/{{ item.0 }}
|
||||
dest={{ item.0 }}
|
||||
owner=root
|
||||
group=root
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
# You can override default vars defined in defaults/main.yml here,
|
||||
# but I would advice to use host or group vars instead
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
fetch_directory: fetch/
|
||||
|
||||
####################
|
||||
# OSD CRUSH LOCATION
|
||||
####################
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
- name: try to fetch ceph config and keys
|
||||
copy: >
|
||||
src=fetch/docker_mon_files/{{ item.0 }}
|
||||
src={{ fetch_directory }}/docker_mon_files/{{ item.0 }}
|
||||
dest={{ item.0 }}
|
||||
owner=root
|
||||
group=root
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
- name: copy osd bootstrap key
|
||||
copy: >
|
||||
src=fetch/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||
src={{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||
dest=/var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||
owner=root
|
||||
group=root
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
---
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
fetch_directory: fetch/
|
||||
|
||||
##########
|
||||
# DOCKER #
|
||||
##########
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
- name: try to fetch ceph config and keys
|
||||
copy: >
|
||||
src=fetch/docker_mon_files/{{ item.0 }}
|
||||
src={{ fetch_directory }}/docker_mon_files/{{ item.0 }}
|
||||
dest={{ item.0 }}
|
||||
owner=root
|
||||
group=root
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
- name: copy ceph rest api keyring
|
||||
copy: >
|
||||
src=fetch/{{ fsid }}/etc/ceph/ceph.client.restapi.keyring
|
||||
src={{ fetch_directory }}/{{ fsid }}/etc/ceph/ceph.client.restapi.keyring
|
||||
dest=/var/lib/ceph/restapi/ceph-restapi/keyring
|
||||
owner=root
|
||||
group=root
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
# You can override vars by using host or group vars
|
||||
|
||||
###########
|
||||
# GENERAL #
|
||||
###########
|
||||
|
||||
fetch_directory: fetch/
|
||||
|
||||
## Ceph options
|
||||
#
|
||||
cephx: true
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
- name: try to fetch ceph config and keys
|
||||
copy: >
|
||||
src=fetch/docker_mon_files/{{ item.0 }}
|
||||
src={{ fetch_directory }}/docker_mon_files/{{ item.0 }}
|
||||
dest={{ item.0 }}
|
||||
owner=root
|
||||
group=root
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
- name: copy rados gateway bootstrap key
|
||||
copy: >
|
||||
src=fetch/{{ fsid }}/var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
src={{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
dest=/var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
owner=root
|
||||
group=root
|
||||
|
|
Loading…
Reference in New Issue