Skip to content

gitlab_runner: user_data template issue with Ansible 2.19 #493

@Normo

Description

@Normo

The user_data field in the gitlab_unner role's config.toml template incorrectly double-encodes JSON content when using Ansible 2.19, causing the autoscaler configuration to fail.

The template line:

user_data = '{{ __ignition_content | to_json }}'

Produces incorrectly formatted output:

user_data = '"{\"ignition\":{\"version\":\"3.4.0\"},\"passwd\":{\"users\":[...]}}"'

This triple-wraps the JSON content:

  1. TOML string wrapper ('...')
  2. JSON string encoding ("...")
  3. Escaped JSON content ({\"ignition\"...})

__ignition_content is already valid JSON from base64-decoding ignition.json. The | to_json filter double-encodes it, which Ansible 2.19's stricter template handling now rejects.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions