From d8a58339565ddfeb99c31fbd286326736e6079a7 Mon Sep 17 00:00:00 2001 From: Salt Date: Sat, 7 Nov 2020 00:32:21 -0600 Subject: [PATCH] Decom Adam You won't be missed. Piece of shit. --- playbooks/appservers.yml | 13 ------- roles/adam/defaults/main.yml | 4 -- roles/adam/tasks/main.yml | 60 ------------------------------ roles/adam/templates/adam@.service | 29 --------------- roles/adam/templates/auth.json | 3 -- 5 files changed, 109 deletions(-) delete mode 100644 roles/adam/defaults/main.yml delete mode 100644 roles/adam/tasks/main.yml delete mode 100644 roles/adam/templates/adam@.service delete mode 100644 roles/adam/templates/auth.json diff --git a/playbooks/appservers.yml b/playbooks/appservers.yml index a8787ad..821a147 100644 --- a/playbooks/appservers.yml +++ b/playbooks/appservers.yml @@ -27,16 +27,3 @@ pleroma_url: cowfee.moe pleroma_db_hostname: 172.31.47.215 tags: [ web, pleroma ] - - role: adam - vars: - adam_name: lain - adam_auth_token: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 33346238356561313736653431666439363835663134303339366536663964333138666530343166 - 6132353938663563316265346630613231616362643937380a616132386464653438343739613937 - 32626230326430396563316363613139306535663832336531636239633364383432373739646436 - 3338376362313539360a383763313439633331313531323232653866633065333933633061326465 - 64343165613961346362353162316530623132633164643461616633633335666232633833313561 - 33306532343963383331623663616161626533633261383238646164663362396261633736636362 - 373764613833343634346333613639626535 - tags: [ discord, adam ] diff --git a/roles/adam/defaults/main.yml b/roles/adam/defaults/main.yml deleted file mode 100644 index 5786850..0000000 --- a/roles/adam/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/ansible-playbook -# vim:ft=ansible: -adam_name: adam -adam_repo: "https://git.9iron.club/salt/adam" diff --git a/roles/adam/tasks/main.yml b/roles/adam/tasks/main.yml deleted file mode 100644 index 9d692aa..0000000 --- a/roles/adam/tasks/main.yml +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/ansible-playbook -# vim:ft=ansible: -- name: Set up Adam - block: - - name: Install required packages - apt: - name: - - libopus0 - - nodejs - - npm - - name: Install packages without recommends - apt: - install_recommends: no - name: - - ffmpeg - - name: Create Adam user - user: - name: discord-adam - - name: Assure data directory - file: - path: "/var/adam" - state: directory - # Sticky, SetGID - mode: 3775 - owner: root - group: discord-adam - - name: Set up bot root - block: - - name: Create specific data directory - file: - path: "/var/adam/{{ adam_name }}" - state: directory - mode: 0755 - - name: Clone bot repo - git: - repo: "{{ adam_repo }}" - dest: "/var/adam/{{ adam_name }}" - - name: Initialize NPM modules - npm: - path: "/var/adam/{{ adam_name }}" - - name: Template out authentication token - template: - src: "auth.json" - dest: "/var/adam/{{ adam_name }}/auth.json" - mode: "0600" - become: yes - become_user: discord-adam - - name: Set up system configuration - block: - - name: Template out service - template: - src: "adam@.service" - dest: "/etc/systemd/system/adam@.service" - - name: Start and enable service - systemd: - daemon_reload: yes - name: "adam@{{ adam_name }}.service" - enabled: yes - state: started - become: yes diff --git a/roles/adam/templates/adam@.service b/roles/adam/templates/adam@.service deleted file mode 100644 index d48ad3d..0000000 --- a/roles/adam/templates/adam@.service +++ /dev/null @@ -1,29 +0,0 @@ -# -# Licensed under the terms of the MIT license -# vim:ft=dosini: -# - -[Unit] -Description=Adam Bot %i -After=network.target - -[Service] -User=discord-adam -Group=discord-adam -WorkingDirectory=/var/adam/%i -PrivateUsers=true -ProtectSystem=full -ProtectHome=true -# Implies MountFlags=slave -ProtectKernelTunables=true -# Implies NoNewPrivileges=yes -ProtectKernelModules=true -# Implies MountAPIVFS=yes -ProtectControlGroups=true - -ExecStart=/usr/bin/node index.js - -Restart=always - -[Install] -WantedBy=multi-user.target diff --git a/roles/adam/templates/auth.json b/roles/adam/templates/auth.json deleted file mode 100644 index bdc2868..0000000 --- a/roles/adam/templates/auth.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "token": "{{ adam_auth_token }}" -}