Install Ansible
brew install ansible
Install required packages
ansible-galaxy install -r requirements.yml
Create a Keychain item to automate Vault password input
security add-generic-password -a $(whoami) -s ansible-vault-password -w
When running the playbook on a freshly installed machine, make sure its ssh keys exist locally.
ssh-copy-id root@IP_ADDRESS
Then use --extra-vars to proceed using servers' initial settings
ansible-playbook playbook-pi.yml --extra-vars "ansible_ssh_port=22 ansible_user=root ansible_ssh_password=yourpassword"
For each host, adjust the variables. See in ./host_vars.
For secret variables, be sure to use Vault.
For every subsequent run:
ansible-playbook playbook-pi.yml