Skip to content

Instantly share code, notes, and snippets.

View macbash's full-sized avatar
🎯
Focusing

Mohammed Azfar macbash

🎯
Focusing
View GitHub Profile
@macbash
macbash / RabbitMQ-Vault.txt
Created March 5, 2023 14:04
RabbitMQ & Vault Integration for Dynamic Credentials.
## Tested in Vault - 1.13.0 and RabbitMQ - 3.X ( Docker -> Image: rabbitmq:3-management )
## Setup RabbitMQ using Docker
docker run -d --hostname my-rabbit --name some-rabbit -p 5672:5672 -p 15672:15672 -e RABBITMQ_DEFAULT_USER=user123 -e RABBITMQ_DEFAULT_PASS=password123 rabbitmq:3-management
## Vault Enable RabbitMQ Engine
vault secrets enable rabbitmq
@macbash
macbash / monit_block_for_docker_container
Created May 8, 2021 17:01 — forked from the-frey/monit_block_for_docker_container
Monit Service Monitor Block for Docker Container
# Inside main monitrc
# Check that services are running and also define start and stop commands for them.
# You will need one of these for each container
# as well as working out a restarting and/or red
eploying workflow.
check process <container-name> with pidfile /var/run/monit/<container-name>.pid
start = "/path/to/pid/script start <container-name> '<docker-arguments>'"
stop = "/path/to/pid/script stop <container-name>"
@macbash
macbash / README.md
Created September 9, 2017 02:27 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@macbash
macbash / Ansible-Vault how-to.md
Created February 1, 2016 07:13 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

##Working with ansible-vault

I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.