Giter Club home page Giter Club logo

upgrade-nextcloud's Introduction

Build Status

upgrade-nextcloud

This role upgrades an Nextcloud instance on a debian/Ubuntu server.

The role's main actions are:

  • Version comparison
  • Nextcloud's instance backup. (db, rootDir, dataDir)
  • Upgrade using nextcloud's CLI
  • Strengthened files permissions and ownership following Nextcloud recommendations.

based on https://docs.nextcloud.com/server/10/admin_manual/maintenance/manual_upgrade.html

Requirements

Ansible version

Ansible 2.0

Root access

This role requires root access, so either configure it in your inventory files, run it in a playbook with a global become: yes or invoke the role in your playbook like:

playbook.yml:

- hosts: dnsserver
  roles:
    - role: aalaesar.upgrade-nextcloud
      become: yes

Role Variables

Role's variables (and their default value):

Configuration

Source location will be calculated following channel, version and branch values.

nextcloud_channel: "releases"

Defines the version channel you want to use for the upgrade. Available : releases | prereleases | daily | latest

nextcloud_version: 10.0.2

Specify the version name for channels releases, prereleases and daily. (it may not be numbers at all)

nextcloud_branch: "stable"

Specify the branch name for daily & latest channel

nextcloud_repository: "https://download.nextcloud.com/server"

The Nextcloud's official repository. You may change it if you have the sources somewhere else.

Main configuration

nextcloud_websrv: "apache"

The http server used by nextcloud. Available values are: apache or nginx.

nextcloud_webroot: "/opt/nextcloud"

The Nextcloud root directory.

nextcloud_data_dir: "/var/ncdata"

The Nextcloud data directory location. It is important to specify its location if it is located is the same directory as Nextcloud

nextcloud_backup_dir: "{{nextcloud_webroot}}_bkp"

Directory where the nextcloud backup will be stored

nextcloud_webroot_old: "{{nextcloud_webroot}}_old"

Directory where the previous nextcloud instance will be stored

Database configuration

nextcloud_db_backup: true

Whenever the role should backup the instance's database on the same host.

nextcloud_db_host: "127.0.0.1"

The database server's ip/hostname where Nextcloud's database is located.

nextcloud_db_backend: "mysql"

Database type used by nextcloud.

Supported values are:

  • mysql
  • mariadb
  • pgsql (PostgreSQL)
nextcloud_db_name: "nextcloud"

The Nextcloud instance's database name.

nextcloud_db_admin: "ncadmin"

The Nextcloud instance's database user's login

nextcloud_db_pwd: false

The Nextcloud instance's database user's password --required!!--

OPTIONS

nextcloud_restore_3rdparty_apps: true

will copy the installed/downloaded apps in your new instance

nextcloud_db_backup: true

Specify if the database backup is required during the upgrade

nextcloud_upgrade_clean: true

Should the upgrade process remove the old Nextcloud instance files once upgraded successfully ?

System configuration

nextcloud_websrv_user: "www-data"

system user for the http server

nextcloud_websrv_group: "www-data"

system group for the http server

Dependencies

none

Example Playbook

--TODO-- License

BSD

upgrade-nextcloud's People

Contributors

aalaesar avatar noplanman avatar glandos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.