ansible-collections / community.digitalocean

This Ansible collection contains modules for assisting in the automation of the DigitalOcean cloud.
https://galaxy.ansible.com/community/digitalocean/
GNU General Public License v3.0
140 stars 57 forks source link

ansible galaxy collection install git+https issue #304

Closed F-PMOR closed 1 year ago

F-PMOR commented 1 year ago
SUMMARY

For info : the URL of the gitlab web site has been changed to gitlab.fqdn.

While trying to install a personnal collection that is in a gitlab project, I 've an issue.

ansible-galaxy collection install git+https://gitlab.fqdn/aiac-haut-de-reseau/ansible_collections.git -vvvvv

ERROR! Unexpected Exception, this is probably a bug: 'manifest'

ISSUE TYPE
# ansible-galaxy collection install git+https://gitlab.fqdn/aiac-haut-de-reseau/ansible_collections.git -vvvvv
ansible-galaxy [core 2.14.1]
  config file = /data/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/data/ansible/.ansible/collections
  executable location = /usr/local/bin/ansible-galaxy
  python version = 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
Using /data/ansible/ansible.cfg as config file
Cloning into '/root/.ansible/tmp/ansible-local-817hwvpgih/tmpnjxf6bfl/ansible_collections7lqdk1fj'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 23 (delta 0), reused 20 (delta 0), pack-reused 0
Receiving objects: 100% (23/23), 5.92 KiB | 5.92 MiB/s, done.
Your branch is up to date with 'origin/main'.
Starting galaxy collection install process
Found installed collection junipernetworks.junos:3.1.0 at '/root/.ansible/collections/ansible_collections/junipernetworks/junos'
Found installed collection fortinet.fortios:2.1.6 at '/root/.ansible/collections/ansible_collections/fortinet/fortios'
Found installed collection community.hashi_vault:4.0.0 at '/root/.ansible/collections/ansible_collections/community/hashi_vault'
Found installed collection cisco.nxos:4.0.1 at '/root/.ansible/collections/ansible_collections/cisco/nxos'
Found installed collection cisco.iosxr:4.0.3 at '/root/.ansible/collections/ansible_collections/cisco/iosxr'
Found installed collection cisco.ios:4.2.0 at '/root/.ansible/collections/ansible_collections/cisco/ios'
Found installed collection f_pmor.assertions:1.0.3 at '/root/.ansible/collections/ansible_collections/f_pmor/assertions'
Process install dependency map
Starting collection install process
'"virtual collection Git repo"' is virtual, skipping.
Installing 'f_pmor.assertions:1.0.3' to '/root/.ansible/collections/ansible_collections/f_pmor/assertions'
ERROR! Unexpected Exception, this is probably a bug: 'manifest'
the full traceback was:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/ansible/cli/__init__.py", line 647, in cli_executor
    exit_code = cli.run()
  File "/usr/local/lib/python3.10/dist-packages/ansible/cli/galaxy.py", line 711, in run
    return context.CLIARGS['func']()
  File "/usr/local/lib/python3.10/dist-packages/ansible/cli/galaxy.py", line 118, in method_wrapper
    return wrapped_method(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/ansible/cli/galaxy.py", line 1360, in execute_install
    self._execute_install_collection(
  File "/usr/local/lib/python3.10/dist-packages/ansible/cli/galaxy.py", line 1397, in _execute_install_collection
    install_collections(
  File "/usr/local/lib/python3.10/dist-packages/ansible/galaxy/collection/__init__.py", line 771, in install_collections
    install(concrete_coll_pin, output_path, artifacts_manager)
  File "/usr/local/lib/python3.10/dist-packages/ansible/galaxy/collection/__init__.py", line 1446, in install
    install_src(collection, b_artifact_path, b_collection_path, artifacts_manager)
  File "/usr/local/lib/python3.10/dist-packages/ansible/galaxy/collection/__init__.py", line 1578, in install_src
    collection_meta['manifest'],
KeyError: 'manifest'

This collection is well installed when I do it with tar.gz file locally, with this command :

ansible-galaxy collection install collections/f_pmor-assertions-1.0.2.tar.gz 
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'f_pmor.assertions:1.0.2' to '/root/.ansible/collections/ansible_collections/f_pmor/assertions'
f_pmor.assertions:1.0.2 was installed successfully
COMPONENT NAME
ANSIBLE VERSION
# ansible --version
ansible [core 2.14.1]
  config file = /data/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/data/ansible/.ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
root@03e445c30fde:/data/ansible# ansible-galaxy collection list f_pmor.assertions

# /root/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
f_pmor.assertions 1.0.2  
CONFIGURATION
root@03e445c30fde:/data/ansible# ansible-config dump --only-changed
ANSIBLE_FORCE_COLOR(/data/ansible/ansible.cfg) = True
COLLECTIONS_PATHS(/data/ansible/ansible.cfg) = ['/root/.ansible/collections', '/data/ansible/.ansible/collections']
CONFIG_FILE() = /data/ansible/ansible.cfg
DEFAULT_FILTER_PLUGIN_PATH(/data/ansible/ansible.cfg) = ['/data/ansible/.ansible/plugins/filter', '/usr/share/ansible/plugins/filter', '/data/filter_plugins']
DEFAULT_GATHERING(/data/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(/data/ansible/ansible.cfg) = ['/data/ansible/hosts/nb_inventory.yml']
DEFAULT_KEEP_REMOTE_FILES(/data/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/data/ansible/ansible.cfg) = /data/ansible/logs/logfile
DEFAULT_ROLES_PATH(/data/ansible/ansible.cfg) = ['/data/ansible/roles']
DISPLAY_SKIPPED_HOSTS(/data/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/data/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/data/ansible/ansible.cfg) = python
RETRY_FILES_ENABLED(/data/ansible/ansible.cfg) = False
OS / ENVIRONMENT

I'm in a docker container under ubuntu 22.04.

root@03e445c30fde:/data/ansible# cat /etc/*lease*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
STEPS TO REPRODUCE
EXPECTED RESULTS

Installation success like with the tar.gz file.

ACTUAL RESULTS

the Result is in the BUG sections below.

F-PMOR commented 1 year ago

I found the pb

mamercad commented 1 year ago

Okay, no problem, I'll close this.