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
This commit is contained in:
John Berninger 2023-12-29 03:41:49 -05:00 committed by GitHub
parent e99b5086a8
commit 1a3c93f80c
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'