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