Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-01-16

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

All times shown according to UTC.

Time Nick Message
00:00 honestly if you have a state that installs mongo from a package, you'd do require: pkg: mongo
00:00 honestly or pkg.installed maybe?
00:00 honestly not sure
00:06 jeremyBass ok back
00:07 jeremyBass so in order to run states when you only know where the path is.. i must write a .py file?  is the the gist of it?
00:08 druonysuse joined #salt
00:09 jeremyBass I'm having a hard time wraping my head around how this is such a big hole here.. why i can't pull states from two locations that is with out hard coding everything under the sun in top.sls and confgs and all .. seems like there has to be an easy way to do this simple thing
00:10 markizano <hunter> (I've enjoyed skipping most of the require ordering stuff since 0.17 lets you assume in YAML order for stuff in a single file.)
00:10 markizano While order in YAML is true, you would still need to declare inter-sls dependencies with the require statements on the states themselves
00:11 hunter markizano: I understand - my question is whats the syntax for that?
00:11 markizano sec...
00:11 hunter IE, if the shock service requires that the mongodb service from a different .SLS already be running, how do I express that?
00:12 markizano In your example, shock: { service: [ require: [ pkg: mongod, service: mongod, etc: etc ] ] }
00:12 markizano hrmm...
00:12 * markizano pastebin's...
00:13 hunter most appreciated
00:15 yomilk joined #salt
00:16 markizano hunter: http://pastebin.com/nrd9JRUV
00:17 markizano jeremyBass: did you switch to #!py in the states??
00:17 markizano <clearclaw> It should run the topmost/first only.  <jeremyBass> topmost?   <clearclaw> In your stack of file roots.
00:18 markizano Should, but it actually compiles all the tops into one data structure. Then it tries to grab all the dependencies of those tops.
00:18 markizano If any of the dependencies fail - you get errors in your highstate.
00:18 hunter markizano: that looks like what I wanted.
00:18 markizano hunter: yay
00:18 hunter markizano: do you have a minute while I nitpick to learn ?
00:18 markizano I recommend using #!py in top.sls for at least the states.
00:18 markizano hunter: Go ahead, I got a few hours of dorking around :D
00:19 kermit joined #salt
00:19 markizano Been dinkering around with this at work, and I think we're getting a good handle on how to use this beast....
00:19 jeremyBass @markizano so #!py will let it be used?  ie your saying put #!py in the top.sls of the secoundary top.sls?
00:19 hunter markizano: line 11 is to make sure you have the repo installed/activated before the package (shock) is attempted to be installed
00:20 hunter markizano: line 12 is what wires the mongodb (that got included earlier) to actually run BEFORE the shock stuff runs
00:20 markizano #!py will turn your top.sls into python, and do away with jinja - we found that to be easier to work with as we could delicately query the data we need from the pillar, then only return the data relevant to this state run.
00:20 hunter markizano: I don't see what line 19 ties to
00:20 markizano Replace 1000 lines of yaml describing each detail for your hosts with 300 lines of python for all your hosts and any generic number of them afterword...
00:21 markizano hunter: checkout line 5
00:21 hunter markizano: I see that
00:21 markizano it's reflective
00:21 markizano since they aren't listed in order, I got used to putting -require everywhere...
00:21 hunter I'm confused -what file?
00:22 markizano shock: file.managed
00:22 markizano uuh...
00:22 markizano line 25
00:22 hunter AH
00:22 markizano :D
00:22 hunter I was about to ask about that
00:22 markizano lol, that's your config file.
00:22 markizano right ?
00:22 jeremyBass @markizano hmm.. not sure that is goig to help though.. the issue i have is that i need to run state files from two locations.. i only know the location of the secound path, but not of it's files/states as it will be git cloned in from the first base state.. so i know the path just not the states that will be there
00:22 markizano the app does have a config file the service would be managing ?
00:23 hunter markizano: with the new YAML ordering lines 22 and 23 are redundant aren't they?
00:23 hunter markizano: [again I'm nitpicking to make sure I understand and not just cargo culting]
00:23 markizano jeremyBass: Can you pastebin a/an [filtered] example?
00:23 markizano hunter: possibly, but I'm used to puppet :-)
00:24 hunter shucks - I was hoping for an affirmative answer there... :)
00:24 markizano lol
00:24 druonysuse joined #salt
00:24 druonysuse joined #salt
00:25 markizano I would like to say 22 may be irrelevant, but if the service doesn't require that file to be there, then yes it would be too.
00:25 hunter I think with 0.17 you could go pkg, then file, then service and only have to do inter-module deps
00:25 hunter IE, to get rid of those you'd have to reorder the file but you could
00:25 jeremyBass @markizano not really.. i mean i don't know what to pastbin at this point.. all i want to do is read state files that get cloned in.. i will know the path they will be cloned in to.. just not what files will be there.. and since top.sls is only read from the first one .. well I'm at a lose here
00:26 markizano jeremyBass: So the end goal is to run 2 different states?
00:26 markizano I had to ask myself the hard question when I thought about how salt "could manage" multiple pillars and state sources.
00:26 markizano "Is that practical"
00:27 jeremyBass @markizano well sort of yes..
00:27 jeremyBass it's impractical to have a state source with the 5-50 some od app state files all in the same repo is the problem
00:27 markizano then again, I ran into so many errors related to branches I wasn't on - I had to turn off gitfs for the time being too... :x
00:28 markizano ??
00:29 jeremyBass see we have a server base.. that runs fine.. and the apps that need to go on the server.. well there are many.. but to join the two is not going to work.. it'll poulate the server base repo if we force every app in there
00:29 jeremyBass that is what the issue is..
00:29 toastedpenguin joined #salt
00:30 markizano hmm
00:30 markizano you know you can subdir them ?
00:30 druonysuse joined #salt
00:30 kalloc joined #salt
00:31 hunter markizano: in any event - thanks for you pastebin - that will be the bones at least.
00:31 jeremyBass @markizano I have tried explaining what the need is many ways here https://groups.google.com/forum/#!topic/salt-users/aLI2MjJ26TM.. and yes i have it set so the app go to a subdir.. but the server base will not know of them so i can't put them in some evn or in the top.sls as they will be cloned in to the only think i know before it's run which is the subdir they will be in
00:36 jeremyBass I'm really frustrated atm.. i don't get why i can't simple say.. state files will be here and here.. look for the top.sls in each and run... :-\
00:36 mordred joined #salt
00:36 hunter treat both as environments?
00:36 j_ joined #salt
00:37 kermit joined #salt
00:37 kermit joined #salt
00:37 jeremyBass i don't see how i could treat them as environments.. the secound location is known for the state files but what is in that path is not..
00:38 diegows joined #salt
00:38 hunter I was just thinking of how base/top.sls is read and then envs*/top.sls is read until match is made. That _sounds_ like roughly what you want.
00:38 markizano jeremyBass: the secound location is known for the state files but what is in that path is not..
00:39 markizano are you talking about location like ip address of machine, or location on disk where the state file is ?
00:39 markizano and are you really specifying the file location on disk to states ??
00:39 rojem joined #salt
00:40 markizano or representatively as names ?
00:40 jeremyBass @markizano i git clone in the app during the base state.. i know where that repo that has state file in it will land.. but i don't know what state file will be in it when it is cloned in
00:40 markizano jeremyBass: can you pastebin your top.sls? are you allowed ?
00:41 alunduil joined #salt
00:42 cachedout joined #salt
00:42 nineteeneightd joined #salt
00:42 jeremyBass @markizano this is the base repo... https://github.com/jeremyBass/WSU-serverbase-centos .. it will pull in this repo https://github.com/jeremyBass/WSUMAGE-base into a location i choose based off the project pillar i set in the base .. https://github.com/jeremyBass/WSU-serverbase-centos/blob/master/provision/salt/pillar/projects.sls
00:43 hunter jeremyBass: I'll ask just because I can - why not have them all in one repo?
00:43 markizano ^ i second this ...
00:43 hunter (Perhaps I'm not understanding the requirement driving the multiple repos)
00:44 jeremyBass :D casue there will be like 50 apps to work with
00:44 hunter jeremyBass: get it all working with one repo. Huge repo.
00:44 hunter THEN split it.
00:44 jeremyBass there could be any combonation of the one sever and the apps
00:44 jeremyBass I'd have like 1000s of repos if i did that
00:44 hunter No - have ONE repo with thousands of apps/modules/sls files.
00:44 jeremyBass no
00:45 hunter Get that working, then split it up.
00:45 jeremyBass lol
00:45 jeremyBass that is one massive repo of states..
00:45 jeremyBass would be to hard to work with is why.. super dirty
00:45 hunter Fair enough.
00:45 jeremyBass i have the base server working
00:45 scott_w joined #salt
00:46 jeremyBass i just want to load the apps as they are called for..
00:46 hunter Does salt have a "go get" state or module or whatever? Some ass put our application into a github repo and didn't build an rpm for it.
00:47 jeremyBass what salt needs is a load sub state files path or something.. :-\
00:48 jeremyBass this is accounted for in chef and puppet and i can do this i shell but we have to use salt soo.. i must get this working lol..
00:48 taion809 joined #salt
00:50 jdenning jeremyBass: Have you tried restarting the salt-master daemon after the git repos are downloaded?  Perhaps the top files in the additional repos are not being processed since the path is not available at startup?
00:50 APLU joined #salt
00:53 jeremyBass @jdenning well from what i get.. the top files in the repo's are ignored cause there is a top.sls in the server base.. if i understand correctly.. but .. i mean I am willing to try to restart the salt-master.. thou it's a masterless done through vagrant
00:57 jdenning jeremyBass: As I mentioned earlier though - I really think you should re-consider the approach here, you are losing a lot of the convenience and productivity gains that you would generally see from configuration management in an effort to avoid "dirty" repos..
00:58 markizano .
00:58 jeremyBass well the issue is that i would have massive files that would always be needing to be edited by many devolpers that may not all be at the same level of trust.
00:58 markizano +-+
00:59 jdenning developers are editing the state files?
00:59 jeremyBass well for their apps yes.. that is why the server was to be of it's own
00:59 jeremyBass why we need the server to load the apps with the states in..
01:01 jeremyBass that way we have a stable server to work with.. only trused ppl work with that.. and all dev work with their own apps/states and if they bomb theirs there is no chance that they bombed something in the base server states
01:01 jeremyBass it's a trust thing in one sense.. but it's a lets not have a 1000 state files in one repo too
01:02 taion809 joined #salt
01:02 jdenning jeremyBass : have you looked at the concept of 'environments' other than base in the top.sls file?
01:03 jeremyBass @jdenning yes.. but I can't see how to implament that if i don't know what app will be there
01:03 jeremyBass or combonation of apps at that
01:03 taion809 joined #salt
01:04 jdenning alternatively, I would instruct developers on how to manually apply their state files (i.e. outside of the definition in top.sls)
01:05 jdenning -or- use an external top system, and control access to that - so devs would only be able to modify the params for machines they have access to
01:06 jeremyBass @jdenning that is not an option.. plus that doesn't solve the masive amount of state files in one repo.. problem is we would be doing pull request out the ying yang and having to veit all that to include all the app combos into the server
01:07 zzzirk joined #salt
01:08 jdenning I would question allowing people to write states if they can't be trusted to run the command to apply them :) ..you could also use the gitfs backend, which will create an env for each branch in the repo, and allow each dev their own branch..
01:09 jdenning otherwise, I think you need to look into writing some custom modules
01:09 Gifflen joined #salt
01:10 rojem joined #salt
01:10 jeremyBass oh but in the end we would then have tons of brunches .. and still the master that is the offical would still be one big pile.. .. i know you guys want me to push it all together. which in the limited repos i have given works, but add 50 more apps and then it's one big repo mess.. :-\
01:11 jeremyBass I'm up to write a custom something to get salt to undersand states from other paths.. or multiple top.sls or what have yeah
01:12 elfixit1 joined #salt
01:12 kainswor for our usage- we have different envs which are autogenerated from git hooks
01:12 retr0h joined #salt
01:12 markizano Sorry - company stepped in, brb
01:12 kainswor then a master.d/fileroots.conf file gets made to point to all the different evns
01:13 retr0h joined #salt
01:13 kainswor but we do abstract the salt interface a bit- for our usage we manage all the actual bindings (pillar and top) through dbs
01:15 jfzhu_us jeremyBass: Out of curiosity. How would you do what you are describing in chef via the vagrantfile?
01:16 jeremyBass sigh.. so if i write something custom.. i am guess now.. a _module .. i should be able to tell salt to pull state files from more then one path, respecting the top.sls?
01:16 kainswor well our solution just advises salt to search several different environments and then application states are all bound with their respective environment
01:17 jeremyBass @jfzhu_us I'd have to dig that out.. i did test on different provisioners, shell through salt.. and could spilt the server from app on all but salt as of yet
01:17 kainswor only devops stuff is in the actual "base" env
01:17 oz_akan_ joined #salt
01:19 jfzhu_us jeremyBass: so you are saying a chef/puppet provisioner can call itself?
01:19 kalloc joined #salt
01:20 jdenning jeremyBass: You're going to have to figure out what the best option is for your environment, but salt is pretty modular, and it's possible that you can get what you want out of it if you write some custom code.  I'm still not 100% clear on what your ideal workflow is here, but it sounds like you are going to want to either a custom tops system or wheel system.. see http://docs.saltstack.com/topics/development/modular_systems.html for in
01:20 jdenning on the systems you can extend
01:20 jeremyBass @jfzhu_us no.. just that i was able to have to repos and have them run as one.. which is what I'm tring to do here.. it's not that they have to call them selves as what is needed is to have to folder structures..
01:22 jdenning jeremyBass: you can definitely have multiple repos stack on top of each other, that is a common use case
01:22 kalloc_ joined #salt
01:22 jeremyBass @jdenning .. so really.. the bootstrap_salt.sh may be the place to do the edits...?
01:23 jeremyBass well that is all i want.. a repo on top each other.. two folder(or more) where i don't have to say.. here is every app out there, chose one.. but say, what apps would you like to load
01:24 n8n joined #salt
01:24 jdenning you can do that - but you have to tell salt which state to call
01:25 jeremyBass and I think that is where i get stuck.. i don't know the states till the repo is in.. although all testes with the repo existing has lead me to believe that salt can't do this as it can't load a top file from more then one path?
01:26 jeremyBass i pick that up from http://docs.saltstack.com/ref/file_server/file_roots.html
01:26 kainswor @jdenning- to bug you more- I'm looking into the issue I was having yesterday. I notice that the remote fileclient does query _ext_nodes on the master. But I put a log.warn at the top of the _ext_node method in master.py and I'm not seeing any noise on any of the logs- any ideas how that could be
01:26 jeremyBass and testing seems to lead me to belive that is what is going on... i think
01:26 kainswor @jeremybass- it can load multiple top files
01:26 n8n joined #salt
01:26 kainswor you need to define multiple environments in your file roots
01:27 kainswor and it will load the top file from each and merge them
01:28 jeremyBass hmm. yeah see that is the issue i guess.. i can't define and evn unless i know the app right.. I build the minion file now.. that is how i define the paths.. but .. well i guess i would have to use the path name as the env?
01:28 jeremyBass oh maybe that could work?
01:29 jdenning kainswor: are you sure you have the loglevel set low enough in the config?
01:29 kalloc joined #salt
01:30 kainswor yeah- i see other 'warnings'. I'm not sure the method is getting called :/
01:30 jdenning can you post the code?
01:30 jeremyBass ok but i have to set and env: in the root minion from a grain right?
01:30 jdenning jeremyBass: that is the typical method, yes
01:31 kainswor sure- i'll get some github links
01:31 alunduil joined #salt
01:32 kainswor https://github.com/saltstack/salt/blob/v0.17.4/salt/fileclient.py#L854 is the call
01:32 kainswor https://github.com/saltstack/salt/blob/v0.17.4/salt/master.py#L823 is the method
01:33 jeremyBass so . hmm.. dang.. well i can build the minon confg file.. that is how i'm adding the file_root paths.. but .. so i would then need to add the env: _____ .. and then when .. wait.. so when would the env get set though.. for the repo I'm bring in?
01:33 kainswor I put some log methods into the fileclient code and see it is being ran on salt-call state.show_top. but it gets an empty dict back and the method in master.py doesn't seem to execute
01:33 jeremyBass https://github.com/jeremyBass/WSU-serverbase-centos/blob/master/provision/salt/minions/vagrant.conf is where I can build it..
01:34 givernao is there a simple way to install many packages via state files (instead of repeating pkg0:pkg:-installed pkg1:pkg:-installed...) ?
01:34 givernao like pkg:-installed : pkg0,pkg1,pkg2...
01:34 kainswor yes
01:34 kainswor specify pkgs: [name, name, name]
01:35 jfzhu_us givernao: Wouldn't you want to abstract the packages off to a pillar and just use yaml to iterate through them?
01:35 kainswor I wouldn't think so.
01:35 kainswor doing it with the pkgs field combines the apt/yum call
01:35 kainswor (speeds it up a bit)
01:35 kainswor see http://docs.saltstack.com/ref/states/all/salt.states.pkg.html
01:36 zzzirk joined #salt
01:36 jfzhu_us Oh so that explains why my scripts are so slow. I've been using too much yaml
01:36 kainswor (which can still be enumerated by a pillar ;)
01:37 jdenning kainswor: I would try putting some log hooks in both the try and except clauses, maybe you are getting an exception (which returns '')?
01:37 kainswor well- the yaml is fine.. but by using a separate "pkg.installed" for each package makes the package subsystem start up for each one
01:37 jdenning kainswor: I'm not sure about the salt internals though - I did all my logging hooks just in my own pillar code..
01:38 jdenning kainswor: you can look at my ext pillar if you'd like: https://github.com/jasondenning/salt-pillar-dynamo
01:38 taion809_ joined #salt
01:39 givernao kainswor: thanks, going to check that
01:39 jeremyBass ok. so .. https://salt.readthedocs.org/en/latest/topics/targeting/grains.html .. doesn't say anything about evn: .. can i set multiple evn: 's for that one grain? .. like http://pastebin.com/ufTBVLpJ .. ?
01:39 jdenning kainswor: sorry - I might be misremembering what your issue was, could you refresh me?
01:39 givernao jfzhu_us: would be a good idea for a second step
01:39 kainswor custom tops that only works from the master
01:40 mbarrien joined #salt
01:40 snave left #salt
01:40 jdenning oh right you were working on a tops module..I don't have that code public yet..right I remember now, you've got it working on the master but not from the minion..
01:41 kainswor I can run highstate off the master, but not from 'salt-call'
01:41 kainswor yup
01:41 kainswor yeah- I debugged one issue- I thought the custom tops would expect data returned in the format of a regular top.sls, but it uses the cobbler format basically
01:42 retr0h joined #salt
01:42 kainswor but that actually allowed me to optimize a bit- rather than dynamically generating a whole top file
01:43 Ryan_Lane2 joined #salt
01:43 Ryan_Lane21 joined #salt
01:44 jdenning yeah, I think you're going to have to get someone at SaltStack to help with that one..did you post to the google group? (that seems to be the best way to get dev attention)
01:45 jdenning kainswor: have you tried using any of the builtin ext_tops from salt-call?
01:46 jdenning I will definitely test it out with my code this weekend when I get back to work on it, but I know that doesn't help much now :)
01:46 jdenning if salt-call is consistently failing to utilize the external tops system, that seems like a bug to me
01:47 jeddi joined #salt
01:49 kainswor ah- I'll have to make noise on the google group
01:50 kainswor I haven't tried the builtin ones.. only because I don't have anything to feed them with
01:50 kainswor but I ripped off the return format of the regular ones and it works master side- add noise to the convo this weekend if you run into the same issue
01:51 kainswor I'm pretty sure it's just some sort of mismatch where the method isn't getting called
01:52 clearclaw jdenning: You do anything with EBS vols?  I'm having a bit of a bodge getting the syntax right for building a box which mounts a given volume_id.
01:53 jdenning clearclaw: I do all my AWS provisioning with custom code, which uses boto in the backend..
01:53 jdenning (I've never even opened the docs for salt-cloud :) )
01:53 zzzirk joined #salt
01:53 clearclaw Ahh.
01:54 * clearclaw mutters about docs a bit.
01:54 jdenning BIAB..
01:59 jeremyBass ok.. so after building the minion config .. this is what i end up with http://pastebin.com/88bqZzWx .. that is what is ready to load the sub app.. so from here.. when i'm i saying I'm  moving from this app evn to this app env? .. where does that get stated?
02:03 mgw joined #salt
02:03 fllr joined #salt
02:07 goog joined #salt
02:07 goog is salt better than ansible?
02:07 goog if so, why?
02:08 __number5__ goog, why ansible is better than salt?
02:09 goog don't know
02:09 jeremyBass ok .. so i was able to get this to build out for my minion config  .. http://pastebin.com/Ghjy7rcD .. it' running the server base.. which it was before.. but .. well how am i to call up the env?  or is it that they will just read the top.sls in the folders i assigned them and go from there?
02:09 goog __number5__: do you know?
02:11 __number5__ goog: same answer for your other question
02:11 jdenning joined #salt
02:13 jeremyBass they all have there pros and cons right.. i mean i did the same thing I'm trying to do in shell 10x faster.. but salt easies the coding needed .. just saying there are going to be reasons both side will say one is better then the other.. best to try it out right?
02:14 kedo39 question: i've made a salt-minion VM on virtualbox, and I have my salt master. they can each ping each other, but 'test.ping' times out. i know the minion can communicate with the master because it managed to send its key over, but it times out for everything else. any suggestiosn?
02:15 givernao there are no equivalent pacakges for build-essential on rhel. Can I still make the install transparent with pillar?
02:16 rojem joined #salt
02:16 markizano jeremyBass: how are you executing all of this? looks like part of this is a web server, part documentation, part rakefile - all under one git repo...
02:17 cocoy joined #salt
02:17 jeremyBass @markizano there is no rakefile.
02:17 rojem joined #salt
02:17 jeremyBass oh.. wait.. ingore the non-salt
02:18 markizano jeremyBass: lol
02:18 jeremyBass that is from the orginal shell provisioning
02:18 markizano givernao: can you expand on that plx ?
02:18 jeremyBass that was the https://github.com/jeremyBass/WSUMAGE-vagrant which works perfectly.. but that is shell..
02:18 jeremyBass now I'm moving to salt here..
02:18 higgs001 joined #salt
02:18 kedo39 welp, looks like deleting the key on the master and then restarting the minion and accepting the key again fixed it
02:19 jeremyBass so in that https://github.com/jeremyBass/WSU-serverbase-centos it's just a vagrant file and then the salt.. the non-salt is going to be removed
02:19 jeremyBass in fact let me clean up here and recommit
02:21 rojem joined #salt
02:22 markizano kedo39: I've known to check the process table for salt-minion, if it's not running and won't start, then run salt-minion directly and observe the error from it not starting.
02:22 givernao markizano: something like {% if  grains['os'] == 'RedHat' %} yum groupinstall "Development Tools": build-essential
02:23 givernao so my state file stays generic
02:23 rojem joined #salt
02:24 givernao (a hook on build-essential install on a centos that run yum module)
02:24 rojem joined #salt
02:25 rojem joined #salt
02:26 rojem joined #salt
02:26 jeremyBass @markizano the server repo is clean now.. https://github.com/jeremyBass/WSU-serverbase-centos .. i now have the vagrant file building this as the minion .. mind you it's only the example based off the one app repo I'm pulling in.. https://github.com/jeremyBass/WSU-serverbase-centos/blob/master/provision/salt/minions/vagrant.conf
02:26 jeremyBass that only think I'm not sure of is how I'm going to be saying ok now do this env .. and now thing env.. how to switch env or run one after another
02:28 markizano jeremyBass: Isn't that vagrantfile ruby?
02:28 markizano could you `require 'yaml'` at the top and use that?
02:29 markizano Might make your parsing a bit easier.
02:29 kalloc joined #salt
02:29 markizano Now - are developers working out of the virtual environments, or are they contributing to the core of what stands up the virtual environments ?
02:29 markizano jeremyBass: ^
02:32 jeremyBass @markizano yes it's ruby .. and the goal is that dev don't touch the serverbase, which is stood up by vagrant.. they make there app and only use the project pillar in the server base to say what apps they want to load up.. ie: they eidt this file, https://github.com/jeremyBass/WSU-serverbase-centos/blob/master/provision/salt/pillar/projects.sls
02:32 jeremyBass that is the only area in the server base.. but once i have the server repo set, then i was going to gitignore that project file so it's clear of the repo
02:33 jeremyBass that way they can load any number of apps at the same time under the same server envoironment
02:33 fllr Any reasons why a machine would be detected by salt its master, but not show up in salt '*' test.ping?
02:33 mgw joined #salt
02:39 xl1 joined #salt
02:40 sroegner fllr: how do you define found by its master?
02:40 forresta joined #salt
02:41 fllr sroegner: salt-key detects the minions, I've accepted it, salt -v '*' test.ping returns: Minion did not return
02:42 jeremyBass ok so I'm closer i swear to the final answer... but i can't seem to google how to switch env or run on after the other
02:45 jeremyBass ideas? or docs I'm missing on that?
02:45 sroegner salt-key lists keys - what you describe can happen if the master has an IP that is different from what the minion have configured
02:45 sroegner fllr: check the minion config
02:45 fllr sroegner: That doesn't make sense... The master wouldn't know of the minion's existence, unless the minion knew how to contact the master...
02:45 sroegner :-)
02:45 seba left #salt
02:46 kolbe left #salt
02:46 sroegner fllr: i had exactly that effect yesterday - the minion registers successfully, then the master changes (name or address) - salt-key will list the minion under its id but test.ping will not have it
02:47 fllr sroegner: Ummmm. Let me try to ping it...
02:47 yomilk joined #salt
02:48 fllr sroegner: looks like it's finding the master all right...
02:49 sroegner fllr: quite possible your problem is different
02:49 sroegner fllr: can the master ping the minion?
02:49 fllr Maybe... I'm trying to setup a multi vm environment using vagrant...
02:49 fllr let my try that
02:49 sroegner are you using NAT?
02:50 fllr sroegner: yes.
02:50 sroegner booh
02:50 fllr sroegner: nat?
02:50 sroegner fllr: what kind of interface?
02:50 diegows joined #salt
02:50 jeremyBass can't you use the ip you set in vagrant to ping it?  I know once i set my host file I can ping the server i have vagrant set up
02:51 fllr sroegner: not sure. I'm a beginner at vagrant...
02:51 fllr jeremyBass: yeah, that works just fine...
02:51 fllr sroegner: how can I check that?
02:51 jeremyBass oh my bad lol
02:51 ajw0100 joined #salt
02:51 sroegner fllr:  ifconfig is a start
02:52 fllr sroegner: what am i looking for?
02:52 sroegner i don't know that you could use the standard setup (NAT) interface for multi-vm
02:53 sroegner i am doing that with an additional host-only interface
02:53 sroegner for which you don't have to do any port-forwarding
02:55 sroegner but i could be mistaken there
02:55 sroegner all i know is that host-only is a good idea to begin with because you expose all services to your host automatically - not just salt
02:57 fllr sroegner: I think host-only has been deprecated on vagrant 2 though... and from what I'm reading, they do require a NAT
02:58 fllr sroegner: this is what i get back form ifconfig: https://gist.github.com/felipellrocha/2eb067a712ff18b5ed94
02:58 sroegner fllr: i see - so you have a second interface
02:58 sroegner how is that configured?
02:59 sroegner in the Vagrantfile?
02:59 sroegner fllr: private_network?
02:59 fllr eth1? yeah, as a static ip using a private_network
02:59 fllr yes
02:59 fllr and that's the ip I'm trying to use to connect to my minion
03:00 sroegner fllr: thats what i meant by host-only (i think vbox still calls it that)
03:00 fllr Ah, ok. Makes sense...
03:01 zzzirk joined #salt
03:01 fllr sroegner: heh... I went to my minion and ran sudo salt-minion, and it's telling me the salt master's key has changed.
03:02 fllr which, now that I recall, I had accepted that master once, then destroyed it, then brought it back up again... how do I clean that up?
03:02 sroegner fllr: at which point you go to the master and revoke/delete the existing minion key
03:03 sroegner then it should come back for re-registration
03:03 sroegner fllr: question is how that happened
03:05 fllr Well, I'm guessing once i destroyed the master's vm, the minion didn't clear off the master's key. Brought it back up, accepted the minion again with my new master, minion just kept the same key.
03:05 fllr tried to contact the minion, couldn't cause minion couldn't authenticate the master
03:06 markizano jeremyBass: Could you get away with defining what you need in the pillar and making salt handle the project via git using git.latest ?
03:07 markizano Instead of a subproject in your vagrant stuff, make it a managed repo that you control per-env right in your state definition.
03:07 markizano Each dev can be assigned a .sls in apps/my-project.sls
03:07 markizano when they want changes, they issue a pull-request to you.
03:07 fllr sroegner: I'm guessing... I'm trying to see if deleting the key off the minion would work
03:07 markizano You can accept the changes and have total control over the vagrant stuff while devs have fun in the VM's and their projects.
03:07 sroegner fllr: i always rebuild all members of the cluster and run a shell provisioner explicitly registering all minions
03:08 jeremyBass @markizano, i thought about that but.. the issue is that each app can have many devs doing different things, and may have needs for different or more state files.. BUT BUT... i just got it to read from the folder .. had and ID colision
03:09 fllr sroegner: Worked! I do too... but I had been working on something specific to my master most of the evening...
03:09 sroegner fllr: sounds like it would but in the long run ... does it really make that much sense to keep a member?
03:09 jeremyBass but hot dog it did it
03:09 fllr sroegner: So I got tired of bringing down all my machines in my cluster and then back up...
03:09 jdenning joined #salt
03:09 sroegner fllr: i see
03:09 markizano jeremyBass: avoid giving them too many states.
03:10 markizano the applications must be simple or definable in a pillar.
03:10 markizano you write one state to handle everything, they write multiple pillar instances to represent the objects.
03:10 fllr sroegner: Thanks for the help!
03:10 sroegner fllr: np
03:10 markizano jeremyBass: does that help?
03:11 jeremyBass only issue is that well i have to run it with the dran repo already there.. so the git.latest which is how i am pulling the app repo in.. well it doesn't see it since it wasn't there till it was git.latest was done..
03:11 markizano jeremyBass: i was reading something somewhere that you could force salt to reload modules ...
03:11 jeremyBass @markizano.. the issue is that these are not small apps.. they need a few states in some cases
03:12 markizano in the case you were doing something reflective like introducing new states via the result of another state.
03:12 jeremyBass yes that is what i need to to now i think
03:12 jeremyBass if i can get that then i have done it :D .. solved it :D
03:12 markizano ok, in those cases would be fine, if every app was snowflake, it would be really scary :x
03:12 jeremyBass just need to find that and my hell is over
03:13 jeremyBass saddly , yes every app in sortof a snowflake.. why i don't want the all in one repo from hell
03:13 jeremyBass lol
03:13 delkins one to control the rest through git submodules
03:13 jeremyBass so i wil run down the reload unless someone know where that is
03:13 delkins use beasts :)
03:13 taion809 joined #salt
03:14 jeremyBass submodules are the devil lol
03:14 markizano i still can't wrap my head around the submodule thing, but if it works for your setup ...
03:15 jeremyBass well ok.. i just need to run down the reload and i may be done :D .. I'm going to grab a uick bite to eat and then back at it
03:15 jeremyBass thank you guys for the help
03:15 markizano jeremyBass: https://github.com/saltstack/salt/issues/450
03:15 jeremyBass i'm almost there !!!:D
03:15 davet joined #salt
03:16 jeremyBass oh what.. um.. so i would do a cwd.run: and `sys.reload_modules` ?
03:16 jeremyBass well wait . i need food.. I'm slugish now
03:16 jeremyBass brb in like 15-ish
03:16 jeremyBass tk again
03:18 markizano jep
03:29 kalloc joined #salt
03:30 logix812 joined #salt
03:31 bemehow joined #salt
03:35 quanta_ joined #salt
03:37 quanta_ I have a macro in /srv/salt/nrpe/passive.sls, then in /srv/salt/rsyslog/nrpe/init.sls, I import it as `{% from 'nrpe/passive.sls' import passive_check with context %}` but I got this error TemplateNotFound: nrpe/passive.sls
03:39 quanta_ I also tried to include nrpe.passive, then `{% from 'passive.sls' import passive_check with context %}` but still got TemplateNotFound: passive.sls
03:41 sroegner joined #salt
03:45 ConceitedCode joined #salt
03:47 tessellare joined #salt
03:48 zzzirk joined #salt
03:53 Mua joined #salt
03:53 thrashr888 joined #salt
03:53 jalbretsen joined #salt
03:54 thrashr888 joined #salt
03:57 jimallman joined #salt
04:07 forresta Has anyone messed with the saltconf slide template?
04:11 bhosmer joined #salt
04:14 oz_akan_ joined #salt
04:14 yomilk joined #salt
04:17 gatoralli joined #salt
04:19 gatoralli can pillar load files as values? the closest i came to this was the solution described at https://groups.google.com/forum/#!topic/salt-users/x-j7S7IzXv8, but it feels very hackish
04:20 ossalk joined #salt
04:28 whiteinge not general files, no
04:29 kalloc joined #salt
04:29 whiteinge pillar can load external json or yaml files, however. so if you have a large file you want to keep out of your regular pillar file for readability you can just "import" it
04:29 whiteinge http://docs.saltstack.com/ref/renderers/all/salt.renderers.jinja.html#template-serializers
04:30 whiteinge yaml has decent syntax for multiline strings so storing a whole file in yaml isn't too bad
04:30 whiteinge storing binary is problematic though
04:32 __number5__ hint: base64
04:36 ConceitedCode joined #salt
04:38 quanta_ I am writing a macro that return a cronjob syntax. How to escape the special characters such as: *, /, …?
04:38 quanta_ with variable, I can use: |e, |safe
04:38 jeremyBass so I'm trying to run down that reload.. i tried this http://pastebin.com/UJ1pZBPu based on trying to reload the modules all based from https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.saltutil.html ... not sure what to use
04:39 quanta_ backslash didn't work:
04:39 quanta_ could not found expected ':'
04:39 quanta_ in "<unicode string>", line 30, column 1:
04:39 quanta_ \*\/5 \* \* \* \* nagios output= ...
04:39 quanta_ ^
04:40 gatoralli whiteinge: thx for the links
04:42 gkze joined #salt
04:43 whiteinge quanta_: can you pastebin what you have?
04:44 ossalk Hi, how can I iterate over the minion list like:  for hostname in grains.item 'host'
04:44 quanta_ whiteinge: https://gist.github.com/8449903
04:45 whiteinge jeremyBass: try this: http://pastebin.com/UFFbBTvM
04:45 quantalrabbit i want to ensure an apache module is enabled such as "rewrite".  Is there a way to do it with salt states?
04:45 jeremyBass @whiteinge .. thanks will do right now
04:47 cachedout joined #salt
04:49 ossalk Hi, how can I iterate over the minion list like:  for hostname in grains.item 'host'
04:50 whiteinge quanta_: is the output from this macro used in a file? like in /etc/cron.d/ perhaps?
04:51 quanta_ whiteinge: yes, it is called in a sls file to generate /etc/cron.d/xx
04:52 whiteinge quanta_: i'm not sure you need to escape those chars at all for that use. jinja should ignore them and just write them to the file. (i may not understand the full use-case yet.)
04:52 whiteinge are you seeing an error somewhere?
04:53 quanta_ whiteinge: without escaping, I got:
04:53 quanta_ expected alphabetic or numeric character, but found '/'
04:53 quanta_ in "<unicode string>", line 29, column 2:
04:53 quanta_ */5 * * * * nagios output=$/usr/l ...
04:53 quanta_ ^
04:55 ajw0100 joined #salt
04:55 whiteinge quanta_: ah, gotcha. looks like yaml might be complaining about that. can you show me where in your sls you're calling the macro?
04:57 whiteinge ossalk: try {% for hostname in grains['host'] %}{{ hostname }}{% endfor %}
04:58 quanta_ whiteinge: https://gist.github.com/quantonganh/8450012
04:58 quanta_ whiteinge: ah, ok, I would try |e, |safe in sls file
04:58 quanta_ wait a moment
05:00 whiteinge quanta_: ok, i'm with you. you shouldn't need any escaping there. try indenting that macro call two more spaces
05:00 ossalk ok trying. Also how can I see the returning result like ?
05:03 whiteinge ossalk: http://paste.fedoraproject.org/68848/98486211/
05:04 whiteinge er. sorry, you can get to that point by running ``python`` with no arguments then typing ``import yaml``
05:05 whiteinge or there's online yaml parsers that may be easier to use if you're not a python person :)
05:07 ossalk ok , I am a python person :) .
05:07 whiteinge ah, good :)
05:07 ossalk and trying to learn salt
05:08 whiteinge if you're a python person you may appreciate this for troubleshooting:
05:08 ossalk but sometimes it is confusing :(
05:08 whiteinge https://github.com/saltstack/salt/blob/develop/tests/saltsh.py
05:08 whiteinge yeah, it can be. there's lots of layers to wrap your head around
05:09 jeremyBass dang .. `saltutil.refresh_modules` didn't work either.. ends up with http://pastebin.com/A6R4kTK4
05:09 quanta_ whiteinge: it didn't work: both of |e and |safe
05:09 quanta_ still got:     Rendering SLS rsyslog.nrpe failed, render error: while scanning an alias
05:09 quanta_ in "<unicode string>", line 29, column 1:
05:09 quanta_ */5 * * * * nagios output=$(/usr ...
05:09 quanta_ ^
05:11 whiteinge jeremyBass: cmd.run -> module.run
05:11 whiteinge quanta_: sec. i'll pull the full macro into a pastebin...
05:11 jeremyBass @whiteinge ok will do.. that is this right? http://docs.saltstack.com/ref/modules/all/salt.modules.sys.html
05:12 whiteinge jeremyBass: no, this: http://docs.saltstack.com/ref/states/all/salt.states.module.html#salt.states.module.run
05:12 whiteinge are you familiar yet with the difference between state modules and execution modules?
05:13 jeremyBass oic.. well sort of.. but I'm trying to refresh the list of state files
05:20 quickdry21 joined #salt
05:22 whiteinge quanta_: (tested) http://paste.fedoraproject.org/68854/13898497
05:22 whiteinge quanta_: i didn't have access to your pillar or custom fuctions so I pulled that out, hopefully the example still makes sense
05:22 whiteinge the takeaway should be: no escaping needed :)
05:24 quanta_ whiteinge: tks, but insert a slash betweet the first * and {{ somenumber }} to see if it works
05:25 whiteinge jeremyBass: state files or state modules? you don't need to sync state files (sls files). that happens automatically
05:25 dwfreed I was wondering why that hilighted me, and then I realized you said 'betweet' instead of 'between'
05:28 jeremyBass @whiteinge we are git.lastest a repo in.. which has state files that need to be read.. it works if the repo is there, but when it's cloned in it fails to work.. it's running now with the change you suggested
05:29 kalloc joined #salt
05:30 david_a joined #salt
05:30 jeremyBass it worked.. i think..
05:30 jeremyBass oh dang i don't know if it did.. i need to run it again
05:31 david_a joined #salt
05:34 sroegner joined #salt
05:40 david_a joined #salt
05:43 Ashtonian joined #salt
05:47 jeremyBass @whiteinge so module.run:  - name: saltutil.refresh_modules doesn't error, but doesn't refresh the state files that was loaded
05:51 n8n joined #salt
05:55 jeremyBass seems like i need salt.modules.saltutil.sync_states(saltenv=None, refresh=True)
05:55 Nazca woot, I got to the bottom of my big bug ... it's a fragile and invasive feature that defaults to on ¬_¬
05:55 forresta Nazca, you should document that :P
05:57 Nazca forresta: I've added the details to my bug report (#9767) and will be doing a PR tomorrow to make it opt-in via config
05:58 forresta sweet
05:58 Nazca the logic is really silly ... it moves entries in /etc/portage/package.* to files derived from the atom they're about ... but since comments don't have atoms, you're a bit stuffed.
05:59 forresta lol
06:00 Furao joined #salt
06:00 Nazca of course it tries to do that move even if you just use pkg.installed ... and cli emerge will happily fill your package.* files with comments ... so it'll probably break more often than it works
06:02 gildegoma joined #salt
06:05 markizano joined #salt
06:11 jeremyBass dang `module.run:  - name: saltutil.sync_states` didn't reload the states either
06:11 bhosmer joined #salt
06:21 rmt joined #salt
06:24 eclectic joined #salt
06:24 EWDurbin joined #salt
06:26 marcinkuzminski joined #salt
06:29 kalloc joined #salt
06:30 micko joined #salt
06:34 jfxura joined #salt
06:35 jfxura salt-call file.get_selinux_context /etc/hosts doesn't return any data
06:35 jfxura i am running 0.17.1
06:35 jfxura it says "Executing command 'ls -Z /etc/hosts' in directory '/root'"
06:35 jfxura but it returns nothing
06:36 Furao jfxura: upgrade to 0.17.4
06:36 jeremyBass oh heck.. i did this http://pastebin.com/XiKDWhSd and it still doesn't pick up the new state file to run..
06:36 Furao .0 and .1 were quite buggy
06:38 oz_akan_ joined #salt
06:49 monokrome joined #salt
06:52 hvn joined #salt
07:00 iMil joined #salt
07:01 fllr joined #salt
07:02 linjan_ joined #salt
07:02 twiedenbein joined #salt
07:05 alice_wl_ joined #salt
07:05 alice_wl_ hello
07:06 givernao Hi
07:08 Katafalkas joined #salt
07:08 alice_wl_ I get an exeption: Exception AttributeError: "'list' object has no attribute 'keys'" in <bound method LocalClientEvent.__del__ of <salt.utils.event.LocalClientEvent object at 0x241eb10>> ignored
07:09 alice_wl_ on every command. The commands work though.
07:10 alice_wl_ running salt 0.16.4 from funtoo
07:14 ravibhure joined #salt
07:20 Shenril joined #salt
07:20 jfxura Furao: thanks
07:22 favadi joined #salt
07:23 sroegner joined #salt
07:24 givernao I have some troubles executing a module command in a state file. It does not fail, but neither does the work
07:24 givernao http://pastebin.com/bBUDNWMA
07:29 kalloc joined #salt
07:32 ml_1 joined #salt
07:33 ravibhure joined #salt
07:36 kalloc joined #salt
07:39 oz_akan_ joined #salt
07:39 balboah joined #salt
07:42 Katafalkas joined #salt
07:43 Iwirada joined #salt
07:44 ravibhure1 joined #salt
07:48 twiedenbein joined #salt
07:54 matanya joined #salt
07:54 ch0pstick_ joined #salt
08:02 fllr joined #salt
08:04 helminthe joined #salt
08:12 bhosmer joined #salt
08:26 xl joined #salt
08:32 martoss joined #salt
08:36 harobed joined #salt
08:39 oz_akan_ joined #salt
08:42 giantlock_ joined #salt
08:45 bigie joined #salt
08:46 ch0pstick_ joined #salt
08:50 bhosmer joined #salt
08:50 slav0nic joined #salt
08:50 slav0nic joined #salt
09:00 analogbyte joined #salt
09:02 fllr joined #salt
09:10 yomilk joined #salt
09:12 sroegner joined #salt
09:16 lessismore joined #salt
09:18 micko joined #salt
09:19 anuvrat joined #salt
09:23 juso joined #salt
09:27 mikkn Is there a salt function call you can make to render a template to a file? I want to do a one off: if file doesn't exist, render template to file, but I don't want the file to be managed. I prefer if I can do it through function calls, since I want to do it from a template macro, and not from a salt state. :)
09:28 __number5__ mikkn: look at the file module (which file state is calling)
09:28 hvn mikkn: try cp.get_template salt://path/to/file out
09:29 mikkn hvn: That's exactly what I was looking for. :)
09:29 mbarrien joined #salt
09:31 jfxura when i do a salt minion2 file.get_selinux_context /etc/hosts i get a blank output
09:31 jfxura i am on 0.17.4 and RHEL 6
09:32 jfxura I get through when i do a salt-call
09:32 jfxura [INFO    ] Executing command 'ls -Z /etc/hosts' in directory '/root'
09:33 ckao joined #salt
09:33 jfxura the command 'ls -Z /etc/hosts' works fine though
09:33 jfxura Typo : salt-call gives me the same blank output
09:36 kalloc joined #salt
09:36 salt_ joined #salt
09:38 salt_ what are things that need to done in minion so master can control it
09:39 bbinet salt_: nothing more than pointing the minion to the salt-master
09:39 bbinet hi guys
09:40 jfxura let me try once again.... salt minion2 file.get_selinux_context /etc/hosts gives me a blank output
09:40 bbinet do you know if there is a way to generate the unique number for each minion that could be available as a grain or something
09:40 bbinet ?
09:40 oz_akan_ joined #salt
09:40 jfxura i am running 0.17.4 on RHEL
09:41 jfxura salt-call gives me the same blank output with something like "[INFO    ] Executing command 'ls -Z /etc/hosts' in directory '/root'"
09:42 salt_ # Set the location of the salt master server, if the master server cannot be # resolved, then the minion will fail to start. master: 192.168.2.30 "sed -i 's/^#master: salt/master:192.168.2.30"
09:43 salt_ this is how i pointed the minion to th salt 192.168.2.30
09:43 bbinet salt_: right
09:43 bbinet did you accept the minion key on the salt master?
09:44 salt_ salt '*' test.ping when i run this command this command in  the master
09:44 salt_ it prompts me nothing
09:44 bbinet what is the output of the following command on the master:
09:44 bbinet salt-key -L
09:44 bbinet ?
09:45 salt_ Accepted Keys: paris Unaccepted Keys: Rejected Keys:
09:45 bbinet salt_: ok, so your minion is called "paris" ?
09:45 salt_ this is the putput
09:45 salt_ yes exactly
09:46 bbinet salt_: so the minion key has been correctly accepted
09:46 salt_ if i want to perform any action on minion (paris). what should i want to do
09:47 bbinet salt_: have tried to run the minion in debug mode?
09:47 salt_ no
09:47 salt_ what should i do to perform in debug mode
09:48 bbinet if debian/ubuntu, you can: sudo service salt-minion stop
09:48 bbinet and then:
09:48 bbinet salt-minion -l debug
09:48 bbinet what is the generated output?
09:49 mikkn bbinet: You have server_id as a grain already, I think.
09:50 salt_ i will send you the paste bin link
09:51 salt_ http://pastebin.com/zcCNUani please refer this link
09:51 mikkn bbinet: remove "I think", server_id exists. :) It's made to be used as a unique number for mysql replication
09:51 Furao salt_: still not reading doc?
09:52 bbinet salt_: looks like a syntax error in your /etc/salt/minion config
09:53 salt_ i have run the salt-minion -l debug in the minion (paris)
09:54 bbinet mikkn: thanks a lot, will investigate on server_id
09:55 jfxura Furao: i upgraded to 0.17.4 but get_selinux_context still does not give me any output
09:56 jfxura http://pastebin.com/eh6m2tay
09:57 bbinet mikkn: server_id is good, but I also would like a grain that could act as an incremental counter of all the minions that the master manages
09:58 bbinet so server_id is not a perfect match for me
09:58 bbinet any idea of how can I create a "counter" grain or similar?
09:59 cocoy joined #salt
09:59 givernao how can I use a salt module in a state file? I tried this http://pastebin.com/bBUDNWMA, does not fail, but neither does the job :(
10:00 Furao jfxura: I guess you can just add logging code to that function
10:01 che-arne joined #salt
10:01 jfxura Furao: ok, let me try
10:02 fllr joined #salt
10:04 srage joined #salt
10:04 che-arne joined #salt
10:05 SkyRocknRoll joined #salt
10:06 kalloc joined #salt
10:06 njs126 joined #salt
10:13 bhosmer joined #salt
10:15 markm joined #salt
10:18 jeblair joined #salt
10:19 retr0h joined #salt
10:21 jasonrm joined #salt
10:22 iri- joined #salt
10:22 iri- Where is a good place to find help with the dockerio state module?
10:26 lessismore hello @all, first question here, please be kind ;-) To be short: I want to manage with salt the configuration of a database for staging and production using the same states and templates (following DRY) but using different passwords.  I understand that I can use grains to identify the two, but I did not get how to use grains to get the different password from pillars.  Are there better ways to accomplish this? Tnx
10:28 bbinet iri-: try your luck... ;)
10:28 iri- I'm struggling to get volumes to work at all
10:28 iri- http://hastebin.com/pabacutesa.txt
10:29 iri- see the volumes: part. The resulting container has a volume in it, but it isn't a bind mount to /opt/sw/tang as I'm requesting. Here's the output of docker inspect
10:29 iri- http://hastebin.com/buhunasiha.txt
10:30 bbinet iri-: sorry, I don't user volumes myself...
10:30 bbinet s/user/use§
10:31 iri- They're a pretty basic feature allowing you to bind mount a host directory inside the container
10:31 iri- It works fine if I do "-v /opt/sw/tang:/tang", and as far as I can tell dockerio should be the same thing
10:33 Ryan_Lane joined #salt
10:35 iri- bbinet: it's also not taking my environment variable
10:41 bbinet iri-: does salt-master throws any error?
10:41 oz_akan_ joined #salt
10:41 iri- no, it works fine
10:42 bbinet iri-: try reporting a bug in github...
10:42 bbinet (sounds like a bug to me)
10:42 iri- bbinet: https://github.com/saltstack/salt/issues/9773
10:43 oz_akan_ joined #salt
10:43 bbinet iri-: you're fast!
10:44 iri- bbinet: :)
10:46 kalloc joined #salt
10:49 gw joined #salt
10:51 ossalk Hi , if  salt '*' grains.get ec2_tags:Env returns ip-11111:  webserver    , how can I use it in sls file like  {% if grains.get('ec2_tags2:Env') == 'prod-web' %} I know this is not correct
10:51 esoel_ joined #salt
10:52 diegows joined #salt
10:53 quanta_ How to insert a newline in Jinja macro?
10:53 quanta_ https://gist.github.com/quantonganh/8449903
10:54 quanta_ with 2 hosts, I got:
10:55 quanta_ */5 * * * * nagios output=$(/usr/lib/nagios/plugins/check_procs -c 1:1 -C rsyslogd -u syslog); return_code=$?; printf "%s\t%s\t%s\t%s\n" "q-mail" "rsyslogd_procs" "$return_code" "$output" | /usr/local/nagios/bin/py_send_nsca -H host1 -c /etc/send_nsca.conf*/5 * * * * nagios output=$(/usr/lib/nagios/plugins/check_procs -c 1:1 -C rsyslogd -u syslog); return_code=$?; printf "%s\t%s\t%s\t%s\n" "q-mail" "rsyslogd_procs" "$return_code" "$output" | /usr/local/nagios
10:59 aleszoulek joined #salt
11:00 neilf_ joined #salt
11:01 sroegner joined #salt
11:01 esoel__ joined #salt
11:05 higgs001 joined #salt
11:21 bhosmer joined #salt
11:24 mikef joined #salt
11:25 mikef is there  a way to create a user  and specify the selinux user to associate with them? i cant see anything in the docs on selinux except  booleans
11:27 david_a joined #salt
11:34 Tanoti joined #salt
11:35 zooz joined #salt
11:37 Tanoti I have a question regarding syndic setups. We have test scenario of a top-level master (which is a minion to itself so we can update it's packages), two syndic masters (which are minions to themselves) and two true minions, opne connected to each syndic. If you do "salt '*' test.ping" all five hosts respond but if you try and call one of the true minions using a glob or some other match they do not . Any ideas why?
11:48 sroegner joined #salt
11:53 ossalk Hi , if  salt '*' grains.get ec2_tags:Env returns ip-11111:  webserver    , how can I use it in sls file like  {% if grains.get('ec2_tags2:Env') == 'prod-web' %} I know this is not correct
12:01 deepakmdass joined #salt
12:02 fllr joined #salt
12:04 rjc joined #salt
12:04 alekibango joined #salt
12:06 oky_ joined #salt
12:07 zzzirk joined #salt
12:10 oky_ left #salt
12:14 bhosmer_ joined #salt
12:17 Whissi joined #salt
12:21 oz_akan_ joined #salt
12:22 bhosmer joined #salt
12:29 psyl0n joined #salt
12:35 mikef joined #salt
12:42 kalloc joined #salt
12:42 LucasCozy joined #salt
12:42 ekristen joined #salt
12:48 mort joined #salt
12:48 SkylarX joined #salt
12:48 SkylarX left #salt
12:49 ekristen morning
13:00 Katafalkas joined #salt
13:02 ekristen does anyone know if you can do this http://docs.saltstack.com/topics/tutorials/states_pt4.html with gitfs_remotes?
13:02 fllr joined #salt
13:13 Iwirada hi
13:14 Iwirada anyone got problems installing package rpms unsing the source option?
13:14 Iwirada i got this sls: http://slexy.org/view/s207hcT9iv
13:18 Iwirada and i get the following: http://slexy.org/view/s21IA19G4d
13:19 Iwirada i guess the error is in line 1799 where it tries to compare the package names?
13:29 oz_akan_ joined #salt
13:29 balboah is salt 0.17 caching hostname as its id somehow different than 0.16?
13:30 jrdx joined #salt
13:33 mgw1 joined #salt
13:37 mpanetta joined #salt
13:42 bhosmer joined #salt
13:50 patrek quanta_ don't add a dash "-" before the ending moustache "}", ie: use "%}" instead of "-%}", the dash tels jinja to not add a new line.
13:51 brianhicks joined #salt
13:51 leonardinius joined #salt
13:51 deepakmdass joined #salt
13:53 patrek lessismore, take a look at http://docs.saltstack.com/topics/tutorials/states_pt4.html you can define env in pillar too.
13:53 leonardinius joined #salt
13:53 jslatts joined #salt
13:58 elithrar joined #salt
13:59 sroegner joined #salt
14:02 fllr joined #salt
14:04 mgw joined #salt
14:05 juicer2 joined #salt
14:06 tyler-baker joined #salt
14:09 gammalget joined #salt
14:12 Teknix joined #salt
14:12 oz_akan_ joined #salt
14:13 racooper joined #salt
14:14 elfixit Hi all.. i created a formula for setting up a multimaster 389ds cluster. It also contains extended ldap module and state. it would great to get some feedback on that work, if you are interested?
14:14 elfixit you can find the source under https://git.xiala.net/saltstack-formulas/389ds-formula
14:18 zzzirk joined #salt
14:19 oz_akan_ joined #salt
14:21 Furao elfixit: dns invalid?
14:23 elfixit Furao: wow not that i would know
14:23 Iwirada dns valid
14:23 Iwirada certificate not :)
14:23 Iwirada at least according to ie
14:23 Furao google dns server say no
14:24 Furao $ host git.xiala.net 8.8.8.8
14:24 elfixit jep is a cacert.org cert..
14:24 Furao Host git.xiala.net not found: 2(SERVFAIL)
14:26 elfixit jep google has a lot of trouble to validate dnssec, all other dnssec resolvers think it is valid.. except of google
14:28 tessellare joined #salt
14:29 elfixit you can also access it directly - IP: https://77.109.146.173/saltstack-formulas/389ds-formula
14:32 felixhummel joined #salt
14:32 felixhummel hi there!
14:33 felixhummel is there an RSS feed for new salt releases?
14:34 mgw joined #salt
14:34 lessismore patrek: tnx, I overlooked this usage, it seems to fit my use case, till try
14:35 timoguin joined #salt
14:35 quickdry21 joined #salt
14:37 elfixit hi felixhummel: what about https://github.com/saltstack/salt/releases.atom ?
14:38 bbinet madduck: hi
14:38 bbinet I've replied to your email about reclass environment
14:38 felixhummel perfect! Thanks, elfixit
14:38 bbinet on salt-users ml
14:39 bbinet maybe it's easier to discuss here about these environments in reclass
14:43 fllr joined #salt
14:43 jpihl joined #salt
14:44 _fllr_ joined #salt
15:01 tmwsiy trying to get halite up to play around with... running centos 6.3. I do not seem to have the tls files that are referenced in the default certpath, keypath, pempath. in /etc/pki/tls/certs on my installation there is two .crt files ca-bundle.crt and ca-bundle.trust.crt. I am guessing I need to generate a cert
15:01 tmwsiy if I run salt '*' tls.create_self_signed_cert test where will it put the resulting keys?
15:01 tmwsiy and what is the test bit for?
15:02 fllr joined #salt
15:03 favadi joined #salt
15:03 Furao_ joined #salt
15:04 Furao_ left #salt
15:04 bbinet tmwsiy: tls.create_self_signed_cert shoult tell you what has been generated
15:05 diegows joined #salt
15:06 xmj does salt pick up all top.sls files from subdirectories in /srv/salt?
15:06 bbinet xmj: I don't think so
15:07 xmj so... either have top.sls in the rootdir, or in others ?
15:08 JesseCW top.sls is the primary sls that sits in srv/salt
15:08 JesseCW xmj
15:08 JesseCW init.sls needs to go in subdirectories
15:08 bbinet xmj: usually, having only one top.sls file in the base environment is a good practise
15:08 JasonSwindle joined #salt
15:09 JesseCW init.sls will be called when you call the name of the subdirectory just like any other sls
15:10 bbinet see: http://docs.saltstack.com/ref/states/top.html for extensive documentation about top.sls
15:13 Katafalk_ joined #salt
15:18 higgs001 joined #salt
15:19 felixhummel i want to
15:19 ekristen anyone using salt to deploy git repos?
15:19 felixhummel ... generate a unique id per highstate - a count would do too. how would i go about this?
15:21 delkins ekristen: yeah, cjdns w/ cmd.run to build ./do
15:21 xmj bbinet: alright
15:21 felixhummel i mean inside a jinja state template, I only have pillar and grains available. how would I go about doing something like {{ import uuid; str(uuid.uuid4()) }}?
15:21 xmj can't argue with good practice
15:21 mantisx9 joined #salt
15:22 delkins felixhummel: http://stackoverflow.com/questions/6036082/call-a-python-function-from-jinja2
15:22 ekristen delkins: do you use a reactor to check out the latest code or are you running states manually
15:22 mgw joined #salt
15:22 delkins can define the function and call in {{ functioname }}
15:22 delkins or get fancy and just make the sls a #/bin/py with some special highstate returned
15:22 higgs001 joined #salt
15:23 delkins ekristen: using git.latest with - always_fetch: True, I should try without and update
15:24 delkins otherwise I would probably add a cmd to git status | grep something, and have git.latest require on that
15:25 delkins so, manually, no reactor as yet
15:31 jimallman joined #salt
15:32 JasonSwindle1 joined #salt
15:33 jmatth joined #salt
15:38 leonardinius joined #salt
15:40 leonardinius joined #salt
15:40 leonardinius joined #salt
15:41 troyready joined #salt
15:42 vejdmn joined #salt
15:42 jmatth question: running salt on the master to push out states or salt-call on the minion to pull them down should have the same result, right?
15:42 davet joined #salt
15:42 timoguin jmatth, yep
15:43 felixhummel delkins: where would I define the function?
15:43 leonardinius joined #salt
15:44 felixhummel is there a jinja environment hook in salt that i'm missing
15:45 Troic_ joined #salt
15:45 jmatth ok, i thought it should. i'm having a bit of a problem with the mysql module then. i have a config file on the minion with the mysql information, but it only seems to read it if i run salt-call. trying to run salt on the master gets me access denied (from mysql).
15:46 leonardinius joined #salt
15:48 leonardinius joined #salt
15:49 bemehow joined #salt
15:49 delkins felix, looking at that, I see a load bytecode, otherwise, yeah, where's the "jinja environment" defined?
15:49 leonardinius joined #salt
15:49 alunduil joined #salt
15:50 forresta joined #salt
15:50 leonardinius joined #salt
15:52 felixhummel GOT IT! :D
15:53 felixhummel 1. new module: _modules/felix.py containing function get_uuid (uuid collides with python's stdlib)
15:53 felixhummel 2. saltutil.sync_modules
15:53 felixhummel 3. inside the module: salt['felix.get_uuid']()
15:53 salt_whitebelt joined #salt
15:53 leonardinius joined #salt
15:53 salt_whitebelt thank god this chat irc use simple captcha!
15:54 felixhummel thanks delkins for pointing me in the right direction
15:54 salt_whitebelt on the previous one it was very difficult to decipher the words
15:54 leonardinius joined #salt
15:54 leonardinius joined #salt
15:55 felixhummel salt_whitebelt: why not use a fat irc client?
15:55 leonardinius joined #salt
15:56 felixhummel so salt makes it easy to execute arbitrary code inside states
15:56 salt_whitebelt trying to stay thin so avoid anthing fat..just joking, this web browser irc version is faster for me as i don't have to install anything.
15:56 felixhummel code for salt object in template: https://github.com/saltstack/salt/blob/develop/salt/renderers/jinja.py#L31
15:56 leonardinius joined #salt
15:58 bhosmer_ joined #salt
15:58 leonardinius joined #salt
15:58 leonidms joined #salt
15:59 leonidms joined #salt
15:59 leonidms joined #salt
15:59 leonardinius joined #salt
16:00 delkins felix, glad that worked
16:00 leonardinius joined #salt
16:01 srage joined #salt
16:01 salt_whitebelt ran: salt windows.minion cmd.script 'salt://root/saltscripts/pshell.ps1' shell='powershell' -l debug. its showing minion error: salt://root/saltscripts/pshell.ps1: unknown url type" salt. tried centos.vm.name:/, centos.vm.name://, centos.vm.name:/// still same error?
16:02 salt_whitebelt master is centos. minion is win7
16:02 mgw joined #salt
16:02 abe_music joined #salt
16:02 leonidms_ joined #salt
16:03 leonardinius joined #salt
16:03 delkins salt_whitebelt: how about cmd.script 'pshell.ps1' source='salt://root/saltscripts/pshell.ps1' .. ?
16:04 abe_music joined #salt
16:04 abe_music joined #salt
16:04 leonardinius joined #salt
16:05 forresta salt_whitebelt, did you try salt '*' cmd.script salt://root/saltscripts/pshell.ps1 shell='powershell'
16:09 forresta but not the star obviously, your minion (which if I remember correctly you only have the one windows minion)
16:09 delkins nice, that's the ticket forresta!
16:09 salt_whitebelt yes only one win7 minion
16:09 forresta did that work for you delkins?
16:09 delkins yeah
16:09 forresta or you're testing it in some way perhaps?
16:09 forresta oh ok
16:09 forresta I thought you guys were coworkers for a second there
16:10 ekristen anyone know if you can do this http://docs.saltstack.com/topics/tutorials/states_pt4.html with gitfs, or does it all have to be local
16:10 salt_whitebelt its as if the minion can't access the file to download it. its suppose to connect to master download the file and run the powershell script locally on the minion. the cmd.script suppose to do that
16:10 forresta what happens when you ran the command I provided with debug?
16:11 salt_whitebelt hang on im going to run it
16:11 forresta ekristen, that's similar to this idea: http://docs.saltstack.com/topics/tutorials/gitfs.html#branches-environments-and-top-sls-files
16:13 ekristen forresta: yeah but it seems that the files don’t stack
16:13 leonardinius left #salt
16:13 ekristen forresta: at least in my testing
16:13 salt_whitebelt forresta: minion is reporting cache error true, pid 0, retcode 1, stderr, stdout
16:13 ekristen forresta: and there is not documented way to order them
16:14 cachedout joined #salt
16:14 Iwirada anyone ever tried to install a rpm with salt? this is my sls: http://slexy.org/view/s207hcT9iv and the output is: http://slexy.org/view/s21IA19G4d on the minion i guess the error is in line 1799?
16:14 forresta salt_whitebelt, weird, I'm not quite sure what that error means, That it just can't cache the file?
16:15 Iwirada should i create a ticket?
16:16 salt_whitebelt why is it in debug mode doesn't matter what command or syntax i  used it always shows one of the debug line as missing configuration file: /root/.salt?
16:16 forresta salt_whitebelt, that's just a note, you don't have to worry about.
16:16 forresta ekristen, yea fair point, I haven't messed with gitfs too much
16:17 ekristen I think I’m just going to use git to source control my stuff and even use branches but just check them out onto the filesystem for roots to pick up
16:17 mattmtl for long running cmd, it is possible to "yield" the output (stdout) that the execution is generation over time?
16:17 forresta Iwirada, Package file salt://teamviewer/teamviewer_linux-9.0.24147.rpm (Name: teamviewer.i686) does not match the specified package name (teamviewer).
16:17 forresta can you try to change the sources for teamviewer to be teamviewer.i686?
16:18 forresta for the name
16:18 Iwirada forresta: i have tried that
16:18 forresta same error?
16:19 Iwirada it installes find, but then when it checks for the successfull installation it fails since the rpm packagename is teamviewer (i also checked with the rpm command)
16:19 forresta interesting
16:19 Iwirada so teamviewer.i... works for installation, but only teamviewer works for the check
16:20 xmltok joined #salt
16:20 Iwirada so it might be a bug?
16:21 forresta seems more likely there is some issue with the metadata of the RPM itself not being consistant, but it could be.
16:21 Iwirada mom, i will start up my vm
16:23 Iwirada http://slexy.org/view/s20oyNSjWV
16:23 Iwirada is the output of "rpm -q -p -i teamviewer_linux.rpm "
16:24 leonardinius joined #salt
16:25 AdamSewell joined #salt
16:25 AdamSewell joined #salt
16:25 srage joined #salt
16:26 lynxman joined #salt
16:27 yota joined #salt
16:27 forresta Iwirada, what release of salt are you on?
16:28 kolbe joined #salt
16:28 bretep @all am I allowed to tag issues in github?
16:28 forresta bretep, in the main repo?
16:28 bretep https://github.com/saltstack/salt/issues/9782
16:28 bretep I meant Labels
16:28 forresta you can't unless you are part of the org
16:28 bretep Ahh
16:29 forresta whoever acknowledges it will usually classify it
16:29 bretep Great!
16:29 Iwirada forresta: 0.17.4
16:29 forresta Iwirada, you're not trying to upgrade that package right?
16:29 forresta it's a straight up new install?
16:29 Iwirada forresta: nope
16:29 jmatth left #salt
16:30 JasonSwindle joined #salt
16:30 forresta Hmm
16:32 forresta Iwirada, as a quick test, can you modify the actual ID for that block from teamview, to install_teamview or something?
16:32 forresta and then see what happens
16:32 forresta so we can confirm it's related to a conflict with the - sources option
16:32 jdenning joined #salt
16:33 Iwirada forresta: so under sources: ... change the "- teamviewer" to "- _teamviewer" ?
16:33 forresta no no
16:34 forresta the ID
16:34 forresta the first instance of teamviewer:
16:34 forresta before pkg.installed
16:34 davet joined #salt
16:35 Iwirada i will change it to "teamviewer-intall" hope thats a valid id ;)
16:35 rlarkin joined #salt
16:39 xmltok joined #salt
16:40 jdenning joined #salt
16:44 jalbretsen joined #salt
16:44 abe_music joined #salt
16:45 Gordonz joined #salt
16:46 Iwirada forresta: same thing again :/ http://slexy.org/view/s2hDYeXy0p
16:49 forresta Iwirada, then I'd make a post on the mailing list first to see if anyone has a quick solution, if not then it might need to be filed as a bug, but there would need to be confirmation it could be duped, and isn't unique to teamview
16:49 forresta not that it shouldn't be fixed for teamview, but there would need to be more testing
16:49 dave_den Irawada:  in sources, specify: sources:\n  - teamviewer.i686: salt://teamviewer/teamviewer_linux-9.0.24147.rpm
16:50 Iwirada i already tried that
16:50 dave_den it shouldn't need to specify the architecture
16:51 Iwirada install works. but then when it checks for a successfull insallation it fails because the package name is teamviewer
16:51 Iwirada and this is what the rpm command reports, too
16:52 dave_den somethings funky
16:53 forresta dave_den, yea we talked about that
16:53 abe_music joined #salt
16:53 forresta dave_den, that's why I was thinking it's an issue with some sort of metadata on the RPM itself.
16:53 forresta where it sees it as two different things
16:54 groovy joined #salt
16:55 dave_den yeah, that is likely the issue
16:55 groovy left #salt
16:56 kermit joined #salt
16:56 fllr joined #salt
16:56 fllr How can I make my sls file copy one file to my minion if its host name is x*, and copy another files if its host name is y*?
16:57 dave_den Iwirada: what is your cpuarch grains listed on that minion?
16:57 Marion joined #salt
16:57 rgbkrk joined #salt
16:57 Iwirada dave_den: x86_64
16:57 Iwirada there is only one rpm on teamviewer.com
16:58 forresta that makes me sad
16:58 forresta that's some lazy BS by that company
16:58 Iwirada http://www.teamviewer.com/de/download/linux.aspx
16:59 KyleG joined #salt
16:59 KyleG joined #salt
17:00 forresta You should email and ask them to join this century on the RHEL side of things :P
17:00 forresta 'hi could you guys please advance your RPM to the 21st century? Thank you!'
17:00 Iwirada rhel would be a breeze to use - i am forced to build the whole thing on suse
17:00 forresta lol
17:02 Iwirada ok, its getting late, and i am heading home
17:02 forresta ok have a good one
17:02 Iwirada i will mail the ml tomorrow and i will most likely end up creating a ticket :/
17:02 Iwirada have a nice evening o/
17:02 forresta with the guys who make the product?
17:02 forresta I still think this is an issue with the package
17:03 Iwirada i will mail the salt ml.
17:03 forresta ok
17:03 Iwirada if i execute it by hand it works
17:03 forresta yea but the issue is the check that is occurring
17:03 Iwirada "zypper in <rpm>" it is
17:03 forresta salt thinks two different things based on the data provided.
17:05 Iwirada might be :/
17:05 Iwirada ok, see you tomorrow
17:05 pdayton joined #salt
17:05 Iwirada left #salt
17:07 hunter joined #salt
17:07 SpeeR joined #salt
17:08 fllr Where can I find documentation for salt['pillar.get'] ?
17:09 vejdmn joined #salt
17:09 dave_den fllr: http://docs.saltstack.com/ref/modules/all/salt.modules.pillar.html#salt.modules.pillar.get
17:12 fllr dave_den: thanks!
17:12 dave_den np
17:22 Dinde joined #salt
17:24 amckinley joined #salt
17:27 ravibhure1 joined #salt
17:27 ravibhure2 joined #salt
17:28 psyl0n joined #salt
17:28 twiedenbein joined #salt
17:30 bhosmer joined #salt
17:32 ravibhure joined #salt
17:40 joehillen joined #salt
17:43 cdcalef joined #salt
17:43 scalability-junk joined #salt
17:44 salt_whitebelt when we create sls file, the sls state file reside on the master server and what is the file extension?
17:45 salt_whitebelt any standard txt editor should be able to create it right?
17:45 delkins the ext is sls
17:45 higgs001_ joined #salt
17:46 delkins so if from top.sls say - statename
17:46 delkins it's either statename.sls or statename/init.sls
17:46 jslatts is it possible to escape a curl brace in a jinja template?
17:48 jslatts or as a pillar value actually
17:48 timoguin hey salt_whitebelt, were you ever able to succesffully match using the os_family grain for your windows minion?
17:48 timoguin i have one fired up now and it's working fine
17:48 thrashr888 joined #salt
17:49 salt_whitebelt no
17:49 delkins jslatts: you could make a _modules/something.py that does that curl & return, run saltutils.sync_modules and then in jinja {{ salt['something']() }}
17:49 timoguin salt_whitebelt, this works for me: salt -G 'os_family:windows' test.ping
17:49 timoguin do you not get a response?
17:50 timoguin or the no minions matched error?
17:50 jslatts delkins: sorry, i meant curly brace
17:50 delkins oh ha!
17:50 hunter_ joined #salt
17:50 jslatts delkins: trying to assign a pillar value of {sha}somepasswordhash
17:50 jslatts and salt is trying to parse it
17:50 ravibhure1 joined #salt
17:51 delkins {% verbatim %} .. {% endverbatim %}
17:51 salt_whitebelt timoguin: it comes back with the win minion name as true
17:51 timoguin it's working correctly then
17:51 salt_whitebelt timoguin: so i guess it works
17:51 salt_whitebelt can remember what command did i use last time
17:51 salt_whitebelt can't
17:51 jslatts delkins: in the state or the pillar?
17:51 delkins or { = &#123; and } = &#125; in the string
17:51 delkins either
17:52 timoguin salt_whitebelt, I think you were trying to put the 'win*' in there as well, like this: salt 'win*' -G 'os_family:windows' test.ping
17:52 timoguin which won't work
17:52 timoguin at least not written like that
17:53 salt_whitebelt timoguin: i guess if you don't specify the minion name how does it knows which minion to query after?
17:53 timoguin because the -G flag tells salt to match the minions based on the grains.
17:53 timoguin basically salt will send out a PUB to 0MQ and all the minions will see if they match the rule and respond if they do
17:54 deepakmd_ joined #salt
17:54 timoguin there are a lot of ways to target the minions
17:54 timoguin by grains is just one
17:55 ravibhure joined #salt
17:56 salt_whitebelt timoguin: with salt built in modules and states, it seem  that any windows configuration outside of those built in modules/states has to be executed through wmi wrap in powershell has to be call through the cmd.script function?
17:56 mbarrien joined #salt
17:56 analogbyte joined #salt
17:56 salt_whitebelt timoguin: im sure there are companies out there that manage mix of windows and rhel as well
17:57 tamentis joined #salt
17:58 funzo joined #salt
17:58 timoguin yea there are, but i'm not entirely sure what you mean. there definitely need to be more states/modules that are specific to windows.
17:59 timoguin I haven't done a whole lot with windows minions, but cmd.run has worked fine for me when I used it.
17:59 jslatts delkins: verbatim didnt work, trying the char codes
17:59 Ryan_Lane2 joined #salt
17:59 timoguin Custom modules are actually pretty easy to write
18:00 kolbe left #salt
18:00 backjlack joined #salt
18:00 aurigus joined #salt
18:00 aurigus joined #salt
18:03 sinh joined #salt
18:06 ajw0100 joined #salt
18:06 vejdmn joined #salt
18:07 salt_whitebelt timoguin: yes what i mean is there must be companies out there that use saltstack to make windows and rhel OSes.
18:07 timoguin yes
18:08 Troic_ joined #salt
18:08 Troic_ joined #salt
18:08 rlarkin I hope to use salt to manage debian and windows, our service is *nix server windows clients, and I'd like salt to manage the entire QA env
18:09 xmltok joined #salt
18:09 salt_whitebelt timoguin: cmd.run seem to invoke one liner execution but for any custom config and or config that requires multiple execution and task it seems that the only way is to wrap your wmi action in powershell and use cmd.script to run it
18:09 salt_whitebelt timoguin: to call the powershell to run it
18:10 rojem joined #salt
18:10 salt_whitebelt timoguin: cmd.script seems to be more promising due to the fact that the powershell script can reside on master server and it gets download to windows minion to run it locally
18:10 quanta_ joined #salt
18:11 timoguin ah i gotcha. yea cmd.script looks like it's better for that
18:11 timoguin if you don't want to put the script  on the minion
18:12 salt_whitebelt so far for my other rhel minion, i can use the built in modules and states and it works just fine but for windows minion, it seems to be a challenge
18:13 timoguin which modules and states, specifically? i've only really used the file, user, and group states on windows. and those worked fine for me.
18:13 timoguin I haven't bothered with the whole winrepo thing yet.
18:15 gmtech Hi, I'm new to salt and pillar - I'd like to do the following - in salt/top.sls group all different environment similar-purpose servers into one profile, but in pillar/top.sls I want to datadrive different data into those environments, so the same structure exists everywhere, but only the data is different. Can I do that ? The official docs suggest you have different files for each environment which would lead to duplication.
18:19 dave_den gmtech: yes, that is fine.
18:20 mgw joined #salt
18:20 salt_whitebelt timoguin: windows builtin modules/states im talking about are begins with *win*
18:21 salt_whitebelt timoguin: i wonder what other modules/states besides the ones begin with *win* will work on windows minion as well?
18:22 timoguin salt_whitebelt, I know a lot of those are virtual functions. So you'd do the normal user state and like you'd do on a linux machine, and salt will detect the OS and call win_user
18:23 bhosmer joined #salt
18:25 timoguin salt_whitebelt, for example, you'd still use the network module to retreive network info about a windows minion
18:25 Whissi_ joined #salt
18:25 timoguin not the win_network module. that'll get called in the background
18:25 timoguin and you user the user module, not win_useradd
18:26 timoguin that's the case with most, if not all, of those "win_" modules
18:26 timoguin it's kinda confusing
18:26 bhosmer joined #salt
18:27 salt_whitebelt timoguin: so all the other modules besides the ones that begins with *win* can be utilized as well? of course there are modules that are specific to linux only
18:29 timoguin salt_whitebelt, yea. disk, network, user, service all work fine for me on windows
18:29 goog joined #salt
18:30 insatsu joined #salt
18:30 timoguin so what's really happening is that the useradd module checks the platform it's on and won't load it if it's windows.
18:30 timoguin then when it gets to the win_useradd module, it loads it as just "user"
18:31 timoguin same for most of those i'm sure
18:31 salt_whitebelt so where is the user module? is it useradd? http://docs.saltstack.com/ref/modules/all/salt.modules.useradd.html#module-salt.modules.useradd
18:31 timoguin https://github.com/saltstack/salt/blob/develop/salt/modules/useradd.py#L27
18:31 timoguin https://github.com/saltstack/salt/blob/develop/salt/modules/win_useradd.py#L19
18:31 timoguin modules have a special __virtual__ function that will set the modules name, so it doesn't have to be the same as the filename of the module
18:32 timoguin this function also determines if a module should be loaded and made available on the minion
18:32 salt_whitebelt timoguin: but isn't win_useradd can only add local not domain users?
18:33 timoguin ah yea, looks like it
18:33 fllr joined #salt
18:34 timoguin i'm sure support for domain accounts could be added
18:34 ekristen so to use the modules like salt.modules.monit, I’m assuming monit has to first be installed?
18:34 timoguin ekristen, yea probably.
18:34 salt_whitebelt timoguin: even the network module doesn't have the command to disable the "enable this device to be power off" in the nic properties
18:35 salt_whitebelt timoguin: you mean salt stack might add that in future updated win_useradd module?
18:35 timoguin yea, you're not the only person who wants the ability to add domain accounts to windows minions
18:36 timoguin you can create an issue on github for them to add the feature
18:36 kula joined #salt
18:36 ekristen timoguin: it tells me that monit.monitor is unavailable and there is little to no docs
18:36 ekristen http://docs.saltstack.com/ref/modules/all/salt.modules.monit.html
18:36 ccase joined #salt
18:36 mgw Anybody know how I can configure flake8 to ignore missing __opts__ etc?
18:36 salt_whitebelt timoguin: i see your point, i haven't really use their github for any request or report any issue yet
18:36 darrend joined #salt
18:37 n8n joined #salt
18:37 timoguin ekristen, this is because of the __virtual__ function. it's running 'which monit' and doesn't load the module if it can't find that executable
18:37 timoguin is there a 'monit' command on your minion?
18:38 ekristen which monit is there on my minion
18:38 ekristen but I just installed it, maybe the minion needs a restart?
18:39 timoguin ekristen, yea i think the modules get loaded in on minion startup
18:39 goog What's the key difference between Ansible and Salt?
18:39 ekristen Salt is worth it ;)
18:39 goog What can Salt do that Ansible cannot do?
18:40 zach Salt is delicious tasting
18:40 njs126 joined #salt
18:40 goog Ansible is very easy and simple. That also tastes good.
18:40 zach I've never used ansible, but I hear good things. I picked up salt and never looked back at ruby-based ones again
18:40 ekristen goog: I’ve never used ansible, but what I can tell you is that I have used Chef and a little puppet, and Salt is just cleaner, more straightforward and easier to use, no 20 levels of precendence matching BS that Chef has,
18:40 cachedout goog: There was a pretty good review on this posted last June. It's here: http://missingm.co/2013/06/ansible-and-salt-a-detailed-comparison/
18:41 forresta goog, http://www.infoworld.com/d/data-center/review-puppet-vs-chef-vs-ansible-vs-salt-231308 is pretty good. http://missingm.co/2013/06/ansible-and-salt-a-detailed-comparison/ also has a lot of good stuff
18:41 forresta bah cachedout beat me to it
18:41 cachedout Too slow, forresta! ;]
18:42 goog thanks guys
18:42 forresta Yea, work getting in the way of my IRC contributions *shakes fist*
18:42 goog Is there any specific feature that Salt is superier over Ansible though?
18:42 goog I sense that Salt is a better tool and Ansible is a easier, simpler tool yet powerful enough.
18:43 goog i'm trying to understand what makes salt more powerful.
18:45 forresta Isn't ansible still mostly remote execution? I haven't looked at it in at least 6 month
18:45 forresta *s
18:46 forresta goog, I think you should read through that article, it goes really in-depth, and isn't as biased as what you'll find in the IRC.
18:46 yaru22 joined #salt
18:47 vlcn what would be the best way to go about inserting a new entry into /etc/services and maintaining the order by port number?
18:48 forresta vlcn, there is http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.append
18:48 forresta but for keeping the order correct? I'd just make it a managed file, otherwise it's more work to deal with than it's owrth
18:49 fllr joined #salt
18:49 vlcn forresta: I'm not entirely sure that would be possible in this case.  I'm trying to get about 150 servers synced up that have been menially setup over the past 3 years.
18:50 vlcn it's kind of a crapshoot as to what I can safely change across all of them
18:50 xmltok joined #salt
18:53 forresta vlcn, ahh
18:57 alice_wl_ hey, i m getting exceptions on every commands like this: "'list' object has no attribute 'keys'"   any tipps how to fix that?
18:59 kalloc joined #salt
19:00 MTecknology basepi: pwd is used to look up users?
19:00 vlcn forresta: actually, looks like I may luck out this time.  md5 is the same for all of these.
19:00 forresta oh sweet.
19:02 ausmarton joined #salt
19:03 rojem joined #salt
19:05 rsimpkins joined #salt
19:06 higgs001_ joined #salt
19:06 rsimpkins Question about including files with jinja. I have a template that I'd like to have include a large block of text. I'm doing this: {% include "china_blocks" %} and getting this error: TemplateNotFound: china_blocks. I'm guessing my path is wrong some how. The file 'china_blocks' is in the same directory as my template.
19:07 rsimpkins What is the base path the template is working from?
19:09 apergos joined #salt
19:11 timoguin rsimpkins, paths are absolute by default. if you want to use a relative path you need to prefix it with a period
19:11 quanta_ joined #salt
19:12 mesmer joined #salt
19:13 JasonSwindle joined #salt
19:16 iTheSystem I'm looking for a way to create a state like this:  if not x then run foo.sh else don't.  What's the bestest practice for this type of state?
19:17 iTheSystem I'm assuming somewhere in the process a flag x gets set to true.  ?
19:17 iShming Sorry, iTheSystem was a joke.
19:17 iShming An inside joke.
19:18 jeffmendoza joined #salt
19:20 ekristen anyone have a recommendation for a dead simple self-hosted server monitoring tool?
19:20 druonysus joined #salt
19:20 druonysus joined #salt
19:21 JasonSwindle ekristen:  Self-hosted….. and dead simple.  Not really.  I use Kibana and New Relic
19:22 seanz ekristen: Not as comprehensive and doesn't run on its own, but there's a great project called glances which is a heftier version of top.
19:22 seanz It's got network and disk monitoring included.
19:22 seanz Great for gleaning ad hoc knowledge over an SSH connection.
19:25 ekristen yeah looking for self-hosted, so new relic is out
19:26 ekristen it doesn’t need to be dead simple, but I’m tired of the over complex 20 year old monitor systems (*cough* nagios)
19:26 KyleG nagios is indeed old
19:26 KyleG but check_mk+nagios is pretty sweet
19:26 KyleG check out omdistro.org
19:30 ekristen hrm …
19:31 kiall joined #salt
19:31 ekristen I just want a simple service monitoring system
19:31 ekristen I can easily collect cpu, memory usage using collectd
19:31 JasonSwindle You can nearly do that with grains
19:31 ekristen JasonSwindle: elaborate please
19:32 kiall Anyone know where I might report a possible security issue in salt CI stuffs? basepi maybe?
19:32 JasonSwindle You can make customer grains, and grains report back at X time back to the master.  You can then mine salt-mine
19:33 ekristen how do you have the minion upgrade grains? states?
19:33 zooz joined #salt
19:33 JasonSwindle There is a mem_total grain, so you would just then need a mem_used
19:33 n8n joined #salt
19:34 JasonSwindle If I remember correct, minions talk back to the master every 60 seconds on their grains
19:34 JasonSwindle forresta:  Jump in if you want
19:35 scott_w joined #salt
19:35 dave_den salt-mine updates every 60 minutes by default. grains are updated on the master when a minion updates its pillar and if minino_data_cache is true on master
19:36 JasonSwindle So that is one option….
19:36 JasonSwindle The minion is there and able to collect data
19:38 tempspace ekristen: I don't know about complexity, but I have http://sensuapp.org/ on my radar to build a POC with this year
19:38 JasonSwindle POC?
19:38 tempspace proof of concept
19:38 ekristen proof of concept
19:38 JasonSwindle ah
19:38 ekristen tempspace: I remember reading about that before
19:38 * ekristen goes to read up
19:39 tempspace I really like the fact that I could add roles on my hosts via salt, and it'll report in and setup monitoring rules based on the roles
19:39 davet joined #salt
19:39 tempspace seems like it could be really nice if it works
19:40 hunter Is there a way to set a grain for a given client _on_the_master_?
19:41 seanz ekristen: Also, correct me if I'm wrong, but "dead simple" is usually where companies step in and provide a solution. I'm not promoting any particular company, but any open source solution is going to require setup, maintenance and other things that start to move it away from being turnkey.
19:42 ekristen seanz: true :)
19:43 esoel_ joined #salt
19:45 esoel_ joined #salt
19:46 Ryan_Lane2 joined #salt
19:50 tmwsiy seanz: thats what Salt Enterprise is for :)
19:51 seanz tmwsiy: haha - a perfect example.
19:56 tmwsiy I am starting to see salt as kind of a kernel for a new kind of meta operating system.
19:57 blee joined #salt
19:58 leonardinius joined #salt
19:58 JasonSwindle I want Salt + CoreOS + Docker
20:00 apergos joined #salt
20:00 ekristen JasonSwindle: yes
20:00 ekristen but then again if we have coreos + docker, no need for salt
20:00 JasonSwindle but right now, it is a waiting game.
20:01 ekristen well I guess that isn’t true, configure coreos, and launch docker containers
20:01 JasonSwindle I want Salt to take the lowstate compile, and then make that into the dockerfile
20:01 JasonSwindle So, the top.sls and everything then gets compiles into a really rocking DockerFile
20:01 JasonSwindle and then have also manage sockets and etc
20:02 ajw0100 joined #salt
20:05 forresta JasonSwindle, I was at alunch, sorry.
20:05 forresta *lunch
20:05 basepi kiall: security@saltstack.com, please
20:06 kiall Sure - It's probably nothing, but worth mentioning anyway just in case :)
20:06 basepi kiall: though i just realized you said salt CI......that's actually s0undt3ch's project
20:06 basepi and i don't think it's, you know, finished.
20:07 basepi but if you have a security concern, it's still probably best to report to security@saltstack.com
20:07 forresta Has anyone been able to get the saltconf slide deck template imported into google docs?
20:08 psyl0n joined #salt
20:09 basepi forresta: did it mangle the powerpoint?  i would e-mail saltconf@saltstack.com and request a google doc to copy.  Rhett should be able to throw that together in no time.
20:10 forresta basepi, I was able to get it imported after saving it in powerpoint at work just now (thank goodness I have it available somewhere).
20:10 forresta I just wasn't sure if someone had been able to get around having to do that
20:10 honestly joined #salt
20:10 forresta I can port my slides to it easily enough.
20:10 srage joined #salt
20:12 thrashr888 joined #salt
20:12 n8n joined #salt
20:12 forresta basepi, it's just weird, I tried importing into openoffice, and libreoffice last night, and the first slide always gets screwed up *shrug*. I'll email that address when I get home just to see if it's available, might be useful for other people.
20:13 elfixit1 joined #salt
20:14 AdamSewell quick question, if i wanted to create a new database in an existing mysql server after a new vm is created via salt cloud, where would I need to put that?
20:14 vejdmn joined #salt
20:14 basepi forresta: ya, I think Rhett wants to support (almost) whatever format you want.  internally, i know he e-mailed a powerpoint, keynote, and raw images (for sphinx slide backgrounds)
20:14 BenCoinanke joined #salt
20:14 basepi i'd be happy to forward the images if someone finds them useful.
20:15 basepi (though i don't have access to the speaker mailing list or anything)
20:15 forresta basepi, nice, yea I saw that hey had keynote available if you wanted it. I just didn't feel like being a complainer that google slides weren't working. It seems to be ok now that I saved it in powerpoint here at work and imported it though, so who knows.
20:16 forresta AdamSewell, can't you just create another db with http://docs.saltstack.com/ref/states/all/salt.states.mysql_database.html ?
20:16 AdamSewell forresta, yea, i was just wondering where to put it so that it would only run after the initial creation
20:17 forresta AdamSewell, can you not just use require?
20:17 AdamSewell require?
20:18 AdamSewell i don't think i've used that before
20:18 jeremyBass1 joined #salt
20:18 forresta http://docs.saltstack.com/ref/states/requisites.html#requisites
20:18 AdamSewell oh ok
20:18 AdamSewell that would check everytime top was run or something as well right?
20:19 forresta it will always check the state of the item that it requires.
20:19 forresta so DB A has to exist before DB B is created.
20:21 diegows joined #salt
20:22 hunter Is there a good (quality) mongodb salt (state?|module?|sls file?) that anyone likes?
20:22 ekristen hunter: I wrote my own
20:22 forresta hunter, there is the formula, but it's a bit sparse: https://github.com/saltstack-formulas/mongodb-formula
20:23 hunter ekristen: willing to share?
20:23 rojem joined #salt
20:23 ekristen I think I used that as a starting place
20:23 matanya joined #salt
20:23 ekristen hunter: possibly let me look
20:23 hunter Nomenclature question - what is a foo.sls file called? Is that a state? module?
20:23 forresta ekristen, you should share what you can back
20:24 ekristen forresta: I agree
20:24 forresta hunter, the .sls = SaLt State
20:24 ekristen I’m also still learning, so might not be doing it very well
20:24 forresta *shrug* it can always be fixed
20:24 hunter so a single sls file is a salt "state"
20:25 hunter ok
20:25 forresta hunter, correct.
20:25 forresta some people call it a state file, but basically it's a state.
20:25 ekristen hunter: yeah my mongo states are very my environment specific at the moment, if I get a chance to pillar-ize them and stuff I’ll share, but right now it wouldn’t make sense too
20:26 ekristen I have my mongodb stuff interconnected with my apps states and luks encryption states
20:26 hunter ekristen: actually it would - I don't have any pillar _either_ and am just starting - so another real world example would help a lot.
20:26 forresta ekristen, boooooo
20:26 ekristen let me see what i can put into a gist real quick
20:26 hunter forresta: hush. Reality is a cruel mistress.
20:27 forresta heh
20:27 Katafalkas joined #salt
20:28 hunter https://github.com/saltstack-formulas/mongodb-formula/blob/master/mongodb/files/logrotate.jinja appears to have no jinja in it - or am I missing something.
20:28 ajw0100 joined #salt
20:28 Ryan_Lane2 joined #salt
20:29 srage joined #salt
20:29 forresta it's just a template that someone put together hunter
20:31 jgiraldo_ hi guys
20:31 Mua_ joined #salt
20:31 jgiraldo_ im getting authentication request from minion; Clear payload received with command _auth on loop
20:32 jgiraldo_ when I run salt-master -l debug
20:32 jgiraldo_ any ideas?
20:32 fllr Hey guys. Any reason why I'm getting this error: State archive.extracted found in sls elasticsearch is unavailable ? Pretty sure I have the latest version of salt installed...
20:33 forresta fllr, can you patebin/gist the state?
20:33 forresta jgiraldo_, what version are you on?
20:33 forresta jgiraldo_, because I see this issue: https://github.com/saltstack/salt/issues/5948
20:33 jgiraldo_ 0.17.4
20:33 jgiraldo_ on the master
20:33 forresta but it's closed
20:33 fllr forresta: Yeah, gimme a sec
20:34 ekristen ok, you’ve convicned me to share ;)
20:34 fllr forresta:  https://gist.github.com/felipellrocha/87fb0d57496f14d246cd
20:34 strgcloud joined #salt
20:35 jgiraldo_ how do I checek the version on the minion?
20:35 jgiraldo_ if my minions are not on 17.4?
20:35 jgiraldo_ will it cause problems?
20:35 forresta your minions all need to be on release 0.17+ if your master is 0.17+
20:35 jmccree joined #salt
20:35 jgiraldo_ how do I check the minion version?
20:35 jgiraldo_ salt --version doesnt work
20:36 forresta fllr, can you try to write a very simple state that uses archive.extracted?
20:36 strgcloud salt-minion --version-report
20:36 jgiraldo_ thank you
20:36 strgcloud check salt-minion -h or `salt-master -h` options
20:36 strgcloud np
20:37 fllr forresta: I mean, I could... but I'm pretty sure everything else (the loop, the ifs) are all working, because of the feedback I get from -l debug
20:37 forresta fllr, right but if we can break it out from your state it makes it easier to troubleshoot
20:37 fllr forresta: what do you mean by breaking it out of my state?
20:38 ekristen hunter: PM
20:38 felixhummel joined #salt
20:38 forresta I want to move that (or a different simpe archive.extracted that does not require anything) to it's own state
20:38 forresta so we can just run state.sls and see if that state works
20:38 ekristen is there a way to get a recent run report from a minion, like the output or report that salt ‘*’ state.highstate will give for each minion?
20:38 ajw0100 joined #salt
20:40 fllr forresta: Oh, ok... gimme a sec... I'll do that and gist it
20:41 fllr forresta: https://gist.github.com/felipellrocha/f67a67526186d719bbbd
20:41 higgs001 joined #salt
20:41 fllr forresta: salt-master 0.17.4, salt-minion 0.17.4
20:41 markm joined #salt
20:42 ekristen ack, I don’t get salt environment order precendence
20:43 ekristen so if I have a ‘*’ in base that runs a state, but I have an environment dev that matches the same host that has a state by the same name (ie for development and testing) will the base directory always win out?
20:43 fllr forresta: from what I understand, the state archive doesn't seem to exist? even though it's documented?
20:44 dave_den ekristen: no, they will both run.
20:44 forresta fllr, it's only in develop right now it looks like, or maybe the RC
20:44 ekristen dave_den: oh really — I’m not seeing that, so maybe I’m doing something wrong
20:44 fllr agh...
20:44 jgiraldo_ What's the best way to update all the minions after each master upgrade
20:44 forresta fllr, use the module
20:44 forresta and the http://docs.saltstack.com/ref/states/all/salt.states.module.html
20:45 forresta fllr, it works a bit differently, but it should do the trick
20:45 vejdmn joined #salt
20:46 fllr Ummm... I'm thinking about just patching up salt... or using the dev version...
20:46 dave_den ekristen: https://groups.google.com/d/msg/salt-users/IVYP8HbLNs0/-BZaaSPLLj4J
20:46 forresta don't use the dev verison
20:46 forresta come on!
20:46 forresta are you mad man
20:46 forresta :P
20:46 ekristen actually dave_den removed the state from the base entry, but the state file from the base directory is still the on being used
20:46 dave_den ekristen: it depends on how you define your file_roots
20:46 fllr forresta: Lol. This is not going to production for at least a month :P
20:46 forresta oh ok
20:47 ekristen dave_den: http://pastebin.com/Bdkcx5Hm
20:48 dave_den ekristen: the file roots are searched in order as defined for each environment
20:48 ekristen dave_den: how can I determine what environment salt has determined a host should use?
20:49 dave_den ekristen: for highstate, if there is no explicit setting in the minion config, grains, or pillar, it will be determined by your top.sls targeting.
20:49 dave_den for state.sls it defaults to base
20:49 ekristen oh! good to know about state.sls
20:50 ekristen how can I target a minion to an env with the minion config, grains, or pillar
20:50 ekristen I want to keep my production grade states separate from my development and qa ones,
20:51 dave_den set the 'environment' variable in minion config
20:51 ekristen same for grain? environment variable?
20:54 ekristen dave_den: ?
20:55 BinkyTheClown joined #salt
20:55 pears joined #salt
20:55 pears left #salt
20:58 dave_den ekristen: yes
20:59 ekristen omg, I wish I would have know this sooner … haha
20:59 ekristen ok last question
21:00 ekristen I still have to define what states I want them to run in the top.sls file correct?
21:00 ekristen under their appropriate env
21:00 dave_den yes
21:00 tyler-baker joined #salt
21:00 tyler-baker joined #salt
21:00 dave_den the top.sls will specify which states run during a highstate
21:01 tyler-baker joined #salt
21:01 ekristen ah and that is where your comment on having states matching in multiple env with non-unique names will become a problem
21:02 ekristen so if a state file exists in dev but not in base, but is referenced by base: ‘*’ - somestate and the server is in the dev environment will it get picked up or error out?
21:06 ekristen dave_den: ^^ last question (I’m pretty sure for now, thanks!!!!!)
21:09 salt_whitebelt excuse my ignorance but isn't saltstack github is for developers to download, upload, collaborate and report bug in the application?
21:09 dave_den ekristen: error
21:10 ekristen dave_den: ok thanks
21:10 sgviking joined #salt
21:10 ekristen dave_den: so it makes sense to almost keep nothing in base
21:10 izhukov joined #salt
21:11 dave_den ekristen: right
21:11 ekristen time to redo my structure ;)
21:11 dave_den especially if you are doing branch based development with git
21:11 quanta_ joined #salt
21:13 ekristen dave_den: yeah but I was checking out my branches locally, and using roots so I could get stacking, IE dev then prod then base
21:14 dave_den ekristen: https://github.com/saltstack/salt/issues/9186
21:15 n8n joined #salt
21:15 pdayton joined #salt
21:16 dave_den IMO, it's bad practice to have minions match multiple environments
21:16 ekristen cause I could see where I had a new version of a state in /testing but the rest of them I want to use from my prod states
21:16 ekristen as far as I could tell you can do stacking with gitfs
21:16 hunter Ok, but since I'm in learning mode - there's no jinja IN that template, so the jinja bits aren't _required_ are they? That could just be a regular text file.
21:16 ekristen cannot* do stacking
21:16 hunter (Sorry - way delayed on that statement - meeting)
21:17 scott_w joined #salt
21:17 ekristen dave_den: I don’t want them to match multiple envs, I’m fine with them matching only one
21:18 ekristen but I do like the idea of stacking states, but then again that could make things more complicated :/
21:18 dave_den i personally think it's really bad practice, but others seem to like the idea
21:19 dave_den c'est la vie
21:19 ekristen dave_den: yeah I’m starting to see why it could be really bad
21:19 dave_den if you're using git to develop multiple envs properly you will never need to do that
21:20 ajw0100 joined #salt
21:21 ekristen yeah I’m trying to establish my best development practice
21:21 higgs001 joined #salt
21:21 ekristen dave_den: so do you then recommend doing a top.sls per env?
21:21 n8n joined #salt
21:22 ekristen I need to figure out how to make github fire a reactor on my salt master
21:22 ekristen or fire an event for CI
21:22 JasonSwindle ekristen:  I can be done
21:22 JasonSwindle I have seen it, just don't have the example in front of me
21:22 ekristen JasonSwindle: doh! ;)
21:23 dave_den i use github post-push web hooks, then have that fire something to kick off a command
21:23 dave_den ekristen: the top.sls is tricky. http://docs.saltstack.com/topics/tutorials/gitfs.html#branches-environments-and-top-sls-files
21:24 ekristen dave_den: yeah I’ve read that
21:24 ekristen was asking your opinion since you seem to be very adament about how to use environments
21:25 ekristen so dave_den did you just write a web hook listener that sits on your salt master and is exposed?
21:27 ConceitedCode joined #salt
21:27 dave_den multiple top.sls is what i would prefer
21:27 andrej What happens on a minion (is different) when I do a cmd.run when a) selection happens via name wildcard and b) via os-grain?
21:28 kermit joined #salt
21:28 dave_den no, i have the webhook go to a dedicated github post-hook webserver container which is allowed to report an event or run custom runner modules that have security and sanity checks
21:29 MK_FG joined #salt
21:29 ekristen dave_den: make sense, I forgot that minions can call events
21:30 andrej http://pastebin.com/LV2twMzY
21:30 andrej Two identical commands, two runs, one w/ name, one w/ os:Ubuntu as criteria
21:30 thrashr888 joined #salt
21:30 andrej different output for same host - why?
21:31 ekristen dave_den: custom written post-hook webserver or you using some open source software?
21:31 dave_den custom
21:31 dave_den minimal ruby+sinatra
21:32 ekristen ok
21:32 ekristen lots to develop on ;)
21:32 MK_FG joined #salt
21:32 timoguin dave_den, have you shared that anywhere?
21:33 rsimpkins left #salt
21:33 dave_den timoguin: the github hook app?
21:33 timoguin mhmm
21:33 MK_FG joined #salt
21:33 MK_FG joined #salt
21:34 dave_den i havent. i probably could sanitize it and post it somewhere. it's really nothing special
21:34 MK_FG joined #salt
21:35 timoguin I need to do the same thing.
21:35 scott_w joined #salt
21:35 pdayton joined #salt
21:36 sashka_ua guys, has anyone tried to use 'mongo_future_return' returner? I use mongo_return, it works, but has a couple flaws. But when I try to switch to 'mongo_future_return', I got "return failed for job 20140116211521845939 'mongo_future_return.returner'"
21:37 MK_FG joined #salt
21:37 MK_FG joined #salt
21:37 Katafalkas joined #salt
21:38 vlcn hmm
21:38 vlcn is there no way to actually rename the working directory with salt.states.svn?
21:39 ekristen interesting .. https://github.com/arunoda/nariya
21:39 Katafalkas joined #salt
21:39 * ekristen shudders at the mention of svn
21:40 viraptor1 joined #salt
21:40 * Gareth sneaks up behind ekristen and whispers "SVN"
21:41 timoguin github and bitbucket is what i need to hook up
21:41 ekristen wow I’m shocked that there isn’t some node.js web server that is designed to be event based reactions based on github webhooks already in existence
21:41 * ekristen hides in a hole in the wall
21:42 ekristen I used to use SVN for years, then I discoverd git and refuse to use svn ever again
21:43 dave_den ekristen: http://weblog.bocoup.com/introducing-gith-github-webhooks-for-node/
21:44 Gareth I'm still adjusting to some of git's idiosyncrasies but its better than svn in a lot of ways :)
21:44 ekristen Gareth: its better in like 1000000000000000 different ways ;)
21:44 ekristen dave_den: nice! I knew someone had to have done it already
21:45 thrashr888 joined #salt
21:47 goog joined #salt
21:49 EugeneKay I.... what?
21:50 EugeneKay nodejs continuous.... huh
21:50 EugeneKay I don't get it.
21:50 tmwsiy ok so best thing to do to install salt-minion if I don't want to enable epel on centos (have both 5 and 6)
21:52 dave_den tmwsiy: do you not want to have the yum repo file on the minion at all, or do you just not want to enable it?
21:53 dave_den if you have it on the minion you don't need "enabled=1" in the epel yum config, you can just enable it on the fly when doing a yum install
21:53 tmwsiy I just don't want it to pick up any weird versions of stuff that step on the regular repos. I know that was an issue in the p[ast
21:53 vejdmn joined #salt
21:54 tmwsiy right I guess that is the way to go.
21:54 dave_den tmwsiy: i have the epel yum repo file on my minion, but i don't enable it
21:54 dave_den i just do yum --enablerepo=epel-testing install -y PyYAML...
21:54 danielcharles joined #salt
21:54 andrej do I really need to assume that salt won't give me reproducible results when using different selection criteria for cmd.run? Or is it arbitrary what it returns?
21:55 dave_den specifically, for centos 6 i use:  yum --enablerepo=epel-testing install -y PyYAML libyaml m2crypto openpgm python-babel python-crypto python-jinja2 python-msgpack python-zmq sshpass zeromq3
21:55 dave_den andrej: something's up with your setup. that should work just fine and return for all minions
21:55 jeremyBass1 left #salt
21:57 andrej dave_den subsequent runs w/ the os selector seem to return the correct result.
21:57 andrej I can't see what in my set-up could possibly affect the result of a grep
21:57 andrej any ideas?
21:57 dave_den andrej: are your minions running super slow?
21:57 andrej not really ...
21:58 kiall left #salt
21:58 andrej ssh;ing in, and running the same grep manually, completes in under 2 seconds
21:59 andrej time ssh visualiser 'grep -i "System restart required" /etc/motd'
21:59 andrej real    0m0.613s
22:00 hunter tmwsiy: we use epel here and thats not been an issue in a LONG time
22:01 dave_den andrej: if you run the salt command with -t 60, do they all return?
22:06 mapu joined #salt
22:09 thrashr888 joined #salt
22:09 yomilk joined #salt
22:09 gasbakid joined #salt
22:10 glitch_ joined #salt
22:10 glitch_ left #salt
22:11 thrashr888 joined #salt
22:12 quanta_ joined #salt
22:16 bhosmer joined #salt
22:21 vlcn does anyone know of additional documentation for reactors?
22:24 hunter http://docs.saltstack.com/ref/modules/all/salt.modules.zfs.html?highlight=zfs#salt.modules.zfs
22:24 hunter Sure seems a little light on details....
22:24 timoguin lol
22:24 vlcn I'm looking at this: http://docs.saltstack.com/topics/reactor/
22:24 vlcn but just looking for some other examples to get a better handle on it
22:25 stotch joined #salt
22:25 timoguin hunter, that module itself is light on details
22:26 tchiang joined #salt
22:27 hunter timoguin: the zpool one is better but not really adequate. And as a newby I have trouble translating the CLI examples into YAML code for non-interactive use
22:28 timoguin you mean for use in state files?
22:28 timoguin looks like there aren't any ZFS state modules
22:29 hunter timoguin: I had assumed if there was a command line "version" there would be a YAML version.
22:30 hunter timoguin: that or I'm misunderstanding you
22:30 timoguin generally there are, but not necessarily.
22:30 timoguin there are state modules and execution modules. the state modules being what you use in your SLS files
22:30 hunter timoguin: I think someone roughed up a zpool one (halfway at least) and knew that they should do a zfs one and just quit there.
22:30 timoguin so for ZFS, you'll either need to write a state module, or use module.run in your SLS files
22:30 timoguin http://docs.saltstack.com/ref/states/all/salt.states.module.html
22:30 hunter OH - so I could have an execution module for command line usage but no matching state module?
22:31 timoguin correct. if you look at the salt source, you'll see salt/modules and salt/states
22:31 timoguin the modules dir is what you can execute from the command line
22:34 blee_ joined #salt
22:34 thrashr8_ joined #salt
22:35 patrek in state mysql_*, what is the best way not to repeat connection_user/connection_pass ?
22:37 mafrosis joined #salt
22:37 mafrosis lo salters
22:38 mafrosis does anyone know if it's possible to "extend" a file.managed state, and replace the "source" field with a "text" field
22:40 robawt hi all
22:41 robawt what makes a salt state unavailable?
22:42 ashirogl joined #salt
22:42 mafrosis robawt: if it doesn't exist in your state tree
22:43 robawt mafrosis: that answer makes me sad
22:43 mafrosis sorry dude
22:44 robawt no worries
22:44 mafrosis my salt tree pulls in states from elsewhere, so the first run they are "unavailable"
22:44 mafrosis the second run, however, works
22:44 robawt that's what i'm experiencing
22:45 robawt doesn't make sense for me since they are all definied in the config properly
22:45 cachedout joined #salt
22:46 timoguin are you both talking about adding a custom state and then trying to execute it?
22:46 robawt timoguin: possibly, have anything on the subject?
22:46 Xiao joined #salt
22:47 ashirogl joined #salt
22:47 timoguin there is a saltutil module you might try: salt '*' saltutil.sync_states
22:48 timoguin that should make new states available to the minions you target
22:48 mafrosis I'm running all this stuff locally, not using _states
22:48 timoguin mafrosis, ah, then what state are you talking about?
22:48 timoguin many have dependencies and won't load if those aren't available
22:48 KyleG joined #salt
22:48 KyleG joined #salt
22:48 mafrosis timoguin: it's all good here, just not ideal
22:49 mafrosis and I'm talking specifically about the Riak state in contrib (which I wrote)
22:50 timoguin ah, well then you know then. ;-)
22:50 mafrosis hehe
22:50 mafrosis I'm sure that once upon a time salt would actually import my Riak state dynamically during highstate
22:51 mafrosis at some point the internals have changed and now it doens't get loaded on the first run
22:51 mafrosis ho hum
22:51 mafrosis I should look into it
22:51 mohae_ joined #salt
22:59 hunter DKMS build triggered from salt takes FOREVER
22:59 hunter (at least on this machine)
23:03 Xiao joined #salt
23:07 yomilk joined #salt
23:08 ConceitedCode joined #salt
23:08 rojem joined #salt
23:10 tessellare joined #salt
23:12 quanta_ joined #salt
23:15 bksb joined #salt
23:16 thrashr888 joined #salt
23:24 Cidan joined #salt
23:24 amckinley joined #salt
23:26 Cidan joined #salt
23:26 scott_w joined #salt
23:27 guest__________ joined #salt
23:29 guest_towel joined #salt
23:30 higgs001 joined #salt
23:31 bhosmer joined #salt
23:31 ckao left #salt
23:32 elfixit1 joined #salt
23:35 jacksontj joined #salt
23:35 jeddi joined #salt
23:39 joehh \
23:46 leonardinius hi guys. Could someone help me out with top.sls state condifuration?
23:47 fllr joined #salt
23:47 leonardinius My question is: how might I specify particular set of rules/states applied for one particular state?
23:49 mwmnj joined #salt
23:49 leonardinius The proof of concept snippet I'm working with looks as follows https://gist.github.com/leonardinius/8465597#file-top-sls I deploy it using salt-ssh '*' state.highstate
23:50 leonardinius it seems it applies the '*' core) part however refuses to apply node-id specific rules.
23:50 leonardinius what can I do to troubleshoot this?
23:53 Katafalk_ joined #salt
23:56 leonardinius joined #salt

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