Manage a Linode Placement Group.
Field | Type | Required | Description |
---|---|---|---|
api_token |
str |
Required | The Linode account personal access token. It is necessary to run the module. It can be exposed by the environment variable LINODE_API_TOKEN instead. See details in Usage. |
- name: Create a placement group
linode.cloud.placement_group:
label: my-pg
region: us-east
placement_group_type: anti_affinity:local
placement_group_policy: flexible
state: present
- name: Update a Linode placement group label
linode.cloud.placement_group:
# id is required to update the label
id: 123
label: my-pg-updated
state: present
- name: Delete a placement group by label
linode.cloud.placement_group:
label: my-pg
state: absent
- name: Delete a placement group by id
linode.cloud.placement_group:
id: 123
state: absent
Field | Type | Required | Description |
---|---|---|---|
state |
str |
Required | The desired state of the target. (Choices: present , absent ) |
id |
int |
Optional | The unique ID of the placement group. |
label |
str |
Optional | The label of the Placement Group. This field can only contain ASCII letters, digits and dashes. |
region |
str |
Optional | The region that the placement group is in. |
placement_group_type |
str |
Optional | The type of this placement group. |
placement_group_policy |
str |
Optional | The policy for assigning Linodes to this placement group. (Choices: flexible , strict ) |
-
placement_group
- The Placement Group in JSON serialized form.- Sample Response:
{ "id": 123, "label": "my-pg", "region": "eu-west", "placement_group_type": "anti_affinity:local", "placement_group_policy": "flexible", "is_compliant": true, "members": [ { "linode_id": 123, "is_compliant": true } ] }
- See the Linode API response documentation for a list of returned fields
- Sample Response: