How to Dynamically Generate Ansible Playbook Execution Logs for All Hosts

Solution In Progress - Updated -

Issue

  • The primary issue involves the generation of ansible-playbook logs for all hosts within a single file.

  • There is an expressed requirement to utilize an Ansible variable, such as inventory_hostname, within log_path to facilitate dynamic log generation for all hosts.

  • It is observed that the Ansible variable {{ inventory_hostname }} cannot be directly incorporated into the log_path in the ansible.cfg file.

Environment

  • ansible-core 2.*

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