You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
928B

  1. ---
  2. - name: check for config file
  3. stat:
  4. path: /var/www/nextcloud/config/config.php
  5. register: _nextcloud_config_file
  6. - name: nextcloud initial config file
  7. template:
  8. src: config.php.j2
  9. dest: /var/www/nextcloud/config/config.php
  10. owner: www-data
  11. group: www-data
  12. when: not _nextcloud_config_file.stat.isreg is defined
  13. - name: install nextcloud
  14. command:
  15. php occ maintenance:install
  16. --admin-user "{{ nextcloud_admin_username }}"
  17. --admin-pass "{{ nextcloud_admin_password }}"
  18. --database "{{ nextcloud_database_type }}"
  19. --database-host "{{ nextcloud_database_host }}"
  20. --database-name "{{ nextcloud_database_name }}"
  21. --database-user "{{ nextcloud_database_user }}"
  22. --database-pass "{{ nextcloud_database_password }}"
  23. args:
  24. chdir: /var/www/nextcloud
  25. become: true
  26. become_user: www-data
  27. become_method: sudo
  28. when: not _nextcloud_config_file.stat.isreg is defined