From 901e3d43b1e8a55342ccc2196ecd7e0d9ce243b9 Mon Sep 17 00:00:00 2001 From: Sandra McCann Date: Mon, 21 Feb 2022 09:53:14 -0500 Subject: [PATCH] describe how to generate a sample ansible.cfg (#77053) * describe how to generate a sample ansible.cfg * correct commands used --- docs/templates/config.rst.j2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/templates/config.rst.j2 b/docs/templates/config.rst.j2 index 961e6ec4acb..34b2b849518 100644 --- a/docs/templates/config.rst.j2 +++ b/docs/templates/config.rst.j2 @@ -40,6 +40,21 @@ Ansible will process the above list and use the first file found, all others are inventory = /etc/ansible/hosts ; This points to the file that lists your hosts +.. _generating_ansible.cfg: + +Generating a sample ``ansible.cfg`` file +----------------------------------------- + +You can generate a fully commented-out example ``ansible.cfg`` file, for example:: + + $ ansible-config init --disabled > ansible.cfg + +You can also have a more complete file that includes existing plugins:: + + $ ansible-config init --disabled -t all > ansible.cfg + +You can use these as starting points to create your own ``ansible.cfg`` file. + .. _cfg_in_world_writable_dir: Avoiding security risks with ``ansible.cfg`` in the current directory