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

[Bug] galaxy.ansible doc for ntnx_prism_vm_inventory is having Documentation Syntax Error. #453

Open
bhati-pradeep opened this issue Dec 12, 2023 · 1 comment
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@bhati-pradeep
Copy link
Collaborator

Describe the bug
https://galaxy.ansible.com/ui/repo/published/nutanix/ncp/docs/ Is having Documentation Syntax Error due to which doc is missing for ntnx_prism_vm_inventory from galaxy.ansible.

To Reproduce
Steps to reproduce the behavior:

  1. https://galaxy.ansible.com/ui/repo/published/nutanix/ncp/docs/

Expected behavior
A clear and concise doc for ntnx_prism_vm_inventory should be present

@bhati-pradeep bhati-pradeep added the bug Something isn't working label Dec 12, 2023
@bhati-pradeep bhati-pradeep added the documentation Improvements or additions to documentation label Dec 12, 2023
@bhati-pradeep
Copy link
Collaborator Author

I am able to generate documentation for inventory module. Will create bug in ansible repo for further assistance.

Meanwhile please refer this generated doc using ansible-doc -t inventory nutanix.ncp.ntnx_prism_vm_inventory

> NUTANIX.NCP.NTNX_PRISM_VM_INVENTORY    (/Users/pradeep.bhati/.ansible/collections/ansible_collections/nutanix/ncp/plugins/inventory/ntnx_prism_vm_inventory.py)

        Get a list of Nutanix VMs for ansible dynamic inventory.

ADDED IN: version 1.0.0 of nutanix.ncp

OPTIONS (= is mandatory):

- compose
        Create vars from jinja2 expressions.
        default: {}
        type: dict

- data
        Pagination support for listing VMs
        Default length(number of records to retrieve) has been set to 500
        default:
          length: 500
          offset: 0
        type: dict

- groups
        Add hosts to group based on Jinja2 conditionals.
        default: {}
        type: dict

- keyed_groups
        Add hosts to group based on the values of a variable.
        default: []
        elements: dict
        type: list

        SUBOPTIONS:

        - default_value
            The default value when the host variable's value is an empty string.
            This option is mutually exclusive with `trailing_separator'.
            default: null
            type: str
            added in: version 2.12 of ansible-core


        - key
            The key from input dictionary used to generate groups
            default: null
            type: str

        - parent_group
            parent group for keyed group
            default: null
            type: str

        - prefix
            A keyed group name will start with this prefix
            default: ''
            type: str

        - separator
            separator used to build the keyed group name
            default: _
            type: str

        - trailing_separator
            Set this option to `False' to omit the `separator' after the host variable when the value is an empty string.
            This option is mutually exclusive with `default_value'.
            default: true
            type: bool
            added in: version 2.12 of ansible-core


- leading_separator
        Use in conjunction with keyed_groups.
        By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.
        This is because the default prefix is "" and the default separator is "_".
        Set this option to False to omit the leading underscore (or other separator) if no prefix is given.
        If the group name is derived from a mapping the separator is still used to concatenate the items.
        To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.
        default: true
        type: boolean
        added in: version 2.11 of ansible-core


= nutanix_hostname
        Prism central hostname or IP address
        set_via:
          env:
          - name: NUTANIX_HOSTNAME
        type: str

= nutanix_password
        Prism central password
        set_via:
          env:
          - name: NUTANIX_PASSWORD
        type: str

- nutanix_port
        Prism central port
        set_via:
          env:
          - name: NUTANIX_PORT
        default: '9440'
        type: str

= nutanix_username
        Prism central username
        set_via:
          env:
          - name: NUTANIX_USERNAME
        type: str

= plugin
        Name of the plugin
        choices: [ntnx_prism_vm_inventory, nutanix.ncp.ntnx_prism_vm_inventory]

- strict
        If `yes' make invalid entries a fatal error, otherwise skip and continue.
        Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
        default: false
        type: bool

- use_extra_vars
        Merge extra vars into the available variables for composition (highest precedence).
        set_via:
          env:
          - name: ANSIBLE_INVENTORY_USE_EXTRA_VARS
          ini:
          - key: use_extra_vars
            section: inventory_plugins
        default: false
        type: bool
        added in: version 2.11 of ansible-core


- validate_certs
        Set value to `False' to skip validation for self signed certificates
        This is not recommended for production setup
        set_via:
          env:
          - name: VALIDATE_CERTS
        default: true
        type: boolean


NOTES:
      * User needs to have API View access for resources for this inventory module to work.


REQUIREMENTS:  json, tempfile

AUTHOR: Balu George (@balugeorge), Prem Karat (@premkarat)

NAME: ntnx_prism_vm_inventory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants