Skip to content

fix: use explicit boolean condition#346

Merged
lae merged 1 commit intolae:developfrom
PendaGTP:fix/explicit-boolean-condition-in-realm-task
Jan 4, 2026
Merged

fix: use explicit boolean condition#346
lae merged 1 commit intolae:developfrom
PendaGTP:fix/explicit-boolean-condition-in-realm-task

Conversation

@PendaGTP
Copy link
Contributor

@PendaGTP PendaGTP commented Jan 2, 2026

Make the conditional return an explicit boolean (needed for ansible >=2.19)

Error occur using ansible >= 2.19 when pve_domains_cfg doesn't contain type ad and ldap:

TASK [lae.proxmox : Ensure /etc/pve/priv/realm/ exists] ********************************************************************************************************************************************************************************************************************************
[ERROR]: Task failed: Conditional result (False) was derived from value of type 'int' at 'lae.proxmox/tasks/realms_config.yml:49:9'. Conditionals must have a boolean result.

Task failed.
Origin: lae.proxmox/tasks/realms_config.yml:42:3

40                          | selectattr('attributes.bind_password', 'defined') }}
41
42 - name: Ensure /etc/pve/priv/realm/ exists
     ^ column 3

<<< caused by >>>

Conditional result (False) was derived from value of type 'int' at 'lae.proxmox/tasks/realms_config.yml:49:9'. Conditionals must have a boolean result.
Origin:lae.proxmox/tasks/realms_config.yml:49:9

47     group: www-data
48     mode: "0700"
49   when: pve_ldap_realms_with_bind_pw | length
           ^ column 9

Broken conditionals can be temporarily allowed with the `ALLOW_BROKEN_CONDITIONALS` configuration option.

fatal: [masked]: FAILED! => {"changed": false, "msg": "Task failed: Conditional result (False) was derived from value of type 'int' at 'lae.proxmox/tasks/realms_config.yml:49:9'. Conditionals must have a boolean result."}

@lae lae merged commit 15e2027 into lae:develop Jan 4, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants