Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-11-18

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

All times shown according to UTC.

Time Nick Message
00:03 woodtablet joined #salt
00:03 woodtablet hey guys
00:03 kitplummer joined #salt
00:04 whytewolf hey woodtablet
00:04 woodtablet i am trying to setup my ec2-aws salt-cloud profile, and i am trying to figure out what is this:
00:04 woodtablet # Set the EC2 access credentials (see below)   #   id: 'use-instance-role-credentials'   key: 'use-instance-role-credentials'
00:04 woodtablet at first i thought this would have been ssh keys, but i see that later int he config
00:05 woodtablet i found an example file of this document it was more entertaining:
00:05 woodtablet # Set the EC2 access credentials (see below)     #     id: HJGRYCILJLKJYG     key: 'kdjgfsgm;woormgl/aserigjksjdhasdfgn'
00:06 woodtablet oh
00:06 woodtablet duh
00:06 whytewolf it is your aws secret access keys
00:06 woodtablet ya
00:06 woodtablet i am idiot
00:06 woodtablet lol
00:07 woodtablet it didnt hit me till just now that is what it needed, thanks whytewolf
00:08 adelcast joined #salt
00:08 whytewolf lol, no problem.
00:11 whytewolf personally. I would setup a salt IAM user and use it's secrect access keys
00:11 woodtablet thats a good idea, i am going to do that
00:14 TreborTech joined #salt
00:19 sunkist joined #salt
00:19 baweaver joined #salt
00:20 otter768 joined #salt
00:23 kitplummer joined #salt
00:25 woodtablet so everyone here that helps contribute to salt and salt-cloud, thank you. this stuff is just amazing
00:25 woodtablet it all just makes sense, god help me convince my boss to
00:26 woodtablet switch
00:26 tiadobatima joined #salt
00:26 tiadobatima1 joined #salt
00:26 pbx_ joined #salt
00:27 whytewolf woodtablet: lol. that is always the hard part. making manegment see the light
00:31 woodtablet whytewolf: so i am looking through the salt-cloud tutorial / doc, how do i deploy an elb from salt-cloud and stuff ?
00:32 * whytewolf shrugs. I don't use AWS personally
00:32 colegatron joined #salt
00:32 whytewolf you might want to look at the boto states.
00:32 woodtablet https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_elb.html
00:33 woodtablet oh la la !
00:33 woodtablet thanks!
00:38 holler how can I define a package version number in pkg.installed: -names: ?? http://dpaste.com/1B0YR1D
00:38 holler that doesnt work
00:39 kitplummer joined #salt
00:41 hemebond holler: There is a version parameter.
00:42 hemebond https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed
00:42 holler hemebond: how do I use that in conjunction with -names ?
00:42 hemebond "NOTE: For apt, ebuild, pacman, yumpkg, and zypper, version numbers can be specified in the pkgs argument. For example:"
00:43 hemebond Maybe your version string is wrong.
00:43 hemebond Not sure why you have a "v" at the start.
00:43 hemebond Also not sure what package manager you're using.
00:57 zsoftich2 joined #salt
00:59 tawm04 joined #salt
01:05 quasiben1 joined #salt
01:07 fsteinel_ joined #salt
01:11 bfoxwell joined #salt
01:15 woodtablet left #salt
01:16 NotBobDole joined #salt
01:19 tmclaugh[work] joined #salt
01:22 RobertChen joined #salt
01:22 RobertChen can the returner return result for each step in real time? like each cmd.run ?
01:24 kitplummer joined #salt
01:25 hemebond RobertChen: Nope.
01:25 hemebond Saw your emails in the Salt Users Google group too.
01:25 hemebond Your question was answered there too; twice.
01:25 RobertChen thanks. My customer cares about each step. They cannot wait.
01:26 hemebond RobertChen: What is it you're trying to do?
01:27 RobertChen deploying like tomcat applications…  each step like restarting tomcat, they want result is called back immediately
01:28 hemebond And are you trying to use highstate to do it?
01:29 hemebond And why do they need realtime feedback?
01:30 _Cyclone_ joined #salt
01:30 RobertChen yes,  salt-call with highstate
01:31 RobertChen they want to watch status, progressing in real time. some steps take more than 10 minutes
01:33 hemebond The only way I can think to do it would be to call each state yourself.
01:33 hemebond So you get the results back just for that state.
01:34 whytewolf humm. I might be crazy but i think i have a way to do what he is asking. now this is all hypothetical. but. with returners setup on the minions. use orchestrate to run each and every single stanza. would take a lot of work.
01:34 whytewolf since each orchestration call is a seperate call to the miion
01:35 whytewolf in theory
01:35 hemebond What about logging? With centralised logging you could see progress of sorts.
01:35 phx isn't there some feedback on the zmq bus?
01:35 whytewolf phx: only for each call
01:35 whytewolf a highstate is a single call to the minion
01:36 hightekvagabond joined #salt
01:42 holler hello, I am trying to figure out what is going wrong when provisioning a vagrant box w/salt, I added npm.installed: - names: ember-cli
01:42 holler http://hastebin.com/wapumimabi.pl
01:42 kitplummer joined #salt
01:42 holler I cant tell why its crashing!
01:42 kitplummer joined #salt
01:43 cpowell joined #salt
01:43 holler here is my state file http://dpaste.com/13JWWJD
01:46 whytewolf holler: something else is going on. your states are running fine there is another state that is failing. 'service salt-minion restart'
01:47 whytewolf oh wait. never mind
01:48 holler im def not that good w/salt but debugging it seems like a pain
01:48 holler I have to keep killing vagrant box and then rerunning "vagrant up" and waiting ~10 mins until it gets to the point where it crahses
01:50 whytewolf well, first it doens't look like salt is failing it looks like npm is
01:50 RobertChen my process has start, stop, restart, reload script, should I write my own module for manage it? how can I add require keyword support?
01:51 whytewolf holler: that big huge error report that is coming up is npms return
01:52 beneggett joined #salt
01:53 otter768 joined #salt
01:56 whytewolf yikes. ember has a LOT of dependencies. which is what that big list is
01:58 whytewolf holler. also it looks like ember-cli pops some warnings after it finishes it's install. those might be throwing off salt into thinking the package was in error
01:59 holler whytewolf: where do you see those warnings?
01:59 holler looking at that hastebin from above
02:00 baweaver joined #salt
02:00 whytewolf holler: I didn't find them in the hastebin. I found them by installing ember-cli on my mac
02:00 holler hm
02:03 jaybocc2_ joined #salt
02:05 whytewolf oh both, so many hacks to get npm working
02:06 whytewolf all because --json doesn't actually give json output
02:16 chadhs joined #salt
02:17 RobertChen my process has start, stop, restart, reload script, should I write my own module for manage it? how can I add require keyword support?
02:18 sysadmn-NC joined #salt
02:21 sysadmn-NC hi !
02:21 sysadmn-NC somebody can help me for a little problem with Salt
02:21 sysadmn-NC I don't find my answer in the doc
02:21 hemebond sysadmn-NC: Won't know until you ask the actual question :-)
02:22 sysadmn-NC I try to write a state like this => http://pastebin.com/fASX3c7t
02:22 sysadmn-NC but I don't know why i can't use grains/pillar in sametime
02:22 hemebond Your use of Jinja is wrong.
02:23 sysadmn-NC I just put the "$" for show its the same variablez
02:23 hemebond Is pillar a variable?
02:23 SirLagz joined #salt
02:23 jaybocc2 joined #salt
02:23 sysadmn-NC no, i want to take "host" from grains in the pillar
02:24 sysadmn-NC the hostname of the vm (grains/host) is the name of what i want to take in the pillar
02:24 sysadmn-NC Sorry for my english..
02:24 hemebond {{ salt['pillar.get'](host_server)['address']
02:24 hemebond }}
02:25 sysadmn-NC and my first line is correct ?
02:25 hemebond Looks fine.
02:25 sysadmn-NC I try this ! and give an answer
02:25 sysadmn-NC thanks a lot =)
02:27 sysadmn-NC It's work !
02:27 sysadmn-NC ahah
02:27 sysadmn-NC :)
02:27 hemebond Well done :-)
02:27 sysadmn-NC I'm going to use it for manage Ganeti (xen) VMs and there network configuration
02:28 sysadmn-NC but i'm blocking on it ^^
02:29 whytewolf oh boy, so much fun ... I think I have a "solution" for mkfs in a stateful way ... just testing now ...
02:29 sysadmn-NC =)
02:29 whytewolf lol, nope. it went boom
02:29 sysadmn-NC I'm don't use Salt for make my fs
02:30 sysadmn-NC It's ganeti who get launched by salt
02:30 sysadmn-NC =)
02:30 whytewolf sysadmn-NC: I was talking about me
02:30 sysadmn-NC oh sorry
02:33 whytewolf sweet. worked flawlessly. gota love when module.run and unless save your bacon
02:35 mapu joined #salt
02:39 catpigger joined #salt
02:42 subsignal joined #salt
02:45 subsignal joined #salt
02:46 RobertChen joined #salt
02:47 Arendtsen joined #salt
02:48 quasiben joined #salt
02:50 evle joined #salt
02:58 bhosmer_ joined #salt
02:59 netcho joined #salt
03:00 RobertChen does archive.extracted support .tgz file?
03:03 pfallenop joined #salt
03:03 pfallenop joined #salt
03:08 rhand joined #salt
03:11 neme_ joined #salt
03:12 neme_ Hi all, I'm new to Salt and noticed in my minion logs this bit of text: "Template was specified incorrectly: False".. what does that mean?
03:14 writtenoff joined #salt
03:14 NickD joined #salt
03:15 forrest neme_, Not many people around at this time of night unfortunately, https://github.com/saltstack/salt/issues/23524 is the best I can find, I haven't seen that one before so I'm not sure what it means, sorry.
03:15 saltstackbot [#23524]title: import in pillar causes salt-run state.orchestrate to reset base | Using an import in pillar, https://gist.github.com/vr-jack/d53733b554fb15b12bfd...
03:15 kitplummer joined #salt
03:18 cyborg-one joined #salt
03:19 larsfronius joined #salt
03:21 Vaelatern joined #salt
03:22 forresta joined #salt
03:23 SWAT joined #salt
03:25 aphor joined #salt
03:27 p404 joined #salt
03:28 RobertChen joined #salt
03:31 RobertChen can file.archive notify service when the file is untar and can begin installation ?
03:31 aphor RobertChen which state?
03:32 RobertChen archive.extracted , after the file is extracted, I want to notify something to begin the installation
03:32 hemebond RobertChen: I think so.
03:32 aphor if you have an archive.extracted state, and you make it a requisite of other states, those states will block until the archive.extracted returns True
03:33 hemebond Mind you, setting it as a requirement will also trigger the next step.
03:33 aphor If you need to trigger actions on other minions, you will need to set up reactors and events or beacons in place of simple requisites.
03:36 aphor What's the plan for salt-contrib? Will that be pypi packaged on a certain milestone?
03:39 quasiben joined #salt
03:43 bfoxwell joined #salt
03:44 evle joined #salt
03:44 malinoff joined #salt
03:46 kitplummer joined #salt
03:53 clintberry joined #salt
03:54 ashutoshn joined #salt
03:59 ageorgop joined #salt
04:02 beneggett joined #salt
04:02 xDamox joined #salt
04:03 Vaelatern joined #salt
04:07 yuhlw joined #salt
04:07 rmnuvg joined #salt
04:10 jaybocc2 joined #salt
04:12 av_ joined #salt
04:20 racooper joined #salt
04:27 ramteid joined #salt
04:31 ^C anyone had problems with file.directory.unless before?
04:31 ^C test returns true (testing from shell) but it still runs
04:33 hemebond ^C: Does your unless check command actually work in the state?
04:33 hemebond Have you tested using a test state?
04:33 ^C its a state from the apache formula
04:34 ^C and its using 'test' from the CLI, so yeah, i'd expect it to work :)
04:35 beardedeagle joined #salt
04:37 beardedeagle I am running into an issue when using salt-cloud where the key that get's accepted is not the full minion_id which causes salt commands to fail against it. Say I issue salt-cloud -p cpp-base-phx3-medium_cent7 sometestbox08
04:37 beardedeagle I get sometestbox08 accepted and when it the full minion_id is sometestbox08.cloud.dev.phx3.gdg
04:38 hemebond ^C: Does it have full paths, etc?
04:39 beardedeagle @hemebond: if that was for me, not sure I follow.
04:39 hemebond beardedeagle: It was for ^C
04:40 beardedeagle sorry, misinterpreted the ^
04:40 ^C hemebond: yup, admittedly its testing for a directory on a symlink (to a directory), but it still tests true from CLI
04:40 hemebond ^C: So it has the full path to the test executable?
04:41 ^C nope, that matters?
04:41 hemebond Yes.
04:41 hemebond Well...
04:41 ^C shouldnt, but might? :)
04:41 hemebond Might do. It's unlikely the check command is run with an environment, which means the executable won't be on the path.
04:41 ^C ok, i'll try
04:42 hemebond You could try running the command using cmd.run
04:42 hemebond salt 'minion' cmd.run '/bin/test /path/to/dir'
04:48 Vynce is there a simple way to add a key to an existing grain dictionary? like a dict equivalent of grains..append ?
04:49 hemebond Vynce: In Jinja you probably could.
04:49 hemebond But that wouldn't affect any other Jinja template.
04:49 hemebond You can add new grains though. That's documented.
04:50 ^C heme: cmd.run doesn output - the test is a returncode, so you dont get any output to stdout
04:51 hemebond What about '/bin/test /my/dir; echo $0' ?
04:51 hemebond Or whatever the actual check command is.
04:51 RobertChen joined #salt
04:52 Vynce @hemebond: i mean from CLI / python API.
04:52 hemebond Vynce: If you want new grains, there is a process for adding new grains.
04:52 Vynce i mean, i could read in the dict, modufy it in python space, write it back out — but it seems like there should be a straightup "add this key to this existing dict"
04:53 ^C heme: returns the same output of ('/bin/sh') whatever the result is
04:53 Vynce @hemebond: yep.  but that's not (always) what i want.
04:53 hemebond ^C: So the command used by the "unless" works when you do it via cmd.run?
04:54 hemebond Vynce: I don't think you can modify grains on the fly like that.
04:54 hemebond But it's not something I've tried to do.
04:54 ^C works without executable path, if i force output like this: 'test -d /var/www/current; if \[ $? -eq 0 \]; then echo "OK"; fi'
04:55 ^C so i know the exit code is good
04:55 Vynce hemebond: well, you can set them, or append to them.
04:55 hemebond ^C: Hmm, then I'm not sure. Are you able to show the state code? I could test it myself then.
04:55 Vynce this is parallel to that, conceptually, but i can't find a way to do quite what i'm looking for
04:56 hemebond Vynce: I don't really understand.
04:57 kitplummer joined #salt
04:57 ^C heme: from the apache/vhosts/standard.sls state: https://gist.github.com/cybacolt/15dd47d74012739ea636
04:58 hemebond ^C: Doesn't that just create a directory?
04:58 Vynce if the value in the grain is a list, https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.append can append to that list. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.appendcan create a new dict, and can even take a key on the command line and parse that as a deep key in a nested dict.  but it will overwrite the existing dict, or do nothin
04:58 ^C yeah, but its firing even if the directory exists
04:58 hemebond I'm surprised it needs a test at all.
04:59 Vynce as far as i cn tell, anyway
04:59 bhosmer_ joined #salt
04:59 ^C heme: its returning as false state, and spewing python errors
04:59 ^C when i run highstate
05:02 beardedeagle I think I solved my issue, trying out append_domain
05:02 hemebond ^C: Does it error if you use state.apply?
05:03 clintber_ joined #salt
05:04 hemebond I just ran it three times using apply and it applied once, never errored.
05:05 Vynce hemebond: i'll modify it in python space and set it with set; i was jsut hoping there was a way to get the grains module to do the obvious thing.
05:06 hemebond Vynce: Grains should be immutable.
05:06 hemebond Just like Pillars.
05:06 Vynce well, tell that to grains.set and grains.append
05:06 hemebond Oh.
05:07 Vynce also, why?
05:07 Vynce ( :
05:07 hemebond Should be immutable in my world :-)
05:07 hasues joined #salt
05:07 hasues left #salt
05:07 hemebond I've never thought of modifying them within states.
05:07 Vynce *shrug* keep in mind this is not a state i'm applying; this is a script i'm running whose whole purpose is to change what a minion does.
05:07 hemebond Though I suppose I would modify Pillars to reduce duplication.
05:08 Vynce like, reassign it from job a to job b (or, in this case, keep doing job a and add job b)
05:11 RobertChen joined #salt
05:12 Vynce i mean, i'm kinda poking around in the dark trying to figure out he best way to do this. maybe i should jsut be setting a list of jobs in the grain, and have the job specs in pillars or something, but i can't make enough sense of how to interface with pillars to make that work.
05:13 Vynce i mean, salt.modules.pillar doesn't even have setters.
05:14 beardedeagle Ok so now I am even more confused and would appreciate some help. I created a cloud.conf.d/dev.conf which has append_domain: cloud.dev.phx3.gdg. Now salt-key -L shows sometestbox.dev.phx3.gdg as accepted and denied and I cannot issue a salt '*' test.ping against it.
05:15 Vynce you have tea and no tea.  you are clearly a heavy-duty philosopher.
05:17 aphor beardedeagle: if you know salt can provision minions on that cloud with your providers and profiles, destroy and recreate the VM until it works.
05:19 beardedeagle So I made a custom bootstrap script because we use spacewalk and epel fails like a fireball from hell
05:19 beardedeagle in it I sed in the salt-master address
05:19 beardedeagle I am thinking that may be causing the issue
05:20 beardedeagle or hoping
05:21 hemebond Vynce: It sounds like your "jobs" should be states.
05:21 hemebond Or even just a script.
05:21 beardedeagle Does salt-cloud manage the master at all times? so that you don't need to specify in the minion conf file?
05:27 zmalone joined #salt
05:30 aphor beardedeagle: salt-cloud only does stuff at VM/minion creation time and destruction time.
05:30 beardedeagle yeah, just found that out when I did a salt-cloud -p without the sed. *sigh*
05:31 aphor beardedeagle: the standard bootstrap script supports specifying the salt master from salt-cloud profile or map file.
05:31 aphor maybe you can even put that in the provider...
05:31 beardedeagle can't use it though, not with the way our infrastructure uses. my custom boostrap script sets the master, but then I get two keys from the same minion
05:31 beardedeagle I set it in the conf.d
05:32 beardedeagle but that does not set it on the minion
05:33 aphor beardedeagle: does your infrastructure prevent salt-cloud from ssh'ing into the freshly booted VM to bootstrap a minion?
05:34 beardedeagle nope, it fails hard at install_centos_stable_deps()
05:34 beardedeagle epel is present, it is just named something wonky
05:35 rdas joined #salt
05:36 aphor beardedeagle: if your VMs can yum install everything in the standard bootstrap, just fork a copy of that and comment out the stuff that tries to add EPEL.
05:37 aphor beardedeagle: naming something wonky is b0rk3d.
05:37 aphor ok sleepytime for reals.
05:37 aphor beardedeagle: good luck!
05:37 beardedeagle @aphor thanks
05:46 Vynce hemebond: i'm not sure how the job could be a state, or what a salt script is like, but that may well be.  Unfortuantely, i'm also not interested in completely re-engineering everything bout how my farm works right now.
05:47 rdas joined #salt
05:52 codebam joined #salt
05:53 codebam left #salt
06:00 malinoff joined #salt
06:00 calvinh joined #salt
06:01 RobertChen joined #salt
06:05 slav0nic joined #salt
06:07 jaybocc2 joined #salt
06:08 clintberry joined #salt
06:16 jimklo joined #salt
06:22 dayid joined #salt
06:25 JPT joined #salt
06:26 impi joined #salt
06:31 colegatron joined #salt
06:32 favadi joined #salt
06:41 jhauser joined #salt
06:45 beardedeagle so looking at bootstrap-salt.sh I should be able to just pass -b and have it assume everything is installed and configured. however I keep getting ERROR: No dependencies installation function found. Exiting...
06:46 Bryson joined #salt
06:48 otter768 joined #salt
06:49 hightekvagabond joined #salt
06:50 felskrone joined #salt
06:50 felskrone1 joined #salt
06:59 kitplummer joined #salt
07:00 bhosmer joined #salt
07:21 AndreasLutro joined #salt
07:22 illern joined #salt
07:24 Vynce joined #salt
07:27 mung720 joined #salt
07:38 kanguru_au joined #salt
07:45 KermitTheFragger joined #salt
07:52 rotbeard joined #salt
07:57 elsmo joined #salt
08:08 eseyman joined #salt
08:19 Grokzen joined #salt
08:25 malinoff joined #salt
08:27 stqism joined #salt
08:28 Interkhanet joined #salt
08:28 Interkhanet Watch this
08:28 Interkhanet Gonna send a nuke
08:28 Interkhanet 3
08:28 Interkhanet 2
08:28 Interkhanet 1
08:29 Interkhanet GOY
08:29 Interkhanet hgot 3er4hyn34eopwnt9 34t9p fio rnf8iy erhgvzens igoier il vvpurmvwg8trnumscf pex;nurgv mk5re jcp pufgn reipugtn ioenawatgfu94n370tn 9pv39h89rph64o;i zy8o iyu ecvqrt436hn98c76 on479fhe8bw8 bcp2t4b6qvort3erhnfciomkefmuc943f09nhtcq3 8f4nouxi4nl4ytv3wq34 rfbjlyh  ticft l4fr ;inu4 3chjtfdn43ilkny5ifnt5v 9pqrt o3n4i;ftv34iol;yhlzsuilbtuytscxruys vgbzuyb834octnoitnw io ;4nwc hi 43uloiynlcrfqhg iewf ch3wrbnyc34qoil3rt434 yhvi3 blny4acauzlictub
08:30 AndreasLutro good job?
08:30 Interkhanet ipjhe n4oivytvn i;pm5 gtyusr vi4y3se vse roi vunegh nrlkg dflk hgoierujroigehuj xnskerg rfgse pgerhs lsvg ohbljithionjrge v;i;esyuh;5unvb905me,sr;ptgs ery8 tgn4evi eg4up94tvu gf5erinth54g v54syhinf5tvgh cit hi 53e4i hgierd y9 gyut9preuntersioputv3hb4 uybwe6yne7pb/ynn8orx9llytbs44a3 ctu9s s590yt45svth oil4tl4se v;eoc;nhmv cs;trss uc3 tgy;s34vh io;ot ybnh;tois 543wtvb uioo;s yhgth iohtvw4g3 o;ei hrvgef o;eh;8oib rgzeio ecvrhnr ei rgnergh
08:31 Interkhanet po34vmwvtoi;jhtm;4tv3wer;tsnugmtvworethuregoiudhjxrgyuer09gytut;o8e4 t v43oge shogerhoi negsoi eig54sa
08:31 Interkhanet READ THIS
08:31 Interkhanet FOR ME
08:31 Interkhanet PLEASE
08:31 Interkhanet GOY
08:31 Interkhanet AGAIN
08:31 Interkhanet LETS Go
08:31 toanju joined #salt
08:31 Interkhanet hnuio;e5 guiewrvoihngvytwer jhgsh ugvo;sxbhouitrg vmjsrexthn ;oiiny.i gyl8pf3a nl;ofvth;oebdcrne ghotghi; lo5489n yu0jrpu9sn;v94rowi 8yvhuoi3 eyhrgsyo hstghiognhir hegh srelotvgseurytnhgicxgyk4i tpoij seiorhkuinygtv43 yoi5 u4365qt fptay ;4evy;emd dayn;3 4oi6bv53 qn vy3irnyam,oim4ei nzsgnig4n;ioav gernuivmsdz kvlteavy ngf ylehnzjrefn yg5hitvgdxnkfgzersmujps ujernuivsei l/gizxinhghr5si;ynujhynhjp;45yoijhn54yt435;voitgfw43ev;oitewhiogrjhiy
08:32 Interkhanet PROGRAMMING AT THES PEED OF LIGHT
08:32 Interkhanet FOR THOSE THAT ASK
08:32 Interkhanet LET ME CONTINUEs
08:33 Interkhanet huiot v43unerfil nyulivrdfuibsh cvilewjtf9hvyenhozpse gvp 3y9pn;oyinvger;md yim;hoidxnyhrexinohs hiong;fmdulinv resfyhgn rehjiofjmewijygrxernhytfmwoerwivfct dxnccwoufi4n3o tioybuico4t uersniub rvgfu gutygnv hges hg ersh ytvnjgm9pwov43 uihgfrenyv gvurioheygp huoerin 43fcwbvwrt3n4 yivbtuewnyfvn ew4tuiognfhyhjnf8oyi3h64nrn qw4jkehgbnre iof8wnhl.fh17noiqujto3i4nerwtb uh5atnh vho8gnmayhgsndifjc6sdiyfvw;igs;imznhyu4lj4ub6tvanm zinyoiorvtam 4v
08:33 Interkhanet Done
08:33 Interkhanet Any questions?
08:34 Interkhanet Anyone?
08:35 Guest71482 joined #salt
08:36 Rkp joined #salt
08:37 RobertChen joined #salt
08:39 fredvd joined #salt
08:41 kawa2014 joined #salt
08:47 informant joined #salt
08:49 otter768 joined #salt
08:51 kwarunek joined #salt
08:51 honestly !ops
08:51 honestly sigh.
08:51 TyrfingMjolnir joined #salt
08:52 Rumbles joined #salt
08:53 thalleralexander joined #salt
09:01 bhosmer joined #salt
09:02 s_kunk joined #salt
09:02 kitplummer joined #salt
09:10 gnord joined #salt
09:10 jchen joined #salt
09:10 jchen left #salt
09:11 x00m joined #salt
09:23 RobertChen on redhat 5.7, I got this bug:  lowpkg.unpurge not implemented
09:23 RobertChen for pkg.installed
09:23 RobertChen salt-call version is 2014.01
09:24 linjan joined #salt
09:29 thefish joined #salt
09:34 hojgaard joined #salt
09:35 losh joined #salt
09:40 iggy both ancient
09:43 a7p joined #salt
09:45 traph joined #salt
09:45 dgn joined #salt
09:46 honestly how do I access the context in a py template?
09:48 impi joined #salt
09:50 AlberTUX joined #salt
09:50 ashutoshn left #salt
09:52 Andre-B joined #salt
10:00 jackywu joined #salt
10:00 honestly it's context.
10:00 jackywu hi, is there a way to print salt-minion configuration parameters including default parameters?
10:03 larsfronius joined #salt
10:03 cmek joined #salt
10:08 denys_ joined #salt
10:11 pbx_ joined #salt
10:14 AirOnSkin joined #salt
10:17 nethershaw joined #salt
10:22 CeBe joined #salt
10:34 giantlock joined #salt
10:37 ajw0100 joined #salt
10:38 keimlink joined #salt
10:43 toanju joined #salt
10:47 larsfron_ joined #salt
10:50 otter768 joined #salt
10:51 RobertChen joined #salt
10:52 ziggypup joined #salt
10:52 ziggypup left #salt
11:04 quasiben joined #salt
11:04 kitplummer joined #salt
11:05 jeblair joined #salt
11:08 pbx_ joined #salt
11:14 bluenemo joined #salt
11:14 N-Mi_ joined #salt
11:24 malinoff joined #salt
11:32 viq joined #salt
11:33 kitplummer joined #salt
11:34 Grokzen joined #salt
11:43 asco1aro joined #salt
11:43 asco1aro I'm looking for assistance with deploying MariaDB...  I have configured everything properly using https://www.digitalocean.com/community/tutorials/saltstack-infrastructure-creating-salt-states-for-mysql-database-servers
11:44 asco1aro But I cannot set the mysql root password or create the data or users yet
11:46 asco1aro I've successfully deployed everything else for a LEMP stack plus monit, users, new relic, postfix, partitions, swap, etc. My only remaining issue is in creating the user and database for mariadb....
11:49 Emantor joined #salt
11:55 VSpike asco1aro: I found a workable solution for creating the users. Keep meaning to come back and tidy it up, and also create the databases
11:55 VSpike It needs some serious refactoring, but it does work
11:59 Vynce i am having a heck of a time actually getting a dict into this grain via salt.modules.grains.set
12:03 VSpike asco1aro: https://gist.github.com/johnccfm/14a5c1609894739df402
12:03 VSpike asco1aro: needs to be made fully pillar drivent, with the users and grants in pillar and a state that loops through them
12:04 VSpike The only clever bit really is putting the root creds you want in the pillar (so that the DB can be managed by salt), and having a way so that it sets the root password *first*, but uses the default empty password to do it
12:05 VSpike asco1aro: you may need to install python-mysqldb package too
12:16 felskrone joined #salt
12:17 AlberTUX joined #salt
12:19 AlberTUX1 joined #salt
12:22 _JZ_ joined #salt
12:22 asco1aro Thank you so much for replying.  I've been hitting my head on this off and on for a week.  I have followed the guide to set the root password in pillar though it doesn't seem to pass the password as I'm able to access mysql without a password. Though I can create a database via salt master.
12:23 asco1aro I reverted from using mariadb to use standard mysql-server as well per their guide though it still remains passwordless...
12:26 asco1aro VSpike: Would you want to set this up for me? I'm on Skype/Hangouts and can send funds via Paypal if we can get this set up sooner than later.
12:28 VSpike asco1aro: I'm using maria, so I think the same techniques should work equally well for both
12:28 VSpike asco1aro: sorry, got my hands full at the moment :) Happy to answer questions here though
12:31 colegatron joined #salt
12:33 asco1aro VSpike: I'll which back to Maria.  Do you have an example of your main init.sls available and are you using Debian as well?
12:33 Emantor left #salt
12:36 asco1aro VSpike: Here is my state init.sls and pillar so far... For some reason it overlooks the root password...  https://gist.github.com/anthonyscolaro/07c596748014d692e511
12:37 p404 joined #salt
12:38 markm joined #salt
12:42 AndreasLutro joined #salt
12:44 shiriru joined #salt
12:49 honestly use salt, they said
12:49 honestly it supports solaris, they said
12:49 honestly :(
12:51 otter768 joined #salt
13:00 Vynce honestly: salt is just a bunch of tiny bricks you could theoretically build a city out of.
13:00 honestly well... it's a bunch of bricks built on python
13:01 honestly and the specific solaris system I'm trying to run it on seems to be incompatible with the python setup salt-ssh is trying to execute
13:01 honestly this could be a salt-ssh problem of course...
13:02 bhosmer joined #salt
13:02 Vynce that makes it sound extra fun, yeah.
13:03 VSpike asco1aro: https://gist.github.com/johnccfm/8127f429c6b9c58b5615 is the full set up. Sorry about the file names - I put / in first, but gist doesn't like that
13:04 dgn honestly: have you tried executing the salt commands on the remote machine yourself?
13:04 honestly dgn: how? there's no salt on the remote machine.
13:04 honestly I'm using salt-ssh
13:05 VSpike It's a little convoluted just because of a general pattern I follow, for better or worse. I tend to include from top.sls the most specific role file, e.g. in this case linux.roles.db.premium.master as the entry point, which then includes the common, shared parts that sit above it in the tree
13:06 Vynce i think https://docs.saltstack.com/en/latest/ref/clients/index.html#salt.loader.grains is promising for what i want, but it's incredibly spare. Anybody know a good resource for learning about this, other than this doc?
13:06 VSpike On the server, I split master & slave specific stuff out into /etc/mysql/conf.d/master.cnf and /etc/mysql/conf.d/slave.cnf to make life easier. /etc/mysql/my.cnf is common to both
13:07 VSpike asco1aro: this is for Ubuntu, btw, so you might have to adjust for Debian
13:07 mapu joined #salt
13:08 dgn honestly: ah I see. didn't use salt-ssh yet. well, which version of python are you using on the solaris machine?
13:09 morissette joined #salt
13:09 VSpike asco1aro: as far as pillar data goes, apart from some stuff to do ulimit file limits, the only DB specific data is mysql.user and mysql.pass
13:09 honestly 2.6.1 it seems
13:12 asco1aro VSpike: This looks great.  I'll start setting it up now and will let you know how it goes.  Thank you!
13:13 ThomasJ joined #salt
13:13 kavakava joined #salt
13:14 felskrone joined #salt
13:14 favadi joined #salt
13:16 VSpike asco1aro: no problem, good luck!
13:17 felskrone joined #salt
13:18 inad922 joined #salt
13:21 rotbeard joined #salt
13:25 morissette Anyone here use much monit w/ salt?
13:27 morissette Getting this when trying to add minion to monit: http://paste.linux.chat/view/1b1258fc
13:27 wintamute joined #salt
13:29 hacfi joined #salt
13:29 chrischris joined #salt
13:33 TooLmaN joined #salt
13:35 Vynce anybody awake yet who knows how to use salt.modules.grains.set() ?
13:35 kitplummer joined #salt
13:35 DammitJim joined #salt
13:37 N-Mi_ joined #salt
13:39 Vynce or alternately, teh salt.loader stuff?
13:39 inad922 joined #salt
13:42 AndreasLutro joined #salt
13:43 illern joined #salt
13:43 kbyrne joined #salt
13:45 ssplatt joined #salt
13:47 BlackBishop joined #salt
13:47 BlackBishop salt 'something' state.highstate says 'int' object has no attribute 'pop'
13:47 BlackBishop any ideas what stuff I have a wrong version of ?
13:48 AndreasLutro BlackBishop: do you have the full stack trace?
13:48 BlackBishop how can I get one ?
13:48 BlackBishop the only returned line is that one
13:48 AndreasLutro try running the command again with -l debug
13:50 honestly seems my problem is probably an ancient libc
13:50 quasiben joined #salt
13:50 subsignal joined #salt
13:52 BlackBishop AndreasLutro: http://pastebin.com/JKRGpXUT
13:53 DanyC joined #salt
13:53 amcorreia joined #salt
13:53 AndreasLutro hm, that's not good
13:53 N-Mi_ joined #salt
13:54 BlackBishop figured as much .. don't have any idea where to start/continue debugging :-(
13:54 AndreasLutro you could try -l trace
13:54 alibama joined #salt
13:56 BlackBishop http://pastebin.com/RUXYP8VC
13:57 AndreasLutro try ssh'ing into the minion and running the same command, but `salt-call` instead of `salt 'X'`
13:57 BlackBishop X is just me hashing the hostname ...
13:57 BlackBishop ok
13:57 BlackBishop one sec
13:57 DammitJim AndreasLutro, teach me something... what does salt-call do on the minion?
13:57 BlackBishop Usage: salt-call [options] <function> [arguments]
13:57 BlackBishop the help pops up
13:57 BlackBishop ow
13:58 BlackBishop wait
13:59 AndreasLutro DammitJim: it's the same as `salt` but with the remote execution protocol cut out, so you might get better debug output/stack traces
13:59 AndreasLutro I might be wrong/inaccurate
14:00 DammitJim oh, so I could "test" my state on the minion directly?
14:01 AndreasLutro don't think it's any more or less "testing" than a "real" salt call
14:01 AndreasLutro just changes the way the python code is being executed
14:01 AndreasLutro which in some cases can give you better debug output
14:01 Vynce are ther eany examples of using grains.set / grains.get with dictionaries? i've een assured that it works but for the life of me i can't get it to
14:01 AndreasLutro not entirely sure, I only use salt-ssh atm so not sure what the difference is in terms of a master/minion setup
14:02 mik__R joined #salt
14:03 BlackBishop [ERROR   ] Got a bad pillar from master, type NoneType, expecting dict: None
14:03 BlackBishop [ERROR   ] An un-handled exception was caught by salt's global exception handler:
14:03 BlackBishop AuthenticationError: message authentication failed
14:03 BlackBishop oh well.....
14:03 AndreasLutro don't know what could cause that, sorry
14:06 mohae_ joined #salt
14:08 jettero left #salt
14:10 quix joined #salt
14:11 Hydrosine joined #salt
14:12 tuxx hi guys..
14:13 tuxx i need to provision a list of keyfiles from the master to a minion
14:13 tuxx i am looking for an elegant solution to manage a list of files
14:13 tuxx does anyone have an example of how i could do that using pillars?
14:14 ssplatt anyone have an example or know how to have a master send an event to a specific syndic once a new salt-cloud vm is created?
14:15 toastedpenguin joined #salt
14:15 ssplatt or to all syndics.
14:15 aphor tuxx: ssh keys?
14:16 ssplatt tuxx: file.managed?
14:17 ssplatt with a for loop perhaps
14:17 numkem joined #salt
14:17 mapu joined #salt
14:18 aphor tuxx: https://docs.saltstack.com/en/develop/ref/states/all/salt.states.ssh_auth.html <-- this is pretty elegant
14:20 ssplatt does anyone else find it really annoying that salt just recently changed to allowying duplicates in lists?  like in the ssh you just listed, if i put -names: -AAsdadasd…    in my defaults.yaml for instance, then in my server1.sls pillar file, i put the same thing, i’d get the key entered twice in the config?
14:21 tuxx its not ssh keys
14:21 tuxx its a set of gnugpg keys for signing
14:21 AndreasLutro ssplatt: I learnt long ago not to use lists for important data like that, but yeah I agree with you
14:21 tuxx and i tried like an array of file.managed's
14:21 yuhlw Hello, I'd like to push a file only if the file is not already present. How could I do this ?
14:21 aphor tuxx: to be elegant, write your own state.sls, iterating on a pillar, and use file.managed.
14:21 tuxx but aparently they dont merge, the last one overwrites
14:21 AndreasLutro ssplatt: I thought I read somewhere (github issue maybe) that it's possible to change the behaviour back
14:21 ssplatt AndreasLutro: i think its annoying me because that’s not how it was a week ago or so
14:22 ssplatt maybe, but its probably best that i learn to not do that
14:22 tuxx aphor: yea thats what i would like most
14:22 ssplatt and get used toit
14:22 AndreasLutro ssplatt: I think it changed from 2015.4 to 2015.8
14:22 tuxx aphor: can you show me an example of what the pillar should look like?
14:22 AndreasLutro or whatever the previous 2015. version was
14:23 bhosmer joined #salt
14:24 yuhlw Sorry to repost, but the canal was a bit busy: Hello, I'd like to push a file only if the file is not already present. How could I do this ? It seems an easy need, but I do not see how to do this. Any idea ???
14:25 AndreasLutro yuhlw: file.managed has an argument, I think it's called "replace", which you can set to false, and salt won't overwrite existing files
14:25 tanta_g joined #salt
14:25 yuhlw AndreasLutro: who thanks, I was looking to do this with a "unless" or a "only_if". Again. Many thanks
14:26 ssplatt is there a reactor state similar to local.event.fire?
14:30 Tecnico1931 joined #salt
14:33 Vynce people are starting to wake up!  anybody know how to actually get a dict into a grain with grains.set?
14:34 winsalt joined #salt
14:34 bhosmer_ joined #salt
14:39 Tyrm joined #salt
14:40 tuxx hey guys i have multiple files containing information on gnugpg keyfiles:
14:40 tuxx http://pastebin.com/kTDrbQVY
14:40 tuxx as you can see i cant create a list of file.managed .. it overwrites.. im not sure how im supposed to do it
14:40 tuxx any help would be greatly appreciated
14:40 AndreasLutro tuxx first of all that looks like it should be in states, not pillars
14:41 Tyrm joined #salt
14:41 tuxx AndreasLutro: well the keyfiles are sensitive information right?
14:41 AndreasLutro second, you need to make apt-repo-keyfile: dynamic somehow - you can't have conflicting root state IDs
14:41 Vynce also, use different keys for different things
14:41 Vynce ^^that
14:41 AndreasLutro tuxx well yes, but you don't need that dynamic data to match the state data structure exactly
14:41 tuxx AndreasLutro: well when is it considered conflicting? i want them to merge into a list of managed files
14:41 AndreasLutro tuxx I'll write you an example..
14:41 tuxx AndreasLutro: yay.. thanks
14:42 winsalt pillar is just for flat data, any sort of modules or logic would go in the states
14:43 AndreasLutro tuxx https://bpaste.net/show/d4dbd0d9828b
14:44 tuxx AndreasLutro: ahhh :D
14:44 tuxx AndreasLutro: trying.. thanks
14:44 AndreasLutro note that the gpg_keys data have different keys, so they're not being overwritten, and in the state you use gpg-key-{{ name }} to make sure no states have the same ID
14:45 tuxx AndreasLutro: yea i see
14:46 ssplatt from https://docs.saltstack.com/en/latest/topics/reactor/#a-complete-example, where do i get more information on wheel.key.delete and other reactor things? i’m totally lost
14:47 ssplatt and local.cmd.run, is that the salt.module.cmd?
14:47 ssplatt so if i made a reactor to send an event, it would be local.event.send?
14:47 tuxx hmm its not working
14:48 tuxx AndreasLutro: https://bpaste.net/show/374453b22c63
14:48 tuxx i dont see pubring in pillar.items
14:49 AndreasLutro maybe your top.sls isn't adding it?
14:49 tuxx it is
14:49 sam_ joined #salt
14:49 AndreasLutro that looks fine to me
14:49 tuxx hmm okay.. let me double check my stuff then
14:50 DanyC morning/ afternoon all. In a srv/salt/top.sls i can reference pillar data and have if conditions based say on node_type grain. Is it possible to have same if condition in /srv/salt/consul/init.sls state for example ?
14:51 illern joined #salt
14:51 racooper joined #salt
14:52 otter768 joined #salt
14:52 DanyC in the init.sls i'd like to condition the ntp.pkg installation based on pillar/ grain data ?
14:55 mik__R joined #salt
14:56 kaptk2 joined #salt
14:56 alibama joined #salt
14:57 winsalt DanyC, states can have logic in them as well. So yes.
14:57 DanyC winsalt: cool, thanks !
14:58 pcn DanyC: If you can, it's also even easier to use targeting to do that sort of thing
14:58 Brew joined #salt
14:58 tuxx AndreasLutro: https://bpaste.net/show/46d20692cb28
14:59 tuxx its are my top includes wrong?
14:59 winsalt states can be jinja templates, so you can insert pillar or grains into them when they get run
14:59 tuxx AndreasLutro: if i add the lines from keys/apt-repo/init.sls to the top.sls then it works fine, but not the way i pasted it
15:00 mik__R joined #salt
15:00 AndreasLutro tuxx: hmm, I think this is a limitation in how includes work
15:00 AndreasLutro so yeah you probably have to add them directly in top.sls
15:00 winsalt tuxx I think your folders are too nested.
15:00 tuxx i see, sux
15:00 VSpike joined #salt
15:01 tuxx AndreasLutro: ok anyway at least it works .. i'll try your template now thanks so much man ;)
15:01 tuxx winsalt: i see
15:01 winsalt salt is looking in the keys/ folder for an init.sls i think
15:02 DanyC pcn: targeting based on ? casue the whole use case is this: if the provider is aws, i want to separate the ntp installation into external and internal. Now to keep things tidy i've added the ntp internal server installation as part of consul state to keep things tidy. i do have already a condition in top.sls fro states and now i'm looking to kind of implement same condition in the consul state to skip is provider is not aws
15:03 zmalone joined #salt
15:03 giantlock joined #salt
15:04 pcn If you have AWS grains, you can target based on that grain data being present or not
15:05 ssplatt if blah is defined?
15:05 tuxx hmm the jinja isnt working.. i wish there was a good way to debug templates
15:05 winsalt i havnt tested this tuxx, but maybe it should look like this https://bpaste.net/show/6cb039b70a57
15:06 tuxx winsalt: basically took out one depth of nestedness right?
15:06 winsalt yeah
15:06 tuxx k
15:07 tuxx forget what i said.. your tempolate is fine
15:08 VSpike Well, that's odd. Installing git with the windows repo (2015.8.1, so repo-ng). Git installs, but it seems to fail. I'm guessing the reason is that git doesn't appear in pkg.list_pkgs when installed
15:08 ssplatt where is teh reactor diractory? so i can see what tags/ractions have been sent/received?
15:08 VSpike Every time, this whole Windows repo thing is just huge butt hurt. Fix one problem, and another one appears. It's so depressing :/
15:09 winsalt the windows repo is a pain, i had a problem with stuff not showing up in list_pkgs because I had downloaded a 32bit salt
15:10 tuxx winsalt: if the file i want to copy is in pillar/keys/apt-repo/pecring.gpg, how do i refer to it in the salt:// syntax? salt://keys/apt-repo/pecring.gpg doesnt seem right
15:10 tuxx or is there pillar:// ?
15:11 ssplatt i’d think that gpg key would be under /srv/salt/files...
15:11 ssplatt not that there is any official way to do that
15:11 tuxx meaning outside of both pillar and states?
15:11 winsalt salt:// always refers to your /srv/salt directory by default
15:11 tuxx is it safe to keep sensitive information in that folder?
15:12 ssplatt safe as in its data that you are sending out to all of your minions?
15:12 tuxx no.. not to all of them.. just one
15:12 tmclaugh[work]_ joined #salt
15:12 tuxx i used '*' eariler for convience
15:12 ssplatt also for example, i have reactor files in /srv/reactor, and i’m calling them with salt://reactor/auth-complete.sls
15:13 mpanetta joined #salt
15:13 tuxx file_roots: base: /etc/salt/states
15:13 tuxx pillar_roots: base: /etc/salt/pillar
15:13 tuxx thats what i currently have setup
15:13 winsalt salt:// refers to that file_roots setting
15:14 tuxx so i'll have to put it there i guess?
15:14 winsalt yeah
15:14 ssplatt my file roots is set to /srv/salt
15:14 tuxx or i could use contents: in the pillar?
15:14 ssplatt but salt://reactor/blah.sls works fine
15:14 clintberry joined #salt
15:15 tuxx well i still would like to know if the data would then become available to all minions or not
15:15 zsoftich2 joined #salt
15:15 winsalt if you want to limit what minions get data, you can do that in the top.sls or the pillar top.sls
15:17 tuxx winsalt: then why is it adivsed to keep sensitive info in pillars if you can just filter by using the id in the top.sls of the salt states
15:17 JPaul joined #salt
15:17 joren joined #salt
15:17 winsalt I think they mean that you *can* store sensitive info in pillars, because pillars stay on the master
15:18 czchen joined #salt
15:18 m0nky joined #salt
15:18 mihait joined #salt
15:18 winsalt but pillars can be anything you want, think of it like a mini database
15:19 tuxx "because pillars stay on the master"?
15:19 tuxx obviously that is an important point
15:19 tuxx i want these keys to remain on the master
15:19 tuxx not be broadcasted to all minions
15:20 ssplatt looked like before these were app repo keys, for signing packages right?
15:20 winsalt so in your pillar top.sls, if you just had "minion1: apt-repo-key"  only minion1 would get to see that data
15:21 winsalt if you dont put anything in the pillar top.sls I dont think any minions would get any data
15:22 bronz joined #salt
15:22 winsalt ssplatt, I think you asked about seeing reactor data.  If you run "salt-run state.event pretty=True" then you can see every event that gets received
15:23 ssplatt winsalt: what if its being fired at teh end of a salt clout run?
15:23 tuxx winsalt: hm i think i understand
15:24 TyrfingMjolnir joined #salt
15:24 ssplatt https://www.reddit.com/r/saltstack/comments/3t7qga/salt_master_firing_events_to_syndics/  is what i’m trying to accomplish
15:24 saltstackbot [REDDIT] salt master firing events to syndics (self.saltstack) | 4 points (76.0%) | 1 comments | Posted by OneBeerOrTwo | Created at 2015-11-17 - 22:09:40
15:24 ssplatt so i want to see if my event is even being kicked off
15:24 ssplatt and then on the other side, if its being received
15:25 hasues joined #salt
15:25 ssplatt or how it’s being formed so i can tell if my sls is right
15:25 hasues left #salt
15:25 winsalt hmm
15:26 ssplatt basicaly i’m stabbing in the dark with this because I can’t find any documentation or examples anywhere
15:26 winsalt im not sure, when I salt-cloud a new vm it is automatically accepted.
15:27 ssplatt mine aren’t. i got this method to work on a single master env, but i want to now connect it to a syndic which wasn’t used to fire off the initial creation
15:28 winsalt so you are running salt-cloud on the master master, is the new vm getting pointed to the master master in its config?
15:28 andrew_v joined #salt
15:29 ssplatt i changed the minion master in the profile
15:29 ssplatt if i set it as masterofmasters, i can get it to autoaccept
15:30 winsalt ok, so I would think all you would need is a reactor on the syndic looking for minions connecting to it
15:30 ssplatt but the syndic isn’t receiving the salt/cloud/*/created event since it didn’t kick off the process
15:30 ssplatt but i don’t want to match on name, because i think thats unsafe
15:30 ksj hi, is beacon broken? I'm using 2015.8.1 and have followed the documents exactly, but I can't see the events on the master. I've also tried changing the path of the file for inotify to begin with a /, but nothing's working
15:32 winsalt I think you could be able to have the master master tell the syndic what minion to accept
15:37 winsalt I havnt messed with syndics yet
15:37 kitplummer joined #salt
15:38 amcorreia joined #salt
15:38 bhosmer joined #salt
15:39 cpattonj joined #salt
15:40 tuxx can you tell file.managed to create the subdirectories of a file?
15:40 cpattonj left #salt
15:40 tuxx i mean to create the directories which lead to the specified file?
15:43 VSpike tuxx: makedirs=true
15:43 winsalt these two pages have been the most useful to me https://docs.saltstack.com/en/latest/ref/states/all/    https://docs.saltstack.com/en/latest/ref/modules/all/
15:44 winsalt you can find all options, and some examples
15:44 VSpike Ok, so Git is installed, but it doesn't appear in HKLM\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall or HKLM Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall
15:44 VSpike Which is what salt iterates to build the list of installed packages, meaning Salt always thinks it's uninstalled
15:45 VSpike I know that (1) trying to get a list of installed software on Windows is really hard and (2) the mechanism used by this code has changed at least twice since I started using Salt
15:45 VSpike Is the answer vodka?
15:46 winsalt yep
15:46 winsalt or maybe write a state to add the reg key for git
15:47 Micromus joined #salt
15:50 tanta_ge joined #salt
15:50 yml joined #salt
15:53 denys joined #salt
15:54 quix_ joined #salt
16:01 VSpike Interesting. It installs the key in HCKU\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall
16:03 hasues joined #salt
16:03 hasues left #salt
16:06 chadhs joined #salt
16:07 chadhs with the boto_ state modules can you tell them to read AWS creds from a specific profile name in your ~/.aws/credentials file?
16:07 chadhs something like `- profile: salt-provision`
16:11 perfectsine joined #salt
16:13 tristianc_ joined #salt
16:14 pmcg joined #salt
16:14 conan_the_destro joined #salt
16:14 asco1aro VSpike: I can't seem to resolve this missing SLS error.  I have specified pillar data per your instructions for root master.  I'm about to post my files/structure to you in gist. Could you take a look?
16:15 perfectsine joined #salt
16:17 ssplatt joined #salt
16:19 pbx_ joined #salt
16:20 pbx_ Hi does anyone have decent config for Jekyll?
16:20 pbx_ left #salt
16:21 Waggott14 joined #salt
16:22 Waggott14 Hi does anyone have decent state config for Jekyll?
16:26 _Cyclone_ joined #salt
16:26 ssplatt winsalt: sorry idropped out in the convo before.  having the master tell the syndic which key to accept is exactly what i want. i was trying to more or less pass the data{} off using an event.
16:26 bhosmer joined #salt
16:26 malinoff joined #salt
16:27 higuita joined #salt
16:27 ssplatt master would get event “cloud created”, it would then send event to Sydnic saying “hey, check for a new key and accept it if the ID matches Blah”
16:29 Nazca joined #salt
16:33 sdm24 joined #salt
16:34 winsalt maybe you could have the master master just do a cmd.run 'salt-cloud ...' on the syndic
16:36 belt-ascend joined #salt
16:37 feliks joined #salt
16:37 belt-ascend How does one import within a #!py rendered state-file?
16:37 perfectsine joined #salt
16:38 belt-ascend s/import/include/
16:41 kitplummer joined #salt
16:42 kitplummer joined #salt
16:43 liskl joined #salt
16:43 bronz joined #salt
16:48 quix joined #salt
16:49 ipmb joined #salt
16:50 alibama joined #salt
16:52 dfinn joined #salt
16:53 otter768 joined #salt
16:54 av_ joined #salt
16:54 writtenoff joined #salt
16:57 asco1aro VSpike: I fixed it my reaccepting the minion's key...  must have been a bug...
16:57 conan_the_destro joined #salt
16:58 tuxx hey guys i have a static config file, in which i would like to replace certain entries using jinja
16:58 tuxx im using file.managed: can i tell it to run jinja on it before copying?
16:59 ssplatt template: jinja
16:59 scbunn joined #salt
16:59 ssplatt file.managed:  name: config.conf.j2    template: jinja
16:59 tuxx beautiful <3
16:59 chadhs @Ryan_Lane, how are you "- profile: aws_profile" in your provisioning?  reading from ~/.aws/credentials, from pillar data, or from confidant?
17:00 tuxx i found it already .. sorry forgot to mention
17:00 VSpike asco1aro: cool
17:00 Andre-B joined #salt
17:03 tuxx ssplatt: so now i can just do stuff like {{ documentroot }} in a file like apache2.conf?
17:03 tuxx Comment: Unable to manage file: Jinja variable 'documentroot' is undefined; line 4
17:03 tuxx DocumentRoot {{ documentroot }}    <======================
17:03 tuxx in the .sls which calls file.managed i'm doing {% set documentroot = '/var/www/html/' %}
17:03 ssplatt you can either pass vars into it by putting var: {{ var }} in the state config
17:04 ssplatt …useful for loops
17:04 ssplatt or you can just import/include the maps
17:04 ssplatt at the top
17:04 ssplatt but yeah,t hen you just do your jinja inside the config file
17:05 tuxx ok.. i didnt know that i have to pass the vars one by one
17:05 ssplatt no you don't
17:05 tuxx but if i dont then it tells me its undefined
17:05 kitplummer joined #salt
17:05 ssplatt but like in my nginx config, i define sites using pillar
17:05 tuxx you mean i can do -include whatever.sls inside the apache2.conf?
17:06 alibama joined #salt
17:06 ssplatt so in my state file i have {{for site in sites }}  and pass in site: {{ site}}
17:06 tuxx cool
17:06 ssplatt so inside {{ site.fqdn }}.conf i then just use {{ site.blah }}
17:07 ssplatt in others, i do {%- from "ruby/map.jinja" import ruby with context %}
17:07 ssplatt for instance
17:07 ssplatt then i can use ruby.blah
17:07 ssplatt as the vars
17:08 tuxx ssplatt: your stuff isnt public i assume?
17:09 ssplatt nah
17:09 ssplatt sorry
17:09 tuxx ssplatt: i find it hard to find repos that show full setups
17:09 ssplatt yeah i started trying to use the ones in saltstack’s github but found them confusing
17:10 jimklo joined #salt
17:13 Bryson joined #salt
17:13 scbunn joined #salt
17:18 impi joined #salt
17:18 moogyver joined #salt
17:20 scbunn trying to use salt-cloud to provision some ec2 instances /w an IAM role.  From the AWS CLI I would add --iam-instance-profile Name="foo".. how does that translation to a cloud map?
17:23 asco1aro VSpike: I've updated my gist to show the error I'm experiencing along with the files.  I updated the file names a bit to fit my directory structure.  4/10 states are successful. https://gist.github.com/anthonyscolaro/07c596748014d692e511
17:23 rmnuvg joined #salt
17:24 kbaikov joined #salt
17:34 tiadobatima left #salt
17:35 scbunn joined #salt
17:35 andrew_v_ joined #salt
17:35 alibama joined #salt
17:37 scbunn joined #salt
17:39 mik__R joined #salt
17:50 VSpike asco1aro: will look tomorrow, probably
17:51 r05c03 joined #salt
17:51 hackel joined #salt
17:51 asco1aro VSpike: Thanks for letting me know. I've made significant progress. I'll keep the gist updated and you posted.
17:51 asco1aro VSpike: I think only one issue remaining now...
17:51 alibama joined #salt
17:52 giantlock joined #salt
17:53 alibama joined #salt
17:55 andrew_v joined #salt
17:57 cyborg-one joined #salt
18:00 ekristen joined #salt
18:02 lexter joined #salt
18:04 ageorgop joined #salt
18:06 baweaver joined #salt
18:07 metalseargolid joined #salt
18:14 ry joined #salt
18:16 Vynce joined #salt
18:21 jalbretsen joined #salt
18:21 bronz joined #salt
18:21 ssplatt still looking for some type of event log, so i can see what events are being sent where and by who? and who is receiving what events.
18:24 bhosmer joined #salt
18:25 whytewolf ssplatt: there isn't an event log. but there is a way to see the events coming into a master 'salt-run state.event pretty=True'
18:25 ssplatt ok so that is like tail -f
18:25 whytewolf yeah
18:25 ssplatt ok, that works
18:26 TC joined #salt
18:27 ssplatt i think winsalt mentioned that earlier but i didn’t really understand what that was going to get me
18:27 whytewolf ssplatt: https://docs.saltstack.com/en/latest/topics/event/index.html#listening-for-events goes into more detail about it
18:27 ssplatt ok thanks
18:27 whytewolf but basicly it shows what events are coming into a master and the sturcture of data that is passed in
18:29 irctc375 joined #salt
18:35 cpowell joined #salt
18:35 linjan joined #salt
18:35 tuxx hey guys.. if i install mysql-server using pkg.installed:
18:35 tuxx what on earth are the default credentials? :D
18:36 whytewolf tuxx: what distro?
18:36 tuxx debian jessie
18:36 tuxx seems to be empty
18:36 * whytewolf shrugs. I always set that with debconf
18:36 tuxx mysql -u root -p
18:36 tuxx lets me in with empty pass
18:36 tuxx coolio
18:36 RandyT watching a webinar on AWS Config service. Anyone used this and is anyone aware of how salt might interact with this service?
18:37 tuxx are there some modules for mysql for saltstack so that i can create users etc?
18:38 alibama joined #salt
18:39 whytewolf tuxx: there are. as well as states. look for module.mysql or states.mysql_user states.mysql_grants states.mysql_database and states.mysql_query
18:40 tuxx 'mysql.db_create' is not available.
18:40 CeBe joined #salt
18:40 tuxx whytewolf: i'm looking at it, but it seems it doesnt work out of the box.. im trying to understand why... i installed python-mysqldb
18:40 tuxx do i need anything else?
18:41 whytewolf odd, it is working for me on ubuntu
18:41 tuxx do i need do so something to enable modules?
18:41 whytewolf to meet the requirments
18:42 tuxx whytewolf:did you have to do anything in particular on ubuntu to get it working?
18:42 teryx510 Hey guys, When working with salt on Windows, do the win_ modules automatically override the standard modules? Example, I can't call win_system.reboot but if I ' salt-call sys.doc system.reboot ' it shows the documentation for win_system.reboot.
18:44 winsalt short answer, yes
18:44 whytewolf tuxx: this is what i use to install mysql through salt https://gist.github.com/whytewolf/6526bfc300ba8f583be6
18:45 tuxx whytewolf: awesome! thanks!
18:45 PeterO_ joined #salt
18:46 hasues joined #salt
18:46 hasues left #salt
18:46 whytewolf tuxx: also try to see if the way mysql is loading the python scripts for mysql work in your python https://github.com/saltstack/salt/blob/develop/salt/modules/mysql.py#L51-L70
18:47 tuxx its wierd i can see the modules lying around
18:47 tuxx /usr/lib/python2.7/dist-packages/salt/modules/mysql.py
18:47 teryx510 winsalt: thanks. Directions to the long answer?
18:47 tuxx whytewolf: not sure what you mean with your last sentence
18:48 whytewolf tuxx: the modules are there. but they have a function that checks if they can be loaded called __virtual__ if the module can't be loaded that returns false and the module doesn't work
18:48 tuxx whytewolf: and how can i check it?
18:48 tuxx Only load this module if the mysql libraries exist
18:49 winsalt teryx50 I assume its the same process as https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pkg.html, where salt checks what platform its on before loading modules
18:49 winsalt I say short answer, cause I dont know the long version :)
18:49 whytewolf tuxx: that url i sent highlights the lines in the mysql python that check if it can load
18:50 tuxx ah so run those commands in a python shell basically?
18:50 whytewolf yeap, and see if it tosses any errors
18:50 tuxx looks good :/
18:50 tuxx none of them failed
18:50 tuxx oh.. i lied.. import pymysql is failing
18:51 xDamox joined #salt
18:51 teryx510 winsalt: ah, well my thanks again.
18:53 otter768 joined #salt
18:54 hasues joined #salt
18:54 hasues left #salt
18:55 tuxx whytewolf: ok i had to restart the salt-minion :D
18:55 tuxx not sure how that gunna work actually.. i have to make the salt-master restart the salt minion?
18:55 tuxx or is there some way to reload modules
18:56 tuxx salt '*' saltutil.refresh_modules
18:56 whytewolf tuxx: you shouldn't need to restart the salt-minion ... I don't. what version of salt are you running on?
18:56 tuxx whytewolf: i certainly had to
18:56 tuxx whytewolf: i installed the python-mysqldb dependencies and it was telling me that it cant find any mysql.* commands.. after restarting the minion service it worked instantly
18:56 impi joined #salt
18:57 tuxx but theres aparently a signal that can be sent to the minion to re-read it's modules
18:57 whytewolf yeah.
18:57 masterkorp hello
18:57 masterkorp So what is the diference on runing salt state.highstate Test=true vs normal highstate ?
18:58 ssplatt test just shows what will chagne
18:58 ssplatt or pass
18:58 masterkorp (please reply by highlighting me as I am about to go afk)
18:58 ssplatt doesn’t actually change things
18:58 tuxx so if i want to prepend something to pkg.installed i can use require
18:58 surge_ joined #salt
18:58 tuxx is there some equivilant for appending something? like call something after installing?
18:58 xDamox joined #salt
18:58 surge_ Can I use a grain inside of a pillar item’s value?
18:59 ssplatt surge_: like grain[‘os’]
18:59 surge_ okay so {{ salt[grain.get](‘key
18:59 surge_ (
18:59 whytewolf surge_: you mean like salt.pillar.get(salt.grains.get('grain'))?
18:59 surge_ (‘key’) ** should still work?
19:00 whytewolf tuxx: https://docs.saltstack.com/en/latest/ref/states/requisites.html
19:00 surge_ whytewolf: app_s3_bucket: s3://dayjob/{{ salt[grain.get]('environment') }}
19:01 surge_ Something like that ^
19:01 whytewolf ahh. yeah that should "work"
19:01 surge_ LOL
19:01 surge_ okay I’ll give it a go and report back
19:01 whytewolf although. I'm not sure of the point of it
19:01 surge_ To reduce copy pasta
19:01 amcorreia joined #salt
19:02 denys joined #salt
19:02 surge_ otherwise I have to do dev.sls —> s3://dayjob/dev   , staging.sls —> s3://dayjob/staging. I can just use a ‘*’ match and throw it into a common.sls file —> s3://dayjob/{{ environment }}
19:03 racooper joined #salt
19:05 whytewolf ahh. humm. so why not put it into common.sls and use s3://dayjob/{{salt.grain.get('enviroment')}}
19:05 xDamox joined #salt
19:05 surge_ That’s exactly what I’m saying lol
19:05 forrest joined #salt
19:05 whytewolf oh. thats in your pillars
19:06 surge_ Yes
19:06 tuxx saltutil.refresh_modules doesnt seem to refresh the modules.. i still need to restart it
19:06 surge_ pillar/top —> ‘*’ — common  . pillar/common —> what I wrote above. That’s what I was asking
19:06 surge_ If it’ll render correctly.
19:07 whytewolf it should. but with pillar it is always kind of tricky cause pillars generally are rendered on the master
19:07 surge_ Oh, right.
19:07 surge_ Damn
19:07 surge_ yeah that won’t work
19:07 surge_ it’ll render w/ the master’s environment
19:07 surge_ copy pasta it is
19:07 domel joined #salt
19:08 domel does anyone have a sugestion on how to make rpm --import command statefull using cmd.run?
19:11 bronz joined #salt
19:13 larsfron_ joined #salt
19:14 kitplummer joined #salt
19:14 DammitJim joined #salt
19:14 larsfronius joined #salt
19:16 baweaver joined #salt
19:16 whytewolf domel: get a one line script that has a return code of 1 if it isn't there and use an unless
19:17 domel ty
19:17 kitplummer joined #salt
19:24 wt joined #salt
19:24 wt Is this reasonable:
19:24 wt # salt-run manage.down
19:24 wt No minions matched the target. No command was sent, no jid was assigned.
19:25 wt I seem to remember that not needing args in the past.
19:25 nidr0x joined #salt
19:25 wt In fact, "salt-run manage.down ''" works like it used to without the arg.
19:25 Andre-B joined #salt
19:26 enquier joined #salt
19:28 babilen That's weird
19:28 babilen (and nonsensical)
19:29 iggy you didn't accidentally alias salt/salt-run or something weird did you?
19:29 jeffspeff joined #salt
19:29 wt no
19:29 wt This is the latest in EPEL6, btw
19:29 iggy that's the error I expect to see when I run `salt manage.down`
19:29 iggy instead of salt-run
19:29 wt indeed
19:30 alibama joined #salt
19:30 jeffspeff can someone help me with this jinja error in my state? https://gist.github.com/jeffclay/8179c4173fa77262bec4  i think it doesn't like the backslash followed by the letter "x", but i'm not sure how to escape it.
19:30 babilen Which version of salt is that?
19:30 asco1aro Does anyone have time to check out why I can't set the password for mysql root? The error is the last one in the first file here https://gist.github.com/anthonyscolaro/07c596748014d692e511
19:30 wt that is, indeed, I would agree iggy
19:32 wt now it's not erring out
19:32 iggy jeffspeff: do you really have double quotes around that path in the template?
19:32 wt The difference is that there is not a minion on these masters
19:32 wt When there were no minions registered, I was getting the error.
19:33 jeffspeff iggy, i tried using double quotes within the single quotes to resolve the issue. i get the exact same error when not using both types of quotes just using single quotes
19:34 iggy asco1aro: set the mysql root password with the debconf(mod) states
19:35 alibama joined #salt
19:37 MadHatter42 joined #salt
19:39 whytewolf asco1aro: if you are on a debian system you should also have a debian.cnf file. I typically use that for my salt configuration by setting this pillar. mysql.default_file: '/etc/mysql/debian.cnf'
19:40 jeffspeff iggy, i just took the double quotes out and re-ran it, as before i get the same error. i updated the gist link to show the current error without using both double and single quotes
19:41 alibama joined #salt
19:42 asco1aro iggy: I'm looking at documentation here.  I tried this earlier though it ended up creating mysql without a root password. https://www.digitalocean.com/community/tutorials/saltstack-infrastructure-creating-salt-states-for-mysql-database-servers
19:43 whytewolf jeffspeff: what happens if you put an extra \ in front of the \ in front of the xml .... and that is a sentance i never thought i would type
19:43 asco1aro whytewolf: I'll take a look at that as well.  Do you have a gist example by chance?
19:44 jeffspeff lol
19:44 whytewolf asco1aro: I can gist it up but it literally is just that
19:45 tuxx is there any way to debug or execute jinja in place to see what it might be generating
19:45 penguin_dan joined #salt
19:46 NotBobDole joined #salt
19:46 whytewolf tuxx: I wrote this just for that purpase https://github.com/whytewolf/salt-debug
19:46 jeffspeff whytewolf, so you're suggesting C:\ProgramData\bentley\BSTCAD\workspace\telco\data\\xml\config\telcoConfig.xml ?
19:47 tuxx whytewolf: awesome
19:47 whytewolf jeffspeff: yeap
19:47 asco1aro whytewolf: gotcha. I'm still learning mysql/salt :)
19:47 whytewolf couldn't hurt anymore
19:48 tuxx whytewolf: where do i have to copy _modules?
19:48 shanemhansen joined #salt
19:48 whytewolf tuxx: file_root
19:48 whytewolf asco1aro: https://gist.github.com/whytewolf/1e942a1b982000b9d315
19:49 tuxx jth@salt:/etc/salt/states$ sudo salt '*' debug.render salt://repos/init.sls
19:49 tuxx 'debug.render' is not available.
19:49 tuxx /etc/salt/states is my file_root
19:49 ssplatt i’ve been paying around with event.send, event.fire, and event.fire_master and they all seem to be master<->minion events.  Is there a way to send custom master<->master tagged events?
19:49 whytewolf tuxx: after it is copied there salt '*' saltutil.sync_all
19:49 tuxx ok im running but it just stalls atm
19:50 tuxx zero output
19:50 ssplatt salt ‘syndic*’ event.fire_master {testing: test data} my/custom/tag   shows nothing on the syndics.  but if i target ‘*’, i get the return from the minions
19:50 tuxx does it fail if your jinja is very broken?
19:51 whytewolf tuxx: it actually shows any errors that the jinja outputs.
19:51 tuxx jth@salt:/etc/salt/states$ sudo salt 'stikked.mal-app-net.lab' debug.render source=salt://repos/init.sls
19:51 tuxx jth@salt:/etc/salt/states$
19:51 iggy ssplatt: no
19:51 whytewolf ... that should throw an error
19:52 whytewolf template=jinja is needed
19:52 iggy multi-master improvements are planned
19:52 ssplatt iggy: ah ok.
19:52 tuxx still the same :/
19:53 whytewolf tuxx: ... I'm not sure what to say. anything in the master or minion log?
19:53 whytewolf no output is the oddest of the outputs
19:53 ssplatt iggy: did you see what i’m trying to accomplish?  i’m trying to run salt-cloud on my master, but bind the cloud minion to a syndic, so once the master receives ‘created’ it tells the syndics to look for a new key and accept if id==blah
19:54 tuxx 2015-11-18 21:49:18,487 [salt.master      ][WARNING ] Caught signal 15, stopping the Salt Master
19:54 tuxx :)
19:54 whytewolf ... signal 15?
19:54 whytewolf yikes
19:54 whytewolf a term?
19:54 iggy ssplatt: I've never worked with syndic's
19:54 tuxx whytewolf: ok sorry that might have been me actually
19:56 tuxx whytewolf: is there anyway to see the output of templates manually?
19:57 whytewolf manually?
19:57 tuxx yea i mean to see what jinja is rendering w/o using your particular module
19:57 whytewolf if there was i wouldn't have built my module :P
19:57 jeffspeff whytewolf, when i try that, it doesn't error but that if statement must come back as false because the file doesn't get managed. i have verified that the file exists on the machine i'm testing with
19:58 whytewolf jeffspeff: then it is bug report time. and I think this one might need to go to both salt and jinja
19:59 jeffspeff :( ok, so any suggestion on how to work around this problem for now?
20:00 whytewolf only thing i can think of is to put the value into a pillar or grain. useing | and have jinja render it into that spot
20:00 notnotpeter joined #salt
20:01 whytewolf I'm not even sure how well that will work
20:01 s_kunk joined #salt
20:03 zmalone left #salt
20:04 whytewolf tuxx: I guess you could have the file managed someplace and then have a second script command that cats that file to you
20:07 whytewolf in the end thats all the module does anyway. puts the rendered file into a tmp file. read in the tmp file. delete the tmp file and output the results.
20:09 tuxx kind of a bad concept to not have something like that already in place
20:09 tuxx forces ppl to code in the dark
20:10 moeyebus I'm having a very strange problem right now.
20:11 moeyebus I'm running this command:
20:11 moeyebus salt -l debug -v snafu-host-base state.sls snafu.cloud.create test=1
20:11 moeyebus and there's data in a something.config pillar file
20:12 moeyebus placed in /srv/pillar/something/config.sls file
20:12 moeyebus That file is valid yaml, I've checked with this: http://www.yamllint.com/
20:12 iggy tuxx: you'd think, but people generally stop trying to find ways to render jinja about 2 months in
20:12 tuxx sudo salt 'stikked.mal-app-net.lab' cp.get_template salt://repos/init.sls /tmp/template-output
20:12 iggy (which explains why nobody has bothered writing the tooling to do it)
20:12 tuxx the file is created on the minion but its empty
20:12 tuxx wtf
20:13 tuxx iggy: and what do they do instead?
20:13 holler joined #salt
20:13 holler hello, I cannot figure out why my vagrant + salt provisioner is failing! helpp http://dpaste.com/0PTAR3V
20:13 iggy tuxx: you just get good enough you don't need it anymore
20:13 moeyebus But Here's what I get: Rendering SLS 'something.config' failed. Please see master log for details
20:14 tuxx iggy: amazing
20:14 moeyebus there's nothing concerning a pillar render failure in the logs
20:15 tuxx iggy: http://pastebin.com/qiLpk2p2
20:15 zmalone joined #salt
20:16 tuxx mind taking a look? i added a template which gets info from a pillar about apt-repos
20:16 asco1aro whytewolf: I'm receiving a "Recursive requisite found" because I set the debian.cnf to require the mysql-server pkg.  When I remove the requirement, the directory doesn't exist as mysql isn't installed yet.  What is the best way to get it to update the file after mariadb has installed?  https://gist.github.com/anthonyscolaro/07c596748014d692e511
20:16 tuxx it iterates over the repos and adds all key:value pairs
20:16 tuxx the only problem i'm having is with require_in... im not sure the requirement is being set properly
20:17 wt joined #salt
20:18 zzzirk joined #salt
20:19 iggy tuxx: why pillarize that? Just put the info in the state
20:19 iggy it's not private
20:19 tuxx iggy: well why NOT pillarize it?
20:20 tuxx iggy: must only private data be in pillars?
20:20 kitplumm_ joined #salt
20:20 moeyebus Even when I cp /dev/null to /srv/pillar/something/config.sls the same error occurs. What could be causing this?
20:21 moeyebus left #salt
20:21 moeyebus joined #salt
20:21 tkharju joined #salt
20:22 tuxx for example, i have a list of packages in my pillars and have a template to add them: http://pastebin.com/iWmkAAnL
20:22 tuxx is that a bad idea?
20:22 tuxx then i just need to add one line to the pillar and i'll have an additional package
20:23 asco1aro Hi everyone. I'm not sure if this is appropriate here but thought best to ask. I would be happy to pay someone to help me get this set up the states/pillars for mariadb to have a root password from pillar, deploy a database with the name as the fqdn and then a random user/password stored in a user's my.cnf of their home folder.
20:23 tuxx i'm really totally inexperienced with salt, i could well be that its a terrible idea
20:25 iggy it just seems like unnecessary obfuscation
20:26 tuxx hmm..
20:27 hal58th_1 asco1aro, ubuntu? mysql?
20:27 hal58th_1 oh, mariadb.
20:30 asco1aro hal158_1: debian yes, mysql but mariadb.  Here's what I have so far:  https://gist.github.com/anthonyscolaro/07c596748014d692e511
20:30 wt asco1aro, that sounds interesting. It may require a custom state or other code.
20:30 baweaver joined #salt
20:31 wt asco1aro, I've written a bunch of those to make salt work better for the processes where I work
20:32 asco1aro wt: It actually doesn't have to be a random password.  Just the ability to set the password in pillar for our group of web servers.
20:32 londo_ joined #salt
20:32 hal58th_1 asco1aro: I actually have most of what you want already done. Can you respond to my private message and we can talk details
20:33 asco1aro Ok great.  Sorry, new to this webchat :)
20:35 hal58th_1 You should already see it. I haven't used the webchat in a long time, I think you can right click my name and send private chat.
20:35 baweaver joined #salt
20:35 asco1aro I'm trying to respond but getting "Can't use this command in this window"
20:38 linjan joined #salt
20:41 kitplummer joined #salt
20:44 mapu joined #salt
20:45 timoguin_ joined #salt
20:46 xDamox joined #salt
20:47 Cyisl joined #salt
20:47 alibama joined #salt
20:48 aidalgol joined #salt
20:49 timoguin joined #salt
20:50 numkem joined #salt
20:52 numkem joined #salt
20:54 otter768 joined #salt
20:55 xDamox joined #salt
20:59 ssplatt kind of annoying i had to fusge the event system
20:59 ssplatt i got the syndic to autoaccept my key by sending a event.fire_master from the Master, to all minions
21:00 ssplatt then the minions sent the event to the syndic
21:00 ssplatt and the syndic ran it’s autoaccept sls to tell wheel to accept the key
21:00 ssplatt then the minion highstated.  it was beautiful.
21:03 conan_the_destro joined #salt
21:04 drawsmcgraw joined #salt
21:13 holler joined #salt
21:13 bhosmer joined #salt
21:13 holler hello, I was dc but im having trouble resolving issue with my vagrant + salt provisioner deployment.. it stopped working and im getting this http://dpaste.com/146TNQX
21:13 holler I cant determine what is wrong!
21:17 gladiatr joined #salt
21:17 MindDrive_ joined #salt
21:24 baweaver joined #salt
21:28 winsalt can salt-cloud profiles include other files?
21:32 justanotheruser joined #salt
21:37 tpegbert joined #salt
21:43 forrest holler, What commands are you running that lead to this issue?
21:45 holler vagrant up
21:45 forrest *led
21:45 forrest fresh instance or existing instance?
21:48 forrest To me that just looks like vagrant is running salt, but then not realizing it's done and isn't dropping out so you can connect, did you already try ctrl-c to see if that killed the instance or if it just dropped you back?
21:49 CeBe1 joined #salt
21:50 fusionx86 joined #salt
21:51 alibama joined #salt
21:52 vimalloc joined #salt
21:55 Guest71482 joined #salt
21:58 intel joined #salt
21:59 vimalloc Don't suppose anyone has seen a broken batch mode in 2015.5.3? I'm getting stuff that looks similiar to https://github.com/saltstack/salt/issues/24875 (specifically, "ValueError: list.remove(x): x not in list"), but that bug makes it look like it should be resolved in 2015.5.3
21:59 saltstackbot [#24875]title: ValueError: list.remove(x): x not in list  in   File "/usr/lib/python2.6/site-packages/salt/cli/batch.py", line 179, in run active.remove(minion) | Was running salt 2015.5.2-3.el6...
22:02 jaybocc2_ joined #salt
22:03 Guest89 joined #salt
22:03 aurynn is there a way to make salt-ssh use relative paths for file roots or config directories?
22:04 thalleralexander joined #salt
22:04 ingslovak joined #salt
22:05 jeffspeff in one my state files i'm doing a module.run command. how can i do a check or something so that if the result of the module.run is False then do xyz?
22:08 larsfronius joined #salt
22:11 aurynn or have `root_dir` dynamically set as . ?
22:13 subsignal joined #salt
22:19 mosen joined #salt
22:21 aurynn oh it just works
22:21 aurynn <3
22:21 aurynn ❤️
22:22 mosen hiya salties
22:22 Rumbles joined #salt
22:24 grumm_servire joined #salt
22:25 mohae joined #salt
22:27 kevin-wk joined #salt
22:30 kevin-wk OK, got a strange one.  Wrote a state, tested it on 2 systems.  Took it to a 3rd and I get "Rendering SLS 'env:name' failed: Jinja variable 'dict object' has no attribute 'attribute'".  But if I do a state.show_sls it renders correctly, and if I do a "pillar.get attribute" it shows up.
22:31 kevin-wk Only difference I can see is that the working machines were CentOS 6 w/ Salt 2015.5.3 vs. the non-working CentOS 7 w/ Salt 2015.5.5
22:33 vimalloc left #salt
22:34 kevin-wk Reproduced on another CentOS 7/Salt 2015.5.5
22:48 DanyC joined #salt
22:48 bhosmer joined #salt
22:52 jaybocc2 joined #salt
22:55 otter768 joined #salt
22:57 gimpy2938 joined #salt
23:00 iggy you should try pasting code and actual error messages
23:01 kevin-wk I will set up a gist
23:02 kevin-wk it'll take me a few min to prepare and sanitize it
23:02 iggy we understand, we've all been there
23:09 baweaver joined #salt
23:13 armguy joined #salt
23:16 Christian___ joined #salt
23:18 buMPnet joined #salt
23:21 asco1aro Could someone help me figure out how to define which file to deploy to a minion based pillar data?  https://gist.github.com/anthonyscolaro/126f8847b6186399505e
23:22 asco1aro I'm not sure what syntax to use to lookup the pillar data to see whether or not a field is true or false
23:23 gimpy2938 asco1aro: To pull in pillar data?  The same way you do for grains: pillar["whatever"]
23:24 jcockhren hey salt provisioner users (i.e. babilen, etc)  https://github.com/mitchellh/vagrant/pull/6382 is finally merged and will be in next release! :beers:
23:24 saltstackbot [#6382]title: [salt] [bugfix] Restablize Salt provisioner  | Hey all! This PR answers #6276. For the brave/bored, feel free to drill down through the referenced issues and PRs. ...
23:25 asco1aro I can pull in pillar data though this is a bit different.  In pillar I would like to have a list of websites and for each site, define whether it should deploy one of two files for a nginx rewrite.
23:26 Christian___ Sometimes 'salt-key -a or -A' doesn't work with saltstack 2015.x Only a listing is displayed, but the unaccepted minions are not added
23:26 asco1aro I think my gist helps explain what I'm trying to do as it shows the two files, what my pillar may look like... I'm not sure how to set up the if/than for the nginx state.
23:28 Christian___ Is someone familiar with this problem or a workaround how the minion can added when salt-key doesn't work?
23:29 DanyC hi, anyone knows/ heard of any projects/ work using salt to configure the physical switches/ routers ?
23:29 nafg_ joined #salt
23:30 DanyC if so how that works? using salt master/ salt-ssh or what ?
23:31 kevin-wk iggy: https://gist.github.com/kevins9/4cc0460a3e4b4590f163
23:32 mosen DanyC: proxy minion I think, though I havent used it myself
23:33 DanyC mosen: i never used nor heard nor don't know how it works. Will dig more into it. If anyone knows more aobut it pls shout, thx
23:37 Ch3LL ascolaro: i responded to your gist
23:37 kitplummer joined #salt
23:38 asco1aro Ch3LL: ok cool.  checking now.
23:40 baweaver joined #salt
23:40 asco1aro Ch3LL: I read those docs as well. I think that my nginx state would become convoluted with many domain names if I did that. I think Salt is set up to maintain things like the actual domain name in pillar.  I updated the nginx-state.sls gist to show more of what I feel like it should be like... I may be wrong though.
23:41 Ch3LL k looking
23:42 babilen jcockhren: \o/
23:42 iggy kevin-wk: for future reference, gist supports multiple files
23:42 kevin-wk there are 4 files in the gist...
23:43 kevin-wk sorry, 5
23:43 kevin-wk 1 pillar, 2 states, 2 sets of output (1 good, 1 bad)
23:43 Ch3LL ascolaro: I'm not sure how to handle that. let me see if i can't find something real quick though
23:44 kevin-wk it reordered them in a suboptimal presentation though - perhaps i should prefix them 01, 02, etc
23:44 iggy kevin-wk: yeah, I see that now, I saw some commands and some files and was having trouble figuring out what was what... got it now
23:44 kevin-wk cool
23:45 Christian___ Does anyone know a workaround when salt-key doesn't work or how to troubleshoot? Don't see anything in logfiles, even when 'garbage' is configured
23:46 Ch3LL Christian___: if i recall correctly salt-key just merely copies the keys to the appropriate folder in /etc/salt/pki/master
23:48 iggy kevin-wk: can you try salt['pillar.get']('sssd-cacerts') instead of pillar['sssd-cacerts']?
23:48 iggy I think it should not error out, but not work either
23:49 Christian___ Ch3LL: That's all? Thank's! I'll try a manual copy to the 'minions' folder
23:49 kevin-wk iggy: makes sense.  trying now.
23:50 Ch3LL Christian___ if you really think salt-key isn't working though i would file and issue or see if there is one already open on github
23:51 kevin-wk iggy: it still bombs out, but with a different error: Rendering SLS 'dev:config.sssd' failed: Jinja variable salt.utils.templates.AliasedLoader object has no element <built-in method get of dict object at 0x210e850>
23:51 hemebond kevin-wk: You got a hyphen in your Pillar key?
23:51 iggy well... now you've got a very specific error to google
23:51 kevin-wk hemebond: yes
23:51 hemebond Got quotes around that key?
23:51 kevin-wk state.show_sls bombs out too with same error now, whereas before it worked
23:52 iggy problem solved!
23:53 bfoxwell joined #salt
23:53 kevin-wk maybe i'm slow today, i don't understand the fix
23:53 Christian___ Ch3ll: problem solved! Thanks! I'll check github and file the issue if it isn't listed yet
23:54 Ch3LL Christitan___: i'm glad it worked :)
23:54 kevin-wk oh
23:54 iggy kevin-wk: put quotes around the key name (possibly in the contents_pillar lines)
23:55 kevin-wk no go
23:55 iggy hemebond: isn't there an issue for that?
23:55 hemebond iggy: Yes, there is a bug that mentions it.
23:55 hemebond I believe it's a YAML thing.
23:56 hemebond Possibly not a bug.
23:56 kevin-wk i wonder why it works on my CentOS 6 systems then
23:56 kevin-wk if i just rename my pillar 'sssd-cacerts' to 'sssdcacerts' you think i'll have better luck?
23:57 hemebond Avoiding hyphens will help, yes.
23:57 hemebond I generally stick to underscores, just like Python.
23:57 iggy ^
23:57 iggy murrdoc makes me do it too
23:58 kevin-wk no luck
23:58 kevin-wk let me go back from salt[pillar.get]('item') to pillar['item']
23:58 cliluw joined #salt
23:59 hemebond kevin-wk: Try salt['pillar.get']('item', 'novalue!!')
23:59 hemebond Then you'll get no error but will have the wrong value.
23:59 hemebond Just to make sure it's not your template or something else getting in the way.
23:59 Rumbles joined #salt

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