mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
New module proxmox_storage_info (#1844)
* proxmox_storage_info: new module Simple info module dedicated to the retrieval of information about the storages available on a Proxmox VE cluster. * Update plugins/modules/cloud/misc/proxmox_storage_info.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/misc/proxmox_storage_info.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/misc/proxmox_storage_info.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/misc/proxmox_storage_info.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/misc/proxmox_storage_info.py Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
abfbe2a48d
commit
305748b333
4 changed files with 210 additions and 0 deletions
|
@ -2,3 +2,4 @@ unsupported
|
|||
proxmox_domain_info
|
||||
proxmox_group_info
|
||||
proxmox_user_info
|
||||
proxmox_storage_info
|
||||
|
|
|
@ -110,6 +110,24 @@
|
|||
- results_userid.proxmox_users[0].user == "{{ user }}"
|
||||
- results_userid.proxmox_users[0].userid == "{{ user }}@{{ domain }}"
|
||||
|
||||
- name: Retrieve info about storage
|
||||
proxmox_storage_info:
|
||||
api_host: "{{ api_host }}"
|
||||
api_user: "{{ user }}@{{ domain }}"
|
||||
api_password: "{{ api_password | default(omit) }}"
|
||||
api_token_id: "{{ api_token_id | default(omit) }}"
|
||||
api_token_secret: "{{ api_token_secret | default(omit) }}"
|
||||
validate_certs: "{{ validate_certs }}"
|
||||
storage: "{{ storage }}"
|
||||
register: results_storage
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- results_storage is not changed
|
||||
- results_storage.proxmox_storages is defined
|
||||
- results_storage.proxmox_storages|length == 1
|
||||
- results_storage.proxmox_storages[0].storage == "{{ storage }}"
|
||||
|
||||
- name: VM creation
|
||||
tags: [ 'create' ]
|
||||
block:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue