Skip to content

Docker plugin does not expand variable for "privileged" #104

Open
@LorenzoBettini

Description

I'd like to pass a variable for the privileged part e.g.,

platforms:
  - name: arch-instance
    image: arch-ansible
    platform: ${DOCKER_DEFAULT_PLATFORM:-linux/amd64}
    dockerfile: ../docker/Dockerfile
    build_image: true
...
    privileged: ${DOCKER_PRIVILEGED:-False}

During TASK [Discover local Docker images] the variable seems to be expanded correctly:

TASK [Discover local Docker images] ********************************************
ok: [localhost] => (item={'diff': [], '... 'platform': 'linux/amd64', 'privileged': False, ...

But then it fails later:

TASK [Wait for instance(s) creation to complete] *******************************
failed: ...
"msg": "argument 'privileged' is of type <class 'str'> and we were unable to convert to bool:
The value '${DOCKER_PRIVILEGED:-False}' is not a valid boolean. 
Valid booleans include: 'on', 'yes', 1, 0, '0', 'false', 'no', '1', 'f', 'off', 'y', 'true', 't', 'n'"...

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions