Compare commits

...

2 Commits

Author SHA1 Message Date
directlx 171e32db26 Merge remote main with local Ansible project structure 2026-02-04 06:45:26 -05:00
directlx c781ec25a2 Initial Ansible project structure
Set up standard directory layout with:
- ansible.cfg with sensible defaults
- YAML inventory with example groups
- Main site playbook template
- Directories for roles, group_vars, host_vars, files, templates
- .gitignore for secrets, vault files, and SSH keys

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:37:33 -05:00
9 changed files with 98 additions and 1 deletions

44
.gitignore vendored
View File

@ -1,3 +1,45 @@
# ---> Ansible
# Ansible
*.retry
*.pyc
__pycache__/
# Sensitive files
*.vault
*vault*.yml
!*vault*.yml.example
secrets/
.vault_pass
.vault_password
# SSH keys
*.pem
*.key
id_rsa*
id_ed25519*
# Environment
.env
*.env.local
venv/
.venv/
# IDE
.idea/
.vscode/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# Temporary files
tmp/
.tmp/
*.tmp
*.bak

17
ansible.cfg Normal file
View File

@ -0,0 +1,17 @@
[defaults]
inventory = inventory/hosts.yml
roles_path = roles
host_key_checking = False
retry_files_enabled = False
stdout_callback = yaml
callbacks_enabled = profile_tasks
[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

0
files/.gitkeep Normal file
View File

4
group_vars/all.yml Normal file
View File

@ -0,0 +1,4 @@
---
# Variables applied to all hosts
# ansible_user: your_ssh_user
# ansible_become: true

0
host_vars/.gitkeep Normal file
View File

18
inventory/hosts.yml Normal file
View File

@ -0,0 +1,18 @@
---
all:
children:
# Example group structure - customize as needed
webservers:
hosts:
# web1:
# ansible_host: 192.168.1.10
dbservers:
hosts:
# db1:
# ansible_host: 192.168.1.20
local:
hosts:
localhost:
ansible_connection: local

16
playbooks/site.yml Normal file
View File

@ -0,0 +1,16 @@
---
# Main site playbook - orchestrates all plays
- name: Apply common configuration
hosts: all
roles: []
# - common
# - name: Configure web servers
# hosts: webservers
# roles:
# - webserver
# - name: Configure database servers
# hosts: dbservers
# roles:
# - database

0
roles/.gitkeep Normal file
View File

0
templates/.gitkeep Normal file
View File