summaryrefslogtreecommitdiffstats
path: root/deployment/playbook.yml
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/playbook.yml')
-rw-r--r--deployment/playbook.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/deployment/playbook.yml b/deployment/playbook.yml
new file mode 100644
index 0000000..96fbc44
--- /dev/null
+++ b/deployment/playbook.yml
@@ -0,0 +1,22 @@
+- hosts: bitvend
+ tasks:
+ - apt: name="{{ item }}" state=present
+ with_items:
+ - pigpio
+ - python3-pigpio
+ - python3-pip
+ - python3-pillow
+ - nginx
+ - dehydrated
+ - user: name=bitvend home=/var/bitvend system=yes
+ - synchronize: src=../../ dest=/var/bitvend
+ - file: path=/var/bitvend owner=bitvend group=bitvend recurse=yes
+ - pip: requirements=/var/bitvend/requirements.txt executable=/usr/bin/pip3
+ - copy: src=bitvend.service dest=/etc/systemd/system
+ - copy: src=nginx.site dest=/etc/nginx/sites-available/default
+ - service: name=nginx state=reloaded
+ - service: name=pigpiod enabled=yes state=started
+ - service: name=bitvend enabled=yes state=started
+
+ # Cleanup
+ - user: name=pi state=absent