2020-08-02 16:08:29 +00:00
|
|
|
copy the install addon script:
|
|
|
|
file.managed:
|
|
|
|
- name: {{ salt['user.info']( pillar['username'] ).home }}/bin/install_firefox_addon
|
|
|
|
- source: salt://files/install_firefox_addon
|
|
|
|
- user: {{ pillar['username'] }}
|
|
|
|
- group: users
|
|
|
|
- mode: "0755"
|
|
|
|
|
2020-08-02 15:25:30 +00:00
|
|
|
{% for name, args in pillar['firefox']['addons'].items() %}
|
|
|
|
Downloading {{ name }} Firefox xpi:
|
|
|
|
cmd.run:
|
2020-08-02 16:08:29 +00:00
|
|
|
- name: {{ salt['user.info']( pillar['username'] ).home }}/bin/install_firefox_addon {{ args['name'] }} {{ args['url'] }}
|
2020-08-02 15:25:30 +00:00
|
|
|
- unless: grep -oP '(?<=\},\"name\":\"){{ name }}' {{ salt['user.info']( pillar['username'] ).home }}/.mozilla/firefox/*.default*/addons.json
|
|
|
|
- user: {{ pillar['username'] }}
|
|
|
|
{% endfor %}
|