Manage a Linode User.
Field | Type | Required | Description |
---|---|---|---|
api_token |
str |
Required | The Linode account personal access token. It is necessary to run the module. It can be exposed by the environment variable LINODE_API_TOKEN instead. See details in Usage. |
- name: Create a basic user
linode.cloud.user:
username: my-cool-user
email: user@linode.com
restricted: false
state: present
- name: Create a user that can only access Linodes
linode.cloud.user:
username: my-cool-user
email: user@linode.com
grants:
global:
add_linodes: true
resources:
- type: linode
id: 12345
permissions: read_write
state: present
- name: Delete a user
linode.cloud.user:
username: my-cool-user
state: absent
Field | Type | Required | Description |
---|---|---|---|
username |
str |
Required | The username of this user. |
state |
str |
Required | The state of this user. (Choices: present , absent ) |
restricted |
bool |
Optional | If true, the User must be granted access to perform actions or access entities on this Account. (Default: True ; Updatable) |
email |
str |
Optional | The email address for the User. Linode sends emails to this address for account management communications. May be used for other communications as configured. |
grants (sub-options) |
dict |
Optional | Update the grants a user has. (Updatable) |
Field | Type | Required | Description |
---|---|---|---|
global (sub-options) |
dict |
Optional | A structure containing the Account-level grants a User has. (Updatable) |
resources (sub-options) |
list |
Optional | A list of resource grants to give to the user. (Updatable) |
Field | Type | Required | Description |
---|---|---|---|
account_access |
str |
Optional | The level of access this User has to Account-level actions, like billing information. A restricted User will never be able to manage users. (Choices: read_only , read_write ; Updatable) |
add_databases |
bool |
Optional | If true, this User may add Managed Databases. (Default: False ; Updatable) |
add_domains |
bool |
Optional | If true, this User may add Domains. (Default: False ; Updatable) |
add_firewalls |
bool |
Optional | If true, this User may add Firewalls. (Default: False ; Updatable) |
add_images |
bool |
Optional | If true, this User may add Images. (Default: False ; Updatable) |
add_linodes |
bool |
Optional | If true, this User may add Linodes. (Default: False ; Updatable) |
add_longview |
bool |
Optional | If true, this User may add Longview. (Default: False ; Updatable) |
add_nodebalancers |
bool |
Optional | If true, this User may add NodeBalancers. (Default: False ; Updatable) |
add_stackscripts |
bool |
Optional | If true, this User may add StackScripts. (Default: False ; Updatable) |
add_volumes |
bool |
Optional | If true, this User may add Volumes. (Default: False ; Updatable) |
cancel_account |
bool |
Optional | If true, this User may add cancel the entire account. (Default: False ; Updatable) |
longview_subscription |
bool |
Optional | If true, this User may manage the Account’s Longview subscription. (Default: False ; Updatable) |
Field | Type | Required | Description |
---|---|---|---|
type |
str |
Required | The type of resource to grant access to. (Choices: domain , image , linode , longview , nodebalancer , stackscript , volume , database ; Updatable) |
id |
int |
Required | The ID of the resource to grant access to. (Updatable) |
permissions |
str |
Required | The level of access this User has to this entity. If null, this User has no access. (Choices: read_only , read_write ; Updatable) |
-
user
- The user in JSON serialized form.- Sample Response:
{ "email": "example_user@linode.com", "restricted": true, "user_type": "default", "ssh_keys": [ "home-pc", "laptop" ], "tfa_enabled": null, "username": "example_user" }
- See the Linode API response documentation for a list of returned fields
- Sample Response:
-
grants
- The grants info in JSON serialized form.- Sample Response:
{ "domain": [ { "id": 123, "label": "example-entity", "permissions": "read_only" } ], "global": { "account_access": "read_only", "add_databases": true, "add_domains": true, "add_firewalls": true, "add_images": true, "add_linodes": true, "add_longview": true, "add_nodebalancers": true, "add_stackscripts": true, "add_volumes": true, "cancel_account": false, "longview_subscription": true }, "image": [ { "id": 123, "label": "example-entity", "permissions": "read_only" } ], "linode": [ { "id": 123, "label": "example-entity", "permissions": "read_only" } ], "longview": [ { "id": 123, "label": "example-entity", "permissions": "read_only" } ], "nodebalancer": [ { "id": 123, "label": "example-entity", "permissions": "read_only" } ], "stackscript": [ { "id": 123, "label": "example-entity", "permissions": "read_only" } ], "volume": [ { "id": 123, "label": "example-entity", "permissions": "read_only" } ] }
- See the Linode API response documentation for a list of returned fields
- Sample Response: