Skip to content

Instantly share code, notes, and snippets.

@dtantsur
Last active May 9, 2017 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dtantsur/065034d0de13d960a286db398525ccca to your computer and use it in GitHub Desktop.
Save dtantsur/065034d0de13d960a286db398525ccca to your computer and use it in GitHub Desktop.
Introspection rules for auto-discovery demo
[
{
"description": "Set default IPMI credentials",
"conditions": [
{"op": "eq", "field": "data://auto_discovered", "value": true}
],
"actions": [
{"action": "set-attribute", "path": "driver_info/ipmi_username",
"value": "admin"},
{"action": "set-attribute", "path": "driver_info/ipmi_password",
"value": "paSSw0rd"}
]
}
]
[
{
"description": "Set default IPMI credentials",
"conditions": [
{"op": "eq", "field": "data://auto_discovered", "value": true},
{"op": "ne", "field": "data://inventory.system_vendor.manufacturer",
"value": "Dell Inc."}
],
"actions": [
{"action": "set-attribute", "path": "driver_info/ipmi_username",
"value": "admin"},
{"action": "set-attribute", "path": "driver_info/ipmi_password",
"value": "paSSw0rd"}
]
},
{
"description": "Set the vendor driver for Dell hardware",
"conditions": [
{"op": "eq", "field": "data://auto_discovered", "value": true},
{"op": "eq", "field": "data://inventory.system_vendor.manufacturer",
"value": "Dell Inc."}
],
"actions": [
{"action": "set-attribute", "path": "driver", "value": "pxe_drac"},
{"action": "set-attribute", "path": "driver_info/drac_username",
"value": "admin"},
{"action": "set-attribute", "path": "driver_info/drac_password",
"value": "paSSw0rd"},
{"action": "set-attribute", "path": "driver_info/drac_address",
"value": "{data[inventory][bmc_address]}"}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment