-
Notifications
You must be signed in to change notification settings - Fork 2
/
ircserver.yaml
75 lines (67 loc) · 2.25 KB
/
ircserver.yaml
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
---
- hosts: all
sudo: true
gather_facts: no
pre_tasks:
- debug: var=ansible_hostname
- name: install python if it is not there already
raw: apt-get update && apt-get -y install python
- name: Gathering facts
setup:
- name: make sure openvpn is stopped
service: name=openvpn state=stopped
failed_when: false
- name: set hostname in case vagrant fucks up
shell: "hostnamectl set-hostname {{ ansible_hostname }}"
when: from_vagrant is defined and from_vagrant
tasks:
- name: install some packages
apt: "name={{ item }} state=present"
with_items:
- irssi
- name: configure shorewall to allow incoming irc-server connections
lineinfile: "dest=/etc/shorewall/rules line=\"ACCEPT:info ext:{{item}} fw tcp 7029\" state=present create=yes"
with_items:
- 46.101.57.19 # barbie
- 104.131.10.16 # roxanne
- 72.20.33.91 # irc1.us
- 174.37.216.199 # irc2.us
# - 81.169.186.131 # irc3.de
- 5.9.146.202 # irc4.de
notify:
- restart shorewall
tags:
- firewall
- name: make sure openvpn is started
service: name=openvpn state=started
- name: install some packages
apt: "name={{ item }} state=present"
with_items:
- mongodb-server
when: runboobiesbot is defined and runboobiesbot
- name: configure mongodb
lineinfile: dest=/etc/mongodb.conf regexp="^bind_ip" line="bind_ip = 0.0.0.0" state=present create=yes
register: mongodbconf
when: runboobiesbot is defined and runboobiesbot
- name: restarting mongodb if needed
service: name=mongodb state=restarted
when: mongodbconf.changed
when: runboobiesbot is defined and runboobiesbot
roles:
- generic
- shorewall
- shorewall6
- {
role: inspircd,
confdir: "inspircd-config/",
secretdir: "inspircd-secrets/"
}
- vpnserver
- role: dockerinstance
instances:
- {
name: boobiesbot,
uid: 5000,
dockerfile: "https://raw.githubusercontent.com/StevenVanAcker/OverTheWire-boobiesbot/master/Dockerfile"
}
when: runboobiesbot is defined and runboobiesbot