Reload systemd after installing rabbitmq

To ensure that the rabbitmq-server service is registered, reload the
systemd daemon after installing the rabbitmq package.

Change-Id: I33f7e6d5647509371a29c368f5cf0a21ab2a5ef7
This commit is contained in:
Jimmy McCrory 2016-06-17 21:04:59 -07:00
parent 5bca9cbd3d
commit 66d0530cfb
4 changed files with 23 additions and 0 deletions

View File

@ -45,6 +45,7 @@
- name: Install the RabbitMQ package
apt:
deb: "{{ rabbitmq_package_path }}"
register: install_rabbitmq
tags:
- rabbitmq-package-deb
- rabbitmq-apt-packages

View File

@ -37,6 +37,7 @@
- name: Install the RabbitMQ package
yum:
name: "{{ rabbitmq_package_path }}"
register: install_rabbitmq
tags:
- rabbitmq-package-rpm
- rabbitmq-yum-packages

View File

@ -24,6 +24,18 @@
tags:
- always
- name: Check init system
command: cat /proc/1/comm
register: _pid1_name
tags:
- always
- name: Set the name of pid1
set_fact:
pid1_name: "{{ _pid1_name.stdout }}"
tags:
- always
- include: rabbitmq_pre_install.yml
# The install process will be skipped if `rabbitmq_ignore_version_state=true`

View File

@ -27,6 +27,15 @@
tags:
- rabbitmq-yum-packages
- name: Reload the systemd daemon
command: "systemctl daemon-reload"
when:
- install_rabbitmq | changed
- pid1_name == "systemd"
tags:
- rabbitmq-apt-packages
- rabbitmq-yum-packages
- name: Install pip packages
pip:
name: "{{ item }}"