-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-playbook.yml
79 lines (66 loc) · 2.52 KB
/
example-playbook.yml
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
# Example playbook for ansible-role-freesocks
# See README.md for complete documentation and variable descriptions
- name: Deploy new Outline server
hosts: new_servers
remote_user: root
vars:
operation_mode: deploy
kv_hostname_prefix: "outline1-ams"
# Cloudflare configuration
cloudflare_api_endpoint: "https://api.cloudflare.com/client/v4"
cloudflare_email: "[email protected]"
cloudflare_api_token: "your-api-token"
cloudflare_account_id: "your-account-id"
cloudflare_zone_id: "your-zone-id"
cloudflare_api_kv_namespace: "your-api-kv-namespace"
cloudflare_prom_kv_namespace: "your-prom-kv-namespace"
cloudflare_access_team_name: "your-team-name"
cloudflare_access_aud_tag: "your-aud-tag"
# Domain configuration
base_domain: "example.com"
api_domain: "api.example.com"
prom_domain: "prom.example.com"
# Optional: Additional domains
additional_domains:
- domain: "example.app"
zone_id: "app-zone-id"
# Server configuration
envoy_mappings:
outline1-ams:
ipv4: ["1.2.3.4", "5.6.7.8"]
ipv6: ["2001:db8::1", "2001:db8::2"]
roles:
- ansible-role-freesocks
- name: Migrate Outline server
hosts: new_servers
remote_user: root
vars:
operation_mode: migrate
source_hostname: "outline1-ams"
destination_hostname: "outline2-fra"
migrate_delete_source: false
# Include same Cloudflare and domain configuration as above
cloudflare_api_endpoint: "https://api.cloudflare.com/client/v4"
cloudflare_email: "[email protected]"
cloudflare_api_token: "your-api-token"
cloudflare_account_id: "your-account-id"
cloudflare_zone_id: "your-zone-id"
cloudflare_api_kv_namespace: "your-api-kv-namespace"
cloudflare_prom_kv_namespace: "your-prom-kv-namespace"
cloudflare_access_team_name: "your-team-name"
cloudflare_access_aud_tag: "your-aud-tag"
base_domain: "example.com"
api_domain: "api.example.com"
prom_domain: "prom.example.com"
envoy_mappings:
outline2-fra:
ipv4: ["9.10.11.12", "13.14.15.16"]
ipv6: ["2001:db8::3", "2001:db8::4"]
roles:
- ansible-role-freesocks
# Example inventory (hosts):
# [new_servers]
# outline2-fra ansible_host=10.0.0.2
# Usage:
# Deploy: ansible-playbook -i hosts example-playbook.yml --extra-vars "operation_mode=deploy kv_hostname_prefix=outline2-fra"
# Migrate: ansible-playbook -i hosts example-playbook.yml --extra-vars "operation_mode=migrate source_hostname=outline1-ams destination_hostname=outline2-fra"