Skip to content

Instantly share code, notes, and snippets.

@trebortech
trebortech / setpinretries.py
Last active February 10, 2018 16:30
SetPinRetries
# Core lib imports
from binascii import a2b_hex
# Yubico lib imports
from ykman import driver_ccid as CCID
from ykman import piv as PIV
objCCIDDevices = CCID.open_devices()
driverCCID = objCCIDDevices.next()
@trebortech
trebortech / hsm_list.config
Created June 22, 2022 19:23
Multiple YubiHSM startup shell script
connector_path=/home/pi/yubihsm/yubihsm-connector
hsm1_serial=123456
hsm1_listen=172.16.16.10:1111
hsm2_serial=4234234
hsm2_listen=172.16.16.10:2222
@trebortech
trebortech / salt-lowdata-formats.rst
Created January 7, 2023 17:21 — forked from whiteinge/salt-lowdata-formats.rst
Salt is used to execute functions across a wide variety of locations in a wide variety of ways. It does this by mapping the function name and function parameters within a data structure (JSON-serializable). Unfortunately, there is a variety of formats in different parts of Salt for doing so.

Various formats of mapping data to function calls in Salt

Note

Legend

mod
Module name
fun
Function name (in module)
@trebortech
trebortech / README
Last active May 26, 2023 19:25
salt-ssh example
The goal of this test was to build an orchestration file that can execute commands on a non-minion via salt-ssh.
<event> -> <reactor> -> <reactor sls> -> <orchestration file> -> <ssh commands>
Flow:
- salt-call event.send ssh/test '{"hostid": "minion-deb8-py2"}'
- event is dropped on the eventbus with a hostid to target commands
- reactor file triggers orchestration