Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to set working directory for a template task #1984

Open
mikaelparkefelt opened this issue Apr 30, 2024 · 1 comment
Open

Not possible to set working directory for a template task #1984

mikaelparkefelt opened this issue Apr 30, 2024 · 1 comment

Comments

@mikaelparkefelt
Copy link

mikaelparkefelt commented Apr 30, 2024

I have a repository with different folders for different Ansible playbooks:

folder 1:
  ansible.cfg
  collections/requirements.cfg
  roles/requirements.cfg
folder 2:
  ansible.cfg
  collections/requirements.cfg
  roles/requirements.cfg

Every folder has different files as described as above.

When I run a tasks I get the following output:

No collections/requirements.yml file found. Skip galaxy install process.
No roles/requirements.yml file found. Skip galaxy install process.

What I need is a way to specify the working directory for a templates to set the root folder for Ansible and all its configurations files.

E.g. for folder 1 I need to set working directory to the folder 1 so ansible can find the ansible cfg file.

How can I do this? Is it possible as of now and how should i do it?

@mikaelparkefelt
Copy link
Author

Today I need to prefix all path to playbook with folder 1, folder 2 etc.

It would be nice to set working directory and the use relative paths from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant