From 6a8e53760dc114f9b5bbf6e073f60b83f0712e22 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Sep 2024 22:43:32 +0200 Subject: [PATCH] feat(repo): use a PPA for the latest version of nextcloud-desktop --- nextcloud/client/init.sls | 1 + nextcloud/client/repo.sls | 15 +++++++++++++++ pillar.example | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 nextcloud/client/repo.sls diff --git a/nextcloud/client/init.sls b/nextcloud/client/init.sls index d3e5518..f07440f 100644 --- a/nextcloud/client/init.sls +++ b/nextcloud/client/init.sls @@ -2,4 +2,5 @@ # vim: ft=sls include: + - .repo - .install diff --git a/nextcloud/client/repo.sls b/nextcloud/client/repo.sls new file mode 100644 index 0000000..9555b4d --- /dev/null +++ b/nextcloud/client/repo.sls @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# vim: ft=sls + +{#- Get the `tplroot` from `tpldir` #} +{%- set tplroot = tpldir.split('/')[0] %} +{%- set sls_package_install = tplroot ~ '.package.install' %} +{%- from tplroot ~ "/map.jinja" import nextcloud with context %} + +{%- if grains["os"] == "Ubuntu" and nextcloud.get("use_ppa", True) %} +nextcloud--client--repo--ppa: + pkgrepo.managed: + - ppa: nextcloud-devs/client + - require_in: + - pkg: nextcloud-client-install-pkg-installed +{%- endif %} diff --git a/pillar.example b/pillar.example index 5b79994..d5d49d8 100644 --- a/pillar.example +++ b/pillar.example @@ -24,6 +24,8 @@ nextcloud: name: latest-19 pkg: name: nextcloud + # Whether to use the official PPA in the case of Ubuntu; default: True + use_ppa: True # The defaults from 'occ maintenance:install' database: