aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hetzner/collection.yaml8
-rw-r--r--hetzner/mastodon.yml1
-rw-r--r--hetzner/nginx.yaml1
-rw-r--r--hetzner/pg_restore.yaml13
-rw-r--r--hetzner/psql.yaml19
-rw-r--r--hetzner/user.yaml1
6 files changed, 43 insertions, 0 deletions
diff --git a/hetzner/collection.yaml b/hetzner/collection.yaml
new file mode 100644
index 0000000..5b133c2
--- /dev/null
+++ b/hetzner/collection.yaml
@@ -0,0 +1,8 @@
1---
2collections:
3 - name: community.general
4 version: 4.7.0
5 - name: ansible.posix
6 version: 1.3.0
7 - name: community.postgresql
8 version: 2.3.2
diff --git a/hetzner/mastodon.yml b/hetzner/mastodon.yml
index 354390c..7fc3ec5 100644
--- a/hetzner/mastodon.yml
+++ b/hetzner/mastodon.yml
@@ -1,6 +1,7 @@
1--- 1---
2 - name: Install Mastodon dependencies 2 - name: Install Mastodon dependencies
3 hosts: localhost 3 hosts: localhost
4 become: true
4 tasks: 5 tasks:
5 - name: Install required packages 6 - name: Install required packages
6 apt: 7 apt:
diff --git a/hetzner/nginx.yaml b/hetzner/nginx.yaml
index 006d4e3..cfce968 100644
--- a/hetzner/nginx.yaml
+++ b/hetzner/nginx.yaml
@@ -1,6 +1,7 @@
1--- 1---
2- name: Install Nginx 2- name: Install Nginx
3 hosts: localhost 3 hosts: localhost
4 become: true
4 tasks: 5 tasks:
5 - name: Install NGINX 6 - name: Install NGINX
6 ansible.builtin.include_role: 7 ansible.builtin.include_role:
diff --git a/hetzner/pg_restore.yaml b/hetzner/pg_restore.yaml
new file mode 100644
index 0000000..9ff1c7c
--- /dev/null
+++ b/hetzner/pg_restore.yaml
@@ -0,0 +1,13 @@
1---
2- name: Postgresql
3 hosts: localhost
4 become: true
5 become_user: postgres
6 tasks:
7 - name: Restore Mastodon Database
8 postgresql_db:
9 state: restore
10 name: mastodon_production
11 target: ""
12 become: yes
13 become_user: postgres
diff --git a/hetzner/psql.yaml b/hetzner/psql.yaml
new file mode 100644
index 0000000..4941ea9
--- /dev/null
+++ b/hetzner/psql.yaml
@@ -0,0 +1,19 @@
1---
2- name: Postgresql
3 hosts: localhost
4 become: true
5 become_user: postgres
6 tasks:
7 - name: Create Mastodon Database
8 community.postgresql.postgresql_db:
9 name: mastodon_production
10 encoding: UTF-8
11 lc_collate: en_US.UTF-8
12 lc_ctype: en_US.UTF-8
13 template: template0
14
15 - name: Create Postgresql User
16 community.postgresql.postgresql_user:
17 db: mastodon_production
18 user: mastodon
19 password:
diff --git a/hetzner/user.yaml b/hetzner/user.yaml
index bf21687..2308ff8 100644
--- a/hetzner/user.yaml
+++ b/hetzner/user.yaml
@@ -23,6 +23,7 @@
23 - lsb-release 23 - lsb-release
24 - cifs-utils 24 - cifs-utils
25 - vnstat 25 - vnstat
26 - python3-psycopg2
26 - python3-dev 27 - python3-dev
27 - python3-pip 28 - python3-pip
28 - python3 29 - python3
Powered by cgit v1.2.3 (git 2.41.0)