Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe2 committed Nov 2, 2024
1 parent da6e352 commit 09792c7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
26 changes: 22 additions & 4 deletions roles/firefox/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
# SPDX-License-Identifier: MIT

---
- name: Ensure /opt/firefox directory exists
become: true
become_user: root
ansible.builtin.file:
path: "/opt/firefox"
state: directory
mode: "750"
owner: "{{ username }}"
group: "{{ username }}"

- name: Ensure Application Desktop files directory exists
ansible.builtin.file:
path: "~/.local/share/applications/"
Expand All @@ -15,15 +25,19 @@
changed_when: false

- name: Ensure Firefox Developer directory exists
become: true
become_user: root
ansible.builtin.file:
path: "~/software/firefox-devedition/"
path: "/opt/firefox/firefox-devedition/"
state: directory
mode: "750"
owner: "{{ username }}"
group: "{{ username }}"

- name: Extract Firefox Developer
ansible.builtin.unarchive:
src: "/tmp/firefox-devedition-latest.tar.xz"
dest: "~/software/firefox-devedition/"
dest: "/opt/firefox/firefox-devedition/"
remote_src: yes
changed_when: false

Expand All @@ -39,15 +53,19 @@
changed_when: false

- name: Ensure Firefox Nightly directory exists
become: true
become_user: root
ansible.builtin.file:
path: "~/software/firefox-nightly/"
path: "/opt/firefox/firefox-nightly/"
state: directory
mode: "750"
owner: "{{ username }}"
group: "{{ username }}"

- name: Extract Firefox Firefox Nightly
ansible.builtin.unarchive:
src: "/tmp/firefox-nightly-latest.tar.xz"
dest: "~/software/firefox-nightly/"
dest: "/opt/firefox/firefox-nightly/"
remote_src: yes
changed_when: false

Expand Down
6 changes: 3 additions & 3 deletions roles/firefox/templates/firefox-developer.desktop.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Version=1.0
Name=Firefox Developer
GenericName=Web Browser
Comment=Browse the Web
Exec={{ ansible_facts['user_dir'] }}/software/firefox-devedition/firefox/firefox --name firefox-developer --private-window -P Developer %u
Icon={{ ansible_facts['user_dir'] }}/software/firefox-devedition/firefox/browser/chrome/icons/default/default128.png
Exec=/opt/firefox/firefox-devedition/firefox/firefox --name firefox-developer --private-window -P Developer %u
Icon=/opt/firefox/firefox-devedition/firefox/browser/chrome/icons/default/default128.png
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
Expand All @@ -19,5 +19,5 @@ Actions=new-private-window;

[Desktop Action new-private-window]
Name=New Private Window
Exec={{ ansible_facts['user_dir'] }}/software/firefox-devedition/firefox/firefox --name firefox-developer --private-window -P Developer %u
Exec=/opt/firefox/firefox-devedition/firefox/firefox --name firefox-developer --private-window -P Developer %u

6 changes: 3 additions & 3 deletions roles/firefox/templates/firefox-nightly.desktop.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Version=1.0
Name=Firefox Nightly
GenericName=Web Browser
Comment=Browse the Web
Exec={{ ansible_facts['user_dir'] }}/software/firefox-nightly/firefox/firefox --name firefox-nightly --private-window -P Nightly %u
Icon={{ ansible_facts['user_dir'] }}/software/firefox-nightly/firefox/browser/chrome/icons/default/default128.png
Exec=/opt/firefox/firefox-nightly/firefox/firefox --name firefox-nightly --private-window -P Nightly %u
Icon=/opt/firefox/firefox-nightly/firefox/browser/chrome/icons/default/default128.png
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
Expand All @@ -19,5 +19,5 @@ Actions=new-private-window;

[Desktop Action new-private-window]
Name=New Private Window
Exec={{ ansible_facts['user_dir'] }}/software/firefox-nightly/firefox/firefox --name firefox-nightly --private-window -P Nightly %u
Exec=/opt/firefox/firefox-nightly/firefox/firefox --name firefox-nightly --private-window -P Nightly %u

0 comments on commit 09792c7

Please sign in to comment.