Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-11-08

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

All times shown according to UTC.

Time Nick Message
00:00 hal58th Most likely, I'm trying to remember the jinja2 escape method
00:01 hal58th Try host: {{ % }}
00:04 eliasp that would expect a variable named %
00:07 dergrunepunkt eliasp: didn't work
00:10 hal58th Try just quoting the value. host: "%"
00:11 hal58th also single quotes
00:11 aparsons joined #salt
00:15 hightower4 joined #salt
00:16 hightower4 left #salt
00:16 aparsons joined #salt
00:22 teebes joined #salt
00:25 gngsk If anyone with commit access to the saltstack-formulas github repo could merge my PR (https://github.com/saltstack-formulas/iptables-formula/pull/5) for the iptables docs, I think it'd save anyone using it some headaches.
00:29 glyf joined #salt
00:34 sxar joined #salt
00:35 bhosmer joined #salt
00:37 whiteinge gngsk: thanks for the fix and for the bump here! Sorry for the slow merge.
00:37 gngsk np, ty
00:37 keekz joined #salt
00:47 teebes joined #salt
00:47 giantlock joined #salt
00:48 blake joined #salt
00:50 Ahlee hrm.  windows minions throwing back No Top file or external nodes data matches found, linux hosts are fine.  There's 'kernel:Linux': with -match:grain above, below that is 'kernel:Windows': -match: grain, states defined under it
00:50 Ahlee thoughts?
00:50 tkharju joined #salt
00:54 to_json joined #salt
00:59 jalaziz_ joined #salt
01:01 aparsons_ joined #salt
01:01 Pixionus So, if a command is issued from Master and the minion is not up to receive the command is the command perchance cached to be issued when the minion comes back up?  (this would be undesirable in this particular case)
01:01 Pixionus used salt '*' cmd.run 'command'
01:04 aparsons joined #salt
01:04 snuffeluffegus joined #salt
01:08 jalaziz joined #salt
01:10 Ahlee swierd.  Running cp.get_file salt://top.sls C:/top.sls and rerunning with env=base go it running
01:10 Ahlee Pixionus: no.
01:10 Ahlee If the minion isn't responding, it will not be scheduled
01:10 Pixionus cool.  That's what I thought but it would have been bad if I was wrong.
01:11 Ahlee just be wary of systems that aren't returning in times you expect
01:11 Pixionus ?
01:13 Pixionus Not sure what you mean by that.
01:14 Ahlee salt is asyncronous
01:14 Ahlee if a minion can't return in the default time period (5 seconds)
01:14 Ahlee minions can appear 'down' but are really happily running the targetted commmands
01:16 cads joined #salt
01:19 lopezio_ joined #salt
01:19 dave_den joined #salt
01:19 msciciel1 joined #salt
01:21 dark_helmet joined #salt
01:21 Ahlee taunting you with it's poutine and, um, ham?
01:21 Ahlee er.  whoops.  wrong channel there.
01:21 muss joined #salt
01:21 aqua^lsn joined #salt
01:22 chitown joined #salt
01:22 deanz joined #salt
01:22 Hipikat joined #salt
01:22 N-Mi_ joined #salt
01:22 N-Mi_ joined #salt
01:22 vu joined #salt
01:22 godzilla74 left #salt
01:22 sarlalia1 joined #salt
01:22 nihe joined #salt
01:23 renoirb joined #salt
01:23 NaPs joined #salt
01:24 jasonrm joined #salt
01:24 Yoda-BZH joined #salt
01:24 Yoda-BZH joined #salt
01:27 aqua^mac joined #salt
01:37 diegows joined #salt
01:39 JlRd joined #salt
01:39 Pixionus ah thanks.
01:39 Pixionus and lol
01:44 rojem joined #salt
01:45 bezeee joined #salt
01:52 TTimo joined #salt
01:53 nitti joined #salt
01:59 elfixit1 joined #salt
02:05 bezeee joined #salt
02:07 XenophonF joined #salt
02:08 XenophonF can I access environment variables in a Jinja template?
02:08 Ryan_Lane XenophonF: yes
02:09 Ryan_Lane XenophonF: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.environ.html#module-salt.modules.environ
02:14 Ryan_Lane XenophonF: for instance: {{ salt['os.environ']('MYVAR') }}
02:15 teebes joined #salt
02:23 bhosmer joined #salt
02:42 aparsons joined #salt
02:55 hasues joined #salt
02:55 hasues left #salt
03:10 XenophonF Ryan_Lane: thanks much
03:13 ikanobori_ joined #salt
03:15 graph1x joined #salt
03:16 aqua^mac joined #salt
03:18 kwmiebach joined #salt
03:19 bezeee joined #salt
03:21 pacopablo joined #salt
03:22 rcsheets joined #salt
03:42 ggillies joined #salt
03:50 webby__ joined #salt
03:56 racooper joined #salt
04:00 thayne joined #salt
04:00 viq joined #salt
04:07 intellix joined #salt
04:12 bhosmer joined #salt
04:15 snuffeluffegus joined #salt
04:25 jalaziz joined #salt
04:39 bhosmer joined #salt
04:47 jalbretsen joined #salt
04:59 tligda joined #salt
05:05 aqua^mac joined #salt
05:06 beneggett joined #salt
05:21 iwishiwerearobot joined #salt
05:25 pfallenop joined #salt
05:33 Reiner038 joined #salt
06:01 bhosmer joined #salt
06:15 catpigger joined #salt
06:16 Katafalkas joined #salt
06:21 modafinil_ joined #salt
06:37 ghanima joined #salt
06:43 simonmcc joined #salt
06:44 m0nky joined #salt
06:44 gyre007 joined #salt
06:53 aqua^mac joined #salt
06:59 wiqd joined #salt
06:59 funzo joined #salt
07:00 Rycher007 joined #salt
07:50 bhosmer joined #salt
08:05 cberndt joined #salt
08:26 Eugene joined #salt
08:27 ProT-0-TypE joined #salt
08:27 Eugene joined #salt
08:37 epcim joined #salt
08:42 aqua^mac joined #salt
08:49 tkharju joined #salt
09:39 bhosmer joined #salt
09:58 Mso150_d_y joined #salt
10:06 intellix joined #salt
10:18 Mso150_d_y joined #salt
10:31 aqua^mac joined #salt
10:34 jhauser joined #salt
10:36 krak3n` joined #salt
10:42 bhosmer joined #salt
10:47 iwishiwerearobot joined #salt
10:50 bhosmer joined #salt
10:53 linjan joined #salt
11:05 evidence joined #salt
11:07 glyf joined #salt
11:22 ndrei joined #salt
11:27 ProT-O-TypE joined #salt
11:28 bhosmer_ joined #salt
11:35 alexr joined #salt
11:36 muss joined #salt
11:45 jdmf joined #salt
11:47 jdmf joined #salt
11:48 jdmf joined #salt
11:49 rypeck joined #salt
11:50 jdmf joined #salt
11:51 jdmf joined #salt
11:52 jdmf joined #salt
11:53 jdmf joined #salt
11:55 jdmf joined #salt
11:56 jdmf joined #salt
12:20 aqua^mac joined #salt
12:22 crocket joined #salt
12:22 crocket Minions
12:22 crocket Behold
12:22 crocket The master is back.
12:24 dork sorry this is a masterless config your authority isn't acknowledged
12:36 iwishiwerearobot joined #salt
12:37 alexr joined #salt
12:49 diegows joined #salt
12:51 arnoldB dork++
12:54 mapu joined #salt
12:59 monkey661 joined #salt
12:59 TTimo joined #salt
13:03 crocket left #salt
13:06 JlRd joined #salt
13:06 happyfish joined #salt
13:15 ndrei joined #salt
13:16 bhosmer joined #salt
13:21 mapu joined #salt
13:25 geekatcmu joined #salt
13:36 to_json joined #salt
14:04 intellix joined #salt
14:09 aqua^mac joined #salt
14:10 peters-tx joined #salt
14:18 to_json left #salt
14:22 ndrei joined #salt
14:36 gyre007 joined #salt
14:38 teebes joined #salt
14:40 JonGretar_ joined #salt
14:44 mihait joined #salt
14:45 CaptTofu joined #salt
14:47 kusams joined #salt
14:54 rojem joined #salt
14:58 meylor joined #salt
15:05 bhosmer joined #salt
15:15 to_json joined #salt
15:23 evidence joined #salt
15:24 thayne joined #salt
15:36 TTimo joined #salt
15:51 TTimo joined #salt
15:52 ndrei joined #salt
15:58 webby_ joined #salt
15:58 aqua^mac joined #salt
16:01 seydu joined #salt
16:19 rojem joined #salt
16:20 teebes joined #salt
16:29 monkey66 joined #salt
16:29 TTimo joined #salt
16:34 troyready joined #salt
16:35 RobotsOnDrugs joined #salt
16:36 linjan joined #salt
16:41 rogst joined #salt
16:43 linjan joined #salt
16:45 glyf joined #salt
16:54 bhosmer joined #salt
17:00 ajolo joined #salt
17:02 hasues joined #salt
17:03 hasues left #salt
17:13 linjan joined #salt
17:17 zlhgo joined #salt
17:17 Rycher007 joined #salt
17:20 aw110f joined #salt
17:33 stan_k SheetiS: thanks. that's about what i was expecting, but i didn't realize how straightforward that can be.  (re:reactor)
17:34 Ahlee stupid JID not responding to kill_job or signal_job 9
17:39 atbell joined #salt
17:44 bhosmer joined #salt
17:46 catpigger joined #salt
17:47 aqua^mac joined #salt
17:50 catpiggest joined #salt
17:53 aw110f joined #salt
17:54 hasues joined #salt
17:55 hasues left #salt
17:57 catpig joined #salt
17:58 dalexander joined #salt
17:59 aw110f_ joined #salt
18:00 dalexander joined #salt
18:02 iwishiwerearobot joined #salt
18:04 cads joined #salt
18:05 atbell joined #salt
18:06 atbell joined #salt
18:06 rojem joined #salt
18:09 elfixit1 joined #salt
18:14 TheThing joined #salt
18:15 CaptTofu joined #salt
18:18 catpigger joined #salt
18:29 bhosmer joined #salt
18:37 faust joined #salt
18:43 bhosmer_ joined #salt
18:51 smcquay joined #salt
18:52 smcquay joined #salt
18:53 CeBe joined #salt
18:54 TTimo joined #salt
19:01 dalexander joined #salt
19:03 ZmodemZ joined #salt
19:04 ZmodemZ I am trying to write a custom salt module and when I attempt to call __grains__ in my module it excepts as "__grains__ is not defined"
19:04 ZmodemZ am I missing something obvious?
19:07 babilen ZmodemZ: Could you paste the exact code? It is monkey patched into the module later on and you are probably using it at evaluation time not runtime.
19:07 babilen (evil monkey patching)
19:09 ZmodemZ http://pastebin.com/4BwNBQGA
19:10 babilen ZmodemZ: And make the web a better place and don't use the worst pastebin website imaginable. Use one of the good alternatives such as: http://refheap.com, https://gist.github.com, http://paste.debian.net, http://bpaste.net, ...
19:10 ZmodemZ eeek
19:10 ashb ZmodemZ: at a guess __grains__ is only imported/magiked in to your module later on in the import process
19:11 ashb the __dunder__ vars are *crazy* magic
19:11 ashb as babilen suggested - __grains__ will only exist inside methods
19:11 babilen ZmodemZ: Yeah, you cannot use __grains__ at that point (as it is not defined) -- I typically have "__salt__ = None" and "__grains__ = None" at the beginning, but you can only use it within functions you call
19:11 babilen I really dislike the monkey patching that is going on there
19:12 ZmodemZ ahhh okay just trying to keep with the DRY
19:12 ZmodemZ and not have __grains__ scattered all over my code
19:12 babilen And you don't have a single function in there
19:12 ZmodemZ Oh I know ;)
19:12 ZmodemZ Just a start
19:13 ashb os.chdir()!?
19:13 ZmodemZ absolutly
19:13 ZmodemZ why not?
19:13 ashb for just loading a module?
19:13 babilen ZmodemZ: Define it in a single space and write an "accessor" method to get those values out of a dictionary (in which keys are the values of some grain)
19:13 ZmodemZ This will be for downloading a tar from a given location and unpacking it and running its content
19:13 babilen And please use os.path.join to join paths rather than hardcode that yourself
19:13 babilen :)
19:14 * babilen stops looking now
19:14 ashb ZmodemZ: you might be interested in https://github.com/saltstack/salt/issues/16590 (not that it exists yet)
19:14 babilen I dislike the design I detailed above, but it is the best you get with that crazy gang of monkeys
19:20 bhosmer joined #salt
19:22 Gareth morning morning
19:28 ckao joined #salt
19:34 to_json joined #salt
19:34 TOoSmOotH joined #salt
19:36 aqua^mac joined #salt
19:37 mgw joined #salt
19:37 catpigger joined #salt
19:41 mapu joined #salt
19:42 teebes joined #salt
19:43 linjan joined #salt
19:44 chitown joined #salt
19:45 dork up chitown
19:45 dork sup*
19:46 chitown irssi issues this morning :/
19:46 atbell joined #salt
19:46 chitown user error
19:47 dork you from chicago?
19:47 babilen (/msg maybe?)
19:48 * dork eyeroll
19:48 chitown dork: not anymore
19:48 chitown grew up there
19:52 ThomasJ|d joined #salt
19:52 to_json joined #salt
20:02 dalexander joined #salt
20:04 meylor joined #salt
20:05 meylor joined #salt
20:05 Mso150_d_y joined #salt
20:07 possibilities joined #salt
20:10 hopthrisC joined #salt
20:11 Cottser I asked this question in here a few days ago so I apologize for the repeat, but didn't get a response and it seems like a good/slow time to ask :)
20:11 Cottser I've seen a few examples in the wild and blog posts of state IDs using whitespace, dots, etc. is this alright or am I going to regret going down that path? Should I stick to dashes, underscores, etc.?
20:12 Cottser Here's an example: http://ryandlane.com/blog/2014/09/02/saltstack-patterns-grainstate/
20:14 jdmf joined #salt
20:16 chitown i have not run into any problems with dots... but, spaces seems like a bad idea
20:16 chitown also, to maintain consistency, i started using underscores almost exclusively
20:17 chitown but, that's more of an OCD thing on my side... we still have a lot of states with dashes in them
20:23 Setsuna666 joined #salt
20:26 Rycher007 Anyone try issuing a curl command via state files(e.g init.sls)?
20:26 Rycher007 getting a yaml render error when trying
20:31 bhosmer joined #salt
20:34 jaimed joined #salt
20:35 dave_den Rycher007: can you gist your curl state?
20:41 Rycher007 Hi dave…I private messaged you the gist
20:43 dave_den and i replied
20:47 bhosmer joined #salt
20:52 TTimo joined #salt
20:55 otter768 joined #salt
21:03 dalexander joined #salt
21:07 Mso150_d_y joined #salt
21:11 kossy joined #salt
21:13 TyrfingMjolnir joined #salt
21:13 kossy joined #salt
21:24 aqua^mac joined #salt
21:25 kossy joined #salt
21:36 aquinas joined #salt
21:40 iwishiwerearobot joined #salt
21:58 to_json joined #salt
21:59 tristianc joined #salt
22:02 tligda joined #salt
22:03 agend joined #salt
22:04 dalexander joined #salt
22:08 epcim_ joined #salt
22:20 bhosmer_ joined #salt
22:23 linjan joined #salt
22:33 atbell joined #salt
22:35 mietki joined #salt
22:36 mietki Hi guys, I'm fairly new to salstack and the amount of training materials is way too big. Could you recommend the best (in your opinion) book?
22:38 babilen mietki: I'd read: 1. http://docs.saltstack.com/en/latest/topics/tutorials/index.html (up to "Advanced Topics") 2. http://docs.saltstack.com/en/latest/topics/best_practices.html 3. http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html 4. http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
22:39 babilen mietki: There is also a good O'Reilly book in the making: http://shop.oreilly.com/product/0636920033240.do
22:39 babilen (but that one isn't finished yet, but the first chapters are a nice read)
22:40 mietki babilen thanks a lot :)
22:40 mietki I've just jumped into a new job
22:40 mietki where people are already deploying with salt and ansible
22:40 babilen If you have specific questions this channel is typically quite active and helpful (at least during the week)
22:41 mietki all my previous experience was puppet
22:41 babilen Ah, you are in for some (nice) changes then and a lot more of a "new" platform feeling.
22:41 babilen (good and bad that is)
22:42 mietki well, I am really proficient puppet user with almost 2,5yrs of experience... it was my first week with salt and I must admit it is waaaay more elegant than puppet
22:43 mietki in its declarative syntax
22:43 mietki and its also faster as well
22:43 mietki but I really need to get more awareness in whats being done there
22:44 mietki thats great to know what you've just said about this channel
22:44 chitown 22:38 < babilen> mietki: There is also a good O'Reilly book in the making: http://shop.oreilly.com/product/0636920033240.do
22:44 chitown fyi: thats my book if you comments/questions :)
22:45 chitown its still pretty rough... and, yes, a fair number of typos :/
22:46 aparsons joined #salt
22:46 mietki Keep my fingers crossed on getting it published :)
22:46 mietki *anyway
22:46 mietki thank you for your help
22:46 mietki i'm getting to work with this  material then
22:46 mietki cheers!!
22:47 babilen chitown: I'm looking forward to it being finished. If you want to do me a favour you guys would include a large chapter on "How to structure your salt infrastructure" (i.e. not "how to structure a single formula, sls, state", but the global view)
22:47 babilen Think API design for salt
22:48 babilen mietki: Ping me these days and I happily make my salt playground available (packer definition (qemu libvirt) + vagrant setup for master/minion)
22:48 chitown babilen: yes, the toplogy chapter will go over, master-less, syndic and peer
22:49 babilen No, not topology
22:49 aparsons_ joined #salt
22:49 chitown you mean diff envs?
22:49 chitown not sure what you're after...
22:49 babilen No, rather how to structure your salt states on a more global level
22:50 chitown you mean how states, grains and pillars can all work together?
22:50 babilen So would you, say, implement a "website.{example_com,foo_org}" state and include everything needed for that in there and then target that to a box or would you do the mixing in top.sls
22:51 babilen Would it be nice to have pkg.{foo,bar,baz} states or just use {foo,bar,baz} to begin with.
22:51 stan_k that please
22:51 stan_k website.{example_com,foo_org}
22:51 babilen Essentially: file/directory structure and semantics for file_roots
22:51 stan_k i literally just came here to ask for advice on that.
22:52 chitown thinking...
22:52 babilen stan_k: Well, I do use the website.{foo_org,bar_com} approach, but I lack a bit of expose to *other* large setups and it would be great to have a discussion about different approaches
22:53 stan_k i'm very much struggling with this problem, and what approaches make sense.
22:53 babilen I mean not only that, but just the general "How to structure your file_roots so that you are most flexible and effective?"
22:54 chitown k... i'll definitely give that some more thought.
22:54 babilen And it is an area in which you find little to no information and most people don't make the entirety of their salt setup available. You find lots of stuff on how to write single states or even formulas, but not the more global questions.
22:54 chitown that is kind of in there now... but, not quite as explicit as what you may be looking for
22:54 possibilities joined #salt
22:55 chitown ya, i had been appraoching it about where to put data: eg. this belongs more in pillars and not in grains
22:55 babilen chitown: Feel free to bug me. It is just the area that I most struggle with given that I essentially just have my own "api design instincts" to go by, but just like "How to organise your home dir" there are various approaches and just hearing about them gives you something to work with or adopt.
22:55 chitown k. i'll def ping you
22:56 chitown i am trying to get a baseline right now. but, there is a lot more work coming and the opportunity for more/less
22:57 chitown eg; someone had asked about requisites. right now, that is kinda glossed over. but, i am going back and refreshing that... most likely this week
22:57 seydu joined #salt
22:57 babilen Just thought I mention it because I think that that is an area that definitely needs some documentation and a book seems to be the right format.
22:58 chitown ya, thats exactly the kind of feedback i need :)
22:58 babilen I mean just actual examples from various larger salt deployments would help tremendously, but maybe one can figure out some basic principles in the design
22:58 stan_k the scenario where you apply n vhosts to all apache servers is pretty straightforward, but gracefully applying specific vhosts to pools of apache servers is much harder for me to wrap my head around.
22:59 stan_k "these three sites are on web1,2,3 and these other ten are on web4,5,6,7,8"
22:59 babilen The whole question of "Should I do: "- apache - redis - ..." in top.sls or have "include: - apache - redis ..." in websites.foo_com  and target that?
23:00 babilen stan_k: What I do right now is a combination .. I essentially target basic services directly in top.sls (i.e. essentially everything I use a formula for) and then have "sites" that configure that service for the actual website. That includes creating the directories, managing configuration files, running a2ensite (for apache), ...
23:01 stan_k more like "should i do websites.foo_com or should i do websites.sls and put definitions of foo.com, bar.org, baz.net and what hosts have them in pillar or something"
23:01 stan_k nod
23:01 babilen So that I have "- apache - sites.example_com" in top.sls ... I had all sorts of includes in sites.example_com" to begin with, but that made it quite hard to figure out where things come from ...
23:02 babilen I mean I still end up including, say, apache.service so that I can use it in a watch statement, but I don't care about repeating myself
23:02 canci joined #salt
23:02 babilen It still doesn't feel right and I am looking for inspiration or, essentially, very opinionated people that tell me that what I do is shit and that I should do it differently.
23:02 babilen I can then decide if I like their opinion or not and adopt what I like.
23:03 babilen Right now it is all a bit "improvised" / "grown" without actual design principles. I try to keep it as generic as possible, but other examples would be great.
23:04 babilen stan_k: Ah, and I define actual websites mostly in pillars (but the same applies there) and generate configuration files from that data
23:04 babilen I am very pillar driven
23:04 dalexander joined #salt
23:05 joehoyle joined #salt
23:06 bhosmer joined #salt
23:06 stan_k i really like the romantic idea of simple readable yaml that describes a site, and then states that use that data to derive configs
23:06 stan_k i.e. https://bpaste.net/show/04507fb61813
23:06 stan_k but putting what amounts to targeting string in pillar data is weird
23:06 stan_k and Feels Wrong
23:08 stan_k grabbing dinner. bbl
23:10 pssblts joined #salt
23:11 catpiggest joined #salt
23:13 aqua^mac joined #salt
23:13 pppingme joined #salt
23:16 TaiSHi joined #salt
23:16 TaiSHi joined #salt
23:17 tempspace joined #salt
23:17 saggy joined #salt
23:18 pviktori joined #salt
23:18 bhosmer joined #salt
23:18 redondos- joined #salt
23:18 A||SySt3msG0 joined #salt
23:18 micko joined #salt
23:19 linjan joined #salt
23:27 alexr joined #salt
23:34 cpt-oblivious joined #salt
23:46 MorbusIff joined #salt
23:47 catpigger joined #salt
23:52 jagardaniel joined #salt
23:56 diegows joined #salt
23:58 catpiggest joined #salt

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