community.general.scaleway_container module – Scaleway Container management
Note
This module is part of the community.general collection (version 9.4.0).
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 community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.scaleway_container
.
New in community.general 6.0.0
Synopsis
This module manages container on Scaleway account.
Requirements
The below requirements are needed on the host that executes this module.
passlib[argon2] >= 1.7.4
Parameters
Parameter |
Comments |
---|---|
HTTP timeout to Scaleway API in seconds. Default: |
|
Scaleway OAuth token. |
|
Scaleway API URL. Default: |
|
The length of time your handler can spend processing a request before being stopped. |
|
Description of the container namespace. Default: |
|
Environment variables of the container namespace. Injected in container at runtime. Default: |
|
Maximum number of connections per container. This parameter will be used to trigger autoscaling. |
|
Maximum number of replicas for the container. |
|
Resources define performance characteristics of your container. They are allocated to your container at runtime. |
|
Minimum number of replicas for the container. |
|
Name of the container namespace. |
|
Container namespace identifier. |
|
Listen port used to expose the container. |
|
Privacy policies define whether a container can be executed anonymously. Choose Choices:
|
|
Communication protocol of the container. Choices:
|
|
List of parameters passed to the query string. Default: |
|
Redeploy the container if update is required. Choices:
|
|
Scaleway region to use (for example Choices:
|
|
The name of image used for the container. |
|
Secret environment variables of the container namespace. Updating those values will not output a Injected in container at runtime. Default: |
|
Indicate desired state of the container. Choices:
|
|
Validate SSL certs of the Scaleway API. Choices:
|
|
Wait for the resource to reach its desired state before returning. Choices:
|
|
Time to wait before every attempt to check the state of the resource. Default: |
|
Time to wait for the resource to reach the expected state. Default: |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
Also see the API documentation on https://developer.scaleway.com/.
If
api_token
is not set within the module, the following environment variables can be used in decreasing order of precedenceSCW_TOKEN
,SCW_API_KEY
,SCW_OAUTH_TOKEN
orSCW_API_TOKEN
.If one wants to use a different
api_url
one can also set theSCW_API_URL
environment variable.
Examples
- name: Create a container
community.general.scaleway_container:
namespace_id: '{{ scw_container_namespace }}'
state: present
region: fr-par
name: my-awesome-container
registry_image: rg.fr-par.scw.cloud/funcscwtestrgy2f9zw/nginx:latest
environment_variables:
MY_VAR: my_value
secret_environment_variables:
MY_SECRET_VAR: my_secret_value
register: container_creation_task
- name: Make sure container is deleted
community.general.scaleway_container:
namespace_id: '{{ scw_container_namespace }}'
state: absent
region: fr-par
name: my-awesome-container
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The container information. Returned: when Sample: |