diff options
author | Thedro Neely <thedroneely@gmail.com> | 2019-12-18 18:12:49 -0500 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2019-12-18 18:12:49 -0500 |
commit | 172d062e624301cd0f98501c40c96be026496aff (patch) | |
tree | 3feb571f8f9bfc0507683dcaa8746d596269484d | |
parent | c4fb7e6b6b491d70d438062b6448e2c79f1f9a87 (diff) | |
download | playbooks-172d062e624301cd0f98501c40c96be026496aff.tar.gz playbooks-172d062e624301cd0f98501c40c96be026496aff.tar.bz2 playbooks-172d062e624301cd0f98501c40c96be026496aff.zip |
roles/isso/isso.yml: Move source to top level of home directory
-rw-r--r-- | roles/isso/files/supervisord.conf | 4 | ||||
-rw-r--r-- | roles/isso/isso.yml | 28 |
2 files changed, 17 insertions, 15 deletions
diff --git a/roles/isso/files/supervisord.conf b/roles/isso/files/supervisord.conf index 196292d..6c43ad4 100644 --- a/roles/isso/files/supervisord.conf +++ b/roles/isso/files/supervisord.conf @@ -1,8 +1,8 @@ ; Supervisor config file. [program:isso] -command=/opt/isso/deploy/bin/isso -c /opt/isso/deploy/isso.conf run -directory=/opt/isso/deploy +command=/opt/isso/bin/isso -c /opt/isso/isso.conf run +directory=/opt/isso stopasgroup=true stdout_logfile=/var/log/%(program_name)s.log stdout_logfile_maxbytes=0 diff --git a/roles/isso/isso.yml b/roles/isso/isso.yml index 5cf3488..7768b49 100644 --- a/roles/isso/isso.yml +++ b/roles/isso/isso.yml @@ -1,19 +1,21 @@ --- - hosts: isso vars: - deploy_path: /opt/isso/deploy + username: isso + deploy_path: "/opt/{{ username }}" + version: 7eed747e7a94ca1a19c01c67de7ed6b16d2bbe3d tasks: - - name: Ensuring isso group exists + - name: Ensuring group exists group: - name: isso + name: "{{ username }}" state: present - - name: Creating isso user and making home directory + - name: Creating user and making home directory user: system: yes state: present - name: isso - groups: isso - home: /opt/isso + name: "{{ username }}" + groups: "{{ username }}" + home: "/opt/{{ username }}" - name: Installing the required dependencies apk: state: present @@ -29,11 +31,11 @@ - make - supervisor - block: - - name: Cloning isso repository + - name: Cloning repository git: repo: https://github.com/posativ/isso dest: "{{ deploy_path }}" - version: 7eed747e7a94ca1a19c01c67de7ed6b16d2bbe3d + version: "{{ version }}" - name: Setting up python virtual environment shell: python3 -m venv . args: @@ -59,16 +61,16 @@ args: chdir: "{{ deploy_path }}" creates: isso/js/embed.min.js - - name: Copying isso config file + - name: Copying config file copy: src: isso.conf dest: "{{ deploy_path }}/isso.conf" - owner: isso - group: isso + owner: "{{ username }}" + group: "{{ username }}" mode: '0644' register: issoConfig become: true - become_user: isso + become_user: "{{ username }}" - name: Copying supervisord config file copy: src: supervisord.conf |