Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Latest commit

 

History

History
122 lines (89 loc) · 5.1 KB

equinix.metal.user_info_module.rst

File metadata and controls

122 lines (89 loc) · 5.1 KB

equinix.metal.user_info

Gather information about the logged in user

Version added: 1.4.0

The below requirements are needed on the host that executes this module.

  • packet-python >= 1.43.1
Parameter Choices/Defaults Comments
api_token
string / required
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.

aliases: auth_token

# 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:

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
user
dictionary
always
Information about the logged in user.

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 }


Authors