2016-04-05 08:44:23 +02:00
|
|
|
---
|
|
|
|
|
2019-05-20 21:35:58 +02:00
|
|
|
- name: Enable https for apt
|
|
|
|
apt: name=apt-transport-https
|
|
|
|
|
|
|
|
- name: Enable sury php apt-key
|
|
|
|
apt_key: url='https://packages.sury.org/php/apt.gpg'
|
|
|
|
|
|
|
|
- name: Enable sury php repository
|
|
|
|
apt_repository: repo="deb https://packages.sury.org/php/ stretch main"
|
|
|
|
|
2016-04-05 08:44:23 +02:00
|
|
|
- name: Install packages
|
2017-07-02 22:17:32 +02:00
|
|
|
apt: name={{ item }}
|
2016-04-05 08:44:23 +02:00
|
|
|
with_items:
|
2019-05-20 21:35:58 +02:00
|
|
|
- php-redis
|
|
|
|
- php7.3
|
|
|
|
- php7.3-bcmath
|
|
|
|
- php7.3-bz2
|
|
|
|
- php7.3-cli
|
|
|
|
- php7.3-common
|
|
|
|
- php7.3-curl
|
|
|
|
- php7.3-dev
|
|
|
|
- php7.3-fpm
|
|
|
|
- php7.3-gd
|
|
|
|
- php7.3-imap
|
|
|
|
- php7.3-intl
|
|
|
|
- php7.3-json
|
|
|
|
- php7.3-ldap
|
|
|
|
- php7.3-mbstring
|
|
|
|
- php7.3-mysql
|
|
|
|
- php7.3-opcache
|
|
|
|
- php7.3-pgsql
|
|
|
|
- php7.3-readline
|
|
|
|
- php7.3-soap
|
|
|
|
- php7.3-sqlite3
|
|
|
|
- php7.3-tidy
|
|
|
|
- php7.3-xml
|
|
|
|
- php7.3-xmlrpc
|
|
|
|
- php7.3-zip
|
2016-04-05 08:44:23 +02:00
|
|
|
- postgresql
|
|
|
|
- python-psycopg2
|
|
|
|
|
|
|
|
- name: Configure PostgreSQL database
|
2016-04-06 09:49:25 +02:00
|
|
|
postgresql_db: name={{ owncloud_dbname }}
|
2016-04-05 08:44:23 +02:00
|
|
|
become: true
|
|
|
|
become_user: postgres
|
|
|
|
|
|
|
|
- name: Configure PostgreSQL user
|
|
|
|
postgresql_user: db={{ owncloud_dbname }} name={{ owncloud_dbuser }} password={{ owncloud_dbpass }} priv=ALL state=present
|
|
|
|
become: true
|
|
|
|
become_user: postgres
|
|
|
|
|
|
|
|
- name: Ensure certificates are available
|
2019-05-20 20:55:05 +02:00
|
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/{{ nextcloud_domain }}.key -out /etc/nginx/ssl/{{ nextcloud_domain }}.crt -days 730 -subj "/CN={{ nextcloud_domain }}" creates=/etc/nginx/ssl/{{ nextcloud_domain }}.crt
|
2016-04-05 08:44:23 +02:00
|
|
|
notify: Restart nginx
|
|
|
|
|
2019-05-20 20:55:05 +02:00
|
|
|
- name: Configure certificate manager for nextcloud
|
|
|
|
template: src=certs.j2 dest=/etc/acertmgr/{{ nextcloud_domain }}.conf
|
2019-02-23 23:54:24 +01:00
|
|
|
notify: Run acertmgr
|
2016-04-05 08:44:23 +02:00
|
|
|
|
|
|
|
- name: Create vhost directory
|
2019-05-20 20:55:05 +02:00
|
|
|
file: path=/var/www/nextcloud state=directory owner=www-data group=www-data
|
2016-04-05 08:44:23 +02:00
|
|
|
|
|
|
|
- name: Configure vhost
|
2019-05-20 20:55:05 +02:00
|
|
|
template: src=vhost.j2 dest=/etc/nginx/sites-available/nextcloud
|
2016-04-05 08:44:23 +02:00
|
|
|
notify: Restart nginx
|
|
|
|
|
2019-05-20 20:55:05 +02:00
|
|
|
# FIXME currently PHP handled out of ansible
|
|
|
|
#- name: Configure php7.0-fpm
|
|
|
|
# copy: src=www.conf dest=/etc/php/7.0/fpm/pool.d/www.conf
|
|
|
|
# notify: Restart php7.0-fpm
|
2017-07-01 16:33:15 +02:00
|
|
|
|
2019-05-20 20:55:05 +02:00
|
|
|
# FIXME currently PHP handled out of ansible
|
|
|
|
#- name: Configure php7.0 opcache
|
|
|
|
# copy: src=opcache.ini dest=/etc/php/7.0/mods-available/opcache.ini
|
|
|
|
# notify: Restart php7.0-fpm
|
2016-04-06 10:19:01 +02:00
|
|
|
|
2016-04-09 23:41:41 +02:00
|
|
|
- name: Enable vhost
|
2019-05-20 20:55:05 +02:00
|
|
|
file: src=/etc/nginx/sites-available/nextcloud dest=/etc/nginx/sites-enabled/nextcloud state=link
|
2016-04-05 08:44:23 +02:00
|
|
|
notify: Restart nginx
|
|
|
|
|
2019-05-20 20:55:05 +02:00
|
|
|
# FIXME currently PHP handled out of ansible
|
|
|
|
#- name: Start php7.0-fpm
|
|
|
|
# service: name=php7.0-fpm state=started enabled=yes
|
2016-04-05 08:44:23 +02:00
|
|
|
|
|
|
|
- name: Start PostgreSQL
|
|
|
|
service: name=postgresql state=started enabled=yes
|