added chrome state

This commit is contained in:
Paul 2021-09-25 16:14:22 +02:00
parent 0864ea1ed6
commit 283fc7bf32
5 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1 @@
{{ config|json }}

17
states/chrome/config.sls Normal file
View 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

View 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
View File

@ -0,0 +1,4 @@
---
include:
- .config

5
states/chrome/map.jinja Normal file
View 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) -%}