When you need to run a MySQL database as the backend for an application it’s not great to have to install the server directly on your machine for each project so this is a perfectContinue reading
Setup a simple Vagrant box for Ansible examples
To setup a simple Vagrant box for Ansible experiments, we first need to make sure we have both VirtualBox and Vagrant installed. Both are simply a case of downloading the file and clicking to install.Continue reading
Managing users accounts with Ansible
- defining expanding the vars to have multiple properties per item to add groups per user.
- using user state for a method to disable users accounts.
- Update the servers SSH config, and add a notify rule so sshd is restarted if required.
Use Ansible to create user accounts and setup ssh keys
- Create a list of user names, using Ansible
vars
- Create a user account for each user name with the Ansible module
users
andwith_items
. - Add each user’s ssh public key to the account with Ansible
authorized_key
- Modify
/etc/sudoers
so the users can usesudo
without entering a password