-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add backup module for proxmox #9197
base: main
Are you sure you want to change the base?
Conversation
@IamLunchbox this PR contains the following merge commits: Please rebase your branch to remove these commits. |
This comment was marked as outdated.
This comment was marked as outdated.
…bstraction for api calls
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I've added some first comments on the documentation.
Thank you for the review! I implemented your suggestions and added an additional option, which was recently released. Does |
Also note that you did not add the module to the action group. Only the modules listed for the |
Ok, thanks. I will implement those two fixes today. |
If nobody objects, I'll merge this PR for the next release. |
SUMMARY
This module adds a task to create backup tasks in a proxmox virtual environment cluster.
ISSUE TYPE
COMPONENT NAME
proxmox_backup
ADDITIONAL INFORMATION
Currently, not all api options are covered, since they are either difficult to implement or only available for the root-user of the instance used.
For example, the api offers an exclude-mode next to the include, pool and all-mode. But this would would require other dependent settings to be set at as well. It could be added though, but I thought this will probably not be used, when
include
-mode and node-restrictions are available.As to root-limited options (e.g.
tmpdir
api-parameter): I opted reproducing the options available in the GUI of a proxmox cluster, the options which I not implemented are not visible there either. And since I suspect most organizations would rather use a dedicated user or api-key to perform backups instead of the master-root user, I opted for simplicity and left these options out entirely. Users, which rely soley on the GUI to schedule and perform backups won't even know, that these options exist.Compared to other proxmox modules, this module adds several checks regarding available permissions, but I value backups as mission critical and wanted to ensure a reasonable user experience by failing gracefully, if basic conditions are not met.
But on the other hand, this adds some complexity to the module, so if this is overburdening for an ansible module, i can delete them as well.
Lastly, I have seen PR #8360, but I have two issues with it:
nodes/{node}/vzdump
).Check: ["perm","/",["Sys.Modify"]]
). Any user who would want to perform backups using feat/add proxmox backup module #8360 would essentially need root-privileges, while proxmox has a quite detailed permission system, which allows user to have a dedicated VM.Backup permission. This fine grained control is quite interesting for CI/CD setups, where an api-key with low level permissions can be used, to create a backup before for example a patch is deployed.If #8360 is merged at some point, I suggest it to be renamed to proxmox_backup_schedule, since that is what it does. I know that the proxmox api documentation is kind of misleading regarding the relationship of those two endpoints. If need be, I can post images of the GUI usage and the corresponding api-calls to the proxmox backend.