-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
120 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
- hosts: localhost | ||
connection: local | ||
remote_user: root | ||
vars_files: | ||
- vars/main.yml | ||
vars: | ||
rabbitmq_version: 4.0.3 | ||
rabbitmq_apt_repository: "deb [signed-by=/etc/apt/trusted.gpg.d/rabbitmq-9F4587F226208342.gpg] https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} main" | ||
rabbitmq_apt_gpg_url: https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key | ||
erlang_apt_repository: "deb [signed-by=/etc/apt/trusted.gpg.d/erlang-E495BB49CC4BBE5B.gpg] https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-erlang/deb/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} main" | ||
erlang_apt_gpg_url: https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key | ||
roles: | ||
- role: galaxy-rabbitmq | ||
tasks: | ||
- name: Enable rabbitmq management plugin | ||
rabbitmq_plugin: | ||
name: rabbitmq_management | ||
broker_state: offline | ||
state: enabled | ||
|
||
- name: Copy startup script for rabbitmq | ||
template: src=rabbitmq.sh.j2 dest=/usr/local/bin/rabbitmq.sh | ||
|
||
- name: Install rabbitmq users configuration script | ||
template: src=configure_rabbitmq_users.yml.j2 dest=/usr/local/bin/configure_rabbitmq_users.yml | ||
|
||
- name: Purge systemd and perform cleanup | ||
shell: apt purge -y systemd && apt-get autoremove -y && apt-get clean |
Submodule galaxy-rabbitmq
added at
be4e26
Submodule galaxyprojectdotorg.galaxyextras
updated
from 87cf34 to cce4b6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
- hosts: localhost | ||
connection: local | ||
become: yes | ||
tasks: | ||
- name: Delete 'guest' user | ||
rabbitmq_user: | ||
name: guest | ||
state: absent | ||
|
||
- name: Add 'admin' user | ||
rabbitmq_user: | ||
user: {{ rabbitmq_admin_username }} | ||
password: {{ rabbitmq_admin_password }} | ||
vhost: / | ||
configure_priv: .* | ||
read_priv: .* | ||
write_priv: .* | ||
tags: administrator | ||
state: present | ||
|
||
- name: Add vhost for galaxy | ||
rabbitmq_vhost: | ||
vhost: {{ rabbitmq_galaxy_vhost }} | ||
state: present | ||
|
||
- name: Add 'galaxy' user | ||
rabbitmq_user: | ||
user: {{ rabbitmq_galaxy_username }} | ||
password: {{ rabbitmq_galaxy_password }} | ||
vhost: {{ rabbitmq_galaxy_vhost }} | ||
configure_priv: .* | ||
read_priv: .* | ||
write_priv: .* | ||
state: present | ||
|
||
- name: Add 'flower' user | ||
rabbitmq_user: | ||
user: {{ rabbitmq_flower_username }} | ||
password: {{ rabbitmq_flower_password }} | ||
vhost: {{ rabbitmq_galaxy_vhost }} | ||
configure_priv: .* | ||
read_priv: .* | ||
write_priv: .* | ||
tags: administrator | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
# call "rabbitmqctl stop" when exiting | ||
# taken from https://gist.github.com/caioariede/342a583f75467509ad42 | ||
mkdir -p /var/run/rabbitmq && chown rabbitmq:rabbitmq /var/run/rabbitmq && chmod 755 /var/run/rabbitmq | ||
RABBITMQ_ENV=/usr/lib/rabbitmq/bin/rabbitmq-env | ||
RABBITMQ_SCRIPTS_DIR=$(dirname "$RABBITMQ_ENV") | ||
. /usr/lib/rabbitmq/bin/rabbitmq-env | ||
trap "{ echo Stopping rabbitmq; rabbitmqctl stop; exit 0; }" TERM | ||
|
||
echo Starting rabbitmq | ||
rabbitmq-server & | ||
|
||
# from docs: When Bash receives a signal for which a | ||
# trap has been set while waiting for a command to | ||
# complete, the trap will not be executed until the | ||
# command completes. | ||
# | ||
# This is why we use & and wait here. Idea taken from: | ||
# http://veithen.github.io/2014/11/16/sigterm-propagation.html | ||
PID=$! | ||
wait $PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters