blob: d96e3301b2bf9003cd0665d881c3c1a52a2f1a7e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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 }}"
|