robertdebock.nextcloud
Ansible Role Nextcloud
This is a guide to install and set up Nextcloud on your computer.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
The example below is taken from molecule/default/converge.yml
and is tested whenever changes are made.
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.nextcloud
nextcloud_apps:
- name: richdocumentscode
nextcloud_settings:
- name: max_chunk_size
section: files
value: 0
Before running the playbook, prepare the machine. This is done with molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
- role: robertdebock.core_dependencies
- role: robertdebock.cron
- role: robertdebock.buildtools
- role: robertdebock.epel
- role: robertdebock.python_pip
- role: robertdebock.openssl
openssl_items:
- name: apache-httpd
common_name: "{{ ansible_fqdn }}"
- role: robertdebock.selinux
- role: robertdebock.httpd
- role: robertdebock.redis
- name: Continue prepare with facts
hosts: all
become: true
gather_facts: false
pre_tasks:
- name: Include remi
ansible.builtin.include_role:
name: robertdebock.remi
when:
- ansible_distribution != "Fedora"
vars:
remi_enabled_repositories:
- php74
roles:
- role: robertdebock.php
php_memory_limit: 512M
php_upload_max_filesize: 8G
php_post_max_size: 8G
- role: robertdebock.php_fpm
- role: robertdebock.mysql
mysql_databases:
- name: nextcloud
encoding: utf8
collation: utf8_bin
mysql_users:
- name: nextcloud
password: N3x4Cl0ud
priv: "nextcloud.*:ALL"
For a complete guide on using these roles, see a full explanation and example.
Role Variables
Default variable values are found in defaults/main.yml
:
---
# Default settings for Nextcloud
# Version of Nextcloud to install
nextcloud_version: "25.0.4"
# The domain for this server, like "localhost" or "nextcloud.example.com"
nextcloud_domain_url: "{{ ansible_default_ipv4.address | default(ansible_all_ipv4_addresses[0]) }}"
# Database connection details
nextcloud_database_name: nextcloud
nextcloud_database_user: nextcloud
nextcloud_database_pass: N3x4Cl0ud
nextcloud_database_host: "127.0.0.1"
nextcloud_admin_user: admin
nextcloud_admin_pass: N3x4Cl0ud
# Option to install applications in NextCloud
# nextcloud_apps:
# - name: richdocumentscode
# Settings for Nextcloud
# nextcloud_settings:
# - name: max_chunk_size
# section: files
# value: 0
# Optionally set a installation location for Nextcloud
nextcloud_destination: "{{ _nextcloud_destination[ansible_distribution] | default(_nextcloud_destination['default']) }}"
Requirements
- You need the pip packages listed in requirements.txt.
State of Used Roles
Many roles are used to prepare the system. You can choose to prepare yours in another way.
Context
This role is part of a group of related roles. You can check out the documentation of these roles for more information.
Related Roles:
Compatibility
This role has been tested on these container images:
container | tags |
---|---|
EL | 9 |
Ubuntu | jammy |
You need at least Ansible version 2.12 to run this. Tests have been done on:
- The previous version
- The current version
- The development version
If you encounter problems, please report them on GitHub.
License
This project is licensed under the Apache-2.0.
Author Information
Created by robertdebock.
If you find this useful, consider sponsoring me.
ansible-galaxy install robertdebock.nextcloud