Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-08-20

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

All times shown according to UTC.

Time Nick Message
00:02 Psi-Jack salt -C '* and not G@roles:mail' test.ping
00:04 DanGarthwaite joined #salt
00:05 DanGarthwaite 0.16.3?  I've for some CHANGELOGs to read.
00:05 sleek joined #salt
00:05 pjs joined #salt
00:12 auser joined #salt
00:17 StDiluted joined #salt
00:23 scalability-junk anyone with access to saltdocs? there is a typo in http://docs.saltstack.com/topics/conventions/formulas.html
00:28 joehh scalability-junk: they're in the salt repo, a pull request usually gets in pretty quickly
00:28 scalability-junk joehh: then I'm off to make a pr
00:29 joehh otherwise just an issue on github and one of the devs is likely to fix it pretty quickly
00:31 scalability-junk done
00:31 scalability-junk -> PR
00:33 dthom91 joined #salt
00:44 joehh great!
00:45 liuyq joined #salt
00:45 joehh scalability-junk: looks like UtahDave has already merged it
00:49 LordOfLA joined #salt
00:54 jkleckner joined #salt
00:54 StDiluted joined #salt
01:10 chrisgilmerproj joined #salt
01:17 kenbolton joined #salt
01:19 renothing joined #salt
01:21 rustyrazorblade joined #salt
01:26 Nexpro joined #salt
01:34 liuyq joined #salt
01:35 m_george|away joined #salt
01:36 druonysus joined #salt
01:36 druonysus joined #salt
01:38 hernantz joined #salt
01:40 dthom91 joined #salt
01:40 DanGarthwaite joined #salt
01:41 DanGarthwaite left #salt
01:41 malinoff joined #salt
01:48 liuyq joined #salt
01:58 Gifflen joined #salt
02:01 avienu joined #salt
02:05 jacksontj anyone still online? question about auth system...
02:09 aat joined #salt
02:09 xl1 joined #salt
02:10 dthom91 joined #salt
02:10 Furao joined #salt
02:21 malinoff jacksontj: i am :)
02:21 jacksontj in the auth system it writes the minion's public key to disk on EVERY request-- any reason? as far as i can tell its just an oversight...
02:22 jacksontj i'm testing the change locally
02:23 jacksontj if it doesn't break anything i'm going to submit a pull req
02:23 jacksontj i've been noticing lots of disk activity on the master
02:25 techdrag_ joined #salt
02:25 malinoff jacksontj: Interesting. At first, try to ask in Salt-users google group. Maybe there is some reason to do that.
02:27 techdrag_ Any recommended guides for how to have a salt master's configs all in a git repo? … Im trying to make the jump from manually synchronising the master's salt and pillar dirs from my workstation with rsync after committing changes to the git repo.
02:28 suodla_ joined #salt
02:29 jacksontj there are modules for pillar and the file_roots to be in git
02:29 geopet joined #salt
02:31 techdragn jacksontj: i did see the modules, but i was hoping for a guide on how to start using them, explaining how they work vs 'dir on disk' as the source, etc
02:32 capricorn_1 joined #salt
02:32 Furao_ joined #salt
02:34 dthom91 joined #salt
02:34 honestly how do I make salt run commands reliably?
02:35 honestly I usually only get job feedback from half the minions
02:35 jacksontj techdragn: i think there is something like that… let me dig
02:36 techdragn jacksontj thanks
02:36 jacksontj honestly: usually the "unreliable" return is because there is some latency in getting the responses-- is your master really busy?
02:36 honestly jacksontj: no
02:36 suodla joined #salt
02:36 jacksontj techdragn: https://salt.readthedocs.org/en/latest/topics/tutorials/gitfs.html
02:36 jacksontj that will get you started with the gitfs_remotes for the file_roots
02:36 jacksontj i didn't write one for my git_pillar thing ;)
02:36 honestly but I'm doing things like salt '*' cmd.run 'apt-get update'
02:37 KyleG joined #salt
02:37 KyleG joined #salt
02:37 honestly which takes a while to return
02:37 jacksontj oh-- so then it might just be the CLI timing out
02:37 jacksontj have you passed in --timeout 60  or something?
02:37 jacksontj i believe the default timeout is 30s
02:37 whit joined #salt
02:37 honestly ok
02:37 jacksontj (on a side note-- i'd use the pkg module instead of cmd.run directly)
02:37 honestly I'll try that
02:38 honestly yeah, aware
02:38 honestly I'm just testing things here
02:38 jacksontj just FYi the timeout doesn't stop the job from running on the minion
02:38 honestly ok
02:38 jacksontj just will stop printing the responses to the cli
02:38 honestly right
02:38 honestly how do I find the job report?
02:38 jacksontj if you have the job id you can find it in the job cache-- and they'll all get there eventually ;)
02:38 jacksontj if you control-c out of the command it prints out the command for you
02:38 honestly hm
02:39 honestly will --async print the job id too?
02:39 jacksontj i believe so
02:39 jacksontj salt-run job.lookup_jid ID
02:39 honestly yeah
02:41 honestly hmm
02:41 honestly so I did that
02:41 honestly and it reported all minions finished except one after a while
02:41 honestly oh, last one is done too now
02:42 jacksontj the pub/sub stuff is a bit odd to get used too ;)
02:42 honestly is there a way to "attach" to the job while it's running?
02:42 jacksontj i*to
02:42 jacksontj what do you mean by attach? getting output is easy
02:43 jacksontj the salt api lets you grab it easily
02:44 honestly the minion will deliver the report when it's done, right?
02:44 jacksontj yes-- unless it dies
02:44 honestly yeah
02:44 jacksontj in my experience even if you bounce the master ;)
02:44 honestly so there's no way to go in and check wtf it's doing right now while waiting for the return
02:44 jacksontj as in which jobs are active?
02:45 jacksontj or you want to know what each minion is doing?
02:45 honestly well, what the minion that hasn't returned yet is doing
02:45 jacksontj yea-- no way of knowing besides looking at logs
02:45 honestly ok
02:46 jacksontj getting status of live running jobs across a lot of minions doesn't scale well ;)
02:46 honestly if I do pkg.install without arguments is that equivalent to apt-get upgrade?
02:47 StDiluted joined #salt
02:48 jacksontj no, pkg.install requires at least 1 arg (package name)
02:48 jacksontj which will update it
02:48 jacksontj you want to do pkg.upgrade to upgrade verything
02:48 jacksontj http://docs.saltstack.com/ref/modules/all/salt.modules.apt.html#salt.modules.apt.upgrade
02:53 EugeneKay joined #salt
02:54 honestly I don't want to run dist-upgrade
02:56 capricorn_1 joined #salt
02:59 jacksontj yea… that wouldn't be the best
02:59 jacksontj i'm a little suprised there isn't a flag to turn that off
02:59 jacksontj :/
02:59 honestly it looks like dist-upgrade is sort of the right choice
02:59 honestly it's the sledgehammer...
03:00 jacksontj yea, i'd expect something like dist-upgrade=False
03:00 jacksontj then you just do upgrade
03:01 dthom91 joined #salt
03:02 honestly well, this is fun
03:02 jacksontj that should be easy to add, just an option which changes the command there to get the list of upgrades
03:02 honestly it installed rpm
03:02 jacksontj ?
03:03 honestly well
03:03 honestly it upgraded rpm
03:03 honestly weird...
03:04 jacksontj very weird
03:06 honestly ugh, how do I check if a package is installed?
03:06 honestly I usually use aptitude show but I don't have that on the minions
03:06 jacksontj list_pkgs will show all of them
03:06 jacksontj if you want a single package-- use pkg.version PKGNAME
03:07 Ryan_Lane joined #salt
03:07 honestly hmm
03:07 honestly rpm is definitely installed on my minions
03:07 honestly but why...
03:08 jacksontj great question ;)
03:08 jacksontj i have it on all mine-- but they are RHEL
03:09 honestly yeah
03:09 honestly looks like rpm has been around on this for longer
03:11 pdayton joined #salt
03:12 cxz has anyone tried setting the hostname with salt?
03:13 jacksontj honestly: well, i'm going to head home ;) if you have problems feel free to post to the google groups or open an issue
03:25 mgw joined #salt
03:32 Jahkeup joined #salt
03:38 Nexpro1 joined #salt
03:40 whit joined #salt
03:48 middleman_ joined #salt
04:00 tomtomtomtom joined #salt
04:05 dthom91 joined #salt
04:10 waverider joined #salt
04:17 cnelsonsic joined #salt
04:18 Jahkeup joined #salt
04:23 rustyrazorblade joined #salt
04:25 aat joined #salt
04:37 carmony joined #salt
04:38 techdragon joined #salt
04:41 cxz joined #salt
04:43 rustyrazorblade joined #salt
04:44 cxz is there something along the lines of grains.set
04:44 cxz ?
04:46 malinoff cxz: http://docs.saltstack.com/ref/modules/all/salt.modules.grains.html?highlight=grains#salt.modules.grains.append
04:46 malinoff cxz: http://docs.saltstack.com/ref/modules/all/salt.modules.grains.html?highlight=grains#salt.modules.grains.setval
04:46 cxz ah cool
04:46 cxz but only in v0.17.0?
04:49 malinoff cxz: append works only in v0.17, setval is definitely works in 0.16.3
04:49 idkfa joined #salt
04:50 cxz ok
04:50 cxz would you recommend putting this in as part of a state?
04:51 cxz i'm adding grains to try and set 'production' or 'development'
04:51 cxz not ideal IMO since you want to target minions in other ways
04:55 malinoff cxz: 'putting this', you mean, setting grain value in a state?
04:55 cxz yeh
04:55 cxz and setting the deployment in general
04:55 cxz like 'production' or 'development'
04:58 malinoff cxz: Quite strange. I'd rather configure minions once by my hands, set all needed grains and thats all. If some state will change grains, there might be unexpectable targeting from top.sls files which will lead to unpredictable minion state.
05:02 cxz yes we intend to only set this once
05:04 carmony joined #salt
05:06 saurabhs joined #salt
05:09 malinoff joined #salt
05:09 saurabhs joined #salt
05:15 xl1 joined #salt
05:23 jacksontj joined #salt
05:25 jacksontj_ joined #salt
05:30 dthom91 joined #salt
05:30 Katafalkas joined #salt
05:34 Katafalkas joined #salt
05:50 Jahkeup joined #salt
05:59 SpX joined #salt
06:03 gildegoma joined #salt
06:10 az87c joined #salt
06:11 matanya joined #salt
06:11 az87c_ joined #salt
06:14 liuyq joined #salt
06:16 Katafalkas joined #salt
06:24 unicoletti_ joined #salt
06:28 vaxholm_ joined #salt
06:31 tseNkiN joined #salt
06:45 Katafalkas joined #salt
06:55 george_torwell1 joined #salt
06:56 david_a joined #salt
06:58 balboah_ joined #salt
07:03 ml_1 joined #salt
07:03 MrTango joined #salt
07:06 bemehow joined #salt
07:08 tuxIO joined #salt
07:09 vaxholm_ joined #salt
07:10 BbT0n joined #salt
07:12 lempa joined #salt
07:18 Katafalkas joined #salt
07:18 y0j joined #salt
07:21 bemehow_ joined #salt
07:21 felixhummel joined #salt
07:28 bemehow joined #salt
07:36 ollins joined #salt
07:43 it_dude joined #salt
07:49 TheCodeAssassin joined #salt
07:49 TheCodeAssassin hi everyone
07:54 syngin TheCodeAssassin: hello
07:54 TheCodeAssassin hi syngin
07:54 TheCodeAssassin do you know how salt:// paths work in a masterless setup?
07:55 chuffpdx_ joined #salt
07:55 syngin nope. i don't know anything about masterless.
07:55 TheCodeAssassin i followed this guide: http://docs.saltstack.com/topics/tutorials/quickstart.html and i want to manage a file
07:55 vaxholm_ joined #salt
07:55 TheCodeAssassin oke hehe
07:55 TheCodeAssassin np
07:55 syngin try me anyway.
07:55 syngin salt://foo normally maps to /srv/salt/foo
07:56 TheCodeAssassin oww
07:56 TheCodeAssassin so the file_root basically?
07:56 syngin yep
07:56 TheCodeAssassin https://gist.github.com/thecodeassassin/f768f7f7e8a04a14fe81
07:56 TheCodeAssassin this is my sls
07:56 syngin right
07:57 TheCodeAssassin packages wont install for some reason
07:57 syngin how are you exectuing that state?
07:58 TheCodeAssassin salt-call --local state.highstate -l debug
07:59 syngin and that gist is called what?
07:59 syngin i.e., is that your top.sls?
07:59 TheCodeAssassin no
07:59 TheCodeAssassin https://gist.github.com/thecodeassassin/a0e1d32b9d10b82635a4
07:59 TheCodeAssassin this is my top.sls
07:59 syngin so that first gist is baseserver/init.sls ?
08:05 TheCodeAssassin uhm
08:05 TheCodeAssassin no baseserver.sls
08:05 TheCodeAssassin should i put it in baseserver/init.sls ?
08:05 syngin no no, that's fine.
08:05 syngin hmm
08:05 syngin no errors when you execute?
08:07 TheCodeAssassin well just says it did not install the packages
08:07 syngin paste?
08:08 zooz joined #salt
08:12 Xeago joined #salt
08:12 TheCodeAssassin moment
08:12 TheCodeAssassin :)
08:16 waverider joined #salt
08:19 TheCodeAssassin kind of messed up bootstrap script
08:21 Katafalkas joined #salt
08:22 scott_w joined #salt
08:25 SpX joined #salt
08:29 agend joined #salt
08:34 waverider joined #salt
08:37 TheCodeAssassin ok syngin
08:37 TheCodeAssassin https://gist.github.com/thecodeassassin/c2f21c80945684f4b466
08:40 zooz joined #salt
08:40 TheCodeAssassin i got the syntax from here: https://salt.readthedocs.org/en/latest/ref/states/all/salt.states.pkg.html
08:42 syngin so if you manually try to install one of those packages, it works?
08:42 syngin (as root)
08:42 TheCodeAssassin yup
08:42 syngin hmm
08:42 TheCodeAssassin sudo apt-get install nginx -y works
08:43 syngin and that's the command being run by salt on the minion i guess (i don't use an apt-get distro)
08:44 syngin weird man.
08:44 TheCodeAssassin maybe my syntax is not correct
08:44 syngin imma go home now, so i can't help any further, but i'd be looking to find out what salt is running on the minion when it tries to install those packages.
08:45 syngin there's no proxy involved for your internet access, is there?
08:46 syngin and that's the format i use for my packages; works fine (pkg.installed: - pkgs...)
08:47 TheCodeAssassin think i found the problem
08:47 linjan joined #salt
08:47 TheCodeAssassin pkgrepo.managed:
08:47 TheCodeAssassin - ppa: ppa:sjinks/phalcon
08:47 TheCodeAssassin but now i dont know how to add a ppa other then doing it manually hehe
08:47 unicoletti_ joined #salt
08:52 carlos joined #salt
08:56 mike25ro joined #salt
09:17 TheCodeAssassin damn salt kicks ass
09:22 logix812 joined #salt
09:32 Katafalkas joined #salt
09:35 bhosmer joined #salt
09:40 xl1 joined #salt
09:49 knightsamar joined #salt
09:50 knightsamar hi, are there any plans of including nanomsg with next release of salt instead of zeromq ?
09:51 renothing joined #salt
09:51 knightsamar i know the release is alpha...but i just wanted to know salt dev thoughts :)
09:56 TheCodeAssassin guys :) i am doing git.latest on a new minion
09:56 TheCodeAssassin https://gist.github.com/thecodeassassin/caccfa3c941a7587c944
09:56 TheCodeAssassin but since this repo is public i dont really want to ship a public key with it
09:56 TheCodeAssassin is there a solution to this ?
10:00 bemehow_ joined #salt
10:03 knightsamar TheCodeAssasin: do you mean that since the repo is private, you don't want to put the public key somewhere in salt config ?
10:04 TheCodeAssassin no repo is public, but i figured it out, still having some weird issue
10:05 TheCodeAssassin https://gist.github.com/thecodeassassin/76cbd26347fcf27a4220
10:05 TheCodeAssassin this is in the init.sls
10:05 bogdanbu joined #salt
10:05 TheCodeAssassin weird thing is the first time i run it i get an error
10:06 TheCodeAssassin Comment:   State git.latest found in sls baseserver is unavailable
10:06 TheCodeAssassin 2nd time i run it, it clones
10:09 matanya joined #salt
10:28 whiskybar joined #salt
10:31 jeddi Did this come up alraedy?  Are we going to jump onto it?  ;)   http://www.freelists.org/post/nanomsg/nanomsg-01alpha-released
10:31 jeddi knightsamar: ah - i see you mentioned the thing (i scanned back thru the log looking for links)
10:32 jeddi the story a few days ago about c++ being a regrettable language of choice for 0mq was an interesting read.
10:34 knightsamar :)
10:35 giantlock joined #salt
10:42 david_a joined #salt
10:51 scalability-junk jeddi: so it's basicly 0mq rewritten with all mistakes already taken into account?
10:54 blee joined #salt
10:56 scott_w joined #salt
10:58 lemao joined #salt
10:58 scalability-junk joehh: yeah merge requests are accepted fast.
10:59 joehh scalability-junk: nice pick up - took me awhile to see what the diff actually was
11:00 mikedawson joined #salt
11:00 scalability-junk Thanks.
11:00 it_dude joined #salt
11:04 bemehow joined #salt
11:04 bhosmer joined #salt
11:04 joehh anyone used user.present on windows lately?
11:04 joehh getting an exception about createhome
11:18 Nexpro1 joined #salt
11:28 backjlack joined #salt
11:30 TJ1980 joined #salt
11:39 unicoletti_ left #salt
11:42 Katafalkas joined #salt
12:04 bogdanbu hi there ! i want to use salt to install more instances of tomcat on the same linux machine. in each instance i want to deploy the same app but personalised for a new client. i don't' know where to start :) any hints are welcome.
12:15 oz_akan_ joined #salt
12:16 joehh bogdanbu: I suspect you need to use pillar data and probably loop over the states you need based on the data in pillar
12:16 Furao bogdanbu: start with just one, then learn about pillar
12:16 bogdanbu thanks, i found this https://groups.google.com/forum/#!msg/salt-users/VeMLKRY_IWc/95vKx6YjOFQJ
12:17 oz_akan_ joined #salt
12:17 bogdanbu i think is very close … to what i'm trying to do
12:18 joehh I was just about to paste that link
12:18 bogdanbu :)
12:19 joehh This is probably more advanced, but worth a read: http://dev.mlsdigital.net/posts/SaltStackBeyondJinjaStates/
12:19 joehh also https://gist.github.com/UtahDave/3785738, but for users
12:20 bogdanbu nice, thank you !
12:26 bogdanbu i was about to make a state for each instance …
12:27 bogdanbu but is more interesting to make a loop based on data in pillar
12:28 bhosmer joined #salt
12:28 anteaya joined #salt
12:29 Katafalkas joined #salt
12:29 Katafalkas joined #salt
12:30 vaxholm_ joined #salt
12:32 Furao bogdanbu: duplication = evil
12:33 xmj deduplication = more evil (when combined with low ram)
12:34 waverider joined #salt
12:43 djn joined #salt
12:45 juicer2 joined #salt
12:46 TJ1980 joined #salt
12:50 djn joined #salt
12:52 djn joined #salt
12:55 jefferai joined #salt
13:03 Kraln- joined #salt
13:06 kenbolton joined #salt
13:11 Gifflen joined #salt
13:13 jgelens On salt-master I've got 2 file_roots defined. Is it possible to define in the minion config, which one to use?
13:14 jgelens I've tried to set 'environment', but highstate still picks up everything in all file_roots. So probably it's for something else.
13:14 p3rror joined #salt
13:14 aat joined #salt
13:18 jgelens And with multiple file_roots I mean multiple base entries
13:19 jkleckner joined #salt
13:25 sgviking joined #salt
13:26 sgviking joined #salt
13:28 mike25ro jgelens:  i think salt looks from top to bottom ... and where it finds the required file... that is what you get.
13:29 jgelens I will explain better, I have the following:
13:29 jgelens pillar_roots:
13:29 jgelens base:
13:29 jgelens - /set/pillar
13:29 jgelens base_v2:
13:29 jgelens - /set/pillar
13:29 jgelens uhm sorry
13:29 jgelens file_roots:
13:29 jgelens base:
13:29 jgelens - /set/salt
13:29 jgelens base_v2:
13:29 jgelens - /set/salt_v2
13:29 jgelens Now I want to define per minion which base to use
13:30 jgelens mike25ro: how can I do that?
13:30 mike25ro erm... good Q... not sure if possible...
13:30 mike25ro i am also a newbie... didn't use more than one root...
13:30 jgelens ah ok
13:30 jgelens possibly I'm doing it wrong :P
13:32 toastedpenguin joined #salt
13:34 jacques__ joined #salt
13:35 jgelens mike25ro: got it, base is always the default, so just had to rename it to base_v1
13:38 jps_manta I would like to define multiple "file" states, but keep getting the following: Name "file" in sls "apt" contains multiple state decs of the same type
13:38 Furao jps_manta: use multiple id
13:38 jps_manta i have this:
13:38 jps_manta /etc/apt/sources.list:
13:38 jps_manta file:
13:38 jps_manta - managed
13:38 jps_manta - source: salt://apt/sources.list
13:38 jps_manta - template: jinja
13:38 jps_manta - mode: 644
13:38 jps_manta - user: root
13:38 jps_manta - group: root
13:38 Furao don't paste here
13:38 jps_manta - require:
13:38 jps_manta - pkg: apt
13:38 jps_manta /etc/apt/sources.list.d:
13:38 jps_manta file:
13:39 jps_manta - managed
13:39 Furao KICK
13:39 jps_manta - directory
13:39 Furao please
13:39 jps_manta - recurse
13:39 jps_manta - require:
13:39 jps_manta - pkg: apt
13:39 jps_manta sry
13:39 jps_manta where can I paste?
13:39 racooper joined #salt
13:39 Furao jps_manta: http://bit.ly/13CtV6k
13:40 jps_manta aah, my bad
13:40 mikedawson joined #salt
13:40 cron0 joined #salt
13:40 jps_manta http://pastie.org/8253450
13:41 bemehow_ joined #salt
13:41 Furao line14 and line 15 are 2 separate function of module file
13:41 SEJeff_work jps_manta, paste flooding is poor irc netiquette. Thanks for pointing him in the right direction Furao
13:42 jps_manta noted, thx
13:42 japage joined #salt
13:42 Furao jps_manta: some example of what you try to do https://github.com/bclermont/states/blob/master/states/diamond/init.sls
13:43 jps_manta will try and figure it out, thx
13:44 Furao if you want a directory remove line 14
13:44 whit joined #salt
13:44 jps_manta hah, got it
13:45 jps_manta good example though
13:45 napperjabber joined #salt
13:47 Furao there is plenty of examples in that repo, they're just not updated anymore. don't use some new salt features
13:58 aat joined #salt
14:00 mannyt joined #salt
14:03 KennethWilke joined #salt
14:03 Tekni joined #salt
14:04 mwillhite joined #salt
14:05 mwillhite I have a vagrant box that will have several ruby/rails apps inside of it (using rvm gemsets)…Im working on setting up one of these apps right now. whats the best way to install the gems in the correct gemset?
14:09 KennethWilke mwillhite: I don't have any personal experience to lean on for that, but the rvm gem module looks like it should be capable of what you're looking to do: http://docs.saltstack.com/ref/states/all/salt.states.rvm.html#module-salt.states.rvm
14:09 ipmb joined #salt
14:11 mwillhite KennethWilke thanks, I'm still pretty new at this, and I don't quite understand how to translate the docs. for example…there is a command called salt.modules.gem.install, how does that translate to my .sls file?
14:12 opapo joined #salt
14:12 KennethWilke the top part is largely an example of the sls file, and the two functions below it show what capabilities the rvm state module has
14:13 KennethWilke let me try to find a link to something that describes the sls structure well
14:14 mwillhite looking at this: http://docs.saltstack.com/ref/modules/all/salt.modules.gem.html
14:14 mwillhite i can specify the ruby version and gemset here
14:15 mwillhite if I can figure out how the docs translate to sls then I can install bundler
14:15 mwillhite then use cmd to 'bundle' from there
14:15 mwillhite …I think…
14:15 KennethWilke yeah i think so too, http://docs.saltstack.com/topics/tutorials/states_pt1.html#create-an-sls-module
14:15 mike25ro left #salt
14:16 KennethWilke this kinda gets you familiar with the format of the sls files, that at the top level is an ID, then a state then functions available from that state
14:16 KennethWilke the full long name you see in the docs is how it looks in the structure of python, but since you're using yaml it's a bit abstracted
14:17 mwillhite so something like: http://pastebin.com/hVGREnKT
14:18 quantumsummers|c joined #salt
14:18 quantumsummers|c joined #salt
14:18 KennethWilke sorry http://docs.saltstack.com/ref/states/all/salt.states.gem.html#module-salt.states.gem is a bit better than the rvm one for this :)
14:18 KennethWilke i realized that when i saw your pastebin
14:19 mwillhite ah interesting…
14:19 KennethWilke http://pastebin.com/1xZ2qd4r i think may be what it'd be like
14:19 KennethWilke in the simplest way
14:20 mwillhite yeah this makes a lot more sense
14:20 mwillhite thanks
14:20 KennethWilke so the installed function under the gem state module will by default use the top level id as the first argument
14:20 techdragon joined #salt
14:20 KennethWilke you're welcome
14:21 mgw joined #salt
14:21 mwillhite is that a common pattern that the name of the id is the first argument?
14:23 jacques joined #salt
14:24 Jahkeup joined #salt
14:24 jacques_ joined #salt
14:25 KennethWilke mwillhite: yeah, i expect that to be true in most cases
14:25 KennethWilke it can be overridden using - name: <stuff> in the args for the function
14:26 mwillhite ok thanks for the help!
14:26 KennethWilke no problem
14:28 kaptk2 joined #salt
14:31 it_dude joined #salt
14:31 danielbachhuber joined #salt
14:33 Morty_ joined #salt
14:37 jps_manta joined #salt
14:38 Khollowa_ joined #salt
14:39 saurabhs joined #salt
14:40 m_george left #salt
14:41 jps_manta I am trying to implement something similar to what is being described here: https://github.com/saltstack/salt/issues/663
14:41 jps_manta my question is, how do you define the "file" state?
14:42 jps_manta ...with the asterisk that is...
14:47 teskew joined #salt
14:47 BrendanGilmore joined #salt
14:48 whit joined #salt
14:49 ckao joined #salt
14:49 cowmix joined #salt
14:49 mmarch joined #salt
14:51 mgw joined #salt
14:52 pdayton joined #salt
14:54 jps_manta although http://pastie.org/8253672 works, it does not detect new files...
14:58 KennethWilke jps_manta: i believe it'll only detect them if they are being managed by salt, and included in the same state run
14:59 KennethWilke and it'll only trigger a watch if salt edits the file
15:01 mikedawson joined #salt
15:03 conan_the_destro joined #salt
15:04 napperjabber joined #salt
15:05 faldridge joined #salt
15:06 bhosmer joined #salt
15:07 mmilano joined #salt
15:08 vaxholm_ joined #salt
15:10 whiskybar joined #salt
15:11 forrest joined #salt
15:16 bhosmer joined #salt
15:16 StDiluted joined #salt
15:18 jps_manta KennethWilke: thank you, that is what I thought...
15:18 KennethWilke you're welcome
15:19 mwillhite joined #salt
15:19 UtahDave joined #salt
15:22 geopet joined #salt
15:23 lazyguru joined #salt
15:23 timl0101 joined #salt
15:24 xinkeT joined #salt
15:28 forrest Hey UtahDave, did you have a chance to hit up Tom regarding his ideas about the continuation of jobs after a reboot?
15:30 chrisgilmerproj joined #salt
15:32 bhosmer joined #salt
15:35 jps_manta left #salt
15:36 bemehow joined #salt
15:43 mwillhite how do I run cmd from a specific directory?
15:43 DerekRBN joined #salt
15:43 mwillhite for example…trying run `bundle` from a submodule
15:45 KyleG joined #salt
15:45 KyleG joined #salt
15:46 mwillhite …think I found it…cwd
15:46 bemehow_ joined #salt
15:46 UtahDave forrest: not yet. He was in training new employees all day yesterday.
15:46 UtahDave mwillhite: yep, cwd
15:46 forrest UtahDave, ahh ok
15:46 Jahkeup joined #salt
15:47 bemehow__ joined #salt
15:50 UtahDave forrest: We'll get to it soon
15:51 forrest UtahDave, no rush man. I was just curious if we had missed something that was the obvious answer.
15:53 hazzadous joined #salt
15:55 geopet Good morning
15:55 UtahDave morning!
15:55 geopet I've been playing around with SaltStack a bit and I participated in the Salt Sprint a few weeks ago and learned a lot there.
15:56 geopet But I think I'm missing something in how to understand the documentation and how to use some of Salt's stronger functionality,
15:56 teebes joined #salt
15:56 UtahDave Ah, cool!  Which location were you at for the Sprint?
15:56 geopet I was in Albuquerque.
15:56 UtahDave nice!
15:56 geopet It was awesome.
15:56 geopet I learned a ton.
15:56 geopet And I have the basics.
15:56 kermit joined #salt
15:56 geopet I *think* :)
15:57 geopet But reading the docs I want to be able to implement what I'm reading in the module sections as a Salt State and I'm not seeing the best way to convert the CLI examples to sls examples.
15:57 geopet Does that make sense?
15:58 UtahDave geopet: Can you paste a link of what  you're looking at?
15:58 geopet For example, I want to be able to built out a vagrant using salty-vagrant and have rbenv just installed with the right ruby in place.
15:58 geopet Sure!
15:58 geopet Here's the rbenv module docs:
15:58 geopet http://docs.saltstack.com/ref/modules/all/salt.modules.rbenv.html#module-salt.modules.rbenv
15:58 jkleckner joined #salt
15:58 StDiluted hey geo
15:58 UtahDave Ah, ok.
15:58 brew joined #salt
15:59 UtahDave geopet: So you're looking at the modules.  When you're writing an sls file you want to use the states.
15:59 geopet Here are the state's docs: http://docs.saltstack.com/ref/states/all/salt.states.rbenv.html
15:59 geopet Hi, StDiluted!
15:59 UtahDave http://docs.saltstack.com/ref/states/all/salt.states.rbenv.html#module-salt.states.rbenv
15:59 UtahDave oh, ok. you did find that
16:00 geopet So there isn't a 1 to 1 between modules and states apis?
16:00 UtahDave geopet: so are those examples there on that state page not working for you?
16:00 geopet Something about the gmake and the curl install that breaks when I attempt to state.highstate
16:02 UtahDave can you pastebin the error you're seeing?
16:02 geopet You bet. Give me a moment to recreate it. :)
16:02 faldridge_ joined #salt
16:05 StDiluted geo: I got around the ruby question and having compile tools on my minions by building a package up front and using fpm to build a package which gets pushed out
16:05 troyready joined #salt
16:06 SEJeff_work UtahDave, http://www.freelists.org/post/nanomsg/nanomsg-01alpha-released
16:06 bhosmer joined #salt
16:06 SEJeff_work Longer term for salt, it might be nifty to support > 1 library. Since it not supports zmq and ssh
16:06 SEJeff_work Have the transport pluggable just like the rest of salt
16:06 jalbretsen joined #salt
16:08 geopet StDiluted: Right! That was awesome. But part of the reason I want to learn how to do this is to create a vagrant dev environment that I can customize depending on what ruby I may need for a particular project. Having the configuration options for that would be really valuable to me.
16:10 StDiluted sure
16:12 geopet Here's the paste bin with the error
16:12 geopet http://pastebin.com/FQLaL8un
16:14 geopet I'm essentially pasting in the exact sls from the documentation. I must be missing something. :)
16:15 whiskybar joined #salt
16:16 UtahDave geopet: can you verify that each of those packages is the actual package name on the OS you're using?
16:16 geopet With the dependencies in the rbenv-deps installed packages, do I need to make separate sls files for them as well?
16:17 geopet Sure… I'll check.
16:17 bwq hi
16:17 bwq any cool tutorials for setting up salt for high availability?
16:17 geopet This is ubuntu 12.04 LTS
16:17 geopet But I'll make sure that I can get them through apt.
16:18 UtahDave bwq: This might help: http://docs.saltstack.com/topics/tutorials/multimaster.html?highlight=multi%20master
16:19 jslusher joined #salt
16:19 bogdanbu joined #salt
16:19 bwq nice, thank you
16:19 brianhicks joined #salt
16:20 jslusher I'm having trouble getting a grain I added to a minion to show up on its master. I can see the grain when I run a salt-call on the minion, but when I run a grains.items command on the master, it doesn't show.
16:20 UtahDave bwq: It's also possible to set up several masters behind a vip
16:20 jslusher I've tried restarting the minion
16:20 jslusher the minion service that is
16:20 bwq a vip?
16:20 UtahDave bwq: virtual ip
16:21 bwq ah
16:21 UtahDave jslusher: what's the command you're running from the master?
16:21 jslusher I've also run a salt 'minion' saltutils.sync_grains
16:21 dthom91 joined #salt
16:21 jslusher salt 'minion' grains.items
16:21 geopet UtahDave: looks like gmake is the problem there.
16:22 StDiluted geopet: you don't have build tools installed
16:22 StDiluted maybe?
16:22 jslusher UtahDave: I've set other custom grains that are present in the minion file that show up, but those were set during the deployment using salt-cloud
16:22 jslusher UtahDave: the grain I'm setting is in /etc/salt/grains
16:22 avienu joined #salt
16:23 geopet StDiluted: Okay! Awesome. So I'll add those as part of the dependencies and make sure that's in place before building rbenv?
16:23 jslusher UtahDave: does it matter that there are grains in two places?
16:23 UtahDave jslusher: one can overwrite the other.
16:23 StDiluted geopet: maybe add the build-essential package as a core [art of your state?
16:23 StDiluted part
16:24 jslusher UtahDave: I would like to keep the grains I have in /etc/salt/minion
16:24 geopet StDiluted: So add that to my top.sls? (Sorry, still learning the lexicon of Salt.)
16:24 jslusher UtahDave: does that mean that any subsequent grains must go there?
16:25 jimallman joined #salt
16:25 StDiluted geopet: the way I do it is that I have a bunch of 'core' stuff that goes on every machine, and it's in a core.sls in /srv/salt/ and I have a line that's just '- core' in my top.sls under the '*' heading
16:26 geopet StDiluted: Nice! Right! I remember you showing me that at the Salt Sprint.
16:26 mgw joined #salt
16:27 StDiluted rbenv actually builds ruby from scratch
16:27 StDiluted so you have to have compile tools installed
16:28 geopet Absolutely, but from what I read in the docs, it sounded like that would be taken care of through this call.
16:28 geopet "Rbenv will be installed automatically the first time it is needed and can be updated later."
16:28 geopet I'm definitely expecting Salt to do more than I think it should be.
16:28 geopet :)
16:29 StDiluted This module will not automatically install packages which rbenv will need to compile the versions of ruby.
16:30 geopet So each of those arguments in the pkg.installed in that state documentation for rbenv needs to be installed before I call the rbenv install.
16:30 geopet Cool!
16:30 geopet That's super helpful.
16:31 geopet So it is up to me to figure out what something like rbenv will need and make sure that those dependencies are added before I call it in my build, right?
16:31 StDiluted build-essential should take care of it
16:31 geopet Excellent
16:31 StDiluted it's a meta-package
16:31 geopet I'll add it to a core.sls as you suggest.
16:32 erchn joined #salt
16:33 bhosmer joined #salt
16:33 StDiluted UtahDave: something weird with the docs on RTD. Dunno if that's something you guys care about
16:33 erchn I have an issue, which is resolvable via Jinja templating but would like to know if anyone else has a solution.  I have a custom grain which sets a grain called "location" to a given value.  In my top.sls file under salt/base, I reference that variable.  But on initial install or download, if it's not set the top.sls file fails to render.
16:34 StDiluted I was looking for the docs on salt.states.file but it's messed up on that server
16:34 StDiluted erchn: I have had the same issue. I have to sync_grains first
16:34 erchn I thought I tried that, hmm
16:35 UtahDave StDiluted: what's up with the docs on RTD?
16:35 StDiluted custom grain is not on the minion when you first install salt
16:35 StDiluted it gets copied up on the first time you highstate or sync
16:36 StDiluted UtahDave: https://salt.readthedocs.org/en/latest/ref/states/all/index.html
16:36 UtahDave erchn: you would need to use the .get method of the grains dictionary so it doesn't stacktrace when it doesn't exist
16:36 UtahDave StDiluted: What's wrong there?
16:36 druonysus joined #salt
16:36 druonysus joined #salt
16:36 StDiluted UtahDave: bunch of states are missing.
16:36 UtahDave which ones?
16:36 StDiluted well, they are there, however, they are missing descriptions and if you click on them they dont take you to a doc about the state
16:37 StDiluted ex: file
16:37 UtahDave heh, interesting. goes to the python file module docs.
16:37 UtahDave ok, I'll pass this on
16:38 UtahDave WHITEINGE!!!!!!!!!!!
16:38 whiteinge not it
16:38 StDiluted lol
16:38 UtahDave :)
16:38 erchn argh, not sure why I didn't think of that @utahdave, thanks
16:39 whiskybar joined #salt
16:39 UtahDave erchn: yeah, I ALWAYS use .get() because not using it invariably causes problems.
16:39 erchn agreed, I'm using it in a bunch of other places, but just seemed to fail here...
16:39 StDiluted :) good advice!
16:40 andredublin joined #salt
16:40 ml_1 joined #salt
16:40 craig_ UtahDave: hey... so, we are still having issues
16:40 craig_ we fixed a disk issue (write cache for the physical disks)
16:40 jeff__ joined #salt
16:40 geopet StDiluted: It helps if you use just make in the packages, too, instead of gmake. *sigh*
16:41 craig_ however, we still see a lot of writes
16:41 geopet At least for ubuntu. :)
16:41 craig_ has there evere been a discussion about moving high writes to ram disk?
16:41 craig_ eg /etc/salt/pki
16:42 jeff__ does anyone know whether you can batch something in overstate?
16:42 UtahDave StDiluted: Could you open a ticket on that?  For now use http://docs.saltstack.com/ref/states/all/index.html
16:43 jeff__ for example, i need to bring up 3 app servers all of the same type. i need one to run first, perform some sort of synchronisation and mark itself as the master. after that i want the other 2 servers to be configured as slaves from this
16:43 UtahDave StDiluted: docs.saltstack.com is the official location anyway
16:43 stack joined #salt
16:44 UtahDave craig_: Yeah, that was one of Tom's suggestions yesterday. setting up a ram disk.
16:44 brianhicks joined #salt
16:44 UtahDave craig_: also, I'm not sure if he's seen thomas jackon's pull req about not saving keys to disk all the time. I imagine that might help
16:45 UtahDave jeff__: Yeah, that's exactly what the overstate is good at. Have the first stanza set up the first server, then have the second stanza set up the other servers once the first one is successfully finished
16:46 jeff__ how can i actually split the group of servers so they get configured with one as the master and the others as slaves?
16:47 jeff__ i can target them all by a role grain for example, but can i say 'grains:role['appserver'
16:47 craig_ UtahDave: thomas sent me the link, but i dont have it right this sec :(
16:47 Xeago joined #salt
16:47 jeff__ ]grains:role['appserver'][0] for example?
16:48 craig_ would the pki dir be enough? Would that be a lion's share of writes?
16:50 UtahDave craig_: Ah, Tom actually just merged it
16:50 UtahDave craig_: https://github.com/saltstack/salt/pull/6795
16:51 jeff__ also with overstate what happens if the server isn't successfully set up? is there some equivalent of a 'catch' block that allows the system to take an action on failure?
16:51 craig_ nice!
16:51 craig_ we'll merge it into our 0.15.3 branch and get that out today
16:52 UtahDave craig_: Yeah, you'd want to consider the PKI dir.  Also, you might consider turning off the job cache.  Maybe put the job cache on ramdisk if you want it
16:52 UtahDave jeff__: I think right now the overstate stops execution so you can decide what to do.
16:53 craig_ so... the job cache makes me a little more nervous
16:53 jeff__ @utahdave: we decide manually? how can we automate an action on failure?
16:53 craig_ if the host reboots... are there consequences for losing the cache dir?
16:54 craig_ UtahDave: ^
16:54 UtahDave jeff__: It doesn't handle that case right now
16:54 jeff__ @UtahDave ok thanks
16:55 jeff__ how about selecting a subset of minions, e.g. 'role:webserver'[0]?
16:55 UtahDave jeff__: but I can definitely see a great use case for that. If you're interested, please open an issue on github asking for that feature. Include how you think it would work best
16:55 jeff__ ok
16:55 UtahDave craig_: if you  lose the job cache you just lose the history of the jobs that have been executed
16:56 craig_ ya, i'd rather keep that :/
16:56 craig_ but, the job cache shouldnt be that bad
16:57 erchn craig_: periodic rsync to disk, or is ssd not an option?
16:57 craig_ the minions dir on the other hand....
16:57 craig_ ssd *is* an option
16:57 craig_ however, we have a LOT of systems that use ssds
16:57 craig_ and we are having a problem with our vendors keeping up wiht our demand
16:57 craig_ so, that is an option, just may not happen fast enough
16:58 craig_ and we have been seing hihg-ish failures rates for our heavy read apps
16:58 craig_ high-ish*
16:58 craig_ the rsync to disk may work though
16:58 craig_ losing a few jobs... eh, worse things in life )
16:58 craig_ :)
16:58 erchn seems like failing back to once a minute rsync on the minions and a quality ssd on the master might be an answer
16:58 whiskybar joined #salt
16:59 craig_ yup. i am looking into that
16:59 erchn that's what we do with our ganglia setup
16:59 craig_ but since there are other apps that alerady have ssds backordered, we would be put last on the list
16:59 craig_ but, working the process :)
16:59 StDiluted UtahDave: yeah I can use docs.saltstack instead. You want a github issue on the RTD though?
17:01 UtahDave Yeah, it will help us remember to getting to fix it, StDiluted
17:03 micah_chatt joined #salt
17:03 micah_chatt hey guys, I'm working on a custom grain for AWS EC2 metadata, similar to how facter includes it. https://github.com/puppetlabs/facter/blob/master/lib/facter/util/ec2.rb
17:04 micah_chatt would anyone be interested in seeing a PR of it?
17:04 UtahDave micah_chatt: yeah, that would be cool.  Have you looked at the EC2 modules in salt-contrib?
17:06 micah_chatt @UtahDave no, not seen that yet
17:07 micah_chatt Thats almost what I need, but I'm implementing it more closely to how facter is - the _ec2_metadata def (https://github.com/kjoconnor/salt-contrib/blob/master/_grains/ec2.py#L19) is explicit in what attributes it pulls
17:09 UtahDave I see.
17:09 UtahDave cool
17:10 micah_chatt where this would loop through the responses from ec2, as per http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html
17:13 whit joined #salt
17:13 StDiluted micah: are you pulling just from the internal web server metadata thingie?
17:14 micah_chatt yep
17:14 micah_chatt pulling from /latest/
17:14 micah_chatt because AWS metadat is subject to change
17:15 micah_chatt StDiluted, if you curl http://169.254.169.254 from an EC2 machine, you'll see the different versions
17:18 StDiluted micah: yeah, I know about that. I have a custom grain that uses tags from it, and those are needed from the API, not in the netadata
17:18 StDiluted metadata*
17:19 dthom91 joined #salt
17:21 micah_chatt StDiluted: ah ok I think I get it
17:22 KennethWilke howdy guys, has anyone written any templates with the python renderer?
17:25 jimallman joined #salt
17:27 SunSparc joined #salt
17:28 saurabhs1 joined #salt
17:32 Katafalkas joined #salt
17:34 rustyrazorblade joined #salt
17:35 saurabhs1 left #salt
17:37 ggoZ joined #salt
17:38 Khollowa_ joined #salt
17:49 devinus joined #salt
17:49 mattbarto joined #salt
17:51 micah_chatt Does salt evaluate config files with jinja?
17:52 UtahDave micah_chatt: It can if you specify  - template: jinja
17:56 micah_chatt thank you!
18:03 aat joined #salt
18:03 [diecast] joined #salt
18:06 [diecast] for those of you with a multi-region AWS setup, how do you handle salt (multiple masters, etc)
18:08 tuxIO joined #salt
18:09 bemehow joined #salt
18:10 dthom91 joined #salt
18:11 rustyrazorblade joined #salt
18:12 Jahkeup UtahDave: I still couldn't get the _states and _modules to work yesterday, the state couldn't import the module for whatever reason
18:12 mwillhite I have config.ssh.forward_agent set to true, but I still get "Host key verification failed." when trying to pull something down from github…is there something I'm missing?
18:17 marclaporte joined #salt
18:19 teebes joined #salt
18:23 nliadm hm, slashes in branch names still don't work
18:24 farra any idea when I run a salt command against a defined node group, it returns the result from each minion and then takes an extra few seconds to drop me back to a shell prompt?  this doesn't happen if I run the same command against '*'
18:27 g4rlic joined #salt
18:27 [diecast] left #salt
18:31 g4rlic question for all of you salt masters: when checking for the service state of something that's run by xinetd, what's the best way to do that?  A coworker suggests making sure xinetd itself is running, and that the config file is present.  But I don't believe that's sufficient.  Is there a saltier way to do this, or am I looking into using grep and other *nix tools inside Salt to make the determination that say, chargen, is running?
18:31 it_dude joined #salt
18:34 auser joined #salt
18:35 aboe joined #salt
18:36 aboe is it possible to create a if statement in a sls that if other state is on minion it won't run?
18:38 ipmb joined #salt
18:40 JasonSwindle joined #salt
18:41 spudbook joined #salt
18:42 rustyrazorblade joined #salt
18:50 KyleG joined #salt
18:50 KyleG joined #salt
18:52 jpurdy_ joined #salt
18:52 [ilin] joined #salt
18:54 linjan_ joined #salt
18:56 JasonSwindle terminalmage: This maybe something to look into; https://github.com/250bpm/nanomsg
18:57 JasonSwindle The same guy that made ZMQ
18:57 KennethWilke JasonSwindle: shoo!
18:57 KennethWilke :p
18:58 JasonSwindle Never. :P
19:01 SEJeff_work JasonSwindle, I posted that this morning with the same thing. It would be nifty if the transport for salt was pluggable like all of the rest of salt
19:01 SEJeff_work use the ssh transport
19:01 SEJeff_work or the zmq transport
19:01 cnelsonsic joined #salt
19:01 SEJeff_work or the $amqp transport :D
19:01 JasonSwindle Yeah, it would be neat
19:01 KyleG joined #salt
19:01 KyleG joined #salt
19:11 bhosmer joined #salt
19:13 zooz joined #salt
19:16 dthom91 joined #salt
19:23 berto- joined #salt
19:24 UtahDave OK, back from lunch. Let me see if I can answer some of these questions
19:25 UtahDave Jahkeup: give me a few minutes and then let's see if we can get your setup working
19:26 UtahDave farra: what version of Salt are you on?
19:27 farra @UtahDave: 0.16.3
19:27 Jahkeup joined #salt
19:27 UtahDave g4rlic: if service.running isn't working by default you might have to pass it's sig so Salt can check ps:  http://docs.saltstack.com/ref/states/all/salt.states.service.html#salt.states.service.running
19:27 david_a joined #salt
19:27 Jahkeup whoops didn't mean to disconnect
19:28 terminalmage SEJeff_work: JasonSwindle: I believe that the transport will be pluggable soon
19:28 UtahDave farra: OK, so usually when Salt waits, that means it's not sure exactly how many or which minions should respond
19:28 terminalmage work that is being done to facilitate salt-ssh is making that necessary
19:29 JasonSwindle neat
19:29 terminalmage yeah, might take a couple releases for that to be a reality though
19:29 abe_music joined #salt
19:30 terminalmage salt lets you make most everything else pluggable, too, so this seems like a natural thing to do
19:33 farra @UtahDave: here is an animated gif screencast of the command run: http://d.pr/i/3v3l
19:33 farra to demonstrate what I'm running and how long the delay is
19:34 UtahDave Yeah, that's exactly what I was referring to, farra
19:34 UtahDave Since you're specifying a nodegroup, Salt should know what minions to expect a return from.  Are all minions returning?
19:34 farra they are
19:35 farra the node groups line looks like this:    engage: 'L@training,demo,qa,partners'
19:35 farra am I specifying them incorrectly?
19:35 farra those are the minion names the master recognizes
19:36 UtahDave yeah, that looks correct.
19:36 UtahDave And each minion in that list is returning right away, and then Salt sits for 5 seconds waiting?
19:38 farra correct
19:38 farra regardless of what command I send that node group
19:38 farra this doesn't happen if I use wildcards to run the command
19:38 UtahDave farra: Is there any way you can test on git develop branch?  I think this may have been fixed.
19:38 farra yeah
19:39 farra I'll give that a try and report back, tnx!
19:39 UtahDave thank you!
19:40 SEJeff_work terminalmage, ftw!
19:41 SEJeff_work farra, What software did you use to create that if you don't mind my asking?
19:42 farra a very easy program with a terrible name - LICEcap
19:42 farra http://www.cockos.com/licecap/
19:42 farra direct screen recording to animated gif
19:43 farra for more involved animated gifs I use GIF Brewery (http://appstore.com/mac/gifbrewery/)
19:43 SEJeff_work farra, Oh that is fantastic. Thanks!
19:44 farra np!
19:44 SEJeff_work windows only?
19:44 SEJeff_work errrr no linux?
19:44 SEJeff_work sadness, I don't use windows on any of my machines
19:44 Jahkeup SEJeff_work: I spy dmg for OS X :)
19:45 SEJeff_work Still sadness
19:45 mikedawson left #salt
19:48 TheCodeAssassin joined #salt
19:48 TheCodeAssassin guys is there a command to add a role to the minion
19:48 JasonSwindle SEJeff:  Check out https://github.com/icholy/ttygif
19:48 TheCodeAssassin and then run highstate again with that new role?
19:48 JasonSwindle :)
19:48 tuxIO joined #salt
19:49 SEJeff_work JasonSwindle, beers_i_owe_you += 1!
19:49 Jahkeup JasonSwindle: ohh that one is pretty sweet! gonna have to use that one
19:49 JasonSwindle I am going to be using it on my docs
19:49 JasonSwindle found it a few days ago and started it
19:50 UtahDave TheCodeAssassin: well, it depends on how you want to use as your "role"  If you want a "role" grain, then this would work
19:50 UtahDave TheCodeAssassin: salt '<the minion>' grains.setval role 'webserver'
19:51 TheCodeAssassin that east UtahDave?
19:51 TheCodeAssassin *easy?
19:51 UtahDave yep!
19:51 TheCodeAssassin lemme see
19:52 UtahDave You can also set a pillar to manage roles, too, if you want.
19:52 TheCodeAssassin should also work in masterless state
19:52 Jahkeup UtahDave: got a minute for those _states? :)
19:52 farra JasonSwindle: that ttygif is sweet! tnx
19:52 JasonSwindle farra:  any time :)
19:53 JasonSwindle KennethWilke:  Top that :P
19:54 dthom91 joined #salt
19:55 UtahDave Jahkeup: OK, let's do this. Explain to me again what you're trying to do, (to clarify my memory)
19:55 Jahkeup UtahDave: I've got custom _modules/ovs.py and _states/ovs.py, and I'm using the module to run execution sctuff and the state for well state functions
19:56 Jahkeup UtahDave: but the _state won't import salt.modules.ovs even when the _module does get loaded from extmods
19:56 g4rlic UtahDave: Thanks, I'll give that a read.
19:57 g4rlic ah, ok, I see what you're getting at there now.  I did put cart before the horse on this one, so once I've got the lab environment fully set up, I can test this.  Thanks!
19:57 mwillhite joined #salt
19:58 auser joined #salt
19:58 UtahDave Jahkeup: Ah, I see. OK. You don't want to import your module from the state
19:58 Jahkeup UtahDave: oh? Why's that?
19:58 UtahDave Jahkeup: the proper "Salty" thing to do is use the   salt   dict to access all the modules
19:59 Jahkeup UtahDave: can that get me the underscored functions too though?
19:59 TheCodeAssassin https://gist.github.com/thecodeassassin/00dc382970647ccbd8e7
19:59 Jahkeup I'm trying to avoid duplication
19:59 TheCodeAssassin this doesn't work for some reason
19:59 UtahDave the Salt loader creates a __salt__ dict that contains all the modules that have been loaded for the system
20:00 SEJeff_work TheCodeAssassin, You don't need a compound match: http://docs.saltstack.com/ref/states/top.html#other-ways-of-targeting-minions
20:00 UtahDave TheCodeAssassin: I added a comment to your gist
20:00 SEJeff_work TheCodeAssassin, Try: 'role:webserver\n    - match: grain...'
20:00 Jahkeup UtahDave: yeah so like __salt__['ovs.add_bridge']('bleh'), but I wanted to share some utility functions too like _bridge_exists(bridge_name)
20:00 TheCodeAssassin hmmm
20:00 TheCodeAssassin wow
20:01 rustyrazorblade joined #salt
20:01 TheCodeAssassin i have a lot to learn about this great tool
20:01 TheCodeAssassin goodbye puppet
20:01 UtahDave Jahkeup: Yeah, don't do that.  Your ovs functions will still be able to access the _* utility functions
20:01 TheCodeAssassin never call me again
20:01 TheCodeAssassin :P
20:01 UtahDave lol, TheCodeAssassin
20:01 TheCodeAssassin It is just me or is this way better?
20:02 Jahkeup UtahDave: so I can call __salt__['ovs._bridge_exists'](bridge_name)?
20:02 SEJeff_work TheCodeAssassin, ++
20:02 Jahkeup UtahDave: hmmm. I'll try it!
20:02 SEJeff_work TheCodeAssassin, There is also this: http://docs.saltstack.com/topics/targeting/compound.html#compound-matchers which is very handy to reference
20:02 SEJeff_work TheCodeAssassin, so you could also do: - match: compound
20:02 TheCodeAssassin so nic
20:02 faldridge joined #salt
20:02 UtahDave Jahkeup: yep, that's the proper way.  I'd recommend looking at another state for some good examples.
20:04 Jahkeup UtahDave: https://github.com/saltstack/salt/blob/develop/salt/states/pkg.py misled me as it imported salt modules and used their functions :P
20:04 Jahkeup UtahDave: but I think I got it now :D
20:05 TheCodeAssassin hmm
20:05 TheCodeAssassin salt-call grains.setval role ${ROLE}
20:05 TheCodeAssassin this doesn't work, but salt cannot be found
20:06 Jahkeup UtahDave: thanks a bunch! I can finally sleep at night, cheers!
20:06 TheCodeAssassin hmm
20:07 dthom91 TheCodeAssassin: I just did a trivial test and it worked as described
20:07 TheCodeAssassin dthom91: yes i am an idiot, sorry
20:07 TheCodeAssassin forgot --local
20:08 dthom91 ah, no worries
20:08 dthom91 glad you asked about this, actually, because I recently needed this behavior as well
20:11 TheCodeAssassin well this is basically because connecting to the master happens after the minion is provisioned
20:11 TheCodeAssassin because what im making currently is a setup
20:11 TheCodeAssassin proxmox api => create new openvz => git clone minionrepo => send to new vz => ./boostrap.sh
20:11 TheCodeAssassin and that should bootstrap the node masterless
20:11 TheCodeAssassin then (haven't figered it out yet) connect the minion to a master
20:11 TheCodeAssassin hopefully this can be done with a command, not sure yet
20:12 dthom91 yeah, I needed it whilst creating a prototype minion from scratch so that it would pick up the correct environment, etc
20:12 eightyeight is mike ainsworth in?
20:13 dthom91 @UtahDave does the master grain actually control the endpoint that the minion is connected to? i.e. if you change that grain, will the minion connect to a different host?
20:15 Xeago joined #salt
20:15 TheCodeAssassin damn i feel like a pain in the butt
20:15 TheCodeAssassin https://gist.github.com/thecodeassassin/060d0a799d3ebd9d5efd
20:15 TheCodeAssassin i feel like im doing that file.managed thing all wrong
20:15 TheCodeAssassin because it's saying hell no, i think i have to put it in a seperate ID
20:16 dthom91 yep… one state directive per ID
20:16 forrest s0undt3ch, did you see anything else in that RHEL pull that needs to be fixed?
20:18 renoirb I am wondering something, can you answer UtahDave?  My question: What are the use cases for state.low, state.running, top, etc?
20:19 SEJeff_work renoirb, Mostly debugging, for developers, and internal salt usage
20:20 druonysus joined #salt
20:20 renoirb ok.  Thanks SEJeff_work, but how to use when you develop the state
20:20 SEJeff_work renoirb, I mean for python developers who are writing salt code
20:20 SEJeff_work you can use state.show_highstate for an idea
20:21 zooz joined #salt
20:23 abe_music teskew: https://github.com/saltstack/salt-cloud/pull/740
20:26 qba73 joined #salt
20:27 renoirb Ok SEJeff_work, it's YAML formatted output, fair enough.
20:27 renoirb I thought it provided alternate state for crisis scenarios for example
20:29 berto- joined #salt
20:30 TheCodeAssassin does anybody know about a file.absent for symlinks?
20:30 TheCodeAssassin doesn't seem to work with symlinks
20:32 qba73_ joined #salt
20:37 UtahDave eightyeight: Yeah, he is. Do you want me to get him for you?
20:37 eightyeight UtahDave: i'll just email him. thx
20:37 UtahDave dthom91: No, changing the grains['master'] won't cause the minion to look at another master. Just the entry in the config file
20:38 UtahDave TheCodeAssassin: Yeah, you can't have two "file" state declarations underneat one ID declaration
20:39 UtahDave eightyeight: ok. Let me know if you need me to ping him. He's like 15 feet from me.  ;)
20:39 dthom91 UtahDave I suspected as much, but figured it wouldn't hurt to ask. Is there a way to do a midstream switch to a different master like that? To be clear, I'm just curious.
20:40 g4rlic I don't suppose its advisable, or even possible, to use -require: and give it an actual state?  as opposed to say, just a package.
20:40 iPaulo joined #salt
20:40 UtahDave dthom91: Not really. You have to remove the master's public key that the minion has cached.
20:41 eightyeight UtahDave: just poke him with a sharp stick, and say whiteinge did it
20:41 dthom91 Ah, of course. Thanks.
20:41 UtahDave eightyeight: will do!
20:41 UtahDave :)
20:42 UtahDave g4rlic: you can require against any state that you've already used in your sls files.   pkg, git, service, file,   any state
20:43 g4rlic So if say, I define a state.  in my case, xinetd. This state, (assuming I'm using the word correctly) includes requirements for services, packages, etc., as related to Xinetd.
20:44 g4rlic Then I define a second state, say, tftp, that requires that a fully functioning xinetd state is available.
20:44 UtahDave g4rlic: all the requires stuff is handled by Salt,
20:44 UtahDave eightyeight: mike can't find an email from you
20:44 gamingrobot what happens if you have a state require itself?
20:44 eightyeight UtahDave: give him about 2 minutes, then it won't be difficult. :)
20:44 g4rlic So I can indeed tell the tftp state to require the xinetd state directly? ;)
20:45 giantlock joined #salt
20:45 UtahDave gamingrobot: Salt checks for possible circular requires
20:45 UtahDave g4rlic: yep!
20:45 UtahDave eightyeight: OK.  :)
20:45 g4rlic neat, what's the syntax for that?
20:47 mattbarto joined #salt
20:48 UtahDave g4rlic: This doc explains it all in pretty good detail: http://docs.saltstack.com/ref/states/requisites.html#requisites
20:49 hazzadous joined #salt
20:50 g4rlic UtahDave: I was reading that.  It allows me to select on things like: package, etc., but in my case, I'm hoping to have something like all of /srv/salt/xinetd/init.sls required.
20:50 g4rlic (I don't want to repeat myself in tftp for all of the requires that xinetd has.)
20:50 g4rlic Perhaps I'm going about it the wrong way?
20:50 UtahDave http://docs.saltstack.com/ref/states/requisites.html#require-an-entire-sls-file
20:51 * Corey eyes g4rlic's xinetd
20:51 g4rlic Guess I didn't read far enough. ;)
20:52 g4rlic UtahDave: thank you, sir.
20:54 UtahDave you're welcome, g4rlic.  :)
20:54 alekibango joined #salt
20:56 Jahkeup joined #salt
20:57 TheCodeAssassin UtahDave: file.absent does not remove linked symlinks :9
20:57 TheCodeAssassin file.remove does but isn't a state
21:00 zooz joined #salt
21:04 tuxIO joined #salt
21:05 mwillhite joined #salt
21:05 UtahDave TheCodeAssassin: Would you open a bug report for that? file.absent or something similar should exist to allow for removing symlinks
21:05 TheCodeAssassin yes
21:06 UtahDave thanks!
21:07 rustyrazorblade joined #salt
21:08 kenbolton joined #salt
21:08 bemehow joined #salt
21:10 TheCodeAssassin https://github.com/saltstack/salt/issues/6812
21:15 TJ1980 joined #salt
21:16 UtahDave thanks, TheCodeAssassin!
21:16 TheCodeAssassin no thank you UtahDave :)
21:17 Jahkeup joined #salt
21:23 auser hey all
21:23 UtahDave hey, auser!
21:24 mwillhite I'm having a really hard time getting my box to pull down a git repo (its a private gem in the Gemfile). I can't seem to get the right keys in there and I've been trying several approaches I've found online
21:24 mwillhite can anyone point me to an example that they know works?
21:25 forrest TheCodeAssassin, line 606 of https://github.com/saltstack/salt/blob/develop/salt/states/file.py
21:25 forrest it should support the removal of symlinks, you might want to mention that in your bug report
21:25 auser oh mwillhite sure
21:25 auser I have one of those
21:25 auser might take me a few to dig it up
21:25 TheCodeAssassin thnx forrest
21:25 mwillhite thanks auser, I appreciate it :)
21:26 forrest Yep, not sure why it isn't working, it has the same logic as file.remove
21:26 forrest on your system where the symlink exists, what happens if you lunch an interactive session and do os.path.islink('/path/to/file')?
21:27 TheCodeAssassin dunno, testing on Ubuntu 12.04
21:27 forrest ?
21:27 TheCodeAssassin it removed the file, but did not remove the symlinks
21:27 forrest oh I see
21:27 TheCodeAssassin oke mo
21:27 forrest so you're actually removing the file itself, not the symlink, I gotcha
21:28 forrest I thought you were just trying to remove the symlink and that wasn't working.
21:28 salty-sailor joined #salt
21:28 forrest shouldn't you be specifying that the symlink should be removed, and not relying on the system? explicit seems better than implicit in this scenario.
21:29 TheCodeAssassin forrest: uhm
21:29 hannesstruss joined #salt
21:29 TheCodeAssassin how do i launch the in interactive shell, you mean pyhon -i right ?
21:29 forrest You don't need to do that
21:29 forrest and you could just launch it with python
21:29 forrest then it should drop you at the prompt
21:30 forrest but I don't know if that's an actual issue so much as a feature, I'd be pretty pissed if a bunch of symlinks got removed just because the file was removed.
21:30 forrest it would also depend on whether it was a hard link, or soft link
21:31 salty-sailor quick query:  How do I make a cmd.wait function not fail when watching a file?  I only want it to run if the file changed, but not fail if it didn't change
21:32 TheCodeAssassin lrwxrwxrwx 1 root root 34 Aug 20 22:53 /etc/nginx/sites-enabled/default -> /etc/nginx/sites-available/default
21:32 TheCodeAssassin removed sites-available/default
21:32 TheCodeAssassin but sites-enabled/default still remains
21:32 forrest right
21:32 forrest because you didn't specify that it should be removed
21:33 forrest salty-sailor, does the example not work?
21:33 TheCodeAssassin but i cannot with file.absent
21:33 TheCodeAssassin because it doesn't see it as a file
21:33 letterj joined #salt
21:33 forrest so when you specify file.absent for both of them
21:33 forrest if it removes the file first, it doesn't remove the symlink?
21:34 TheCodeAssassin forrest: let me trt
21:34 hannesstruss has anything about how pillar top files are read changed between 0.16.2 and 0.16.3? It seems as if in 0.16.2 all glob-style matches are applied, whereas in 0.16.3 it's just one
21:34 forrest salty-sailor, http://docs.saltstack.com/ref/states/all/salt.states.cmd.html #3 on there has an example that claims "Run only if myscript changed something:"
21:35 TheCodeAssassin https://gist.github.com/thecodeassassin/93ba03120a4b315722be
21:35 TheCodeAssassin seems to work forrest
21:35 TheCodeAssassin i gtg to bed
21:35 TheCodeAssassin cya all later
21:35 forrest bye
21:36 forrest if that works, I don't know if that's really a problem, depends how you look at it I guess.
21:36 salty-sailor forrest: yes, that works but if the watched state doesn't trigger the watch function, then the command fails
21:36 forrest ahh ok salty-sailor
21:36 salty-sailor for instance, if a file didn't change, then the watch function doesn't get called and the cmd.run fails
21:38 forrest yea I know what you mean
21:38 forrest can you use the onlyif value?
21:38 forrest onlyif
21:38 forrest A command to run as a check, run the named command only if the command passed to the onlyif option returns true
21:38 salty-sailor I haven't tried it.  I'm not sure what I would put into the argument
21:38 hannesstruss here's an example, with 0.16.3 only the prod-section is used on a minion called 'web-prod': https://gist.github.com/hannesstruss/6287643
21:38 matanya joined #salt
21:38 salty-sailor Would I put the file.managed state?
21:38 forrest you could try
21:39 forrest I'm not sure, I haven't used cmd.wait before
21:39 letterj hi, I wanted to ask about errors on the minion not getting back to the master.   I thought the default was to show errors?
21:40 intchanter joined #salt
21:41 letterj I hadn't run a sync_grain on the minion so anything I wanted to do with a role just failed silently.  I found the error on the minion in the logs but nothing ever got pushed up to the master
21:43 UtahDave letterj: We've been working on letting those errors bubble up and display on the master, but there are still places that don't
21:44 timl0101 joined #salt
21:45 baniir joined #salt
21:46 letterj UtahDave: Thanks for the info.  Can I possibly help with that?
21:47 aat joined #salt
21:47 fxhp joined #salt
21:49 forrest TheCodeAssassin, when you see this tomorrow I added a note to issue 6812, let me know if that's inaccurate.
21:50 UtahDave letterj: Would you open an issue on that?  If you can describe how to cause the same error?  That will help track that down.
21:50 letterj I'd be happy to.
21:51 letterj github.com right?
21:51 forrest https://github.com/saltstack/salt/issues/new letterj
21:52 UtahDave letterj: yep!   thanks!  We did some quick testing and are getting the error back from the minion.  So if you can explain how you're causing it that would help us a LOT in tracking it down
21:52 UtahDave letterj: also, include the output of salt --versions-report    and salt '<minion>' test.versions_report
21:52 TJ1980 joined #salt
21:54 rustyrazorblade joined #salt
21:56 salty-sailor forrest: I was using wait wrong.  Thanks for the help!
21:56 forrest np, what did you change to solve it?
21:56 jimallman joined #salt
21:57 bogdanbu joined #salt
21:57 salty-sailor there was a prerequisite farther up the tree that was failing
21:57 forrest ahh ok
21:57 forrest awesome then
21:57 salty-sailor so the failure cascaded
21:57 salty-sailor but wait does exactly what I expect
21:57 forrest hah
21:58 salty-sailor However, I'm curious if it ties into notifications about changes though
21:59 salty-sailor like, if I change a file, not through salt, will the watching state get applied?
21:59 chrisgilmerproj left #salt
21:59 UtahDave salty-sailor: only when that state is applied
21:59 forrest Hmm I'm not sure. I don't know if it catalogs md5sums of files or anything to determine if there's a file change when it checks in with the master
22:00 salty-sailor darn.  Okay
22:00 salty-sailor that makes sense though
22:00 salty-sailor it's like a callback
22:00 forrest Ahh ok, thanks UtahDave
22:00 salty-sailor That would be a sweet feature, but I think it's probably beyond the scope of saltstack
22:01 UtahDave salty-sailor: you could use something like watchdog to watch a file or directory and then make a salt-call  call if it sees a change.
22:02 forrest you could also do something really ghetto and just run a cron that runs the salt-call every 30 minutes or something
22:03 letterj UtahDave: Issue submitted.  thanks for your help.
22:04 Jahkeup UtahDave: I finally got around to changing my function calls, and the underscored functions called by __salt__['ovs._bridge_exists'](bridge_name) fails
22:05 UtahDave thank you letterj!
22:05 tomeff joined #salt
22:05 UtahDave Jahkeup: can you pastebin your state?
22:06 blee_ joined #salt
22:06 hello__ joined #salt
22:06 Jahkeup UtahDave: http://pastebin.com/AYbrU4KK
22:11 jacksontj joined #salt
22:11 msheiny joined #salt
22:12 UtahDave Jahkeup: I'm reading it right now
22:12 UtahDave Jahkeup: Ah, so I don't think the Salt loader makes functions starting with  _ available
22:12 UtahDave line 31 of that paste calls one
22:13 Jahkeup UtahDave: that's why I was confused earlier :P
22:13 Jahkeup UtahDave: so I'm going to have to have some duplicated code then :/
22:14 Jahkeup I was really hoping to keep it like the salt modules/states and import the module into the state but alas
22:14 aat joined #salt
22:16 Jahkeup UtahDave: is there any other way that I can import those functions and keep to the salty ways?
22:17 rustyrazorblade joined #salt
22:17 napperjabber joined #salt
22:18 Jahkeup UtahDave: ooh I suppose I could load pillar data for extmods and load the module manually!
22:18 UtahDave Jahkeup: just a sec. let me chat with someone about this
22:18 Jahkeup UtahDave: okay
22:22 andredublin joined #salt
22:23 UtahDave can you just remove the _ from the function name?
22:23 Gifflen joined #salt
22:24 Jahkeup UtahDave: that's true, I was simply following suit of the salt modules :)
22:24 Jahkeup UtahDave: yea, I'll do that. I hope that gets a better more salty method for handling this type of thing in the future
22:24 brianhicks joined #salt
22:25 UtahDave Jahkeup: sure
22:26 Jahkeup thanks for the help UtahDave
22:27 forrest whiteinge, you see that they released bootstrap 3? http://blog.getbootstrap.com/
22:27 whiteinge yeah! haven't had a chance to look it over yet
22:28 forrest I just saw it, looking at the what's new now
22:28 forrest and enjoying those funky grooves
22:28 forrest Better box model by default. Everything in Bootstrap gets box-sizing: border-box, making for easier sizing options and an enhanced grid system.
22:28 forrest probably my favorite thing I've seen from the details so far.
22:28 canci joined #salt
22:29 UtahDave you're welcome, Jahkeup!
22:30 JesseC When using file.sed and wrapping the before in double quotes, nothing needs to be escaped inside them other than double quotes right?
22:35 s0undt3ch forrest: the PR is ok
22:36 aat joined #salt
22:37 oz_akan_ joined #salt
22:39 forrest s0undt3ch, cool
22:40 TJ1980 joined #salt
22:46 JesseC Any ideas? No amount of escaping lets sed work on something like this -> before: "<username><![CDATA[root]]></username>"
22:47 napperjabber joined #salt
22:48 william joined #salt
22:50 issackelly joined #salt
22:50 Guest32503 are there special considerations for running the minion under launchd? pkg/brew fail when the minion is started as a daemon but works fine from bash
22:51 mwillhite auser any luck digging up that ssh example? :)
22:51 auser oh sorry, I got distracted
22:52 auser sorry!
22:52 auser give me a min to find it
22:52 auser I am sure I have it
22:53 mwillhite thanks, sorry to nag you :P
22:54 ammmir joined #salt
22:55 dthom91 joined #salt
23:00 jacksontj joined #salt
23:02 auser mwillhite: no problem
23:02 auser https://gist.github.com/auser/6288441
23:04 mwillhite auser I'm brand new to this stuff so you might have to give me a little context…
23:04 auser do you know pillars?
23:04 mwillhite I haven't used them, but I understand the concept
23:04 auser it's okay if not
23:05 auser okay, cool… so you'll have to make sure your node gets the pillar that's linked there
23:05 mwillhite what I have is a rails app in a submodule (there will be several of these), and in the Gemfile there is a reference to a private gem
23:05 auser and there is a state example
23:06 auser sure, so you need to make sure your pillar contains the private key
23:06 auser in that case, you'll have to create an ssh hosts file
23:06 auser ssh config, that is
23:06 auser that references the pubkey for github
23:06 mwillhite ok
23:09 brianhicks joined #salt
23:09 sgviking joined #salt
23:10 UtahDave JesseC: basepi, do you know how to answer JesseC's file.sed question?
23:11 kenbolton joined #salt
23:11 JesseC I figured out that one, now I'm trying to figure out another one with single quotes.
23:11 JesseC - before: "define('DB_HOSTNAME', 'localhost');"
23:11 farra joined #salt
23:12 JesseC that doesn't error, but it also doesn't find it, so nothing happens
23:12 JesseC if I wrap it in single quotes and try to escape the single quotes, it just errors out on compile
23:13 pdayton joined #salt
23:13 cxz joined #salt
23:14 JesseC ok.. so this the output from salt -> 'sed -n -r -e \'s/define(\'"\'"\'DB_HOSTNAME\'"\'"\', \'"\'"\'localhost\'"\'"\');/$/pg\'
23:14 basepi JesseC: so this is a shell problem, not a salt problem -- if you put single quotes around anything, then you can no longer escape it.
23:14 JesseC it's adding its own escaping and adding double quotes.
23:14 basepi hrm, interesting.
23:14 craig_ how can i read the salt master config from another script?
23:15 basepi craig_: just another file?  what do you mean by "script"?
23:15 craig_ no
23:15 craig_ sorry...
23:15 craig_ i need the config with the defaults filled in
23:15 rustyrazorblade joined #salt
23:15 craig_ right now, if i were to read the yaml itself, it would be mostly empty
23:15 craig_ since we use a lot of the defaults
23:16 basepi ah, so you want to see all the options including defaults?
23:16 craig_ also, the reading of things like .../master.d/conf
23:16 craig_ ya
23:16 mannyt_ joined #salt
23:16 craig_ ok, let me super specific... :)
23:16 craig_ i want to get the PID file exactly as the master process sees it
23:16 basepi the easiest is just to look in pillar.  it is automatically populated with all of the master config options
23:17 craig_ so, if i were to override in, say, /etc/salt/master.d/stupid-override.conf
23:17 craig_ right... __opts__ ?
23:17 UtahDave yes, in __opts__
23:17 basepi so __opts__ is accessible in any module or state, and has all the options in it
23:18 UtahDave if you're using python, you can use the python api to get all that info
23:18 basepi if you want an easy way with just a salt command, i would recommend `pillar.items`
23:18 basepi actually, `salt '*' pillar.item master` will give you just the master config options
23:19 craig_ coo. thanks!
23:19 craig_ cool**
23:19 craig_ UtahDave: yes, via python
23:20 UtahDave craig_: http://docs.saltstack.com/ref/clients/index.html#python-api
23:20 craig_ UtahDave: heh... ya. just found that page
23:20 craig_ google for "salt api" takes you to "salt-api" first
23:20 craig_ not quite what i was looking for :)
23:22 kenbolton joined #salt
23:23 UtahDave yeah, true.  :)
23:25 JesseC basepi: any ideas why salt would toss in all those double quotes?
23:25 DredTiger joined #salt
23:33 cewood joined #salt
23:33 basepi JesseC: not sure, definitely seems a bit odd
23:33 basepi have you looked to see if it does it for more straightforward commands?
23:33 andredublin joined #salt
23:33 forrest JesseC, is that coming from a yaml file? Or does it happen when running a command straight through salt on the command line?
23:34 basepi i haven't been in that code for months
23:34 JesseC I managed to get it manually without using -r and unicode
23:34 JesseC sed -e 's/define(\x27DB_USERNAME\x27, \x27root\x27);/define(\x27DB_USERNAME\x27, \x27test\x27);/g'
23:34 forrest lol
23:34 JesseC worked lol
23:34 baniir joined #salt
23:35 JesseC forrest: it's from a yaml file, but I also tried just copying the output and running it manually and it didn't work, the one that salt generates
23:35 forrest gotcha
23:35 JesseC it seems it forces -r and wants to escape everything even if you already have
23:35 forrest that's odd
23:35 JesseC it turned \x27 into \\x27
23:35 alunduil joined #salt
23:37 aat joined #salt
23:37 eshagh tried brew python in launchd, no joy. i feel like this is something obvious staring me in the face https://dpaste.de/7eysG/
23:39 jacksontj joined #salt
23:39 efixit joined #salt
23:43 symb0l joined #salt
23:50 issackelly eshagh I think it's your PATH
23:50 eshagh ok, it was a path problem
23:50 kenbolton joined #salt
23:55 DredTiger joined #salt
23:56 g4rlic left #salt
23:59 cron0 joined #salt

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