equinix / equinix.metal / 1.4.1 / module / user_info Gather information about the logged in user | "added in version" 1.4.0 of equinix.metal" Authors: Jason DeTiberus (@detiber) <jdetiberus@equinix.com>equinix.metal.user_info (1.4.1) — module
Install with ansible-galaxy collection install equinix.metal:==1.4.1
collections: - name: equinix.metal version: 1.4.1
Gather information about the logged in user for Equinix Metal.
See U(https://metal.equinix.com/developers/api/users/#retrieve-the-current-user) for more info on users.
# All the examples assume that you have your Equinix Metal API token in env var METAL_API_TOKEN. # You can also pass it to the api_token parameter of the module instead. - name: Gather information about the current logged in user hosts: localhost tasks: - equinix.metal.user_info:
api_token: aliases: - auth_token description: - The Equinix Metal API token to use - If not set, then the value of the METAL_API_TOKEN, PACKET_API_TOKEN, or PACKET_TOKEN environment variable is used. required: true type: str
user: description: Information about the logged in user. returned: always sample: '{ "avatar_thumb_url": "https://www.gravatar.com/avatar/49d55cbf53f2dae15bfa4c3a3fb884f9?d=mm", "avatar_url": "https://www.gravatar.com/avatar/49d55cbf53f2dae15bfa4c3a3fb884f9?d=mm", "created_at": "2021-02-26T14:08:17Z", "customdata": {}, "default_organization_id": "594b06f3-cef2-4127-85fd-08332fcf0021", "default_project_id": null, "email": "does@not.exist", "emails": [ { "href": "/emails/7c281a6b-1801-4008-89f3-0a43a2fb26e1" } ], "features": [ "maintenance_mail", "deploy_without_public_ip", "advanced_ips", "block_storage", "bgp_default_route", "native_vlan", ], "first_name": "Does", "full_name": "Does Not Exist", "href": "/users/7867d973-9b75-48dc-b94f-0d0a87e9dda0", "id": "7867d973-9b75-48dc-b94f-0d0a87e9dda0", "language": null, "last_login_at": "2021-03-02T21:48:07Z", "last_name": "Not Exist", "mailing_address": null, "max_projects": 0, "number_of_ssh_keys": 0, "opt_in": false, "opt_in_updated_at": null, "phone_number": null, "restricted": false, "short_id": "7867d973", "social_accounts": {}, "timezone": "America/New_York", "two_factor_auth": "", "updated_at": "2021-03-02T08:23:18Z", "verification_stage": "verified", "vpn": false }' type: dict