mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-02 00:33:09 +00:00
ovirt_vm: Fix initialization of cloud init (#47348)
Fixes: https://github.com/ansible/ansible/issues/45900 This PR fixes the case when the cloud_init_persist was used, but we still sent use_cloud_init=False, which is in oVirt API evaluated as not to use cloud_init in first VM execution. This patch is changing it to send just None, instead of False. Signed-off-by: Ondra Machacek <omachace@redhat.com>
This commit is contained in:
@@ -2101,8 +2101,8 @@ def main():
|
||||
),
|
||||
wait_condition=lambda vm: vm.status == otypes.VmStatus.UP,
|
||||
# Start action kwargs:
|
||||
use_cloud_init=not module.params.get('cloud_init_persist') and module.params.get('cloud_init') is not None,
|
||||
use_sysprep=not module.params.get('cloud_init_persist') and module.params.get('sysprep') is not None,
|
||||
use_cloud_init=True if not module.params.get('cloud_init_persist') and module.params.get('cloud_init') is not None else None,
|
||||
use_sysprep=True if not module.params.get('cloud_init_persist') and module.params.get('sysprep') is not None else None,
|
||||
vm=otypes.Vm(
|
||||
placement_policy=otypes.VmPlacementPolicy(
|
||||
hosts=[otypes.Host(name=module.params['host'])]
|
||||
|
||||
Reference in New Issue
Block a user