fd498ad456
With the more recent versions of ansible, we should now use "is" instead of the "|" sign for the tests. This should fix it. Change-Id: I70c853d9aba11eb91ab25f7a29417d0ec50fdf3d
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
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: Download the RabbitMQ package
|
|
get_url:
|
|
url: "{{ rabbitmq_package_url }}"
|
|
dest: "{{ rabbitmq_package_path }}"
|
|
mode: "0644"
|
|
checksum: "sha256:{{ rabbitmq_package_sha256 }}"
|
|
register: package_download
|
|
retries: 3
|
|
delay: 10
|
|
until: package_download is success
|
|
when: rabbitmq_install_method == 'file'
|
|
tags:
|
|
- rabbitmq-package-deb
|
|
- rabbitmq-package-deb-get
|
|
- rabbitmq-package-rpm
|
|
- rabbitmq-package-rpm-get
|
|
|
|
- name: Fix /etc/hosts
|
|
lineinfile:
|
|
dest: /etc/hosts
|
|
state: present
|
|
line: "{{ item.address }} {{ item.hostnames | join(' ') }}"
|
|
with_items: "{{ rabbitmq_hosts_entries }}"
|
|
tags:
|
|
- rabbitmq-config
|
|
|
|
- name: Ensure localhost /etc/hosts entry is correct
|
|
lineinfile:
|
|
dest: /etc/hosts
|
|
state: present
|
|
line: '127.0.0.1 localhost'
|
|
regexp: '^127.0.0.1'
|
|
tags:
|
|
- rabbitmq-config
|
|
|
|
- name: Create the local directories
|
|
file:
|
|
path: "/etc/rabbitmq/"
|
|
state: "directory"
|
|
group: "root"
|
|
owner: "root"
|
|
mode: "0755"
|
|
tags:
|
|
- rabbitmq-config
|