ansible-navigator
ansible-navigator copied to clipboard
navigator identifies collection as `contained` but shoud be `bind_mount`
ISSUE TYPE
- Bug Report
SUMMARY
navigator identifies collection as contained but shoud be bind_mount
ANSIBLE-NAVIGATOR VERSION
ansible-navigator 2.1.0
The ansible-navigator settings, note the matching directory tree
ansible-navigator: execution-environment: volume-mounts: - src: "/home/bthornto/.ansible/collections/ansible_collections/" dest: "/dev_collections/collections/ansible_collections/" options: "Z"
The collection path points to the collection forlder in that tree
export ANSIBLE_COLLECTIONS_PATHS=/home/runner/.ansible/collections:/usr/share/ansible/collections:/dev_collections/collections
With the following
ansible-navigator collections --ll debug --la false
We can see in the logs:
- the envar is passed through automatically because it has an ANSIBLE_ prefix
2022-08-03T17:52:12.048828+00:00 DEBUG 'ansible_navigator.runner.base.generate_run_command_args' Runner arg: envvars:{'ANSIBLE_COLLECTIONS_PATHS': '/home/runner/.ansible/collections:/usr/share/ansible/collections:/dev_collections/collections', 'ANSIBLE_NOCOLOR': 'True', 'PYTHONPATH': '${PYTHONPATH}:/opt/ansible_navigator_utils'}
The volume mount is included in the resulting podman command
2022-08-03T17:52:12.050459+00:00 DEBUG 'ansible-runner._handle_command_wrap' command: podman run --rm --tty --interactive -v /home/bthornto/github/ansible-navigator/:/home/bthornto/github/ansible-navigator/ --workdir /home/bthornto/github/ansible-navigator -v /run/user/1000/keyring/:/run/user/1000/keyring/ -e SSH_AUTH_SOCK=/run/user/1000/keyring/ssh -v /home/bthornto/.ssh/:/home/runner/.ssh/ -v /home/bthornto/.ssh/:/root/.ssh/ --group-add=root --ipc=host -v /tmp/ansible-navigator_1qhy281a/artifacts/:/runner/artifacts/:Z -v /tmp/ansible-navigator_1qhy281a/:/runner/:Z -v /home/bthornto/.local/lib/python3.10/site-packages/ansible_runner/display_callback/callback/:/home/runner/.ansible/plugins/callback/:Z -v /home/bthornto/.ansible/collections/ansible_collections/:/dev_collections/collections/ansible_collections/:Z -v /home/bthornto/.local/share/ansible_navigator/utils/:/home/bthornto/.local/share/ansible_navigator/utils/ -v /home/bthornto/.local/lib/python3.10/site-packages/ansible_navigator/utils/:/opt/ansible_navigator_utils/ -v /home/bthornto/.cache/ansible-navigator/:/home/bthornto/.cache/ansible-navigator/:z --env-file /tmp/ansible-navigator_1qhy281a/artifacts/5a6d69e4-bc89-4374-aa25-7472c5fee462/env.list --quiet --name ansible_runner_5a6d69e4-bc89-4374-aa25-7472c5fee462 quay.io/ansible/creator-ee:v0.4.2 python3 /home/bthornto/.local/share/ansible_navigator/utils/catalog_collections.py -a /home/bthornto/github/ansible-navigator/collections -c /home/bthornto/.cache/ansible-navigator/collection_doc_cache.db
and the collection is found (note: it should be a bind_mount not contained)
3│ansible.utils 2.6.1 False contained /dev_collections/collections/ansible_collections/ansible/utils ▒