sdb usage example

352 views
Skip to first unread message

enginx

unread,
Jan 21, 2016, 5:08:25 AM1/21/16
to Salt-users
Hi all,

I need to store some sensitive data inside keyring using sdb.Even though i set some data such as username and password in keyring, so i couldn't get my data in saltstack.
Is there any example for storing and usage data over sdb ?

My example:
salt:
/tmp/test.txt:
   file.managed:
    - source: salt://test.conf
    - template: jinja
 
test.conf
username: xyz
password: sdb://mykeyring/password


When i try to execute it, so i cannot see my password in test.conf file.


Jakub Mikusek

unread,
Jan 21, 2016, 5:50:10 AM1/21/16
to salt-...@googlegroups.com
Hi,

Can you please paste your complete state file and salt://test.conf as they are?
What you pasted above doesn't look like a jinja templated file.


Regards,
Jakub

--
"Imagination is more important than knowledge" -> Albert Einstein
tel: +353 83 44 50 623
jabber: ja...@mikusek.org
gg: 3386899 skype: mmmick3y

enginx

unread,
Jan 21, 2016, 6:27:14 AM1/21/16
to Salt-users

Hi Jakub,

It is an example file which doesn't contains any jinja syntaxt.I am just trying to do some example to learn sdb usage in saltstack.

I created these files are below:

Salt:

test.sls:

/tmp/example.txt:

   file.managed:
    - source: salt://test.conf
    - template: jinja
    - mode: 755

test.conf:

username: ugur
password: sdb://mykeyring/password


So i don't want to store my "password" as clear text in pillar data.Maybe i cannot use it as properly to get my sensitive data in keyring.

Jakub Mikusek

unread,
Jan 21, 2016, 6:42:02 AM1/21/16
to salt-...@googlegroups.com
On 21 January 2016 at 11:27, enginx <ugurca...@gmail.com> wrote:
>
> Hi Jakub,
>
> It is an example file which doesn't contains any jinja syntaxt.I am just
> trying to do some example to learn sdb usage in saltstack.

I'm not quite familiar with sdb. The only sdb I'd know would exist
somewhere in /dev :)

> I created these files are below:
>
> Salt:
(...)
> test.conf:
>
> username: ugur
> password: sdb://mykeyring/password

This is not jinja template - it's just a text file - please check out
this saltstack tutorial:
https://docs.saltstack.com/en/latest/topics/tutorials/states_pt3.html
and jinja render doc:
https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html

> So i don't want to store my "password" as clear text in pillar data.Maybe i
> cannot use it as properly to get my sensitive data in keyring.

What are you trying to achieve?

enginx

unread,
Jan 21, 2016, 6:51:43 AM1/21/16
to Salt-users

Thanks, but i told you that it did not contain jinja syntaxt.I am using it as a jinja file to get some data in sdb as encrypted while it is rendering at state execution.I need to example or know-how to use sdb in saltstack environment.Actually even i read salt documentation guide, so it was not clear enough knowledge to implement it.

Claude T

unread,
Jun 22, 2017, 3:33:12 PM6/22/17
to Salt-users
the you have receive a solution for your problem.  I try it this week and it's don't work. If you have a working example, i search one

penguinn

unread,
Jun 23, 2017, 8:45:20 AM6/23/17
to Salt-users


On Thursday, June 22, 2017 at 9:33:12 PM UTC+2, Claude T wrote:
the you have receive a solution for your problem.  I try it this week and it's don't work. If you have a working example, i search one

Nop. I didn't use this library after these causes for encryption.We were used to vault to set key and valu for enc. data.

thanks.
Reply all
Reply to author
Forward
0 new messages