diff --git a/hosts.yaml b/hosts.yaml index 85622b6..d3ebcdc 100644 --- a/hosts.yaml +++ b/hosts.yaml @@ -20,9 +20,6 @@ all: music: hosts: music.bitlair.nl: - services: - hosts: - service.bitlair.nl: www: hosts: cyber.bitlair.nl: diff --git a/roles/music/templates/soundboard.service b/roles/music/templates/soundboard.service index f362fec..6c74903 100644 --- a/roles/music/templates/soundboard.service +++ b/roles/music/templates/soundboard.service @@ -9,9 +9,7 @@ Type=simple ExecStart=/opt/soundboard/.venv/bin/python /opt/soundboard/soundboard.py /etc/soundboard.yaml Restart=always RestartSec=10 -User=audio -LimitMEMLOCK=infinity -LimitRTPRIO=99 +User=root [Install] WantedBy=multi-user.target diff --git a/roles/services/handlers/main.yaml b/roles/services/handlers/main.yaml deleted file mode 100644 index be55cc7..0000000 --- a/roles/services/handlers/main.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- import_tasks: ../../common/handlers/main.yaml - -- name: restart irc-bot - systemd: - name: irc-bot - state: restarted - daemon_reload: true - -- name: restart siahsd - systemd: - name: siahsd - state: restarted - daemon_reload: true - -- name: restart spacestated - systemd: - name: spacestated - state: restarted - daemon_reload: true diff --git a/roles/services/tasks/main.yaml b/roles/services/tasks/main.yaml deleted file mode 100644 index 621d051..0000000 --- a/roles/services/tasks/main.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- tags: services_siahsd - import_tasks: siahsd.yaml - -- tags: services_spacestated - import_tasks: spacestated.yaml diff --git a/roles/services/tasks/siahsd.yaml b/roles/services/tasks/siahsd.yaml deleted file mode 100644 index 3dcfb31..0000000 --- a/roles/services/tasks/siahsd.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -# TODO: Install and build - -- name: Create log dir - file: - path: /var/log/siahsd - state: directory - owner: siahsd - group: nogroup - -- name: Install service file - template: - src: siahsd.service - dest: /etc/systemd/system/siahsd.service - owner: root - group: root - mode: 0644 - notify: restart siahsd - -- name: Start siahsd - systemd: - name: siahsd - state: started - enabled: yes - daemon_reload: true - -- name: Allow siahsd traffic - iptables: - chain: INPUT - protocol: udp - destination_port: "4000" - jump: ACCEPT - ip_version: "{{ item }}" - action: insert - with_items: [ ipv4, ipv6 ] - notify: persist iptables diff --git a/roles/services/tasks/spacestated.yaml b/roles/services/tasks/spacestated.yaml deleted file mode 100644 index d85e415..0000000 --- a/roles/services/tasks/spacestated.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -- name: Install mqtt-simple - command: cpan Net::MQTT::Simple - -- name: Install dependencies - apt: - name: [ php-cli, php-snmp ] - -- name: Add user - user: - name: spacestated - home: /var/lib/spacestated - generate_ssh_key: yes - ssh_key_type: ed25519 - -- name: Clone source - git: - repo: https://github.com/bitlair/spacestated.git - version: main - dest: /var/lib/spacestated/spacestated - accept_hostkey: yes - -- name: Install service file - template: - src: spacestated.service - dest: /etc/systemd/system/spacestated.service - owner: root - group: root - mode: 0644 - notify: restart spacestated diff --git a/roles/services/templates/siahsd.conf b/roles/services/templates/siahsd.conf deleted file mode 100644 index 772c5b4..0000000 --- a/roles/services/templates/siahsd.conf +++ /dev/null @@ -1,39 +0,0 @@ -[siahsd] -pid file = /run/siahsd.pid -log file = /var/log/siahsd/siahsd.log -log level = 3 -foreground = 0 -event handlers = script - -#[database] -#driver = mysql -#host = localhost -#name = siahsd -#username = siahsd -#password = MysbJxAaawmwKPqD - -[siahs] -port = 4000 - -[secip] -port = 9000 -rsa key file = something.sexp - -#[jsonbot] -#address = 192.168.88.15 -#port = 5500 -#aes key = blablablablablaz -#password = mekker -#privmsg to = #bitlair - -#[spacestate] -#driver = mysql -#host = localhost -#name = bitwifi -#username = bitwifi -#password = aGWERQpLEQPUaXJV -#open script = /opt/alarm/disarmed.sh -#close script = /opt/alarm/armed.sh - -[script] -path = /opt/alarm/siahsd_handler.sh diff --git a/roles/services/templates/siahsd.service b/roles/services/templates/siahsd.service deleted file mode 100644 index 11176df..0000000 --- a/roles/services/templates/siahsd.service +++ /dev/null @@ -1,17 +0,0 @@ -# Managed by Ansible - -[Unit] -Description=Siahsd -After=network.target - -[Service] -Type=forking -PIDFile=/run/siahsd.pid -Restart=always -RestartSec=2s -ExecStart=/usr/local/src/siahsd/build/siahsd -User=siahsd - -[Install] -WantedBy=multi-user.target - diff --git a/roles/services/templates/spacestated.service b/roles/services/templates/spacestated.service deleted file mode 100644 index 5f6c6e2..0000000 --- a/roles/services/templates/spacestated.service +++ /dev/null @@ -1,15 +0,0 @@ -# Managed by Ansible - -[Unit] -Description=Bitlair Spacestate -After=network.target - -[Service] -Type=simple -Restart=on-failure -RestartSec=2s -ExecStart=/var/lib/spacestated/spacestated/spacestated -User=spacestated - -[Install] -WantedBy=multi-user.target diff --git a/services.yaml b/services.yaml deleted file mode 100644 index 5bfcdef..0000000 --- a/services.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: services - roles: - - common - - services