Decom Adam

You won't be missed. Piece of shit.
This commit is contained in:
Salt 2020-11-07 00:32:21 -06:00
parent a9353ad9ef
commit d8a5833956
5 changed files with 0 additions and 109 deletions

View File

@ -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 ]

View File

@ -1,4 +0,0 @@
#!/usr/bin/ansible-playbook
# vim:ft=ansible:
adam_name: adam
adam_repo: "https://git.9iron.club/salt/adam"

View File

@ -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

View File

@ -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

View File

@ -1,3 +0,0 @@
{
"token": "{{ adam_auth_token }}"
}