Skip to content

brocade_facts gather_subset argument #210

Description

@impulse200

Hello.

In documents section of utils/brocade_facts.py gather_subset argument is marked as optional and defaults to "- all". But further down in the code it is marked as "required=True".

As a result this sample code

- name: Gather facts
      brocade.fos.brocade_facts:
        credential:
          fos_ip_addr: "{{ ansible_host }}"
          fos_user_name: "{{ fos_user }}"
          fos_password: "{{ fos_password }}"
          https: self
      register: fc_facts

fails with error message:

TASK [Gather facts] ****************************************************************************************************
[WARNING]: Platform linux on host [redacted] is using the discovered Python interpreter at /usr/bin/python3.11, but
future installation of another Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-core/2.18/reference_appendices/interpreter_discovery.html for more information.
fatal: [[redacted]]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3.11"}, "changed": false, "msg": "missing required arguments: gather_subset"}

Simple fix of gather_subset=dict(required=True, type="list") fixes the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions