Ovirt correct sysprep backport (#59286)

* use sysprep only when needed (#59196)

* add changelog
This commit is contained in:
Martin Nečas 2019-07-22 22:53:52 +02:00 committed by Toshio Kuratomi
parent 8074fa9a3e
commit 5447dc855b
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "Check when user does pass empty dict to sysprep. Fixes https://github.com/oVirt/ovirt-ansible-vm-infra/issues/104"

View file

@ -2332,8 +2332,8 @@ def main():
),
wait_condition=lambda vm: vm.status == otypes.VmStatus.UP,
# Start action kwargs:
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,
use_cloud_init=True if not module.params.get('cloud_init_persist') and module.params.get('cloud_init') else None,
use_sysprep=True if not module.params.get('cloud_init_persist') and module.params.get('sysprep') else None,
vm=otypes.Vm(
placement_policy=otypes.VmPlacementPolicy(
hosts=[otypes.Host(name=module.params['host'])]