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 / 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.

@macbash
macbash / README.md
Created September 9, 2017 02:27 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@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>"