Merge "Distribute rings to build dir on all swift_hosts"
This commit is contained in:
commit
450c061e6c
@ -47,7 +47,7 @@
|
||||
- { path: "/etc/swift/object-server" }
|
||||
- { path: "/etc/swift/proxy-server" }
|
||||
- { path: "/etc/swift/scripts" }
|
||||
- { path: "/etc/swift/rings" }
|
||||
- { path: "/etc/swift/ring_build_files" }
|
||||
- { path: "/openstack/log/{{ inventory_hostname }}", owner: "syslog", group: "syslog" }
|
||||
- { path: "/var/cache/swift" }
|
||||
- { path: "/var/lock/swift" }
|
||||
|
@ -58,7 +58,7 @@
|
||||
sudo: yes
|
||||
sudo_user: "{{ swift_system_user_name }}"
|
||||
args:
|
||||
chdir: /etc/swift/rings/
|
||||
chdir: /etc/swift/ring_build_files/
|
||||
tags:
|
||||
- swift-rings
|
||||
- swift-rings-build
|
||||
@ -70,7 +70,7 @@
|
||||
sudo: yes
|
||||
sudo_user: "{{ swift_system_user_name }}"
|
||||
args:
|
||||
chdir: /etc/swift/rings/
|
||||
chdir: /etc/swift/ring_build_files/
|
||||
tags:
|
||||
- swift-rings
|
||||
- swift-rings-build
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
- name: Get md5sum of local builder files
|
||||
shell: |
|
||||
cat /etc/swift/rings/*.builder 2>/dev/null | md5sum | cut -d " " -f1
|
||||
cat /etc/swift/ring_build_files/*.builder 2>/dev/null | md5sum | cut -d " " -f1
|
||||
register: md5sum
|
||||
tags:
|
||||
- swift-ring-check
|
||||
|
@ -17,9 +17,22 @@
|
||||
shell: |
|
||||
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
|
||||
-avz \
|
||||
{{ swift_system_user_name }}@{{ hostvars[groups['swift_hosts'][0]]['ansible_ssh_host'] }}:/etc/swift/rings/ \
|
||||
{{ swift_system_user_name }}@{{ hostvars[groups['swift_hosts'][0]]['ansible_ssh_host'] }}:/etc/swift/ring_build_files/ \
|
||||
/etc/swift/
|
||||
sudo: yes
|
||||
sudo_user: "{{ swift_system_user_name }}"
|
||||
tags:
|
||||
- swift-get-rings
|
||||
- swift-get-rings
|
||||
|
||||
# This task will backup the swift rings files on each node
|
||||
# This task will prevent an issue if swift_hosts[0] were removed/changes
|
||||
- name: "Copy swift rings to /etc/swift/ring_build_files for backup"
|
||||
shell: |
|
||||
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
|
||||
-avz \
|
||||
{{ swift_system_user_name }}@{{ hostvars[groups['swift_hosts'][0]]['ansible_ssh_host'] }}:/etc/swift/ring_build_files/ \
|
||||
/etc/swift/ring_build_files/
|
||||
sudo: yes
|
||||
sudo_user: "{{ swift_system_user_name }}"
|
||||
tags:
|
||||
- swift-get-rings
|
||||
|
Loading…
x
Reference in New Issue
Block a user