+
Skip to content

[BUG] Ansible 2.19 Compatibility / ALLOW_BROKEN_CONDITIONALS #135

@ps-mattstuart

Description

@ps-mattstuart

Related bug in other repository DataDog/ansible-datadog#669

Environment details (Operating System, Cloud provider, etc):

OS  macOS 15.6
ansible [core 2.19.2]
  config file = None
  python version = 3.13.7 (main, Aug 14 2025, 11:12:11) [Clang 17.0.0 (clang-1700.0.13.3)] 
  jinja version = 3.1.6
  pyyaml version = 6.0.2 (with libyaml v0.2.5)

Describe what happened:
When running a playbook that includes Datadog.dd collection roles, the following errors cause the playbook to halt:

[ERROR]: Task failed: Conditional result (False) was derived from value of type 'str' at 'collections/ansible_collections/datadog/dd/roles/agent/defaults/main.yml:201:25'. Conditionals must have a boolean result.

Task failed.
Origin: collections/ansible_collections/datadog/dd/roles/agent/tasks/installer-config.yml:7:3

5   when: datadog_apm_instrumentation_enabled | length > 0 or datadog_remote_updates | bool
6
7 - name: Set internal values for installer registry
    ^ column 3

<<< caused by >>>

Conditional result (False) was derived from value of type 'str' at 'collections/ansible_collections/datadog/dd/roles/agent/defaults/main.yml:201:25'. Conditionals must have a boolean result.
Origin: collections/ansible_collections/datadog/dd/roles/agent/tasks/installer-config.yml:13:9

11         registry: "{{ datadog_installer_registry }}"
12         auth: "{{ datadog_installer_auth }}"
13   when: datadog_installer_registry or datadog_installer_auth
           ^ column 9

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

This is w/o allowing broken conditionals.

Describe what you expected:
The task to have completed executing without error.

Steps to reproduce the issue:

Run a playbook that includes the Datadog roles : agent install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载