How Do I Use the File Location of an Ansible Playbook Inside the Playbook?

Solution In Progress - Updated -

Issue

Sometimes it is desirable to use the filesystem location from where an Ansible playbook is running inside the running playbook. In such cases, an Ansible magic variable can be used.

Environment

Ansible Engine

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.