Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-08-28

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

All times shown according to UTC.

Time Nick Message
00:01 jonlangemak joined #salt
00:10 Akhter joined #salt
00:10 bfoxwell joined #salt
00:11 mark____1 joined #salt
00:21 zwi joined #salt
00:27 jeadre joined #salt
00:29 Ryan_Lane awwwwww yes: https://github.com/saltstack/salt/pull/26724
00:29 saltstackbot [#26724]title: Add ENI support to boto_ec2 state and execution modules |
00:32 danielcb joined #salt
00:42 baweaver joined #salt
00:46 Jeff_ joined #salt
00:47 shaggy_surfer joined #salt
00:49 Akhter joined #salt
00:50 stanchan joined #salt
00:52 edrocks_ joined #salt
00:56 jonlangemak joined #salt
00:57 bbbryson joined #salt
00:57 Akhter joined #salt
00:57 orion203 joined #salt
00:59 jeadre joined #salt
01:02 zwi joined #salt
01:05 mark_____ joined #salt
01:06 aqua^c joined #salt
01:13 pravka joined #salt
01:19 jonlangemak left #salt
01:20 shaggy_surfer joined #salt
01:20 jeadre joined #salt
01:23 Akhter joined #salt
01:28 Akhter joined #salt
01:31 bfoxwell joined #salt
01:35 jonlangemak joined #salt
01:35 und1sk0 anyone had problems with near matches using grains pcre?
01:36 catpiggest joined #salt
01:37 dir left #salt
01:37 und1sk0 say you have stanzas in your top.sls for "abq*" and "abx*", when you run the highstate on hosts "abq*" it runs what it should but when you run hosts "abx*" you run the init.sls for abq and anx
01:37 pm90_ joined #salt
01:37 und1sk0 a/anx/abx/
01:41 opensource_ninja joined #salt
01:41 mark_____ joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2015.5.5 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:49 mkillebrew left #salt
01:49 ajmccluskey left #salt
01:52 dthom91 joined #salt
01:53 Akhter joined #salt
02:03 mpanetta joined #salt
02:04 mpanetta joined #salt
02:09 ajolo joined #salt
02:10 Akhter joined #salt
02:11 JPaul joined #salt
02:12 aqua^c joined #salt
02:15 pm90_ joined #salt
02:23 fish_ joined #salt
02:23 iggy joined #salt
02:24 MTecknology joined #salt
02:29 zblum joined #salt
02:29 Akhter joined #salt
02:38 dthom91 joined #salt
02:38 aqua^c joined #salt
02:46 rome_390 joined #salt
02:47 zwi joined #salt
02:51 amcorreia joined #salt
02:53 nocturn joined #salt
02:54 mark_____ joined #salt
02:58 gadams joined #salt
02:59 jeadre joined #salt
03:03 mark_____ joined #salt
03:09 favadi joined #salt
03:17 clintberry joined #salt
03:18 Akhter joined #salt
03:21 jeadre joined #salt
03:26 mpanetta_ joined #salt
03:28 zipkid joined #salt
03:28 Tritlo joined #salt
03:29 kuromagi joined #salt
03:30 wiqd joined #salt
03:31 [vaelen] joined #salt
03:31 mikepea joined #salt
03:32 jeadre joined #salt
03:32 xenoxaos joined #salt
03:32 techdragon joined #salt
03:32 geekatcmu joined #salt
03:32 imanc joined #salt
03:32 berto- joined #salt
03:32 evilrob joined #salt
03:33 GrueMaster joined #salt
03:33 Akhter joined #salt
03:34 jab416171 joined #salt
03:35 evle joined #salt
03:35 virusuy joined #salt
03:36 tr_h joined #salt
03:52 Akhter joined #salt
03:54 clintberry joined #salt
03:55 pdayton joined #salt
03:57 TyrfingMjolnir joined #salt
04:05 jeadre joined #salt
04:05 pm90__ joined #salt
04:06 jaybocc2 joined #salt
04:08 jeadre joined #salt
04:08 knite joined #salt
04:20 TyrfingMjolnir joined #salt
04:24 auzty joined #salt
04:25 lemur joined #salt
04:26 aqua^c joined #salt
04:28 zer0def joined #salt
04:34 mark_____ joined #salt
04:52 sunkist joined #salt
04:54 jacksontj joined #salt
04:55 mark____1 joined #salt
04:56 pppingme joined #salt
04:56 Furao joined #salt
05:03 opensource_ninja joined #salt
05:08 salter joined #salt
05:09 * salter slaps amatas around a bit with a large fishbot
05:10 salter sorry!
05:10 anmol joined #salt
05:11 mikeywaites joined #salt
05:22 jeadre joined #salt
05:22 mark____2 joined #salt
05:39 rdas joined #salt
05:44 stephanbuys joined #salt
05:46 mark_____ joined #salt
06:05 vvoody joined #salt
06:07 colttt joined #salt
06:09 zer0def joined #salt
06:11 ramteid joined #salt
06:13 mpanetta joined #salt
06:14 mpanetta joined #salt
06:17 jaybocc2 joined #salt
06:21 AndreasLutro joined #salt
06:33 Ztyx joined #salt
06:33 jaybocc2 joined #salt
06:33 N-Mi joined #salt
06:36 forrest joined #salt
06:38 lb1a joined #salt
06:48 Norbell joined #salt
06:52 favadi joined #salt
06:53 elsmo joined #salt
06:54 Norbell joined #salt
06:54 viq joined #salt
06:54 Norbell joined #salt
06:59 hojgaard joined #salt
07:05 Grokzen joined #salt
07:14 ronrib left #salt
07:21 impi joined #salt
07:23 jeadre joined #salt
07:25 mikeywaites joined #salt
07:35 clintberry joined #salt
07:45 arount joined #salt
07:47 duendecat joined #salt
07:47 linjan joined #salt
07:48 stephanbuys joined #salt
07:48 linjan joined #salt
07:50 jhauser joined #salt
07:50 Ztyx joined #salt
07:52 impi joined #salt
07:53 s_kunk joined #salt
07:55 jhauser_ joined #salt
07:55 eseyman joined #salt
08:06 jeadre joined #salt
08:18 CeBe joined #salt
08:21 favadi joined #salt
08:22 Xevian joined #salt
08:28 An_T_oine joined #salt
08:31 Xevian joined #salt
08:37 markm joined #salt
08:38 mpanetta joined #salt
08:44 jaybocc2 joined #salt
08:45 mortis_ any good way to look up a pillarvalue inside a custom salt-module?
08:46 Furao __salt__[‘pillar.get’](‘key’)
08:46 mortis_ ah, so thats the way :)
08:47 mortis_ i tried from salt.modules import pillar etc
08:47 Furao with non-utf ‘ ‘
08:47 mortis_ thanks Furao
08:48 mortis_ what should i import to make that work?
08:51 Ztyx joined #salt
08:55 elsmo joined #salt
09:00 aristedes1 joined #salt
09:00 ssc joined #salt
09:00 jaybocc2 joined #salt
09:08 mpanetta joined #salt
09:09 babilen mortis_: Nothing, __salt__ is being monkey-patched into your module. I typically set "__salt__ = None" at the beginning so that static code analysers are happy
09:09 PasiFist joined #salt
09:09 babilen (/me isn't particularly fond of that patch-here, patch-there approach)
09:10 PasiFist It looks like get.docker.com just disabled SSLv3. How can I make pkgrepo use TLS?
09:11 mortis_ babilen: aha :) i havent really gotten to understand exactly how it works
09:12 babilen mortis_: Nor will you ever ;)
09:12 mortis_ babilen: haha
09:13 BigBear joined #salt
09:13 mortis_ but i get "NameError: global name '__salt__' is not defined" when i try to run grains.item on the machine
09:13 mortis_ its a custom grain module
09:15 mortis_ trying to lookup a pillarvalue inside a grains-module hehe
09:15 rofl____ static pillars, now!
09:15 TheBigBear joined #salt
09:15 mortis_ ^
09:18 PI-Lloyd joined #salt
09:19 evle joined #salt
09:19 SunPowered joined #salt
09:22 rofl____ still no announcement for 2015.8.0?
09:22 rofl____ i can see a rc2
09:22 rofl____ but no announcement on features?
09:22 arount left #salt
09:28 SunPowered left #salt
09:30 zerthimon joined #salt
09:30 stephanbuys joined #salt
09:30 Mate neither current stable 2015.5.5 is packaged in ppa
09:30 Ztyx joined #salt
09:31 mortis_ i dont get this.... so i cant access __salt__ inside a custom grains-module in _grains?
09:33 AndreasLutro mortis_: correct - and you definitely can't access pillars, as grains are loaded before pillars
09:34 mortis_ bleeeh this is driving me nuts
09:37 mortis_ as i see it, there is currently no good way of having a generic top.sls for pillars, which truly annoys me
09:37 mortis_ manually updating it is not a good idea
09:38 mortis_ matching on hostnames is not a good idea either
09:38 mortis_ the only thing that makes sense is to match it on data from an external classifier
09:38 mortis_ which seems impossible
09:39 AndreasLutro mortis_: you'd have to elaborate on what you mean by "generic" and what you actually want to achieve
09:39 mortis_ ok, i'll try
09:39 _JZ_ joined #salt
09:40 mortis_ take a look at this http://pastebin.com/e7d99mmE'
09:40 mortis_ - the '
09:40 mortis_ thats the top.sls for our states
09:40 mortis_ cmdb:status is a pillar from an external pillar module
09:41 mortis_ that looks up the status of the servers in a cmdb
09:41 mortis_ and includes role.sls in the different envs
09:41 mortis_ in role we lookup the product-name of that server (from the same cmdb) and include the sls for that product alone
09:41 mortis_ which makes it generic
09:41 AndreasLutro would it be possible to rewrite your cmdb external pillar as a grain?
09:42 mortis_ yeah, maybe ..hmm
09:42 AndreasLutro or at least the status bit
09:42 mortis_ well, what i tried to do now, since i cant read pillars in pillars top.sls ....was to make a grainsmodule that took the pillars from cmdb and put it into grains also
09:42 mortis_ to get around it
09:43 mortis_ it would be so slick, if we could just use the exact same top.sls for pillars
09:43 mortis_ tho i understand its not impossible
09:43 AndreasLutro you'll probably have to port the entire status bit from the pillar module to the grains module
09:44 mortis_ or just do that same lookup (sql) for the grains as i do for pillars
09:44 mortis_ and have it both ways
09:44 mortis_ then i can match on grains in pillars top.sls
09:44 mortis_ and have it over with
09:45 AndreasLutro that's the only solution I can see. other than ditching whatever your external cmdb is
09:45 mortis_ thats the db with all the info about all the hosts
09:45 mortis_ in lack of something made by salt ;)
09:46 AndreasLutro if it stores all the info about the hosts (I assume this is loaded as pillar data?) why do you need top.sls at all? can't you just read the data directly via the external pillar?
09:48 mortis_ we'd lose the staging part right?
09:48 mortis_ fileroots etc
09:49 AndreasLutro I'd assume external pillars have functionality for loading different environments just like fileroots
09:49 mortis_ i guess it would be possible
09:49 AndreasLutro also, I think pillar and state environments are separate - so you don't lose environment functionality for states
09:50 mortis_ tho right now i think we're too deep in this to start from scratch :)
09:51 AndreasLutro oh well :)
09:52 mortis_ AndreasLutro: norwegian?
09:52 AndreasLutro indeed
09:53 sgargan joined #salt
10:11 denys joined #salt
10:15 TheBigBear joined #salt
10:20 stefan_ joined #salt
10:22 DanyC joined #salt
10:29 PasiFist joined #salt
10:29 pm90__ joined #salt
10:29 berto- joined #salt
10:29 techdragon joined #salt
10:29 rome_390 joined #salt
10:29 guanophobic joined #salt
10:29 ThomasJ joined #salt
10:29 Rockj joined #salt
10:29 twiedenbein2 joined #salt
10:29 bretep joined #salt
10:29 gimpy2938 joined #salt
10:29 apejens joined #salt
10:29 is_null joined #salt
10:29 arapaho joined #salt
10:29 Micromus joined #salt
10:29 ska-fan joined #salt
10:29 superseb joined #salt
10:29 pdx6 joined #salt
10:30 jeadre joined #salt
10:30 hojgaard joined #salt
10:30 tr_h joined #salt
10:30 virusuy joined #salt
10:30 GrueMaster joined #salt
10:30 evilrob joined #salt
10:30 geekatcmu joined #salt
10:30 xenoxaos joined #salt
10:30 [vaelen] joined #salt
10:30 kuromagi joined #salt
10:30 awpti joined #salt
10:30 Edgan joined #salt
10:30 esharpmajor joined #salt
10:30 bytemask joined #salt
10:30 Laogeodritt joined #salt
10:30 mlanner joined #salt
10:30 hardwire joined #salt
10:30 DenkBret1l joined #salt
10:30 sk_0 joined #salt
10:30 packeteer joined #salt
10:30 SneakyPhil joined #salt
10:30 gchao joined #salt
10:30 basepi joined #salt
10:30 al joined #salt
10:30 kaiyou joined #salt
10:30 kbaikov joined #salt
10:30 zz_Cidan joined #salt
10:30 skarn joined #salt
10:30 PrincessZoey_ joined #salt
10:30 stickmack joined #salt
10:30 davisj joined #salt
10:30 NightMonkey joined #salt
10:30 oeuftete joined #salt
10:30 FredFoo joined #salt
10:30 Horgix joined #salt
10:30 ShibMcNe joined #salt
10:30 ede joined #salt
10:30 shnguyen joined #salt
10:30 TOoSmOotH joined #salt
10:30 sybix joined #salt
10:32 tr_h joined #salt
10:32 jeadre joined #salt
10:32 hojgaard joined #salt
10:32 virusuy joined #salt
10:32 GrueMaster joined #salt
10:32 evilrob joined #salt
10:32 geekatcmu joined #salt
10:32 xenoxaos joined #salt
10:32 [vaelen] joined #salt
10:32 kuromagi joined #salt
10:32 awpti joined #salt
10:32 Edgan joined #salt
10:32 esharpmajor joined #salt
10:32 bytemask joined #salt
10:32 Laogeodritt joined #salt
10:32 mlanner joined #salt
10:32 hardwire joined #salt
10:32 DenkBret1l joined #salt
10:32 sk_0 joined #salt
10:32 packeteer joined #salt
10:32 SneakyPhil joined #salt
10:32 gchao joined #salt
10:32 basepi joined #salt
10:32 al joined #salt
10:32 kaiyou joined #salt
10:32 kbaikov joined #salt
10:32 skarn joined #salt
10:32 PrincessZoey_ joined #salt
10:32 stickmack joined #salt
10:32 davisj joined #salt
10:32 NightMonkey joined #salt
10:32 oeuftete joined #salt
10:32 FredFoo joined #salt
10:32 Horgix joined #salt
10:32 ShibMcNe joined #salt
10:32 ede joined #salt
10:32 shnguyen joined #salt
10:32 TOoSmOotH joined #salt
10:32 sybix joined #salt
10:34 xenoxaos joined #salt
10:34 evilrob_ joined #salt
10:34 geekatcmu joined #salt
10:35 Nika_ joined #salt
10:35 zz_Cidan joined #salt
10:36 packeteer joined #salt
10:44 airgee joined #salt
10:45 phw joined #salt
10:47 bluenemo joined #salt
10:49 babilen mortis_: Please give your +1 to https://github.com/saltstack/salt/issues/23910 and take a look at https://github.com/bbinet/pillarstack
10:52 phw how can I check if a kernel module is available? Using "salt COMPUTER  kmod.is_loaded foobar" - this works. But how can I check in my script using that? I am trying via "{% if kmod.check_available('foobar') %}"  but this does not work
10:52 mortis_ babilen: i will +1 it :) thanks!
10:53 phw or should I not use templates and use an "onlyif" in the commands afterwards?
10:53 AndreasLutro phw: if salt['kmod.check_available']('foobar')
10:53 mortis_ but you CAN write grains inside other modules than _grains modules right?
10:54 duendecat joined #salt
10:54 mortis_ in some way ...
10:54 mortis_ *googling*
11:03 babilen mortis_: It simply helps if people realise that this is functionality that is missing and has many usecases.
11:04 mortis_ babilen: abseloutly
11:09 fgimian joined #salt
11:11 phw AndreasLutro:  ah great! thank you very much! but what about the then necessary "Load the module"? I am trying kmod.load (with - name: foobar) - but this generates a key error "kmod.load"
11:11 elsmo is there a command you can run on a minion to get it to print out what it can see from the pillar?
11:11 jaybocc2 joined #salt
11:12 AndreasLutro phw: just use the kmod.present state? http://docs.saltstack.com/en/latest/ref/states/all/salt.states.kmod.html
11:12 AndreasLutro you don't need to wrap that in an if statement btw
11:13 phw AndreasLutro: I seem to have problems with modules vs. states
11:14 AndreasLutro phw: understandable :)
11:14 phw AndreasLutro: States are states I describe - if they are not fullfilled, saltstack will fullfill them; And modules are used to check a state in templates?
11:19 AndreasLutro phw: https://bpaste.net/show/9fd6ab1de8d2
11:19 AndreasLutro phw: usually state functions call various module functions under the hood
11:21 phw AndreasLutro: Ah, this really helps!
11:27 jaybocc2 joined #salt
11:34 amcorreia joined #salt
11:34 Ztyx joined #salt
11:35 zwi joined #salt
11:37 johngrasty I've got a question. My salt is failing to do pkg.installed tmux. Here is the salt-call -l debug output: http://pastebin.com/LTHiQcN7  Any ideas?
11:38 martin_svenssson joined #salt
11:38 Ztyx joined #salt
11:38 martin_svenssson Hi! Is it possible to execute commands on the salt *master* in a state file?
11:41 AndreasLutro johngrasty: could be this https://github.com/saltstack/salt/issues/26584
11:43 evle joined #salt
11:52 thomas5 joined #salt
11:54 KermitTheFragger joined #salt
12:06 mythus joined #salt
12:11 Grokzen joined #salt
12:17 TyrfingMjolnir joined #salt
12:27 zwi joined #salt
12:29 Furao joined #salt
12:34 anmol joined #salt
12:37 johngrasty AndreasLutro: Thanks. That pointed me in the right direction. It's appears to be a packaging issue. I'll find what needs to be fixed and file an issue with the bootstrap script repo.
12:39 roadrunner_ joined #salt
12:47 roadrunner_ left #salt
12:48 subsignal joined #salt
12:51 BigBear joined #salt
12:56 Ztyx joined #salt
12:57 johngrasty Ok. So I found the missing module, and I have fixed that error. But I am still getting pkg.installed is not available and not much more info. http://pastebin.com/drAaUwWL
13:02 cpowell joined #salt
13:02 kwork joined #salt
13:02 kwork joined #salt
13:05 bluenemo Can I buy packages for traffic? As in 2TB every month for x USD or sth? As I can book a EC2 Instance type for a year and get it cheaper.
13:06 zer0def joined #salt
13:08 khaije1 joined #salt
13:09 denys joined #salt
13:12 bastion2202 joined #salt
13:17 rdutch joined #salt
13:19 kbyrne joined #salt
13:21 kbyrne joined #salt
13:22 DammitJim joined #salt
13:23 aparsons joined #salt
13:24 pdayton joined #salt
13:24 TyrfingMjolnir joined #salt
13:24 aparsons_ joined #salt
13:29 scurry joined #salt
13:32 amcorreia joined #salt
13:33 pdayton1 joined #salt
13:36 jdesilet joined #salt
13:36 unusedPhD joined #salt
13:38 racooper joined #salt
13:40 pravka joined #salt
13:44 jalbretsen joined #salt
13:44 tkharju joined #salt
13:46 perfectsine joined #salt
13:49 Ztyx joined #salt
13:51 mikeywaites joined #salt
13:56 elsmo Hi all. Salt seems to do a good job of merging pillar keys which are defined across multiple files for example, is there any trick to get it to also merge lists? as in if you have two keys that are lists, get it to merge the lists, rather than overwrite the keys non-deterministicly?
13:56 timoguin joined #salt
13:58 AndreasLutro elsmo: I think merging of lists will be the default in 2015.8
13:58 zmalone joined #salt
13:59 dyasny joined #salt
13:59 Ztyx joined #salt
13:59 * AndreasLutro tests
13:59 elsmo Ahh. That will be excellent :) does that have a release date? theres not much left of .8 ;)
13:59 babilen It's a shame that Python has such shitty support for merging, accessing and setting nested collections
13:59 AndreasLutro elsmo: yep, it does merge lists
14:01 johtso joined #salt
14:01 bluenemo There is some rather interesting stuff concerning merging lists, which are ordered, dicts are not.
14:02 tkharju joined #salt
14:02 bluenemo how do you define the order? :) There is some merge magic already in some module. pillar.get has some merge thingy if I'm not misstaken. I think it would be a good start to eval that and make "merge" its own module
14:02 bluenemo elsmo, AndreasLutro babilen
14:03 AndreasLutro I would generally be hestitant to place order-sensitive data into pillars
14:03 babilen There is no proper way to define a general way to merge lists really (unless you are fine with a "set approach" to it)
14:04 bluenemo AndreasLutro, exactly. really hits the fan with for example nginx configs ;)
14:04 AndreasLutro why?
14:04 bluenemo well, you can use list items for EVERYTHING in the config - then you have 2x more characters than in the actual config..
14:04 AndreasLutro nginx.conf?
14:05 elsmo I guess what I was asking was more a append of list, rather than a proper merge- In this case its just a list of packages so ordering is not v important!
14:05 bluenemo what I use is a template "wordpress", which then uses macros - those macros take some input. for example I have a redirect macro, that takes the regex and the url to redirect to as arguments. this macro is then placed at the right location in the template (talking nginx vhosts and configs, yes)
14:05 AndreasLutro you're using pillar lists to determine which macros to call?
14:06 bluenemo then it should be list1 + list2, but you'll have to write your own module I think, its easy: https://paste.debian.net/309465/
14:07 bluenemo hm no. I say: this vhosts uses the template "wordpress". the template wordpress then consists of a lot of called jinja macros. the actual macros are in own files. I use the template to put the macros in, and feed pillar data to the macros.
14:07 bluenemo its kinda complicated, but my best approach to abstracting every possible config with nginx
14:07 bluenemo while still keeping it simple in pillars
14:08 AndreasLutro I just don't see where the lists come in
14:08 stevednd joined #salt
14:08 AndreasLutro personally I've got a vhost.jinja which other templates can {% extends 'nginx/vhost.jinja' %} and anything complex gets its own vhost template
14:09 bluenemo my pillars then look kind of like this https://paste.debian.net/309467/
14:09 _mel_ joined #salt
14:09 bluenemo yeah I used to do that too.. but then I had customer related files in the formula..
14:09 stevednd anyone have any experience for the yaml(False) jinja function to format a dict as yaml? I'm getting weird behavior with an array where it's not indenting the array values under the key
14:10 bluenemo which I still have more or less.. nginx is kinda hard to orchestrate.. or better said its hard to abstract stuff that is completely different to the next config..
14:10 bluenemo you can have one vhost for php and one for rails and they might be 95% different. thats hard to abstract
14:11 AndreasLutro I find them very easy to abstract, but I force all my apps into very specific structures
14:11 bluenemo stevednd, you want to output it for looking at it (for debug) or parsing it? I'm using pprint filter for that
14:11 bluenemo yes, that makes it easy. the more your vhosts have in common, the more easy it gets to abstract sutff
14:12 AndreasLutro https://bpaste.net/show/2704167d28f6
14:12 bluenemo same goes for iptables imho.. kinda hard to write something clean..
14:12 favadi joined #salt
14:12 stevednd bluenemo: it's for a config file. just dumping the pillar dict into the config. It's technically correct yaml, it just reads weird because the hyphens are flush with the key
14:12 bluenemo yeah thats how I started too
14:12 AndreasLutro bluenemo: https://gist.github.com/anlutro/644fc588e228f0df14b9 is how I do iptables
14:12 AndreasLutro stops working if you need really advanced rules though
14:13 bluenemo hm na. the iptables state just cant do everything iptables can. I wasnt happy with that :)
14:13 clintberry joined #salt
14:13 AndreasLutro fair point
14:13 bluenemo idk for iptables it looked to me that abstracting it will result in way to much code to make it reasonable
14:13 bluenemo I think I'll go for a similar approach as with my nginx - currently dont have the time
14:13 bluenemo atm I'm just rolling out "files" ;)
14:14 AndreasLutro also, hosting wordpress with nginx... I'd give up right there
14:14 pdayton joined #salt
14:15 bluenemo AndreasLutro, https://paste.debian.net/309469/
14:15 bluenemo hehe I do as well :)
14:15 bluenemo I host most everything with nginx.. php, django, rails.. other stuff
14:16 bluenemo imho my current nginx way makes it easy to just build templates for "wordpress" - and then have easy pillars my customers can edit and understand fast.
14:16 bluenemo but its still "kinda" complex..
14:16 bluenemo but it gives me every freedom I want - if I have completely unique lines of config, I can build a macro for it and just dont have it use any arguments.
14:17 bluenemo a macro AndreasLutro https://paste.debian.net/309470/
14:17 AndreasLutro not sure I'd want customers editing pillars - I'd rather write an external pillar database with a webapp if that was part of my requirements
14:17 pdayton1 joined #salt
14:18 bluenemo hm. with me every customer has its own salt master server - they rent it themselves, I just do "consulting". I want them to understand the systems (or be able to get there if they want at all). letting them edit pillars safes good time there
14:19 AndreasLutro I see
14:19 bluenemo I'm currently getting into yaml schema validation stuff for the formulas.. also setting up some CI setup with vagrant and jenkins.. but thats another story
14:20 bluenemo what I want is to have the customer check if he wrote bad pillars (as in this has to be an int, so it fails for strings), as well if pillars render at all, as often they just dont render when there is a syntax error - and my ssh formula deletes all the keys ;)
14:20 bluenemo so yeah, more testing is my next project. test based saltstack formulas. kinda.
14:21 bastion2202 joined #salt
14:22 AndreasLutro ssh formula removes keys on bad pillar data? oh dear
14:23 andrew_v joined #salt
14:24 bluenemo well if you write a syntax error into your pillars, it will not give you any pillars at all ;)
14:25 tkharju joined #salt
14:25 bluenemo you can build a check into every formula if pillar['ssh'] is available at all - which imho one should
14:25 bluenemo however if you dont, and your "file" is filled with pillar data - salt will remove those lines in it.
14:25 AndreasLutro I avoid that by not using pillar.get when I don't need to
14:25 AndreasLutro {{ pillar.ssh.port }} will stop the state from executing for example
14:25 bluenemo hm. I need to in every formula I write basically
14:25 AndreasLutro {{ salt['pillar.get']('ssh:port') }} won't
14:26 bluenemo jup
14:26 bluenemo however most ppl merge into one single object at the beginning, as in merge defaults.yaml and pillars
14:26 bluenemo but yes, this fails too.. true, depends on what you use
14:27 AndreasLutro pillar/state validation in a CI environment is smart regardless
14:27 bluenemo yeah totally. I'll be so happy when I have it.
14:28 bluenemo It'll also notice if your ssh key is really a string, starting with, being longer then and so on. thats really a must have imho.
14:28 AndreasLutro reminds me of this thing I did https://bpaste.net/show/46eac05a37d6
14:28 AndreasLutro anyway, weekend. ciao
14:28 slav0nic joined #salt
14:29 bluenemo doing a 'git push' for a formula and having jenkins set it up on a fresh vm to see if it works - and then letting some tests run (can node 1 connect via ssh to node 2) is also quite interesting
14:29 bluenemo ah hehe :) would stop if test fails, not complain ;) cu around
14:30 ericof joined #salt
14:32 PI-Lloyd Salt + Vagrant + Jenkins = a hell of a lot less cock ups
14:33 PI-Lloyd our deployments have needed a lot less "hotfixes" since we managed to get our states test in Jenkins
14:33 mgsmith joined #salt
14:34 sunkist joined #salt
14:35 PI-Lloyd bluenemo, the only downside to spinning up a new VM for each test is it's not entirely representative of the production environment as people with access to prod have a nasty habit of making changes to prod systems
14:35 elsmo Is there a way to get a minion to render the state yaml out to stdout that it would apply through highstate, but not actually apply it?
14:36 PI-Lloyd elsmo, state.highstate --test=True
14:36 PI-Lloyd or state.show_highstate
14:39 elsmo PI-Lloyd that seems to only output what highstate itself outputs - i'm looking for the jinja-rendered yaml document
14:42 PI-Lloyd using --test=True on state.highstate or state.sls should output as if it had run, but not make any changes
14:43 PI-Lloyd if you have jinja in the state name for example, it will be rendered in that output
14:44 PI-Lloyd the other way you could do it is with 'state.sls <state> -l debug --test=True'
14:44 PI-Lloyd the debug output will show a lot more info, still may not entirely be what you're after though
14:45 PI-Lloyd actually i've just tested that on my machine, the debug output will show you the rendered jinja
14:45 elsmo PI-Lloyd: yeah just tried that, thats what i'm after, thanks!
14:45 PI-Lloyd no worries
14:46 elsmo There isn't any way to just render the jinja and output it without doing a whole highstate?
14:46 elsmo even if its a dry run, it takes a little bit of time :)
14:48 PI-Lloyd as mentioned "salt-call state.sls <state> -l debug --test=True" will run the one specific state
14:48 dthom91 joined #salt
14:49 Brew joined #salt
14:51 zsoftich3 joined #salt
14:54 Ztyx joined #salt
14:56 Brew joined #salt
14:57 dthom91 joined #salt
14:57 kbyrne joined #salt
14:57 Akhter joined #salt
14:59 Brew joined #salt
15:00 dude051 joined #salt
15:02 Brew joined #salt
15:03 iggy are there any formulas peeps in the house?
15:03 Akhter joined #salt
15:03 * babilen hides
15:03 Bryson joined #salt
15:03 bluenemo joined #salt
15:04 iggy babilen: did you ever get an email about https://github.com/saltstack-formulas/gce-formula/pull/1 ?
15:05 Ztyx1 joined #salt
15:05 saltstackbot joined #salt
15:06 orion left #salt
15:07 andrew_v joined #salt
15:07 sdm24 joined #salt
15:07 quasiben joined #salt
15:08 babilen iggy: Let me check
15:08 babilen no
15:08 iggy it had messed up perms I think... and I think maybe it didn't send out notifications for it (that or everybody hates me and doesn't want to look at my PRs)
15:08 shiriru joined #salt
15:09 shaggy_surfer joined #salt
15:10 iggy babilen: danke :)
15:10 babilen Can't be entirely sure if there was a notification on GH, but I definitely didn't receive a mail
15:10 saltstackbot [reddit-saltstack] Beginner question: Git.latest using pillar data for target https://www.reddit.com/r/saltstack/comments/3iow12/beginner_question_gitlatest_using_pillar_data_for/ - 2015-08-28 - 06:03:09
15:11 babilen huh ?
15:11 babilen Who gets up at six in the morning to ask a question and why is the bot spamming^Winforming us of reddit posts?
15:12 iggy I told it to
15:13 babilen But that was submitted 10 hours ago?!
15:13 shaggy_surfer joined #salt
15:13 iggy the bot died when Digital Ocean did network maintenance last night... I just restarted it
15:16 sdm24 does anyone know if it is possible to easily log what evironment states/calls/etc were running under? I want a way to easily see in the logs which minions are running production states, and which are running testing states
15:16 RedundancyD joined #salt
15:18 iggy if you set the environment in the minion config file (vs just setting it on the cmd line each time), you could use config.get
15:20 sdm24 Ah good call, thanks
15:23 Ztyx joined #salt
15:24 zmalone joined #salt
15:27 elsmo The docs give -names as an option for states.ssh_auth.present in the examples, but it isnt mention in the docs, all that is mentioned is 'name', non-plural. Can you pluralise many salt arguments, ie, use sources and then define a list of sources for ssh_auth.present ?
15:29 iggy elsmo: no, names is special (it's also global, so can be used in any state)
15:29 iggy it's effectively the same as using jinja to loop over a list of names
15:29 sgargan joined #salt
15:30 tanta joined #salt
15:31 elsmo ah right. is there a trick to pass it a list of files with keys in to put in one authorized keys files?
15:31 iggy not that I know of
15:32 jeadre joined #salt
15:36 clintberry joined #salt
15:37 jeadre joined #salt
15:38 protoz joined #salt
15:39 eliasp joined #salt
15:40 wendall911 joined #salt
15:40 protoz Hello, I'm having an issue using the gpg renderer.  I have the cipher in a pillar and when used in a state it is not being decrypted before being used by the state giving me a "mapping values are not allowed here" error
15:45 s_kunk joined #salt
15:46 quasiben joined #salt
15:47 VR-Jack protoz: did you setup your master's renderers for the pillar?
15:48 jcockhren protoz: you can also set a the renderers in a pillar's sls file
15:49 protoz renderer: jinja | yaml | gpg
15:49 protoz In the pillar file: #!yaml|gpg
15:49 VR-Jack and you imported the public key to the master?
15:50 protoz yes
15:50 VR-Jack sorry, private key.
15:51 dthom91 joined #salt
15:51 VR-Jack looks like it uses /etc/salt/gpgkeys
15:52 VR-Jack and make sure python-gnupg is installed
15:52 protoz yep I've been trying to follow the documentation on the saltstack site as closely as possible
15:53 protoz running salt-call gpg.list_keys shows the correct key and gpg.list_secret_keys matches
15:53 protoz The master is a minion of itself if that matters
15:54 protoz it is
15:54 VR-Jack well, we care about the master, since it is the one that decrypts pillar data
15:54 protoz running 2015.5.3
15:54 VR-Jack might try salt <minion> pillar.items and check the top for any errors.
15:55 theologian joined #salt
15:55 protoz it outputs the pillar as the cipher.  Is it supposed to decrypt it when calling it that way?
15:55 VR-Jack pillar.items will return things in the decrypted form if it's working. No need to test with a state.
15:56 VR-Jack pillar is decrypted when loaded by the master before it is sent to the minion
15:56 protoz well that's not good then
15:57 VR-Jack it's only use is protection of the pillar data when it is stored elsewhere, like a backup
15:58 protoz We're testing it for storing data in a git repo.
15:59 VR-Jack when you did pillar.items, did it return anything at the top in the errors part?
15:59 protoz root@hypervisor:~# salt-call pillar.items
15:59 protoz local:
15:59 protoz ----------
15:59 protoz hello:
15:59 protoz below that is the pgp cipher
15:59 VR-Jack don't use salt-call
16:00 VR-Jack use salt from a master's perspective. May not matter, but with pillar data hard to say.
16:01 VR-Jack may also try saltutil.pillar_refresh to update pillars in case the data is out of sync
16:01 protoz ran it as salt '*' pillar.items with the same output.  When I have it output debug info I don't see it loading gpg
16:02 protoz It lazyloads jinja and yaml but not gpg.
16:03 VR-Jack did you restart master after updating it's config for renderer?
16:06 protoz Yes but I can restart again
16:08 ekristen joined #salt
16:09 protoz fresh restart of both master and minion with no change
16:09 VR-Jack and no errors above the local: ?
16:10 VR-Jack Can try adding #!yaml|gpg to the top of the pillar sls and testing
16:14 Arbusto joined #salt
16:16 protoz https://gist.github.com/protoz/76d45b8035d92cb1f628
16:16 mpanetta joined #salt
16:18 protoz https://gist.github.com/protoz/b12c7b0b1a5c7b47ebcd
16:18 protoz That's the pillar
16:19 rm_jorge joined #salt
16:20 VR-Jack Did you try the #!yaml|gpg?
16:21 pheaubic joined #salt
16:21 protoz yep I posted that above
16:25 VR-Jack issue a saltutil.pillar_refresh?
16:26 protoz returned true and when I run pillar.items again the same output is shown
16:27 VR-Jack So you cut it off, but the return on the hello: I presume is the pgp digest?
16:29 Fiber^ joined #salt
16:29 protoz yep
16:29 pheaubic more a philosophy-related Q than a technical one.. I'm switching to salt from manual provisioning LEMP servers, and the first thing I would do manually is create users.. I'm wondering with salt if I even need to create a user, and if so should I just send minions my public key.. any guidance greatly appreciated.
16:31 jcockhren pheaubic: I have salt create a non-root user and send my public keys to it for emergency purposes
16:31 iggy pheaubic: it really depends what works best for your setup... f.ex. GCE creates users for us, so we don't have to deal with that (yet)
16:32 shaggy_surfer joined #salt
16:32 protoz All the state is doing is trying to print hello world into a temp file
16:32 pheaubic @jcockhren that is a concern for me.. it's always nice to be able to sftp in, just in case..
16:33 pheaubic @iggy my approach might be strange, but I'm just following my old manual process.. lol.
16:34 pheaubic lots of info online about what you CAN do with salt, not that much about what you SHOULD do, outside of the official docs.
16:35 c00p3r left #salt
16:35 favadi joined #salt
16:35 jcockhren pheaubic: my VMs are spun up with salt-cloud. you can manage users with -> https://github.com/saltstack-formulas/users-formula
16:35 saltstackbot [WARNING] link posted by jcockhren is possibliy malicious (confidence 100% - 10/10)
16:35 jcockhren LOL
16:35 pheaubic lol
16:36 jcockhren how can the link to the official salt formula repo be malicious?
16:36 pheaubic @jcockhren I actually started with salt-cloud.. I have it spinning up DO droplets.. *really* cool, love it.
16:36 pheaubic did not realize you could setup users with it though.. I'll look into that for sure.
16:40 iggy pheaubic: yeah, I ran into that at first too... there's a reason for that... use what works best for you
16:41 iggy it's often best to move your manual processess into salt, and then improve from there
16:41 iggy saltstackbot: shut up
16:41 duendecat joined #salt
16:41 jaybocc2 joined #salt
16:41 jcockhren pheaubic: prioritize your most used manual processes
16:41 RedundancyD joined #salt
16:41 iggy great, now I have to figure out how to get rid of whatever that check is
16:41 pheaubic lol
16:42 pheaubic well, salt-cloud has already removed a major pain point.
16:43 mapu joined #salt
16:45 khaije1 is there a configurable timeout for salt-ssh?
16:45 mark____1 joined #salt
16:46 zsoftich3 joined #salt
16:48 favadi joined #salt
16:48 Ahlee possible to set environment variables on winders?
16:49 Ahlee salt.states.environ is just for the salt minion, which isn't what i need
16:50 iggy shouldn't be that hard to code something up (using win_path as a template)
16:50 aparsons joined #salt
16:51 protoz VR-Jack: Any other ideas?  The renderer code looks like it's just shelling out to gpg and python-gnupg isn't needed
16:51 Ahlee probably
16:51 jmreicha joined #salt
16:52 pm90_ joined #salt
16:58 pheaubic @iggy @jcockhren many thanks for the guidance.
16:59 Arbusto joined #salt
17:00 VR-Jack protoz: not a clue. You're right that it isn't loading the renderer, though. If it was I'd expect an error or results. The only exception is if it doesn't recognize the block of code
17:00 dthom91 joined #salt
17:00 Arbusto joined #salt
17:03 Arbusto joined #salt
17:03 protoz I shouldn't need to add that #!yaml|gpg to my state right?  It should be decrypted before it hits the state
17:05 Arbusto joined #salt
17:06 pm90__ joined #salt
17:08 bastion2202 joined #salt
17:08 Arbusto joined #salt
17:09 KyleG joined #salt
17:09 KyleG joined #salt
17:10 tanta joined #salt
17:15 colonD joined #salt
17:18 forrest joined #salt
17:21 scoates Ryan_Lane: happen to be around?
17:23 basepi Ryan_Lane: https://github.com/saltstack/salt/pull/26747
17:23 saltstackbot [#26747]title: [2015.8] Add __states__ to state modules, for cross-calling states | Fixes #21214 ...
17:23 saltstackbot [WARNING] link posted by basepi is possibliy malicious (confidence 100% - 10/10)
17:23 basepi lol what?
17:24 iggy I'm working on it
17:24 denys joined #salt
17:24 basepi Hahaha
17:24 basepi I wondered if maybe you had put a special case in there for links I post or something
17:24 basepi I wouldn't put it past you. ;)
17:25 iggy I would put in something like "Noobs take note, basepi is a dev... ask him all your questions"
17:28 * basepi readies the banhammer
17:28 basepi ;)
17:29 basepi That would not be in my best interest to ban you, since you're super helpful in here. =)
17:29 forrest lol
17:29 basepi So instead I'll just sulk in the corner
17:29 basepi Or maybe I'll op you, that would teach you!
17:30 saltstackbot joined #salt
17:31 duendecat_ joined #salt
17:31 iggy forrest: https://github.com/saltstack-formulas/gce-formula/pull/1
17:31 saltstackbot [#1]title: GCE states/grains/etc | This is a port over of some helpful GCE states and grains we have lying around....
17:32 forrest I don't know, this 'iggy' guy seems like he's kinda new....
17:32 forrest I actually can't merge that
17:32 forrest the button isn't there.
17:32 iggy fsck
17:32 iggy the perms must still be messed up
17:32 forrest Yeah it looks like Dave made it, so it's probably locked to that group
17:32 iggy whiteinge: ping! gce-formula perms still seem to be wonky
17:33 forrest iggy: It's gotta just be assigned to the wrong group since Dave created it and he's a tier above us.
17:33 forrest Also iggy, you should replace https://github.com/saltstack-formulas/gce-formula/blob/master/LICENSE with the condensed license
17:33 iggy yeah, I tried to get it fixed yesterday
17:33 forrest no reason for that monstrosity
17:33 iggy blame utahdave
17:36 iggy done
17:36 forrest Thanks
17:41 stanchan joined #salt
17:42 dthom91 joined #salt
17:42 writtenoff joined #salt
17:42 zsoftich3 joined #salt
17:46 baweaver joined #salt
17:48 sdm24 if I'm using gitfs as my main fileserver and have a winrepo there, how would I update the winrepo.p file? Would 'salt-run winrepo.genrepo' on the master do it, or only make a local file?
17:49 sdm24 alternatively, should I remove that winrepo.p from git and keep it only locally? will Salt still see the .sls files on git?
17:50 baweaver joined #salt
17:51 scoates so, I'm afraid to ask, but no one here is actually using boto_iam_role.present right?
17:51 basepi I assume Ryan_Lane probably is, but I'm unsure.
17:54 zz_Cidan does anyone know if it's possbile to get pillar data in a custom module?
17:54 zz_Cidan ie, __pillar__ or something?
17:55 Ryan_Lane scoates: I am, extensively
17:56 Ryan_Lane scoates: why's that? I can't think of anything legitimately wrong with it :)
17:56 dthom91 joined #salt
17:57 tmclaugh[work] joined #salt
17:57 scoates Ryan_Lane: I have this. http://paste.roguecoders.com/p/3a76b7e311839b06f0803213f2bce369.txt ; gives me this: http://paste.roguecoders.com/p/99f1e62a66e16b1e616d0210e4947865.txt (it creates the user + role properly, but fails to create the policy.
17:58 scoates (same without Version)
17:58 Ryan_Lane that doesn't look like a valid policy to me
17:59 scoates oh? well, that's good. what doesn't look right?
17:59 Ryan_Lane one sec
17:59 Ryan_Lane you want: - 'ec2:*'
18:00 Ryan_Lane for instance
18:00 tmclaugh[work] joined #salt
18:00 Ryan_Lane not ec2: '*'
18:00 Ryan_Lane the latter is a dict, the former is a string
18:00 scoates I see
18:00 LeProvokateur joined #salt
18:00 Ryan_Lane scoates: if you take a policy from the console and convert it to yaml, that's basically what you need
18:00 scoates something something yaml
18:00 scoates ok, thanks.
18:00 Ryan_Lane yw
18:01 Ryan_Lane nitpick: {%if pillar.get('awsprofile')%}- profile: awsprofile{%endif%}
18:01 Ryan_Lane way more readable if you put the jinja above and below and keep everything indented the same way
18:03 zblum joined #salt
18:03 scoates ? that's indented correctly. I guess I could actually just use `- profile: pillar.get('awsprofile')` because that will default to None
18:04 scoates oh, actually, that's not right either. Leaving that well-alone for now.
18:04 zblum joined #salt
18:05 Ryan_Lane it's indented correctly :)
18:05 Arbusto joined #salt
18:05 Ryan_Lane scoates: https://gist.github.com/ryan-lane/93e0d4f17fcbcd6188b3
18:06 scoates oh, I see what you mean. *nod* that makes all kinds of ugly YAML without the whitespace squashers that I can never remember. Does make sense, though.
18:06 Ryan_Lane well, that's only if you ever look at the derived output :)
18:07 Ryan_Lane I updated this with what should be correct syntax: https://gist.github.com/ryan-lane/93e0d4f17fcbcd6188b3
18:07 Arbusto joined #salt
18:08 scoates yep. I've got it working now.
18:08 zz_Cidan doot
18:08 scoates thank you for saving the last crumb of my sanity. again.
18:08 zz_Cidan does anyone know if you can access pillar data in custom modules?
18:08 Ryan_Lane :D
18:08 Ryan_Lane yw
18:08 scoates zz_Cidan: __pillar__
18:08 zz_Cidan okay, cool
18:08 zz_Cidan fantastic
18:09 Ryan_Lane we definitely need better docs for the modules
18:09 scoates or pillar in Jinja
18:09 zz_Cidan trying to avoid messy template
18:09 Ryan_Lane one of these days I'll get around to doing that
18:09 zz_Cidan if I can write a module that does the heavy lifting, the better
18:09 Ryan_Lane scoates: we actually have exporter functions for a number of things
18:09 Ryan_Lane so that you can turn existing resources into salt states
18:09 scoates Ryan_Lane: oh, nice.
18:10 Ryan_Lane I don't think I made one for iam roles, but I'm pretty sure I did for users
18:10 scoates zz_Cidan: you'll be calling this module from a minion?
18:10 Ryan_Lane did I upstream that...?
18:10 Ryan_Lane :D
18:10 zz_Cidan no, from a state
18:10 zz_Cidan from jinja actually
18:11 zz_Cidan salt['module.fun']()
18:11 scoates a state on a minion, yeah? __pillar__ should work as you'd expect, then.
18:11 zz_Cidan perfect
18:11 scoates (you can also call modules from reactor, runners, etc.)
18:11 scoates and pillar might not be what you expect there… but it's complicated, so pretend I said nothing (-;
18:12 Arbusto joined #salt
18:13 zz_Cidan it's fine, for this case, it's exactly what I need
18:14 Ryan_Lane heh. I didn't upstream that
18:17 iggy basepi: how hard would it be to put __util__ in along with __states__ ?
18:17 basepi Is __util__ a thing?
18:17 basepi o.O
18:18 Ryan_Lane basepi: yes :)
18:18 basepi huh. sure enough. Theoretically just as easy.
18:18 iggy note: I didn't look at your PR to see how you did the __states__
18:18 Ryan_Lane we got it added for the boto stuff recently
18:18 basepi Where does __utils__ feed from?
18:18 Ryan_Lane I requested it
18:19 Ryan_Lane it's to have custom util modules
18:19 basepi Oh, I did notice that we can sync _utils
18:19 Ryan_Lane yep
18:19 basepi but I assumed it would sync to be available via `import salt.utils` or something
18:19 Ryan_Lane that's to make backports easier
18:19 basepi But I guess that couldn't work
18:19 iggy we constantly field questions about using salt.utils.dict_merge (or whatever) in other places
18:19 basepi Needs to be more dynamic
18:19 Ryan_Lane yep
18:19 basepi Does it also load the existing salt.utils into __utils__?
18:19 Akhter joined #salt
18:19 Ryan_Lane all of the boto stuff I'm doing, for instance, is developed against develop and runs in 2015.5
18:19 Ryan_Lane yep
18:20 basepi Cool. Yeah, iggy, give me 5 minutes.
18:20 basepi I'll add that
18:20 iggy ^5
18:20 Ryan_Lane awesome :)
18:20 iggy murrdoc might wet himself
18:21 favadi joined #salt
18:21 Ryan_Lane the __states__ thing is going to shave ~10 mins from some of my orchestration runs
18:22 jeadre joined #salt
18:22 Ryan_Lane since we won't need to reload modules over and over again
18:22 basepi =D
18:22 Ryan_Lane maybe I'll spend some time today upstreaming things we forgot about :D
18:25 Ryan_Lane for instance... https://github.com/saltstack/salt/pull/26749 << scoates
18:25 saltstackbot [#26749]title: Add execution module to export current IAM users |
18:25 Ryan_Lane that's only for IAM users, but I'd imagine it should be easy to also add one for roles
18:26 scoates nice
18:26 X67r joined #salt
18:28 zblum joined #salt
18:29 rcurrah joined #salt
18:32 drawsmcgraw joined #salt
18:32 Ryan_Lane scoates: also added this yesterday: https://github.com/saltstack/salt/pull/26724
18:32 saltstackbot [#26724]title: Add ENI support to boto_ec2 state and execution modules |
18:33 Ryan_Lane not sure if you use ENIs or not (hopefully not), but available in develop now :D
18:33 Ryan_Lane well, soonish anyway
18:33 zblum joined #salt
18:36 akoumjian Hey. Got a minion on Ubuntu 14.04, salt 2015.5.5. It looks like git.latest is not actually pulling in latest updates.
18:37 ajw0100 joined #salt
18:37 Ryan_Lane akoumjian: https://github.com/saltstack/salt/issues/13550
18:37 saltstackbot [#13550]title: git.latest and git.present state functions are misleading | git.latest will do a clone and always will fetch is no rev is listed, but will only clone and never update if rev is given and always_fetch is False (the default). git.present will just create an empty repo. At minimum git.latest is poorly named.
18:37 basepi https://github.com/saltstack/salt/pull/26750
18:37 saltstackbot [#26750]title: [2015.8] Add __utils__ to state modules | @ryan-lane ...
18:38 basepi That one wasn't quite as simple, decided to do it "properly" and use the existing loaded utils where possible, but straightforward nonetheless
18:38 zz_Cidan fff
18:38 zz_Cidan does anyone know why a pillar may not show up in __pillar__ in a module?
18:38 zz_Cidan all my other pillars do, except this one
18:38 zz_Cidan and any new ones I add, don't show up
18:39 akoumjian Ryan_Lane: thanks, what is the recommended course for this version of salt, then? always_fetch True?
18:39 Ryan_Lane akoumjian: I think you need to use git.present, not latest
18:40 Ryan_Lane maybe?
18:40 Ryan_Lane I can never remember because the function names make no sense
18:41 akoumjian I'm going to say probably not because it doesn't look like it yet supports specifying a branch / commit
18:42 akoumjian oh wait, I already have always_fetch as true
18:43 zz_Cidan wtf this is so random
18:43 zz_Cidan my pillar shows up on some servers
18:43 zz_Cidan but not others
18:44 tkharju joined #salt
18:44 baweaver joined #salt
18:45 Akhter joined #salt
18:45 akoumjian It used to support tracking a branch, which is what I want. Any suggestions welcome.
18:46 iggy zz_Cidan: make sure you run something that causes a pillar_refresh
18:46 zz_Cidan I did highstate
18:46 zz_Cidan does that not do it
18:47 zz_Cidan restarting the salt minion entirely seems to have fixed
18:47 zz_Cidan me thinks it's a bug
18:48 favadi joined #salt
18:55 DammitJim joined #salt
18:56 Arbusto joined #salt
18:57 Arbusto_ joined #salt
18:58 breakingmatter joined #salt
19:02 dthom91 joined #salt
19:02 KyleG joined #salt
19:02 KyleG joined #salt
19:06 ntropy zz_Cidan: highstate should also refresh pillars
19:06 giantlock joined #salt
19:10 s_kunk joined #salt
19:12 zwi joined #salt
19:19 Akhter joined #salt
19:20 Arbusto joined #salt
19:21 mikeywaites joined #salt
19:23 Arbusto joined #salt
19:24 v0rtex in state files I have noticed most examples use `{{ salt['pillar.get'](...) }}` but in my experience `{{ pillar.get(...) }}` works too...is there a reason why I'd want to use the first version over the second?
19:26 Arbusto joined #salt
19:27 v0rtex maybe I answered my own question: when the value doesn't exist the first method results in an empty string whereas the second renders "None"
19:31 zmalone joined #salt
19:32 rdutch left #salt
19:35 Arbusto joined #salt
19:36 intel joined #salt
19:38 tmclaugh[work] joined #salt
19:38 BigBear joined #salt
19:45 cberndt joined #salt
19:52 root____7 joined #salt
19:54 baweaver joined #salt
19:55 Arbusto joined #salt
19:58 ajw0100 joined #salt
20:01 Arbusto joined #salt
20:11 XenophonF joined #salt
20:12 jeadre joined #salt
20:13 KyleG joined #salt
20:13 KyleG joined #salt
20:13 whiteinge iggy: second attempt. try now.  :-P
20:13 ekristen are their any things to consider with upgrading between 2014.7.x and 2015.5.x?
20:16 ekristen basepi: :)
20:18 basepi A few people had some issues but I can't remember the details..... Apparently I block out the whiners
20:18 ekristen lol
20:18 basepi Many others have had great success with 2015.5
20:19 dthom91 joined #salt
20:20 ekristen one more question, is 2015.08 a version of 2015.5 or a new major version?
20:20 ekristen wait disregard looking at the wrong repo :)
20:25 dthom91 joined #salt
20:28 tmclaugh[work] joined #salt
20:31 Arbusto joined #salt
20:35 Configio joined #salt
20:36 BigBear joined #salt
20:36 opensource_ninja joined #salt
20:37 Configio joined #salt
20:41 Ryan_Lane 2014.7 was a mess
20:41 ekristen basepi: this doesn’t really explain how to organize or how the minion decides which signing key to use to validate the master http://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html
20:41 Ryan_Lane at least for master/minion
20:41 Ryan_Lane 2015.5 is supposed to be much better in that regard
20:41 Ryan_Lane they're all fine for masterless
20:42 ekristen I disagree Ryan_Lane I’ve never had a problem with master/minion with 2014.7
20:42 Ryan_Lane how many minions do you have?
20:42 ekristen I’m sure ther has been problems, but I wouldn’t say it was a mess :)
20:42 ekristen 150ish
20:42 * Ryan_Lane nods
20:42 Ryan_Lane with higher minion numbers it didn't handle well
20:42 ekristen ah
20:43 catpig joined #salt
20:43 akoumjian So is nobody on the latest stable release and also using a git state that follows a branch?
20:44 ekristen looking to upgrade to 2015.5 and do multi master but the docs are a little vague
20:44 geekatcmu if you do multi-master, remember that mines don't work
20:44 ekristen oh really, interesting
20:44 geekatcmu well, they "work", but the data on each master will only reflect the minions which use that master.
20:45 ekristen geekatcmu: that makes sense
20:45 Ryan_Lane I also have no idea how events with in multi-master
20:45 Ryan_Lane not sure I've ever had that explained well to me
20:45 geekatcmu yeah
20:45 geekatcmu good question
20:46 Akhter joined #salt
20:47 Arbusto joined #salt
20:49 Configio joined #salt
20:50 jmreicha joined #salt
20:53 sdm24 at about what number of minions should I increase worker_threads?
20:53 sdm24 I'm occasionally getting the error that I should increase it, but I'm not sure if that is what is causing the issues
20:55 Akhter joined #salt
21:01 indispeq joined #salt
21:03 dthom91 joined #salt
21:03 pm90_ joined #salt
21:04 Arbusto joined #salt
21:10 quasiben joined #salt
21:11 tanta joined #salt
21:11 RedundancyD joined #salt
21:11 wendall911 joined #salt
21:14 Akhter joined #salt
21:21 Arbusto joined #salt
21:22 subsignal joined #salt
21:25 Fiber^ joined #salt
21:26 moss hi
21:27 XenophonF left #salt
21:27 moss any salt experts: I want to set up Saltstack to deploy standard Wordpress site setups for customers (just a basic LAMP stack install plus wget'ing wordpress in the proper directory) - is this possible to do with salt without  making their server a minion and then removing it?
21:28 nkuttler moss: have a look at salt-ssh
21:28 moss nkuttler: thanks :)
21:33 Arbusto joined #salt
21:34 indispeq joined #salt
21:35 zsoftich3 joined #salt
21:37 Arbusto joined #salt
21:39 Akhter joined #salt
21:40 zmalone joined #salt
21:41 iggy forrest: can you try now?
21:42 forrest iggy: Done
21:42 iggy Danke!
21:42 iggy whiteinge: works now, thanks :)
21:43 zwi joined #salt
21:43 Ryan_Lane basepi: https://gist.github.com/ryan-lane/2bc8c78d57396c76d33d :(
21:43 zero_shane joined #salt
21:47 basepi And can you call that state directly? i.e., can you verify that it's actually loaded?
21:47 zz_Cidan so werid bug, sometimes highstate doesn't refresh pillar
21:48 zz_Cidan but a refresh pillar saltutil does
21:48 iggy zz_Cidan: what version?
21:48 zz_Cidan 2015.3
21:49 iggy zz_Cidan: search for and file a bug
21:50 zz_Cidan hm ok
21:51 protoz joined #salt
21:51 Ryan_Lane basepi: it's a custom state
21:52 Ryan_Lane it's working with state.single, but not with __states__
21:52 Ryan_Lane this is backported to 2015.5, btw
21:52 Ryan_Lane to make your life more difficult
21:53 _JZ_ joined #salt
21:54 Arbusto joined #salt
21:54 Ryan_Lane I'm assuming that it hasn't loaded the custom modules at this point
21:54 Arbusto joined #salt
21:54 Ryan_Lane basepi: when you tested this, did you try with custom modules, or just core ones?
21:55 basepi Only core. That very well could be the problem. But it's the same object, so I feel like they should make it in. Side effects and all that.
21:56 basepi Similar line in minion_mods for packing __salt__ in modules: https://github.com/saltstack/salt/blob/c66491a57de1537ee569ac7bc6169963ac9f7cb6/salt/loader.py#L207
21:58 baweaver joined #salt
21:58 Ryan_Lane hm
21:58 Ryan_Lane let me test something. maybe I have something weird going on
21:58 basepi It may need more work. I won't have time to look at it more today, but possibly monday
21:59 Configio joined #salt
22:00 scoates joined #salt
22:01 ALLmight_ joined #salt
22:01 wendall911 joined #salt
22:02 Ryan_Lane I must have something broken somewehre
22:02 Ryan_Lane because I just made two custom test states and called one from another
22:10 rdxc joined #salt
22:16 Ryan_Lane but another custom state surely isn't working....
22:19 duendecat_ joined #salt
22:20 Ryan_Lane basepi: hm. are they only packed into the called functions?
22:21 Ryan_Lane what if I call a private function from a state function, like present -> _test()
22:21 Ryan_Lane and use __states__ inside of that private function?
22:21 Ryan_Lane or is it packed into the module?
22:24 Ryan_Lane it's like it's working for every module except a single one... that's being called from within a private function.
22:24 basepi I was under the impression it was packed into the module. But it's possible it's function. Tom did say something about "at runtime"
22:24 basepi That the packing happens at runtime, I mean.
22:24 basepi So that may be the answer.
22:27 relidy joined #salt
22:29 andygabby joined #salt
22:30 duendecat_ joined #salt
22:32 iggy erjohnso_: https://github.com/saltstack-formulas/gce-formula feel free to share that with people, I'll be adding (more) CentOS support soon (just debian for now)
22:44 packeteer joined #salt
22:59 ajw0100 joined #salt
22:59 indispeq_ joined #salt
23:01 indispeq- joined #salt
23:01 bfoxwell joined #salt
23:02 notnotpeter joined #salt
23:03 baweaver joined #salt
23:03 nlb_ joined #salt
23:05 kidneb joined #salt
23:05 blue0ctober joined #salt
23:08 cberndt joined #salt
23:10 pdayton joined #salt
23:22 dthom91 joined #salt
23:23 Ryan_Lane basepi: I'm pretty sure I'm at fault for this :)
23:23 Ryan_Lane the module I was missing was missing a pip dependency. it uses boto3 :D
23:35 Gareth Ryan_Lane: http://technabob.com/blog/wp-content/uploads/2014/08/picard1.jpg
23:36 Ryan_Lane Gareth: yep :)
23:36 lexter joined #salt
23:36 Ryan_Lane basepi: works perfect. operator error!
23:42 bastion2202 joined #salt
23:46 Ryan_Lane hm. now the question is how to modify the upstream boto modules in a way that make this backwards compatible :D
23:50 scoates joined #salt
23:50 pdayton joined #salt
23:54 shaggy_surfer1 joined #salt

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