Browse Source

fixing a dependency on mailserver, as psycopg and postgres are only installed there

Aleksandr Bogdanov 10 years ago
parent
commit
461be2b260
1 changed files with 10 additions and 6 deletions
  1. 10
    6
      roles/owncloud/tasks/owncloud.yml

+ 10
- 6
roles/owncloud/tasks/owncloud.yml View File

@@ -1,6 +1,16 @@
1 1
 ---
2 2
 # Installs the ownCloud personal cloud software
3 3
 # as per http://www.debiantutorials.com/how-to-install-owncloud-on-wheezy/
4
+- name: Install dependencies
5
+  apt: pkg={{ item }} state=present
6
+  with_items:
7
+    - libapache2-mod-php5
8
+    - php-apc
9
+    - python-psycopg2
10
+    - postgresql-9.3
11
+
12
+- name: Set postgres password
13
+  command: sudo -u {{ db_admin_username }} psql -d {{ db_admin_username }} -c "ALTER USER postgres with  password '{{ db_admin_password }}';"
4 14
 
5 15
 - name: Create database user for ownCloud
6 16
   postgresql_user: login_host=localhost login_user={{ db_admin_username }} login_password="{{ db_admin_password }}" name={{ owncloud_db_username }} password="{{ owncloud_db_password }}" state=present
@@ -35,12 +45,6 @@
35 45
 - name: Install ownCloud (possibly from OpenSuSE repository)
36 46
   apt: pkg=owncloud update_cache=yes
37 47
 
38
-- name: Install PHP dependencies
39
-  apt: pkg={{ item }} state=present
40
-  with_items:
41
-    - libapache2-mod-php5
42
-    - php-apc
43
-
44 48
 - name: Owncloud www directory
45 49
   file: state=directory path=/var/www/owncloud
46 50
 

Loading…
Cancel
Save