This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download new packages but don't install them | |
# Save in /etc/systemd/system/ | |
[Unit] | |
Description=Pacman Automatic Download (no install) service | |
After=network-online.target | |
[Service] | |
# Wait time if process hangs | |
TimeoutStopSec=5m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Username = "su" | |
$Password = "password" | |
$group = "Administrators" | |
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME" | |
$existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username } | |
if ($existing -eq $null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Reboot a host and wait for it to return | |
hosts: somehost | |
remote_user: root | |
tasks: | |
# Send the reboot command | |
- shell: shutdown -r now | |
# This pause is mandatory, otherwise the existing control connection gets reused! | |
- pause: seconds=30 |