summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2020-03-20 01:05:49 -0400
committerThedro Neely <thedroneely@gmail.com>2020-03-20 01:05:49 -0400
commit83c99d794c5fb33ab8d40415565bf8569b509a57 (patch)
tree8c272363df0a058d802cbb33beaff29f1be4f58c /roles
parentcd2e920722b3de7aa3ecba4022818ee24158b4f7 (diff)
downloadplaybooks-83c99d794c5fb33ab8d40415565bf8569b509a57.tar.gz
playbooks-83c99d794c5fb33ab8d40415565bf8569b509a57.tar.bz2
playbooks-83c99d794c5fb33ab8d40415565bf8569b509a57.zip
roles/isso/main: Streamline and Update
Diffstat (limited to 'roles')
-rw-r--r--roles/isso/main.yml42
-rw-r--r--roles/variables.yml5
2 files changed, 29 insertions, 18 deletions
diff --git a/roles/isso/main.yml b/roles/isso/main.yml
index 31a561b..b3a29dd 100644
--- a/roles/isso/main.yml
+++ b/roles/isso/main.yml
@@ -1,33 +1,39 @@
---
-# target: alpine3.11
+- name: Container Setup
+
+ vars:
+ lxc_base: ansible-alpine3.11
+ lxc_name: isso
+
+ import_playbook: ../common/tasks/lxc.yml
+
- name: Install Isso Commenting Server
hosts: isso
- vars:
- user: isso
- home: "/opt/{{ user }}"
- version: 7eed747e7a94ca1a19c01c67de7ed6b16d2bbe3d
+ vars_files:
+ - ../variables.yml
tasks:
- name: Ensuring group exists
group:
- name: "{{ user }}"
+ name: "{{ isso_user }}"
state: present
- name: Creating user and making home directory
user:
system: yes
state: present
- name: "{{ user }}"
- groups: "{{ user }}"
- home: "{{ home }}"
+ name: "{{ isso_user }}"
+ groups: "{{ isso_user }}"
+ home: "{{ isso_home }}"
- name: Installing the required dependencies
apk:
state: present
update_cache: yes
name:
+
- sudo
- git
- gcc
@@ -43,13 +49,13 @@
- name: Cloning repository
git:
repo: https://github.com/posativ/isso
- dest: "{{ home }}"
- version: "{{ version }}"
+ dest: "{{ isso_home }}"
+ version: "{{ isso_version }}"
- name: Setting up python virtual environment
shell: python3 -m venv .
args:
- chdir: "{{ home }}"
+ chdir: "{{ isso_home }}"
creates: bin/activate
- name: Setting up build environment
@@ -57,33 +63,33 @@
. bin/activate
python setup.py develop
args:
- chdir: "{{ home }}"
+ chdir: "{{ isso_home }}"
creates: isso.egg-info
- name: Installing JavaScript dependencies
shell: npm install bower requirejs jade
args:
- chdir: "{{ home }}"
+ chdir: "{{ isso_home }}"
creates: node_modules/.bin
- name: Building JavaScript assets
shell: |
- PATH=$PATH:"{{ home }}"/node_modules/.bin
+ PATH=$PATH:"{{ isso_home }}"/node_modules/.bin
make init
make js
args:
- chdir: "{{ home }}"
+ chdir: "{{ isso_home }}"
creates: isso/js/embed.min.js
- name: Copying config file
copy:
src: isso.conf
- dest: "{{ home }}/isso.conf"
+ dest: "{{ isso_home }}/isso.conf"
mode: '0644'
register: issoConfig
become: true
- become_user: "{{ user }}"
+ become_user: "{{ isso_user }}"
- name: Copying supervisord config file
copy:
diff --git a/roles/variables.yml b/roles/variables.yml
index 48b6f96..e420bfc 100644
--- a/roles/variables.yml
+++ b/roles/variables.yml
@@ -14,4 +14,9 @@ vault_user: vault
vault_home: "/opt/{{ vault_user }}"
vault_version: 1.3.2
+isso_user: isso
+isso_home: "/opt/{{ isso_user }}"
+isso_repository: https://github.com/tdro/isso
+isso_version: bb9d947c7656663f3963880bd9cd961dad874ee3
+
docker_registry_version: 2.7.1