Skip to content

Commit d670487

Browse files
committed
docs: ansible_cfg: add documentation
Add documentation file for the Ansible Configuration Module (ansible_cfg). Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
1 parent 8b420af commit d670487

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ M: Daniel Gomez <da.gomez@samsung.com>
7272
L: kdevops@lists.linux.dev
7373
S: Maintained
7474
T: git https://github.com/linux-kdevops/kdevops.git
75+
F: docs/kdevops-ansible-configuration.md
7576
F: kconfigs/Kconfig.ansible_cfg
7677
F: playbooks/ansible_cfg.yml
7778
F: playbooks/roles/ansible_cfg
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# kdevops Ansible Configuration
2+
3+
The Ansible Configuration module in kdevops allows the user to configure the
4+
[Ansible configuration file](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#the-configuration-file)
5+
, typically `ansible.cfg` (in kdevops `$TOPDIR_PATH` directory). This file
6+
includes some Ansible settings such as the callback plugin and the Ansible
7+
inventory file configuration (a comma-separated list).
8+
9+
10+
## Ansible Configuration File (`ANSIBLE_CFG_FILE`)
11+
12+
This setting allows the user to define a path and filename to the Ansible
13+
configuration file.
14+
15+
If the specified file already exists, it will not be overwritten. Otherwise,
16+
kdevops will generate one using the Kconfig settings.
17+
18+
Default: `$(TOPDIR_PATH)/ansible.cfg`
19+
20+
See: [Ansible config file](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#the-configuration-file)
21+
22+
23+
## Ansible Inventory File (`ANSIBLE_CFG_INVENTORY`)
24+
25+
Comma-separated list of Ansible inventory source paths. Each entry can be a path
26+
to a file or directory.
27+
28+
Example: `/path/to/hosts,/path/to/inventory_dir`
29+
30+
This is written to the `[defaults]` section of the generated `ansible.cfg`:
31+
32+
```ini
33+
[defaults]
34+
inventory = /path/to/hosts,/path/to/inventory_dir
35+
```
36+
37+
Default: `$(TOPDIR_PATH)/hosts`
38+
39+
See: [Ansible inventory sources](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-host-list)
40+
41+
42+
## Callback Plugin Configuration (`ANSIBLE_CFG_CALLBACK_PLUGIN*`)
43+
44+
The callback plugin determines how Ansible output is displayed. You may select one of:
45+
46+
- [debug](https://docs.ansible.com/ansible/latest/collections/ansible/posix/debug_callback.html): formatted stdout/stderr display
47+
- [dense](https://docs.ansible.com/ansible/latest/collections/community/general/dense_callback.html): minimal stdout output
48+
- custom: this allows defining the plugin name manually
49+
50+
See more plugins:
51+
[Ansible callback plugins list](https://docs.ansible.com/ansible/latest/collections/index_callback.html)
52+
53+
Also, see the Parameters section in the debug/dense for a description of the
54+
callback plugin options.
55+
56+
57+
## Python Interpreter Configuration (`ANSIBLE_CFG_INTERPRETER_PYTHON`)
58+
59+
This allows selecting how Ansible discovers or uses a Python interpreter on target systems.
60+
61+
Options include:
62+
63+
- auto
64+
- auto_legacy
65+
- auto_legacy_client
66+
- auto_silent
67+
- custom: this allows defining the path manually
68+
69+
See:
70+
- [Interpreter Discovery](https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html#interpreter-discovery)
71+
- [Using Python 3](https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks)
72+
73+
This option can be controlled via command line Makefile parameter `ANSIBLE_CFG_INTERPRETER_PYTHON`.
74+
75+
76+
## Forks Configuration (`ANSIBLE_CFG_FORKS`)
77+
78+
Control the number of parallel forks (concurrent tasks) Ansible may use.
79+
80+
Default: 10
81+
82+
See: [Forks](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_strategies.html#setting-the-number-of-forks)
83+
84+
This option can be controlled via command line Makefile parameter `ANSIBLE_CFG_FORKS`.
85+
86+
87+
## Ansible Deprecation Warnings (`ANSIBLE_CFG_DEPRECATION_WARNINGS`)
88+
89+
Toggle whether Ansible displays deprecation warnings.
90+
91+
Default: Enabled
92+
93+
See: [Deprecation warnings](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#deprecation-warnings)
94+
95+
96+
## Ansible Reconnection Retries (`ANSIBLE_CFG_RECONNECTION_RETRIES`, OpenSUSE only)
97+
98+
Number of SSH reconnection attempts. Ansible retries connections only on SSH return code 255.
99+
100+
Default: 2000
101+
102+
See: [Reconnection retries](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ssh_connection.html#parameter-reconnection_retries)

0 commit comments

Comments
 (0)