mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #8038/795a855d backport][stable-8] Added startup configuration option (#8142)
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>
(cherry picked from commit 795a855d0e
)
Co-authored-by: Michael Cicogna <44257895+miccico@users.noreply.github.com>
This commit is contained in:
parent
d2e0d04336
commit
94890668a2
2 changed files with 16 additions and 0 deletions
2
changelogs/fragments/8038-proxmox-startup.yml
Normal file
2
changelogs/fragments/8038-proxmox-startup.yml
Normal 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).
|
|
@ -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'],
|
||||
|
|
Loading…
Reference in a new issue