mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ovirt_vms: Don't start VM if state is present (#31698)
This commit is contained in:
parent
d6b564966f
commit
aca8a3b4d7
1 changed files with 3 additions and 2 deletions
|
@ -47,7 +47,8 @@ options:
|
||||||
When C(state) is I(registered) and the unregistered VM's name
|
When C(state) is I(registered) and the unregistered VM's name
|
||||||
belongs to an already registered in engine VM in the same DC
|
belongs to an already registered in engine VM in the same DC
|
||||||
then we fail to register the unregistered template."
|
then we fail to register the unregistered template."
|
||||||
- "I(present) and I(running) are equal states."
|
- "I(present) state will create/update VM and don't change its state if it already exists."
|
||||||
|
- "I(running) state will create/update VM and start it."
|
||||||
- "I(next_run) state updates the VM and if the VM has next run configuration it will be rebooted."
|
- "I(next_run) state updates the VM and if the VM has next run configuration it will be rebooted."
|
||||||
- "Please check I(notes) to more detailed description of states."
|
- "Please check I(notes) to more detailed description of states."
|
||||||
- "I(registered) is supported since 2.4"
|
- "I(registered) is supported since 2.4"
|
||||||
|
@ -1226,7 +1227,7 @@ def main():
|
||||||
)
|
)
|
||||||
|
|
||||||
# Run the VM if it was just created, else don't run it:
|
# Run the VM if it was just created, else don't run it:
|
||||||
if state == 'running' or vm is None:
|
if state == 'running':
|
||||||
initialization = _get_initialization(sysprep, cloud_init, cloud_init_nics)
|
initialization = _get_initialization(sysprep, cloud_init, cloud_init_nics)
|
||||||
ret = vms_module.action(
|
ret = vms_module.action(
|
||||||
action='start',
|
action='start',
|
||||||
|
|
Loading…
Reference in a new issue