diff options
Diffstat (limited to 'roles/obs/tasks/firefox.yml')
-rw-r--r-- | roles/obs/tasks/firefox.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/roles/obs/tasks/firefox.yml b/roles/obs/tasks/firefox.yml new file mode 100644 index 0000000..d96e330 --- /dev/null +++ b/roles/obs/tasks/firefox.yml @@ -0,0 +1,36 @@ +- name: Add Firefox + apt: + name: firefox-esr + when: ansible_distribution == "Debian" +- name: Add Firefox + apt: + name: firefox-esr + when: ansible_distribution == "Ubuntu" +- name: Check if Firefox profiles exist + lineinfile: + dest: "{{ emacsconf_home }}/.mozilla/firefox/profiles.ini" + line: "Name={{ emacsconf_id }}-{{ item.id }}" + check_mode: yes + register: find_profiles + failed_when: no + loop: "{{ emacsconf_tracks }}" +- name: Fail if there are missing profiles + fail: + msg: "Please use firefox -no-remote -CreateProfile {{ emacsconf_id }}-{{ item.item.id }} in an X session to create the profiles." + when: item.changed + loop: "{{ find_profiles.results }}" +- name: Create scripts for tracks + template: + src: firefox-track + dest: "{{ emacsconf_home }}/bin/{{ item.id }}/-firefox" + owner: "{{ emacsconf_user }}" + group: "{{ emacsconf_group }}" + mode: 0775 + loop: "{{ emacsconf_tracks }}" + + # - debug: +# var: find_profiles.results +# - name: Create profile if it doesn't exist +# shell: xinit firefox -no-remote -CreateProfile "{{ emacsconf_id }}-{{ item.item.id }}" +# when: item.changed +# loop: "{{ find_profiles.results }}" |