2017-05-29 22:02:55 +00:00
|
|
|
# This should go in computed_network.yml, but here for now
|
|
|
|
|
|
|
|
- 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
|
|
|
|
template: src=nextcloud.conf.j2
|
|
|
|
dest=/etc/{{ apache_config_dir }}/nextcloud.conf
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
2017-05-30 02:37:12 +00:00
|
|
|
when: nextcloud_enabled
|
|
|
|
|
2017-05-29 22:02:55 +00:00
|
|
|
- name: Enable nextcloud
|
|
|
|
file: path=/etc/apache2/sites-enabled/nextcloud.conf
|
|
|
|
src=/etc/apache2/sites-available/nextcloud.conf
|
|
|
|
state=link
|
2017-05-30 02:37:12 +00:00
|
|
|
when: nextcloud_enabled and is_debuntu
|
2017-05-29 22:02:55 +00:00
|
|
|
|
2017-05-30 03:04:04 +00:00
|
|
|
- name: For redhat, remove the config file
|
|
|
|
file: path=/etc/{{ apache_config_dir }}/nextcloud.conf
|
2017-05-29 22:02:55 +00:00
|
|
|
state=absent
|
2017-05-30 03:04:04 +00:00
|
|
|
when: not nextcloud_enabled and is_redhat
|
2017-05-29 22:02:55 +00:00
|
|
|
|
|
|
|
- name: Restart apache, so it picks up the new aliases
|
|
|
|
service: name={{ apache_service }} state=restarted
|
|
|
|
|
|
|
|
- name: Run nextcloud initial install wizard
|
2017-06-09 23:25:56 +00:00
|
|
|
shell: curl http://{{ iiab_hostname }}{{ nextcloud_url }}/index.php
|
2017-06-05 18:01:24 +00:00
|
|
|
when: nextcloud_enabled
|
2017-05-29 22:02:55 +00:00
|
|
|
|
|
|
|
- name: Remove Rewrite URL
|
|
|
|
lineinfile: regexp='overwrite.cli.url'
|
|
|
|
state=absent
|
|
|
|
dest="{{ nextcloud_prefix }}/nextcloud/config/config.php"
|