+ Moving over to new ansible role setup
This commit is contained in:
2
aws/playbooks/tasks/main.yml
Normal file
2
aws/playbooks/tasks/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# tasks file for playbooks
|
||||
3
aws/playbooks/tasks/update-docker.yml
Normal file
3
aws/playbooks/tasks/update-docker.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- hosts: {{ main_host }}
|
||||
remote_user: {{ remote_user }}
|
||||
59
aws/playbooks/tasks/update-service.yml
Normal file
59
aws/playbooks/tasks/update-service.yml
Normal 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
|
||||
Reference in New Issue
Block a user