Note
Legend
- mod
- Module name
- fun
- Function name (in module)
| 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 | 
| 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 | 
| # 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() | 
| Event | |
| A notice emitted onto an event bus. Events are often driven by requests for actions to occur on a minion or master and the results of those actions. | |
| File Server | |
| A local or remote location for storing both Salt-specific files such as top files or SLS files as well as files that can be distributed to minions, such as system configuration files. | |
| Grain | |
| A key-value pair which contains a fact about a system, such as its hostname, network addresses. | |
| Highstate | 
| Here are all the files necessary to setup a beacon to monitor bad logins on Linux machines | |
| BEACON SETUP | |
| 1. Copy "badlogins.sls" to /srv/pillar | |
| 2. Update your pillar top file to include the information from "top.sls" | |
| -- You might need to restart the salt-minion agent for the beacon to start immediatly otherwise it could take a few hours. | 
| aliases.get_target | |
| aliases.has_target | |
| aliases.list_aliases | |
| aliases.rm_alias | |
| aliases.set_target | |
| alternatives.auto | |
| alternatives.check_exists | |
| alternatives.check_installed | |
| alternatives.display | |
| alternatives.install | 
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| # Standard Libs | |
| import logging | |
| # First Party Libs | |
| import requests | |
| from requests.adapters import HTTPAdapter | 
| susemanager: | |
| activation_key: 1-Dev-SLES-11-SP3-x86_64-key | |
| roles: | |
| - linux-dev | |
| - mybox-acme | |
| AFAIK: | |
| key: value | |
| key: | 
| # Regular | |
| txtblk="$(tput setaf 0 2>/dev/null || echo '\e[0;30m')" # Black | |
| txtred="$(tput setaf 1 2>/dev/null || echo '\e[0;31m')" # Red | |
| txtgrn="$(tput setaf 2 2>/dev/null || echo '\e[0;32m')" # Green | |
| txtylw="$(tput setaf 3 2>/dev/null || echo '\e[0;33m')" # Yellow | |
| txtblu="$(tput setaf 4 2>/dev/null || echo '\e[0;34m')" # Blue | |
| txtpur="$(tput setaf 5 2>/dev/null || echo '\e[0;35m')" # Purple | |
| txtcyn="$(tput setaf 6 2>/dev/null || echo '\e[0;36m')" # Cyan |