added firefox state and pillar
This commit is contained in:
parent
4ab12077ac
commit
b00a4f7a6f
8
salt/pillars/firefox.sls
Normal file
8
salt/pillars/firefox.sls
Normal file
@ -0,0 +1,8 @@
|
||||
firefox:
|
||||
addons:
|
||||
FoxyProxy Standard:
|
||||
url: https://addons.mozilla.org/firefox/downloads/latest/foxyproxy-standard/
|
||||
name: foxyproxy@eric.h.jung.xpi
|
||||
KeePassXC-Browser:
|
||||
url: https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/
|
||||
name: keepassxc-browser@keepassxc.org.xpi
|
@ -15,3 +15,9 @@ repositories:
|
||||
enabled: True
|
||||
gpgautoimport: True
|
||||
refresh: True
|
||||
|
||||
firefox:
|
||||
addons:
|
||||
Okta Browser Plugin:
|
||||
url: https://addons.mozilla.org/firefox/downloads/latest/okta-browser-plugin/
|
||||
name: plugin@okta.com.xpi
|
||||
|
@ -3,8 +3,10 @@ base:
|
||||
- packages
|
||||
- repositories
|
||||
- vim
|
||||
- firefox
|
||||
- hosts
|
||||
|
||||
{% if salt['file.file_exists']('hosts/{0}.sls'.format(grains.id)) %}
|
||||
'{{ grains.id }}':
|
||||
- hosts.{{ grains.id }}
|
||||
{% endif %}
|
||||
#{% if salt['file.file_exists']('hosts/{0}.sls'.format(grains.nodename)) %}
|
||||
# '{{ grains.nodename }}':
|
||||
# - hosts.{{ grains.nodename }}
|
||||
#{% endif %}
|
||||
|
7
salt/states/firefox.sls
Normal file
7
salt/states/firefox.sls
Normal file
@ -0,0 +1,7 @@
|
||||
{% for name, args in pillar['firefox']['addons'].items() %}
|
||||
Downloading {{ name }} Firefox xpi:
|
||||
cmd.run:
|
||||
- name: curl -sLo {{ salt['user.info']( pillar['username'] ).home }}/.mozilla/firefox/$(sed -n 's/^Path=\(.*\)$/\1/p' {{ salt['user.info']( pillar['username'] ).home }}/.mozilla/firefox/profiles.ini)/{{ args['name'] }} {{ args['url'] }}
|
||||
- unless: grep -oP '(?<=\},\"name\":\"){{ name }}' {{ salt['user.info']( pillar['username'] ).home }}/.mozilla/firefox/*.default*/addons.json
|
||||
- user: {{ pillar['username'] }}
|
||||
{% endfor %}
|
Loading…
Reference in New Issue
Block a user