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:
Tristan Le Guern 2021-02-22 17:59:27 +01:00 committed by GitHub
parent abfbe2a48d
commit 305748b333
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 210 additions and 0 deletions

View file

@ -2,3 +2,4 @@ unsupported
proxmox_domain_info
proxmox_group_info
proxmox_user_info
proxmox_storage_info

View file

@ -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: