community / community.general / 6.6.8 / module / scaleway_container Scaleway Container management | "added in version" 6.0.0 of community.general" Authors: Guillaume MARTINEZ (@Lunik)community.general.scaleway_container (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
This module manages container on Scaleway account.
- 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
name: description: - Name of the container namespace. required: true type: str port: description: - Listen port used to expose the container. type: int wait: default: true description: - Wait for the resource to reach its desired state before returning. type: bool state: choices: - present - absent default: present description: - Indicate desired state of the container. type: str region: choices: - fr-par - nl-ams - pl-waw description: - Scaleway region to use (for example C(fr-par)). required: true type: str api_url: aliases: - base_url default: https://api.scaleway.com description: - Scaleway API URL. type: str privacy: choices: - public - private default: public description: - Privacy policies define whether a container can be executed anonymously. - Choose C(public) to enable anonymous execution, or C(private) to protect your container with an authentication mechanism provided by the Scaleway API. type: str protocol: choices: - http1 - h2c default: http1 description: - Communication protocol of the container. type: str redeploy: default: false description: - Redeploy the container if update is required. type: bool api_token: aliases: - oauth_token description: - Scaleway OAuth token. required: true type: str max_scale: description: - Maximum number of replicas for the container. type: int min_scale: description: - Minimum number of replicas for the container. type: int api_timeout: aliases: - timeout default: 30 description: - HTTP timeout to Scaleway API in seconds. type: int description: default: '' description: - Description of the container namespace. type: str memory_limit: description: - Resources define performance characteristics of your container. - They are allocated to your container at runtime. type: int namespace_id: description: - Container namespace identifier. required: true type: str wait_timeout: default: 300 description: - Time to wait for the resource to reach the expected state. required: false type: int registry_image: description: - The name of image used for the container. required: true type: str validate_certs: default: true description: - Validate SSL certs of the Scaleway API. type: bool max_concurrency: description: - Maximum number of connections per container. - This parameter will be used to trigger autoscaling. type: int wait_sleep_time: default: 3 description: - Time to wait before every attempt to check the state of the resource. required: false type: int query_parameters: default: {} description: - List of parameters passed to the query string. type: dict container_timeout: description: - The length of time your handler can spend processing a request before being stopped. type: str environment_variables: default: {} description: - Environment variables of the container namespace. - Injected in container at runtime. type: dict secret_environment_variables: default: {} description: - Secret environment variables of the container namespace. - Updating thoses values will not output a C(changed) state in Ansible. - Injected in container at runtime. type: dict
container: description: The container information. returned: when I(state=present) sample: cpu_limit: 140 description: Container used for testing scaleway_container ansible module domain_name: cnansibletestgfogtjod-cn-ansible-test.functions.fnc.fr-par.scw.cloud environment_variables: MY_VAR: my_value error_message: null http_option: '' id: c9070eb0-d7a4-48dd-9af3-4fb139890721 max_concurrency: 50 max_scale: 5 memory_limit: 256 min_scale: 0 name: cn-ansible-test namespace_id: 75e299f1-d1e5-4e6b-bc6e-4fb51cfe1e69 port: 80 privacy: public protocol: http1 region: fr-par registry_image: rg.fr-par.scw.cloud/namespace-ansible-ci/nginx:latest secret_environment_variables: - key: MY_SECRET_VAR value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg status: created timeout: 300s type: dict