123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- ---
- # Installs the ownCloud personal cloud software
- # as per http://www.debiantutorials.com/how-to-install-owncloud-on-wheezy/
-
- - name: Create database user for ownCloud
- 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
-
- - name: Create database for ownCloud
- postgresql_db: login_host=localhost login_user={{ db_admin_username }} login_password="{{ db_admin_password }}" name={{ owncloud_db_database }} state=present owner={{ owncloud_db_username }}
-
- - name: Ensure repository key for ownCloud is in place
- apt_key: url=http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/Release.key state=present
-
- - name: Add ownCloud OpenSuSE repository
- apt_repository: repo='deb http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/ /'
-
- - name: Install ownCloud from OpenSuSE repository
- apt: pkg=owncloud update_cache=yes
-
- - name: Install PHP-APC
- apt: pkg=php-apc
-
- - name: Store ownCloud data securely
- command: mv /var/www/owncloud/data /decrypted/owncloud-data creates=/decrypted/owncloud-data
- - file: src=/decrypted/owncloud-data dest=/var/www/owncloud/data owner=www-data group=www-data state=link
-
- - name: Enable Apache rewrite module
- command: a2enmod rewrite creates=/etc/apache2/mods-enabled/rewrite.load
- notify: restart apache
-
- - name: Enable Apache headers module
- command: a2enmod headers creates=/etc/apache2/mods-enabled/headers.load
- notify: restart apache
-
- - name: Enable Apache expires module
- command: a2enmod expires creates=/etc/apache2/mods-enabled/expires.load
- notify: restart apache
-
- - name: Configure the Apache HTTP server for ownCloud
- template: src=etc_apache2_sites-available_owncloud.j2 dest=/etc/apache2/sites-available/owncloud group=www-data owner=www-data
- notify: restart apache
-
- - name: Enable the owncloud site
- command: a2ensite owncloud creates=/etc/apache2/sites-enabled/owncloud
- notify: restart apache
-
- - name: Install ownCloud cronjob
- cron: name="ownCloud" user="www-data" minute="*/5" job="php -f /var/www/owncloud/cron.php > /dev/null"
|