説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

selfoss.yml 2.2KB

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