added chrome state
This commit is contained in:
parent
0864ea1ed6
commit
283fc7bf32
1
states/chrome/config.json.j2
Normal file
1
states/chrome/config.json.j2
Normal file
@ -0,0 +1 @@
|
||||
{{ config|json }}
|
17
states/chrome/config.sls
Normal file
17
states/chrome/config.sls
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
{%- from "chrome/map.jinja" import chrome with context %}
|
||||
|
||||
{%- for dir in chrome.directories %}
|
||||
chrome-directory-{{ dir }}:
|
||||
file.directory:
|
||||
- name: {{ dir }}
|
||||
- makedirs: True
|
||||
{%- endfor %}
|
||||
|
||||
chrome-policies-managed:
|
||||
file.managed:
|
||||
- name: /etc/opt/chrome/policies/managed/managed_policies.json
|
||||
- source: salt://chrome/config.json.j2
|
||||
- context:
|
||||
config: {{ chrome.config.managed }}
|
||||
- template: jinja
|
19
states/chrome/defaults.yaml
Normal file
19
states/chrome/defaults.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
chrome:
|
||||
config:
|
||||
managed:
|
||||
AutofillAddressEnabled: false
|
||||
AutofillCreditCardEnabled: false
|
||||
BookmarkBarEnabled: false
|
||||
BrowserSignin: false
|
||||
HomepageIsNewTabPage: false
|
||||
HomepageLocation: http://www.google.fr
|
||||
PasswordManagerEnabled: false
|
||||
PaymentMethodQueryEnabled: false
|
||||
RestoreOnStartup: 1
|
||||
ShowHomeButton: true
|
||||
SigninInterceptionEnabled: false
|
||||
recommended: {}
|
||||
directories:
|
||||
- /etc/opt/chrome/policies/managed
|
||||
- /etc/opt/chrome/policies/recommended
|
4
states/chrome/init.sls
Normal file
4
states/chrome/init.sls
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
include:
|
||||
- .config
|
||||
|
5
states/chrome/map.jinja
Normal file
5
states/chrome/map.jinja
Normal file
@ -0,0 +1,5 @@
|
||||
{%- import_yaml "chrome/defaults.yaml" as default_settings -%}
|
||||
|
||||
{%- set defaults = salt['grains.filter_by'](default_settings, default='chrome') -%}
|
||||
|
||||
{%- set chrome = salt['pillar.get']('chrome', default=defaults, merge=True) -%}
|
Loading…
Reference in New Issue
Block a user