Merge "Use synchronize module for rings distribution"
This commit is contained in:
commit
58e003f44e
@ -13,37 +13,15 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# NOTE(cloudnull): These methods have been changed to use the rsync command
|
- name: Pull swift rings to localhost
|
||||||
# instead of the Synchronize module. The change was required due to an upstream
|
synchronize:
|
||||||
# issue with the module when running with delegate_to and become. Sadly the fix
|
src: /etc/swift/ring_build_files/
|
||||||
# does not seem to be trivial. "https://github.com/ansible/ansible/issues/15405"
|
dest: "{{ lookup('env', 'OSA_CONFIG_DIR') }}/ring_build_files/"
|
||||||
|
mode: pull
|
||||||
|
when: _swift_is_first_play_host
|
||||||
|
|
||||||
# TODO(logan): Change to synchronize module to pass ANSIBLE0006
|
- name: Upload swift rings
|
||||||
# and remove the skip_ansible_lint tag at that time.
|
synchronize:
|
||||||
- name: "Get swift rings"
|
src: "{{ lookup('env', 'OSA_CONFIG_DIR') }}/ring_build_files/"
|
||||||
command: >
|
dest: /etc/swift/
|
||||||
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
mode: push
|
||||||
-avz {{ swift_system_user_name }}@{{ hostvars[groups['swift_hosts'][0]]['ansible_host'] }}:/etc/swift/ring_build_files/
|
|
||||||
/etc/swift/
|
|
||||||
args:
|
|
||||||
warn: no
|
|
||||||
become: yes
|
|
||||||
become_user: "{{ swift_system_user_name }}"
|
|
||||||
changed_when: false
|
|
||||||
tags:
|
|
||||||
- skip_ansible_lint
|
|
||||||
|
|
||||||
# TODO(logan): Change to synchronize module to pass ANSIBLE0006
|
|
||||||
# and remove the skip_ansible_lint tag at that time.
|
|
||||||
- name: "Get swift rings for backup in ring_build_files directory"
|
|
||||||
command: >
|
|
||||||
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
|
||||||
-avz {{ swift_system_user_name }}@{{ hostvars[groups['swift_hosts'][0]]['ansible_host'] }}:/etc/swift/ring_build_files/
|
|
||||||
/etc/swift/ring_build_files/
|
|
||||||
args:
|
|
||||||
warn: no
|
|
||||||
become: yes
|
|
||||||
become_user: "{{ swift_system_user_name }}"
|
|
||||||
changed_when: false
|
|
||||||
tags:
|
|
||||||
- skip_ansible_lint
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user