# 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
#########
---\r
+\r
dummy:\r
\r
+###########\r
+# GENERAL #\r
+###########\r
+\r
#cephx: true\r
\r
+#fetch_directory: fetch/\r
+\r
\r
##########\r
# DOCKER #\r
# - nosizechange\r
#\r
\r
+#fetch_directory: fetch/\r
+\r
#############\r
# OPENSTACK #\r
#############\r
# 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
####################
# 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 #
##########
---\r
dummy:\r
\r
+###########\r
+# GENERAL #\r
+###########\r
+\r
## Ceph options\r
#\r
#cephx: true\r
# allowing root to not require tty\r
#radosgw_user: root\r
\r
+#fetch_directory: fetch/\r
+\r
##########\r
# DOCKER #\r
##########\r
---\r
# You can override vars by using host or group vars\r
\r
+###########\r
+# GENERAL #\r
+###########\r
+\r
+fetch_directory: fetch/\r
+\r
###########\r
# INSTALL #\r
###########\r
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
---\r
# You can override vars by using host or group vars\r
\r
+###########\r
+# GENERAL #\r
+###########\r
+\r
+fetch_directory: fetch/\r
+\r
cephx: true\r
\r
\r
- 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
- 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
# GENERAL #\r
###########\r
\r
+fetch_directory: fetch/\r
+\r
rgw_group_name: rgws\r
\r
# ACTIVATE BOTH FSID AND MONITOR_SECRET VARIABLES FOR NON-VAGRANT DEPLOYMENT\r
- 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 }}"
---
- 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
- 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
- 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
# You can override default vars defined in defaults/main.yml here,\r
# but I would advice to use host or group vars instead\r
\r
+###########\r
+# GENERAL #\r
+###########\r
+\r
+fetch_directory: fetch/\r
+\r
####################\r
# OSD CRUSH LOCATION\r
####################\r
- 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
- 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
---
+
+###########
+# GENERAL #
+###########
+
+fetch_directory: fetch/
+
##########
# DOCKER #
##########
- 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
- 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
---\r
# You can override vars by using host or group vars\r
\r
+###########\r
+# GENERAL #\r
+###########\r
+\r
+fetch_directory: fetch/\r
+\r
## Ceph options\r
#\r
cephx: true\r
- 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
- 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