Re-provisioning ansible instance

How to reprovision an instance when there is updated github bedrock-ansible available?

Non-dev?

Just re-run ansible-playbook -i hosts/<environment> server.yml (if you’re using the new updated playbook).

I can’t guarantee this won’t cause issues though. bedrock-ansible isn’t always designed for backwards compatibility. It shouldn’t break your server, but there might be a few things not working.

How would you re run against vagrant instance ?

ansible-playbook -i hosts/development site.yml

or

PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --private-key=/Users/user/repos/7x8_ansible/.vagrant/machines/default/virtualbox/private_key --user=vagrant --connection=ssh --limit='default' --inventory-file=/Users/user/repos/7x8_ansible/.vagrant/provisioners/ansible/inventory --extra-vars={"ansible_ssh_user":"vagrant","user":"vagrant"} ./site.yml

I keep getting

fatal: [default] => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue

UPDATE
looks like this is the right approach:

vagrant provision --force
2 Likes