cloudscale_ch.cloud.objects_user module – Manages objects users on the cloudscale.ch IaaS service

Note

This module is part of the cloudscale_ch.cloud collection (version 2.2.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install cloudscale_ch.cloud.

To use it in a playbook, specify: cloudscale_ch.cloud.objects_user.

New in version 1.1.0: of cloudscale_ch.cloud

Synopsis

  • Create, update and remove objects users cloudscale.ch IaaS service.

Parameters

Parameter

Comments

api_timeout

integer

Timeout in seconds for calls to the cloudscale.ch API.

This can also be passed in the CLOUDSCALE_API_TIMEOUT environment variable.

Default: 45

api_token

string / required

cloudscale.ch API token.

This can also be passed in the CLOUDSCALE_API_TOKEN environment variable.

api_url

string

added in 1.3.0 of cloudscale_ch.cloud

cloudscale.ch API URL.

This can also be passed in the CLOUDSCALE_API_URL environment variable.

Default: “https://api.cloudscale.ch/v1”

display_name

aliases: name

string

Display name of the objects user.

Either display_name or id is required.

id

string

Name of the objects user.

Either display_name or id is required.

state

string

State of the objects user.

Choices:

  • present ← (default)

  • absent

tags

dictionary

Tags associated with the objects user. Set this to {} to clear any tags.

Notes

Note

Examples

- name: Create an objects user
  cloudscale_ch.cloud.objects_user:
    display_name: alan
    tags:
      project: luna
    api_token: xxxxxx
  register: object_user

- name: print keys
  debug:
    var: object_user.keys

- name: Update an objects user
  cloudscale_ch.cloud.objects_user:
    display_name: alan
    tags:
      project: gemini
    api_token: xxxxxx

- name: Remove an objects user
  cloudscale_ch.cloud.objects_user:
    display_name: alan
    state: absent
    api_token: xxxxxx

Return Values

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

Key

Description

display_name

string

The display name of the objects user.

Returned: success

Sample: “alan”

href

string

The API URL to get details about this resource.

Returned: success when state == present

Sample:https://api.cloudscale.ch/v1/objects-users/6fe39134bf4178747eebc429f82cfafdd08891d4279d0d899bc4012db1db6a15

id

string

The ID of the objects user.

Returned: success

Sample: “6fe39134bf4178747eebc429f82cfafdd08891d4279d0d899bc4012db1db6a15”

keys

complex

List of key objects.

Returned: success

access_key

string

The access key.

Returned: success

Sample: “0ZTAIBKSGYBRHQ09G11W”

secret_key

string

The secret key.

Returned: success

Sample: “bn2ufcwbIa0ARLc5CLRSlVaCfFxPHOpHmjKiH34T”

state

string

The current status of the objects user.

Returned: success

Sample: “present”

tags

dictionary

Tags assosiated with the objects user.

Returned: success

Sample: {“project”: “my project”}

Authors

  • Rene Moser (@resmo)