-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinventory-examples.yml
More file actions
143 lines (133 loc) · 4.66 KB
/
inventory-examples.yml
File metadata and controls
143 lines (133 loc) · 4.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
# Example inventory configurations for different deployment scenarios
# Copy and modify these examples based on your needs
# =============================================================================
# SINGLE MACHINE DEPLOYMENT (Most Common)
# =============================================================================
# Use this pattern for deploying to one machine at a time
# Command: make deploy VM_HOST=192.168.1.100 TARGET_USER=developer
all:
children:
single:
hosts:
target:
ansible_host: "{{ vm_host }}"
ansible_user: "{{ vm_user }}"
ansible_ssh_private_key_file: "{{ vm_ssh_key }}"
target_user: "{{ target_vm_user }}"
# =============================================================================
# PRODUCTION GROUP DEPLOYMENT
# =============================================================================
# Example for deploying to multiple production servers
# Command: make deploy DEPLOY_TARGET=production
# all:
# children:
# production:
# hosts:
# web-01:
# ansible_host: 10.0.1.10
# ansible_user: root
# ansible_ssh_private_key_file: ~/.ssh/prod_key
# target_user: webapp
# web-02:
# ansible_host: 10.0.1.11
# ansible_user: root
# ansible_ssh_private_key_file: ~/.ssh/prod_key
# target_user: webapp
# db-01:
# ansible_host: 10.0.1.20
# ansible_user: root
# ansible_ssh_private_key_file: ~/.ssh/prod_key
# target_user: database
# =============================================================================
# STAGING GROUP DEPLOYMENT
# =============================================================================
# Example for deploying to staging environment
# Command: make deploy DEPLOY_TARGET=staging
# all:
# children:
# staging:
# hosts:
# staging-web:
# ansible_host: 10.0.2.10
# ansible_user: root
# ansible_ssh_private_key_file: ~/.ssh/staging_key
# target_user: developer
# staging-db:
# ansible_host: 10.0.2.20
# ansible_user: root
# ansible_ssh_private_key_file: ~/.ssh/staging_key
# target_user: developer
# =============================================================================
# DEVELOPMENT GROUP DEPLOYMENT
# =============================================================================
# Example for deploying to development VMs
# Command: make deploy DEPLOY_TARGET=development
# all:
# children:
# development:
# hosts:
# dev-vm-1:
# ansible_host: 192.168.1.100
# ansible_user: root
# ansible_ssh_private_key_file: ~/.ssh/id_rsa
# target_user: developer
# dev-vm-2:
# ansible_host: 192.168.1.101
# ansible_user: root
# ansible_ssh_private_key_file: ~/.ssh/id_rsa
# target_user: developer
# =============================================================================
# MIXED ENVIRONMENT DEPLOYMENT
# =============================================================================
# Example with multiple environments and host-specific settings
# Commands:
# make deploy DEPLOY_TARGET=production
# make deploy DEPLOY_TARGET=staging
# make deploy DEPLOY_TARGET=development
# all:
# children:
# production:
# hosts:
# prod-web-01:
# ansible_host: 10.0.1.10
# ansible_user: root
# target_user: webapp
# # Custom deployment directory for production
# deployment_base_dir: /opt/claude-code-vm
# prod-web-02:
# ansible_host: 10.0.1.11
# ansible_user: root
# target_user: webapp
# deployment_base_dir: /opt/claude-code-vm
# vars:
# # Production-specific variables
# install_docker: true
# install_kubernetes_tools: true
# screen_session_name: PROD
#
# staging:
# hosts:
# staging-01:
# ansible_host: 10.0.2.10
# ansible_user: root
# target_user: tester
# vars:
# # Staging-specific variables
# install_docker: true
# install_kubernetes_tools: false
# screen_session_name: STAGING
#
# development:
# hosts:
# dev-laptop:
# ansible_host: 192.168.1.100
# ansible_user: developer
# target_user: developer
# # Use custom SSH key for development
# ansible_ssh_private_key_file: ~/.ssh/dev_key
# vars:
# # Development-specific variables
# install_docker: true
# install_kubernetes_tools: false
# screen_session_name: DEV