ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

commit b347965c40a93bcf7096f323f2ffde3984fa4f82
parent d4f39fa700ca6b4c93da05bf5aa5fc26d52d8ff1
Author: Leah (ctucx) <leah@ctu.cx>
Date: Fri, 26 Feb 2021 14:16:51 +0100

update configurations and playbook
6 files changed, 89 insertions(+), 25 deletions(-)
M
configuration/joguhrtbecher.yml
|
9
+++++++++
M
configuration/lollo.yml
|
32
+++++++++++++++++---------------
M
configuration/taurus.yml
|
13
+++++++++++++
M
configuration/wanderduene.yml
|
30
++++++++++++++++++++----------
M
inventory
|
5
+++++
M
playbook.yml
|
25
+++++++++++++++++++++++++
diff --git a/configuration/joguhrtbecher.yml b/configuration/joguhrtbecher.yml
@@ -8,6 +8,15 @@ system:
   extraPackages:
     - iftop
     - iotop
+    - htop
+    - rsync
+    - mtr
+    - traceroute
+    - dnsutils
+    - tar
+    - unzip
+    - wget
+    - curl
     - hdparm
   nameservers:
     - 1.1.1.1
diff --git a/configuration/lollo.yml b/configuration/lollo.yml
@@ -5,9 +5,18 @@ system:
   enableOwnRepos: true
   enableSudo: true
   useNTP: true #todo: support archlinux
-  nameservers:
-    - 1.1.1.1
-    - 8.8.8.8
+  extraPackages:
+    - iftop
+    - iotop
+    - htop
+    - rsync
+    - mtr
+    - traceroute
+    - dnsutils
+    - tar
+    - unzip
+    - wget
+    - curl
   users:
     - name: leah
       groups: "wheel"

@@ -127,12 +136,12 @@ files:
     state:   "directory"
     mode:    "0755"
     owner:   "leah"
-    group:   "nginx"
+    group:   "http"
   /var/lib/websites/dnsmasq.home.ctu.cx:
     state:   "directory"
     mode:    "0755"
     owner:   "leah"
-    group:   "nginx"
+    group:   "http"
   /etc/udev/rules.d/99-modbus-serial.rules:
     state:   "file"
     content: 'SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{serial}=="1337", SYMLINK+="modbus0"'

@@ -151,17 +160,11 @@ files:
     mode:    "0755"
     owner:   "root"
     group:   "root"
-  /usr/local/bin/powermeter-archiver.php:
-    state:   "file"
-    src:     "scripts/powermeter-archiver.php"
-    mode:    "0755"
-    owner:   "root"
-    group:   "root"
   /var/lib/powermeter-archive:
     state:   "directory"
     mode:    "0755"
     owner:   "leah"
-    group:   "nginx"
+    group:   "http"
 
 services:
   openssh:

@@ -208,8 +211,8 @@ services:
         user: leah
         group: leah
         listenerPath: /run/php-fpm/php-fpm.sock
-        listenerOwner: nginx
-        listenerGroup: nginx
+        listenerOwner: http
+        listenerGroup: http
 
   nginx:
     enable: true

@@ -227,7 +230,6 @@ services:
       dnsmasq.home.ctu.cx:
         root: /var/lib/websites/dnsmasq.home.ctu.cx
         extraConfig: "
-          index index.html index.php;
           try_files $uri $uri/ /index.php?$query_string;
         "
         enablePhpSupport: true
diff --git a/configuration/taurus.yml b/configuration/taurus.yml
@@ -6,6 +6,17 @@ system:
   enableOwnRepos: true
   enableSudo: true
   useNTP: true
+  extraPackages:
+    - iftop
+    - iotop
+    - htop
+    - rsync
+    - mtr
+    - bind-tools
+    - tar
+    - unzip
+    - wget
+    - curl
   nameservers:
     - 1.1.1.1
     - 8.8.8.8

@@ -86,6 +97,8 @@ services:
 
   nginx:
     enable: true
+    user: nginx
+    group: nginx
     sslOnly: true
     vhosts:
       taurus.ctu.cx:
diff --git a/configuration/wanderduene.yml b/configuration/wanderduene.yml
@@ -7,6 +7,17 @@ system:
   enableSudo: true
   useNTP: true #todo: support archlinux
   enableNFSMount: true #todo: support archlinux
+  extraPackages:
+    - iftop
+    - iotop
+    - htop
+    - rsync
+    - mtr
+    - bind-tools
+    - tar
+    - unzip
+    - wget
+    - curl
   fstab:
     - device: UUID=fc06e9aa-37fc-45ab-ad89-4f04e8ed78ba
       path: /

@@ -83,7 +94,7 @@ files:
     group:   "nginx"
   /usr/share/webapps/cgit/custom-cgit.css:
     state:   "file"
-    src:     "config-files/cgit/cgit.css"
+    src:     "config-files/wanderduene/cgit/cgit.css"
     mode:    "0600"
     owner:   "nginx"
     group:   "nginx"

@@ -170,6 +181,8 @@ services:
 
   nginx:
     enable: true
+    user: nginx
+    group: nginx
     sslOnly: true
     vhosts:
       wanderduene.ctu.cx:

@@ -219,10 +232,7 @@ services:
             '
           - path: "/drucken"
             directoryListing: true
-            extraConfig: '
-              auth_basic "Restricted Content";
-              auth_basic_user_file /etc/nginx/passwd/print;
-            '
+            baiscAuth: /etc/nginx/passwd/print
           - path: "/cypro-dispenser"
             directoryListing: true
       repo.f2k1.de:

@@ -240,7 +250,7 @@ services:
 
   cgit:
     enable: true
-    configFile: config-files/cgit/cgitrc
+    configFile: config-files/wanderduene/cgit/cgitrc
     nginx:
       enable: true
       domain: "cgit.ctu.cx"

@@ -388,7 +398,7 @@ services:
       disable_existing_loggers: false
     webClient:
       enable: true
-      configFile: config-files/schildichat-web.json
+      configFile: config-files/wanderduene/schildichat-web.json
     nginx:
       enable: true
       domain: "matrix.ctu.cx"

@@ -464,10 +474,10 @@ services:
 
   grafana:
     enable: true
-    configFile: config-files/grafana/grafana.ini
+    configFile: config-files/wanderduene/grafana/grafana.ini
     provisioning:
       enable: true
-      dashboards: config-files/grafana/dashboards
+      dashboards: config-files/wanderduene/grafana/dashboards
       datasources:
         - name: Prometheus
           type: prometheus

@@ -519,7 +529,7 @@ services:
 
   pleroma:
     enable: true
-    configFile: config-files/pleroma.exs
+    configFile: config-files/wanderduene/pleroma.exs
     secretsContent: "{{ lookup('diskcache', 'passwordstore', 'Server/{{system.hostname}}/pleroma.secrets returnall=true')}}"
     nginx:
       enable: true
diff --git a/inventory b/inventory
@@ -19,3 +19,8 @@ lollo.ctu.cx
 joguhrtbecher.ctu.cx
 #[joguhrtbecher:vars]
 #ansible_ssh_port=2222
+
+[luna]
+luna.f2k1.de
+[luna:vars]
+ansible_ssh_port=24
diff --git a/playbook.yml b/playbook.yml
@@ -128,3 +128,28 @@
       tags: [ influxdb, smarthome ]
     - role: smartied
       tags: [ smartied, smarthome ]
+
+- hosts: luna
+  name:  Install luna
+  vars_files: configuration/luna.yml
+  roles: 
+    - role: common
+      tags: common
+    - role: openssh
+      tags: [ openssh, common ]
+    - role: files
+      tags: files
+    - role: systemd-timers
+      tags: timers
+    - role: systemd-networkd
+      tags: systemd-networkd
+    - role: php-fpm
+      tags: php-fpm
+    - role: nginx
+      tags: nginx
+    - role: prometheus
+      tags: prometheus
+    - role: grafana
+      tags: grafana
+    - role: fritzboxExporter
+      tags: fritzboxExporter