Add infrastructure configuration files
- Add .gitignore for Ansible project (Python, temp files, secrets) - Add ansible.cfg with optimized settings - Enable SSH pipelining for performance - Configure fact caching with jsonfile backend - Set roles_path and inventory defaults
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
|||||||
|
# Ansible
|
||||||
|
*.retry
|
||||||
|
*.log
|
||||||
|
.vault_pass
|
||||||
|
.vault_password
|
||||||
|
|
||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.so
|
||||||
|
.Python
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# Temporary files
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Ansible fact cache
|
||||||
|
/tmp/ansible_fact_cache/
|
||||||
|
|
||||||
|
# Sensitive data
|
||||||
|
vault.yml
|
||||||
|
secrets.yml
|
||||||
|
credentials.yml
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
|
||||||
|
# Test artifacts
|
||||||
|
.pytest_cache/
|
||||||
|
.coverage
|
||||||
|
htmlcov/
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
[defaults]
|
||||||
|
inventory = inventories/development
|
||||||
|
roles_path = roles
|
||||||
|
host_key_checking = False
|
||||||
|
retry_files_enabled = False
|
||||||
|
gathering = smart
|
||||||
|
fact_caching = jsonfile
|
||||||
|
fact_caching_connection = /tmp/ansible_fact_cache
|
||||||
|
fact_caching_timeout = 86400
|
||||||
|
|
||||||
|
[privilege_escalation]
|
||||||
|
become = True
|
||||||
|
become_method = sudo
|
||||||
|
become_user = root
|
||||||
|
become_ask_pass = False
|
||||||
|
|
||||||
|
[ssh_connection]
|
||||||
|
pipelining = True
|
||||||
|
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=accept-new
|
||||||
Reference in New Issue
Block a user