salt-states/fah.sls

42 lines
1009 B
Plaintext
Raw Normal View History

include:
- chocolatey
Set standby timeout to 0:
powercfg.set_timeout:
- name: standby
- value: 0
- order: 1
Install fah:
chocolatey.installed:
- name: fah
- require:
- sls: chocolatey
Create fah config file:
file.managed:
- name: 'C:\Users\LocalAdmin\AppData\Roaming\FAHClient\config.xml'
- source: 'salt://fah-config.xml'
- makedirs: True
Add fah to path:
win_path.exists:
- name: 'C:\Program Files (x86)\FAHClient'
Create fah data directory registry entry:
reg.present:
- name: 'HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\FAHClient'
- vname: "DataDirectory"
- vdata: 'C:\Users\LocalAdmin\AppData\Roaming\FAHClient'
{%- if not salt['service.available']("Folding@home Client") %}
Install fah service:
cmd.run:
- name: '"C:\Program Files (x86)\FAHClient\FAHClient.exe" --install-service'
{%- endif %}
Start fah client:
service.running:
- name: "Folding@home Client"
- enable: True