fix(readme): more informations about postgres

This commit is contained in:
Thomas Maurice 2024-03-27 09:15:31 +01:00
parent 4667b5de57
commit f563e24b86
Signed by: thomas
GPG key ID: 1D577F50583032A6

View file

@ -171,7 +171,9 @@ Then create the [user](https://docs.ansible.com/ansible/latest/collections/commu
lc_ctype: "C" lc_ctype: "C"
``` ```
Bonus point if you store the username in an encrypted fashion in your repository with either [ansible vault](https://docs.ansible.com/ansible/latest/vault_guide/vault_managing_passwords.html) or [sops](https://github.com/getsops/sops). To create the user and the database you will need to `become` the postgres user on the server, you can achieve this by adding the `become: true` and `become_user: postgres` directives to your relevant tasks.
Bonus point if you store the password in an encrypted fashion in your repository with either [ansible vault](https://docs.ansible.com/ansible/latest/vault_guide/vault_managing_passwords.html) or [sops](https://github.com/getsops/sops).
If you end up using sops, please also encrypt your secret with the following age public key so I am able to decrypt them later on `age18rkuwwpzl3az5gr093uhvk7cwg348eajxsm9fjansur5qa97csfs597zh6`, this can be achieved running `sops <file> --add-age <my key>` If you end up using sops, please also encrypt your secret with the following age public key so I am able to decrypt them later on `age18rkuwwpzl3az5gr093uhvk7cwg348eajxsm9fjansur5qa97csfs597zh6`, this can be achieved running `sops <file> --add-age <my key>`
@ -350,4 +352,4 @@ This is pretty cool, however there is more you can do in the optional objectives
* Setup a Gitea runner and make sure your tests pass * Setup a Gitea runner and make sure your tests pass
* Add more tests ? * Add more tests ?
* Using a mechanism (sops/ansible vault/hashicorp vault) to store secrets in the repository and make it accessible to the gitea runner * Using a mechanism (sops/ansible vault/hashicorp vault) to store secrets in the repository and make it accessible to the gitea runner
* Finally, run ansible _from the CI_ so your playbooks get applied when you push new code to the repository * Finally, run ansible _from the CI_ so your playbooks get applied when you push new code to the repository