iac_modules/ansible.cfg

34 lines
773 B
INI

[defaults]
# ✅ 动态主机清单
inventory = scripts/dynamic_inventory.py
# ✅ 加密解密 Vault 使用的密码文件
vault_password_file = ~/.vault_password
# ✅ 执行与性能优化
timeout = 10
forks = 10
poll_interval = 10
transport = smart
# ✅ 提升事实收集效率
gathering = smart
# ✅ 输出格式优化
stdout_callback = skippy
# ✅ 安全与兼容性
host_key_checking = False
deprecation_warnings = False
# ✅ 指定 Python 解释器(推荐动态)
#ansible_python_interpreter=/usr/bin/python3 # ⚠️ 如使用不同主机建议在 inventory 里指定
interpreter_python = auto_silent
[inventory]
# ✅ 启用缓存(提升性能)
cache = yes
cache_plugin = ansible.builtin.jsonfile
cache_timeout = 300 # 默认缓存 5 分钟