- https://docs.ansible.com/ansible/latest/collections/community/general/dsv_lookup.html
- https://github.com/ansible/awx-operator
Run following CLI commands to configure your tenant.
-
Create a secret:
dsv secret create --path ansible-secrets:first --data '{"fundamental":"1"}'
-
Create a role:
dsv role create --name ansible-role
-
Create a client credentials:
dsv client create --role ansible-role
-
Allow the role to read the secret:
dsv policy create \ --path "secrets:ansible-secrets" \ --actions read \ --effect allow \ --subjects "roles:ansible-role"
-
Optionally verify that using client credentials you can read secret:
dsv secret read \ --path ansible-secrets:first \ --auth-type clientcred \ --auth-client-id '<CLIENT ID>' \ --auth-client-secret '<CLIENT SECRET>'
You can use Execution Environment that I created:
https://github.com/andrii-zakurenyi/dsv-awx/pkgs/container/ee-with-dsv-sdk
ghcr.io/andrii-zakurenyi/ee-with-dsv-sdk:0.1.0
Follow next steps to create your own Execution Environment with a "community.general" collection and a DSV SDK version "v0.0.1" for Python installed. Note that all commands should be executed from the project root directory.
-
Create a virtual environment:
python3 -m venv venv
-
Activate a virtual environment:
source venv/bin/activate
-
Install ansible-builder
pip install ansible-builder
-
Build the image:
ansible-builder build --tag ee-with-dsv-sdk --container-runtime docker
-
Done. Now cleanup: exit from virtual environemnt, remove venv and context directories.
deactivate
rm -rf venv context