Note
This module is part of the community.general collection (version 10.7.3).
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 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
The below requirements are needed on the host that executes this module.
Parameter | Comments |
|---|---|
api_timeout aliases: timeout integer | HTTP timeout to Scaleway API in seconds. Default: |
api_token aliases: oauth_token string / required | Scaleway OAuth token. |
api_url aliases: base_url string | Scaleway API URL. Default: |
container_timeout string | The length of time your handler can spend processing a request before being stopped. |
description string | Description of the container namespace. Default: |
environment_variables dictionary | Environment variables of the container namespace. Injected in container at runtime. Default: |
max_concurrency integer | Maximum number of connections per container. This parameter will be used to trigger autoscaling. |
max_scale integer | Maximum number of replicas for the container. |
memory_limit integer | Resources define performance characteristics of your container. They are allocated to your container at runtime. |
min_scale integer | Minimum number of replicas for the container. |
name string / required | Name of the container namespace. |
namespace_id string / required | Container namespace identifier. |
port integer | Listen port used to expose the container. |
privacy string | Privacy policies define whether a container can be executed anonymously. Choose Choices:
|
protocol string | Communication protocol of the container. Choices:
|
query_parameters dictionary | List of parameters passed to the query string. Default: |
redeploy boolean | Redeploy the container if update is required. Choices:
|
region string / required | Scaleway region to use (for example Choices:
|
registry_image string / required | The name of image used for the container. |
secret_environment_variables dictionary | Secret environment variables of the container namespace. Updating those values will not output a Injected in container at runtime. Default: |
state string | Indicate desired state of the container. Choices:
|
validate_certs boolean | Validate SSL certs of the Scaleway API. Choices:
|
wait boolean | Wait for the resource to reach its desired state before returning. Choices:
|
wait_sleep_time integer | Time to wait before every attempt to check the state of the resource. Default: |
wait_timeout integer | Time to wait for the resource to reach the expected state. Default: |
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
Note
api_token is not set within the module, the following environment variables can be used in decreasing order of precedence SCW_TOKEN, SCW_API_KEY, SCW_OAUTH_TOKEN or SCW_API_TOKEN.api_url one can also set the SCW_API_URL environment variable.- 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
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
container dictionary | The container information. Returned: when Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/scaleway_container_module.html