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.

selfoss.yml 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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: Create database user for selfoss
  8. 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
  9. - name: Create database for selfoss
  10. 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 }}
  11. - name: Install selfoss config.ini
  12. template: src=var_www_selfoss_config.ini.j2 dest=/var/www/selfoss/config.ini group=www-data owner=www-data
  13. - name: Enable Apache rewrite module
  14. command: a2enmod rewrite creates=/etc/apache2/mods-enabled/rewrite.load
  15. notify: restart apache
  16. - name: Enable Apache headers module
  17. command: a2enmod headers creates=/etc/apache2/mods-enabled/headers.load
  18. notify: restart apache
  19. - name: Enable Apache expires module
  20. command: a2enmod expires creates=/etc/apache2/mods-enabled/expires.load
  21. notify: restart apache
  22. - name: Rename existing Apache blog virtualhost
  23. command: mv /etc/apache2/sites-available/selfoss /etc/apache2/sites-available/selfoss.conf removes=/etc/apache2/sites-available/selfoss
  24. - name: Remove old sites-enabled/selfoss symlink (new one will be created by a2ensite)
  25. command: rm /etc/apache2/sites-enabled/selfoss removes=/etc/apache2/sites-enabled/selfoss
  26. - name: Configure the Apache HTTP server for selfoss
  27. template: src=etc_apache2_sites-available_selfoss.j2 dest=/etc/apache2/sites-available/selfoss.conf group=root owner=root
  28. - name: Enable the selfoss site
  29. command: a2ensite selfoss.conf creates=/etc/apache2/sites-enabled/selfoss.conf
  30. notify: restart apache
  31. - name: Install selfoss cronjob
  32. cron: name="selfoss" user="www-data" minute="*/5" job="curl --silent --show-error -k 'https://{{ selfoss_domain }}/update' > /dev/null"
  33. - name: Configure selfoss logrotate
  34. copy: src=etc_logrotate_selfoss dest=/etc/logrotate.d/selfoss owner=root group=root mode=0644