mirror of
https://github.com/rocky-linux/ansible-role-rabbitmq.git
synced 2024-12-04 18:36:26 +00:00
use FQCN
This commit is contained in:
parent
a1b89ff8d9
commit
819ea61b4d
@ -1,5 +1,7 @@
|
||||
---
|
||||
warn_list:
|
||||
- '204' # Lines should be less than 160 characters
|
||||
- '701' # meta/main.yml should contain relevant info
|
||||
- '701'
|
||||
skip_list:
|
||||
- '106' # Role name must match ^[a-z][a-z0-9_]+$ pattern
|
||||
- '204'
|
||||
- '106'
|
||||
...
|
||||
|
@ -36,11 +36,11 @@ rabbitmq_plugins:
|
||||
- rabbitmq_peer_discovery_common
|
||||
|
||||
# If you want monitoring, set these in your playbooks
|
||||
#rabbitmq_monitoring_username: mq-monitoring
|
||||
#rabbitmq_monitoring_password: NotASafePassword
|
||||
# rabbitmq_monitoring_username: mq-monitoring
|
||||
# rabbitmq_monitoring_password: NotASafePassword
|
||||
|
||||
# Enable the public pubsub or not
|
||||
rabbitmq_enable_public: false
|
||||
#pubsub_federation_pass: ...
|
||||
# pubsub_federation_pass: ...
|
||||
|
||||
rabbitmq_mbs_password: "ThisIsNotThePassword!"
|
||||
|
@ -21,6 +21,7 @@ jobs:
|
||||
run: |
|
||||
echo '[defaults]' > ansible.cfg
|
||||
echo 'collections_paths = ./collections' >> ansible.cfg
|
||||
|
||||
- name: Install role requirements
|
||||
run: ansible-galaxy role install -r molecule/requirements.yml
|
||||
# TODO: Figure out how to get this not to error so this action is universal
|
||||
|
@ -9,6 +9,9 @@ galaxy_info:
|
||||
- name: EL
|
||||
versions:
|
||||
- 8
|
||||
- 9
|
||||
galaxy_tags: []
|
||||
dependencies:
|
||||
- ansible.posix
|
||||
- community.general
|
||||
- community.rabbitmq
|
||||
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
become: true
|
||||
|
||||
pre_tasks:
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=true cache_valid_time=600
|
||||
when: ansible_os_family == 'Debian'
|
||||
changed_when: false
|
||||
|
||||
roles:
|
||||
- role: ansible-role-mycoolrole
|
@ -1,26 +0,0 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
options:
|
||||
ignore-certs: true
|
||||
role-file: molecule/requirements.yml
|
||||
|
||||
driver:
|
||||
name: docker
|
||||
|
||||
# lint: |
|
||||
# set -e
|
||||
# yamllint .
|
||||
# ansible-lint
|
||||
platforms:
|
||||
- name: instance
|
||||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
|
||||
command: ${MOLECULE_DOCKER_COMMAND:-""}
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
privileged: true
|
||||
pre_build_image: true
|
||||
provisioner:
|
||||
name: ansible
|
||||
playbooks:
|
||||
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
roles:
|
||||
## Deps go here Should be very short and only if Absolutely needed
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
# RabbitMQ Tasks
|
||||
- name: Install required packages for RabbitMQ
|
||||
yum:
|
||||
ansible.builtin.dnf:
|
||||
name: rabbitmq-server
|
||||
state: present
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
state: true
|
||||
|
||||
- name: Deploy RabbitMQ configuration
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "etc/rabbitmq/{{ item }}.j2"
|
||||
dest: "/etc/rabbitmq/{{ item }}"
|
||||
owner: rabbitmq
|
||||
@ -25,7 +25,7 @@
|
||||
- restart_rabbitmq
|
||||
|
||||
- name: Deploy erlang cookie
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
owner: rabbitmq
|
||||
group: rabbitmq
|
||||
mode: '0600'
|
||||
@ -35,7 +35,7 @@
|
||||
- restart_rabbitmq
|
||||
|
||||
- name: Create systemd override for RabbitMQ
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/system/rabbitmq-server.service.d
|
||||
state: directory
|
||||
owner: root
|
||||
@ -43,7 +43,7 @@
|
||||
mode: '0755'
|
||||
|
||||
- name: Override nofile limit for RabbitMQ
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/systemd/system/rabbitmq-server.service.d/99-override.conf
|
||||
owner: root
|
||||
group: root
|
||||
@ -54,11 +54,11 @@
|
||||
|
||||
# We are doing it the command line way
|
||||
- name: Enable RabbitMQ Plugins
|
||||
command: "rabbitmq-plugins enable {{ rabbitmq_plugins | join(' ') }}"
|
||||
ansible.builtin.command: "rabbitmq-plugins enable {{ rabbitmq_plugins | join(' ') }}"
|
||||
changed_when: "1 != 1"
|
||||
|
||||
- name: Ensure file ownership for plugins
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: /etc/rabbitmq/enabled_plugins
|
||||
owner: rabbitmq
|
||||
group: rabbitmq
|
||||
@ -66,7 +66,7 @@
|
||||
state: file
|
||||
|
||||
- name: Ensure file ownership for certificate
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
owner: rabbitmq
|
||||
group: rabbitmq
|
||||
@ -93,7 +93,7 @@
|
||||
- 35672-35682/tcp
|
||||
|
||||
- name: Non-master nodes should wait for 001 to be up first
|
||||
wait_for:
|
||||
ansible.builtin.wait_for:
|
||||
host: "{{ rabbitmq_cluster_list[0] }}"
|
||||
port: '5672'
|
||||
delay: '15'
|
||||
@ -102,7 +102,7 @@
|
||||
when: "'rabbitmq001' not in inventory_hostname"
|
||||
|
||||
- name: Ensure RabbitMQ is running
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: rabbitmq-server
|
||||
state: started
|
||||
enabled: true
|
||||
|
@ -26,7 +26,7 @@
|
||||
- rabbitmq_cluster
|
||||
|
||||
- name: Drop the admin password in a file for admin operations
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
dest: /root/.rabbitmqpass
|
||||
content: "{{ rabbitmq_admin_password }}"
|
||||
mode: '0600'
|
||||
|
Loading…
Reference in New Issue
Block a user