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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content