openstack-ansible-os_swift/tasks/swift_rings_distribute.yml
Dmitriy Rabotyagov c2665d032c Use synchronize module for rings distribution
Instead of using rsync which do not respect ssh ports, we fetch rings
to the deploy host and distribute them back to swift hosts

Change-Id: I9f8bc0af9803d2a235b3da956b5618adfe195c00
Closes-Bug: #1904935
2020-12-03 19:31:58 +02:00

28 lines
943 B
YAML

---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Pull swift rings to localhost
synchronize:
src: /etc/swift/ring_build_files/
dest: "{{ lookup('env', 'OSA_CONFIG_DIR') }}/ring_build_files/"
mode: pull
when: _swift_is_first_play_host
- name: Upload swift rings
synchronize:
src: "{{ lookup('env', 'OSA_CONFIG_DIR') }}/ring_build_files/"
dest: /etc/swift/
mode: push