Jelajahi Sumber

[hauk] Properly run install

Colin Powell 3 tahun lalu
induk
melakukan
19a5be79be
1 mengubah file dengan 11 tambahan dan 7 penghapusan
  1. 11 7
      ansible/roles/hauk/tasks/main.yml

+ 11 - 7
ansible/roles/hauk/tasks/main.yml

@@ -14,7 +14,7 @@
   file: path=/usr/local/etc/hauk mode=0755 state=directory
 
 - name: Www folder exists
-  file: path=/var/www mode=0755 state=directory
+  file: path=/usr/local/www mode=0755 state=directory
 
 - name: Hauk source deployed
   git:
@@ -24,11 +24,15 @@
     accept_hostkey: yes
     update: yes
 
-# TODO this needs patching to remove y/n questions
-#- name: Hauk installed
-#  shell:
-#    cmd: "./install.sh -c /var/www/hauk"
-#    chdir: /usr/local/src/hauk
+- name: Removed Hauk config file
+  file:
+    state: absent
+    path: /usr/local/etc/hauk/config.php
+
+- name: Hauk installed
+  shell:
+    cmd: "./install.sh -f -c /usr/local/www/hauk"
+    chdir: /usr/local/src/hauk
 
 - name: Nginx location file installed
   ansible.builtin.copy:
@@ -36,7 +40,7 @@
     dest: /usr/local/etc/nginx/locations/hauk.conf
   notify: Nginx restarted
 
-- name: Hauk config file installed
+- name: Installed Hauk config file
   template:
     src: config.php.j2
     dest: /usr/local/etc/hauk/config.php