aboutsummaryrefslogtreecommitdiff
path: root/ansible/inventory.proxmox.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/inventory.proxmox.yaml')
-rw-r--r--ansible/inventory.proxmox.yaml31
1 files changed, 31 insertions, 0 deletions
diff --git a/ansible/inventory.proxmox.yaml b/ansible/inventory.proxmox.yaml
new file mode 100644
index 0000000..10b8353
--- /dev/null
+++ b/ansible/inventory.proxmox.yaml
@@ -0,0 +1,31 @@
+---
+plugin: community.general.proxmox
+url: https://pve.vpn:8006
+validate_certs: false
+want_facts: true
+
+user: inventory@pam
+token_id: inventory
+token_secret: !vault |
+ $ANSIBLE_VAULT;1.1;AES256
+ 30396461303633373334316433333932376238393031356233363563653330643833373038383966
+ 3739353834386339393933366337653939313666303561660a393336636664623735353062343361
+ 39366233373931323665333933356336326439636335333135356436343732313765306466366138
+ 3637653737343537660a346336666430373437323562643761336532386365623465323732393762
+ 66363064613162616463336135633639373530303866623133623139306362333432643361643766
+ 6465356638653963333934636336306533333133333164366661
+
+
+proxmox_usable: (proxmox_status == "running")
+
+# Group VMs by tags for reference in playbooks.
+keyed_groups:
+ # proxmox_tags_parsed is an example of a fact only returned when 'want_facts=true'
+ - key: proxmox_tags_parsed
+ separator: ""
+ prefix: "tag_"
+
+want_proxmox_nodes_ansible_host: false
+compose:
+ ansible_host: proxmox_ipconfig0["ip"].split('/')[0]
+...