From 1a0b5bf17161d5cab48895529daeab6f7a265589 Mon Sep 17 00:00:00 2001 From: xuu Date: Fri, 13 Oct 2023 11:29:51 -0600 Subject: [PATCH] build: add gitea runner --- .ansible/files/sour.is-paste.service | 14 ++++++++++++++ .ansible/inventory | 5 +++++ .ansible/playbook.yml | 25 +++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 .ansible/files/sour.is-paste.service create mode 100644 .ansible/inventory create mode 100644 .ansible/playbook.yml diff --git a/.ansible/files/sour.is-paste.service b/.ansible/files/sour.is-paste.service new file mode 100644 index 0000000..958e676 --- /dev/null +++ b/.ansible/files/sour.is-paste.service @@ -0,0 +1,14 @@ +[Unit] +Description=sour.is paste +After=syslog.target network.target + +[Service] +Type=simple +ExecStart=/usr/local/bin/sour.is-paste +User=www-data + +Restart=always +RestartSec=30 + +[Install] +WantedBy=multi-user.target diff --git a/.ansible/inventory b/.ansible/inventory new file mode 100644 index 0000000..7658f19 --- /dev/null +++ b/.ansible/inventory @@ -0,0 +1,5 @@ +[lavana] +lavana.sour.is + +[kapha] +kapha.sour.is \ No newline at end of file diff --git a/.ansible/playbook.yml b/.ansible/playbook.yml new file mode 100644 index 0000000..b076a8b --- /dev/null +++ b/.ansible/playbook.yml @@ -0,0 +1,25 @@ +--- +- name: Deploy EV + hosts: kapha + + tasks: + - name: Copy build to remote + ansible.builtin.copy: + src: ../build/sour.is-paste + dest: /usr/local/bin/sour.is-paste + owner: root + group: root + + - name: Copy build to remote + ansible.builtin.copy: + src: sour.is-paste.service + dest: /etc/systemd/system/sour.is-paste.service + owner: root + group: root + + - name: Restart service + systemd: + name: sour.is-paste + enabled: true + daemon_reload: true + state: restarted