Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

owncloud.yml 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ---
  2. # Installs the ownCloud personal cloud software.
  3. - name: Install ownCloud dependencies
  4. apt: pkg={{ item }} state=present
  5. with_items:
  6. - postgresql
  7. - python-psycopg2
  8. tags:
  9. - dependencies
  10. - name: Set password for PostgreSQL admin user
  11. become: true
  12. become_user: postgres
  13. postgresql_user: name={{ db_admin_username }} password={{ db_admin_password }} encrypted=yes
  14. - name: Create database user for ownCloud
  15. postgresql_user: login_host=localhost login_user={{ db_admin_username }} login_password="{{ db_admin_password }}" name={{ owncloud_db_username }} password="{{ owncloud_db_password }}" role_attr_flags=CREATEDB state=present
  16. - name: Ensure repository key for ownCloud is in place
  17. apt_key: url=https://download.owncloud.org/download/repositories/stable/Debian_8.0/Release.key state=present
  18. tags:
  19. - dependencies
  20. - name: Add ownCloud repository
  21. apt_repository: repo='deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /'
  22. tags:
  23. - dependencies
  24. - name: Install ownCloud
  25. apt: pkg=owncloud update_cache=yes
  26. tags:
  27. - dependencies
  28. - name: Ensure ownCloud directory is in place
  29. file: state=directory path=/var/www/owncloud
  30. - name: Move ownCloud data to encrypted filesystem
  31. command: mv /var/www/owncloud/data /decrypted/owncloud-data creates=/decrypted/owncloud-data
  32. - file: src=/decrypted/owncloud-data dest=/var/www/owncloud/data owner=www-data group=www-data state=link
  33. - name: Configure Apache for ownCloud
  34. template: src=etc_apache2_sites-available_owncloud.j2 dest=/etc/apache2/sites-available/owncloud.conf group=root
  35. notify: restart apache
  36. - name: Install ownCloud cronjob
  37. cron: name="ownCloud" user="www-data" minute="*/5" job="php -f /var/www/owncloud/cron.php > /dev/null"