Skip to content

Latest commit

 

History

History
78 lines (52 loc) · 2.35 KB

README.md

File metadata and controls

78 lines (52 loc) · 2.35 KB

Ansible Role: NextCloud

This role installs and configure NextCloud. Note that this particular role is depending on two others:

Once MariaDB and Nginx (from the two roles above) are up and running, this role performs the following actions:

  • Download the latest version of NextCloud
  • Create a system user and configure the database for the WebApp
  • Configure and enables a Website in Nginx to access NextCloud
  • Configure HTTPS and generate certificates with Let's Encrypt (if FQDN of the Website can be resolved)
  • If FQDN of the Website cannot be resolved, default SSL certificates are deployed

Requirements

No specific requirements for this role.

Role Variables

Multiple variables are necessary in order to properly configure NextCloud.

Here is how they can be configured:

nextcloud_user: nextcloud
nextcloud_password: MyPassword
nextcloud_db_password: MyPassword
nextcloud_hostname: nextcloud.mysite.com
certbot_email: [email protected]
db_server: "{{ inventory_hostname }}" (this equals *localhost*)
nextcloud_server: localhost

The variables above can be configured as group_vars or host_vars. As far as the credentials are concerned, these should be kept in a separate secret vars_file encrypted with ansible-vault.

Dependencies

This role depends on two other roles as stated above:

If you install this role via Ansible-Galaxy, the name of the roles are GSquad934.database and GSquad934.webserver.

However, if you have MariaDB and Nginx installed, this role should still works if you adapt it.

Example Playbook

Here is a simple example playbook to use this role:

hosts: nextcloud_srv
user: myuser
become: true
roles:
  - { role: nextcloud, tags: [ 'nextcloud' ] }

License

MIT / BSD

Author Information

My name is Gaétan. You can follow me on Twitter

Website: ICT Pour Tous