diff --git a/roles/nextcloud/tasks/nextcloud_enabled.yml b/roles/nextcloud/tasks/nextcloud_enabled.yml index cc9c26b2c..e78c4dfc5 100644 --- a/roles/nextcloud/tasks/nextcloud_enabled.yml +++ b/roles/nextcloud/tasks/nextcloud_enabled.yml @@ -1,10 +1,10 @@ # This should go in computed_network.yml, but here for now -- name: Compute nextcloud listen ip addr for nextcloud.conf +- name: Compute Nextcloud listen ip addr for nextcloud.conf set_fact: nextcloud_required_ip: "{{ ansible_default_ipv4.network }}/{{ ansible_default_ipv4.netmask }}" when: ansible_default_ipv4.network is defined -- name: Enable nextcloud by copying template to httpd config +- name: Enable Nextcloud by copying template to httpd config template: src=nextcloud.conf.j2 dest=/etc/{{ apache_config_dir }}/nextcloud.conf owner=root @@ -12,7 +12,7 @@ mode=0644 when: nextcloud_enabled -- name: Enable nextcloud +- name: Enable Nextcloud file: path=/etc/apache2/sites-enabled/nextcloud.conf src=/etc/apache2/sites-available/nextcloud.conf state=link @@ -23,18 +23,18 @@ state=absent when: not nextcloud_enabled and is_redhat -- name: Restart apache, so it picks up the new aliases +- name: Restart Apache, so it picks up the new aliases service: name={{ apache_service }} state=restarted # the install wizard does not succeed if already installed -- name: Determine if nextcloud is installed +- name: Determine if Nextcloud is installed shell: > sudo -u {{ apache_user }} php '{{ nextcloud_prefix }}/nextcloud/occ' status | gawk '/installed:/ { print $3 }' register: returned -- name: Run nextcloud initial install wizard +- name: Run Nextcloud initial install wizard shell: > cd {{ nextcloud_prefix }}/nextcloud; sudo -u {{ apache_user }} php occ maintenance:install @@ -46,13 +46,13 @@ --admin-pass "{{ nextcloud_admin_password }}" when: nextcloud_enabled and returned.stdout == "false" -- name: allow access from all hosts and ips +- name: Allow access from all hosts and ips command: php '{{ nextcloud_prefix }}/nextcloud/occ' config:system:set trusted_domains 1 --value=* become: true become_user: "{{ apache_user }}" when: nextcloud_enabled and returned.stdout == "false" -- name: Determine if nextcloud user exists already +- name: Determine if Nextcloud user exists already shell: > sudo -u {{ apache_user }} php '{{ nextcloud_prefix }}/nextcloud/occ' user:list | @@ -60,7 +60,7 @@ register: returned_count # nextcloud wants to make users rather than just mysql users and not done -- name: create the default user +- name: Create the default user shell: > su -s /bin/sh {{ apache_user }} -c 'OC_PASS={{ nextcloud_user_password }};