ansible-config(1)

πŸ’… ansible-config β€” the manual page, but make it make sense

okay so this is the ansible-config page from the System administration commands fam β€” she's the one you call when you need to view ansible configuration and honestly? she ate. πŸŽ€


✨ NAME ✨

ansible-config β€” View ansible configuration.


πŸ¦‹ SYNOPSIS πŸ¦‹

usage: ansible-config [-h] [--version] [-v]
{list,dump,view,init,validate} ...

🌸 DESCRIPTION 🌸

Config command line class. that's it, that's the description bestie, she's a config command line class and she's thriving πŸ’–


🌈 COMMON OPTIONS 🌈

these are the ones that work no matter which action you pick, iykyk:

  • --version β€” show program's version number, config file location, configured module search path, module location, executable location and exit. literally the full lore drop, then she dips πŸ‘‘
  • -h, --help β€” show this help message and exit. the classic.
  • -v, --verbose β€” Causes Ansible to print more debug messages. Adding multiple -v will increase the verbosity, the builtin plugins currently evaluate up to -vvvvvv. A reasonable level to start is -vvv, connection debugging might require -vvvv. This argument may be specified multiple times.
ngl the -v stacking is giving volume knob. start at -vvv, and if your connection is acting up go -vvvv. max out at -vvvvvv β€” that's the ceiling, bestie, the plugins don't read past it πŸ’€

🫢 ACTIONS 🫢

pick your fighter. one per invocation.

πŸ“‹ list

list and output available configs πŸ’…

  • --format 'FORMAT', -f 'FORMAT' β€” Output format for list
  • -c 'CONFIG_FILE', --config 'CONFIG_FILE' β€” path to configuration file, defaults to first file found in precedence.
  • -t 'TYPE', --type 'TYPE' β€” Filter down to a specific plugin type. Defaults to 'all'; use 'base' for the previous behavior.

πŸ—‘οΈ dump

Shows the current settings, merges ansible.cfg if specified

  • --format 'FORMAT', -f 'FORMAT' β€” Output format for dump
  • --only-changed, --changed-only β€” Only show configurations that have changed from the default
  • -c 'CONFIG_FILE', --config 'CONFIG_FILE' β€” path to configuration file, defaults to first file found in precedence.
  • -t 'TYPE', --type 'TYPE' β€” Filter down to a specific plugin type. Defaults to 'all'; use 'base' for the previous behavior.

πŸ‘€ view

Displays the current config file

  • -c 'CONFIG_FILE', --config 'CONFIG_FILE' β€” path to configuration file, defaults to first file found in precedence.
  • -t 'TYPE', --type 'TYPE' β€” Filter down to a specific plugin type. Defaults to 'all'; use 'base' for the previous behavior.

🌱 init

Create initial configuration

  • --disabled β€” Prefixes all entries with a comment character to disable them
  • --format 'FORMAT', -f 'FORMAT' β€” Output format for init
  • -c 'CONFIG_FILE', --config 'CONFIG_FILE' β€” path to configuration file, defaults to first file found in precedence.
  • -t 'TYPE', --type 'TYPE' β€” Filter down to a specific plugin type. Defaults to 'all'; use 'base' for the previous behavior.

βœ… validate

  • --format 'FORMAT', -f 'FORMAT' β€” Output format for init
  • -c 'CONFIG_FILE', --config 'CONFIG_FILE' β€” path to configuration file, defaults to first file found in precedence.
  • -t 'TYPE', --type 'TYPE' β€” Filter down to a specific plugin type. Defaults to 'all'; use 'base' for the previous behavior.
ok real talk: under validate, the --format blurb literally says "Output format for init" β€” that's what the page says, so that's what I'm telling you. no cap, no edits, I don't make the rules 🫠

🧚 ENVIRONMENT 🧚

The following environment variables may be specified.

  • ANSIBLE_CONFIG β€” Specify override location for the ansible config file

Many more are available for most options in ansible.cfg.

For a full list check <https://docs.ansible.com/>. or use the ansible-config command.

she said "check the docs, or just ask me" and honestly? iconic behavior πŸ’œ

πŸ“ FILES πŸ“

listed in order, and the later ones win β€” this is the precedence chain, bestie, respect it πŸ”₯

  • /etc/ansible/ansible.cfg β€” Config file, used if present
  • ~/.ansible.cfg β€” User config file, overrides the default config if present
  • ./ansible.cfg β€” Local config file (in current working directory) assumed to be 'project specific' and overrides the rest if present.

As mentioned above, the ANSIBLE_CONFIG environment variable will override all others.

⚠️ <red>lowkey the most important line on this whole page</red> ⚠️ β€” ANSIBLE_CONFIG beats everything. every single file up there? she doesn't care. env var is main character energy πŸ‘‘

⭐ AUTHOR ⭐

Ansible was originally written by Michael DeHaan.


Copyright Β© 2018 Red Hat, Inc | Ansible. Ansible is released under the terms of the GPLv3 license.


πŸ‘‘ SEE ALSO πŸ‘‘

ansible (1), ansible-console (1), ansible-doc (1), ansible-galaxy (1), ansible-inventory (1), ansible-playbook (1), ansible-pull (1), ansible-vault (1)

Extensive documentation is available in the documentation site: <<https://docs.ansible.com>>. IRC and mailing list info can be found in file CONTRIBUTING.md, available in: <<https://github.com/ansible/ansible>>


and that's the whole page, bestie πŸŽ€ tysm for reading, mwah πŸ’‹ β€” this was Ansible 2.22.0, footer-dated the same as the ansible-config(1) page itself, and yes she's still serving πŸ’…βœ¨

πŸ“¦ where this page comes from
  • arch rolling: ansible-core 2.22.0-1 Β· GPL-3.0-or-later AND BSD-2-Clause AND PSF-2.0 AND MIT AND Apache-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms