Retrieve Pillar data by doing a postgres query
New in version 2017.7.0.
maturity: | new |
---|---|
depends: | psycopg2 |
platform: | all |
postgres: user: 'salt' pass: 'super_secret_password' db: 'salt_db' ext_pillar: - postgres: fromdb: query: 'SELECT col1,col2,col3,col4,col5,col6,col7 FROM some_random_table WHERE minion_pattern LIKE %s' depth: 5 as_list: True with_lists: [1,3]
salt.pillar.postgres.
POSTGRESExtPillar
This class receives and processes the database rows from POSTGRES.
extract_queries
(args, kwargs)
This function normalizes the config block into a set of queries we can use. The return is a list of consistently laid out dicts.
Execute queries against POSTGRES, merge and return as a dict
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.postgres.html