democratech / 2022

4 stars 2 forks source link

Use ansible-vault instead of env var lookups #18

Open JMLX42 opened 3 years ago

JMLX42 commented 3 years ago
JMLX42 commented 3 years ago

Relevant official documentation: https://docs.ansible.com/ansible/2.9/user_guide/vault.html

JMLX42 commented 3 years ago

Relevant tutorial (in French): https://blog.stephane-robert.info/post/ansible-vault/

jerome-caucat commented 3 years ago

@JMLX42 I can start to setup ansible-vault:

Then you can:

Then I can use the GitHub encrypted-secret to do #3.

Have I missed something?

jerome-caucat commented 3 years ago

I did miss something: the ansible-vault password will be required to provision a VM locally so the devs will need to be able to access it.

jerome-caucat commented 3 years ago

I guess we could use groups inventories, dev and prod for example where dev uses the current un-encrypted default values and prod uses the new encrypted values.

Edit: inventories may be more appropriate inventaires Ansible (FR).