1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/nextcloud/tasks/install.yml

85 lines
3.5 KiB
YAML
Raw Normal View History

2020-02-16 03:49:27 +00:00
# https://docs.nextcloud.com/server/18/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
- name: Install ffmpeg + libxml2 + 21 php packages
2019-07-05 00:43:15 +00:00
package:
name:
2020-02-16 03:49:27 +00:00
#- dnsutils # NOT REQUESTED by Nextcloud
- ffmpeg # Optional (for preview generation)
- libxml2 # php-libxml requires libxml2 >= 2.7.0
#- libapache2-mod-php # 2020-02-15: NO LONGER NEEDED?
- php-bz2 # Optional (for extraction of apps)
#- php-cli # NOT REQUESTED by Nextcloud
#- php-common # NOT REQUESTED by Nextcloud
- php-ctype
- php-curl
- php-dom
- php-exif # Optional (for image rotation in pictures app)
- php-fileinfo # Optional (enhances file analysis performance)
- php-fpm # Optional (FastCGI Process Manager)
- php-gd
- php-gmp # Optional (for SFTP storage)
- php-iconv
- php-imagick # Optional (for preview generation)
- php-intl # Optional (increases language translation performance and fixes sorting of non-ASCII characters)
- php-json
#- php-libxml # NOT INSTALLABLE: ENABLED BY DEFAULT (https://www.php.net/manual/en/libxml.installation.php)
2019-07-05 00:43:15 +00:00
- php-mbstring
2020-02-16 03:49:27 +00:00
- php-mysql
#- php-openssl # NOT INSTALLABLE: ENABLED BY DEFAULT?
#- php-pdo_mysql # NOT INSTALLABLE: php-mysql handles this on all OS's?
- php-posix
#- php-redis # @m-anish future work?
#- php-session # NOT INSTALLABLE: ENABLED BY DEFAULT?
- php-simplexml
- php-smbclient # Optional (SMB/CIFS integration
#- php-xml # NOT REQUESTED by Nextcloud
- php-xmlreader
- php-xmlwriter
- php-zip
2020-02-16 03:49:27 +00:00
#- php-zlib # NOT INSTALLABLE: ENABLED BY DEFAULT?
2019-07-05 00:43:15 +00:00
state: present
2020-02-16 03:49:27 +00:00
- name: Create dir {{ nextcloud_prefix }}{{ nextcloud_url }}
2019-07-05 00:43:15 +00:00
file:
state: directory
2020-02-16 03:49:27 +00:00
path: "{{ nextcloud_prefix }}{{ nextcloud_url }}" # /library/www/html + /nextcloud
2019-07-05 00:43:15 +00:00
2020-02-16 03:49:27 +00:00
- name: Unarchive {{ nextcloud_dl_url }} to {{ nextcloud_prefix }}{{ nextcloud_url }} ({{ apache_user }}:{{ apache_user }})
unarchive:
remote_src: yes
src: "{{ nextcloud_dl_url }}"
dest: "{{ nextcloud_prefix }}{{ nextcloud_url }}" # /library/www/html + /nextcloud
owner: "{{ apache_user }}" # apache2 on debuntu
2019-07-05 00:43:15 +00:00
group: "{{ apache_user }}"
2020-02-16 03:49:27 +00:00
extra_opts: --strip-components=1
when: internet_available
# - name: "NOT USED FOR NOW: Create data dir {{ nextcloud_data_dir }}"
# file:
# state: directory
# path: "{{ nextcloud_data_dir }}" # /library/nextcloud/data NOT USED BY NEXTCLOUD AS OF 2020-02-15 ...Nextcloud defaults to /opt/nextcloud/data OR /library/www/html/nextcloud/data ??
# owner: "{{ apache_user }}"
# group: "{{ apache_user }}"
# mode: '0750'
- name: Provision Nextcloud's MySQL DB, run Nextcloud's install wizard, etc
include_tasks: setup.yml
2019-07-05 00:43:15 +00:00
2020-02-16 03:49:27 +00:00
- name: Install /etc/{{ apache_conf_dir }}/nextcloud.conf from template, for http://box/nextcloud
template:
src: nextcloud.conf.j2
2020-02-16 03:49:27 +00:00
dest: "/etc/{{ apache_conf_dir }}/nextcloud.conf" # apache2/sites-available on debuntu
2020-02-16 06:16:23 +00:00
when: apache_install | bool
2020-01-29 14:21:00 +00:00
2020-01-30 09:00:00 +00:00
# RECORD Nextcloud AS INSTALLED
- name: "Set 'nextcloud_installed: True'"
set_fact:
nextcloud_installed: True
- name: "Add 'nextcloud_installed: True' to {{ iiab_state_file }}"
2019-09-09 17:14:13 +00:00
lineinfile:
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
2019-09-09 17:14:13 +00:00
regexp: '^nextcloud_installed'
2019-10-07 17:11:21 +00:00
line: 'nextcloud_installed: True'