This commit is contained in:
Gabenov Stanislav
2026-02-09 20:12:53 +03:00
commit 0b058c35de
17 changed files with 208 additions and 0 deletions

79
ansible.cfg Normal file
View File

@@ -0,0 +1,79 @@
# ansible-project/ansible.cfg
[defaults]
# Основная директория с инвентарем
inventory = ./inventory/hosts
# Пути для поиска ролей (можно несколько через двоеточие)
roles_path = ./roles
# Файлы плейбуков по умолчанию
hostfile = ./inventory/hosts
library = ./library
module_utils = ./module_utils
filter_plugins = ./filter_plugins
# Путь для поиска плейбуков
playbook_dir = ./playbooks
# Настройки для групповых и хостовых переменных
retry_files_enabled = False
hash_behaviour = merge
deprecation_warnings = True
system_warnings = True
interpreter_python = auto_silent
# Параметры соединения
transport = smart
gather_facts = true
gather_subset = all
fact_caching = memory
fact_caching_timeout = 3600
# Параметры по умолчанию для подключения
ansible_connection = ssh
ansible_user = ansible
ansible_port = 22
ansible_become = true
ansible_become_method = sudo
ansible_become_user = root
ansible_python_interpreter = /usr/bin/python3
# Контрольные суммы и проверки
host_key_checking = False
[inventory]
# Включить динамический инвентарь
enable_plugins = host_list, script, auto, yaml, ini, toml
[privilege_escalation]
become = true
become_method = sudo
become_user = root
become_ask_pass = false
[ssh_connection]
# Настройки SSH
#ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=~/.ssh/ansible-%r@%h:%p
#pipelining = true
#scp_if_ssh = smart
#control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
#timeout = 30
#retries = 3
[persistent_connection]
connect_timeout = 30
command_timeout = 30
[galaxy]
# Настройки Ansible Galaxy
server = https://galaxy.ansible.com
# Дополнительные настройки для разработки
[defaults:development]
# Для разработки - более строгие проверки
force_color = 1
callback_whitelist = profile_tasks, timer, mail
retry_files_save_path = ./retry-files
local_tmp = ~/.ansible/tmp
remote_tmp = ~/.ansible/tmp