Remove md5 checks of rings/builders

Rsync step already ensures that all the files are correct, no
point in doing it again.

Change-Id: If2eec244312540122edae19ba1fae3e1d172a285
This commit is contained in:
Daniel 'f0o' Preussker
2025-04-11 16:06:58 +00:00
committed by Daniel Preussker
parent fc3abc44ae
commit 1e00a603b9
4 changed files with 0 additions and 90 deletions

View File

@@ -13,21 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Including swift_rings_md5sum tasks
ansible.builtin.include_tasks: swift_rings_md5sum.yml
- name: Including swift_rings_check tasks
ansible.builtin.include_tasks: swift_rings_check.yml
when: _swift_is_first_play_host
- name: Including swift_rings_build tasks
ansible.builtin.include_tasks: swift_rings_build.yml
when: _swift_is_first_play_host
- name: Including swift_rings_distribute tasks
ansible.builtin.include_tasks: swift_rings_distribute.yml
- name: Including swift_rings_md5sum tasks
ansible.builtin.include_tasks: swift_rings_md5sum.yml
- name: Including swift_rings_post_distribution_check tasks
ansible.builtin.include_tasks: swift_rings_post_distribution_check.yml

View File

@@ -1,41 +0,0 @@
---
# 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: Get md5sum of local builder files
ansible.builtin.shell: |
cat /etc/swift/*.builder 2>/dev/null | md5sum | cut -d " " -f1
changed_when: false
register: md5sum
- name: Get empty md5sum
ansible.builtin.shell: |
echo -n | md5sum | cut -d " " -f1
changed_when: false
register: empty_md5sum
# Fail if the remote hosts builder files is not empty AND
# does not match the md5sum of the local host.
- name: Verify md5sum of builder files
ansible.builtin.fail:
msg: >
"The builder files on the remote host {{ item }}:{{ hostvars[item]['builder_md5sum'] }}
do not match {{ inventory_hostname }}:{{ md5sum.stdout }}
and are not empty on the remote host"
when:
- hostvars[item] is defined
- hostvars[item]['builder_md5sum'] is defined
- hostvars[item]['builder_md5sum'] != empty_md5sum.stdout
- hostvars[item]['builder_md5sum'] != md5sum.stdout
with_items: "{{ groups['swift_all'] + groups['swift_remote_all'] }}"

View File

@@ -1,24 +0,0 @@
---
# 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: Get md5sum of builder files
ansible.builtin.shell: |
cat /etc/swift/*.builder 2>/dev/null | md5sum | cut -d " " -f1
changed_when: false
register: md5sum
- name: Register a fact for the md5sum
ansible.builtin.set_fact:
builder_md5sum: "{{ md5sum.stdout }}"

View File

@@ -13,22 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Get md5sum of local builder files
ansible.builtin.shell: |
cat /etc/swift/*.builder 2>/dev/null | md5sum | cut -d " " -f1
changed_when: false
register: md5sum
# Fail if the remote hosts builder files don't match
# As this is post sync all should match and not be empty
- name: Verify md5sum of builder files
ansible.builtin.fail:
msg: >
"The builder files on the remote host {{ item }}:{{ hostvars[item]['builder_md5sum'] }}
do not match {{ inventory_hostname }}:{{ md5sum.stdout }}"
when: hostvars[item]['builder_md5sum'] != md5sum.stdout
with_items: "{{ groups['swift_all'] + groups['swift_remote_all'] }}"
- name: "Copy the swift_rings_check.py file"
ansible.builtin.template:
src: swift_rings_check.py.j2