Skip to content

Commit

Permalink
♻️ Fixes for barebones system
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Jul 15, 2019
1 parent fb347bf commit 0d306de
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 23 deletions.
17 changes: 17 additions & 0 deletions deployment/backupserver.yml
@@ -0,0 +1,17 @@
---

- name: Deploy backup server
hosts: backup
remote_user: root

vars:
firewall_open_ports:
- "{{ ssh_port | default('ssh') }}"
- '25565'
postgresql_enabled: false
nginx_enabled: false
redis_enabled: false
nodejs_enabled: false

roles:
- base2
3 changes: 3 additions & 0 deletions deployment/hosts
Expand Up @@ -3,3 +3,6 @@ staging.regex-it.nl

[production]
regex-it.nl ansible_python_interpreter=/usr/bin/python3

[backup]
backups.regex-it.nl
21 changes: 0 additions & 21 deletions deployment/roles/base/tasks/packages.yml
Expand Up @@ -25,24 +25,3 @@
- libgdk-pixbuf2.0-0
- libffi-dev
- shared-mime-info

# node_Release_file: https://deb.nodesource.com/node_6.x/dists/jessie/Release

- name: Add apt-key for (recent) NodeJS
apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
remote_user: root

- name: Add NodeJS sources
copy:
src: nodesource.list
dest: /etc/apt/sources.list.d/nodesource.list
mode: "u=rw,g=r,o=r"
remote_user: root

- name: Install NodeJS
package:
name: nodejs
state: present
update_cache: yes
remote_user: root
2 changes: 2 additions & 0 deletions deployment/roles/base2/tasks/databases.yml
Expand Up @@ -14,6 +14,7 @@
line: 'local all postgres ident'
notify:
- restart postgres
when: postgresql_enabled

- name: Enforce password auth for local postgres connections
lineinfile:
Expand All @@ -22,3 +23,4 @@
line: 'local all all md5'
notify:
- restart postgres
when: postgresql_enabled
4 changes: 2 additions & 2 deletions deployment/roles/base2/tasks/firewall.yml
Expand Up @@ -20,9 +20,9 @@
- name: Open ports
ufw:
proto: tcp
direction: incoming
direction: in
rule: allow
port: "{{ item.port }}"
port: "{{ item }}"
with_items: "{{ firewall_open_ports }}"
notify:
- restart ufw
Expand Down

0 comments on commit 0d306de

Please sign in to comment.