Forráskód Böngészése

[pbp] Clean up deploy scripts

Colin Powell 4 éve
szülő
commit
9106b3030a

+ 4 - 4
ansible/roles/pbp/tasks/main.yml

@@ -18,8 +18,8 @@
 
 - name: PBP source deployed
   git:
-    repo: 'https://git.unbl.ink/secstate/pbp_com.git'
-    dest: /root/
+    repo: "https://git.unbl.ink/secstate/pbp_com.git"
+    dest: /usr/local/src/
     update: yes
 
 - name: Requirements up to date
@@ -35,9 +35,9 @@
   notify: Supervisor restarted
 
 - name: Supervisor file installed
-  copy:
+  template:
     src: supervisor.conf
-    dest: /usr/local/etc/supervisor/conf.d/
+    dest: /usr/local/etc/supervisor/conf.d/pbp.conf
     owner: root
     mode: 0644
   notify: Supervisor restarted

+ 2 - 2
ansible/roles/pbp/files/supervisor.conf → ansible/roles/pbp/templates/supervisor.conf

@@ -1,6 +1,6 @@
 [program:pbp]
-directory=/root/pbp_com
-environment=DJANGO_SETTINGS_MODULE='pbp_com.settings',DJANGO_DB_PASS='pass',DJANGO_USE_PUBLIC_MEDIA='True'
+directory=/usr/local/src/pbp_com
+environment=DJANGO_SETTINGS_MODULE='pbp_com.settings',DJANGO_DB_USER='pbp',DJANGO_DB_PASS='{{pbp_db_pass}}',DJANGO_USE_PUBLIC_MEDIA='True'
 command=/usr/local/bin/python manage.py runserver_plus 0.0.0.0:8000
 autostart=true
 autorestart=true