aboutsummaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-07-29 17:00:20 +0200
committerRomain Gonçalves <me@rgoncalves.se>2021-07-29 17:00:20 +0200
commitb232b894c3cbe087c8d504e91637dcf62199eed1 (patch)
treeea72a7d1a7f63c6425ee46785e1cec924351b2c3 /playbooks
parent22126073344e60c405d086df37b64da0c6d3c086 (diff)
downloadinfrastructure-b232b894c3cbe087c8d504e91637dcf62199eed1.tar.gz
Bump to third revision of homelab
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/dc0.rgoncalves.se.yml19
-rw-r--r--playbooks/extra/prerequisites.yml10
-rw-r--r--playbooks/network/grafana.yml10
-rw-r--r--playbooks/network/nfs.yml14
l---------playbooks/network/templates1
-rw-r--r--playbooks/st0cld0.rgoncalves.se.yml10
-rw-r--r--playbooks/st0dc1.rgoncalves.se.yml12
-rw-r--r--playbooks/st0dev0.rgoncalves.se.yml9
-rw-r--r--playbooks/st0dev1.rgoncalves.se.yml14
-rw-r--r--playbooks/stack0.rgoncalves.se.yml3
-rw-r--r--playbooks/utils/nfsd-hypervisor.yml6
-rw-r--r--playbooks/workstation.yml8
12 files changed, 55 insertions, 61 deletions
diff --git a/playbooks/dc0.rgoncalves.se.yml b/playbooks/dc0.rgoncalves.se.yml
index 53ba6aa..d54df56 100644
--- a/playbooks/dc0.rgoncalves.se.yml
+++ b/playbooks/dc0.rgoncalves.se.yml
@@ -6,10 +6,15 @@
- hosts: dc0
roles:
-
- - { role: znc, tags: "role_znc" }
- - { role: website, tags: "role_website" }
- - { role: httpd, tags: "role_httpd" }
- - { role: acme, tags: "role_acme" }
- - { role: relayd, tags: "role_relayd" }
- - { role: pf, tags: "role_pf" }
+ - role: znc
+ tags: role_znc
+ - role: website
+ tags: role_website
+ - role: httpd
+ tags: role_httpd
+ - role: acme
+ tags: role_acme
+ - role: relayd
+ tags: role_relayd
+ - role: pf
+ tags: role_pf
diff --git a/playbooks/extra/prerequisites.yml b/playbooks/extra/prerequisites.yml
index a80d85e..eddb418 100644
--- a/playbooks/extra/prerequisites.yml
+++ b/playbooks/extra/prerequisites.yml
@@ -10,10 +10,10 @@
tasks:
- name: bruteforce python installation with all packages possiblity
- raw: "{{ item }}"
+ raw: |
+ pkg_add python3
+ pkg install python3
+ apk add python
ignore_errors: true
- loop:
- - pkg_add python3
- - pkg install python3
- - apk add python
+ failed_when: false
poll: 0
diff --git a/playbooks/network/grafana.yml b/playbooks/network/grafana.yml
index 30bc0f4..4c039bd 100644
--- a/playbooks/network/grafana.yml
+++ b/playbooks/network/grafana.yml
@@ -6,8 +6,12 @@
- hosts: servers
roles:
- - { role: prometheus }
+ - role: loki
+ tags: role_loki
+ - role: prometheus
+ tags: role_prometheus
-- hosts: st0cld0
+- hosts: st0dc1
roles:
- - { role: grafana }
+ - role: grafana
+ tags: role_grafana
diff --git a/playbooks/network/nfs.yml b/playbooks/network/nfs.yml
index 1b8717e..9d1f73b 100644
--- a/playbooks/network/nfs.yml
+++ b/playbooks/network/nfs.yml
@@ -1,17 +1,3 @@
-
-# network/nfs ~~ playbooks/nfs/network.yml
-# nfs network playbook
-
----
-
-- name: ensure installation and configuration on server side
- hosts: stack0
- roles:
- - role: nfsd
- vars:
- nfsd_dirs: "{% for vm in vms %}{{ vm.name }} {% endfor %}"
- tags: play_network_nfsserver
-
- name: ensure installation and configuration on client side
hosts: ~st[0-9].*
roles:
diff --git a/playbooks/network/templates b/playbooks/network/templates
new file mode 120000
index 0000000..07531b7
--- /dev/null
+++ b/playbooks/network/templates
@@ -0,0 +1 @@
+../../templates \ No newline at end of file
diff --git a/playbooks/st0cld0.rgoncalves.se.yml b/playbooks/st0cld0.rgoncalves.se.yml
index 2286395..2870e3a 100644
--- a/playbooks/st0cld0.rgoncalves.se.yml
+++ b/playbooks/st0cld0.rgoncalves.se.yml
@@ -6,7 +6,9 @@
- hosts: st0cld0
roles:
- - { role: nextcloud, tags: "role_nextcloud" }
- - { role: miniflux, tags: "role_miniflux" }
- - { role: syncthing, tags: "role_syncthing" }
- - { role: httpd, tags: "role_httpd" }
+ - role: miniflux
+ tags: role_miniflux
+ - role: syncthing
+ tags: role_syncthing
+ - role: httpd
+ tags: role_httpd
diff --git a/playbooks/st0dc1.rgoncalves.se.yml b/playbooks/st0dc1.rgoncalves.se.yml
new file mode 100644
index 0000000..e99768f
--- /dev/null
+++ b/playbooks/st0dc1.rgoncalves.se.yml
@@ -0,0 +1,12 @@
+- hosts: st0dc1
+ roles:
+ - role: ldapd
+ tags: role_ldapd
+ - role: postgres
+ tags: role_postgres
+ - role: grafana
+ tags: role_grafana
+ - role: cgit
+ tags: role_cgit
+ - role: httpd
+ tags: role_httpd
diff --git a/playbooks/st0dev0.rgoncalves.se.yml b/playbooks/st0dev0.rgoncalves.se.yml
index fbee649..5fd98aa 100644
--- a/playbooks/st0dev0.rgoncalves.se.yml
+++ b/playbooks/st0dev0.rgoncalves.se.yml
@@ -6,8 +6,7 @@
- hosts: st0dev0
roles:
- - { role: gitdaemon }
- - { role: cgit }
- - { role: jenkins }
- - { role: httpd }
- - { role: sshd }
+ - role: cgit
+ tags: role_cgit
+ - role: httpd
+ tags_role: httpd
diff --git a/playbooks/st0dev1.rgoncalves.se.yml b/playbooks/st0dev1.rgoncalves.se.yml
deleted file mode 100644
index 5d568d5..0000000
--- a/playbooks/st0dev1.rgoncalves.se.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# st0dev1 ~~ playbooks/st0dev0.rgoncalves.se.yml
-# openbsd based development system -- private operations
-
----
-
-- hosts: st0dev1
- vars:
- cgit_config_root_desc: "private - development hub"
- cgit_authenticate: true
-
- roles:
- - { role: cgit }
- - { role: httpd }
diff --git a/playbooks/stack0.rgoncalves.se.yml b/playbooks/stack0.rgoncalves.se.yml
index 2fcf803..e8af5d1 100644
--- a/playbooks/stack0.rgoncalves.se.yml
+++ b/playbooks/stack0.rgoncalves.se.yml
@@ -6,5 +6,6 @@
- hosts: stack0
roles:
-
- { role: bhyve }
+ - role: nfsd
+ nfsd_dirs: "{{ vms | flatten | map(attribute='name') | flatten }}"
diff --git a/playbooks/utils/nfsd-hypervisor.yml b/playbooks/utils/nfsd-hypervisor.yml
new file mode 100644
index 0000000..df59645
--- /dev/null
+++ b/playbooks/utils/nfsd-hypervisor.yml
@@ -0,0 +1,6 @@
+---
+
+- roles:
+ - role: nfsd
+ vars:
+ nfsd_dirs: "{% for vm in vms %}{{ vm.name }} {% endfor %}"
diff --git a/playbooks/workstation.yml b/playbooks/workstation.yml
index 2a3534e..1b1acc3 100644
--- a/playbooks/workstation.yml
+++ b/playbooks/workstation.yml
@@ -5,11 +5,6 @@
---
- hosts: localhost
- pre_tasks:
- - fail:
- msg: must be run as root!
- when: lookup('env', 'USER') != "root"
-
roles:
- role: _workstation/env
tags: env, always
@@ -22,6 +17,3 @@
- role: _workstation/sysconf
tags: sysconf
-
- - role: update
- tags: update
remember that computers suck.