fix: various fixes#927
Open
dupremathieu wants to merge 3 commits into
Open
Conversation
f967224 to
5992293
Compare
- configure_libvirt_rdb_secret: add | bool filter to when conditions since the Jinja2 template produces a string 'true' not a boolean - configure_ha: use safe groups.get() in delegate_to to avoid crash when valid_machine group doesn't exist Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
Ansible 2.20 mishandles the '#!/usr/bin/env python3' shebang when constructing the remote command for custom modules. Because the shebang contains a space (/usr/bin/env + python3), Ansible wraps the interpreter path in extra single quotes, causing the remote shell to look for a literally-quoted string as a binary name. Example of the broken SSH command: /bin/sh -c ''\''/usr/bin/env python3'\'' ...' Changing to '#!/usr/bin/python3' avoids the quoting issue and matches the ansible_python_interpreter already configured in the inventory. Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
Add a vm_domain_type variable to the guest XML template (defaults to 'kvm'). This is intentionally undocumented — it exists only to allow running VMs in a virtual sandbox where nested KVM is unavailable, by setting vm_domain_type: qemu in the host vars. Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
d90532c to
ef543a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
configure_libvirt_rdb_secretby adding| boolfilterdelegate_tocrash inconfigure_hawhenvalid_machinegroup doesn't existDetails
configure_libvirt_rdb_secret
The Jinja2 template in the
set_facttask produces a string"true"instead of a boolean. Adding| boolto thewhenconditions fixes the "Conditional result (True) was derived from value of type 'str'" error.configure_ha
The
delegate_to: "{{ groups['valid_machine'][0] }}"expression fails with "object of type 'dict' has no attribute 'valid_machine'" when no hosts were added to that group. Usinggroups.get()with a fallback avoids the crash. Thewhencondition still prevents the task from actually running.