Add system-info role for Windows

This commit is contained in:
Kenneth Benzie 2022-05-22 14:05:05 +01:00
parent de8c0a119d
commit 1117ca00f7
7 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,4 @@
---
# TODO:
# cp $script_dir/system-info.plist ~/Library/LaunchAgents/system-info.plist
# launchctl load -w ~/Library/LaunchAgents/system-info.plist

View File

@ -0,0 +1,5 @@
---
# TODO:
# cp $script_dir/system-info.service ~/.config/systemd/user/system-info.service
# systemctl --user enable system-info
# systemctl --user start system-info

View File

@ -0,0 +1,58 @@
---
- name: install chocolatey packages
win_chocolatey:
name: openhardwaremonitor
state: latest
# - TODO: update config file
# C:\ProgramData\chocolatey\lib\OpenHardwareMonitor\tools\OpenHardwareMonitor\OpenHardwareMonitor.config
- name: create OpenHardwareMonitor scheduled task
win_scheduled_task:
path: Benie
name: OpenHardwareMonitor
state: present
enable: true
triggers:
- type: logon
enabled: true
- type: registration
enabled: true
actions:
- path: '{{openhardwaremonitor_exe}}'
working_directory: '{{openhardwaremonitor_install_dir}}'
disallow_start_if_on_batteries: false
stop_if_going_on_batteries: false
execution_time_limit: PT0S
logon_type: interactive_token
multiple_instances: 3
run_level: highest
start_when_available: true
wake_to_run: false
- name: create system-info-WSL.sh scheduled task
win_scheduled_task:
path: Benie
name: system-info-WSL.sh
state: present
enable: true
triggers:
- type: logon
enabled: true
- type: registration
enabled: true
actions:
- path: '{{wsl_exe}}'
arguments: '-d Debian -e /home/benie/.config/tmux/system-info/system-info-WSL.sh'
disallow_start_if_on_batteries: false
stop_if_going_on_batteries: false
execution_time_limit: PT0S
logon_type: password
username: '{{ansible_user}}'
password: '{{ansible_password}}'
multiple_instances: 3
run_level: limited
start_when_available: true
wake_to_run: false
# - TODO: configure firewall

View File

@ -0,0 +1,2 @@
---
- include_tasks: '{{ansible_os_family}}.yaml'

View File

@ -0,0 +1,5 @@
---
openhardwaremonitor_exe: 'OpenHardwareMonitor.exe'
openhardwaremonitor_install_dir: '{{ansible_env.ProgramData}}\chocolatey\lib\OpenHardwareMonitor\tools\OpenHardwareMonitor'
wsl_exe: '{{ansible_env.SystemRoot}}/System32/wsl.exe'

View File

@ -3,8 +3,9 @@
roles: roles:
- role: zsh - role: zsh
- role: tmux
- role: neovim - role: neovim
- role: tmux
- role: system-info
- role: ag - role: ag
- role: bat - role: bat

View File

@ -14,6 +14,7 @@
roles: roles:
- role: powershell - role: powershell
- role: neovim - role: neovim
- role: system-info
- role: ag - role: ag
- role: git - role: git