Skip to content

Commit

Permalink
Merge pull request linode#176 from LBGarber/doc/instance-config-disk
Browse files Browse the repository at this point in the history
doc: Add example for provisioning an instance with explicit configs and disks
  • Loading branch information
LBGarber authored Aug 19, 2022
2 parents ad013e1 + b77e662 commit c86d0ed
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/modules/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,33 @@ Manage Linode Instances, Configs, and Disks.
state: present
```
```yaml
- name: Create a Linode Instance with explicit configs and disks.
linode.cloud.instance:
label: 'my-complex-instance'
region: us-southeast
type: g6-standard-1
booted: true
boot_config_label: boot-config
disks:
- label: boot
image: linode/ubuntu18.04
size: 3000
root_pass: ans1ble-test!
- label: swap
filesystem: swap
size: 512
configs:
- label: boot-config
root_device: /dev/sda
devices:
sda:
disk_label: boot
sdb:
disk_label: swap
state: present
```
```yaml
- name: Delete a Linode instance.
linode.cloud.instance:
Expand Down
24 changes: 24 additions & 0 deletions plugins/module_utils/doc_fragments/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,30 @@
tags:
- env=prod
state: present''', '''
- name: Create a Linode Instance with explicit configs and disks.
linode.cloud.instance:
label: 'my-complex-instance'
region: us-southeast
type: g6-standard-1
booted: true
boot_config_label: boot-config
disks:
- label: boot
image: linode/ubuntu18.04
size: 3000
root_pass: ans1ble-test!
- label: swap
filesystem: swap
size: 512
configs:
- label: boot-config
root_device: /dev/sda
devices:
sda:
disk_label: boot
sdb:
disk_label: swap
state: present''', '''
- name: Delete a Linode instance.
linode.cloud.instance:
label: my-linode
Expand Down

0 comments on commit c86d0ed

Please sign in to comment.