Ansible Setup – Recommended approach
-
User Setup:
- Ensure password based authentication is setup temporarily atleast till we finish the next steps
-
edit
/etc/ssh/sshd_configand ensure password authenication is set to yes. and restart ssh service -
Create a common user
devopson all nodes (including ansible control node)
sudo adduser devops - Grant administrative permissions for devops user for no password prompts
“`
sudo visudo
add the following entry
devops ALL=(ALL:ALL) NOPASSWD:ALL
* create a key pair for `devops` user
ssh-keygen
* copy the public key of devops from ansible control node to other nodes
ssh-copy-id
“`
