No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

selfoss.yml 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. - name: Clone Selfoss
  2. git: repo=https://github.com/SSilence/selfoss.git
  3. dest=/var/www/selfoss
  4. accept_hostkey=yes
  5. - name: Set selfoss permissions
  6. action: file owner=www-data group=www-data path=/var/www/selfoss recurse=yes state=directory
  7. - name: Install selfoss dependencies
  8. apt: pkg={{ item }} state=present
  9. with_items:
  10. - php5
  11. - php5-pgsql
  12. - php5-gd
  13. - name: Create database user for selfoss
  14. postgresql_user: login_host=localhost login_user={{ db_admin_username }} login_password="{{ db_admin_password }}" name={{ selfoss_db_username }} password="{{ selfoss_db_password }}" state=present
  15. - name: Create database for selfoss
  16. postgresql_db: login_host=localhost login_user={{ db_admin_username }} login_password="{{ db_admin_password }}" name={{ selfoss_db_database }} state=present owner={{ selfoss_db_username }}
  17. - name: Install selfoss config.ini
  18. template: src=var_www_selfoss_config.ini.j2 dest=/var/www/selfoss/config.ini group=www-data owner=www-data
  19. - name: Enable Apache rewrite module
  20. command: a2enmod rewrite creates=/etc/apache2/mods-enabled/rewrite.load
  21. notify: restart apache
  22. - name: Enable Apache headers module
  23. command: a2enmod headers creates=/etc/apache2/mods-enabled/headers.load
  24. notify: restart apache
  25. - name: Enable Apache expires module
  26. command: a2enmod expires creates=/etc/apache2/mods-enabled/expires.load
  27. notify: restart apache
  28. - name: Rename existing Apache blog virtualhost
  29. command: mv /etc/apache2/sites-available/selfoss /etc/apache2/sites-available/selfoss.conf removes=/etc/apache2/sites-available/selfoss
  30. - name: Remove old sites-enabled/selfoss symlink (new one will be created by a2ensite)
  31. command: rm /etc/apache2/sites-enabled/selfoss removes=/etc/apache2/sites-enabled/selfoss
  32. - name: Configure the Apache HTTP server for selfoss
  33. template: src=etc_apache2_sites-available_selfoss.j2 dest=/etc/apache2/sites-available/selfoss.conf group=root owner=root
  34. - name: Enable the selfoss site
  35. command: a2ensite selfoss.conf creates=/etc/apache2/sites-enabled/selfoss.conf
  36. notify: restart apache
  37. - name: Install selfoss cronjob
  38. cron: name="selfoss" user="www-data" minute="*/5" job="curl --silent --show-error -k 'https://{{ selfoss_domain }}/update' > /dev/null"
  39. - name: Configure selfoss logrotate
  40. copy: src=etc_logrotate_selfoss dest=/etc/logrotate.d/selfoss owner=root group=root mode=0644