- name: Does /opt/nextcloud/version.php exist? stat: path: "{{ nextcloud_prefix }}/nextcloud/version.php" register: nextcloud_page - name: FORCE INSTALL OR REINSTALL OR UPGRADE IF {{ nextcloud_prefix }}/nextcloud/version.php DOESN'T EXIST #set_fact: # nextcloud_force_install: True include_tasks: install.yml when: nextcloud_install and (not nextcloud_installed is defined or not nextcloud_page.stat.exists) - name: Provision NextCloud's Mysql DB include_tasks: prov-db.yml when: nextcloud_install and not installing - name: Enables or disable Nextcloud! include_tasks: enable_or_disable.yml when: nextcloud_install or nextcloud_installed is defined