My Salt (Saltstack) state is hardcoded. i need to pass values to the state dynamically
$10-30 USD
Cancelled
Posted almost 4 years ago
$10-30 USD
Paid on delivery
Here is my saltstate for mssql db insert. i need to pass 'SERVER_HOST2' as a grains variable (i don't want it hardcoded on the script. You need to be familiar with saltstack, Python/Jinja, SQL to be able to help.
[login to view URL]:
- insert_query: INSERT INTO [NewDB].[dbo].[MACHINES] (machinename, newjobs) values ( 'SERVER_HOST2' , 1)
- conditional_query: SELECT [machinename] FROM [NewDB].[dbo].[MACHINES] with (nolock) where machinename = 'SERVER_HOST2'
- server: '{{ pillar['database']['host'] }}'
- uid: 'uid'
- pwd: 'pwd'
- database: 'NewDB'