paulbsd-salt/states/firefox/install.sls
Paul Lecuq a3b02771a4
All checks were successful
continuous-integration/drone/push Build is passing
created templates folder on each state
2023-03-11 10:08:26 +01:00

54 lines
1.5 KiB
Plaintext

---
{%- from "firefox/map.jinja" import firefox with context %}
firefox-archive-extract:
archive.extracted:
- name: {{ firefox.release_dir }}/firefox-{{ firefox.version }}
- source: {{ firefox.mirror }}/{{ firefox.version }}/{{ firefox.platform }}/{{ firefox.lang }}/firefox-{{ firefox.version }}.tar.bz2
- skip_verify: true
- archive_format: tar
- enforce_toplevel: false
- options: --strip 1
- keep: true
- if_missing: {{ firefox.release_dir }}/firefox-{{ firefox.version }}/firefox
firefox-symlink:
file.symlink:
- name: {{ firefox.install_dir }}/firefox
- target: {{ firefox.release_dir }}/firefox-{{ firefox.version }}
- force: true
- require:
- archive: firefox-archive-extract
firefox-bin-symlink:
file.symlink:
- name: /usr/bin/firefox
- target: {{ firefox.install_dir }}/firefox/firefox
- force: true
- require:
- archive: firefox-archive-extract
firefox-shortcut:
file.managed:
- name: /usr/share/applications/firefox.desktop
- source: salt://firefox/templates/firefox.desktop.j2
- user: root
- group: root
- mode: 644
- template: jinja
- require:
- archive: firefox-archive-extract
firefox-icon:
file.managed:
- name: /usr/share/icons/firefox.png
- source: /usr/local/apps/firefox/browser/chrome/icons/default/default128.png
- user: root
- group: root
- mode: 644
firefox-cleanup:
software.cleanup:
- name: firefox
- path: {{ firefox.release_dir }}
- version: "{{ firefox.version }}"