Adjust the ring-builder to happen on the local host
* This needs to be built on the host (where the inventory file is) * Copy up from local host to remote hosts * Tag directory creation from container_common * Run against only swift_hosts and swift_proxy (Avoids running against proxy containers)
This commit is contained in:
parent
e787a0de43
commit
d3d64d75d9
@ -1,10 +1,14 @@
|
|||||||
---
|
---
|
||||||
- hosts: swift_all[0]
|
- hosts: local
|
||||||
user: root
|
user: root
|
||||||
roles:
|
roles:
|
||||||
|
- { role: container_common, tags: [ 'directories' ] }
|
||||||
|
- openstack_common
|
||||||
- swift_ring_builder
|
- swift_ring_builder
|
||||||
|
vars_files:
|
||||||
|
- inventory/group_vars/swift_all.yml
|
||||||
|
|
||||||
- hosts: swift_all:!swift_all[0]
|
- hosts: swift_hosts:swift_proxy
|
||||||
user: root
|
user: root
|
||||||
roles:
|
roles:
|
||||||
- swift_ring_distribute
|
- swift_ring_distribute
|
||||||
|
@ -22,3 +22,5 @@
|
|||||||
recurse=true
|
recurse=true
|
||||||
when: container_directories is defined
|
when: container_directories is defined
|
||||||
with_items: container_directories
|
with_items: container_directories
|
||||||
|
tags:
|
||||||
|
- directories
|
||||||
|
@ -2,28 +2,20 @@
|
|||||||
- name: "make sure scripts directory exists"
|
- name: "make sure scripts directory exists"
|
||||||
file: >
|
file: >
|
||||||
state=directory
|
state=directory
|
||||||
path=/etc/swift/scripts/
|
path={{ item }}
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=0755
|
mode=0755
|
||||||
|
with_items:
|
||||||
|
- /tmp/swift/rings
|
||||||
|
- /tmp/swift/scripts
|
||||||
|
|
||||||
- name: "Retrieve the swift_rings.py file"
|
- name: "Copy the swift_rings.py file"
|
||||||
copy: >
|
copy: >
|
||||||
src=swift_rings.py
|
src=swift_rings.py
|
||||||
dest="/etc/swift/scripts/swift_rings.py"
|
dest="/tmp/swift/scripts/swift_rings.py"
|
||||||
|
|
||||||
#- name: "build rings"
|
- name: "build rings"
|
||||||
# command: /usr/bin/python /etc/swift/scripts/swift_rings.py -s /etc/rpc_deploy/rpc_user_config.yml
|
command: /usr/bin/python /tmp/swift/scripts/swift_rings.py -s /etc/rpc_deploy/rpc_user_config.yml
|
||||||
# args:
|
args:
|
||||||
# chdir: /etc/swift/rings/
|
chdir: /tmp/swift/rings/
|
||||||
|
|
||||||
- name: "List ring files to copy over"
|
|
||||||
command: "/bin/ls /etc/swift/rings/"
|
|
||||||
register: ringfiles
|
|
||||||
|
|
||||||
- name: "Fetch rings to local server"
|
|
||||||
fetch: >
|
|
||||||
src="/etc/swift/rings/{{ item }}"
|
|
||||||
dest=/tmp/swift/rings/
|
|
||||||
flat=yes
|
|
||||||
with_items: ringfiles.stdout_lines
|
|
||||||
|
@ -4,3 +4,5 @@
|
|||||||
src=/tmp/swift/rings/
|
src=/tmp/swift/rings/
|
||||||
dest=/etc/swift/rings/
|
dest=/etc/swift/rings/
|
||||||
mode=0644
|
mode=0644
|
||||||
|
owner={{ system_user }}
|
||||||
|
group={{ system_group }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user