Suman Deb

Results comments of Suman Deb

hey...please ignore... i figured it out... i either had to change pillar_opts to True in master file or set key: value on minion file. But what i noticed is __salt__(config.get)['key:value)...

can you tell me real quick which module from salt to import?

Yea...i have decided to not use piialr-opts. but seems import salt.config.master_config doesnt seem to work

okay seems like i found a way.. import salt.config opts = salt.config.minion_config('/etc/salt/master') print opts["config"]["cmdb_url"] any better idea then this... i have tried using `__opt__` but its saying...undefined

__opts__ what i meant!! :-) ``` import urllib import requests import json import subprocess import salt import salt.config def targets(tgt, tgt_type='glob', **kwargs): #cmdburl=subprocess.check_output(['salt', 'master', 'config.get', 'config:cmdb_url']).split(' ') opts=salt.config.minion_config('/etc/salt/master') baseurl=__opts__["config"]["cmdb_url"] ```

do to some reason its showing opts in bold but in real its what u said

root@cri-server5:/usr/lib/python2.7/dist-packages/salt/modules# cp renderv1.py /srv/salt/_modules/ root@cri-server5:/usr/lib/python2.7/dist-packages/salt/modules# salt master saltutil.sync_all master: ---------- beacons: clouds: engines: grains: log_handlers: modules: - modules.renderv1 output: proxymodules: renderers: returners: sdb: states: utils: root@cri-server5:/usr/lib/python2.7/dist-packages/salt/modules# salt master renderv1.run_query master:...

from sqlalchemy import * from jinja2 import Template import json import ast import inspect def run_query(template, user, host, password, dbtype, dbname, **pillar): with open('/home/cloudadmin/jinja/' + template) as f: a=f.read() t=Template(a)...

Hey. It has been resolved. It came out to be an issue with the API proxy data. Thanks am closing this out.

I did it and here is the same response. root@cri-dev-postgres:~# salt master db.db_create_user user="suman" password="set4now" ci_id="sub-1504158985538" dbname="GGG" -l debug [DEBUG ] Reading configuration from /etc/salt/master [DEBUG ] Including configuration from...