From 9ebffba965846e974c6d93cea7d87e7c9944e319 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 29 Jan 2020 09:21:00 -0500 Subject: [PATCH] Update nextcloud/tasks/install.yml --- roles/nextcloud/tasks/install.yml | 73 +++++++++++++++++-------------- 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 188a343ef..30c7f9897 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -105,23 +105,23 @@ # NOT NEC TO TEST FOR is_raspbian_8 OR is_raspbian_9 AS /opt/iiab/iiab/vars/.yml # DEFINES THESE AS SUBSETS OF is_debian_8 OR is_debian_9 (FOR NOW!) -# we need to install the rpm in order to get the dependencies -# but we only need to do this the first time - -- name: Install 7 php packages (redhat) - package: - name: - - php - - php-gd - - php-json - - php-mysql - - php-curl - - php-intl - - php-mcrypt - # CentOS does not have a package for php-imagick - #- php-imagick - state: present - when: is_redhat | bool +## we need to install the rpm in order to get the dependencies +## but we only need to do this the first time +# +#- name: Install 7 php packages (redhat) +# package: +# name: +# - php +# - php-gd +# - php-json +# - php-mysql +# - php-curl +# - php-intl +# - php-mcrypt +# # CentOS does not have a package for php-imagick +# #- php-imagick +# state: present +# when: is_redhat | bool - name: Unarchive {{ nextcloud_src_file_old }} to permanent location {{ nextcloud_prefix }}/nextcloud on older OS's lacking PHP 7.1+ # i.e. unpack nextcloud_latest-15.tar.bz2 to /opt/nextcloud unarchive: @@ -139,32 +139,32 @@ when: php_new | bool #when: nextcloud_force_install and not (is_debian_9 or is_raspbian_9 or is_ubuntu_16) -- name: Create dir /etc/nextcloud (centos) for a subsequent config dir that's symlinked to /etc/nextcloud ? - file: - path: /etc/nextcloud - state: directory - when: is_centos | bool - -- name: Install {{ nextcloud_prefix }}/nextcloud/config/autoconfig.php from template (centos) - template: - src: autoconfig.php.j2 - dest: "{{ nextcloud_prefix }}/nextcloud/config/autoconfig.php" - owner: "{{ apache_user }}" - group: "{{ apache_user }}" - mode: '0640' - when: is_centos | bool +#- name: Create dir /etc/nextcloud (centos) for a subsequent config dir that's symlinked to /etc/nextcloud ? +# file: +# path: /etc/nextcloud +# state: directory +# when: is_centos | bool +# +#- name: Install {{ nextcloud_prefix }}/nextcloud/config/autoconfig.php from template (centos) +# template: +# src: autoconfig.php.j2 +# dest: "{{ nextcloud_prefix }}/nextcloud/config/autoconfig.php" +# owner: "{{ apache_user }}" +# group: "{{ apache_user }}" +# mode: '0640' +# when: is_centos | bool - name: chown -R {{ apache_user }}:{{ apache_user }} {{ nextcloud_prefix }}/nextcloud file: - path: "{{ nextcloud_prefix }}/nextcloud" + path: "{{ nextcloud_prefix }}/nextcloud" # /opt owner: "{{ apache_user }}" group: "{{ apache_user }}" recurse: yes state: directory -- name: Create data directory {{ nextcloud_data_dir }} # /opt/nextcloud/data +- name: Create data directory {{ nextcloud_data_dir }} file: - path: "{{ nextcloud_data_dir }}" + path: "{{ nextcloud_data_dir }}" # /opt/nextcloud/data owner: "{{ apache_user }}" group: "{{ apache_user }}" mode: '0750' @@ -175,6 +175,11 @@ src: nextcloud.conf.j2 dest: "/etc/{{ apache_config_dir }}/nextcloud.conf" + +- name: Provision Nextcloud's MySQL DB, run Nextcloud's install wizard etc + include_tasks: setup.yml + + - name: "Add 'nextcloud_installed: True' to {{ iiab_state_file }}" lineinfile: dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml