Skip to content

PWD used instead of playbook_dir in ansible/site.yaml #543

@brianredbeard

Description

@brianredbeard

Description

Using PWD is unreliable as it depends on where the playbook is invoked from. Should use playbook_dir for consistent path resolution.

Location

https://github.com/validatedpatterns/multicloud-gitops/blob/main/ansible/site.yaml

chdir: "{{ lookup('env', 'PWD') }}"

Expected Behavior

Use playbook_dir variable which always refers to the directory containing the playbook.

Suggested Fix

chdir: "{{ playbook_dir }}/.."

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