Back to Ansible Reference

$ ansible-doc -t module cisco.sccfm.list_asa_local_users

> MODULE cisco.sccfm.list_asa_local_users (sccfm-ansible/plugins/modules/list_asa_local_users.py)

  Retrieve the ASA local user table by executing `show aaa local user`
  on selected devices.
  Devices can be selected by a Lucene query or by supplying a list of
  UIDs.

OPTIONS (= indicates it is required):

- api_token  API token for SCCFM
        set_via:
          env:
          - name: SCCFM_API_TOKEN
        default: null
        no_log: true
        type: str

- limit   Maximum number of devices to return when using `query'.
        default: 50
        type: int

- offset  Pagination offset when using `query'.
        default: 0
        type: int

- query   Lucene query to filter ASA devices.
           Mutually exclusive with `uids'.
        default: null
        type: str

- region  SCCFM region (int, us, eu, apj, au, uae, in, or ci).
        set_via:
          env:
          - name: SCCFM_REGION
        default: null
        type: str

- uids    List of device UIDs to execute the command on.
           Mutually exclusive with `query'.
        default: null
        elements: str
        type: list

AUTHOR: Cisco SCCFM Team

EXAMPLES:
- name: List local users on one or more devices by UID
  cisco.sccfm.list_asa_local_users:
    uids:
      - "544d3c3b-2440-4b94-8438-74466d95909b"
      - "abcdef01-2345-6789-abcd-ef0123456789"

- name: List local users using a query
  cisco.sccfm.list_asa_local_users:
    query: "name:branch-* AND connectivityState:ONLINE"
    region: "us"
    api_token: "{{ sccfm_api_token }}"

- name: List local users with shared auth
  hosts: localhost
  gather_facts: false
  module_defaults:
    group/cisco.sccfm.all:
      region: "{{ sccfm_region }}"
      api_token: "{{ sccfm_api_token }}"
  tasks:
    - name: List local users on branch ASAs
      cisco.sccfm.list_asa_local_users:
        query: "name:branch-* AND connectivityState:ONLINE"

RETURN VALUES:

- asa_local_users  Mapping of device name (or UID) to its list of
                    parsed local-user records.
        returned: success
        sample:
          asa-to-upgrade-2:
          - failed_attempts: '0'
            locked: N
            user: abragg
        type: dict

- asa_local_users_json  Pretty-printed JSON string of
                         `asa_local_users' for human-readable output.
        returned: success
        type: str

- results  Raw CLI execution results per device.
        elements: dict
        returned: success
        type: list
        contains:

        - device_uid  The UID of the device.
          type: str

        - error_msg  Error message if execution failed on this
                      device.
          type: str

        - result  The CLI command output.
          type: str