Ansible – Creating playbook that sets user password to vault stored variable

This will use ansible vault that allows the storage of sensitive information in an encrypted state within playbooks. Step 1 – create password that is stored in ansible vault mkdir -p ~/ansible/vault touch ~/ansible/vault/N0s3kr1t cd ~/ansible/vault ## encrypt secret file and prompts for a password ansible-vault encrypt N0s3kr1t ## run the following after installing passlib […]

RHCA – Ansible Automation – Exam 407 – Use Ansible Vault in playbooks to protect sensitive data

Ansible vault allows for sensitive information to be stored encrypted within playbooks. This section I recommend making some playbooks that uses vault. Such as make user and assign password. Store ssh key as ansible vault. ansible vault – using external file: # to encrypt file ansible-vault encrypt <file> # to edit file – this will […]

Ansible Setup Part 3 – Setting Up Initial Role

This could have easily been completed as a playbook instead, but I want to demonstrate creating custom roles. I like to have roles that I can reference from playbooks. Once we get to the end of the Ansible posts we will have a single playbook that will trigger multiple roles. If you are following along […]

Ansible Setup Part 2 – Playbook to Setup Ansible Account/Key on Managed Systems

This playbook will automate the Ansible user setup on systems you wish to manage. Step 1 – Disable Host Key Checking This will prevent having to accept the key for new systems you connect to with Ansible. Add the following line in ~/ansible/ansible.cfg host_key_checking = False Step 2 – Generate Keys for the User that […]

Ansible Setup Part 1 – Setting up Ansible RHEL/CentOS 7

Ansible is a configuration management tool that allows actions to be performed on remote systems without agents being installed on the system. It uses python and due to this, most versions of Linux will work with Ansible with no additional configuration. In order to setup Ansible on your management system, follow the steps below. Note: […]