forked from Kitsu01/VivumLab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.vivumlab.yml
82 lines (74 loc) · 1.91 KB
/
playbook.vivumlab.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
80
81
82
---
# Configure a TOR hidden service for remote access without a public IP
- name: "Setup TOR"
tags: tor
hosts: all
become: yes
become_method: sudo
pre_tasks:
- name: Wait for connection if not available, timeout 600 seconds
wait_for_connection:
timeout: 600
delay: 0
when: vlab_connection_wait
roles:
- role: tor
when: enable_tor
# Install and Setup Server with VivumLab
- name: "Install and Setup server with VivumLab"
hosts: all
become: yes
become_method: sudo
ansible.builtin.gather_facts: yes
tags: setup
pre_tasks:
- name: Wait for connection if not available, timeout 600 seconds
wait_for_connection:
timeout: 600
delay: 0
when: vlab_connection_wait
tasks:
- ansible.builtin.include_role:
name: vivumlab_setup
when: vivumlab_runSetup == True
- ansible.builtin.include_role:
name: fail2ban
when: vivumlab_runSetup == True
- name: "Deploy Bastion Host with Wireguard"
hosts: all
become: yes
become_method: sudo
tags: bastion
pre_tasks:
- name: Wait for connection if not available, timeout 600 seconds
wait_for_connection:
timeout: 600
delay: 0
when: vlab_connection_wait
tasks:
- ansible.builtin.include_role:
name: vivumlab_wireguard
when: bastion.enable == True
# Install and configure VivumLab services
- name: Install and configure VivumLab services
hosts: vivumlab
ansible.builtin.gather_facts: yes
tags:
- vivumlab
- deploy
pre_tasks:
- name: Wait for connection if not available, timeout 600 seconds
wait_for_connection:
timeout: 600
delay: 0
when: vlab_connection_wait
roles:
- vivumlab_deploy
handlers:
- name: Restart Traefik
become: yes
ansible.builtin.systemd:
name: "traefik"
state: restarted
daemon-reload: yes
enabled: true