Commit Graph

27 Commits

Author SHA1 Message Date
maynero 83005f4ab6 Check if template key exists in api result 2021-07-24 08:41:46 +08:00
Xabi Ezpeleta d7b01396b5 Ommit group when OS id is empty 2021-05-10 13:48:07 +02:00
maynero 1b9f2582cb Add proxmox_type on qemu 2021-05-09 16:31:26 +08:00
maynero c76e31d8d9 Create group base on OS 2021-05-09 16:13:16 +08:00
maynero 4ba99b43ad Add OS information from QEMU agent 2021-05-09 14:43:44 +08:00
Xabi f3836c16e6
Merge pull request #33 from srufle/master
Added skipping 596 error code
2021-03-05 22:44:35 +01:00
Stephen Rufle 1272900089 Added skipping 596 error code
- Fixes urllib.error.HTTPError: HTTP Error 596: Broken pipe, when a node is unavailable
2020-09-04 15:31:00 -07:00
johnpc35 d9d990bd34 Check for ip-addresses before iterating over them 2020-08-08 02:25:10 -04:00
John 01dd5bc270 Fix QEMU guest agent IP address retrieval 2020-07-16 14:00:20 -04:00
Abid Khan 3650024b1d
Fixed python3 errors
Modified `network` > `networks`. Also fixed Python3 `TypeError: string indices must be integers` dict error.
2020-02-21 03:32:18 -07:00
Xabi Ezpeleta 02cce4d567 Add error handling
Check network is a valid object
2020-02-03 12:08:50 +01:00
Xabi Ezpeleta e05f224c8c Get IP address from Proxmox (OpenVZ) 2019-12-18 22:56:48 +01:00
Xabi Ezpeleta 2bd15b1bf7 Get IP address via Qemu Agent (KVM) 2019-12-18 21:36:43 +01:00
Calogero Lo Leggio 54f4e51c50 grab PVE version without revision (ex: 6.0 not 6.0-7)
this avoid error with float()
2019-10-09 11:22:31 +02:00
adubreuiltk 6255b78e92
Filter on qemu and lxc resources only
# SUMMARY
When using proxmox.py as a dynamic inventory for Ansible, only VM and lxc must be included in the output. Other resources such as datastores must be excluded.

# ISSUE TYPE
Bugfix Pull Request

# ADDITIONAL INFORMATION
If a datastore is defined in a pool, the script crashes as the parameter template does not apply to datastore objects.

# VERSION
PVE 5.4.13
2019-08-31 11:10:23 +02:00
Xabi Ezpeleta ba77d56258 Add a trailing slash to the proxmox url (fixes #15) 2019-03-15 09:48:13 +01:00
gardar 3499d2f7be
Fix python 2 and 3 compatibility
Changes to make the code compatible with both python 2 and 3, fixes #12
2019-03-14 22:22:41 +00:00
gardar 9ab21a9f0b
Python3 compatibility
Changes required for python 3
2019-01-13 00:59:26 +00:00
Andor Uhlár dadf7262fb
Handle cases where node is unavailable 2018-07-06 19:01:28 +02:00
Eriks Zelenka cda6dae03b Add backwards compatability with python 2.6 format requirements 2017-04-08 18:08:30 +01:00
Niccolò Maggioni 90d75824b7
PEP8 compliance
I seriously hope I didn't fuck something up.
2017-03-17 12:26:46 +01:00
Niccolò Maggioni 9c9c2f51ab
Coherence of certificate trust option naming 2017-03-17 12:08:46 +01:00
Niccolò Maggioni 095af19246
Global support for configuration file
CLI flags have precedence, followed by env variables and finally config keys.
2017-03-17 11:53:58 +01:00
Niccolò Maggioni 93d8723b98
Improved handling of partially missing parameters 2017-03-17 11:50:31 +01:00
Niccolò Maggioni b23d4751e1
Support for JSON configuration file 2017-03-17 10:59:39 +01:00
Eriks Zelenka ba35cdc297 Add backwards compatability with openvz on Proxmox ver3 2017-03-05 18:51:30 +00:00
Xabi 51f882f81c Modified Proxmox inventory 2016-11-22 16:12:25 +01:00