SQLite sdb Module


This module allows access to sqlite3 using an sdb:// URI

Like all sdb modules, the sqlite3 module requires a configuration profile to be configured in either the minion or master configuration file. This profile requires very little. For example:

  driver: sqlite3
  database: /tmp/sdb.sqlite
  table: sdb
  create_table: True

The driver refers to the sqlite3 module, database refers to the sqlite3 database file. table is the table within the db that will hold keys and values (defaults to sdb). The database and table will be created if they do not exist.

Advanced Usage:

Instead of a table name, it is possible to provide custom SQL statements to create the table(s) and get and set values.

salt.sdb.sqlite3.get(key, profile=None)

Get a value from sqlite3

salt.sdb.sqlite3.set_(key, value, profile=None)

Set a key/value pair in sqlite3