Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

40 linhas
1.2KB

  1. ---
  2. - name: check for config file
  3. stat:
  4. path: "{{nextcloud_directory}}/config/config.php"
  5. register: _nextcloud_config_file
  6. - name: stop apache2
  7. service:
  8. name: apache2
  9. state: stopped
  10. when: not _nextcloud_config_file.stat.isreg is defined
  11. - name: nextcloud initial config file
  12. template:
  13. src: config.php.j2
  14. dest: "{{nextcloud_directory}}/config/config.php"
  15. owner: www-data
  16. group: www-data
  17. when: not _nextcloud_config_file.stat.isreg is defined
  18. - name: install nextcloud
  19. command:
  20. php occ maintenance:install
  21. --admin-user "{{ nextcloud_admin_user }}"
  22. --admin-pass "{{ nextcloud_admin_pass }}"
  23. --database "{{ _nextcloud_database_type_cli[nextcloud_database_type] }}"
  24. --database-host "{{ (nextcloud_database_host == inventory_hostname)
  25. | ternary(_nextcloud_database_localhost_cli[nextcloud_database_type],nextcloud_database_host) }}"
  26. --database-name "{{ nextcloud_database_name }}"
  27. --database-user "{{ nextcloud_database_user }}"
  28. --database-pass "{{ nextcloud_database_pass }}"
  29. --data-dir "{{ nextcloud_data_directory }}"
  30. args:
  31. chdir: "{{nextcloud_directory}}"
  32. become: true
  33. become_user: www-data
  34. become_method: sudo
  35. when: not _nextcloud_config_file.stat.isreg is defined