Skip to content

Commit d5e01f3

Browse files
authored
Add an example of how to create a volume from a template (ansible-collections#215)
1 parent 9a4afb4 commit d5e01f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugins/modules/virt_volume.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@
9797
</target>
9898
</volume>
9999
100+
- name: Create a volume from a template
101+
community.libvirt.virt_volume:
102+
pool: default
103+
xml: "{{ lookup('ansible.builtin.template', 'volume-template.xml.j2') }}"
104+
state: present
105+
100106
- name: List volumes in default pool
101107
community.libvirt.virt_volume:
102108
pool: default

0 commit comments

Comments
 (0)