Initial Commit

This commit is contained in:
Adam Goldsmith 2019-11-11 14:22:13 -05:00
commit 8fa81f0231
9 changed files with 163 additions and 0 deletions

42
_runners/cms_net.py Normal file
View File

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
'''
Network tools to run from the Master, specific to the Claremont MakerSpace
'''
import logging
import socket
log = logging.getLogger(__name__)
def wolmatch(tgt, destport=9):
'''
Send a "Magic Packet" to wake up Minions that are matched in the
grains cache, automatically determining the destination broadcast address
CLI Example:
.. code-block:: bash
salt-run network.wolmatch minion_id
'''
ret = []
minions = __salt__['cache.grains'](tgt, 'compound')
for name, minion in minions.items():
if 'hwaddr_interfaces' not in minion:
continue
# NOTE: FIVE, NINE, and TEN all should have eth addr as well, why is there only one printed?
for iface, mac in minion['hwaddr_interfaces'].items():
if iface == 'lo':
continue
mac = mac.strip()
#print(name, iface, mac, minion['ip_interfaces'])
if 'ip4_interfaces' in minion and iface in minion['ip_interfaces']:
ip_addrs = minion['ip4_interfaces'][iface]
for ip_addr in ip_addrs:
[subnet, _, _] = ip_addr.rpartition('.')
bcast = subnet + '.255'
__salt__['network.wol'](mac, bcast, destport)
log.info('Waking up %s', mac)
ret.append(f"{name}: {ip_addrs} {mac}")
return ret

16
bad_shortcuts.yaml Normal file
View File

@ -0,0 +1,16 @@
- Browse VCarve Pro - ShopBot Edition V9.0 Tutorials.lnk
- Corel CAPTURE 2017 (64-Bit).lnk
- Corel CONNECT 2017 (64-Bit).lnk
- Corel Font Manager 2017 (64-Bit).lnk
- Corel PHOTO-PAINT 2017 (64-Bit).lnk
- Dell Backup and Recovery.lnk
- Dell Precision Optimizer.lnk
- Intel(R) HD Graphics Control Panel.lnk
- Intel(R) WiDi.lnk
- Protected Workspace.lnk
- Shop for HP Supplies.lnk
- Style Builder 2017.lnk
- LayOut 2017.lnk
- gVim 8.1.lnk
- gVim Easy 8.1.lnk
- gVim Read only 8.1.lnk

6
corelDRAW.sls Normal file
View File

@ -0,0 +1,6 @@
# Apply the crack to CorelDRAW
# Note: We do own a key and this is a registered copy, but like this
# we can disable the annoying login prompt for every user
"C:\\Program Files\\Corel\\PASMUtility\v1\PASMUTILITY.dll":
file.managed:
- source: "\\\\ucs\\Software\\PASMUTILITY.dll"

31
packages.yaml Normal file
View File

@ -0,0 +1,31 @@
# Browsers
- firefox
- googlechrome
# Development Tools
- arduino
- git
- javaruntime
- notepadplusplus
- python
- vim
- vscode
# Graphics
- gimp
- inkscape
# 3D Modeling
- autodesk-fusion360
- blender
- cura-lulzbot
- openscad
- sketchup
- kicad
# Office
- 7zip
- adobereader
- libreoffice-fresh
- vlc

6
removeShortcuts.sls Normal file
View File

@ -0,0 +1,6 @@
{% import_yaml "bad_shortcuts.yaml" as bad_shortcuts %}
{% for shortcut in bad_shortcuts %}
Remove {{ shortcut }}:
file.absent:
- name: "C:\\Users\\Public\\Desktop\\{{ shortcut }}"
{% endfor %}

18
rsat.sls Normal file
View File

@ -0,0 +1,18 @@
rsat:
chocolatey.upgraded:
- name: rsat
RemoteServerAdministrationTools:
dism.feature_installed:
- require:
- rsat
RemoteServerAdministrationTools-Features:
dism.feature_installed:
- require:
- RemoteServerAdministrationTools
RemoteServerAdministrationTools-Features-GP:
dism.feature_installed:
- require:
- RemoteServerAdministrationTools-Features

8
top.sls Normal file
View File

@ -0,0 +1,8 @@
base:
'*':
- windowsWorkstation
- removeShortcuts
# 'TSMS-TWO-DTPC':
# - winHiDPI
'TSMS-FABLAB1-PC*':
- corelDRAW

6
winHiDPI.sls Normal file
View File

@ -0,0 +1,6 @@
HKEY_USERS\.DEFAULT\Control Panel\Desktop:
reg.present:
- vname: LogPixels
- vdata: 144
- vtype: REG_DWORD

30
windowsWorkstation.sls Normal file
View File

@ -0,0 +1,30 @@
chocolateyBootstrap:
module.run:
- name: chocolatey.bootstrap
{% import_yaml "packages.yaml" as packages %}
{% for pkg in packages %}
{{ pkg }}:
chocolatey.upgraded:
- name: {{ pkg }}
- require:
- chocolateyBootstrap
{% endfor %}
autodesk-meshmixer:
chocolatey.installed:
- name: autodesk-meshmixer
- source: \\ucs\software\nupkg
- require:
- chocolateyBootstrap
# windowsUpdates:
# wua.uptodate:
# - drivers: true
# 'gpupdate /force':
# cmd.run
setTimezone:
timezone.system:
- name: America/New_York