Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add swap_size to instance_spec config #554

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/modules/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ Manage Linode Instances, Configs, and Disks.
| `auto_disk_resize` | <center>`bool`</center> | <center>Optional</center> | Whether implicitly created disks should be resized during a type change operation. **(Default: `False`)** |
| `tags` | <center>`list`</center> | <center>Optional</center> | An array of tags applied to this object. Tags are for organizational purposes only. **(Updatable)** |
| [`placement_group` (sub-options)](#placement_group) | <center>`dict`</center> | <center>Optional</center> | A Placement Group to create this Linode under. |
| `swap_size` | <center>`int`</center> | <center>Optional</center> | When deploying from an Image, this field is optional, otherwise it is ignored. This is used to set the swap disk size for the newly-created Linode. |

### configs

Expand Down
7 changes: 7 additions & 0 deletions plugins/modules/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,13 @@
suboptions=linode_instance_placement_group_spec,
description=["A Placement Group to create this Linode under."],
),
"swap_size": SpecField(
type=FieldType.integer,
description=[
"When deploying from an Image, this field is optional, otherwise it is ignored. "
"This is used to set the swap disk size for the newly-created Linode."
],
),
}

SPECDOC_META = SpecDocMeta(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
root_pass: Fn$$oobar123
private_ip: true
booted: true
swap_size: 512
state: present
firewall_id: '{{ firewall_id }}'
register: create
Expand Down
Loading