ovirt_vm: Fix initialization of cloud init
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:
parent
025c183307
commit
c204214df4
2 changed files with 4 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- ovirt_vm - Fix initialization of cloud init (https://github.com/ansible/ansible/pull/47354).
|
|
@ -2039,8 +2039,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'])]
|
||||
|
|
Loading…
Add table
Reference in a new issue