Skip to content

[devscripts] use boolean conditionals in devscripts tasks#3801

Open
fultonj wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
fultonj:ansible_lvm_conditional
Open

[devscripts] use boolean conditionals in devscripts tasks#3801
fultonj wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
fultonj:ansible_lvm_conditional

Conversation

@fultonj
Copy link
Contributor

@fultonj fultonj commented Mar 25, 2026

Newer Ansible requires conditionals to resolve to explicit boolean values rather than relying on truthiness of other types.

132_extend_lvm.yml: replace bare dict checks for ansible_lvm and root_mount_data with | length > 0.

137_custom_install.yml: remove erroneous double quotes wrapping the version test expression, which caused it to be evaluated as a non-empty string (always True) instead of a boolean.

Assisted-By: Claude Sonnet 4.6 noreply@anthropic.com

Newer Ansible requires conditionals to resolve to explicit boolean
values rather than relying on truthiness of other types.

132_extend_lvm.yml: replace bare dict checks for ansible_lvm and
root_mount_data with `| length > 0`.

137_custom_install.yml: remove erroneous double quotes wrapping the
version test expression, which caused it to be evaluated as a
non-empty string (always True) instead of a boolean.

Signed-off-by: John Fulton <fulton@redhat.com>
Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 25, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign brjackma for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fultonj
Copy link
Contributor Author

fultonj commented Mar 25, 2026

My deployment fails without this patch when I use the following ansible:

$ ansible --version
ansible [core 2.20.3]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/johfulto/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/johfulto/test-python/lib64/python3.14/site-packages/ansible
  ansible collection location = /home/johfulto/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/johfulto/test-python/bin/ansible
  python version = 3.14.3 (main, Feb  4 2026, 00:00:00) [GCC 15.2.1 20260123 (Red Hat 15.2.1-7)] (/home/johfulto/test-python/bin/python3)
  jinja version = 3.1.6
  pyyaml version = 6.0.3 (with libyaml v0.2.5)

@evallesp
Copy link
Contributor

I think we need to push the second file change!

@evallesp
Copy link
Contributor

I think we need to push the second file change!

Actually is here: #3800

@evallesp
Copy link
Contributor

Let's change the commit message and we should be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants