Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-12-15

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

All times shown according to UTC.

Time Nick Message
00:02 bhosmer joined #salt
00:17 srage joined #salt
00:20 penguin_dan joined #salt
00:34 diegows joined #salt
00:36 jfzhu_us I have a .vim plugin directory with quite a few files that i want salt to install on my hosts. The naive way is for me to specify each file via salt and manage it that way but that isn't really scalable. Does any one have any recommendations on how to manage a .vim with salt?
00:37 forresta jfzhu_us, use http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.recurse
00:41 bemehow_ joined #salt
00:41 jfzhu_us forresta: perfect. thnx a lot
00:42 forresta yea np
00:55 srage left #salt
00:56 zandy joined #salt
00:59 pviktori joined #salt
00:59 jpaetzel_ joined #salt
01:02 rojem joined #salt
01:04 jeddi jfzhu_us: I use the file.recurse approach, but if you keep your .vim structure within a git repository, you could use the git state also (I haven't felt the need to, but worth considering)
01:05 bemehow joined #salt
01:05 jeddi given i keep my /srv/salt in a git repository ... I can manage that from almost anywhere.  Note, I don't use salt's gitfs thingy.
01:16 dstanek joined #salt
01:23 penguin_dan joined #salt
01:25 z3uS joined #salt
01:32 z3uS joined #salt
01:33 _ikke_ joined #salt
01:35 z3uS joined #salt
01:37 quanta_ joined #salt
01:39 pviktori joined #salt
01:42 vejdmn joined #salt
01:42 mgw joined #salt
01:48 bemehow_ joined #salt
01:52 z3uS joined #salt
01:56 zandy joined #salt
01:58 bemehow joined #salt
02:14 bemehow_ joined #salt
02:24 elfixit joined #salt
02:30 smccarthy joined #salt
02:35 pviktori joined #salt
02:56 zandy joined #salt
02:58 jfzhu_us1 joined #salt
03:02 lineman60 joined #salt
03:03 jfzhu_us1 jeddi: keeping an individual git/hg repository for .vim seems like a better idea than keeping the .vim in the /srv/salt repository. Thanks for the tip
03:07 quanta_ joined #salt
03:09 _ilbot joined #salt
03:09 Topic for #salt is now Welcome to #salt - SaltConf in January!! http://saltconf.com | 0.17.2 is the latest | Please be patient when asking questions as we are volunteers and may not have immediate answers - Channel logs are available at http://irclog.perlgeek.de/salt/
03:12 quanta_ joined #salt
03:18 dstanek joined #salt
03:21 ajw0100 joined #salt
03:22 defunctzombie joined #salt
03:29 pviktori joined #salt
03:36 markizano joined #salt
03:39 quanta_ joined #salt
03:39 jfzhu_us1 Is it possible to specify the ssh private key when using salt.states.hg. The man page for hg indicates that the ssh key isn't an option that can be specified
03:41 lineman60__ joined #salt
03:45 jeddi there's no 'identity' feature with Hg?    I haven't touched Hg in years, sorry, can't help.
03:45 forresta jfzhu_us1, did you try using the opts option to specify additional commands, and then using --remotecmd from the hg man page?
03:45 forresta yea I'm also pretty worthless with mercurial
03:51 jeddi can you use the runas / user parameters for that state to push to a different id?  bit of a muckaround, i concede.  sure you don't want to use git instead?  :)   alternatively just call a deployed script to do the hg-pull .. also a mess, but you can refactor later as they improve the hg state.
03:54 favadi joined #salt
03:54 jergerber joined #salt
03:56 zandy joined #salt
03:58 jfzhu_us1 Yea I don't have any particular attachment to either so git is an option for me. that being said, i am a stubborn old mule when it comes to these problems so i'll torture myself for a bit before i switch myself over to the mighty git
03:58 forresta jeddi, how would you specify the ssh key in the state when HG itself doesn't support that? You can already pass additional options ot HG from the state, but if the command itself doesn't support the option you're out of luck
04:02 jfzhu_us1 i am guessing hg's ssh key can be specified in the hgrc file so you can store the ssh key on the salt repository and make the hgrc file a pre-req for everything else.
04:14 jergerber joined #salt
04:16 quanta_ joined #salt
04:17 forresta whiteinge are you around?
04:39 zandy joined #salt
04:41 altj joined #salt
05:26 forresta jfzhu_us1, did you figure out a good way to do that?
05:27 altj joined #salt
05:38 jeddi forresta: I meant using cmd.run and doing it the dodgy ol' fashioned way - not trying to use the hg state per se.
05:39 jeddi or, as i say, there were 'runas' and 'user' features .. which if you generated a local user-id on the box you could give it the keys you need, and point the state at that user -- entirely unsure how well that would work, but it sounds as ugly as sin.
05:42 capricorn_1 joined #salt
05:42 jalbretsen joined #salt
05:48 ckao joined #salt
05:49 CheKoLyN joined #salt
05:49 cachedout joined #salt
06:02 forresta jeddi, yea fair enough
06:08 Ryan_Lane joined #salt
06:24 landon__ joined #salt
06:35 jalbretsen joined #salt
06:59 cachedout joined #salt
07:06 jfzhu_us joined #salt
07:20 jslatts joined #salt
07:51 clearclaw joined #salt
07:58 clearclaw I'm investigating Salt and am running into a silly problem: http://pastebin.com/DJaAuYcg  Clues?
08:12 quanta_ joined #salt
08:30 Nazzy_ joined #salt
08:32 Nazzy_ does anyone know, off the top of their head, if returners are run in threads?
08:48 Nazzy_ actually ... does anyone around happen to know where in the code I should be looking for reading the returner calling logic? save me some time back tracing from the module loader
08:49 cetex joined #salt
09:05 agh joined #salt
09:42 rojem joined #salt
09:49 quanta_ joined #salt
09:49 quanta_1 joined #salt
09:54 quanta_ joined #salt
09:57 quanta_ joined #salt
10:04 quanta_ joined #salt
10:07 ajw0100 joined #salt
10:08 clearclaw Found the problem.  "Providers:" at the top of files in /etc/salt/cloud.providers.d/*.conf is implicit and should not be present.
10:29 Guest7946 joined #salt
10:30 BenCoinanke joined #salt
10:31 quanta_ joined #salt
10:34 Nazzy__ joined #salt
10:34 Nazzy__ joined #salt
10:39 marcel_ joined #salt
10:39 Nazzy__ *sigh* this code is confusing ... returners get executed on the minions not on the master?
10:41 yml joined #salt
10:44 quanta_ joined #salt
10:48 brutasse joined #salt
10:48 majoh joined #salt
10:49 quanta_ joined #salt
10:51 pengunix joined #salt
11:00 AviMarcus joined #salt
11:16 xl1 left #salt
11:18 quanta_ joined #salt
11:22 isomorphic joined #salt
11:35 Nazzy joined #salt
11:38 psyl0n joined #salt
11:47 bhosmer joined #salt
11:48 the_drow joined #salt
11:49 elfixit joined #salt
12:04 bhosmer joined #salt
12:13 isomorphic joined #salt
12:18 quanta_ joined #salt
12:34 crashmag joined #salt
12:36 crashmag joined #salt
12:36 crashmag joined #salt
12:39 crashmag joined #salt
12:39 crashmag joined #salt
12:50 elsmorian joined #salt
12:54 diegows joined #salt
12:57 hotbox joined #salt
13:19 wonhunawks joined #salt
13:22 crashmag joined #salt
13:23 crashmag joined #salt
13:24 derelm joined #salt
13:27 the_drow joined #salt
13:27 the_drow Hi guys, is there a state for dpkg? I'd like to install .deb files.
13:31 brucewang the_drow: pkg state, it'll called apt state automatically
13:31 the_drow brucewang: But I'm not installing from a repo. I'm installing vagrant which only has a .deb file.
13:32 the_drow brutasse: Oh I see. I can use source:
13:33 dvl joined #salt
13:47 elsmorian joined #salt
13:53 Ryan_Lane joined #salt
13:54 wonhunawks joined #salt
14:06 elfixit joined #salt
14:06 the_drow How do I get the current running user using pillar?
14:15 the_drow I'd like to create a folder in all available home folders, is that possible?
14:16 pdayton joined #salt
14:21 quanta_ joined #salt
14:29 elfixit joined #salt
14:29 Sheco joined #salt
14:36 nebuchadnezzar the_drow: something like http://paste.debian.net/70961/ ?
14:36 the_drow nebuchadnezzar: wonderful! thanks
14:37 the_drow nebuchadnezzar: How do I get the username from that?
14:45 quanta_ joined #salt
14:48 quanta_ joined #salt
14:54 Ryan_Lane joined #salt
14:55 nebuchadnezzar arf, the drow has quit
14:57 crashmag joined #salt
14:57 crashmag joined #salt
15:01 smccarthy joined #salt
15:02 pengunix joined #salt
15:04 jeddi nebuchadnezzar: note that checking /home/* shows users with home directories under /home - not necessarily all users.
15:05 jeddi I predict Much Fun lies in your future.
15:14 Sheco joined #salt
15:26 cachedout joined #salt
15:36 the_drow joined #salt
15:40 pengunix_ joined #salt
15:41 isomorphic joined #salt
15:42 jslatts joined #salt
15:47 nebuchadnezzar jeddi: I'm quite new to salt, this was a quick and dirty, since I looked at users.getent ;-)
15:47 nebuchadnezzar user.getent
15:48 quanta_ joined #salt
15:48 nebuchadnezzar but now I need to filter all system users
16:16 nebuchadnezzar jeddi: looks better http://paste.debian.net/70972/ ;-)
16:21 penguin_dan joined #salt
16:29 the_drow Hi, I can't install anything using npm 1.3.17. npm list --json --global "karma-firefox-launcher" exits with 1. Is that a bug in salt?
16:32 zandy joined #salt
16:37 higgs001 joined #salt
16:38 the_drow Yup it's a bug and it's fixed in develop. Thanks anyway
16:44 penguin_dan joined #salt
16:49 nebuchadnezzar the_drow: maybe a better way to do the create-dir-stuff http://paste.debian.net/70978/
16:49 nebuchadnezzar I'm still trying to undestand the whitespace controll stuff
16:49 the_drow whitespace control?
16:49 the_drow nebuchadnezzar: btw, that looks awesome :)
16:50 nebuchadnezzar the_drow: http://jinja.pocoo.org/docs/templates/#whitespace-control
16:50 harobed joined #salt
16:51 nebuchadnezzar the_drow: I' writing in a template and saw spurious blank lines
16:51 aleszoulek joined #salt
16:51 harobed joined #salt
16:53 scoates is there best practices documentation for running a salt master on a public network?
16:54 the_drow I haven't seen one. No.
16:55 higgs001 joined #salt
16:58 dvl joined #salt
17:06 penguin_dan joined #salt
17:14 rojem joined #salt
17:15 troyready joined #salt
17:16 penguin_dan joined #salt
17:18 penguin_dan joined #salt
17:26 zandy joined #salt
17:34 jalbretsen joined #salt
17:36 elsmorian joined #salt
17:39 fllr joined #salt
17:44 matanya joined #salt
17:49 jpaetzel_ joined #salt
17:54 Sheco joined #salt
17:56 jfzhu_us joined #salt
18:01 vejdmn joined #salt
18:06 elfixit joined #salt
18:10 jslatts joined #salt
18:14 zandy joined #salt
18:20 matanya joined #salt
18:21 matanya joined #salt
18:24 fllr joined #salt
18:25 _fllr_ joined #salt
18:30 jakubek joined #salt
18:45 Sheco joined #salt
18:56 zandy joined #salt
19:23 penguin_dan joined #salt
19:26 nicksloan joined #salt
19:26 nicksloan left #salt
19:26 honestly joined #salt
19:32 dvl joined #salt
19:38 jergerber joined #salt
19:39 jfzhu_us Is there a way to output what a template will look like after some jinja code has been evaluated on the salt minion?
19:49 penguin_dan joined #salt
19:52 pengunix joined #salt
19:56 zandy joined #salt
19:59 rojem joined #salt
20:00 xt joined #salt
20:00 rojem joined #salt
20:14 penguin_dan joined #salt
20:18 Ryan_Lane joined #salt
20:20 meteorfox joined #salt
20:21 nebuchadnezzar is there any best practices for states and pillar layout? http://paste.debian.net/71015/
20:21 dvl joined #salt
20:21 nebuchadnezzar looks like using gitfs will require the states and pillar top directory to be different like in option1
20:24 ajw0100 joined #salt
20:28 rgarcia_ joined #salt
20:29 fllr joined #salt
20:33 meteorfox joined #salt
20:35 meteorfox joined #salt
20:41 sroegner joined #salt
20:43 fllr joined #salt
20:56 zandy joined #salt
20:58 zandy joined #salt
21:03 shadfc_ joined #salt
21:05 cewood joined #salt
21:09 shadfc_ hey guys, i'm having some trouble installing something (graphite) into a virtualenv with pip. http://goo.gl/MXYwgS
21:10 shadfc_ ah poop, one sec. i see a typo
21:15 \ask joined #salt
21:19 Ryan_Lane joined #salt
21:19 Ryan_Lane joined #salt
21:20 derelm joined #salt
21:21 blast_hardcheese joined #salt
21:22 rojem joined #salt
21:23 ajw0100 joined #salt
21:26 meteorfox joined #salt
21:28 derelm joined #salt
21:30 meteorfox joined #salt
21:39 pengunix joined #salt
21:42 dvl joined #salt
21:44 mgw joined #salt
21:48 bhosmer joined #salt
21:51 forresta joined #salt
21:52 meteorfox joined #salt
21:56 zandy joined #salt
21:58 meteorfox joined #salt
22:10 prime` joined #salt
22:10 oz_akan_ joined #salt
22:12 prime` left #salt
22:13 prime` joined #salt
22:13 prime` hi, guys
22:14 forresta hello
22:14 prime` Can I ask you some help?
22:14 forresta yea just post your question, if someone knows the answer they usually say so
22:15 psyl0n joined #salt
22:15 prime` I'm trying to write custom grains that would determine host datacenter based on its hostname
22:16 prime` but when i try to access __grain__['host'] variable
22:16 prime` i get a KeyError
22:16 NotreDev joined #salt
22:16 elsmorian joined #salt
22:17 forresta prime`, just as a question, since you know that a specific hostname is tied to a specific dataenter, why don't you just use the hostname grain?
22:17 forresta and for your custom grain, did you review https://github.com/saltstack/salt/blob/develop/salt/grains/core.py for examples?
22:20 Ryan_Lane joined #salt
22:20 prime` I need to know datacenter because i need to refer to other hosts inside datacenter
22:21 prime` to be more specific
22:21 prime` I got two datacenters
22:22 prime` And I want to configure kafka inside each of them
22:22 meteorfox joined #salt
22:22 forresta fair enough
22:22 prime` So I need local zookeeper hostname inside kafka config
22:23 Sheco joined #salt
22:23 prime` http://paste.org/69281 - here is the code
22:24 prime` Is it possible to use __grains__ variable inside grains itself?
22:24 prime` I can't find such example in grains/core.py
22:25 forresta prime`, I don't think so, if you look at the examples I link you can see that the grains are always a dict that is defined in each function.
22:26 forresta have you considered using pillar?
22:27 forresta so you could just do  {% if grains['hostname'] == 'asdf' %} \n datacenter: zxcv
22:27 forresta similar to how the example half way down this section works http://docs.saltstack.com/topics/pillar/#declaring-the-master-pillar
22:27 cachedout joined #salt
22:28 prime` Can i use regular expressions in {% if %}?
22:29 forresta jinja2 doesn't support regex, the best thing is replace: http://jinja.pocoo.org/docs/templates/#replace
22:29 forresta here is an example of a dude using it: http://stackoverflow.com/questions/12791216/how-do-i-use-regular-expressions-in-jinja2
22:29 forresta prime`, you might be able to use mako instead of jinja, but I'm not familiar with mako at all
22:30 prime` I think I'll just use socket.gethostname()
22:30 forresta cool
22:30 prime` And finish my grain
22:30 prime` Thank you for your help
22:31 forresta yea np
22:31 prime` left #salt
22:34 meteorfox joined #salt
22:37 penguin_dan joined #salt
22:38 ajw0100 joined #salt
22:41 amahon joined #salt
22:43 jslatts joined #salt
22:44 pengunix_ joined #salt
22:51 zandy joined #salt
22:52 foxx joined #salt
22:54 higgs001 joined #salt
23:00 jfzhu_us How does one check for an existence of a linux user in salt?
23:00 jfzhu_us the existence*
23:00 penguin_dan joined #salt
23:00 forresta jfzhu_us, you just use user.present
23:01 forresta other than doing a cmd.run I don't think there's another way within salt to simply do a check to see if a user exists or not
23:01 jfzhu_us forresta: Doesn't that create the user? I am working on the assumption that I don't want to create the user if the user exists but I want to configure the user if they do exist
23:01 forresta jfzhu_us, yea that would create the user.
23:02 jfzhu_us Ah okay. I guess I'll write a python script that checks for the existence of a user and then generate the necessary yaml if it does
23:03 Ryan_Lane joined #salt
23:03 forresta you could also get fancy and use pillars like UtahDave has here: https://gist.github.com/UtahDave/3785738
23:04 forresta and create subsections and such
23:24 elsmorian joined #salt
23:24 penguin_dan joined #salt
23:35 penguin_dan joined #salt
23:38 ajw0100 joined #salt
23:55 jullyett joined #salt
23:55 Ryan_Lane joined #salt

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