community / community.general / 8.5.0 / module / scaleway_compute_private_network Scaleway compute - private network management | "added in version" 5.2.0 of community.general" Authors: Pascal MANGIN (@pastral)community.general.scaleway_compute_private_network (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
This module add or remove a private network to a compute instance (U(https://developer.scaleway.com)).
- name: Plug a VM to a private network community.general.scaleway_compute_private_network: project: '{{ scw_project }}' state: present region: par1 compute_id: "12345678-f1e6-40ec-83e5-12345d67ed89" private_network_id: "22345678-f1e6-40ec-83e5-12345d67ed89" register: nicsvpc_creation_task
- name: Unplug a VM from a private network community.general.scaleway_compute_private_network: project: '{{ scw_project }}' state: absent region: par1 compute_id: "12345678-f1e6-40ec-83e5-12345d67ed89" private_network_id: "22345678-f1e6-40ec-83e5-12345d67ed89"
state: choices: - present - absent default: present description: - Indicate desired state of the VPC. type: str region: choices: - ams1 - EMEA-NL-EVS - par1 - EMEA-FR-PAR1 - par2 - EMEA-FR-PAR2 - waw1 - EMEA-PL-WAW1 description: - Scaleway region to use (for example V(par1)). required: true type: str api_url: aliases: - base_url default: https://api.scaleway.com description: - Scaleway API URL. type: str project: description: - Project identifier. required: true type: str api_token: aliases: - oauth_token description: - Scaleway OAuth token. required: true type: str compute_id: description: - ID of the compute instance (see M(community.general.scaleway_compute)). required: true type: str api_timeout: aliases: - timeout default: 30 description: - HTTP timeout to Scaleway API in seconds. type: int validate_certs: default: true description: - Validate SSL certs of the Scaleway API. type: bool query_parameters: default: {} description: - List of parameters passed to the query string. type: dict private_network_id: description: - ID of the private network (see M(community.general.scaleway_private_network)). required: true type: str
scaleway_compute_private_network: description: Information on the VPC. returned: success when O(state=present) sample: created_at: '2022-01-15T11:11:12.676445Z' id: 12345678-f1e6-40ec-83e5-12345d67ed89 name: network organization_id: a123b4cd-ef5g-678h-90i1-jk2345678l90 project_id: a123b4cd-ef5g-678h-90i1-jk2345678l90 tags: - tag1 - tag2 - tag3 - tag4 - tag5 updated_at: '2022-01-15T11:12:04.624837Z' zone: fr-par-2 type: dict