From 3964388c50914bbc105e7ece5c0e78bf9b4d8cc6 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Tue, 11 Apr 2017 00:35:52 -0700 Subject: [PATCH] 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 --- meta/main.yml | 2 +- tasks/rabbitmq_pre_install.yml | 13 +------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 8f264cc4..98e6538c 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -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: diff --git a/tasks/rabbitmq_pre_install.yml b/tasks/rabbitmq_pre_install.yml index 53a490bc..3531c053 100644 --- a/tasks/rabbitmq_pre_install.yml +++ b/tasks/rabbitmq_pre_install.yml @@ -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