Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmware_content_library_info: Only lists Content Libraries with the type of "Local", does not include "Subscribed" type #1430

Closed
mikepruett3 opened this issue Aug 19, 2022 · 2 comments · Fixed by #1437
Labels
feature_request New feature or request has_pr

Comments

@mikepruett3
Copy link

mikepruett3 commented Aug 19, 2022

SUMMARY

When using the vmware_content_library_info task type to query our Content Libraries, only the Libraries with the type of "Local" are reported back to the ansible task. We used shared or "Subscribed" Content Libraries in our environment, to share a consistent Library of VM Templates between all of our vCenters.

How can we get this functionality added?

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_content_library_info

ANSIBLE VERSION
ansible 2.10.9
  config file = /home/<redacted>/.ansible.cfg
  configured module search path = ['/home/<redacted>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/<redacted>/.local/lib/python3.8/site-packages/ansible
  executable location = /home/<redacted>/.local/bin/ansible
  python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
COLLECTION VERSION

# /usr/local/lib/python3.8/dist-packages/ansible_collections
Collection       Version
---------------- -------
community.vmware 1.10.0

# /home/<redacted>/.local/lib/python3.8/site-packages/ansible_collections
Collection       Version
---------------- -------
community.vmware 1.10.0
CONFIGURATION
DEFAULT_HOST_LIST(/home/<redacted>/.ansible.cfg) = ['/home/<redacted>/inventory']
DEFAULT_LOG_PATH(/home/<redacted>/.ansible.cfg) = /home/<redacted>/.ansible/logs/log.txt
DEFAULT_TIMEOUT(/home/<redacted>/.ansible.cfg) = 120
DEFAULT_VAULT_PASSWORD_FILE(/home/<redacted>/.ansible.cfg) = /home/<redacted>/playbooks/secret.yaml
OS / ENVIRONMENT

vCenter Version - 7.0.3 build 20150588
Client - vSphere Client version 7.0.3.00700
Hosts - VMware ESXi, 7.0.3, 20036589

STEPS TO REPRODUCE
    - name: "Collect list of Content Libraries from specified vCenter"
      community.vmware.vmware_content_library_info:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: no
      register: libraries

    - name: "Display list of found Content Libraries"
      debug:
        var: libraries
EXPECTED RESULTS
TASK [Display list of found Content Libraries] ****************************************************************************************************************************
ok: [localhost] => {
    "libraries": {
        "changed": false,
        "content_libs": [
            "6b5e0c60-3173-4a75-8101-33335f3bb7dd",
            "7bd40369-84d6-4fd5-9cf9-7c33377f3931"
        ],
        "failed": false
    }
}
ACTUAL RESULTS
TASK [Display list of found Content Libraries] ****************************************************************************************************************************
ok: [localhost] => {
    "libraries": {
        "changed": false,
        "content_libs": [
            "6b5e0c60-3173-4a75-8101-33335f3bb7dd"
        ],
        "failed": false
    }
}
@mariolenz mariolenz added the feature_request New feature or request label Aug 27, 2022
@mariolenz
Copy link
Collaborator

mariolenz commented Aug 27, 2022

1.10.0 is quite old...

However, it looks like vmware_content_library_info still doesn't know about subscribed content libraries in the latest release. I'll try to work on this, but you probably would have to update to (at least) community.vmware 2.9.0.

edit: I think we could use the Content Subscribed Library APIs to achieve this.

@mariolenz
Copy link
Collaborator

@mikepruett3 Would it be possible for you to test PR #1437? I hope it will fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature_request New feature or request has_pr
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants