Back to Ansible Reference

$ ansible-doc -t lookup cisco.sccfm.profile

> LOOKUP cisco.sccfm.profile (sccfm-ansible/plugins/lookup/profile.py)

  Reads a region or API token from the canonical SCCFM profile store.
  Configure profiles with `sccfm-cli configure' before using this
  lookup.

OPTIONS (= indicates it is required):

= _terms  Profile names to read.

- config_path  Optional path to the canonical SCCFM profile
                configuration file.
        default: null
        type: path

- field   Profile field to return.
        choices: [region, api_token]
        default: api_token

AUTHOR: Cisco SCCFM Team (@CiscoDevNet)

NAME: profile

EXAMPLES:
- name: Use a profile token in an API request
  ansible.builtin.uri:
    url: https://example.invalid/api
    headers:
      Authorization: "Bearer {{ lookup('cisco.sccfm.profile', 'default') }}"
  no_log: true

RETURN VALUES:

- _raw    Values read from the selected SCCFM profiles.
        elements: str
        type: list