February 2018
Intermediate to advanced
200 pages
5h 51m
English
Let's start by creating a 5 GB volume:
- name: create 5G test volume os_volume: state: present size: 5 display_name: data
The os_volume module takes a size and a display name as parameters and creates a volume. This volume is not attached to the compute instance yet. We'll attach this volume to our webserver compute instance in the next task.
Let's go ahead and attach the volume created in the previous task to the webserver compute instance that we created before:
- name: attach volume to host os_server_volume: state: present server: webserver volume: data
The preceding task is going to attach the volume with the name data to a compute instance named webserver. We can log into the instance and verify this. We may format the ...
Read now
Unlock full access