+ Docker based service hosts are now supported via the new ansible role

Usage of this role is still sketchy however at least all the
required playbooks are in place
Main issue at the moment is the interfacing with these playbooks
This commit is contained in:
shockrah
2022-01-02 16:04:10 -08:00
parent b7f779b34f
commit 08b05dbf55
5 changed files with 50 additions and 5 deletions

View File

@@ -0,0 +1,59 @@
# WHEN TO USE THIS PLAYBOOK:
# Use this if you're running clippable under systemd
# WHAT THIS PLAYBOOK DOES:
# This playbooks basically takes a build/ directory similar to what the Gitlab
# pipelines generate and uploads those files to the desired directory
---
- hosts: {{ main_host }}
remote_user: {{ remote_user }}
tasks:
- name: Build skeleton root directory
file:
path: '{{remote_app_dir}}'
state: directory
- name: Build skeleton static directory
file:
path: '{{remote_app_dir}}/static'
state: directory
- name: Build skeleton css directory
file:
path: '{{remote_app_dir}}/static/css'
state: directory
- name: Build skeleton js directory
file:
path: '{{remote_app_dir}}/static/js'
state: directory
- name: Build skeleton templates directory
file:
path: '{{remote_app_dir}}/templates'
state: directory
- name: Update Binary installation
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- { src: ../../build/static/css/style.css, dest: '{{remote_app_dir}}/static/css/'}
- { src: ../../build/static/js/index.js, dest: '{{remote_app_dir}}/static/js/'}
- { src: ../../build/static/js/category.js, dest: '{{remote_app_dir}}/static//js/'}
- { src: ../../build/static/cantfindshit.jpg, dest: '{{remote_app_dir}}/static/'}
- { src: ../../build/static/favicon.png, dest: '{{remote_app_dir}}/static/'}
- { src: ../../build/templates/list.html.tera, dest: '{{remote_app_dir}}/templates/list.html.tera'}
- { src: ../../build/templates/video.html.tera, dest: '{{remote_app_dir}}/templates/video.html.tera'}
- { src: ../../build/Rocket.toml, dest: '{{remote_app_dir}}/'}
- { src: ../../build/server, dest: '{{remote_app_dir}}/'}
- name: Restart web service
become: yes
become_method: sudo
service:
name: app
state: restarted