Use checksum option when downloading RabbitMQ

The 'sha256sum' option for the get_url module has been deprecated and
replaced with 'checksum'. The download is skipped if an existing file
already has the expected checksum, making the task to remove an existing
RabbitMQ package file unnecessary.

Change-Id: Icd41e6a316f319bbdfae303592f0f8fde919a312
This commit is contained in:
Jimmy McCrory 2017-04-11 00:35:52 -07:00
parent b64d6bd168
commit 3964388c50
2 changed files with 2 additions and 13 deletions

View File

@ -18,7 +18,7 @@ galaxy_info:
description: Install rabbitmq server
company: Rackspace
license: Apache2
min_ansible_version: 1.6.6
min_ansible_version: 2.0
platforms:
- name: Ubuntu
versions:

View File

@ -13,23 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Remove package rabbit if found for upgrade
file:
path: "{{ rabbitmq_package_path }}"
state: absent
tags:
- rabbitmq-upgrade
- rabbitmq-package-deb
- rabbitmq-package-deb-get
- rabbitmq-package-rpm
- rabbitmq-package-rpm-get
- name: Download the RabbitMQ package
get_url:
url: "{{ rabbitmq_package_url }}"
dest: "{{ rabbitmq_package_path }}"
mode: "0644"
sha256sum: "{{ rabbitmq_package_sha256 }}"
checksum: "sha256:{{ rabbitmq_package_sha256 }}"
register: package_download
retries: 3
delay: 10