TL; DR: I'm using pyenv with virtualenv on Arch Linux and want to use the latest
community.digitalocean
collection with ansible running from the venv. Regardless
of attempting to set the ansible_python_interpreter=python
(which most of
google suggests is the issue), I don't believe this to be the problem based
on the -vvvv
output, where it appears to be using the right interpreter.
The following is the complaint:
MSG:
dopy >= 0.3.2 required for this module
- Create a file at the checkout root called
vault-pass.txt
with a desired vault passphrase. - Navigate to
playbooks/
and create an initialmy_vars.yml
copying frommy_vars.yml.ex
- Create a new ssh key in desired location (I used
~/.ssh
) - Update
my_vars.yml
to set the location where the new ssh key was created and also set the var with the name of the private key. Setssh_key_email
to be the one set when creating the ssh key. - Create a new API key with Digital Ocean
- Create a
do.vault
file inplaybooks/
using ansible-vault with a single var calleddo_api_key
. This should have the contents of your new DO API key. - Install and configure
pyenv
pyenv install 3.10.8 && pyenv global 3.10.8
pip install virtualenv
cd $REPO_CLONE_PATH
virtualenv .venv && source ./.venv/bin/activate
pip install -r requirements.txt
export ANSIBLE_COLLECTIONS_PATH=$(pwd)/.venv/lib/python3.10/site-packages/ansible_collections
cd playbooks
./up.sh