mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Update Documentation with additional example
* Added an example to have the plugin return an IP address for a Proxmox guest, instead of the name of the guest (default behavior)
* Added an example to include a string literal to every guest (to support a playbook being able to check for variable presence to identify inventory in use)
* Update for line length readability
Co-authored-by: Felix Fontein <felix@fontein.de>
* Changed to cleaner static value
* Changed text for clarity
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c09f529f02
)
Co-authored-by: IronTooch <27360514+IronTooch@users.noreply.github.com>
This commit is contained in:
parent
3e25c692d7
commit
fab30c5e55
1 changed files with 16 additions and 0 deletions
|
@ -114,6 +114,22 @@ groups:
|
||||||
mailservers: "'mail' in (proxmox_tags_parsed|list)"
|
mailservers: "'mail' in (proxmox_tags_parsed|list)"
|
||||||
compose:
|
compose:
|
||||||
ansible_port: 2222
|
ansible_port: 2222
|
||||||
|
|
||||||
|
# Using the inventory to allow ansible to connect via the first IP address of the VM / Container
|
||||||
|
# (Default is connection by name of QEMU/LXC guests)
|
||||||
|
# Note: my_inv_var demonstrates how to add a string variable to every host used by the inventory.
|
||||||
|
# my.proxmox.yml
|
||||||
|
plugin: community.general.proxmox
|
||||||
|
url: http://pve.domain.com:8006
|
||||||
|
user: ansible@pve
|
||||||
|
password: secure
|
||||||
|
validate_certs: false
|
||||||
|
want_facts: true
|
||||||
|
compose:
|
||||||
|
ansible_host: proxmox_ipconfig0.ip | default(proxmox_net0.ip) | ipaddr('address')
|
||||||
|
my_inv_var_1: "'my_var1_value'"
|
||||||
|
my_inv_var_2: >
|
||||||
|
"my_var_2_value"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
Loading…
Reference in a new issue