Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Ansible dataset_loader cachegroup template renders fallbackToClosest to be a string instead of a bool #6539

@davidc0le

Description

@davidc0le

This Bug Report affects these Traffic Control components:

  • Automation (Ansible)

Current behavior:

If one of the cachegroups as defined in dl_ds_merged_cachegroups contains fallbackToClosest set to either true or false, an error will be seen when the playbook is executed:

HTTP Error 400: Bad Request
json: cannot unmarshal string into Go struct field TOCacheGroup.fallbackToClosest of type bool

The template file within the dataset loader role named cachegroup.j2 is quoting the value instead of sending in to TO as a bool.

Expected behavior:

The cachegroup should be added with fallbackToClosest set to a boolean as per your dl_ds_merged_cachegroups dict

Steps to reproduce:

Define dl_ds_merged_cachegroups with a fallbackToClosest variable set to true

dl_ds_merged_cachegroups:
  - name: multi-site-org-east
    shortName: msoe
    latitude: 0
    longitude: 0
    parentCachegroup:
    secondaryParentCachegroup:
    localizationMethods:
    type: ORG_LOC
    fallbackToClosest:
  - name: mid-east
    shortName: east
    latitude: 0
    longitude: 0
    parentCachegroup: multi-site-org-east
    secondaryParentCachegroup: 
    localizationMethods:
    type: MID_LOC
    fallbackToClosest:
  - name: albany-ny-usa
    shortName: ny
    latitude: 42.659829
    longitude: -73.781339
    parentCachegroup: mid-east
    secondaryParentCachegroup:
    localizationMethods:
    type: EDGE_LOC
    fallbackToClosest: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    ansibleRelated to the Ansible rolesautomationrelated to automated testing/deployment/packaging etc.bugsomething isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions