Examples using https://github.com/ansible-middleware/amq
Install the requirement roles
ansible-galaxy install -r requirements.yml
Set credentials to download AMQ. Service accounts can be used from https://console.redhat.com/iam/service-accounts/
export RHN_USERNAME="replace_me"
export RHN_PASSWORD="replace_me"
If you don't have any infrastructure, see README.md. If you do, create an inventory file like sample.yml)
Check hosts are OK
ansible all -i inventory/all.yml -m ansible.builtin.ping --user ec2-user --private-key ~/my_keypair.pem
Deploy single broker with a custom broker.xml
ansible-playbook -i inventory/all.yml deploy-amq-custom.yml \
-e rhn_username=${RHN_USERNAME} \
-e rhn_password=${RHN_PASSWORD}
Deploy master/slave broker, with shared storage
ansible-playbook -i inventory/all.yml deploy-amq-masterslave.yml \
-e rhn_username=${RHN_USERNAME} \
-e rhn_password=${RHN_PASSWORD}
Test master/slave broker configuration
ansible-playbook -i inventory/amq1.yml test-amq-masterslave.yml \
-e aws_access_key=${AWS_ACCESS_KEY_ID} \
-e aws_secret_key=${AWS_SECRET_ACCESS_KEY}
Deploy clustered brokers
ansible-playbook -i inventory/all.yml deploy-amq-clustered.yml \
-e rhn_username=${RHN_USERNAME} \
-e rhn_password=${RHN_PASSWORD}
Test clustered brokers configuration
ansible-playbook test-amq-clustered.yml \
-e aws_access_key=${AWS_ACCESS_KEY_ID} \
-e aws_secret_key=${AWS_SECRET_ACCESS_KEY}
ansible-playbook -i inventory/all.yml remove-amq.yml