ansible / proposals

Repository for sharing and tracking progress on enhancement proposals for Ansible.
Creative Commons Zero v1.0 Universal
93 stars 19 forks source link

Set retry_files_enabled = False by default #155

Closed chuckersjp closed 5 years ago

chuckersjp commented 5 years ago

Proposal: Disable .retry file creation by default.

Author: Chuck Douglas <@chuckersjp>

Date: 2019-02-19

Motivation

Creation of .retry files ends up cluttering up the working directory unless an alternate path for saving these files is also set up. Because retry_files_save_path is not set by default either, this means that the .retry files are saved in the working directory. The value of these files is questionable as it is believed that how these files are used upon creation may not be widely know.

Problems

What problems exist that this proposal will solve?

Solution proposal

Change the following in /etc/ansible/ansible.cfg:

# When a playbook fails by default a .retry file will be created in ~/
# You can disable this feature by setting retry_files_enabled to False
# and you can change the location of the files by setting retry_files_save_path

#retry_files_enabled = False
#retry_files_save_path = ~/.ansible-retry

to

# When a playbook fails a .retry file can be created that will be placed in ~/
# You can enable this feature by setting retry_files_enabled to True
# and you can change the location of the files by setting retry_files_save_path

retry_files_enabled = False
#retry_files_save_path = ~/.ansible-retry

This change will explain that the feature is listed as disabled by default and how to enable it if desired.

Testing (optional)

No testing should be required

Documentation (optional)

A release note stating that retry_files_enabled is now disabled by default in the configuration file would be recommended.

agaffney commented 5 years ago

I'd personally be on board with this, as disabling retry files is always one of the first things that I do for a new Ansible installation/project.

jamescassell commented 5 years ago

I name my playbooks without the .yml extension to avoid the bash-completion issue... but found out one day that AWX doesn't like playbooks without a .yml extension... (but I should open that bug in a different tracker)

chuckersjp commented 5 years ago

I think .yml extension (or even .yaml) helps vim identify it as a YAML file when you first start editing it.

samdoran commented 5 years ago

In the Core IRC meeting on 2019-02-28, this proposal was approved.

bcoca commented 5 years ago

vote in public meeting, everyone seems fine with changing the feature to be disabled by default (just needs PR to change config + porting guide note)