mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-08 22:30:04 -07:00
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:
parent
e99b5086a8
commit
1a3c93f80c
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