2020-07-10 00:58:55 +02:00
|
|
|
---
|
|
|
|
{%- from "telegram/map.jinja" import telegram with context %}
|
|
|
|
telegram-archive-extract:
|
|
|
|
archive.extracted:
|
2021-03-22 19:11:32 +01:00
|
|
|
- name: {{ telegram.release_dir }}/telegram-{{ telegram.version }}
|
2020-07-10 00:58:55 +02:00
|
|
|
- source: {{ telegram.mirror }}/v{{ telegram.version }}/tsetup.{{ telegram.version }}.tar.xz
|
2020-09-12 17:41:35 +02:00
|
|
|
- skip_verify: true
|
2020-07-10 00:58:55 +02:00
|
|
|
- archive_format: tar
|
2020-09-12 17:41:35 +02:00
|
|
|
- enforce_toplevel: false
|
2020-07-10 00:58:55 +02:00
|
|
|
- options: --transform 's/Telegram/telegram/g' --transform 's/Updater/updater/g' --strip 1
|
2020-09-12 17:41:35 +02:00
|
|
|
- keep: true
|
2021-03-22 19:11:32 +01:00
|
|
|
- if_missing: {{ telegram.release_dir }}/telegram-{{ telegram.version }}/telegram
|
2020-07-10 00:58:55 +02:00
|
|
|
|
|
|
|
telegram-symlink:
|
|
|
|
file.symlink:
|
|
|
|
- name: {{ telegram.install_dir }}/telegram
|
2021-03-22 19:11:32 +01:00
|
|
|
- target: {{ telegram.release_dir }}/telegram-{{ telegram.version }}
|
2020-09-12 17:41:35 +02:00
|
|
|
- force: true
|
2020-07-10 00:58:55 +02:00
|
|
|
|
|
|
|
telegram-bin-symlink:
|
|
|
|
file.symlink:
|
|
|
|
- name: /usr/bin/telegram
|
2021-03-22 19:11:32 +01:00
|
|
|
- target: {{ telegram.install_dir }}/telegram/telegram
|
2020-09-12 17:41:35 +02:00
|
|
|
- force: true
|
2020-07-10 00:58:55 +02:00
|
|
|
|
2021-03-22 19:11:32 +01:00
|
|
|
telegram-icon:
|
|
|
|
file.managed:
|
|
|
|
- name: /usr/share/icons/telegram.png
|
|
|
|
- source: salt://telegram/telegram.png
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: 644
|
|
|
|
|
2020-07-10 00:58:55 +02:00
|
|
|
telegram-shortcut:
|
|
|
|
file.managed:
|
|
|
|
- name: /usr/share/applications/telegram.desktop
|
|
|
|
- source: salt://telegram/telegram.desktop.j2
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: 644
|
|
|
|
- template: jinja
|