|
@@ -0,0 +1,62 @@
|
|
|
+---
|
|
|
+- name: Dependencies installed
|
|
|
+ community.general.pkgng:
|
|
|
+ name: py38-pip,py38-pillow,git-tiny,py38-psycopg2,nginx
|
|
|
+ state: latest
|
|
|
+
|
|
|
+- name: Source folder exists
|
|
|
+ file:
|
|
|
+ path: /usr/local/src
|
|
|
+ owner: root
|
|
|
+ mode: 0755
|
|
|
+ state: directory
|
|
|
+
|
|
|
+- name: Emus source @ master
|
|
|
+ git:
|
|
|
+ repo: "https://code.unbl.ink/secstate/emus"
|
|
|
+ dest: /usr/local/src/emus
|
|
|
+ update: yes
|
|
|
+ force: yes
|
|
|
+ tags:
|
|
|
+ - update
|
|
|
+
|
|
|
+- name: Emus conf file installed
|
|
|
+ template:
|
|
|
+ src: emus.conf.j2
|
|
|
+ dest: /usr/local/etc/emus.conf
|
|
|
+ owner: root
|
|
|
+ mode: 0600
|
|
|
+
|
|
|
+- name: Skyscraper conf file installed template:
|
|
|
+ src: skyscraper.ini.j2
|
|
|
+ dest: /usr/local/etc/skyscraper.ini
|
|
|
+ owner: root
|
|
|
+ mode: 0600
|
|
|
+
|
|
|
+- name: Poetry installed
|
|
|
+ pip:
|
|
|
+ name: poetry
|
|
|
+
|
|
|
+- name: Emus dependecies installed
|
|
|
+ command: poetry install
|
|
|
+ args:
|
|
|
+ chdir: /usr/local/src/emus
|
|
|
+
|
|
|
+
|
|
|
+- name: Emus migrations up to date
|
|
|
+ command: poetry run python manage.py migrate
|
|
|
+ args:
|
|
|
+ chdir: /usr/local/src/emus
|
|
|
+
|
|
|
+- name: Emus migrations up to date
|
|
|
+ command: poetry run python manage.py collectstatic --noinput
|
|
|
+ args:
|
|
|
+ chdir: /usr/local/src/emus
|
|
|
+
|
|
|
+- name: Emus immortal file installed
|
|
|
+ template:
|
|
|
+ src: emus.yml.j2
|
|
|
+ dest: /usr/local/etc/immortal/emus.yml
|
|
|
+ owner: root
|
|
|
+ mode: 0600
|
|
|
+ notify: Immortal restarted
|