Fix skipping start and bootstrap of RabbitMQ

When building a kolla image for bifrost we need to skip starting
services and bootstrapping tasks. This needs to apply also to the
RabbitMQ role.

Also removes rabbitmq packages that crept into the package list for
Ubuntu 18.04.

Change-Id: I5698ccf85f9b909cb23c611b8329b3f363430793
This commit is contained in:
Mark Goddard 2019-04-02 13:08:57 +01:00
parent c21c32d5cb
commit bbb5060deb
4 changed files with 7 additions and 5 deletions

View File

@ -4,7 +4,6 @@ init_dest_dir: /lib/systemd/system/
init_ext: .service
required_packages:
- mysql-server
- rabbitmq-server
- python-dev
- python-mysqldb
- python-configparser

View File

@ -54,7 +54,7 @@
- name: "Install RabbitMQ if required"
import_role:
name: bifrost-rabbitmq
when: use_rabbitmq
when: use_rabbitmq | bool
- name: "Install Ironic deps"
include: install.yml

View File

@ -4,7 +4,6 @@ init_dest_dir: /lib/systemd/system/
init_ext: .service
required_packages:
- mysql-server
- rabbitmq-server
- python-dev
- python-mysqldb
- python-configparser

View File

@ -15,7 +15,7 @@
package:
name: "{{ rabbitmq_package }}"
state: present
when: skip_package_install | bool != True
when: not skip_package_install | bool
# NOTE(hwoarang): The erlang SUSE package forces epmd to listen on localhost
# address which breaks rabbitmq-server when listening on a different address.
@ -37,12 +37,16 @@
with_items:
- epmd.socket
- epmd
when: ansible_os_family == 'Suse'
when:
- ansible_os_family == 'Suse'
- not skip_bootstrap | bool
- import_tasks: start.yml
when: not skip_start | bool
- name: "Ensure guest user is removed from rabbitmq"
rabbitmq_user:
user: "guest"
state: absent
force: yes
when: not skip_bootstrap | bool