-
Notifications
You must be signed in to change notification settings - Fork 3
/
settings_d42_example.yaml
28 lines (22 loc) · 1.23 KB
/
settings_d42_example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
host: https://192.168.0.1
user: username
pass: password
# Verify SSL Certificate on host
sslverify: False
# example query that gets a custom field as well
# query: SELECT os_name,os_version,service_level,tags, ( SELECT value FROM view_device_custom_fields_v1 WHERE device_fk = device_pk AND key = 'Salt Node ID') AS "salt_node_id" FROM view_device_v1 WHERE name = '{nodename}'
# it is a good idea to alias your custom fields to names with no spaces, so Salt Node ID should alias as Salt_Node_ID
#--------
# example query that gets a custom field, IP address, and IP type
# query: SELECT os_name,os_version,service_level,tags, ( SELECT value FROM view_device_custom_fields_v1 WHERE device_fk = device_pk AND key = 'Salt Node ID') AS "salt_node_id", ( SELECT ip_address FROM view_ipaddress_v1 WHERE device_fk = device_pk ) AS "ip_address", ( SELECT type FROM view_ipaddress_v1 WHERE device_fk = device_pk ) AS "ip_type" FROM view_device_v1 WHERE name = '{minion_name}'
# --------
# if query is empty, default_fields_to_get will be returned from view_device_v1 (the base table)
query:
# very simple method to get fields ONLY from the main view_device_v1 table
default_fields_to_get:
- name
- os_name
- os_version
- service_level
- tags