paulbsd-salt/states/sublimetext/init.sls

45 lines
1.3 KiB
Plaintext
Raw Normal View History

2020-07-10 00:58:55 +02:00
---
{%- from "sublimetext/map.jinja" import sublimetext with context %}
2021-07-03 16:02:23 +02:00
sublimetext-extract-archive:
2020-07-10 00:58:55 +02:00
archive.extracted:
- name: {{ sublimetext.install_dir }}
- source: {{ sublimetext.fetch_url }}/{{ sublimetext.archive_name }}
2020-09-12 17:41:35 +02:00
- skip_verify: true
2021-07-03 16:02:23 +02:00
- options: xj
- list_options: bzcat
2020-07-10 00:58:55 +02:00
- user: root
- group: root
- mode: 0755
2021-06-30 23:37:33 +02:00
- if_missing: {{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }}
2020-07-10 00:58:55 +02:00
2021-07-03 16:02:23 +02:00
sublimetext-licence-key:
2020-07-10 00:58:55 +02:00
file.managed:
2021-07-03 16:02:23 +02:00
- name: {{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }}/{{ sublimetext.keys_file }}
- source: salt://sublimetext/{{ sublimetext.keys_file }}
2020-07-10 00:58:55 +02:00
- template: jinja
- user: root
- group: root
- mode: 0644
2021-07-03 16:02:23 +02:00
- require:
- archive: sublimetext-extract-archive
2020-07-10 00:58:55 +02:00
2021-07-03 16:02:23 +02:00
sublimetext-desktop-entry:
2020-07-10 00:58:55 +02:00
file.managed:
- name: /usr/share/applications/sublime_text.desktop
- source: salt://sublimetext/sublime_text.desktop.j2
- template: jinja
- user: root
- group: root
- mode: 0644
2021-07-03 16:02:23 +02:00
- require:
- archive: sublimetext-extract-archive
2020-07-10 00:58:55 +02:00
2021-07-03 16:02:23 +02:00
sublimetext-symlink:
2020-07-10 00:58:55 +02:00
file.symlink:
- name: /usr/bin/sublime_text
2021-06-30 23:37:33 +02:00
- target: {{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }}/sublime_text
2020-07-10 00:58:55 +02:00
- user: root
- group: root
2021-07-03 16:02:23 +02:00
- mode: 0755
- require:
- archive: sublimetext-extract-archive