Add system-info role for Windows
This commit is contained in:
parent
de8c0a119d
commit
1117ca00f7
4
roles/system-info/tasks/Darwin.yaml
Normal file
4
roles/system-info/tasks/Darwin.yaml
Normal 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
|
5
roles/system-info/tasks/Debian.yaml
Normal file
5
roles/system-info/tasks/Debian.yaml
Normal 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
|
58
roles/system-info/tasks/Windows.yaml
Normal file
58
roles/system-info/tasks/Windows.yaml
Normal 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
|
2
roles/system-info/tasks/main.yaml
Normal file
2
roles/system-info/tasks/main.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
- include_tasks: '{{ansible_os_family}}.yaml'
|
5
roles/system-info/vars/main.yaml
Normal file
5
roles/system-info/vars/main.yaml
Normal 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'
|
@ -3,8 +3,9 @@
|
||||
|
||||
roles:
|
||||
- role: zsh
|
||||
- role: tmux
|
||||
- role: neovim
|
||||
- role: tmux
|
||||
- role: system-info
|
||||
|
||||
- role: ag
|
||||
- role: bat
|
||||
|
@ -14,6 +14,7 @@
|
||||
roles:
|
||||
- role: powershell
|
||||
- role: neovim
|
||||
- role: system-info
|
||||
|
||||
- role: ag
|
||||
- role: git
|
||||
|
Loading…
x
Reference in New Issue
Block a user