Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you stop Ansible from creating .retry files in the home directory?

Tags:

ansible

When Ansible has problems running plays against a host, it will output the name of the host into a file in the user's home directory ending in '.retry'. These are often not used and just cause clutter, is there a way to turn them off or put them in a different directory?

like image 711
Asfand Qazi Avatar asked Jul 09 '15 13:07

Asfand Qazi


People also ask

What is .retry file in Ansible?

retry file. When playbooks fail to run against a host Ansible creates a retry file name 'hostname. retry. ' The file outlines the problem Ansible had running the play.

Where is the Ansible configuration file located?

In Ansible's case that default configuration file is (ansible. cfg) located in /etc/ansible/ansible.

What is Ansible pipelining?

Pipelining is the modern Ansible method of speeding up your ssh connections across the network to the managed hosts. It replaces the former Accelerated Mode. It reduces the number of ssh operations required to execute a module by executing many Ansible modules without an actual file transfer.


1 Answers

There are two options that you can add to the [defaults] section of the ansible.cfg file that will control whether or not .retry files are created and where they are created.

[defaults] ... retry_files_enabled = True  # Create them - the default retry_files_enabled = False # Do not create them  retry_files_save_path = "~/" # The directory they will go into                              # (home directory by default) 
like image 109
Asfand Qazi Avatar answered Sep 17 '22 17:09

Asfand Qazi