blob: 7994895bd869c002514aaa07bc0cadfcc6ac0d73 (
plain) (
blame)
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
|
---
- name: Docker apps
hosts: tamriel
remote_user: root
vars:
docker_compose_dir: "~/compose"
vars_files:
- domains.yml
- secrets.yml
tasks:
- name: Remove old config
tags: ["config"]
file:
path: "{{docker_compose_dir}}"
state: absent
- name: Synchronize docker-compose files
tags: ["config"]
synchronize:
src: compose/
dest: "{{docker_compose_dir}}"
- name: Copy main nginx.conf
tags: ["nginx"]
copy:
src: nginx/nginx.conf
dest: /etc/nginx/nginx.conf
mode: '0644'
owner: root
group: root
- name: Copy nginx site files
tags: ["nginx"]
copy:
src: nginx/conf.d/
dest: /etc/nginx/conf.d
mode: '0644'
owner: root
group: root
- name: Generate nginx conf
tags: ["nginx"]
template:
src: templates/nginx.conf.j2
dest: "/etc/nginx/conf.d/{{short_name}}.conf"
vars:
server: "{{item.value}}"
short_name: "{{item.key}}"
with_items: "{{domains | dict2items}}"
when: (item.value.disabled is undefined) or (item.value.disabled != true)
- name: Copy sites
tags: ["nginx"]
copy:
src: nginx/main/
dest: /var/www/html
mode: '0644'
owner: www-data
group: www-data
- name: Copy sites
tags: ["nginx"]
copy:
src: nginx/darling/
dest: /var/www/html/darling
mode: '0644'
owner: www-data
group: www-data
- name: reload nginx conf
tags: ["nginx"]
systemd:
name: nginx
state: reloaded
- name: counter pod
tags: ["podman", "counter"]
containers.podman.podman_pod:
name: "counter"
ports:
- "127.0.0.1:{{domains.cnt.proxy.port}}:5000"
- name: counter redis
tags: ["podman", "counter"]
containers.podman.podman_container:
name: redis
image: docker.io/redis:alpine
pod: "counter"
- name: counter image
tags: ["podman", "counter"]
containers.podman.podman_image:
name: dybiec.info/counter
path: "{{docker_compose_dir}}/app"
- name: counter
tags: ["podman", "counter"]
containers.podman.podman_container:
name: counter_app
image: dybiec.info/counter
pod: "counter"
- name: csgo image
tags: ["podman", "csgo"]
containers.podman.podman_image:
name: dybiec.info/csgo
path: "{{docker_compose_dir}}/cs/"
- name: csgo
tags: ["podman", "csgo"]
containers.podman.podman_container:
name: cs
image: dybiec.info/csgo
ports:
- "127.0.0.1:{{domains.cs.proxy.port}}:5000"
- name: openvpn
tags: ["podman", "openvpn"]
containers.podman.podman_container:
name: openvpn
image: docker.io/kylemanna/openvpn
network: host
volume:
- "/root/openvpn:/etc/openvpn"
privileged: true
|