Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-08-11

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 [diecast] joined #salt
00:07 kenbolton joined #salt
00:09 fragamus joined #salt
00:12 Ryan_Lane joined #salt
00:23 [diecast] joined #salt
00:30 efixit joined #salt
00:32 isomorphic joined #salt
01:00 bwq joined #salt
01:04 Ryan_Lane joined #salt
01:38 __Jahkeup__ joined #salt
01:42 joehh __Jahkeup__: what do you mean by directly?
01:43 __Jahkeup__ by being able to reference {{ grains['host'] }} in a salt://file
01:43 joehh from memory, you can do {{grains['item']}}
01:43 joehh so I think the answer is yes
01:43 __Jahkeup__ yeah that's what I thought, but I got an error when I tried it
01:43 joehh what was the error?
01:43 __Jahkeup__ I've since worked around it and can't remember @_@
01:44 joehh oh well :)
01:44 __Jahkeup__ yup thanks for the response anyways!
01:44 __Jahkeup__ I'll revisit it at some point
02:03 Ryan_Lane joined #salt
02:03 Ryan_Lane joined #salt
02:18 kenbolton joined #salt
02:47 gaoyang joined #salt
02:50 alunduil joined #salt
03:02 Furao joined #salt
03:05 flepied joined #salt
03:09 napperjabber joined #salt
03:09 __Jahkeup__ joined #salt
03:14 Lue_4911 joined #salt
03:19 aat joined #salt
03:20 Ryan_Lane joined #salt
03:32 hellome joined #salt
03:38 aat joined #salt
03:41 Ryan_Lane joined #salt
03:45 aat joined #salt
03:46 napperjabber joined #salt
04:10 __Jahkeup__ joined #salt
04:19 napperjabber joined #salt
04:35 efixit joined #salt
04:38 druonysuse joined #salt
04:38 druonysuse joined #salt
04:58 fragamus joined #salt
05:01 pcarrier_ joined #salt
05:11 UtahDave joined #salt
05:18 UtahDave iquaba: hey are you around?
05:28 ds_shadof whiteinge, yes
05:31 iquaba UtahDave: hey
05:32 UtahDave hey, I'm excited about your pull req!  That should have been done a long time ago.
05:32 UtahDave did you see my comment about just using      "for line in hfl: "  ?
05:32 iquaba yep, double checking it now
05:33 UtahDave cool, I think it would simplify the code a bit
05:39 david_a joined #salt
05:39 UtahDave iquaba: what do you think about that suggestion?
05:41 iquaba UtahDave: should be up now
05:42 iquaba UtahDave: heh, it's Breaking Bad + python night so my attention is a little split :P
05:42 UtahDave he he.  awesome.
05:42 UtahDave I like the update.  Thanks for the improvement here!
05:43 iquaba anytime
05:43 iquaba I was eyeing the feature request about custom grains based on wmi/registry keys
05:44 iquaba what did you think about that?
05:46 UtahDave I think it's a great idea.
05:47 UtahDave In fact, grains/core.py is already import wmi and salt.util.winapi to get some information from there
05:47 UtahDave s/import/importing
05:47 iquaba yea, i figured it was just a matter of reading in a list from the config and looping through it pretty simply
05:48 UtahDave Yeah.
05:48 Ryan_Lane joined #salt
05:48 Ryan_Lane joined #salt
05:48 iquaba thats actually how i got looking at config.py and then i saw the comment about the hosts file
05:49 iquaba squirrel!
05:49 UtahDave And we could probably come up with a list of more grains we should have by default on Windows
05:49 UtahDave lol
05:51 iquaba yea, the features one they guy talked about looked like a good candidate for that
05:51 iquaba "that" = default grain from wmi
06:03 UtahDave well, time for bed.  Night
06:03 iquaba night
06:08 UtahDave left #salt
06:38 izquierdo joined #salt
06:40 oz_akan_ joined #salt
06:46 kmrhb joined #salt
06:58 scofflaw joined #salt
07:07 Furao joined #salt
07:14 liuyq joined #salt
07:14 az87c joined #salt
07:14 az87c_ joined #salt
07:15 Ryan_Lane joined #salt
07:15 liuyq joined #salt
07:20 kmrhb joined #salt
07:20 hjubal joined #salt
07:33 Ahlee joined #salt
07:40 __Jahkeup__ joined #salt
07:41 __Jahkeup__ joined #salt
07:42 scofflaw joined #salt
07:47 Ahlee joined #salt
07:54 scofflaw joined #salt
07:55 Xeago joined #salt
07:58 druonysuse joined #salt
08:06 scofflaw joined #salt
08:08 matanya joined #salt
08:18 scofflaw joined #salt
08:19 druonysuse joined #salt
08:45 Ahlee joined #salt
08:59 Ahlee joined #salt
09:06 carlos joined #salt
09:12 Ryan_Lane joined #salt
09:20 efixit joined #salt
09:22 Ahlee joined #salt
09:22 scofflaw joined #salt
09:33 Ahlee joined #salt
09:41 Ahlee joined #salt
09:46 __Jahkeup__ joined #salt
10:18 zooz joined #salt
10:30 lemao joined #salt
10:46 __Jahkeup__ joined #salt
10:53 lempa joined #salt
11:01 Katafalkas joined #salt
11:24 Nexpro joined #salt
11:28 qba73_ joined #salt
11:41 flepied joined #salt
11:45 flepied1 joined #salt
11:47 __Jahkeup__ joined #salt
11:50 flepied joined #salt
11:57 diegows joined #salt
12:11 flepied joined #salt
12:20 zooz joined #salt
12:24 izquierdo joined #salt
12:51 msheiny joined #salt
12:55 oz_akan_ joined #salt
12:58 oz_akan_ joined #salt
13:05 felixhummel joined #salt
13:16 bhosmer joined #salt
13:17 Teknix joined #salt
13:22 bhosmer_ joined #salt
13:48 kmrhb joined #salt
13:55 nkuttler joined #salt
13:55 nkuttler joined #salt
13:58 mechanicalduck joined #salt
14:09 kmrhb joined #salt
14:09 gaoyang joined #salt
14:18 __Jahkeup__ joined #salt
14:33 Ryan_Lane joined #salt
14:51 mike25ro joined #salt
14:51 mike25ro hey guys anyone around?
14:51 mike25ro for a quick !
14:51 mike25ro Q
14:55 giantlock joined #salt
14:56 terminalmage joined #salt
15:03 fxhp mike25ro: shoot
15:06 mike25ro fxhp: i want to use some data into a state.... from a pillar.... something like :{% for user, args in pillar['users'].iteritems() %}
15:07 mike25ro my q is ... .where should i put the data? /srv/pillar/ ???
15:07 mike25ro i want to mention that that pillar data should not be available on minions... just some local data on the master that i can use
15:07 gildegoma joined #salt
15:08 mike25ro for example if i put my data into /srv/pillar/users/x.sls
15:08 mike25ro how can i access it from a state?
15:14 pkruithof joined #salt
15:15 djn joined #salt
15:15 kmrhb joined #salt
15:15 it_dude joined #salt
15:34 napperjabber joined #salt
15:46 djn joined #salt
15:48 qba73 joined #salt
15:51 __Jahkeup__ joined #salt
15:52 djn joined #salt
15:53 aat joined #salt
15:59 bhosmer joined #salt
16:03 oz_akan_ joined #salt
16:04 mike25ro anyone around?
16:09 oz_akan_ joined #salt
16:13 mmilano joined #salt
16:14 fxhp mike25ro: pillar data uses a targeting system very similar to states
16:14 fxhp (it has a top.sls which you can target just your masters minion)
16:14 fxhp Where you should put that data depends on how you configure your master.
16:15 fxhp In my case I have a pillar directory in my home directory
16:15 mike25ro so the pillar data.. should be send to a minion/
16:15 mike25ro ?
16:15 honestly mike25ro: look at the user formula
16:15 fxhp yeah pillar data is served to minions
16:15 honestly https://github.com/saltstack-formulas/users-formula
16:15 fxhp but first compiled on master
16:16 psilo joined #salt
16:16 mike25ro fxhp:  and is it possible to have a pillar on the master.. from where i pull data WITHOUT having that data available on the minion? .. in case i store some sensitive data in the pillar
16:16 mike25ro honestly: thanks
16:16 djn joined #salt
16:16 fxhp mike25ro: the salt-master normally also runs a salt-minion on itself
16:17 mike25ro indeed..
16:17 fxhp you would be presenting data to the salt-master's minion
16:17 mike25ro great idea!!!
16:18 mike25ro but then ... if i want to push the user to ... minion2 .. how should this be done?
16:18 fxhp hmm
16:18 honestly yeah you can target pillar data so that only the minion it gets pushed to sees it and none of the others
16:18 fxhp if you want to manage users with pillar/states check out my blog post: http://russell.ballestrini.net/understanding-salt-stack-user-and-group-management/
16:19 mike25ro fxhp:  thanks again
16:19 honestly and I think the salt files are compiled and the minion only sees the result
16:19 mike25ro so the DATA .. sensitive data .. is not seen by the minion?
16:19 honestly so if you have something secret that your template uses but that isn't supposed to end up on the minion, it shouldn't
16:20 fxhp mike25ro: Using that, you could create a separate user pillar for master and your minions
16:20 honestly well if it gets compiled into the actual execution, it will be
16:20 fxhp honestly: states are compiled on minions, pillars are compiled on masters
16:20 mike25ro fxhp:  nice
16:20 honestly fxhp: oh okay
16:20 mike25ro honestly: REALLY good to know that... so is safe to store some sensitive data on pillars?
16:21 honestly well as a general statement, no
16:21 fxhp mike25ro: yes it is safer to store sensitive data on pillar, so long as you practice decent ACLS
16:21 mike25ro true thanks guys a lot
16:24 fxhp mike25ro: if you want to configure the location of you pillar tree, its a setting in /etc/salt/master pillar_roots: which accepts a list of locations
16:24 fxhp filesystem locations
16:25 mike25ro indeed... i saw that .. i can even add a git repo... if i remember correctly
16:25 fxhp yeah, not sure if that works.
16:25 fxhp (my pillars and states are revision controlled checkouts)
16:28 fxhp also run the following command on a minion to see what data it current has access to: 'sudo salt-call pillar.data'
16:29 fxhp mike25ro: here is another post that so a decently simple way to connect states and pillars: http://russell.ballestrini.net/add-a-custom-header-to-all-salt-managed-files-using-pillar-and-jinja-templates/
16:29 fxhp shows*
16:33 jacksontj joined #salt
16:56 __Jahkeup__ joined #salt
17:14 gaoyang joined #salt
17:15 Ryan_Lane joined #salt
17:24 mike25ro fxhp: thanks buddy
17:27 djn joined #salt
17:30 baniir joined #salt
17:43 capricorn_1 joined #salt
17:45 __Jahkeup__ joined #salt
17:52 djn joined #salt
17:54 msheiny joined #salt
17:59 luminous could the value of a parameter in a (custom) state span multiple lines?
17:59 luminous I've seen this in pillar with |
17:59 kmrhb joined #salt
18:03 djn joined #salt
18:05 kmrhb joined #salt
18:06 luminous and secondly: anyone know how to pull states from a datasource other than a file? say a db or API?
18:06 luminous how would you go about doing this?
18:06 zonk1024 i would think a custom fs backend
18:07 luminous O.o
18:07 luminous gitfs is one example?
18:07 zonk1024 i use gitfs… i like it
18:07 * luminous digs into salt code
18:07 zonk1024 although there is a broken import right now
18:08 zonk1024 import distutils should be import distutils.version
18:09 zonk1024 also, sometimes you have to rm /var/cache/salt/gitfs/*
18:09 mattinator joined #salt
18:09 zonk1024 and it takes a min to pick up changes to the repo
18:09 zonk1024 but i suspect these will get worked out soon
18:11 luminous yea, I don't want to use the gitfs backend
18:11 luminous but need to figure out sometime similar
18:11 chutzpah joined #salt
18:11 luminous can you use multiple backends at once?
18:12 mike25ro yes.. multiple backends can be used
18:12 mike25ro multiple roots
18:12 mike25ro i remember i read about it... never used it though
18:17 chutzpah joined #salt
18:20 kmrhb joined #salt
18:22 L2SHO_ joined #salt
18:23 Lue_4911 joined #salt
18:23 L2SHO_ new salt user here.  I'm having trouble understanding how file.managed works.  I don't see a "managed" function in the module documentation here: http://docs.saltstack.com/ref/modules/all/salt.modules.file.html
18:25 luminous L2SHO_: look for managed() in a file.py
18:26 luminous so file is the module, managed is the function
18:26 luminous are there docs on trying to access pillar from within a module?
18:26 * luminous is not finding any
18:26 berto- joined #salt
18:27 honestly joined #salt
18:28 zooz joined #salt
18:28 luminous ah, pillar is just a module, so it should be cross-calling modules..
18:29 L2SHO_ luminous, ya, I don't see a managed function in 'modules/file.py'
18:30 L2SHO_ there is one in states/file.py though
18:30 luminous oh, right.. sorry
18:30 luminous ok, so states USE modules
18:30 luminous but they are separate
18:31 it_dude joined #salt
18:31 luminous so the file.managed STATE is some python that uses some set of salt modules to do its work
18:31 luminous does that help?
18:31 L2SHO_ so how do I know if my sls is going to make use of a state or a module?
18:31 luminous do you have a more specific question RE what's trippin you up?
18:32 luminous ah, ok
18:32 L2SHO_ well, I'm just trying to understand what's actually happening
18:32 luminous yep
18:32 luminous L2SHO_: when you call:  salt '*' state.sls my_state
18:32 luminous salt will try to find and apply my_state
18:33 luminous this would be a file, my_state.sls
18:33 L2SHO_ yep, I'm with you so far
18:33 luminous and that .sls would have a bunch of 'stuff' in it, so say you use file.managed..
18:33 luminous salt would parse the .sls and run those STATE modules
18:33 luminous file is the module
18:33 luminous managed is the function
18:34 luminous so if you had file.managed: - name: /etc/hosts  - user: root ...
18:34 luminous the file.managed STATE function would get called with the parameters name.. user.. etcn
18:35 luminous that STATE function would exist as some python that would work some magick, in most cases using other salt MODULES to actually carry out the work
18:35 luminous L2SHO_: maybe that makes more sense?
18:36 L2SHO_ ok, so then is there documentation of the available state functions then?
18:36 L2SHO_ maybe thats where I'm getting tripped up
18:36 luminous yes
18:36 luminous you could actually replace modules with states in the link you had, I believe
18:37 luminous http://docs.saltstack.com/ref/states/all/
18:38 L2SHO_ aha, that helps, thanks
18:38 luminous :)
18:39 luminous L2SHO_: modules are the remote execution end of thing
18:39 luminous *things
18:39 luminous states more configuration management
18:39 luminous welcome to saltstack, by the way
18:42 L2SHO_ Now here's something a bit more complex.  Say I wanted to create a state that installs for example wordpress in some directory.  Would the best way to do that be to keep the full wordpress tree on the master and just have it copy it.  Or can salt somehow go fetch the latest .tgz and extract it
18:49 napperjabber joined #salt
18:58 oz_akan__ joined #salt
19:01 troyready joined #salt
19:04 mechanicalduck joined #salt
19:07 qba73 joined #salt
19:23 kmrhb joined #salt
19:28 mechanicalduck_ joined #salt
19:31 woss joined #salt
19:40 kstaken joined #salt
19:45 cnelsonsic joined #salt
19:48 mike25ro L2SHO_: related to wordpress... i would keep a ZIP of the wordpress... copy it to the minion and unzip it etc.  You can have a batch file that runs on the minion and unzips the wordpress.zip... then you can have another state... to copy the config.php to your wordpress install dir
19:48 pdayton joined #salt
19:50 it_dude joined #salt
19:56 cnelsonsic joined #salt
20:02 it_dude joined #salt
20:14 L2SHO_ How do I make a state in an sls file depend on something in a different sls file?  For example, I want /www/nginx.sls to install a package from epel which is defined in the repo in /repos/epel.sls
20:15 L2SHO_ would I just do an include and a require?
20:15 mike25ro yep
20:17 zooz joined #salt
20:29 kmrhb joined #salt
20:30 blee joined #salt
20:38 mmilano joined #salt
20:41 msheiny joined #salt
20:43 flepied joined #salt
20:45 blee_ joined #salt
20:47 kmrhb joined #salt
20:52 it_dude joined #salt
21:05 kmrhb joined #salt
21:09 dthom91 joined #salt
21:20 __Jahkeup__ joined #salt
21:26 matanya joined #salt
21:48 kmrhb joined #salt
21:49 jacksontj joined #salt
21:59 flepied joined #salt
22:01 cewood joined #salt
22:17 kmrhb joined #salt
22:19 mike25ro left #salt
22:22 jslatts joined #salt
22:22 baniir any tips on managing jenkins plugins with saltstack?
22:28 jacksontj joined #salt
22:36 berto- joined #salt
22:45 oz_akan_ joined #salt
22:49 kstaken joined #salt
22:51 L2SHO_ is there some documentation on what can be passed to require?
22:52 aat joined #salt
22:54 zonk1024 L2SHO_: the sls gets compiled down to a dict like object.  you should be able to reference whatever from there.  -require:\n  - file: <the name arg of a file entry from some other sls>
22:55 zonk1024 or at least it seems that way...
22:59 L2SHO_ This is what I have so far but it's not liking it: http://pastebin.com/GEJiGAzN
23:00 L2SHO_ "The state "blah" in sls wordpress is not formed as a list"
23:00 L2SHO_ maybe I need to read up on yaml some more
23:00 ze- what's that blah ?
23:00 zonk1024 you have it a little mixed up… one sec
23:00 ze- remove the blah, and place the 3 on top level ?
23:01 ze- and for require, place: file.managed: /home/...
23:02 zonk1024 L2SHO_: more like http://pastebin.com/muQZ48Xm
23:02 zonk1024 although I haven't used module.run:
23:02 zonk1024 so not sure on the args
23:04 zonk1024 err
23:04 zonk1024 one min
23:06 Damoun joined #salt
23:06 L2SHO_ aha, it works, thanks
23:06 L2SHO_ I just need to play around with the tar args I think
23:07 zonk1024 :)
23:07 ze- anyone used "watch" instead of require and managed to get the expected behaviour ?
23:19 Ryan_Lane joined #salt
23:30 oz_akan_ joined #salt
23:31 Ryan_Lane joined #salt
23:34 kenbolton joined #salt
23:34 cxz joined #salt
23:47 puppet joined #salt

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary