Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-11-25

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

All times shown according to UTC.

Time Nick Message
00:00 RandyT_ Just added to this gist https://gist.github.com/rterbush/906902b486143d25da4d the trace output... appears that Python is looking in the PATH for modules to load.
00:00 murrdoc Gareth:  true, but now if i want to pass in args to it
00:00 murrdoc what does the yaml look like
00:00 techblaze joined #salt
00:00 RandyT_ This is a windoze install, so appears that I could be missing a path to site-packages?
00:00 Matt__ joined #salt
00:01 Matt__ Howdy, Don't suppose anyone has experience referencing grains from within mako templates?
00:01 RandyT_ strange it works from cmdline...
00:01 forrest Gareth, How's Azure going? /troll
00:01 forrest Matt__, I unfortunately don't. I have an issue open to create a Mako tutorial, but I have almost no familiarity with it.
00:01 Matt__ Hah, going to be tricky to write the tutorial
00:01 Gareth forrest: fortunately done with it for now :)
00:02 forrest Awesome
00:02 forrest Matt__, Yeah whoever does it either needs to be familiar with Mako, or willing to learn it, and I'm not willing to dump time into that right now since so few people use Mako
00:03 iggy chamunks: no... I suspect because most people avoid multi-master presently
00:04 Matt__ forrest: Scoured the net and looked through the render file, seems the renderer has some concept grains, but I can't seem to reference them. Found this http://stackoverflow.com/questions/20897796/using-the-output-of-salt-to-be-used-as-input-for-an-sls-state-or-pillar However if I call salt in that fashion I get the error 'salt' is not defined -_-
00:06 forrest Matt__, These mako docs are brutal, holy shit
00:06 Matt__ Salt has literally no docs on Mako :P
00:07 Matt__ The 'Read the docs' page is like, here's the renderer, have fun.
00:07 forrest yeah, like I said almost no one uses mako in the salt community, you are one of probably 3 people I've spoken to in over 2 years using it
00:08 forrest Matt__, I don't even get how you do variable substitution in mako
00:08 Gareth murrdoc: looks like I had started a runner to manage master schedules, clearly I should revist it.
00:08 kitplummer joined #salt
00:08 Matt__ Hah, we only use it in two states, mainly because it went from a 20 in Jinja, to a 5 line mako
00:08 forrest Matt__, Ahh
00:08 Matt__ Forrest: ${ foo }
00:09 forrest Matt__, Are you trying to do an if statement based on grains?
00:09 forrest or just the grain itself?
00:10 Matt__ Yeah
00:10 Matt__ Well, either
00:10 Rumbles joined #salt
00:10 Matt__ Just need to reference the grain value
00:10 forrest because can't you use % if 'asdf' in salt['grains.get']('grain'): \n shit to do % endif
00:10 forrest Matt__, okay, so ${ salt['grains.get']('grain') } I'm assuming doesn't work
00:10 Matt__ Yup yup, the if syntax stuff is easy
00:10 onlyanegg joined #salt
00:10 Matt__ It's getting the grain that's hard
00:10 forrest Matt__, Dumb question here, are you setting up the rendering properly?
00:10 hightekvagabond joined #salt
00:11 Matt__ Possibly not hah
00:11 whytewolf Matt__: this worked. but i don't seem to be able to get the grains.get stuff ${grains['os']}
00:11 Matt__ One sec, let me try it outside the main python block
00:11 forrest Matt__, Make sure you add #!jinja|mako|yaml to the first line of the file as well
00:12 forrest because the example uses mako
00:12 shaggy_surfer joined #salt
00:12 aqua^c joined #salt
00:12 forrest ${grains['saltversion']}
00:12 mr-op5 joined #salt
00:13 forrest Matt__, ^
00:14 forrest whytewolf, Seems weird you can't use the grains.get
00:14 forrest because using that is a lot better than grains['thing'] since it changes how it gets recognized so you can use it in a wider variety of situations
00:14 whytewolf forrest: apperently it doesn't like salt.grains.get but salt['grains.get'] did work
00:14 forrest whytewolf, weird
00:14 forrest but okay, since I did that anyways
00:15 whytewolf I started switching my jinja to use salt.<module>.<function> cause it just looks more readable to me
00:15 forrest totally fair
00:16 forrest whytewolf, Also, I never found that user.exists stuff, there's no doc page for a user module
00:16 forrest unless it's named something different
00:16 forrest https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.user.html is just a 404
00:16 whytewolf forrest: cause the user modules are spread out. user is just a virtual
00:17 forrest Ahh that makes sense
00:17 Bryson joined #salt
00:17 forrest Not very helpful for people though, lol
00:17 Matt__ forrest: Balls, Okay. So ${ salt['grains.get']('aws-region')} works fine. Problem is, It doesn't work when you do it in the python block at the start of the file
00:17 forrest Matt__, In the python block at the start of the file?
00:17 Matt__ It only works when you do it as a string print
00:17 forrest Are you trying to run this inside python code?
00:18 Matt__ Yeah
00:18 * forrest takes hands off the keyboard.
00:18 Matt__ :P
00:18 forrest Just use straight python code then
00:18 whytewolf lol no it isn't. someone should add all the virtual modules to the documentation index
00:18 forrest fuck it
00:18 forrest whytewolf, Can you create an issue for that?
00:18 Matt__ Haha, Yup. I got that working in 3 lines, was just hoping the renderer could process it directly
00:18 forrest Matt__, And you already added the renderers to the top of the file?
00:19 whytewolf forrest: sure
00:19 Matt__ Yup
00:20 forrest Matt__, If you have ptyohn as well, you need to make sure the order is right, so maybe try #!mako|py|yaml
00:20 forrest whytewolf, Thanks
00:20 forrest Matt__, Could be it's trying to run the python code prior to the mako being interpreted?
00:20 bfoxwell joined #salt
00:20 onlyanegg joined #salt
00:21 Matt__ I think so, yeah
00:21 Matt__ Trying to fiddle with it now
00:21 forrest Matt__, okay, let me know if modifying the renderer composition works
00:23 Matt__ I think I know what the issue is
00:23 Matt__ <%! should only be used for imports, and runs without context, <% runs with context
00:23 forrest ahh
00:26 justanotheruser joined #salt
00:27 beardedeagle does anyone in here use the saltstack plugin for jenkins?
00:27 Waggott14 joined #salt
00:28 RandyT_ I've tried adding path to site-packages and set PYTHONPATH which was non-existent on this Windows minion.
00:28 RandyT_ salt-call mssql.db_list still failing
00:28 whytewolf forrest: I think I am mentally breaking. I can't seem to form simple logical sentences anymore. https://github.com/saltstack/salt/issues/29174
00:28 saltstackbot [#29174]title: documentation feature request: virtual modules in the modules index | okay while helping users out in the IRC channel one of the common things that pops up is which documentation they need to look at for some of the virtual module, such as pkg or user. ...
00:28 RandyT_ in trace, I see other modules that are failing to load 'dmidecode' for example which is installed and is in that path.
00:30 Matt__ Sorted, thanks Forrest
00:30 RandyT_ mssql is obviously a windows module, so I would expect it to work on a windows minion... :-)
00:30 forrest Matt__, For sure, not sure I really did anything, but you're welcome.
00:30 Matt__ I'll PM you my code, never know if it might come in handy for generating the doco :P
00:30 forrest Matt__, Can you make a gist?
00:30 forrest then I can fork it
00:31 forrest so 6 months from now when I'm cursing mako and their trash tier docs, I can search my gists and find it
00:32 onlyanegg joined #salt
00:36 ashutoshn joined #salt
00:36 ashutoshn left #salt
00:36 Matt__ Haha, no problem
00:36 Matt__ Done
00:37 Matt__ How do I PM on this? <.<
00:37 whytewolf /msg <user> <msg>
00:37 whytewolf :P
00:38 Matt__ Cheers Whytewolf
00:38 Matt__ tried pm and dm :P
00:38 whytewolf msg, the original @
00:39 dabb joined #salt
00:40 cliluw joined #salt
00:41 breakingmatter joined #salt
00:49 keimlink_ joined #salt
00:57 kitplummer joined #salt
01:10 RobertChen joined #salt
01:17 robawt is there no happy place between salt states and dockerfiles?
01:17 robawt if i do a similar thing, am i best to not bother?
01:20 Gareth joined #salt
01:21 beardedeagle joined #salt
01:37 cberndt joined #salt
01:42 breakingmatter joined #salt
01:42 hightekvagabond joined #salt
01:48 dabb joined #salt
01:48 RobertChen I do not want to have a top.sls, can I just have a sls file and salt-call run it ? (masterless)
01:50 hemebond RobertChen: I believe so.
01:50 hemebond Have you not tried it?
01:51 whytewolf RobertChen: you can. the sls file still needs to live in a file_roots location
01:53 whytewolf RobertChen: when i was first doing my openstack setup I had a lot of sls files and no top.sls by using orchestration to run the setup.
01:53 RobertChen I tested with file_roots, it still needs a top.sls to include other sls files
01:54 otter768 joined #salt
01:55 hemebond RobertChen: So you can't just use "state.apply mystatefile.sls"?
01:57 CaptainMagnus joined #salt
01:57 fsteinel_ joined #salt
01:59 ssplatt joined #salt
02:01 dkrae joined #salt
02:01 BogdanR joined #salt
02:02 keimlink joined #salt
02:02 ssplatt is there a way in jinja to search for a string within a string, or regex? like if i wanted to see if a hostname was www.mysite.com or www-dev.mysite.com.  something like {% if ‘dev’ in fqdn %} (which doesn’t seem to work)
02:03 ssplatt i see some info in teh ansible docs on  match() and search() filters, but those seem to be custom to ansible, not in the core of jinja
02:04 hemebond ssplatt: https://groups.google.com/forum/#!msg/salt-users/H33HFOyvO8c/GPe22WD_XtwJ ?
02:05 ssplatt funny, i read that earlier.  seems to match full string but not partial
02:06 ssplatt i was hoping it would act more like python
02:06 hemebond Ah I see.
02:07 iggy RobertChen: state.template maybe?
02:07 ssplatt at least in my test it isn’t matching a partial
02:08 ssplatt in the thread there it is.  ‘node3’ is matching cm-mina-node3-gentoo
02:08 ssplatt maybe i’m missing somethign in my code...
02:09 whytewolf ssplatt: paste your whole if line and anything that is setting varables used in it.
02:09 whytewolf [or gist]
02:09 ssplatt i’ll make a gist real quick
02:10 onlyanegg joined #salt
02:11 mr_chris- left #salt
02:13 whytewolf [just to be sure i just ran my own test and yeah in worked fine on my grains['fqdn']]
02:14 auzty joined #salt
02:14 ssplatt ah ok.
02:17 ssplatt https://gist.github.com/ssplatt/a9b02519d5cc29ae67d2  thats basically what i’m trying to do
02:19 whytewolf humm. I don't see why that wouldn't work. let me check some things
02:19 whytewolf well except salt.locations should be pillar['location']
02:20 ssplatt i loop throught the locations fine, because the location file names work out right, and inside of the j2 template the location gets echoed fine
02:20 ssplatt {%- from "saltstack/map.jinja" import saltstack with context %}
02:20 whytewolf ahh okay. that was what confusted me
02:20 hemebond Might need to even be salt['pillar.get']('salt')['locations']
02:20 hemebond Someone recently had issues with the list method.
02:21 hemebond saltstack.mirrors
02:21 hemebond Is that is a different variable to salt.locations?
02:21 ssplatt what i pasted in teh gist isn’t my full actual code
02:22 ssplatt i know that kind of doesn’t help but
02:23 hemebond ssplatt: Different vars?
02:23 ssplatt i use tha tmap.jinja import at the top of all of my state files/formulas pretty much,
02:23 ssplatt or modification of
02:24 ssplatt so then i can just do like {{ salt.mirrors }}
02:24 hemebond But you don't:  for mirror in saltstack.mirrors
02:24 shaggy_surfer joined #salt
02:25 ssplatt i type the gist up real quic as an eample.  then i copied and pasted that import line directly from my code
02:25 ssplatt so they are different
02:25 ssplatt i was just trying to show that the salt.mirrors would work in my setup
02:25 hemebond Is that an answer to my question?
02:26 ssplatt sorry we’re getting side tracked
02:26 whytewolf ssplatt: https://gist.github.com/whytewolf/97dcc07fd1b8acc88f80
02:26 kitplummer joined #salt
02:26 aidalgol joined #salt
02:26 ssplatt https://gist.github.com/ssplatt/a9b02519d5cc29ae67d2   updated with the right import
02:26 catpiggest joined #salt
02:27 hemebond ssplatt: you still haven't answered my question
02:27 whytewolf ssplatt: the if statement looks like it is working in this example
02:28 hemebond Also the logic is all wrong and would be better as a simple lookup.
02:28 ssplatt hemebond: then i don’t understand your question
02:28 hemebond ssplatt: Line 12 in your gist has "saltstack" not "salt".
02:28 * whytewolf agrees with hemebond a lookup would be WAY better for this
02:28 ssplatt example?
02:34 devoops_ joined #salt
02:34 ssplatt or a link?
02:35 hemebond - [uk, ftp.uk.debian.org]
02:35 devoops_ left #salt
02:36 hemebond Then maybe {% for l, m in salt['pillar.get']('salt:mirrors') %}
02:36 hemebond Can't test right now.
02:36 cberndt joined #salt
02:36 ssplatt ah
02:36 ssplatt i get what you mean
02:38 catpig joined #salt
02:38 ssplatt i went this patch because someone already made a lust of regional servers elsewhere in our pillar, and i was trying to just reuse that list without modifying it too much
02:38 justanotheruser joined #salt
02:38 hemebond Ah.
02:39 hemebond ssplatt: have you looked at line 12 yet?
02:39 ssplatt yeah it was a typo because i copied that right out of my code
02:39 totz joined #salt
02:39 hemebond Okay so your actual code is correct?
02:40 ssplatt i think whats happening is i’m looping thru the list, and its making multiple - master: lines
02:40 whytewolf ssplatt: the problem is with those loops you are going to run into having master 3 times once with the location and twice with the ftp.debian.org
02:40 ssplatt and i’m getting the very last - master:
02:40 ssplatt yeah that exactly
02:40 totzky joined #salt
02:40 hemebond - master: ftp.{{ location }}.debian.org
02:40 hemebond - master: ftp.debian.org
02:40 gmoro joined #salt
02:40 whytewolf ssplatt: did you look at the gist i posted?
02:40 ssplatt yeah
02:40 ssplatt whytewolf: yes
02:41 ssplatt thats exactly what i think is happening
02:41 hemebond So your matching is working?
02:41 hemebond You are just getting the wrong output because of the incorrect logic?
02:42 ssplatt hemebond: not 100% sure, i haven’t looked at the fully rendered file itself yet, trying to remember how to do that now
02:45 whytewolf ssplatt: no easy way to just look at rendering. thats why i wrote this. https://github.com/whytewolf/salt-debug
02:45 ssplatt oh cool.  I thought there was a salt-call render.sls i saw before
02:45 ssplatt along those lines
02:45 writtenoff joined #salt
02:45 whytewolf maybe state.show_sls
02:45 ageorgop joined #salt
02:46 whytewolf [which works on sls files but leaves a lot to be wanted for file templates]
02:46 hemebond ssplatt: Can you not just look at the file on the server?
02:46 hemebond Or can you not apply it to the server yet.
02:46 evle joined #salt
02:47 ssplatt i ran it thru kitchen, and i just get my default value, i.e. master: ftp.debian.org
02:47 ssplatt which is why i thought it wasn’t working at all
02:47 ssplatt because that last line is actually used to pass the var into the j2 template
02:50 * ssplatt is looking back thru Salt Essentials…
02:50 hemebond If you look 10 minutes back you'll see that you might not even need the second loop or string test.
02:51 hemebond But I can't see your entire Pillar structure so I don't know if your values are really as simple as your gist.
02:51 hemebond it looks like you want two master....
02:52 hemebond Hey, what happens if you pass in the "master" variable twice? Does it not overwrite the first value?
02:52 hemebond Did you perhaps want "master" to be a list instead of declaring it twice?
02:53 ssplatt what i’m trying to do is render out my salt-cloud profile conf's
02:54 ssplatt and somewhere else we have a list of syndics
02:55 hemebond Right, but, "master" is a variable for the template, yeah?
02:55 ssplatt so i wanted to loop through the syndic list, find one that is in the region where i’m rendering a profile, and have master: syndic.location.mysite.com  in the cloud.profiles.d/location_profile.conf
02:55 ssplatt ultimately
02:55 ssplatt minion:  master:  syndic.location.mysite.com
02:55 hemebond So you're defining the variable multiple times.
02:56 ssplatt i only want it once, so i need to take out the for loop, or stop when i find a match
02:56 hemebond Oh I see, you want to match if it's there but fall back to ftp.debian.org
02:56 ssplatt right
02:57 hemebond You'll need to loop through it, set a variable if found, then test the variable and output, else output ftp.debian.org
02:57 ssplatt ah, yeah.
02:58 ssplatt if location is defined,  master: location  , else,  default
02:59 hemebond yeap
03:02 racooper joined #salt
03:02 whytewolf ssplatt: for what it is worth. this is the long way around. the shorter would be if you could do a lookup. which would look something like this https://gist.github.com/whytewolf/d445bb08004e407d1ba5
03:02 salt-noob joined #salt
03:03 rogst joined #salt
03:03 hemebond whytewolf: Won't that put the values in backwards?
03:04 hemebond Ah, nvm.
03:04 hemebond I thought location would get the value, not the key.
03:04 ssplatt that is uch cleaner
03:05 whytewolf yeap, for easier reading i included the rendering of it
03:05 whytewolf ssplatt: I'm all about the clean code
03:05 whytewolf my code is cleaner then my apartment
03:10 RobertChen joined #salt
03:11 whytewolf ssplatt: also getting rid of unneeded loops speeds the whole thing up as well
03:11 alger joined #salt
03:12 alger left #salt
03:13 ssplatt true
03:14 alger joined #salt
03:15 RobertChen joined #salt
03:18 ssplatt i need to figure out how to get kitchen-salt to run in debug
03:20 whytewolf good luck, never personally touched kitchen-salt
03:20 hamsham joined #salt
03:20 ham_sham joined #salt
03:20 ssplatt vagrant’s salt_solo does.
03:22 ageorgop joined #salt
03:23 whytewolf huh. this is what i get for building an openstack rig instead of going the easy route
03:23 whytewolf :P
03:23 ssplatt you mean instead of vagrant/test kitchen/virtualbox
03:24 ssplatt for testing/rapid development?
03:24 whytewolf instead of "insert any container"
03:25 ssplatt oh sweet.
03:25 whytewolf I just spin up a full cloud instance instead of a container. and just about as fast
03:25 ssplatt {%- if "*"~location~"*" in saltstack.master.syndic.list %}   worked
03:27 ssplatt oh wait.
03:27 ssplatt lol
03:27 ssplatt nm
03:27 ssplatt of course, the first file i hose to look at was the one that should’ve gotten the {% else %}...
03:29 whytewolf lol
03:36 ssplatt btw, i think state.show_sls is what i was thinking of earlier
03:36 ssplatt for rendering a state file for debugging
03:37 whytewolf yeah, it works great for sls files. but for file templates. not so much
03:37 mapu joined #salt
03:39 malinoff joined #salt
03:46 kitplummer joined #salt
03:50 RobertChen joined #salt
03:52 raygunsix joined #salt
03:54 Vynce joined #salt
03:55 otter768 joined #salt
03:56 Vynce joined #salt
03:57 quix joined #salt
03:57 Vynce joined #salt
03:58 larsfronius joined #salt
04:07 otter768 joined #salt
04:08 beardedeagle I asked this earlier, but never got a reply. Does anyone here use the jenkins saltstack plugin? https://wiki.jenkins-ci.org/display/JENKINS/saltstack-plugin
04:12 mosen ah thats interesting
04:19 beardedeagle Indeed, but I am having issues with it. My pillar data is not being passed. Basically I am trying to do this: salt '*tldweb1*' state.sls containers.update-rnvapi 'pillar={image: "reg-cn-document-rest-api", tag: "2.0.6-SNAPSHOT.b177", env: "test", volume: "/opt/registrar/certs:/certs:ro", name: "rnv-api"}'
04:19 beardedeagle but via the plugin
04:20 beardedeagle However I get this: https://gist.github.com/beardedeagle/06d652515f5d58ca6868 so it seems the plugin is working. The jenkins user is able to auth and call a state.sls against containers.update-rnvapi but the parameters are not being passed
04:21 beardedeagle if I change the KWArguments at all it will fail stating the the pillar data must be passed as a proper dict which I believe I am doing here.
04:21 beardedeagle Sent an email to the maintainer, but unsure if that will garner any help
04:21 mapu joined #salt
04:22 viq joined #salt
04:24 peter- joined #salt
04:25 kitplummer joined #salt
04:32 brianfeister joined #salt
04:33 colinstgeorge_ yo -- can anyone tell me if the foreman host or hostgroup parameters are what the salt plugin (foreman-node) uses as pillars? ... if not, where / how to utilize pillars with salt/foreman?
04:41 rotbeard joined #salt
04:49 kshlm joined #salt
04:56 ramteid joined #salt
04:57 chamunks iggy I wonder why anyone would avoid multi master setups.
05:04 beardedeagle huh
05:05 beardedeagle I think I might have figured it out
05:06 beardedeagle so the jenkins saltstack plugin is SUPER picky about making you '' any jinja vars
05:07 beardedeagle especially if it has any special chars in it like -, /, :
05:09 cyborglone joined #salt
05:11 brianfeister joined #salt
05:13 peter- joined #salt
05:15 beardedeagle Ah, I guess not. It is actually running through the entire pillar now instead of failing, but still no pillar data being passed so it is still equating to nothing
05:16 beardedeagle all that is being passed for pillar data is "'pillar": "{image: reg-cn-document-rest-api",
05:16 beardedeagle and then it cuts off after the ,
05:19 jaybocc2 joined #salt
05:27 onlyanegg joined #salt
05:28 ageorgop joined #salt
05:33 raygunsix joined #salt
05:34 brianfei_ joined #salt
05:39 beardedeagle ugh, no matter how I write the dict it only passes the first key:value pair
05:39 kitplummer joined #salt
05:42 rdas joined #salt
05:43 peter- joined #salt
05:44 breakingmatter joined #salt
05:46 onlyanegg joined #salt
05:59 whytewolf chamunks: because anything that sends data back to the master most likely will not work as advertised. such as mine. or events/reactors or beacons.
06:01 whytewolf chamunks: there is no real two way communication between the masters so anything that happens on one, won't be tracked on the other.
06:22 justanotheruser joined #salt
06:25 impi joined #salt
06:27 ALLmightySPIFF joined #salt
06:29 felskrone1 joined #salt
06:45 malinoff joined #salt
06:45 wang joined #salt
06:51 mohae_ joined #salt
06:57 jaybocc2 joined #salt
07:06 jaybocc2_ joined #salt
07:07 favadi joined #salt
07:08 rbjorklin When using the smtp returner I get an email with this kind of output
07:08 rbjorklin OrderedDict([('id', 'lx01.home.loc'), ('function', 'state.highstate'), ('function args', [OrderedDict([('test', True)
07:09 rbjorklin I'm guessing it's not parsed/rendered correctly?
07:09 wwj joined #salt
07:16 anmolb joined #salt
07:17 colinstgeorge_ yo all, i'm guessing you can't run ext_pillar alongside pillar_roots in master conf?
07:17 colinstgeorge_ or did i miss something... mine didnt work.. seemed to revert to only ext
07:18 whytewolf colinstgeorge_: you should be able to. I know i was able to use the cobbler pillar_ext along with the pillar_roots
07:18 colinstgeorge_ hmm
07:19 colinstgeorge_ i just tried with foreman-node
07:19 colinstgeorge_ lemme try again
07:21 alger joined #salt
07:24 whytewolf colinstgeorge_: just made sure and yeah. worked 100%. I did have to saltutil.pillar_refresh but it did work
07:24 colinstgeorge_ yeah
07:24 sfxandy joined #salt
07:24 colinstgeorge_ i had a same pillar defined in foreman
07:24 colinstgeorge_ and it appeared to override it
07:24 colinstgeorge_ i deleted the param in foreman and it worked
07:25 whytewolf ahh yeah that would do it
07:25 colinstgeorge_ i treid with ext_pillar_first: False in master
07:25 colinstgeorge_ didnt seem to take?
07:26 wwj joined #salt
07:26 whytewolf restarted salt-master and did a saltutil.pillar_refresh afterwords [just asking cause it is ALWAYS the first question i ask]
07:27 whytewolf oh wait the default is False
07:27 colinstgeorge_ i changed to True
07:27 colinstgeorge_ same thing either way
07:28 whytewolf 2015.5?
07:28 whytewolf or later
07:28 colinstgeorge_ later -- restarted salt master and state.highstate
07:28 colinstgeorge_ which pulls my pillar
07:29 colinstgeorge_ not really a big deal atm
07:29 colinstgeorge_ because i can just be mutually exclusive
07:29 colinstgeorge_ and foreman params can only be stings atm
07:29 colinstgeorge_ using the plugin
07:29 whytewolf still. I would file a bug on that. that it eitehr needs better documentation on what it actually does. or that it is compleatly ignored
07:30 colinstgeorge_ ... pointer to file a bug? (never filed one before) ... is there  a procedure and i need to document things?
07:31 colinstgeorge_ sorry for n00b q
07:32 Rumbles joined #salt
07:33 whytewolf bugs are filed here https://github.com/saltstack/salt/issues basicly include all the information you can. and include as much detail as you can. and also include salt-call test.versions on any minions affected and salt --versions for the master
07:34 whytewolf for this you might not need minion versions thought
07:37 brianfeister joined #salt
07:41 AndreasLutro joined #salt
07:42 kitplummer joined #salt
07:44 linjan__ joined #salt
07:45 clintberry joined #salt
07:46 CeBe joined #salt
07:46 breakingmatter joined #salt
07:54 Ugbedo joined #salt
07:56 Ugbedo Hi, as far as I understand, salt adresses all minions in parallel. Is there a way to change that, reduce the maximum number of parallel running jobs or define an order?
07:56 Gregy joined #salt
08:00 jaybocc2 joined #salt
08:00 whytewolf Ugbedo: https://docs.saltstack.com/en/latest/topics/targeting/batch.html
08:01 Rumbles joined #salt
08:01 KermitTheFragger joined #salt
08:01 whytewolf if you want an order for them you might have refine your target a bit more.
08:01 whytewolf or switch to orchestrate
08:03 Ugbedo whythewolf: Thanks, that gives me something to think/read about.
08:03 colinstgeorge_ yo -- so i am able to apply custom grains from the master.. i followed http://stackoverflow.com/questions/27376313/salt-custom-grains
08:04 colinstgeorge_ and i get my spam: eggs to show up ... but that appears to be global
08:04 whytewolf colinstgeorge_: yes that is global
08:05 Mandorath joined #salt
08:05 jaybocc2_ joined #salt
08:05 colinstgeorge_ is there a way to run a remote exec against the minion in like a jinja line or something to say like if nginx is installed, grab the info and set the grains
08:05 colinstgeorge_ basically... to grab package existance / version info
08:06 colinstgeorge_ for other dependecies.... like fail2ban formula if you include the example pillar
08:06 colinstgeorge_ and apply to host without nginx installed
08:06 colinstgeorge_ it errors out
08:06 colinstgeorge_ i wanna be able to say, use this section if nginx is installed... how can i accomplish that?
08:07 colinstgeorge_ my suggestion / explanation might be ass backwards of the paradigm of salt?
08:08 colinstgeorge_ but how can we gather installed package info into salt grains for use in formulas / pillars
08:08 colinstgeorge_ unless i missed it and we already can!?
08:08 whytewolf colinstgeorge_: if you use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.grains.html#module-salt.states.grains you can set grains [there is a module version also] however it sounds like the fail2ban formula is poorly writen. as it should use require and include if it requires the nginx formula
08:09 colinstgeorge_ just the pillar.example
08:10 colinstgeorge_ has a section for nginx_noscript
08:11 colinstgeorge_ so it works fine out of box, its that if you wanna include nginx noscript from the pillar, you need to only apply to hosts with nginx installed...
08:11 colinstgeorge_ odk
08:11 colinstgeorge_ idk
08:12 whytewolf so the formula is written for you to tell it what it needs. through pillar.
08:12 colinstgeorge_ https://github.com/saltstack-formulas/fail2ban-formula
08:12 whytewolf I'm looking at it now
08:14 whytewolf it isn't looking for nfo from salt it is looking for info from you. you know if you are going to have a piece of software on the system.
08:15 whytewolf it uses that info in a for loop to write file.managed configs
08:15 colinstgeorge_ yes
08:15 colinstgeorge_ it uses the pillar info (defined if i have nginx installed)..
08:16 colinstgeorge_ but then what .. i have to write two pillars?
08:16 colinstgeorge_ fail2ban nginx
08:16 colinstgeorge_ fail2ban nonnginx?
08:16 whytewolf colinstgeorge_: doens't matter if you have nginx installed. it listens to what you tell it, not what is actually being done
08:16 whytewolf yes
08:17 colinstgeorge_ ok.... there is no way to be more selective?
08:17 whytewolf you can of coarse tweek things a bit. use jinja to chop out parts that don't make sence.
08:17 toanju joined #salt
08:18 whytewolf or not use the formula and build something more customized for your setup
08:18 whytewolf which is my perfered route
08:19 colinstgeorge_ yeah .... but i can't use jinja to (while rendering) call (for example) salt remote exec or something to check if a package is intalled?
08:19 colinstgeorge_ or somethign crae lieke that
08:19 whytewolf no, jinja is rendered BEFORE everything else
08:19 colinstgeorge_ ok
08:20 whytewolf so it won't know about anything that happens in the states
08:20 colinstgeorge_ and in the _grains/custom.py
08:20 Ugbedo left #salt
08:20 colinstgeorge_ is there a way to reference the minion name of the current run
08:21 colinstgeorge_ custom being like spam.py in that SO link i posted earlier
08:21 whytewolf grains['id'] is the miion id of the minion running the task
08:21 colinstgeorge_ and is that in the env
08:21 whytewolf yeah that is a default grain. built into the system
08:21 colinstgeorge_ where/when (in that example) spam.py runs
08:22 colinstgeorge_ ok cool
08:22 colinstgeorge_ venvs are cool
08:23 whytewolf spam.py would be set as soon as it is added to the system. [by running sync_grains]
08:23 eseyman joined #salt
08:24 whytewolf anyway. it is almost 1am here. I need to head to bed
08:26 otter768 joined #salt
08:26 colinstgeorge_ well not what i thought...
08:26 colinstgeorge_ but yeah
08:26 colinstgeorge_ its 3:26 here
08:26 colinstgeorge_ ive been pulling dumb hours with all this learning
08:26 keimlink joined #salt
08:28 pduersteler joined #salt
08:28 Andre_ks colinstgeorge_:  try puppet, you will want die after that.  Other than that, there's Chef (if you know ruby really well), and ansible
08:29 Andre_ks Saltstack is amazing so far.  I'm a noob.  But it's the cream.
08:31 Andre_ks This IRC group is super awesome.  The best IRC support group I've ever been in.  Thanks guys!
08:32 torax My school stopped teaching puppet and started teaching salt :)
08:32 Andre_ks Word!
08:33 Andre_ks Top down baby!  It's procedural with OOP enabled
08:33 Andre_ks Puppet is like trying to use Cobal or Delphi... WTH?
08:34 AndreasLutro there are schools teaching puppet/salt?
08:34 Guest47941 joined #salt
08:34 Andre_ks Salt and Ansible is like the way it should have always been developed from the beginning.  The right way
08:34 fredvd joined #salt
08:34 Grokzen joined #salt
08:34 Andre_ks There are tons of institutions educating on puppet and chef and other things.
08:35 hamsham joined #salt
08:35 ham_sham joined #salt
08:35 jaybocc2 joined #salt
08:35 Andre_ks I like Chef, I wont lie.  But Salt and Ansible DSL and simplicity with extendibility to modules is the best.  I am glad to learn more python and sharpen those skills now.
08:37 Andre_ks Salt has a higher ground on Ansible with cloud modules that I am looking to investigate on for my job.  This can be revolutionary to use with OpenStack, AWS, and VMWare.
08:37 Andre_ks One this I would love to see is a Salt OnAPP module
08:37 wwj joined #salt
08:38 Andre_ks OnApp as an alternative to OpenStack seems to be far superior. Of course, has costs, but cheaper than VMWare and much more current.
08:38 moeyebus joined #salt
08:38 friendly12345 joined #salt
08:41 hamsham joined #salt
08:42 mobius woop woop
08:46 hamsham joined #salt
08:47 larsfronius joined #salt
08:47 informant1 joined #salt
08:50 jaybocc2_ joined #salt
08:54 traph joined #salt
08:54 traph joined #salt
08:57 s_kunk joined #salt
09:00 jaybocc2 joined #salt
09:03 linjan__ joined #salt
09:04 s_kunk joined #salt
09:05 jamesp9 joined #salt
09:06 Rumbles joined #salt
09:08 iggy chamunks: because they are... troublesome for certain things
09:08 iggy chamunks: i.e. job cache, minion info cache, mine, etc
09:09 toanju joined #salt
09:13 kawa2014 joined #salt
09:14 mobius iggy: didn't get the rest of that...
09:15 wang joined #salt
09:16 iggy someone was asking me why anyone would avoid multi-master
09:17 thalleralexander joined #salt
09:20 Xevian joined #salt
09:21 sastorsl joined #salt
09:24 om question should be. why use a multi master?
09:25 om start with simplicity, tier up to complexities as requirements aries
09:25 om arise
09:26 brianfeister joined #salt
09:26 om K.I.S.S.
09:27 phx if you are deploying to an infrastructure above a given size or complexity, redundancy might be a starting requirement
09:27 om https://en.wikipedia.org/wiki/KISS_principle
09:27 saltstackbot [WIKIPEDIA] KISS principle | "KISS is an acronym for "Keep it simple, stupid" as a design principle noted by the U.S. Navy in 1960. The KISS principle states that most systems work best if they are kept simple rather than made complicated; therefore simplicity should be a key goal in design and unnecessary complexity should be avoided..."
09:28 om phx: that's true
09:28 om just saying, start simple and add complexity as requirements (redundancy) is needed
09:30 zerthimon joined #salt
09:30 GreatSnoopy joined #salt
09:32 denys joined #salt
09:33 Rumbles joined #salt
09:34 chi_ joined #salt
09:34 slav0nic joined #salt
09:36 larsfron_ joined #salt
09:36 thalleralexander joined #salt
09:42 kbyrne joined #salt
09:45 kitplummer joined #salt
09:47 breakingmatter joined #salt
09:49 brianfeister joined #salt
09:50 friendly12345 joined #salt
09:50 kbyrne joined #salt
09:53 sfxandy morning all
09:53 phx om, that's not always going to work out. if you are to tackle a complex issue and starting out as simple, you are facing multiple unavoidable refactorings in the first place
09:54 David_B55 joined #salt
09:55 babilen I'd say that you started out too simple then. You, naturally, need as much complexity as is needed in order to solve the problem at hand.
09:56 babilen The main takeaway is probably: "Don't add too much functionality that you don't need right now, just because you can and think that it *might* come in handy later"
09:56 gnord joined #salt
09:56 cwyse_ joined #salt
10:05 jhauser joined #salt
10:08 friendly12345 joined #salt
10:09 linjan__ joined #salt
10:11 pduersteler maybe a stupid question, but: when you need to manage users, how do you name the state for that? "user"? I'm asking because the states are otherwise somehow very package-oriented (e.g ntp, ssh, logrotate, ...)
10:13 Mandorath I'm currently working on some pillars and i'm wondering if it is possible to import variables from a database. e.g. i build a pillar with variable user now i want to make the pillar read a database with some stored users and parse these to the correct values on a run.
10:14 AirOnSkin pduersteler: You're free to choose any name you like for your states. Something like user_accounts would make perfect sense...
10:15 Mandorath pduersteler: You could use a pillar to adress your users and let a state pick them up using a variable.
10:15 AirOnSkin Mandorath: Maybe external Pillars is what you're looking for? https://docs.saltstack.com/en/latest/topics/development/external_pillars.html
10:15 pduersteler thanks
10:18 friendly12345 joined #salt
10:20 Mandorath AirOnSkin: I think this is it. I also found some external pillars for databases should be enough info to get a simple test setup running. Thx!
10:22 GreatSnoopy joined #salt
10:27 otter768 joined #salt
10:27 AirOnSkin Mandorath: np
10:32 abhi_ joined #salt
10:33 abhi_ Hi
10:34 abhi_ what is saltstack
10:34 om babilen: agreed
10:35 om https://www.google.com/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8#q=what%20is%20saltstack
10:35 om SaltStack platform or Salt is a Python-based open source configuration management software and remote execution engine. Supporting the "infrastructure-as-code" approach to deployment and cloud management, it competes primarily with Puppet, Chef, and Ansible.
10:36 om abhi_: what specific questions do you have?
10:41 giantlock joined #salt
10:42 Songohan joined #salt
10:43 abhi_ i am new in salt stack
10:43 Songohan Hi, how to launch states modules from command line (without using sls files) ?
10:43 abhi_ i want know more about the salt stack
10:43 abhi_ what is the funcnality
10:43 Songohan it's for a demonstration purpose...
10:43 abhi_ of it
10:44 Norrland abhi_: did you check the saltstack website?
10:44 abhi_ yes
10:44 abhi_ i in
10:44 xmj that's one of the more polite RTFM's i've seen
10:44 abhi_ how to install it on my centos machine
10:45 N-Mi_ joined #salt
10:45 abhi_ om i have download the tar file
10:45 torax you may want to use the repo instead
10:45 friendly12345 joined #salt
10:46 Norrland abhi_: https://docs.saltstack.com/en/getstarted/
10:46 torax abhi_: https://docs.saltstack.com/en/latest/topics/installation/rhel.html
10:47 abhi_ thanks to all
10:47 abhi_ for providing the guidiness
10:47 antpa joined #salt
10:47 om Songohan: from the minion you can use: salt-call --local state.highstate
10:48 om from the master cli: salt 'minionhostname' state.highstate
10:48 om that's just one form of doing it
10:49 om it's probably best to use a salt-master separately from your minions
10:51 tehsu joined #salt
10:52 friendly12345 joined #salt
10:54 jaybocc2 joined #salt
10:54 favadi joined #salt
10:55 abhi_ ok
10:55 abhi_ i am on server and trying to installing it
10:57 friendly12345 joined #salt
10:58 AlberTUX joined #salt
11:07 fbettag left #salt
11:08 AlberTUX joined #salt
11:11 nocturn joined #salt
11:11 nocturn Hi, how can I loop over nested pillar values in a Jinja template?  Pillar is here: http://hastebin.com/egijuzinux.avrasm
11:13 AndreasLutro nocturn: remove the - from line 2 and 5, then you can do {% for record in pillar.dnsrecords.mxrecords %}
11:15 nocturn Thanks AndreasLutro, that works!
11:17 antpa joined #salt
11:18 tehsu joined #salt
11:18 antpa joined #salt
11:32 abhi_ Om are you there
11:32 om abhi_:  yes
11:33 abhi_ ok
11:33 abhi_ i have install the salt-master
11:33 om nice
11:33 abhi_ and i have check that the service of it also started
11:34 om make sure the host has a resolveable fqdn
11:34 om as hostname
11:34 abhi_ ok
11:35 abhi_ what is the difference between master and Minion
11:35 om then in the minions, you add this to /etc/salt/minion after installint salt-minion:  master: FQDN.of.saltmaster.com
11:35 om minions are the servers you want to configure outside of the master
11:36 om master has source of the salt configuration typically in /srv/salt/
11:36 om you should read the intro in the saltstack site to learn about these thing
11:36 om You should use git to populate /srv/salt/   for example...
11:37 om that way you deploy your salt code (states, pillars, etc) from git
11:37 om to the master
11:38 om abhi_: take some time to read the intro and browse through the manuals on saltstack
11:38 Waggott14 joined #salt
11:38 abhi_ thanks om
11:38 abhi_ can i have your contact email id
11:38 om it will help you alot more to understand it.  Once you have specific questions, you can rattle our brains here.  :D
11:39 om abhi_: are you seeking consultancy?
11:39 abhi_ yes
11:39 om Otherwise you should really stick to this IRC. it is very supportive
11:39 om abhi_: what is your email address
11:39 abhi_ my email id is
11:40 abhi_ abhishekmaurya06@yahoo.co.in
11:40 om I will email you in a moment
11:41 abhi_ ok
11:41 abhi_ thanks
11:46 tehsu joined #salt
11:47 kitplummer joined #salt
11:51 Songohan joined #salt
11:53 Songohan om: i don't want apply high state. i just want know if it's possible apply a unique state.
11:54 jaybocc2 joined #salt
11:54 om https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html
11:54 Songohan i mean, i've read there is execution modules and state module. It's possible to launch an execution module like this : salt 'myminion' disk.used
11:55 Songohan is it possible to do the same with state modules ?
11:55 om salt '*' state.apply your.state
11:56 om salt 'yourminion' state.apply test
11:56 om salt 'yourminion' state.apply your.state  <--- this one
11:58 Songohan this doesn't work : salt 'myminion' state.apply pkg.install vim
11:58 Songohan TypeError encountered executing state.apply: apply_() takes at most 1 non-keyword argument (2 given). See debug log for more info.
11:58 AndreasLutro Songohan: you want state.single
11:59 Songohan yes
12:00 om Songohan: state.apply is to apply an actual state configuration inside a file or dir structure
12:01 om state.single will let you run individual tasks like that, so yea, AndreasLutro got it
12:01 Songohan thx, it works : salt 'myminion' state.single pkg.installed name=vim-enhanced
12:02 hemebond joined #salt
12:20 yomilk joined #salt
12:22 yomilk joined #salt
12:24 antpa joined #salt
12:27 catpig joined #salt
12:27 phar1no joined #salt
12:28 otter768 joined #salt
12:29 phar1no jlkj
12:32 denys joined #salt
12:38 tehsu joined #salt
12:40 markm joined #salt
12:45 AlberTUX1 joined #salt
12:51 DaveQB joined #salt
12:55 jaybocc2 joined #salt
12:57 monkey- joined #salt
13:00 friendly12345 left #salt
13:02 felskrone joined #salt
13:02 James5mith joined #salt
13:05 mapu joined #salt
13:08 anmolb joined #salt
13:11 breakingmatter joined #salt
13:12 spiette joined #salt
13:13 wang joined #salt
13:15 hoonetorg_ joined #salt
13:15 ssplatt joined #salt
13:17 Grokzen joined #salt
13:22 NV joined #salt
13:22 bluenemo joined #salt
13:22 BigBear joined #salt
13:25 tmclaugh[work] joined #salt
13:32 quix joined #salt
13:32 oida joined #salt
13:34 tuxx hey guys.. is it possible to make an exception for a single grain?
13:34 tuxx like i am matching on a grain and want all hosts with a certain grain to include a file, except for one host
13:35 tuxx is that possible?
13:38 tuxx "domain:mal-net-app.lab and not fqdn:apt-proxy.mal-net-app.lab"
13:40 ssplatt {% if fqdn not apt-proxy.mal… %} maybe?
13:40 ssplatt in jinja?
13:40 hightekvagabond joined #salt
13:43 blueyed Can I do something in Vagrantfile only when not provisioning?  I want to set some config.vm.synced_folder, but not initially (when provisioning).
13:44 favadi joined #salt
13:49 kitplummer joined #salt
13:53 oida joined #salt
13:55 pdayton joined #salt
13:55 kitplummer joined #salt
13:56 jaybocc2 joined #salt
13:56 totzky joined #salt
13:57 A||SySt3msG0 joined #salt
13:57 mage_ is there an easy way to merge pillar data ?
13:57 mage_ for ex with the following https://dpaste.de/SyEw my django['config'] key is overriden
13:58 pdayton1 joined #salt
13:58 mage_ this is because of line 31, where the beescommunity['django']['config'] override the base webapps['lookup]['django']['config'] ..
13:59 pdayton2 joined #salt
14:04 pdayton joined #salt
14:06 pduersteler can someone explain to me why docs and example formulas always use 'lookup', e.g. salt['pillar.get']('users:lookup') ?
14:07 pduersteler is it just a convention for settings?
14:10 spiette joined #salt
14:12 subsignal joined #salt
14:15 quix joined #salt
14:15 teryx510 joined #salt
14:16 kitplumm_ joined #salt
14:17 TyrfingMjolnir joined #salt
14:20 scoates joined #salt
14:23 Tanta joined #salt
14:25 bhosmer joined #salt
14:26 oida joined #salt
14:26 numkem joined #salt
14:28 otter768 joined #salt
14:29 _JZ_ joined #salt
14:32 babilen pduersteler: It is a sort of convention, yeah. When you write a formula you typically have certain, rather static, data that you store in a lookup table (hence the name). This comprises data such as package names or standard file paths. The lookup table is then typically filtered in map.jinja.
14:33 pduersteler oaky, thanks
14:33 babilen The reasoning behind this is that one would like to differentiate between data the user would genuinely like to tinker with and data that a user would not normally touch (but still should be able to)
14:35 RandyT_ good morning. babilen since you weighed in on this with me yesterday, wanted to share a bit more about this issue of python modules not getting imported by the salt process.
14:35 mage_ any idea if I can subscribe to salt-user mailing list without a google account ?
14:35 RandyT_ Seems on windows that the minion is only looking within its own "namespace" for modules to import.
14:36 RandyT_ The dependencies that I am adding via pip install on these windows instances are installed within the python hierarchy and not seen by salt-minion.
14:37 PhatPete joined #salt
14:37 RandyT_ whytewolf: asked about whether I was running in a virtualenv and effectively, it seems  that I am with that virtualenv being that of the salt-minion install.
14:37 RandyT_ Would love to get some feedback as to how to get the minion to look outside of its domain for these modules. Running 2015.8.1 fwiw
14:38 Rumbles joined #salt
14:38 PhatPete Good morning! I was hoping for some advice regarding external pillars. I have an external pillar that loads and runs, however it doesn't return what I'd expect it to. Specifically, I'm trying to access a salt mine using pillar data set prior to the external pillar's run.
14:38 protoz joined #salt
14:38 babilen RandyT_: That sounds really weird. Is that normal on Windows?
14:39 tpaul left #salt
14:39 babilen What is a "Python domain" on Windows?
14:40 ekristen joined #salt
14:40 babilen PhatPete: You can incorporate mine lookups as detailed on https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.mine.html#salt.modules.mine.get
14:41 RandyT_ babilen: I could not tell you if it is normal. I'm new to Salt and avoid windows when possible...
14:42 RandyT_ The term "Python Domain" is my term used to describe the Python installation on Windows.
14:42 RandyT_ Salt does not require me to install Python on windows in order to run and in that respect is self contained.
14:42 amcorreia joined #salt
14:42 RandyT_ and I think that self contained behavior is what is presenting the challenge.
14:43 pdayton joined #salt
14:43 DammitJim joined #salt
14:43 RandyT_ I'm not aware of how I should add module functionality like pymssql to a salt minion environment but I can say that installing it via the Python/pip install in Windows is not working.
14:44 pdayton1 joined #salt
14:44 babilen I have no idea .. maybe some people in #python know more about this? I haven't touched Windows in 15 years and find that what I consider to be normal or standard behaviour does not apply to it.
14:44 DammitJim I think I just the the most stupid thing... I have to minions with the same name
14:45 DammitJim but I don't know how to find them
14:45 babilen But then you might also want to write to the salt users mailing list and ask how you are supposed to add modules on Windows. Did you install those modules *through* salt?
14:45 RandyT_ yeah, I am not thinking this is a python issue since I can import these required modules like pymssql from the command line without an issue. The problem is that salt-minion is not seeing those modules.
14:45 DammitJim I figured this out because I was running a state and it would flip flop
14:45 DammitJim how do I figure out which server is which so I can delete it from my master keys?
14:45 babilen DammitJim: How did you achieve that? Did you manually copy keys around?
14:45 RandyT_ babilen: I installed the modules with pip.installed: state.
14:46 babilen RandyT_: You would hope/think that that would be within the salt "virtualenv", but then ... Windows :-/
14:47 babilen RandyT_: Well, it is a Python issue as far as Python is obviously packaged in a specific way on Windows and, also, for/by salt. People might be familiar with this "self-contained" installation method on Windows and might be able to provide pointers on how to add modules to it.
14:48 babilen Why wouldn't you simply use the system Python?
14:50 tracphil joined #salt
14:51 oida joined #salt
14:52 DammitJim babilen, I have no idea... all I know is that I have been rebuilding this one server over and over and have made copies of it
14:52 RandyT_ babilen: when you say "system Python", what do you mean? salt-minion python, or the python installed on windows.
14:53 babilen RandyT_: I wonder why salt on Windows doesn't simply require you to install a "normal" Python and use that.
14:53 RandyT_ one reason for installing python was that I (perhaps mistakenly) thought I needed to have python installed in order to use pip.installed:. perhaps that was wrong
14:54 RandyT_ I will try without installing python but I think for some reason I ran into issues trying to install boto for example without having python on the minion...
14:55 babilen Ask the mailing list (or someone who actually knows about salt on Windows)
14:56 morissette joined #salt
14:57 jaybocc2 joined #salt
14:57 ninkotech joined #salt
14:57 RandyT_ babilen: thanks, would like to catch UtahDave on here, but have not seen him on lately.. Will put something on the list. Thanks for the feedback.
14:57 babilen DammitJim: You could compare IP addresses of multiple pillar.get runs and find if a minion reports two different ones
14:57 babilen (between runs)
14:58 colegatron joined #salt
14:59 winsalt joined #salt
14:59 giantlock joined #salt
15:00 oida joined #salt
15:01 DammitJim thanks
15:01 DammitJim I'll try that
15:03 DammitJim babilen, how do I get a list of the properties?
15:03 DammitJim to get the IP?
15:04 colegatron joined #salt
15:07 DammitJim what would happen if I delete the minion from the salt-keys on the master?
15:07 DammitJim and add it back?
15:07 DammitJim it's not giving me another IP address?
15:07 peter- joined #salt
15:13 tpaul joined #salt
15:13 tpaul Should pkg.refresh_db return False?
15:15 Tanta_G joined #salt
15:21 DammitJim can I have a key (from salt-key name in the denied keys and accepted at the same time?
15:23 oida joined #salt
15:25 cberndt joined #salt
15:27 Brew joined #salt
15:30 DammitJim is there a way for me to delete a denied key?
15:30 devl_ joined #salt
15:32 ssplatt DammitJim: salt-key -d <name>
15:32 DammitJim but that will also delete the key for the server I have accepted
15:32 DammitJim I guess I need to stop the salt-minion service
15:32 DammitJim then delete the keys on the master
15:33 ssplatt yeah. that
15:33 DammitJim then regenerate the keys on the minion
15:33 DammitJim restart the salt-minion
15:33 DammitJim and then accept the new key?
15:33 ssplatt don’t necesarily need to regenerate
15:33 ssplatt but yeah stop minion, delete key, start minion, accept key
15:33 ssplatt should do it
15:35 DammitJim thanks
15:37 djstorm joined #salt
15:38 mapu joined #salt
15:40 mohae joined #salt
15:45 mschiff update from salt 2015.5.6 to 2015.5.7 fixed my problem that ssh_known_hosts.present dod not work with a different port. But a new problem has come up: Now the same known hosts line is added on every state run again and again... is that another bug?
15:45 malinoff joined #salt
15:46 s_kunk joined #salt
15:46 s_kunk joined #salt
15:49 tracphil joined #salt
15:49 N-Mi_ joined #salt
15:50 DammitJim so, this is very very very odd
15:51 DammitJim when I run a salt state the has for loops inside of it for the different sections of the state
15:51 kitplummer joined #salt
15:51 DammitJim the configuration of that jinja template seems to be flip flopping
15:51 DammitJim somehow using the same template is being cached?
15:51 DammitJim and it's setting up stuff on my other conf files
15:54 kitplumm_ joined #salt
15:57 jaybocc2 joined #salt
16:00 babilen mschiff: probably
16:01 BigBear joined #salt
16:01 ssplatt mschiff: you probably have it as a list?
16:01 mschiff babilen, ssplatt: I now know what the problem is: sallt adds a wrong entry into the known hosts file
16:01 mschiff it somehow doubles the port part of the entry
16:02 ssplatt an, it doesn’t replace if you make a change most likely, i’ve run into that on several things, like the iptables module
16:02 ssplatt so ifyou histhatate once with a type, like opening port 81, then change your error and highstate again with port 80, you’ll have both
16:02 mschiff When I fix the entry added by salt manuelly, it stops adding new  lines because the test whether the line is already there succeeds
16:02 ssplatt ended up writing my own iptables formula because of that
16:03 ssplatt ah
16:04 mschiff a correct line mus start like this "[my.host.com]:2222" but salt writes "[[my.host.com]:2222]:2222"
16:04 mschiff so it seems that it adds the port part twice
16:04 ssplatt i’m running into a weird issue with jinja where i can’t reassing a variable like i think i’m supposed to be able to.  {% for var in list %}    {% set newvar = var %}  {% endfor %}   {{ newvar }}   =>  eror, not defined newvar
16:05 oida joined #salt
16:14 techblaze joined #salt
16:15 techblaze joined #salt
16:15 tristianc joined #salt
16:20 murrdoc joined #salt
16:21 Aleks3Y joined #salt
16:22 mpanetta joined #salt
16:24 ageorgop joined #salt
16:27 brianfeister joined #salt
16:29 otter768 joined #salt
16:31 oida joined #salt
16:31 RandyT_ Attempted to do a pip.installed: without first installing Python on my windows minion
16:32 RandyT_ I get the following result: Name: pymssql - Function: pip.installed - Result: Differs
16:32 RandyT_ Can anyone tell me what "Differs" means in this context?
16:33 ssplatt lame./ can’t do {% set %} in a for loop
16:34 Bryson joined #salt
16:34 Tanta_G the {% for item in list %} {% endfor %} creates a loop context
16:34 Tanta_G each iteration, the {{ item }} equals the item in the list
16:34 Tanta_G you don't need to assign it to a secondary variable
16:35 ssplatt i had a nested {% if thing in var %} {% set newvar = var %}
16:35 ssplatt but still, inside the for loop, even without the if, i couldn’t use set
16:35 ssplatt didn’t give any error, just skipped it completely it seemed
16:37 techblaze joined #salt
16:37 johtso joined #salt
16:38 winsalt RandyT, do you have all the extra junk added to the pip command
16:38 techblaze joined #salt
16:39 winsalt (salt <minion> pip.list cwd='C:\salt\bin\Scripts' bin_env='C:\salt\bin\Scripts\pip.exe')
16:39 BigBear joined #salt
16:39 amcorreia joined #salt
16:40 brianfeister joined #salt
16:40 RandyT_ winsalt: standby.. rebooting that minion
16:40 devl_ joined #salt
16:42 devl_ joined #salt
16:42 RandyT_ I can say that I am not doing the pip.installed: with that additional info... perhaps this is the problem.
16:44 devl_ joined #salt
16:44 RedundancyD joined #salt
16:46 keltim joined #salt
16:47 quasiben joined #salt
16:48 pdayton joined #salt
16:49 RandyT_ winsalt: so I see from that command that the salt minion is unaware of a pymssql module installed in previous highstate
16:49 RandyT_ it also says "None" when listing "pip:"
16:51 BigBear joined #salt
16:51 mirko joined #salt
16:52 tpaul In my master config  I have: " win_repo_mastercachefile: '/srv/salt/winrepo/winrepo.p', the minion's log is reporting:  "Unable to cache file 'salt://win/repo/winrepo.p' from saltenv 'base'."
16:52 tpaul Are there 2 different caches or is salt not using the master config?
16:52 zsoftich2 joined #salt
16:53 winsalt tpaul are you using 2015.8
16:54 tpaul no 2015.5.5
16:54 tpaul thats the latest on RHEL6 (where my master lives)
16:55 onlyanegg joined #salt
16:55 tpaul the new features in 2015.8 look nice though
16:58 WesleyTech joined #salt
16:58 whytewolf tpaul: thats the latest in epel. which was maintained by third parties. however http://repo.saltstack.com/#rhel does have 2015.8.1 and 2015.5.6 for redhat6
16:58 jaybocc2 joined #salt
16:59 tpaul whytewolf: wow, thanks! I was not aware of that. When did salt start providing their own yum repos?
17:00 winsalt they change a few of the config parameter names in 2015.8 so be aware of that.  It looks like your minion has a different idea of where the cache is
17:02 oida joined #salt
17:02 whytewolf tpaul: with the release of 2015.8 they did. althought it was pretty bad at first. and some people have some complaints as well with the new repo
17:04 tpaul I don't have the repo working at all in 2015.5 so that shouldn't be a problem for me, thanks for the help whytewolf, I'm going to work on switching over to the salt yum repo
17:05 tpaul by not working at all, I mean the winrepo
17:06 baweaver joined #salt
17:08 linjan joined #salt
17:08 fredvd joined #salt
17:11 grumm_servire joined #salt
17:12 dayid joined #salt
17:17 monkey- joined #salt
17:17 tristianc_ joined #salt
17:20 kitplummer joined #salt
17:22 pdayton1 joined #salt
17:23 netcho joined #salt
17:23 subsignal joined #salt
17:24 oida joined #salt
17:27 denys joined #salt
17:28 rmnuvg joined #salt
17:29 zsoftich2 joined #salt
17:33 N-Mi joined #salt
17:33 writtenoff joined #salt
17:36 marsdominion joined #salt
17:43 beardedeagle joined #salt
17:46 _habnabit left #salt
17:48 otter768 joined #salt
17:49 SeeDickCode joined #salt
17:50 RandyT_ ok.. the turkey is brining in salt and so am I...
17:50 tpaul :)
17:50 SeeDickCode joined #salt
17:51 Fiber^ joined #salt
17:53 CeBe joined #salt
17:53 conan_the_destro joined #salt
17:53 oida joined #salt
17:54 deus_ex joined #salt
17:54 shaggy_surfer joined #salt
17:55 shaggy_surfer joined #salt
17:57 CeBe joined #salt
17:59 jaybocc2 joined #salt
17:59 kitplumm_ joined #salt
18:01 pdayton joined #salt
18:06 raygunsix joined #salt
18:07 breakingmatter joined #salt
18:08 BigBear joined #salt
18:10 kitplummer joined #salt
18:10 cberndt joined #salt
18:14 onlyanegg joined #salt
18:15 giantlock joined #salt
18:17 toddnni joined #salt
18:18 murrdoc joined #salt
18:20 doriftoshoes joined #salt
18:21 RandyT_ off topic question: anyone here who has found a reasonable alternative to New Relic?
18:24 whytewolf RandyT_: ruxit?
18:25 RandyT_ whytewolf: tks, I'll investigate. Been quite awhile since I have looked at them.
18:25 shaggy_surfer joined #salt
18:28 brianfeister joined #salt
18:29 Aleks3Y joined #salt
18:29 Rebus joined #salt
18:30 whytewolf RandyT_: or take a look at this thread where they talk about the different alternatives https://www.quora.com/What-are-the-alternatives-to-New-Relic
18:31 Ahlee brain fart. https://gist.github.com/jalons/97ab70d332619fca3166 - how do I get foo from the cli? pillar.get globals:config_db, pillar.get globals.config_db, pillar.item globals:config_db, pillar.item globals.config_db all return nothing
18:33 murrdoc saltutil.refresh_pillar
18:33 intel joined #salt
18:33 otter768 joined #salt
18:33 murrdoc globals:config_db
18:33 Ahlee which access method?
18:34 murrdoc pillar.get
18:34 Ahlee no love.
18:35 Ahlee gah.
18:35 Ahlee thanks murrdoc
18:35 Ahlee how's the newest little one?
18:36 winsalt ahlee, how did you get the gist output?
18:36 murrdoc Ahlee:  whats pillar.ls or pillar.list show u
18:36 murrdoc lil dude is awesome
18:36 murrdoc 3 months old now
18:37 murrdoc also ahlee check your master log, pillar errors are only in log file
18:37 Ahlee winsalt: pillar.get globals, i wasn't having an issue with the top level it was just accessing member
18:37 Ahlee i found the issue, stupid operator error on my part
18:37 Ahlee murrdoc: awesome
18:38 beardedeagle how would one target a minion glob from within a state. I need to run a state against a glob but I also need another state to be ran against another glob at the same time.
18:40 winsalt that sounds like you would use the top file to distribute work
18:40 slav0nic joined #salt
18:40 oida joined #salt
18:41 _ikke_ joined #salt
18:42 beardedeagle has to be callable via a state.sls with pillar={} fed to it
18:42 beardedeagle hence the question
18:42 doriftoshoes joined #salt
18:42 whytewolf beardedeagle: orchestrate
18:43 whytewolf beardedeagle: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html
18:43 impi joined #salt
18:44 whytewolf orchestration, when you need a hammer for that screw
18:44 beardedeagle interesting. I'll take a look
18:44 winsalt another option, module.run: -name state.sls
18:45 whytewolf winsalt: what wouldn't meet the with a different glob requirement
18:47 devl_ joined #salt
18:47 winsalt youre right, ive usually only called states like that from a reactor where you use tgt
18:48 onlyanegg joined #salt
18:49 whytewolf which is why i recmended orch. all the bliss of reactor with out worring about the event bus
18:51 tpaul whytewolf: about your newrelic question, I would like to find a good alternative to that too. Our main issue is that they don't have on-premise installs which we need for some customers.
18:52 tpaul whytewolf: Dtrace can fill some gaps, but 80% of the time, when a customer wants a deployed solution they're also a windows shop
18:52 whytewolf tpaul: if you need on premiss you might look into solarwinds. I hear they have in app monitoring now. not sure how well supported though
18:52 rbjorklin joined #salt
18:52 tpaul I did actually, they don't support a unix-like OS as a master server and I want as absolutely few windows servers as possible
18:53 iggy Ahlee: .get is the only one that does nested(:) lookups
18:53 tpaul they have linux agents though
18:53 whytewolf tpaul: I could hug you. the world needs more admins like you.
18:53 Ahlee iggy: thank you
18:54 tpaul whytewolf: thanks :)
18:54 iggy Ahlee: you're welcome (and I really should start reading the full scrollback before I start answering questions already answered)
18:54 Ahlee iggy: i still love you
18:55 iggy my mom says that to me... I don't believe her when she says it either
18:55 iggy Ahlee: you going to saltconf this year?
18:55 denys joined #salt
18:55 whytewolf tpaul: unforchantly I have no idea about linux server based tools like that. so many use cacti and nagios on the linux side that take years of design to get the monitoring right that they don't really look for alternatives
18:55 Ahlee iggy: hopefully
18:56 Ahlee iggy: $JOB wants to send other people
18:56 rbjorklin Using salt-cloud with EC2 I always get a public IP. This "AssociatePublicIpAddress: True" does not seem to help. Any thoughts?
18:56 iggy need to get my talk proposal done (think they're due Friday)
18:57 iggy nah, Monday
18:57 iggy excellent
18:57 iggy got a nice long weekend to get that shit done
18:57 michael33 joined #salt
18:57 michael33 howdy
18:58 michael33 I have a question, does anyone know how to update the grain['fqdn']
18:58 RandyT_ rbjorklin: https://github.com/saltstack/salt/issues/28028
18:58 saltstackbot [#28028]title: Instance destroy using salt-cloud -d does not release EIP | After deploying an EC2 instance and then subsequently destroying it, eventually, I have allocated my current limit of 5 EIP addresses. Rather than reusing one of the available 5 addresses, the deploy of an instance requiring an EIP will eventually fail with the following error message:...
18:58 michael33 permanently
18:58 clintberry joined #salt
18:58 whytewolf tpaul: looks like foglight has a APM also. I never worked with foglight though i did hear they have a linux server option. I could be wrong though
18:59 tpaul whytewolf: thanks for the suggestion, I'll take a look at foglight
18:59 timoguin_ joined #salt
19:00 jaybocc2 joined #salt
19:00 Ahlee michael33: set the fqdn of the hostname to what you want, and if it's changed run saltutil.refresh_grains
19:00 ponpanderer Finally....got salt-cloud to deploy windows 2012R2 on EC2 default images using winrm over https instead of winexe.
19:01 RandyT_ rbjorklin: I've seen mixed results though... I have a separate production account with AWS which does not seem to exhibit the behavior you describe.
19:01 Ahlee ponpanderer: yeah, winexe and 2012r2 don't play nice together. RIP libsmb 1.0
19:01 RandyT_ ponpanderer: congratulations.
19:02 Nazca joined #salt
19:02 winsalt how did you get winrm to work?
19:02 ponpanderer https://github.com/saltstack/salt/pull/29205
19:02 saltstackbot [#29205]title: Fixes #29187 - using winrm on EC2 | Ensures that use_winrm: True is respected when bootstrapping with salt-cloud on EC2. Adds the option to specify winrm port to use with 'winrm_port' option in cloud configuration. This is optional and defaults to WinRM 2.0 HTTP port tcp/5986. Only HTTPS (as before) is supported....
19:02 iggy michael33: you might also have to restart the minion
19:03 michael33 ah awesome
19:03 kitplummer joined #salt
19:03 ponpanderer on EC2 it was bypassing the 'use_winrm' because of the auto password handling
19:04 ponpanderer and also the userdata to get winrm on https is a nightmare
19:04 rbjorklin Thanks RandyT_ ! broken until 2015.8.2, I can live with that
19:05 ponpanderer https://gist.github.com/trevor-h/290eeff3b9e13e1c8d29
19:05 juanislopez joined #salt
19:05 stanchan joined #salt
19:07 larsfronius joined #salt
19:07 baweaver joined #salt
19:08 jaybocc2 joined #salt
19:12 winsalt ponpanderer, is the certificate stuff necessary for winrm to work or is that for ec2 specifically
19:13 jaybocc2_ joined #salt
19:14 toanju joined #salt
19:14 hightekvagabond joined #salt
19:15 mpanetta joined #salt
19:15 ponpanderer winsalt: that is primarily for ec2 as there is no certificate store by default that can be used for winrm. this limits you to only http. windows being windows it doesn't look like you can create+import without an MMC in the UI. So this copies from RDP
19:15 linjan joined #salt
19:15 mpanetta joined #salt
19:15 ponpanderer i have other windows hosts in our openstack cloud where the certificate stuff is not required
19:16 GreatSnoopy joined #salt
19:16 tpaul whytewolf: alright, pkg.list_pkgs is finally working! Upgrading to 2015.8 did the trick
19:19 otter768 joined #salt
19:25 hightekvagabond joined #salt
19:30 impi joined #salt
19:30 hal58th__ joined #salt
19:30 hal58th_1 joined #salt
19:31 BlackBishop left #salt
19:34 hightekvagabond joined #salt
19:38 whytewolf tpaul: YAY!
19:43 murrdoc yay
19:44 kitplummer joined #salt
19:47 tpaul I still can't get a package to install, but it's still progress
19:55 mdupont joined #salt
19:57 cwright_ is anyone aware of a tool to count the number of unique states in a salt based repository?
19:57 subsignal joined #salt
19:59 babilen cwright: No, but https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.list_states might come in handy (with suitable master config naturally)
19:59 babilen Also not sure what you mean by "salt based repository" exactly
20:03 cwright a git repository that is entirely salt configuration
20:03 cwright this seems to match what I'm looking for:
20:03 cwright find . -name '*.sls' -exec egrep '^[^ ]*:$' {} \;| wc -l
20:08 impi joined #salt
20:09 techblaze joined #salt
20:13 s_kunk joined #salt
20:14 baweaver joined #salt
20:15 LSWOTE joined #salt
20:17 brianfeister joined #salt
20:17 quix joined #salt
20:17 LSWOTE I am running cmd.run from a script started with salt-call.  Is there a way to make salt-call exit immediately and report error if the cmd.run fails?  Right now it continuing to run and then prints a summary if success and failure.
20:18 LSWOTE I meant to say "then prints a summary OF success and failure".
20:20 lemur joined #salt
20:20 zsoftich2 LSWOTE: https://docs.saltstack.com/en/latest/ref/states/failhard.html
20:22 lemur joined #salt
20:24 tpaul https://docs.saltstack.com/en/latest/ref/configuration/master.html#winrepo-dir-ng  <- shouldn't the example in the YAML block be "winrepo_dir_ng"?
20:25 breakingmatter joined #salt
20:27 onlyanegg joined #salt
20:27 shaggy_surfer joined #salt
20:33 LSWOTE zsoftich2: that is close, salt-call doesn't process the rest of the commands in the yaml file but it doesn't report error to the program that called it.  It appears to have finished executing gracefully, albeit early, instead of aborting.  I need to be able to pass failure back up the chain.
20:40 brianfeister joined #salt
20:43 baweaver joined #salt
20:44 lemur joined #salt
20:46 cberndt joined #salt
20:46 zsoftich2 LSWOTE: there is an open bug about the exit code
20:48 zsoftich2 https://github.com/saltstack/salt/issues/18510
20:48 saltstackbot [#18510]title: salt exit codes | is there a reason why test.* returns False and exits with bash exit code 0 instead of 1 ? ...
20:49 zsoftich2 I ended up writing a wrapper around the salt-call...then just having salt-call spit out json
20:49 zsoftich2 not ideal, but works
20:51 opilotte joined #salt
20:53 opilotte I have a problem listing images from an openstack provider using salt-cloud: https://gist.github.com/olivierpilotte/5ec38230bf31c544030a
20:53 sunkist joined #salt
20:53 opilotte also, salt-cloud uses v1.1, which is deprecated
21:02 otter768 joined #salt
21:03 LSWOTE zsoftich2: thanks
21:04 onlyanegg joined #salt
21:09 cpowell joined #salt
21:16 BigBear joined #salt
21:17 murrdoc boobies
21:17 colegatron joined #salt
21:19 Eugene Where
21:23 kitplumm_ joined #salt
21:26 kitplum__ joined #salt
21:26 saltstackbot [reddit-saltstack] Git or gitfs for pillars https://www.reddit.com/r/saltstack/comments/3u9ljz/git_or_gitfs_for_pillars/ - 2015-11-25 - 21:23:53
21:27 jalbretsen joined #salt
21:28 kitplummer joined #salt
21:28 clintberry joined #salt
21:30 cpowell joined #salt
21:36 totzky joined #salt
21:41 hhutensils joined #salt
21:42 subsignal joined #salt
21:46 CeBe joined #salt
21:47 jhauser joined #salt
21:48 sunkist joined #salt
21:56 zsoftich2 joined #salt
21:58 morissette #- syslog          # Setup all the things to syslog to syslog server in AWS
21:58 morissette can you comment out in top.sls like that?
21:58 morissette # in the front
21:58 kitplumm_ joined #salt
21:58 morissette I know the second doesn't break anything
21:59 spiette joined #salt
22:00 baweaver joined #salt
22:01 kitplum__ joined #salt
22:03 kitplummer joined #salt
22:05 kitplumm_ joined #salt
22:05 TyrfingMjolnir joined #salt
22:06 peter- joined #salt
22:07 hhutensils I've commented out whole sections of sls files like that it didn't cause any problems. You can't comment out jinja though.
22:07 hhutensils Well you can, but it's different
22:08 moogyver joined #salt
22:11 mosen joined #salt
22:13 otter768 joined #salt
22:14 hhutensils I can't get the syslog or sqlite3 returners to work. There aren't any errors, there just doesn't appear to be any data where I expect it (ie in the sqlite file or /var/log/syslog). Where should I start trying to diagnose this issue? I can't see anything in the logs
22:14 moogyver hm.  syndics are supposed to pass up events from minions to their master, right?
22:22 mohae_ joined #salt
22:32 marsdominion joined #salt
22:32 marsdominion joined #salt
22:36 ronrib joined #salt
22:43 baweaver joined #salt
22:44 joehh joined #salt
22:50 antpa joined #salt
22:56 baweaver joined #salt
22:56 otter768 joined #salt
22:58 lemur joined #salt
23:02 subsignal joined #salt
23:08 flebel joined #salt
23:10 bfoxwell joined #salt
23:19 sunkist joined #salt
23:31 bhosmer joined #salt
23:35 cberndt joined #salt
23:48 larsfronius joined #salt

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