mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
[PR #7689/1a3c93f8 backport][stable-8] Add proxmox_node_info module (#7793)
Add proxmox_node_info module (#7689)
* Add proxmox_node_info module - restarted PR due to erroneous update/push of my local fork.
* Used wrong user ID.
* Changes requested by felixfontein:
- Capitalization and punctuation in documentation section
- trailing comma on line 125
- Re-order BOTMETA so it is alphabetical
* Mis-copied older version of code, correcting actual call
* Add tests for proxmox_node_info module
(cherry picked from commit 1a3c93f80c
)
Co-authored-by: John Berninger <john.berninger@gmail.com>
This commit is contained in:
parent
87a079e93c
commit
bf089294b4
3 changed files with 159 additions and 0 deletions
|
@ -577,3 +577,20 @@
|
|||
- results_kvm_destroy is changed
|
||||
- results_kvm_destroy.vmid == {{ vmid }}
|
||||
- results_kvm_destroy.msg == "VM {{ vmid }} removed"
|
||||
|
||||
- name: Retrieve information about nodes
|
||||
proxmox_node_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 }}"
|
||||
register: results
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- results is not changed
|
||||
- results.proxmox_nodes is defined
|
||||
- results.proxmox_nodes|length >= 1
|
||||
- results.proxmox_nodes[0].type == 'node'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue