Using Ansible#
The upgrade procedure with Ansible Galaxy is strongly suggested when you are upgrading from the previous version, which will take care of all the tasks required. Before starting the procedure, make sure that you satisfy the Requirements & Preliminaries.
This procedure should work even if you had installed Carbonio manually.
Requirements & Preliminaries#
Before attempting to upgrade Carbonio, make sure that the Ansible playbook is updated. The playbook is indeed version-dependant: to upgrade Carbonio to version 24.9.1, you need to have the same main version of the playbook. For example, to upgrade to version 24.9.0, the playbook version must be 24.9.X, regardless of the last number. To install the latest version of the playbook, execute the following command.
$ ansible-galaxy collection install -U zxbot.carbonio_upgrade
To verify the currently installed version of the playbook, execute command
$ ansible-galaxy collection list zxbot.carbonio_upgrade
The output will be similar to:
# /home/ansible/.ansible/collections/ansible_collections
Collection Version
---------------------- -------
zxbot.carbonio_upgrade 24.9.1
This version of the playbook can be used to install the most recent version in the 24.9 series of Carbonio (e.g., 24.9.0 or 24.9.1).
The Ansible playbook will update all the packages installed on he system, from any active configured repository, not only Carbonio's. To avoid this behaviour, comment out any repositories from which you do not want to upgrade packages.
This upgrade procedure requires that PostgreSQL 16 be installed. If you did not yet upgrade it, please refer to Section PostgreSQL 16 Upgrade.
The upgrade procedure is otherwise the same, regardless the underlying supported operating system.
Upgrade Steps#
Please also check Section Known Issues (Current Release) for known issues impacting the upgrade process.
This method works if you have a working Ansible installation. Make sure you read the Requirements & Preliminaries Section before starting the upgrade, then access Ansible’s Control Node (see Section Ansible Setup) and issue the following command.
$ ansible-galaxy collection install zxbot.carbonio_upgrade
Hint
This command can be run by any user, preferably by the one who installed the playbook.
The above command will install the necessary infrastructure to use for
the Carbonio upgrade. Next, you need to move to the directory where
you have the inventory file of your installation (it is called
data
in the Ansible Setup Section), then issue the
command below. Before running it, please note that:
-
The command will automatically remove all unused dependencies installed on your system. To prevent this behaviour, add to the command line the option --extra-vars skip_autoremove=1
Packages that were manually installed and are no longer used will not be removed from your system: you need to remove them manually
$ ansible-playbook zxbot.carbonio_upgrade.carbonio_upgrade \
-u root -i carbonio-inventory
In case the procedure does not complete successfully, you can run the command a second time, during which the tasks that successfully run will be skipped. For details, refer to Section Troubleshooting Ansible Installation.