Closed watsonb closed 2 years ago
Can you run with --ll debug
and provide the corresponding ansible-navigator.log
so we can get a better idea of what is happening here?
Here's a copy of the log when running ansible-navigator collections
from the command-line
navigator.log
.
From what I'm seeing, it is volume mounting local dirs and only searching those for collections? I've spun up a container instance of the image via podman run --rm -it cregprod01scusdco.azurecr.io/kiewit/kiewit_ee_all:latest /bin/bash
and can confirm the presence of roles and collections inside the image/container at /usr/share/ansible
bash-4.4# ls /usr/share/ansible/collections/ansible_collections/
amazon awx chocolatey community dellemc frr hetzner infinidat kiewit netapp ngine_io ovirt sensu t_systems_mms wti
ansible azure cisco containers f5networks gluster hpe inspur kubernetes netapp_eseries openstack purestorage servicenow theforeman
arista check_point cloudscale_ch cyberark fortinet google ibm junipernetworks mellanox netbox openvswitch redhatinsights splunk vyos
@watsonb Do me a favor? Try again w/o overriding the defautl collection_cache_db location. There's a duplicate volumne mount and I'm wondering if it is becasue the collection_cache is in the CWD.... I snipped out some of the log info that is relevant:
Running with collection_doc_cache_path as '/home/ben/workspace/kiewit/ansible/cache.db' (str/user provided configuration file)
container_volume_mounts:[
'/home/ben/venv_ansible_navigator/share/ansible_navigator/utils:/home/ben/venv_ansible_navigator/share/ansible_navigator/utils',
'/home/ben/workspace/kiewit/ansible/collections:/home/ben/workspace/kiewit/ansible/collections:z',
'/home/ben/workspace/kiewit/ansible/cache.db:/home/ben/workspace/kiewit/ansible/cache.db:z']
]
podman run --rm --tty --interactive
-v /home/ben/workspace/kiewit/ansible/:/home/ben/workspace/kiewit/ansible/ <<<<<<<<<<<
--workdir /home/ben/workspace/kiewit/ansible
-v /run/user/1302/keyring/:/run/user/1302/keyring/
-e SSH_AUTH_SOCK=/run/user/1302/keyring/ssh
-v /home/ben/.ssh/:/home/runner/.ssh/
--group-add=root
--ipc=host
-v /tmp/ansible-navigator__wayqd59/artifacts/:/runner/artifacts/:Z
-v /tmp/ansible-navigator__wayqd59/:/runner/:Z
-v /home/ben/venv_ansible_navigator/share/ansible_navigator/utils/:/home/ben/venv_ansible_navigator/share/ansible_navigator/utils/
-v /home/ben/workspace/kiewit/ansible/collections/:/home/ben/workspace/kiewit/ansible/collections/:z
-v /home/ben/workspace/kiewit/ansible/:/home/ben/workspace/kiewit/ansible/:z <<<<<<<<<<<<<<<
--env-file /tmp/ansible-navigator__wayqd59/artifacts/aa6fad89-a149-45aa-b38a-2c932b34f31e/env.list
--quiet --name ansible_runner_aa6fad89-a149-45aa-b38a-2c932b34f31e
cregprod01scusdco.azurecr.io/kiewit/kiewit_ee_all:latest
python3 /home/ben/venv_ansible_navigator/share/ansible_navigator/utils/catalog_collections.py -a /home/ben/workspace/kiewit/ansible/collections -c /home/ben/workspace/kiewit/ansible/cache.db
Error: /home/ben/workspace/kiewit/ansible/: duplicate mount destination
well that seems to have worked! curious, my custom collection has an inventory plugin and a bunch of roles. The only thing I can browse is the inventory plugin. I looked at some other collections as well (e.g. awx.awx, and azure.azcollection) and can see their plugins and modules. Will this be able to browse a collection's roles as well in the future?
@watsonb Yes! https://github.com/ansible/ansible-navigator/issues/231, anything you want to add there would be great.
Thanks for the confirmation, I'll see if I can recreate here.
Curious, did you have a reason to move the collection cache? (only because I never really expected anyone to do that :) )
honestly I think I copied/pasted the ansible-navigator.yml file and tuned it. Have no idea why that cache location was specified
ISSUE TYPE
SUMMARY
Cannot pull up collection documentation of collections contained within an EE.
ANSIBLE-NAVIGATOR VERSION
CONFIGURATION
ansible-navigator.yml
ansible.cfg (in CWD)
LOG FILE
N/A
STEPS TO REPRODUCE
As shown in my configs, if I launch
ansible-navigator
with no arguments, I expect to be at the welcome screen and when I list :images, I expect to be using the specified image. This works as expectedMoreover, if I press a number corresponding to the selected image (in this case, 2) and then view Ansible version and collections, I can confirm that the collections specified when building the image are there.
However, when I run the :collections command from the welcome screen, I'm told there are no collections.
EXPECTED RESULTS
My expectation is that I can browse collection documentation for collections pre-installed "inside" the EE, but it appears that
ansible-navigator
is looking for collections installed locally.I'm extremely excited about the prospect of self-contained EEs as it will make my job of setting up other developers, CI/CD, and AWX/Tower to have the same environment everywhere. And
ansible-navigator
as a method to introspect and execute from an EE is amazing.However, from an Ansible content developmental point of view, if I'm using a provided EE and writing a playbook, I want to pull up documentation specific to the collections contained within the EE to ensure I'm using modules, libraries, plugins, etc. correctly in my new content.
It seems weird, with this new paradigm, to expect that a developer using
ansible-navigator
as a runner/development aid to also haveansible-galaxy
as part of a normalansible
install to obtain the collections locally.Or am I doing/understanding things horribly wrong?
ACTUAL RESULTS
ADDITIONAL INFORMATION
N/A