|
@@ -1,7 +1,7 @@
|
|
|
---
|
|
|
- name: Dependencies installed
|
|
|
community.general.pkgng:
|
|
|
- name: "py27-pip py27-supervisor"
|
|
|
+ name: "py27-pip"
|
|
|
state: latest
|
|
|
|
|
|
- name: Pip link workaround setup
|
|
@@ -10,29 +10,36 @@
|
|
|
dest: /usr/local/bin/pip
|
|
|
state: link
|
|
|
|
|
|
-- name: Supervisor enabled
|
|
|
- shell: sysrc supervisord_enable="YES"
|
|
|
+- name: SSH key installed
|
|
|
+ template:
|
|
|
+ src: sshkey.j2
|
|
|
+ dest: /root/.ssh/id_ed25519
|
|
|
+ mode: 0400
|
|
|
+
|
|
|
+- name: Environment file installed
|
|
|
+ template:
|
|
|
+ src: envrc.j2
|
|
|
+ dest: /usr/local/src/pbp_com/.envrc
|
|
|
+ owner: root
|
|
|
+ mode: 0600
|
|
|
|
|
|
- name: PBP source deployed
|
|
|
git:
|
|
|
repo: "https://git.unbl.ink/secstate/pbp_com.git"
|
|
|
dest: /usr/local/src/
|
|
|
update: yes
|
|
|
+ force: yes
|
|
|
|
|
|
- name: Requirements up to date
|
|
|
pip:
|
|
|
- requirements: /root/pbp_com/requirements.txt
|
|
|
+ requirements: /usr/local/src/pbp_com/requirements.txt
|
|
|
executable: pip
|
|
|
|
|
|
-- name: Supervisor config file patched
|
|
|
- patch:
|
|
|
- src: supervisord.conf.patch
|
|
|
- dest: /usr/local/etc/supervisord.conf
|
|
|
-
|
|
|
- notify: Supervisor restarted
|
|
|
+- name: PBP migrations up to date
|
|
|
+ command: bash -lc "direnv exec /usr/local/src/pbp_com /usr/local/bin/python2.7 /usr/local/src/pbp_com/manage.py migrate"
|
|
|
+ tags:
|
|
|
+ - deploy
|
|
|
|
|
|
-- name: Ensures supervisor conf dir exists
|
|
|
- file: path=/usr/local/etc/supervisor/conf.d state=directory
|
|
|
- name: Supervisor file installed
|
|
|
template:
|
|
|
src: supervisor.conf
|