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
|
||||
roles:
|
||||
- { role: container_common, tags: [ 'directories' ] }
|
||||
- openstack_common
|
||||
- swift_ring_builder
|
||||
vars_files:
|
||||
- inventory/group_vars/swift_all.yml
|
||||
|
||||
- hosts: swift_all:!swift_all[0]
|
||||
- hosts: swift_hosts:swift_proxy
|
||||
user: root
|
||||
roles:
|
||||
- swift_ring_distribute
|
||||
|
@ -22,3 +22,5 @@
|
||||
recurse=true
|
||||
when: container_directories is defined
|
||||
with_items: container_directories
|
||||
tags:
|
||||
- directories
|
||||
|
@ -2,28 +2,20 @@
|
||||
- name: "make sure scripts directory exists"
|
||||
file: >
|
||||
state=directory
|
||||
path=/etc/swift/scripts/
|
||||
path={{ item }}
|
||||
owner=root
|
||||
group=root
|
||||
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: >
|
||||
src=swift_rings.py
|
||||
dest="/etc/swift/scripts/swift_rings.py"
|
||||
dest="/tmp/swift/scripts/swift_rings.py"
|
||||
|
||||
#- name: "build rings"
|
||||
# command: /usr/bin/python /etc/swift/scripts/swift_rings.py -s /etc/rpc_deploy/rpc_user_config.yml
|
||||
# args:
|
||||
# chdir: /etc/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
|
||||
- name: "build rings"
|
||||
command: /usr/bin/python /tmp/swift/scripts/swift_rings.py -s /etc/rpc_deploy/rpc_user_config.yml
|
||||
args:
|
||||
chdir: /tmp/swift/rings/
|
||||
|
@ -4,3 +4,5 @@
|
||||
src=/tmp/swift/rings/
|
||||
dest=/etc/swift/rings/
|
||||
mode=0644
|
||||
owner={{ system_user }}
|
||||
group={{ system_group }}
|
||||
|
Loading…
Reference in New Issue
Block a user