Ansible Role: Homebrew. Installs Homebrew on MacOS, and configures packages, taps, and cask apps according to supplied variables. If you prefer to manually update packages via brew commands, leave this set to false. Ansible is a universal language, unraveling the mystery of how work gets done. Turn tough tasks into repeatable playbooks. Roll out enterprise-wide protocols with the push of a button. How Ansible works. Crush complexity. Generate an Ansible Vault Password. On my mac I run: 1. Brew install pwgen. Brew install gpg. Brew install gpg-agent. This gets me my tools! Ok, so now I need to generate my pgp key. Doing this I just accepted all the defaults. Now I generate a password for the vault. Generate an Ansible Vault Password. On my mac I run: 1. Brew install pwgen. Brew install gpg. Brew install gpg-agent. This gets me my tools! Ok, so now I need. Linuxbrew ansible lint. Language English. Linuxbrew ansible lint Addeddate 2021-04-07 15:38:52 Identifier linuxbrew-ansible-lint Scanner Internet Archive Python library 1.9.4. Plus-circle Add Review. Uploaded by Brew.sh on April 7, 2021. SIMILAR ITEMS (based on metadata).
I was blown away last night at our Ansible PDX meetup by a great presentation by Andrew Lorente about how to track secrets with your applications. Andrew gave a method of how to do this that I wanted to write down so I know how to do it. Andrew has his own blog here where he wrote about the solution. I wanted to go over it a little more in details cause I want to make sure it sticks in my head! (bonus: I also learned about the pbcopy command on Mac last night!) The other thing is since I didn’t have any of this on my machine it helps someone get started who hasn’t done anything with GPG yet.
His technique involves some pretty simple tools:
- GPG / GPG-Agent
1. Generate an Ansible Vault Password
On my mac I run:
2 4 6 8 10 | You did notspecifyauser ID.(you may use'-r') Current recipients: Enter the user ID.Endwith an empty line:vallard Current recipients: 2048R/BDF6142D2015-02-27'Vallard Benincosa <vallard@benincosa.com>' Enter the user ID.Endwith an empty line: |
Now that I have that I follow Andrew’s instructions and create a file called open_the_vault.sh with the contents being:
2 4 6 8 | iftest-f'$envfile'&&kill-0$(grep GPG_AGENT_INFO'$envfile'|cut-d:-f2)2>/dev/null;then else eval'$(gpg-agent --daemon --log-file=~/.gpg/gpg.log --write-env-file '$envfile')' export GPG_AGENT_INFO# the env file does not contain the export statement |
Append to ~/.bashrc
Now obviously, if you look at the history of this project I’m working on, you’ll see the old unencrypted file, but that’s ok, I’ve changed the passwords now so its super secure! From now on though, no more simple passwords and I’ll be using these methods to encrypt.
4. Sharing Keys
Obviously this solution works great for one developer, but what if we have more developers? They will also need to be able to run the key. To do this, we just need to encrypt the file with all of our users. We now decrypt the vault_passphrase.gpg with our open_the_vault.sh command. We then get the output of our passphrase.
Now, we encrypt it again with all of our users. The new user will need to share his key with you so that you can encrypt it.