Where to store secrets and who will be executing the playbook (which users)?
Hi everybody,
I'm have created two playbooks for my Proxmox nodes:
- Bootstrap = NAG removal, Add repos, create 2 users, setup SSH
- Proxmox_play = Setting up the whole system to my desires
The Bootstrap has to be done with elevated privileges (root: become=true). I'm passing through the root password as a vault encrypted file.
Now, for the Proxmox_play, I read that one should use a different user to perform all remaining tasks. I'm just talking about a home-lab, nothing exposed to the WWW.
- Do I really need to use a different user to execute all the remaining tasks, what are the implications if I don't do that?
- How can I tell Ansible that it should use user X with passwd Y to execute all tasks on hosts: 1, 2, 3, 4, 5, 6, etc...?
Additionally, I'm currently storing the encrypted files in a separate directory where all my ansible related stuff resides....NOT directly within the roles, though!
What is the recommendation of the community where to store these files best? (I'm not using GitHub at the moment...is something pending to learn/setup).
Thank you in advance for the recommendations.