1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Added startup configuration option (#8038)

* Added startup configuration option

Added the option to configure startup behavior of lxc containers. Works well in conjunction with onboot and allows to set startup order, startup delay and shutdown delay

* Removed trailing whitespaces in documentation

* added changelog fragment

* Updated Documentation to suggested wording

Co-authored-by: Felix Fontein <felix@fontein.de>

* Improve documentation.

* Fix changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Michael Cicogna 2024-03-24 22:22:10 +01:00 committed by GitHub
parent a4b32d7b9c
commit 795a855d0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- proxmox - adds ``startup`` parameters to configure startup order, startup delay and shutdown delay (https://github.com/ansible-collections/community.general/pull/8038).

View file

@ -81,6 +81,15 @@ options:
type: list
elements: str
version_added: 2.0.0
startup:
description:
- Specifies the startup order of the container.
- Use C(order=#) where C(#) is a non-negative number to define the general startup order. Shutdown in done with reverse ordering.
- Use C(up=#) where C(#) is in seconds, to specify a delay to wait before the next VM is started.
- Use C(down=#) where C(#) is in seconds, to specify a delay to wait before the next VM is stopped.
type: list
elements: str
version_added: 8.5.0
mounts:
description:
- specifies additional mounts (separate disks) for the container. As a hash/dictionary defining mount points
@ -761,6 +770,7 @@ def main():
]),
onboot=dict(type='bool'),
features=dict(type='list', elements='str'),
startup=dict(type='list', elements='str'),
storage=dict(default='local'),
cpuunits=dict(type='int'),
nameserver=dict(),
@ -859,6 +869,9 @@ def main():
features=",".join(module.params["features"])
if module.params["features"] is not None
else None,
startup=",".join(module.params["startup"])
if module.params["startup"] is not None
else None,
description=module.params["description"],
hookscript=module.params["hookscript"],
timezone=module.params["timezone"],
@ -912,6 +925,7 @@ def main():
force=ansible_to_proxmox_bool(module.params['force']),
pubkey=module.params['pubkey'],
features=",".join(module.params['features']) if module.params['features'] is not None else None,
startup=",".join(module.params['startup']) if module.params['startup'] is not None else None,
unprivileged=ansible_to_proxmox_bool(module.params['unprivileged']),
description=module.params['description'],
hookscript=module.params['hookscript'],