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:
|
warn_list:
|
||||||
- '204' # Lines should be less than 160 characters
|
- '701'
|
||||||
- '701' # meta/main.yml should contain relevant info
|
|
||||||
skip_list:
|
skip_list:
|
||||||
- '106' # Role name must match ^[a-z][a-z0-9_]+$ pattern
|
- '204'
|
||||||
|
- '106'
|
||||||
|
...
|
||||||
|
@ -21,6 +21,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo '[defaults]' > ansible.cfg
|
echo '[defaults]' > ansible.cfg
|
||||||
echo 'collections_paths = ./collections' >> ansible.cfg
|
echo 'collections_paths = ./collections' >> ansible.cfg
|
||||||
|
|
||||||
- name: Install role requirements
|
- name: Install role requirements
|
||||||
run: ansible-galaxy role install -r molecule/requirements.yml
|
run: ansible-galaxy role install -r molecule/requirements.yml
|
||||||
# TODO: Figure out how to get this not to error so this action is universal
|
# TODO: Figure out how to get this not to error so this action is universal
|
||||||
|
@ -9,6 +9,9 @@ galaxy_info:
|
|||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 8
|
- 8
|
||||||
|
- 9
|
||||||
galaxy_tags: []
|
galaxy_tags: []
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- ansible.posix
|
||||||
|
- community.general
|
||||||
- community.rabbitmq
|
- 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
|
# RabbitMQ Tasks
|
||||||
- name: Install required packages for RabbitMQ
|
- name: Install required packages for RabbitMQ
|
||||||
yum:
|
ansible.builtin.dnf:
|
||||||
name: rabbitmq-server
|
name: rabbitmq-server
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
state: true
|
state: true
|
||||||
|
|
||||||
- name: Deploy RabbitMQ configuration
|
- name: Deploy RabbitMQ configuration
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: "etc/rabbitmq/{{ item }}.j2"
|
src: "etc/rabbitmq/{{ item }}.j2"
|
||||||
dest: "/etc/rabbitmq/{{ item }}"
|
dest: "/etc/rabbitmq/{{ item }}"
|
||||||
owner: rabbitmq
|
owner: rabbitmq
|
||||||
@ -25,7 +25,7 @@
|
|||||||
- restart_rabbitmq
|
- restart_rabbitmq
|
||||||
|
|
||||||
- name: Deploy erlang cookie
|
- name: Deploy erlang cookie
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
owner: rabbitmq
|
owner: rabbitmq
|
||||||
group: rabbitmq
|
group: rabbitmq
|
||||||
mode: '0600'
|
mode: '0600'
|
||||||
@ -35,7 +35,7 @@
|
|||||||
- restart_rabbitmq
|
- restart_rabbitmq
|
||||||
|
|
||||||
- name: Create systemd override for RabbitMQ
|
- name: Create systemd override for RabbitMQ
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: /etc/systemd/system/rabbitmq-server.service.d
|
path: /etc/systemd/system/rabbitmq-server.service.d
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
@ -43,7 +43,7 @@
|
|||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: Override nofile limit for RabbitMQ
|
- name: Override nofile limit for RabbitMQ
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/systemd/system/rabbitmq-server.service.d/99-override.conf
|
dest: /etc/systemd/system/rabbitmq-server.service.d/99-override.conf
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@ -54,11 +54,11 @@
|
|||||||
|
|
||||||
# We are doing it the command line way
|
# We are doing it the command line way
|
||||||
- name: Enable RabbitMQ Plugins
|
- name: Enable RabbitMQ Plugins
|
||||||
command: "rabbitmq-plugins enable {{ rabbitmq_plugins | join(' ') }}"
|
ansible.builtin.command: "rabbitmq-plugins enable {{ rabbitmq_plugins | join(' ') }}"
|
||||||
changed_when: "1 != 1"
|
changed_when: "1 != 1"
|
||||||
|
|
||||||
- name: Ensure file ownership for plugins
|
- name: Ensure file ownership for plugins
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: /etc/rabbitmq/enabled_plugins
|
path: /etc/rabbitmq/enabled_plugins
|
||||||
owner: rabbitmq
|
owner: rabbitmq
|
||||||
group: rabbitmq
|
group: rabbitmq
|
||||||
@ -66,7 +66,7 @@
|
|||||||
state: file
|
state: file
|
||||||
|
|
||||||
- name: Ensure file ownership for certificate
|
- name: Ensure file ownership for certificate
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
owner: rabbitmq
|
owner: rabbitmq
|
||||||
group: rabbitmq
|
group: rabbitmq
|
||||||
@ -93,7 +93,7 @@
|
|||||||
- 35672-35682/tcp
|
- 35672-35682/tcp
|
||||||
|
|
||||||
- name: Non-master nodes should wait for 001 to be up first
|
- name: Non-master nodes should wait for 001 to be up first
|
||||||
wait_for:
|
ansible.builtin.wait_for:
|
||||||
host: "{{ rabbitmq_cluster_list[0] }}"
|
host: "{{ rabbitmq_cluster_list[0] }}"
|
||||||
port: '5672'
|
port: '5672'
|
||||||
delay: '15'
|
delay: '15'
|
||||||
@ -102,7 +102,7 @@
|
|||||||
when: "'rabbitmq001' not in inventory_hostname"
|
when: "'rabbitmq001' not in inventory_hostname"
|
||||||
|
|
||||||
- name: Ensure RabbitMQ is running
|
- name: Ensure RabbitMQ is running
|
||||||
service:
|
ansible.builtin.service:
|
||||||
name: rabbitmq-server
|
name: rabbitmq-server
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
- rabbitmq_cluster
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Drop the admin password in a file for admin operations
|
- name: Drop the admin password in a file for admin operations
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
dest: /root/.rabbitmqpass
|
dest: /root/.rabbitmqpass
|
||||||
content: "{{ rabbitmq_admin_password }}"
|
content: "{{ rabbitmq_admin_password }}"
|
||||||
mode: '0600'
|
mode: '0600'
|
||||||
|
Loading…
Reference in New Issue
Block a user