Retrieve Pillar data by doing a SQLite3 query
New in version 2015.8.0.
sqlite3
is included in the stdlib since Python 2.5.
This module is a concrete implementation of the sql_base ext_pillar for SQLite3.
all
Use the 'sqlite3' key under ext_pillar for configuration of queries.
SQLite3 database connection configuration requires the following values configured in the master config:
Note, timeout is in seconds.
sqlite3.database: /var/lib/salt/pillar.db
sqlite3.timeout: 5.0
sqlite3:
database: '/var/lib/salt/pillar.db'
timeout: 5.0
ext_pillar:
- sqlite3:
fromdb:
query: 'SELECT col1,col2,col3,col4,col5,col6,col7
FROM some_random_table
WHERE minion_pattern LIKE ?'
depth: 5
as_list: True
with_lists: [1,3]
This class receives and processes the database rows from SQLite3.
Execute queries against SQLite3, merge and return as a dict