|
Le 15/04/2016 à 08:08, Лыков Михаил a
écrit :
Hi, Sorry for the late reply, it was long since I had not read the emails from this list. We are using Salt for asset management, especially for Windows workstations. Our /srv/salt/top.sls has lines like: 'G@os_family:Windows and G@osrelease:7 and ....': windows.firefox and the state file windows/firefox.sls is using: - state cmd to run the helper.exe - state file to have specific file for configuration in place - pkg state in order to have firefox installed (you can specify a version) and looks like firefox: file.managed: {% if grains['cpuarch'] == 'x86' %} - name: C:\Program Files\Mozilla Firefox\firefox-ens.js {% else %} - name: C:\Program Files (x86)\Mozilla Firefox\firefox-ens.js {% endif %} - source: salt://win/repo/pkg/Firefox/firefox-ens.js pkg: - installed firefoxdefaultbrowser: require: - pkg: firefoxe {% if grains['cpuarch'] == 'x86' %} file.managed: - name: C:\Program Files\Mozilla Firefox\browser\override.ini - source: salt://win/repo/pkg/Firefox/override.ini cmd.run: - name: '"C:\Program Files\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppGlobal' {% else %} file.managed: - name: C:\Program Files (x86)\Mozilla Firefox\browser\override.ini - source: salt://win/repo/pkg/Firefox/override.ini cmd.run: - name: '"C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppGlobal' {% endif %} firefoxens: file.managed: {% if grains['cpuarch'] == 'x86' %} - name: C:\Program Files\Mozilla Firefox\defaults\pref\ens.js {% else %} - name: C:\Program Files (x86)\Mozilla Firefox\defaults\pref\ens.js {% endif %} - source: salt://win/repo/pkg/Firefox/ens.js We are using the Salt Windows Software Repository so win/repo/firefox.sls looks like: firefox: 39.0: installer: 'salt://win/repo/pkg/Firefox/Firefox_setup_39.0.exe' full_name: 'Mozilla Firefox 39.0 (x86 fr)' reboot: False install_flags: ' /S' uninstaller: 'C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe' uninstall_flags: ' /S' 43.0: installer: 'salt://win/repo/pkg/Firefox/Firefox_Setup_43.0.exe' full_name: 'Mozilla Firefox 43.0 (x86 fr)' reboot: False install_flags: ' /S' uninstaller: 'C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe' uninstall_flags: ' /S' 45.0: installer: 'salt://win/repo/pkg/Firefox/Firefox_Setup_45.0esr.exe' full_name: 'Mozilla Firefox 45.0 ESR (x86 fr)' reboot: False install_flags: ' /S' uninstaller: 'C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe' uninstall_flags: ' /S' (it's important to have the correct full name as windows know it). With the module pkg and his provider for windows (win_pkg) you can install/update/uninstall with a command line package. In order to update or install : # salt yourTargets pkg.install firefox This could be done automatically when a Minion connect to the master with a reactor or on a schedule (can be set with a state) . Whit this you could also run a state.highstate on a regular basis to make sure all the states are applied. Our all workflow for a fresh new windows installation is based on sysprep and at the end of it, a powershell script install Salt. Then we accept the new minion key and apply all the states with highstate: it installs Firefox Thunderbird ... and sets windows parameters. Regards Aurelien |
_______________________________________________ Enterprise mailing list [email protected] https://mail.mozilla.org/listinfo/enterprise
To unsubscribe from this list, please visit https://mail.mozilla.org/listinfo/enterprise or send an email to [email protected] with a subject of "unsubscribe"

