[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:
patchback[bot] 2023-12-29 09:55:53 +01:00 committed by GitHub
commit bf089294b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 159 additions and 0 deletions

View file

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