updated nextcloud_desktop state

This commit is contained in:
Paul 2020-09-12 17:12:40 +02:00
parent 7b24880b30
commit aee853fec7
3 changed files with 25 additions and 8 deletions

View File

@ -0,0 +1,5 @@
---
nextcloud_desktop:
url: https://download.nextcloud.com/desktop/releases/Linux
dest_path: /usr/bin/nextcloud
version: 3.0.1

View File

@ -1,16 +1,23 @@
--- ---
{%- if not salt['file.file_exists']( salt['pillar.get']('nextcloud_desktop:dest_path') ) or not salt['file.check_hash']( salt['pillar.get']('nextcloud_desktop:dest_path'), salt['pillar.get']('nextcloud_desktop:file_sha256sum') ) %} {%- from "nextcloud_desktop/map.jinja" import nextcloud_desktop with context %}
nextcloud-install:
nextcloud-appimage:
file.managed: file.managed:
- name: {{ salt['pillar.get']('nextcloud_desktop:dest_path') }} - name: {{ nextcloud_desktop.dest_path }}
- source: {{ salt['pillar.get']('nextcloud_desktop:url') }}/Nextcloud-{{ salt['pillar.get']('nextcloud_desktop:version') }}-x86_64.AppImage - source: {{ nextcloud_desktop.url }}/Nextcloud-{{ nextcloud_desktop.version }}-x86_64.AppImage
- source_hash: sha256={{ salt['pillar.get']('nextcloud_desktop:file_sha256sum') }} - skip_verify: True
- user: root - user: root
- group: root - group: root
- mode: 755 - mode: 755
{%- endif %} - if_missing: {{ nextcloud_desktop.dest_path }}-{{ netxcloud.version }}
nextcloud-icon: nextcloud-install-link:
file.symlink:
- name: {{ nextcloud_desktop.dest_path }}
- target: {{ nextcloud_desktop.dest_path }}/{{ nextcloud.version }}
- force: True
nextcloud-desktop-icon:
file.managed: file.managed:
- name: /usr/share/icons/nextcloud.png - name: /usr/share/icons/nextcloud.png
- source: salt://nextcloud_desktop/nextcloud.png - source: salt://nextcloud_desktop/nextcloud.png
@ -18,7 +25,7 @@ nextcloud-icon:
- group: root - group: root
- mode: 644 - mode: 644
nextcloud-desktop-entry: nextcloud-desktop-icon-entry:
file.managed: file.managed:
- name: /usr/share/applications/nextcloud.desktop - name: /usr/share/applications/nextcloud.desktop
- source: salt://nextcloud_desktop/nextcloud.desktop - source: salt://nextcloud_desktop/nextcloud.desktop

View File

@ -0,0 +1,5 @@
{%- import_yaml "nextcloud_desktop/defaults.yaml" as default_settings -%}
{%- set defaults = salt['grains.filter_by'](default_settings, default='nextcloud_desktop') -%}
{%- set nextcloud_desktop = salt['pillar.get']('nextcloud_desktop', default=defaults, merge=True) -%}