avantra / avantra.core / 24.0.0 / module / login authentication operations | "added in version" 23.0.0 of avantra.core" Authors: Michael Szediwy (@avantra-mis) This plugin has a corresponding action plugin.avantra.core.login (24.0.0) — module
Install with ansible-galaxy collection install avantra.core:==24.0.0
collections: - name: avantra.core version: 24.0.0
With this module a authentication token can be fetched from an defined Avantra API endpoint url together with a valid username and password. You can then use the token for other tasks.
# Authenticate against endpoint and print registered token - name: Authenticate against Avantra API avantra.core.login: avantra_api_url: https://avantra-ui/xn avantra_api_user: <username> avantra_api_password: <password> register: auth
- name: Print the authentication token ansible.builtin.debug: var: auth
- name: Get information about a server avantra.core.server_info: token: "{{auth.token}}" server_name: aservername customer_name: acustomername
avantra_api_url: description: - A valid URL pointing to an Avantra UI. - For example C(https://avantra-ui/xn) required: true type: str avantra_api_user: description: - Valid Avantra user principal. required: true type: str avantra_api_password: description: - The password or API key for the selected Avantra user. - We highly recommend to use Ansible Vaults to protect you sensitive content. required: true type: str
token: description: The token to be used during a playbook. returned: success sample: eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJtaXMyIiwicm9sZXMiOltdLCJpYXQiOjE2NjY4OTg3NzEsImV4cCI6MTY2NjkyMDM3MX0... type: str