Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-08-04

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

All times shown according to UTC.

Time Nick Message
00:03 stok303 joined #salt
00:17 dthom91 joined #salt
00:20 XenophonF levlaz: do you mean automated testing?
00:23 nzero joined #salt
00:26 otter768 joined #salt
00:26 baweaver joined #salt
00:37 levlaz XenophonF: Yep automated
00:37 tzero joined #salt
00:40 markm joined #salt
00:40 NOTHiNG_Fr joined #salt
00:47 c10b10 joined #salt
00:47 omegamike joined #salt
00:48 NOTHiNG_Fr joined #salt
00:52 alwaysatthenoc joined #salt
00:54 NOTHiNG_Fr joined #salt
00:55 NOTHiNG_Fr joined #salt
01:01 amcorreia_ joined #salt
01:11 murrdoc joined #salt
01:21 evilrob joined #salt
01:23 juanito joined #salt
01:24 zzzirk joined #salt
01:30 thehaven_ joined #salt
01:30 hasues joined #salt
01:34 hasues left #salt
01:40 dthom91 joined #salt
01:41 juanito joined #salt
01:42 dthom91 joined #salt
01:46 zsoftich1 joined #salt
01:46 evilrob joined #salt
02:01 dthom91 joined #salt
02:07 druonysus joined #salt
02:15 murrdoc whats the default returner called in saltstack
02:19 zero-ghost1 joined #salt
02:19 mapu joined #salt
02:19 zero-ghost1 please forward this to moonchild:  https://torrentfreak.com/popcorn-time-vulnerable-to-hack-attacks-researcher-says-150803/
02:20 zero-ghost1 im making a point to return here to paste articles explaining the dire situation of NOT having SSL everywhere
02:20 zero-ghost1 and the IDIOCY of thinking you dont need SSL everywhere
02:20 zero-ghost1 “HTTP is insecure. There’s nothing you can do to change this. Please,  use HTTPS everywhere, especially in applications that don’t run inside a  web browser. Second, sanitize your input. Even if you receive something  over TLS v1.2 using a Client Certificate, it still isn’t secure! Always  perform client-side checks of the server response,” he notes.
02:24 murrdoc http://www.wired.com/2015/07/hacking-team-leak-shows-secretive-zero-day-exploit-sales-work/
02:31 Furao joined #salt
02:32 evle joined #salt
02:32 cowpunk22 joined #salt
02:36 c10b10 joined #salt
02:41 cedwards_ joined #salt
02:44 Ahlee woo, they're alive
02:47 cedwards_ this is driving me crazy.. using salt-call I can query data from my custom ext_pillar, but the salt command (targeting multiple minions) returns nothing.
02:51 nikob joined #salt
02:51 murrdoc joined #salt
02:58 favadi joined #salt
03:01 napsterX joined #salt
03:01 Bryson joined #salt
03:17 zzzirk joined #salt
03:23 dthom91 joined #salt
03:24 thehaven joined #salt
03:24 murrdoc joined #salt
03:24 murrdoc https://github.com/saltstack/salt/blob/2014.7/salt/utils/__init__.py#L1488 this file is awesome
03:29 claytron_ joined #salt
03:30 rhodgin joined #salt
03:31 aqua^c joined #salt
03:36 mosen joined #salt
03:47 cowpunk22 joined #salt
03:49 dude^2 joined #salt
03:50 otter768 joined #salt
03:57 _JZ_ joined #salt
03:58 zero-ghost1 left #salt
04:00 zsoftich any reason why mine_functions don't seem to work until I restart the salt-minion?
04:01 zsoftich I'm using pillar btw
04:07 clintberry joined #salt
04:10 mosen i found the same zsoftich
04:11 mosen I didnt see the scheduler pick up that job until the minion started again
04:19 theologian joined #salt
04:24 subsignal joined #salt
04:25 c10b10 joined #salt
04:27 zsoftich hehe..good to know...adding notes
04:28 zsoftich http://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-daemon-using-salt
04:28 zsoftich handy in this case
04:29 mosen i saw that theres an execution module for mine.update
04:29 mosen tried that out
04:34 zsoftich yeah...runnning salt '*' mine.update doesn't seem to do it
04:42 theologian joined #salt
04:49 ramteid joined #salt
04:50 theologian joined #salt
04:54 falican joined #salt
04:55 zzzirk joined #salt
04:57 tiadobatima joined #salt
05:01 Bryson joined #salt
05:03 ageorgop joined #salt
05:11 bitc01d joined #salt
05:15 aparsons joined #salt
05:16 dopesong joined #salt
05:20 stoogenmeyer_ joined #salt
05:24 catpigger joined #salt
05:25 subsignal joined #salt
05:28 tzero joined #salt
05:31 rdas joined #salt
05:32 eliasp joined #salt
05:32 rdas_ joined #salt
05:37 hunmonk_ joined #salt
05:38 hunmonk_ is there a way, in a state file, to strip a file extension from a filename string? i was hoping there was either a jinja filter or a salt func, but haven't been able to find either yet.
05:39 evilrob joined #salt
05:40 rdas_ joined #salt
05:46 tzero joined #salt
05:48 rdas joined #salt
05:49 napsterX joined #salt
05:51 otter768 joined #salt
05:52 gcfhvjbkn joined #salt
05:58 apofis joined #salt
06:02 nikob joined #salt
06:02 babilen hunmonk_: https://docs.python.org/2/library/os.path.html#os.path.splitext is what you are looking for (and now, wouldn't it be wonderful if jinja2 would allow module import)
06:03 babilen That functionality might be available in a salt module already though
06:03 babilen If not it would be trivial to write it
06:03 hunmonk_ babilen: i looked fairly thoroughly through the sys.doc stuff, didn't see anything
06:04 hunmonk_ babilen: how do i access the os python module via a salt state? it errored when i tried to use it directly jinja style
06:04 babilen Yeah, you can't
06:04 babilen This is why jinja was a bad choice as default templating engine
06:05 hunmonk_ babilen: i suppose i could use the pyobjects renderer, i haven't tried that yet
06:05 tzero joined #salt
06:05 babilen You could implement a custom execution module, place it in _modules and implement a splitext function in there that simply wraps os.path.splitext
06:06 babilen (or use a different renderer, all the #!py* renderers allow you to use it, #!mako as well, ...)
06:08 babilen But just out of experience: The inability to easily include arbitrary Python blocks in the template is the single most annoying thing in jinja2 and, by extension, salt. You will want to maintain your "I really just want to call something in the standard library/this is trivial in Python!"-module anyway as you'll need that functionality soon
06:08 AndreasLutro joined #salt
06:12 jaybocc2 joined #salt
06:13 omegamike joined #salt
06:14 c10b10 joined #salt
06:17 _JZ_ joined #salt
06:18 stoogenmeyer_ joined #salt
06:19 czchen joined #salt
06:23 dopesong joined #salt
06:23 lb1a joined #salt
06:26 subsignal joined #salt
06:32 froztbyte hrm
06:32 froztbyte so I have some jinja in a SLS
06:32 froztbyte and I want to make sure a given state has run before I try to run this jinja
06:33 tzero joined #salt
06:33 froztbyte specifically, gpg.list_keys() fails if you don't have python-gnupg
06:33 froztbyte but I'm not sure how to test if an SLS/State has been completed already
06:33 froztbyte the normal requisites and stuff are all for inter-state linking
06:36 AndreasLutro froztbyte: you can't. just put - order: 0 on the python-gnupg state to make sure it runs first
06:37 c10b10 joined #salt
06:37 napsterX joined #salt
06:38 zemm joined #salt
06:38 kawa2014 joined #salt
06:39 froztbyte AndreasLutro: hmm, I'll try that
06:39 dopesong_ joined #salt
06:41 froztbyte Just saw it late yesterday, will have to check today
06:42 TyrfingMjolnir joined #salt
06:45 jeddi joined #salt
06:45 tzero joined #salt
06:47 Fiber^ joined #salt
06:53 TaiSHi joined #salt
06:54 malinoff joined #salt
06:59 tzero joined #salt
06:59 Ztyx joined #salt
07:01 KermitTheFragger joined #salt
07:15 tzero joined #salt
07:17 gcfhvjbkn joined #salt
07:18 jaybocc2 joined #salt
07:18 DjDeaf joined #salt
07:19 eseyman joined #salt
07:19 DjDeaf Does anyone have experience with batch and failhard mode?
07:25 jcockhren joined #salt
07:26 tzero joined #salt
07:26 c10b10 joined #salt
07:27 subsignal joined #salt
07:27 smkelly joined #salt
07:34 jaybocc2 joined #salt
07:34 Ztyx left #salt
07:35 markm joined #salt
07:36 oyermolenko joined #salt
07:45 linjan_ joined #salt
07:48 zz_ashmckenzie joined #salt
07:51 otter768 joined #salt
07:54 tzero joined #salt
07:55 apofis joined #salt
08:00 tzero joined #salt
08:02 omegamike joined #salt
08:06 DjDeaf I'm not sure it is even possible, but after 1 month i'm trying to figure it out, i must ask - IS there a way to stop batch 'salt' command, when one of the servers fail? so it won't go ahead to deploy the rest? I see there's a git case for it, and deployed but none is working. PLEASE :)
08:09 jaybocc2 joined #salt
08:14 oyermolenko joined #salt
08:16 jmreicha joined #salt
08:23 tzero joined #salt
08:25 jaybocc2 joined #salt
08:26 N-Mi joined #salt
08:27 sirex joined #salt
08:28 froztbyte wtf
08:28 froztbyte is there any issue with the docs site?
08:28 froztbyte http://docs.saltstack.com/en/latest/ref/states/all/salt.states.htpasswd.html doesn't load for me, but docs.saltstack.com is fine
08:29 froztbyte as is some other random hit like http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.apache.html
08:29 dankrs salt.states.htpasswd.html loads for me
08:29 AndreasLutro loads fine here
08:31 froztbyte what the hell
08:31 froztbyte I've tried 3 different browsers now, none work
08:31 froztbyte this makes no sense
08:31 AndreasLutro curl it
08:33 froztbyte barney% curl -m 10 -LI docs.saltstack.com/en/latest/ref/states/all/salt.states.htpasswd.html
08:33 froztbyte curl: (28) Operation timed out after 10003 milliseconds with 0 bytes received
08:33 froztbyte for the other URL: curl -m 10 -LI  0.00s user 0.00s system 1% cpu 0.595 total
08:33 AndreasLutro does an nslookup work?
08:33 froztbyte yes
08:34 froztbyte I've already covered all the basics
08:34 froztbyte that's why I said, this makes no sense
08:34 AndreasLutro well since it's hosted on wpengine, I'll blame wordpress
08:34 froztbyte heh
08:35 chiui joined #salt
08:36 BlackJackAc3 joined #salt
08:36 Alan_S joined #salt
08:37 scott_w joined #salt
08:37 aparsons joined #salt
08:37 c10b10 joined #salt
08:37 zer0def joined #salt
08:37 Garo_ joined #salt
08:37 bougie joined #salt
08:37 eightyeight joined #salt
08:37 vando joined #salt
08:37 AirOnSkin joined #salt
08:37 Tod-Work joined #salt
08:37 repl1cant joined #salt
08:37 ekkelett joined #salt
08:37 JPaul joined #salt
08:37 daemonkeeper joined #salt
08:37 kwork joined #salt
08:37 dayid joined #salt
08:37 kaictl joined #salt
08:37 mitsuhiko joined #salt
08:37 ecdhe joined #salt
08:37 paha joined #salt
08:37 Ssquidly joined #salt
08:37 campee joined #salt
08:37 und1sk0 joined #salt
08:37 arnoldB joined #salt
08:37 rnts joined #salt
08:37 tempspace joined #salt
08:37 froztbyte okay yeah no
08:38 froztbyte I can only imagine it's some kind of weird loadbalancer hashing crap
08:38 froztbyte based on source IP and endpoint URL
08:38 froztbyte becaue anywhere else I test this, it's fine, just not at my current location
08:38 Puckel_ joined #salt
08:38 * froztbyte grabs the pdf
08:40 forrest joined #salt
08:41 tzero joined #salt
08:50 CeBe joined #salt
08:52 monkey66 joined #salt
09:07 VooDooNOFX joined #salt
09:09 aqua^c joined #salt
09:10 tzero joined #salt
09:11 oravirt joined #salt
09:24 viq joined #salt
09:29 subsignal joined #salt
09:29 tzero joined #salt
09:47 _mel_ joined #salt
09:50 tzero joined #salt
09:52 otter768 joined #salt
09:59 ksj joined #salt
10:01 jaybocc2 joined #salt
10:09 ksj morning. when using salt-ssh, how can I get the minion logs? salt generates a tmpdir (thindir) for its environment (by default in /tmp/.USER_HASH_salt), but for me there's nothing in $thindir/running_data/var/log/minion
10:10 jespada joined #salt
10:12 fmn joined #salt
10:12 AndreasLutro ksj: that was only recently fixed, hasn't made it into a stable release yet (I think)
10:12 DjDeaf I'm not sure it is even possible, but after 1 month i'm trying to figure it out, i must ask - IS there a way to stop batch 'salt' command, when one of the servers fail? so it won't go ahead to deploy the rest? I see there's a git case for it, and deployed but none is working. PLEASE :)
10:14 tzero joined #salt
10:14 AndreasLutro ksj: https://github.com/s0undt3ch/salt/commit/afba3bde90b763c10d97f5d741b59414a734b2ba puts the log in /tmp/.user_asdfgh_salt/running_data/salt-call.log
10:14 ksj AndreasLutro: ahh, ok, that's a nuisance, but good to know it's been fixed. Any ideas why pkg.install fails over salt-ssh? pkg.remove works fine. It's the same on two different minion OSs
10:14 AndreasLutro ksj: fails how?
10:15 ksj it does nothing. no errors or anything
10:15 ksj it returns though. it just doesn't return any data
10:15 AndreasLutro how are you calling pkg.install ?
10:15 AndreasLutro and what are the distros?
10:16 jaybocc2 joined #salt
10:17 ksj openbsd and arch linux. let me experiment some more, it's a little hard to say what's going on right now, without a minion log!
10:19 AndreasLutro it works fine for me on debian, might be a flaw with the bsd/arch specific pkg module implementations
10:25 tzero joined #salt
10:30 ksj nah, I think it was my mistake actually. I didn't have sudo set on one of the minions, and salt didn't throw any error. I also have issues installing pkgs manually on one of the other minions, so i was just a bit confused. thanks
10:32 tzero joined #salt
10:34 jhauser joined #salt
10:38 tzero joined #salt
10:38 linjan joined #salt
10:43 DjDeaf joined #salt
10:46 tzero joined #salt
10:46 evle1 joined #salt
10:46 stoogenmeyer__ joined #salt
10:47 markm joined #salt
10:47 c10b10 joined #salt
10:51 omegamike joined #salt
10:52 pdayton joined #salt
10:54 pdayton1 joined #salt
10:56 tzero joined #salt
10:59 linjan joined #salt
11:00 dopesong_ joined #salt
11:03 tzero joined #salt
11:07 amcorreia_ joined #salt
11:09 jim_ joined #salt
11:11 jaybocc2 joined #salt
11:12 joehh1 twobitsprite: I'd been wondering when someone would ask...
11:12 joehh1 I had some issues building them a little while ago (not sure if it was salt related or build environment related)
11:13 joehh1 is there a particular version you are after?
11:16 joehh1 forrest: I am the real joehh
11:18 supersheep joined #salt
11:26 jaybocc2 joined #salt
11:28 sunkist joined #salt
11:30 subsignal joined #salt
11:41 tzero joined #salt
11:41 oyermolenko joined #salt
11:42 mapu joined #salt
11:42 XenophonF can i use the "names" argument with any state?
11:47 joehh joined #salt
11:47 AndreasLutro XenophonF: probably not
11:49 tzero joined #salt
11:50 chiui joined #salt
11:50 favadi joined #salt
11:53 losh joined #salt
11:53 otter768 joined #salt
11:59 stoogenmeyer__ joined #salt
12:03 omegamike joined #salt
12:04 haarp joined #salt
12:04 gcfhvjbkn joined #salt
12:07 haarp hello. i have a question regarding pillars. is it ok to store sensitive data for all minions in one pillar file and make that accessible to all minions? or would this give a compromised minion access to all contents of that file?
12:09 Norrland haarp: I'd recommend using a structure for your pillars where you match and include relevant pillars for the minions that actually needs them.
12:09 ThomasJ All minions will have access to any pillar data you let them access, so yes, you want to structure it
12:10 tzero joined #salt
12:10 haarp good to know, thanks!
12:11 XenophonF AndreasLutro: this is what i'm referring to - http://docs.saltstack.com/en/latest/ref/states/highstate.html#names-declaration
12:11 AndreasLutro oh that's interesting
12:12 AndreasLutro I was excplicitly going to name pkg.installed as an example to why because it uses `pkgs`, but I guess I was wrong
12:13 DammitJim joined #salt
12:13 XenophonF hm i wonder why it uses pkgs and not names
12:14 c10b10 joined #salt
12:14 XenophonF interesting - from http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html: Unlike pkgs, the names parameter cannot specify a version. In addition, it makes a separate call to the package management frontend to install each package, whereas pkgs makes just a single call. It is therefore recommended to use pkgs instead of names to install multiple packages, both for the additional features and the performance improvement that it brings.
12:14 AndreasLutro it's different behaviour I suppose
12:14 denys joined #salt
12:19 DammitJim how does one deal with configuration files that are used for 2 different purposes?
12:19 DammitJim say I configured the smb.conf file to join an AD domain
12:19 DammitJim for different servers, I need to create different shares
12:20 XenophonF DammitJim: in general, one of the templating mechanisms
12:20 XenophonF i make heavy (ab)use of jinja
12:20 tzero joined #salt
12:20 DammitJim yeah, I guess I'll have to jinja it
12:21 DammitJim 'cause one doesn't like just add the "share" to the end of the smb.conf with sed or something like that, right?
12:21 XenophonF you could
12:21 XenophonF file.blockreplace
12:21 XenophonF or similar
12:21 DammitJim but I don't know why it sounds messier than doing jinja templtaes
12:21 DammitJim templates
12:22 XenophonF this is my approach - the example's from Postfix, but I can't imagine that Samba's substantially different
12:22 XenophonF https://github.com/irtnog/salt-states/blob/development/postfix/
12:22 XenophonF there's a pillar.example file in there that shows two different configs
12:23 DammitJim thanks... I'll review it
12:23 DammitJim holy crap, you are using file.blockreplace!
12:23 XenophonF yup
12:23 XenophonF and file.managed
12:23 DammitJim yeah, I'm using file.managed already
12:23 XenophonF oh that reminds me, i need to update pillar.example
12:23 XenophonF i've used file.replace states, too
12:24 mapu joined #salt
12:24 XenophonF where i don't want to screw with the default config too much
12:24 XenophonF like, i leave the postfix/main.cf alone, mostly, and just tack stuff on at the end
12:24 haarp got another question. why does ssh_auth.present need to be given the username, while user.present just takes it from the id (unless given manually)?
12:25 DammitJim oh, so one doesn't have an smb.conf template?
12:25 XenophonF not every program's config parser is so easy going
12:25 XenophonF there's https://github.com/saltstack-formulas/samba-formula
12:25 XenophonF have you looked at that?
12:26 DammitJim oh yeah, that's what I have seen before
12:26 AndreasLutro haarp: you can think of it this way - the name of the state is the ssh key being added, the user is just an argument to the state
12:27 DammitJim very different approach than yours (unless I'm missing something?)
12:28 krymzon joined #salt
12:28 haarp ah, that makes sense
12:28 XenophonF you aren't missing anything - i don't always use saltstack-formulas
12:29 XenophonF e.g., there's a postfix-formula, but i didn't like how it worked and made my own, which works better for me
12:29 XenophonF YMMV
12:29 XenophonF samba-formula might save you a lot of work, though
12:29 DammitJim yeah, I think I'm going to go this route
12:30 DammitJim XenophonF, can you look at something real quick?
12:30 XenophonF sure
12:30 DammitJim on the samba-formula example
12:30 DammitJim the config.sls
12:30 DammitJim where it says include: - samba
12:31 DammitJim does that mean it expects the samba (salt package) to have been configured?
12:31 DammitJim I mean, installed?
12:31 AndreasLutro it needs to include it for the watch_in to work
12:31 subsignal joined #salt
12:31 AndreasLutro the service is defined in samba/init.sls
12:31 XenophonF yes - basically, that means everything from samba/init.sls gets included in samba/config.sls
12:32 scoates joined #salt
12:32 XenophonF http://docs.saltstack.com/en/latest/ref/states/include.html
12:33 DammitJim oh ok, cool... 'cause I think I have done some stuff wrong in my configs
12:33 XenophonF :)
12:33 DammitJim I don't have dependencies set
12:33 DammitJim and if I do, I have them all in one init.sls
12:33 DammitJim so, for tomcat7, my init.sls is super long
12:33 DammitJim how does it know what "samba" means?
12:33 XenophonF what do you mean?
12:34 AndreasLutro the same way top.sls does
12:34 XenophonF DammitJim: do you mean at this line? http://docs.saltstack.com/en/latest/ref/states/include.html
12:34 DammitJim I guess I get confused with the names
12:34 XenophonF er, this line i mean https://github.com/saltstack-formulas/samba-formula/blob/master/samba/config.sls#L12
12:34 DammitJim no, the include: - samba
12:35 DammitJim line 4
12:35 XenophonF ah, as AndreasLutro said, then
12:35 DammitJim the word samba there doesn't mean the service
12:35 XenophonF no i means the SLS
12:35 AndreasLutro it's the .sls file
12:35 DammitJim it doesn't mean the ubuntu package (if one was doing apt-get install samba)
12:35 XenophonF so /srv/salt/samba.sls or /srv/salt/samba/init.sls
12:35 DammitJim it means the samba/init.sls right?
12:35 XenophonF correct
12:35 quasiben joined #salt
12:35 DammitJim how? because line 3 of init.sls is called samba?
12:35 haarp what about line 12? afaik it refers to the id 'samba
12:36 haarp ', rght?
12:36 AndreasLutro yes, the service.* state with id or name "samba"
12:36 DammitJim where is the id defined?
12:36 AndreasLutro https://github.com/saltstack-formulas/samba-formula/blob/master/samba/config.sls#L6
12:36 haarp in the incldue, i suppose
12:36 AndreasLutro this is the id
12:36 XenophonF DammitJim: when you install the formula, the git repo is added to file_roots on the master
12:36 zzzirk joined #salt
12:36 XenophonF so e.g., you'd have /srv/salt and /srv/formulas/samba-formula and so on
12:36 dthom91 joined #salt
12:37 zer0def ok, dumb question - am i missing something, when i'm getting a KeyError on 'rabbitmq_vhost.present'?
12:37 DammitJim ok XenophonF
12:37 XenophonF so the samba SLS files and whatnot are accessed like salt://samba/...
12:37 AndreasLutro zer0def: any time you get a python exception you're probably not doing something wrong
12:37 DammitJim again, is the samba id defined on samba-formula/samba/init.sls on line 3?
12:37 XenophonF no
12:38 DammitJim whoa... double negative statement AndreasLutro
12:38 XenophonF it's from the name of the SLS
12:38 DammitJim oh, the name of the folder where the init.sls is?
12:38 AndreasLutro we're talking about different things
12:38 XenophonF yes, that's right DammitJim
12:38 DammitJim holy cow
12:38 XenophonF hang on looking up TFM for you
12:38 DammitJim what is line 3 of the init.sls then?
12:38 oyermolenko joined #salt
12:38 AndreasLutro the include refers to the name of the sls file, the watch_in refers to the ID of the state
12:38 AndreasLutro DammitJim: the state ID
12:38 AndreasLutro as referred to in the watch_in
12:38 XenophonF DammitJim: read here - http://docs.saltstack.com/en/latest/ref/states/top.html
12:39 XenophonF SLS IDs and state IDs are two different things
12:39 DammitJim XenophonF, I suspected that! I just didn't know which is which since most of the time the names are the same
12:40 DammitJim XenophonF, what part of that linke refers to what we are talking about? I've read this page, but obviously I missed something important
12:41 zer0def AndreasLutro: from what i can gather, this state depends on rabbitmq's server being installed, but i've made it dependent on the state that's supposed to install rabbitmq in the first place
12:41 zer0def any suggestions?
12:41 AndreasLutro zer0def: show us the full error message
12:41 DammitJim man, I need to rename a bunch of my state files
12:41 DammitJim like I have  a folder with a state file called /srv/salt/tomcat7/tomcat7.sls
12:42 rideh joined #salt
12:42 zer0def AndreasLutro: http://hastebin.com/rokufekoha.rb ; that's for a salt-ssh call
12:42 XenophonF DammitJim: the last link describes SLS IDs
12:43 XenophonF one of the previous ones, about includes, also refers to SLS IDs
12:43 XenophonF requisites like require, watch, listen refer to state IDs
12:43 DammitJim so the include refers to the sls ids
12:43 XenophonF yes
12:43 DammitJim what refers to the state id?
12:43 AndreasLutro zer0def: that definitely seems like a salt bug. maybe try `salt-ssh minion-name rammitmq_vhost.present foo`
12:43 XenophonF require/watch/listen
12:44 DammitJim when one does salt 'servername' state.sls tomcat7.init
12:44 DammitJim ?
12:44 subsignal joined #salt
12:44 XenophonF so in https://github.com/saltstack-formulas/samba-formula/blob/master/samba/config.sls, the "include" refers to SLS ID "samba", but the "watch_in" refers to a state  named "samba"
12:44 AndreasLutro DammitJim: no, that's the name of the sls file
12:44 XenophonF right - the salt command refers to SLS IDs as well
12:44 zer0def AndreasLutro: "[CRITICAL] Unable to import msgpack or msgpack_pure python modules"; ok, let me add a dependency on msgpack being installed, since it might not be on the target system
12:45 DammitJim oh ok, the watch_in
12:45 DammitJim thanks!!!!
12:45 DammitJim oh, the salt command refers to the SLS id!
12:45 XenophonF so if you run "salt minion tomcat", it will look for files named /srv/salt/tomcat.sls or /srv/salt/tomcat/init.sls
12:45 DammitJim so, I could just have said salt 'servername' state.sls tomcat7
12:45 XenophonF yes
12:45 DammitJim dammit! I didn't know that
12:46 DammitJim sorry... I think I have been reading stuff and not making the right link
12:46 XenophonF it's OK!
12:46 XenophonF we've all been there
12:46 DammitJim I have a LOT of work to do to clean up!!!
12:46 XenophonF it's what this irc channel's for
12:46 XenophonF also
12:47 XenophonF the SLS IDs "tomcat" and "tomcat.init" are synonymous, I think, so just use "tomcat"
12:47 Mstaaravin joined #salt
12:47 DammitJim ok, that's what I have to change now 'cause I have tomcat7/tomcat7.sls
12:48 DjDeaf I'm not sure it is even possible, but after 1 month i'm trying to figure it out, i must ask - IS there a way to stop batch 'salt' command, when one of the servers fail? so it won't go ahead to deploy the rest? I see there's a git case for it, and deployed but none is working. PLEASE :)
12:48 XenophonF ah
12:49 zer0def AndreasLutro: nope, depending the state on msgpack being installed doesn't work either; it's sorta strange that it doesn't resolve requisites first, though.
12:49 XenophonF DjDeaf: use the --failhard option to salt(1)
12:50 XenophonF so for example: salt --failhard * state.highstate should stop everything the first time a highstate returns an error
12:50 DjDeaf XenophonF: tried, doesn't work. it fails the current server and moves on to the next
12:50 XenophonF wha about --hard-crash?
12:50 DjDeaf Same, also with orchestration
12:50 XenophonF dang it
12:50 DjDeaf yes, it gets me frustrated
12:51 DjDeaf I must be able to stop batch for not screwing all the pool
12:51 AndreasLutro zer0def: that might not matter. do you get 'rammitmq_vhost.present' is not available. ?
12:51 zer0def AndreasLutro: yes, after the cited critical error msg
12:51 AndreasLutro zer0def: but I definitely recommend installing msgpack if using salt-ssh, it speeds up file management a ton
12:52 zer0def yeah, i do install it on stated that depend on it.
12:52 zer0def s/stated/states/
12:52 AndreasLutro zer0def: right so the module isn't being loaded, check its __virtual__ function to see what it's checking for
12:52 zer0def AndreasLutro: return salt.utils.which('rabbitmqctl') is not None
12:53 AndreasLutro err I've typoed
12:53 AndreasLutro hang on..
12:53 zer0def would there be a way to work around this, if my rabbitmq_vhost state is dependent on a state that installs rabbitmq in the first place?
12:53 AndreasLutro salt-ssh minion-name rabbitmq.vhost_exists foo
12:53 AndreasLutro that's the correct one
12:54 zer0def nope, "Module 'rabbitmq' is not available"
12:55 zer0def i take it i'm missing a lib then
12:55 AndreasLutro I get the more explicit 'rabbitmq' __virtual__ returned False but maybe that's a 2015.8 thing
12:55 zer0def actually, the rabbitmq.py execution module has the same __virtual__() function
12:56 AndreasLutro yeah. just check that rabbitmq is installed etc
12:56 zer0def on the target system?
12:56 AndreasLutro sshing in and `which rabbitmqctl` should get you started
12:56 AndreasLutro yes
12:57 XenophonF zer0def: i'm relying on rabbitmq-formula from other state modules
12:57 zer0def AndreasLutro: that's the thing: this state is dependent on a chain of states that install rabbitmq in the first place
12:57 XenophonF but i want to be able to switch out the message queueing system without having to change a ton of dependencies
12:57 zer0def XenophonF: i'm either too stubborn/dumb or salt-formulas don't tickle me the right way yet.
12:57 AndreasLutro zer0def: then are you sure the order of states is correct?
12:57 XenophonF so rather than list a bunch of requisites, i'm just listing them in order in top.sls
12:58 XenophonF a la https://github.com/irtnog/salt-states/blob/master/top.sls#L206
12:58 zer0def AndreasLutro: pretty positive
12:58 subsignal joined #salt
12:58 XenophonF so by the time i run my openstack states, i just assume that all the rabbitmq stuff or whatever is installed
12:58 XenophonF i tend to avoid dependencies crossing top-level SLSes nowadays
12:58 DammitJim anyone use vagrant here?
12:58 AndreasLutro well... modules are lazy-loaded, so if you install the rabbitmqctl binary somehow before running the rabbitmq states you should be fine
12:59 AndreasLutro yes DammitJim
12:59 XenophonF zer0def: pkg.installed will automatically refresh the minion
12:59 Tecnico1931 joined #salt
12:59 DammitJim once you have created your vagrant VM... that's done, right? you don't have to use vagrant after that, correct?
12:59 subsigna_ joined #salt
12:59 DammitJim sorry for the offtopic question
12:59 zer0def XenophonF: i know
12:59 XenophonF so if you have something like "rabbitmq: pkg.installed" first, and then have subsequent states require "pkg: rabbitmq", it should all do the right thing
13:00 AndreasLutro DammitJim: well you use vagrant for booting and ssh'ing but other than that you treat it as a regular machine
13:00 XenophonF ah ok, sorry zer0def
13:00 zer0def XenophonF: i appreciate the verbosity :)
13:00 DammitJim AndreasLutro, what if you shut down the vm?
13:00 AndreasLutro DammitJim: what about it
13:00 zer0def AndreasLutro: funnily enough, just depended the state in question on a state that installs the package and it still throws the same error.
13:01 DammitJim can one boot the vm w/o vagrant after shutting it down?
13:01 AndreasLutro DammitJim: yes though I don't see why you would
13:01 AndreasLutro zer0def: you're not running with test=True or something? what if you manually install rabbitmq, does the module work then?
13:01 DammitJim I mean, everything that one has done, does it stick?
13:01 zer0def AndreasLutro: let me check, but i'm definitely not running with test=True
13:02 AndreasLutro DammitJim: the filesystem and server configuration sticks, there may be some VM configuration that is done on each boot
13:02 AndreasLutro I see no reason not to use vagrant halt/up
13:03 DammitJim oh, I was asking because I would like to set up the vm, and hand it off to the developers
13:03 AndreasLutro eh that's not how you use vagrant
13:04 krymzon hi, silly question on upgrading, couldn't find an answer: I have a bootstrapped 2015.2.0rc2 master (on Debian Wheezy), I want to move to the stable Salt .deb repo. Do I need to somehow uninstall anything, or just install the packages on top and hope for the best?
13:04 AndreasLutro DammitJim: the idea is the Vagrantfile + the salt states make a reproducible system even if you don't have any of the pre-existing binaries
13:04 primechuck joined #salt
13:05 zer0def AndreasLutro: i think i've nailed the problem; apparently the state that installs rabbit failed due to improper gateway setting and since that failed, the rabbitmq_vhost state was like "no u"
13:05 zer0def too bad that i didn't get the message about the installing state failing in the first place, though.
13:05 AndreasLutro zer0def: yeah that'll do it.. always look for the root cause
13:05 DammitJim I know, but at what time does it get handed off?
13:05 AndreasLutro zer0def: yeah I think you ought to make a github issue on it
13:06 DammitJim I mean, I don't know why I see vagrant as a template configurator
13:06 DammitJim or does one not use vagrant for test and production environments?
13:06 zer0def AndreasLutro: i'm surprised that a state that requires this installation still was tried to be executed
13:06 DammitJim like, set up the IP address of the box, name, etc
13:06 AndreasLutro zer0def: I'm not but the explanation would be lengthy :p
13:07 AndreasLutro DammitJim: hopefully not for production!
13:07 DammitJim ok, good
13:07 zer0def AndreasLutro: just point me to a doc or a code snippet, i'll take it from there
13:07 DammitJim just being clear (I haven't used vagrant)
13:07 AndreasLutro zer0def: I don't think there is a specific code snippet, just the way salt loads stuff
13:07 AndreasLutro DammitJim: yes you do set the hostname and ip of the VM in the Vagrantfile as well as other stuff, and optionally you put in provisioning info there as well
13:08 AndreasLutro DammitJim: do you use master/minion, masteless or salt-ssh?
13:08 DammitJim master / minion
13:08 DammitJim but I don't do anything with salt until I have the server name configured, the static IP
13:08 zer0def and apparently i forgot that i have a state that alters the gateway setting on rhel-like distros, which would work on the real thing, but on my test run it failed :)
13:08 DammitJim then I install salt-minion
13:08 DammitJim configure the master and accept the key
13:08 DammitJim after that it's smooth sailing
13:09 AndreasLutro DammitJim: I would set the vm up masterless then, it'll be way easier
13:09 DammitJim I guess I was trying to figure out a way to easily customize that first part of server configuration
13:09 AndreasLutro just mount (share) the states and pillar directories into /srv/salt and /srv/pillar, deploy the minion config with filesystem: local and you should be good to go
13:09 DammitJim set it up masterless and then change it to be a minion?
13:09 dyasny joined #salt
13:10 AndreasLutro DammitJim: https://bpaste.net/show/61310ed1a0a1 from my company's example vagrantfile
13:11 DammitJim AndreasLutro, thanks!
13:11 DammitJim but again... after that, do I still have to start the vm with vagrant? or am I done?
13:12 AndreasLutro it's probably possible to run the vm without vagrant but it'll be more of a hassle
13:12 DammitJim oh, but I thought once the vm is configured, it's done
13:13 DammitJim or does vagrant need to do more stuff afterwards?
13:13 DammitJim I think everything else I can do with salt
13:13 AndreasLutro I don't know exactly, but I see no reason not to use vagrant
13:13 rideh joined #salt
13:13 AndreasLutro iirc it does stuff like port forwarding and folder sharing when you boot
13:13 AndreasLutro and probably some other stuff
13:14 DammitJim so, all that stuff that vagrant does doesn't get saved?
13:14 DammitJim maybe I'm thinking vagrant does something it doesn't
13:14 DammitJim or it doesn't fit my purposes
13:14 DammitJim I'll have to mess with it some... and learn some ruby
13:14 AndreasLutro you know how virtualbox etc works right?
13:15 DammitJim yes
13:15 AndreasLutro just think of vagrant as a replacement for the virtualbox gui with a config file you can distribute and version control
13:16 AndreasLutro I do `vagrant up` to boot the vm, then work on it via salt-ssh as if it were a regular server
13:17 DammitJim a config file... ok, so if I was to boot the VM with virtualbox, it would not have any of the configuration settings from vagrant
13:17 DammitJim even if I have vagrant up before
13:17 AndreasLutro probably only some of them. like I said, I've never had a reason to try
13:17 DammitJim no problem... I appreciate the conversation
13:19 FeatherKing joined #salt
13:19 DjDeaf batch + salt '*' + --failhard - Anyone? Issues here, salt is defying me.
13:20 llb42 joined #salt
13:21 racooper joined #salt
13:27 icflournoy joined #salt
13:29 dthom91 joined #salt
13:30 icflournoy joined #salt
13:32 dthom91 joined #salt
13:32 c10b10 joined #salt
13:34 scoates joined #salt
13:34 Fiber^ joined #salt
13:34 ksj is it possible to define a pillar as a plain python dictionary for the sake of debugging? salt's doing something weird with my pillar - I think it's converting to an Ordered dict, where it was supposed to be a list.
13:37 quasiben joined #salt
13:37 dude051 joined #salt
13:38 jaybocc2 joined #salt
13:38 AndreasLutro ksj: if the pillar is jinja-less you could run it through a yaml parser
13:38 Horgix joined #salt
13:38 AndreasLutro in general I think most data type oddities are yaml formatting mistakes
13:39 Twiglet anyone noticed require statements not working properly in 2015.5.3?
13:40 ksj AndreasLutro: yeah, I'd really like to pass a plain python data structure into my state file - i.e. the output I get from --out=pprint pillar.items
13:41 cpowell joined #salt
13:41 favadi joined #salt
13:44 AndreasLutro Twiglet: no but if you share some error messages someone can probably help you debug
13:44 AndreasLutro ksj: don't think that's possible
13:46 pi3r joined #salt
13:47 Twiglet AndreasLutro: we have a few states requiring git or postgresql, then gets to the states requiring them then stacktraces because salt hasn't installed them, the states have worked for these systems since 0.17 (with a few tweaks) and the only new things is 5015.5.3
13:47 Twiglet tis odd, we're looking into it though, was just wondering if there were any known issues
13:47 Twiglet will raise bugs if needed
13:48 bhosmer joined #salt
13:50 pi3r6 joined #salt
13:52 pi3r6 With salt community, what's the simplest way to record all actions (author, date, command) in an external database
13:53 jaybocc2 joined #salt
13:54 otter768 joined #salt
13:54 scoates joined #salt
13:58 iggy ksj: you can write #!py pillars (the same way you'd do #!py states)
14:04 dthom911 joined #salt
14:06 bluenemo joined #salt
14:08 andrew_v joined #salt
14:08 gimpy2938 joined #salt
14:09 sunkist joined #salt
14:10 gimpy2938 I installed salt via pip and it complains that requests>=1.0.0 is not found but requests (2.7.0) is installed.  Any clue how to fix it?
14:10 iggy is it installed to the correct version of python?
14:11 ekristen joined #salt
14:11 gimpy2938 iggy: I believe so, how can I tell?
14:12 iggy python -c "import requests; print requests.__version__"
14:13 gimpy2938 Gives me: 2.7.0
14:13 iggy how many versions of python are installed?
14:13 ksj iggy: really?? damn, I've just been fighting to get an external pillar working. I'll give it a go, thanks
14:13 gimpy2938 I see salt calls /usr/bin/python directly and that's what I used for that test
14:14 iggy ksj: yeah, that's something I think a lot of people don't realize, handy feature though
14:14 ksj wait, are you sure? I searched for this already and came up empty. what do I return to the calling function? how do I set it up? the same way as a python state?
14:14 gimpy2938 iggy: Just one, I think ... python[tab][tab] just gives me python, python2, and python2.6 which should all be the same
14:15 iggy ksj: you do the run() thing just like in a py rendered state
14:15 ksj iggy: thanks. I'll have an experimentw
14:18 iggy gimpy2938: odd, seems like it should be working fine
14:18 zmalone joined #salt
14:18 iggy gimpy2938: where exactly are you seeing this error? When starting the service?
14:19 gimpy2938 iggy: Here's an example: https://gist.github.com/anonymous/194fe4d2d0a638010f69
14:20 lrojas joined #salt
14:21 druonysus joined #salt
14:21 druonysus joined #salt
14:21 iggy what version of salt did you install?
14:26 gimpy2938 iggy: That's what I was trying to see with `salt -V` btu it should be whatever PyPi has as the latest ... looks like 2015.5.3
14:27 eliasp joined #salt
14:27 gimpy2938 that's what /usr/bin/salt says (see https://gist.github.com/anonymous/939e8bf9d8e212e47bc4)
14:28 insonifi joined #salt
14:28 iggy weird, that's not what the salt script looks like here at all
14:28 iggy try copying the latest from source
14:29 insonifi Hello everybody!
14:30 gimpy2938 iggy: Hmm, I had salt installed via RPM from EPEL but that was removed, yum confirms those packages are gone, any clue if that would muck things up?
14:30 kaptk2 joined #salt
14:30 insonifi I'm new to salt, and heated up my brain to the point I need some external help :)
14:30 iggy it could (pip generally installs to /usr/local/lib whereas the pkg manager will install to /usr/lib)
14:31 iggy so you could have conflicting modules
14:32 gimpy2938 Well, the python-requests RPM is not installed either...how can I tell which module file is being loaded by python when I import the requests module?
14:32 insonifi First of all, I need to change hostname of Windows minion. Which I achieve by setting system.computer_name state, but I couldn't find how you execute system.reboot afterwards. Can you do that in state at all?
14:34 linjan joined #salt
14:34 ksj iggy: sorry, but are you sure you can use pure python pillars? I can't get it to work at all. I'm using pure python states with no issues.
14:35 VSpike I'm using pure python pillars, afaik
14:35 insonifi Secondly, is there a way to install Windows package that consist of several files? I have a software which install whole lot of stuff from distribution package, like redistributable runtimes and Postgres. I have single entry point: setup.exe that can be run silently, but how one can deploy such package using Win Repo?
14:36 bluenemo hi guys. How do I use salt/utils/dictupdate.py in jinja? I'm trying to use the update function in it. this doesnt work:  {% set macro_map = salt['dictupdate.update'](macro_defaults_map, macro_pillar_map) %}
14:36 ksj VSpike: can you help me out and pastebin an example pillar? I have a run function the same as in a state file, and it returns a dictionary, but the actual file doesn't seem to be being run
14:36 bluenemo I'm getting a   Rendering SLS 'base:nginx.vhosts' failed: Jinja variable 'salt.loader.LazyLoader object' has no attribute 'dictupdate.update'
14:37 ksj I have a non-python (i.e. normal) top file
14:37 VSpike ksj: sure .. one mo
14:37 ksj thanks
14:37 malmeida joined #salt
14:37 iggy ksj: why don't you try pasting what you have
14:38 iggy bluenemo: you can't access utils from jinja
14:38 iggy bluenemo: only salt.modules.
14:39 bluenemo iggy, something like     {% set macro_map = salt['module.run']('name=dictupdate.update, dest=macro_defaults_map, upd=macro_pillar_map') %}
14:39 ksj iggy: def run(): \n return { "test": "testing" }
14:40 ksj pretty sure it's not being run though, as I've tried writing to a /tmp file the same way I do in my python state files and it doesn't work
14:40 iggy ksj: #!py
14:40 ksj yeah, it has the shebang
14:40 jo_ joined #salt
14:41 ksj the only thing I can think, assuming you guys have it running fine like that, is that it's because I'm using salt-ssh, which still has some bugs being ironed out
14:41 * iggy backs away slowly
14:42 iggy bluenemo: no... you can't access utils from jinja
14:42 bluenemo ok, thanks
14:42 VSpike ksj: https://gist.github.com/johnccfm/4d923db186f4fe127526
14:43 VSpike Probably way more complex than you need as an example :)
14:43 VSpike Sounds like what you are doing should work though
14:44 ksj VSpike: thanks. yeah, I'm guessing it's something to do with salt-ssh
14:44 ksj your example looks interesting though
14:47 VSpike It was desgined to add pillar data on roles, environment, etc based purely on hostname
14:47 denys joined #salt
14:47 VSpike Or rather, id
14:48 _JZ_ joined #salt
14:49 clintberry joined #salt
14:49 SheetiS joined #salt
14:50 digitalhero joined #salt
14:51 bhosmer joined #salt
14:52 cowpunk22 joined #salt
14:53 andrew_v joined #salt
14:55 Brew joined #salt
14:55 AndreasLutro joined #salt
14:59 mrhobbeys_ joined #salt
14:59 jdesilet joined #salt
15:00 jondonas joined #salt
15:00 gimpy2938 iggy: Fixed it, just needed to update setuptools
15:01 mrhobbeys_ Hello I am trying to run the demo vagrant file and I get an error about "The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!" When I run 'vagrant halt' I get a message that 2 minions are not running but the master is and is shutting down gracefully. I am on Linux Mint 17.2 newest vurtalbox from mint repository (non-free), newest vagrant from vagrant website
15:02 iggy sounds like a vagrant problem?
15:03 sdm24 joined #salt
15:03 DammitJim clarification please... I saw the samba-formula... wouldn't that be on /srv/pillar ?
15:03 mrhobbeys_ Ok I'll try to update or reinstall
15:04 DammitJim instead of /srv/salt ?
15:04 icflournoy joined #salt
15:04 iggy formulas usually go in a seperate place (but they contain states and pillar data)
15:05 DammitJim iggy, I just want to have a clear picture of how I should set this up... I'm a little overwhelmed at the moment
15:05 DammitJim I need to configure different samba shares for different servers
15:05 DammitJim I thought I would use pillar data (server name) to determine the share that needs to be configured on the smb.conf
15:05 PredatorVI joined #salt
15:05 spark_ joined #salt
15:06 _JZ__ joined #salt
15:06 DammitJim wouldn't I just define this in the smb.conf template?
15:06 DammitJim so, let's say for server1, i need share share1
15:06 DammitJim and for server2, I need share2
15:07 DammitJim where do I place the "decision" code for the smb.conf to be configured accordingly?
15:08 lothiraldan joined #salt
15:11 dthom911 joined #salt
15:14 dfinn joined #salt
15:14 sdm24 I would do it in 2 pillar .sls files: share1.sls and share2.sls. and then in the pillar top.sls in /srv/pillar, have "server1" get share1 and "server2" get share2
15:14 sdm24 but I haven't looked at or used the formula before
15:15 DammitJim does share1.sls use 1 smb.conf and share2.sls use a different smb.conf to define the share?
15:16 tzero joined #salt
15:17 iggy the config files are (for the most part) generated from the pillar data
15:18 DammitJim then I wouldn't need 2 share.sls files, right?
15:18 DammitJim just 1
15:18 sdm24 If possible, just to keep it neat, I would try to use a generic smb.conf template, with the different options loaded using {{ salt[pillar.get](smb) }} or something like that. You could, if you only have 2 servers and don't mind hard-coding, have a smb1.conf template for server1 and smb2.conf template for server 2, and then use a file.managed state where {% if grain[id] == 'server1' %} then file manage 1
15:19 DammitJim I don't like the latter... it's going to get complicated quick with so many servers with samba shares
15:19 sdm24 exactly
15:20 DammitJim in my smb.conf template, can I do all the logic in there without defining a pillar?
15:20 c10b10 joined #salt
15:20 DammitJim like say in my smb.conf if (servername == share1) then define share1, else if (servername == share2) then define share2
15:20 DammitJim etc....
15:21 druonysus joined #salt
15:21 druonysus joined #salt
15:21 iggy I thought we were talking about the samba-formula
15:21 sdm24 yeah, just have - template: jinja in the file,managed line
15:21 DammitJim iggy, I was using the samba-formula as a starting point
15:22 DammitJim since that is what I had read
15:22 iggy formulas are generally pillar driven, if you don't want that, then you probably shouldn't start with the formula
15:22 DammitJim but trying to figure out the most appropriate way of implementing this
15:23 DammitJim what would I define in my pillar? that for server name server1, the share should be share1?
15:23 sdm24 http://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.file_tree.html#module-salt.pillar.file_tree would this maybe be an option? Have your different configs in /srv/salt/smb/server1/smb.conf, server2/smb.conf, etc
15:23 sdm24 and then each different .conf file can have whatever settings it needs
15:23 DammitJim sdm24, it's an option, but I think I would end up with 3 dozen smb.conf files
15:24 sdm24 yeah there is that
15:24 DammitJim maybe less... but still.. that's a lot
15:25 ksj how do I get the man page for the main salt binary? both on arch linux and now openbsd, "man salt" produces a text dump of the docs....which is nice, maybe, but I just need to know what flag to use....
15:25 sdm24 I heard that git can do syntax checks when I push files. Is there a way to have it check salt syntax? Or at least YAML?
15:26 iggy nobody has written a yaml+jinja checker afaik
15:26 sdm24 so my google fu didn't fail me at least
15:27 iggy ksj: just salt -h... there is no salt binary (man page)
15:28 iggy oh, nvm
15:28 iggy ksj: man 1 salt
15:28 * iggy likes being wrong every once in a while
15:28 tzero joined #salt
15:29 sdm24 brings you down to our level. one of us! one of us!
15:30 ksj iggy: nope - No manual entry for salt in section 1
15:31 DammitJim if I want to set up joining a linux machine to an ad domain
15:31 hunmonk_ joined #salt
15:31 ksj man salt used to give me information on the main salt command. i.e. what happens if you type "salt" on the command line. salt -h works, but it's not the same as the old man page.
15:31 DammitJim and it requires editing a bunch of different conf files and installing different packages
15:31 DammitJim should I create multiple states
15:32 DammitJim then have a state that "requires" all the other states?
15:32 sdm24 generally, yes. Especially if different minions will get some of the states, while others get different ones
15:33 DammitJim what does one call the state that requires all of the other ones? whatever I want?
15:33 sdm24 yep
15:33 sdm24 so server.sls will install the server package, and have an include to also run the client.sls state
15:34 DammitJim what client?
15:34 sdm24 it was just an example haha
15:34 DammitJim oh, yes
15:36 djstorm joined #salt
15:40 stoogenmeyer__ joined #salt
15:43 RandyT joined #salt
15:47 jalbretsen joined #salt
15:48 pipps joined #salt
15:49 tiadobatima joined #salt
15:51 digitalhero joined #salt
15:54 dewdrop joined #salt
15:54 Horgix Hi ! i have a question regarding salt keys : I'm using salt to manage configurations on workstations; how is it possible to handle reinstallations ? Since the machine comes back with the same id but not the same key fingerprint, it's automatically denied
15:54 zsoftich1 joined #salt
15:55 otter768 joined #salt
15:56 zzzirk joined #salt
15:56 primechuck joined #salt
15:57 digitalhero joined #salt
15:58 snuffychi left #salt
15:59 DammitJim https://bpaste.net/show/9b71928263ff
15:59 DammitJim why is it complaining about my state joinad
15:59 DammitJim ?
15:59 DammitJim it's just a name to include all the other states
15:59 quasiben joined #salt
15:59 ajw0100 joined #salt
16:00 DammitJim oh, nevermind... I was doing pkg.installed
16:02 serdan joined #salt
16:02 tzero joined #salt
16:03 bhosmer joined #salt
16:03 murrdoc joined #salt
16:04 pipps joined #salt
16:05 SheetiS joined #salt
16:05 aparsons joined #salt
16:05 pcn If I have fine_functions in a pillar for a minion, should I need to restart the salt-minion in order for that function (network.ip_addrs) to record its data in the master?
16:05 pcn That was supposed to be mine_functions ^^^
16:06 sdm24 I think salt '*' mine.update should do it
16:06 iggy you should just have to wait for mine_interval
16:06 iggy mine.update has never worked for me
16:06 primechuck Where does one put custom rosters so they are usable?
16:08 sdm24 iggy: are you setting mine functions in the pillar or minion config? I set mine (no pun intended) in the pillar, so a saltutil.refresh_pillar and mine.update usually works for me
16:08 nzero joined #salt
16:08 pcn mine.update does seem to work.  I think that could/should be mentioned in the mine documentation - my impression would be that if I've just enabled the mine feature, it should start when that pillar data is seen, but I guess not
16:10 ageorgop joined #salt
16:11 oyermolenko joined #salt
16:11 lexter joined #salt
16:12 oyermolenko joined #salt
16:13 iggy primechuck: did you try <extension_modules>/roster ?
16:13 scoates joined #salt
16:13 iggy pcn: the problem being, salt doesn't "see" pillar data, it reads it in response to a pillar lookup that is initiated by the mine_interval (or mine.update if that works for you)
16:14 sdm24 does anyone know if/how I can set cmd.script to use a specific fileserver environment? I want to use my roots base environment instead of my git base
16:15 iggy saltenv ?
16:15 writtenoff joined #salt
16:15 iggy there is no distinction between git:master and /srv/salt if that's what you're asking
16:15 sdm24 but then wouldn't it default to the git base, since it is listed 1st in the master config?
16:15 cowpunk22 joined #salt
16:15 sdm24 yeah
16:16 sdm24 oh well, thanks for the answer iggy
16:18 primechuck iggy: Yeah.  there and fileroots base _roster
16:18 pcn iggy so a state.highstate doesn't trigger that.  Got it.
16:21 c10b10 joined #salt
16:21 iggy pcn: a mine update _can_ be pretty expensive, I don't think people would generally want it running every highstate
16:22 iggy but a feature to run pre/post highstate hooks (i.e. mine.update) would be a neat feature request
16:22 conan_the_destro joined #salt
16:24 jaybocc2 joined #salt
16:27 Bryson joined #salt
16:33 dthom91 joined #salt
16:33 KyleG joined #salt
16:33 KyleG joined #salt
16:34 amcorreia_ joined #salt
16:40 bhosmer joined #salt
16:44 oyermolenko joined #salt
16:45 Lionel_Debroux joined #salt
16:46 bluenemo when I salt '*' state.sls foobar, how can I only run the state ID 'bla', which is in /srv/salt/foobar.sls?
16:46 shadowsun I've run som jobs, and the return I'm getting just says VALUE TRIMMED instead of the output I needed. How do I get it to output stuff on the command line instead of trimming it?
16:47 iggy bluenemo: state.single
16:47 iggy !salt modules.state.single
16:47 saltstackbot http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.single
16:48 iggy bluenemo: sorry, you want sls_id
16:48 whytewolf or state.sls_id
16:48 shiriru joined #salt
16:48 iggy always confuse those
16:49 dthom91 joined #salt
16:51 forrest joined #salt
16:51 theologian joined #salt
16:58 jhauser joined #salt
17:01 shiriru joined #salt
17:02 indispeq Hello everyone. I have a specific question: I would like to import data from one state's map.jinja into another's map.jinja. What's the best way to do it?
17:03 indispeq In terms of avoiding code duplication and really only having one import statement.
17:03 cliluw joined #salt
17:03 murrdoc import
17:03 sdm24 {% from 'firststate/map.jinja import %}
17:03 iggy same way you imported it in the first file
17:03 murrdoc no way
17:03 indispeq just a regular jinja import will do it?
17:03 primechuck iggy:  that location does work, but for some reason I had to reboot after puting the file there, the amount of resyncing was working for me
17:03 Aikar joined #salt
17:04 Aikar left #salt
17:04 sdm24 It should, unless you also import the 2nd state's map.jinja and some variables overlap
17:04 rideh joined #salt
17:04 indispeq How would I logically catch the fact if the other module is not in the top file?
17:04 indispeq I would only want this to be imported if the other module is already declared in the top.sls
17:05 dfinn joined #salt
17:05 jhauser joined #salt
17:05 indispeq kind of an {% if module_b in top.sls %} {% from 'module_b/map.jinja' import %}
17:05 sdm24 pillar info?
17:06 indispeq yes, but, with defaults in map.jinja
17:06 iggy well, you have to import something
17:06 indispeq right, I guess my question is more how do I make it a conditional import whether the other state is included
17:06 iggy so {% if var1 not defined %}{% from "file/1.sls" import var1 %}
17:06 shiriru joined #salt
17:07 SheetiS1 joined #salt
17:08 cliluw One of my Salt states is taking a long time to run. How should I debug/profile this?
17:09 scoates joined #salt
17:09 AndreasLutro cliluw: -l debug for starters
17:09 iggy probably running it locally with salt-call -l debug
17:10 DammitJim I hate to ask this again, but does someone have an example of a jinja template so that I can configure my smb.conf?
17:10 twork joined #salt
17:11 druonysuse joined #salt
17:11 druonysuse joined #salt
17:12 babilen DammitJim: https://github.com/saltstack-formulas/samba-formula
17:12 scbunn joined #salt
17:12 PredatorVI Today my top.sls assigns a state (or three) to a minion based one of 4 roles.  That means for every salt environment, I have to add 4 blocks.  I was thinking of putting all states/file for these 4 roles into a folder and inside the init.sls and load states conditionally based on the grain.  Is this a good and/or common way to do this?
17:13 scbunn does anybody know if its possible for salt-cloud to manage VMware without vCenter?
17:13 DammitJim babilen, it seems most of the examples just do an iteration over keys
17:14 DammitJim I want to make decisions if a server has a particular name, to configure a specific share
17:14 indispeq scbunn, I used salt-cloud with vCenter,
17:14 indispeq but I don't think you can do it without
17:14 DammitJim can I just have a bunch of if, else if, else, endif ?
17:15 indispeq you need the vCenter essentials at the minimum
17:15 indispeq so it exposes the API
17:15 scbunn indispeq: thanks
17:16 Nazca__ joined #salt
17:17 indispeq no problem. I think with esxi free the API is in read-only mode.
17:17 babilen DammitJim: I personally wouldn't go too crazy on condationals
17:17 iggy DammitJim: for formulas, the logic all goes in pillars, so you can do the if's in jinja in the pillaror you can just target pillars like normal using top.sls
17:17 scbunn indispeq: one more reason for us to get off of VMware as quickly as possible, its become almost impossible to use without vCenter
17:17 babilen conditionals even ..
17:18 babilen DammitJim: Please keep in mind that the formulas simply render the data you present them with and that decisions as to what you want to configure should be made in the pillar
17:18 indispeq We switched to OpenStack, I have yet to test all the functionalities in 2015.5 for that, but it's definitely better than with vmware
17:18 indispeq plus vmware I had a lot of issues getting template creation right
17:18 rideh^ joined #salt
17:19 scbunn indispeq: I think docker/mesos is what our future will be
17:19 DammitJim ok, so on the pillar is where I do the definition of the shares?
17:19 DammitJim as an option/value pair?
17:19 pi3r6 joined #salt
17:20 babilen DammitJim: https://github.com/saltstack-formulas/samba-formula/blob/master/pillar.example is, well, an example pillar
17:20 twork i'd like to use salt to govern user access for a mysql database. i find 'salt.modules.mysql', but it looks more like a tool for providing a back end to salt itself. am i perceiving correctly?
17:21 iggy you probably want the states
17:21 twork ...and, salt.states.mysql_u... yeah.
17:21 iggy !salt states.mysql
17:21 saltstackbot http://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql.html
17:22 Heartsbane So I have been googling for a while, but does anyone know of work around for salt-call being prevented by SELinux
17:22 Heartsbane I have tried this http://docs.saltstack.com/en/2014.7/topics/troubleshooting/index.html#salt-and-selinux
17:22 twork okay, that's where i started, but there's a reference there to the module without clarification. thanks iggy.
17:22 whytewolf twork. the reference is for authentication setup for mysql
17:22 Heartsbane and it doesn't seem to help. Although everything works correctly in permissive mode
17:23 druonysus joined #salt
17:23 druonysus joined #salt
17:23 PredatorVI Regarding VMWare, I believe you can manage an ESX host (as long as it's licensed) without vCenter.  The key being "licensed".  Afterall, you can connect directly to an ESX host using the VIClient, even if it is being managed in vCenter
17:24 twork whytewolf: i get that now, but quoting: "configuration:  See salt.modules.mysql for setup instructions." in hindsight i undestand what that means.
17:24 scoates joined #salt
17:25 indispeq PredatorVI, thanks for clarification, you are right, I didn't say that part
17:25 viq joined #salt
17:25 scbunn PredatorVI: I'll give it a try, but I didn't see any configuration examples for connecting to an ESX host.
17:26 twork hm. and, 'http://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql.html' draws a 404. mysql_user and mysql_grants look like what i want, right?
17:27 whytewolf twork: yes
17:27 twork thanks.
17:30 dthom91 joined #salt
17:30 SheetiS joined #salt
17:31 linjan joined #salt
17:32 shiriru joined #salt
17:32 iggy twork: yeah, sorry, I should probably have the bot check to see if a url is valid
17:32 aron_kexp joined #salt
17:32 iggy ELAZY
17:34 xDamox joined #salt
17:34 twork iggy: i thought it already did that.
17:35 twork SUTPID.
17:35 twork who wants more coffee?
17:35 krymzon joined #salt
17:35 forrest iggy: Do you remember if the reactor is in the stable masterless release yet?
17:36 iggy I don't think so
17:36 forrest Ffffuuuuu
17:36 iggy Ryan_Lane would be the one to ask I think
17:36 shiriru joined #salt
17:36 forrest Ryan_Lane: You around?
17:36 iggy they talked about it at the conf, but I don't remember when it was slated
17:37 forrest iggy: Yeah it was in dev, but that was two releases ago, and it wasn't in the release prior to this one
17:45 gimpy2938 When installing salt from PyPi, does it come with init scripts to start the master and minion?  If not, what are you meant to do, write your own?
17:46 cliluw When I do "state.highstate" from the master, my state takes over 2 minutes to run. When I run it locally on the minion with salt-call, it takes less than a second. What could be causing the slowness?
17:46 xDamox I have a masterless setup but when I run salt-call --local grains.items it does not read the local /srv/salt/grains
17:46 xDamox directory
17:50 timoguin joined #salt
17:51 twork clilaw: salt n00b here, but a guess: what is your network's name resolution situation like? could that be some of the delay? how long does it take your master to look up all your minions?
17:51 twork clacluw rather
17:53 twork ...eh, or is it the case that any master knows (or should now) the IP of all its minions all the time without looking them up in DNS?
17:53 twork i'll shut up and go back to work now.
17:53 numkem is there a roadmap for 2015.8.0? I'd like to see my mine issues fixed
17:53 cliluw twork: It doesn't take that long. "salt test.ping" returns immediately.
17:54 iggy gimpy2938: use the bootstrap script and it'll pull them from the proper location
17:54 gimpy2938 iggy: What's the bootstrap script?
17:56 iggy it's a helper script to install salt in a similar fashion across multiple OSes/Distros
17:56 nzero joined #salt
17:56 otter768 joined #salt
17:57 gimpy2938 iggy: ok, does it come with the salt package, is it another PyPi package, or it is some script you only get from http://saltstack.com?
17:57 iggy it's a script you download, it is also included in salt for use by salt-cloud and the saltify provider
17:58 zwi joined #salt
17:58 gimpy2938 what's it called?  I have salt-cloud installed but I don't see anything called salt-bootstrap or similar
17:59 lothiraldan joined #salt
18:00 iggy /usr/lib/python2.7/dist-packages/salt/cloud/deploy/bootstrap-salt.sh or thereabouts
18:01 cowpunk22 joined #salt
18:01 chiui joined #salt
18:01 gcfhvjbkn joined #salt
18:02 ageorgop joined #salt
18:02 gimpy2938 Ah, found it at /usr/lib/python2.6/site-packages/salt/cloud/deploy/bootstrap-salt.sh ... because that's such an obvious place to put it, hidden among python modules
18:03 zwi does anybody have any good examples for iterating over a list in a sls file using Jinja? Everything I have tried doesn't seem to work as the list itself must be empty even though I've proven to myself it's populated.
18:03 lrojas hi all
18:03 ThomasJ zwi: https://github.com/FEI-Lithicon/common-packages-formula/blob/master/common/init.sls
18:04 zwi @ThomasJ: Thanks I'll check it out and report back
18:04 lrojas how can i specify in salt that a service should be installed and started ? i know individually for example... i can do nginx: pkg.installed   and nginx: service.running: - enabled: True
18:04 lrojas but when i put then in a single file they fail
18:05 lrojas what would be the right aproach?
18:05 numkem is Beryllium planned to be the next release?
18:05 ThomasJ zwi: The examples pillar is missing, but it would look like http://pastebin.com/g1zhx0Tb
18:05 sdm24 joined #salt
18:06 iggy gimpy2938: well, generally you'd use the saltify cloud provider to have salt run it remotely... therefore you don't really need to worry about where it is
18:07 iggy lrojas: use unique id's and set the name option to nginx
18:07 zwi ThomasJ:  Just to make sure..I *can* do a {% set var = 'test' %} within a for loop right? var would be accessible?
18:08 zwi I should say var would be accessible outside of that loop?
18:08 iggy numkem: it's following the periodic table, Be will be 2015.8 (which is in rc)... B will be the first release in 2016 (mostlikely)
18:08 ThomasJ zwi: If i remember a discussion previously correctly, no. Once set, it apparently cannot be modified. But don't hold me to that
18:09 zwi ThomasJ:  Ok..that lets me at least google around. Thanks.
18:09 numkem iggy: darn... This means that they only plan to look at my pretty breaking mine issues only for the version set for next year
18:09 ThomasJ zwi: However you do have the option of bringing in an additional renderer to to the mix, like mako or python which would allow you to do what you want
18:09 gimpy2938 iggy: ... and the script doesn't work anyway, chokes on yum 'conflicts with file' errors ... perhaps I should give up and just use the old version found in EPEL
18:09 numkem iggy: thanks for the info
18:10 bhosmer joined #salt
18:10 iggy numkem: they have a nasty habit of backporting stuff they really shouldn't
18:10 c10b10 joined #salt
18:11 AndreasLutro numkem: what issue(s)?
18:11 numkem iggy: nasty habbit maybe but it might fix my problem... It's relly on the salt mine for service discovery
18:11 numkem I have one that I opened but there is many that are related: https://github.com/saltstack/salt/issues/21986
18:11 saltstackbot [#21986]title: Using mine.get while targeting grain returns data from dead minions | Hello,...
18:11 iggy gimpy2938: or not redhat? I don't know what to tell you man... Salt is a moving target, it sometimes breaks
18:11 numkem AndreasLutro: #21986
18:12 Gareth murrdoc: did you ever get the answer to that question you asked me?  re: runners & the scheduler?
18:12 numkem It's been opened for quite a while and it's even on priority 1
18:13 iggy lol, it's cute that you think that matters
18:13 baweaver joined #salt
18:14 numkem Well it's tagged white a lot of stuff, its kinda like a christmas tree
18:14 numkem and there is many other issues that are related and ends up probably from the same cause
18:14 AndreasLutro numkem: looks to me like the maintainers haven't been able to reproduce it, can't expect too much then
18:14 iggy most of them are... they've recently hired some triagers I guess
18:15 numkem AndreasLutro: What can I give more than what I see happenning and its been reported by many people in different setups?
18:15 forrest iggy: You see this aptly change?
18:16 forrest iggy: https://github.com/saltstack-formulas/aptly-formula/pull/21/files#diff-1ad1273aecd2d74a5fb7a9d592c9107bR35
18:16 saltstackbot [#21]title: multi-component and multi distributions repos handling | and adding removing of pkgs after adding to repo - minor fix
18:16 forrest I'm linking that line specifically because I don't see why you'd remove files
18:16 zwi ThomasJ:  Can you eyeball this code http://pastebin.com/z8tSSX9b and tell me I'm not crazy and my loop should set join_server to *anything* but None? (really just 'there')
18:16 AndreasLutro numkem: always hard to say... maybe if you can reproduce the issue with the least possible amount of configs that would help, put a vagrant + salt setup that shows the problem on github maybe
18:16 scoates joined #salt
18:17 iggy forrest: I'll look in a bit
18:17 forrest iggy: Cool
18:18 ThomasJ zwi: I suspect that might confirm what I mentioned. That once set, a variable cannot be modified in jinja :\
18:18 Ryan_Lane forrest: I was told it works, but I haven't tried
18:18 forrest Ryan_Lane: With masterless??
18:18 Ryan_Lane I run 100% masterless. not even a minion process
18:18 forrest Ryan_Lane: Yeah I know you do. ;)
18:18 Ryan_Lane but yeah, I was told reactors work with masterless
18:18 Ryan_Lane haven't tested that
18:18 forrest Ryan_Lane: but is it actually in a REAL release.
18:18 Ryan_Lane I think it went in 2015.5
18:18 forrest Ryan_Lane: It's been in dev for a while, I can double check, wasn't sure if you knew off hand
18:18 Ryan_Lane but I'm probably wrong :)
18:18 zwi ThomasJ:  ok…I'll go research that then. I just wanted to make sure it wasn't anything obvious besides being immutable
18:19 numkem AndreasLutro: I guess thats the only way I might get something from it. It seems like it's be confirmed in other issues as well. It would just be nice to see where this is going. They already know that cache generation for mine doesn't seem to work properly and there is bugs regarding the mine as well that would return all minions in case of an error instead of just showing an error
18:19 ThomasJ zwi: I would try with python or mako tbh. I know that mako at least can be coupled with jinja and yaml in one sls
18:19 forrest Ryan_Lane: Hmm I thought I checked 2015.5 and it didn't work, could be wrong though
18:19 forrest Ryan_Lane: I'll try to make time to upgrade my server and test it tonight with some git hooks
18:20 ThomasJ zwi: ie: #!jinja|mako|yaml   at the top of the file
18:20 Ryan_Lane forrest: cool. let me know how it goes
18:20 AndreasLutro numkem: of course, the most effective option, if you're capable, is to work on a fix yourself
18:20 forrest Ryan_Lane: Will do
18:21 ThomasJ That allows for both mako and jinja to be used in the file
18:21 ThomasJ And since the script tags differ, you can probably set the variable in mako, and leave the rest in jinja
18:21 numkem AndreasLutro: i guess it wouldn't hurt if I took a look at it
18:21 ThomasJ I know someone mentioned a workaround that could work, but I cannot remember what it was :\
18:22 ThomasJ zwi: http://stackoverflow.com/questions/9486393/jinja2-change-the-value-of-a-variable-inside-a-loop  perhaps
18:22 digitalhero joined #salt
18:25 Keith_ joined #salt
18:25 kevinquinnyo joined #salt
18:27 nzero joined #salt
18:28 meeteOrite joined #salt
18:28 kevinquinnyo what would cause salt cmd.run to not have access to /root/.my.cnf on some servers, but not all?  I can test this by running salt '*' cmd.retcode "mysql  -e 'show databases'"
18:28 kevinquinnyo if i change that command above to explicitly include the user and pass, i get a 0 exit status for all servers, but without it, only one passes
18:28 kevinquinnyo so it seems that only one of them is "sourcing" /root/.my.cnf
18:28 kevinquinnyo any ideas?
18:30 mohae joined #salt
18:30 zmalone Could some be running as an unprivileged user?
18:31 X67r joined #salt
18:31 penguin_dan joined #salt
18:32 capricorn_1 joined #salt
18:34 meeteOrite I wrote a returner that is sending data about highstate runs from minions off to a web server, but the output does not describe whether the a state succeeded or failed.  What I get looks like 'service_|-sshd_|-sshd_|-running', so it's describing something and what it should be configured as, but no output as to whether it failed.  Is there a way to increase the verbosity of the returner?
18:34 DammitJim how does something like this figure out to go to my /srv/pillar/samba/init.sls to get the samba_sections? {% set samba_sections = pillar.get('samba_sections', {}) %}
18:35 iggy kevinquinnyo: there are a couple bugs open about env variables not being set (namely HOME)
18:35 iggy kevinquinnyo: run salt '*' cmd.shell "echo $HOME"
18:36 iggy I bet you get different output between the ones that work and the ones that don't
18:36 digitalhero joined #salt
18:39 jmreicha joined #salt
18:40 bhosmer_ joined #salt
18:40 ajw0100 joined #salt
18:40 baweaver joined #salt
18:40 kevinquinnyo iggy: all the same for that
18:41 kevinquinnyo iggy: difference when i run salt '*' cmd.shell "env" though..  hm
18:41 bhosmer joined #salt
18:42 jmreicha_ joined #salt
18:42 kevinquinnyo env USER is missing on the ones that fail.
18:42 dthom91 joined #salt
18:42 kevinquinnyo iggy: so this is a bug??  Huge bug right?.
18:43 iggy no
18:43 iggy they don't think it is
18:43 iggy users seems to think so
18:43 iggy guess if it gets fixed
18:44 meeteOrite Anyone?  Bueller?
18:45 utahcon alright, big hair question... I have a state that runs a command using cmd.run -- If I run that state from user vagrant as "sudo salt-call state.sls mystate" it just hangs (with debug I can't see any signs of a reason) -- if I run the command directly using sudo su -c "myCommand contained in cmd.run" it runs just fine -- if I "sudo su - " to become root, then run the state file, it runs just fine... what is going on?
18:46 kevinquinnyo iggy is there a common workaround that people are using?  Do I need to explicitly set the environment variable for USER and whatever else i need inside my cmd.run commands?
18:47 zwi ThomasJ:  thank you! I think that just answered my question. I'll refactor based on that.
18:47 DammitJim when defining a new pillar
18:47 DammitJim what do I need to do to refresh that on the master?
18:47 XenophonF when i use import_yaml to create a dictionary, is the dictionary's "update" method the one defined in salt.utils.dictupdate, or is it the classic update method?
18:47 DammitJim and minions?
18:48 quasiben joined #salt
18:48 utahcon DammitJim, saltutil.sync_all
18:48 iggy kevinquinnyo: yes (see aptly formula)
18:49 kevinquinnyo iggy: do you know of an issue that tracks this "feature (not a bug)"?
18:49 XenophonF i ask because i want to recursively merge dictionaries from defaults.yaml and map.jinja, but it isn't happening
18:49 kevinquinnyo iggy thanks
18:49 eliasp_web joined #salt
18:49 lrojas what does it mean when i get orchestrate is nil. Not running state.orchestrate.
18:50 baweaver joined #salt
18:50 DammitJim I'm running a state and it's erroring saying: Jinja variable 'None' has no attribute 'keys'; line 274
18:51 DammitJim line 274 on my smb.conf says: {%- for section in samba_sections.keys() %}
18:51 utahcon does your pillar/top.sls load the appropriate pillar data for that call?
18:51 DammitJim my /srv/pillar/samba/init.sls says: http://pastie.org/10329981
18:52 DammitJim my /srv/pillar/top.sls just has http://pastie.org/10329984
18:53 charginghawk joined #salt
18:53 DammitJim this is probably very simple
18:53 charginghawk left #salt
18:54 utahcon Really unsure here, but I think video_share needs to be proceeded with a - for the keys() function to work on it... totally unsure though
18:55 DammitJim https://github.com/saltstack-formulas/samba-formula/blob/master/pillar.example I'm following this
18:56 kevinquinnyo iggy: on one of my minions i was running salt-minion manually as root in screen -- that's the one that was working
18:56 kevinquinnyo adding {user: root} to cmd.run options fixes it for all of them
18:56 kevinquinnyo weird
18:56 kevinquinnyo makes sense i guess
18:57 utahcon DammitJim, did you sync the pillars down?
18:57 DammitJim with saltutil.sync_all yes, sir
18:57 utahcon saltutil.refresh_pillar
18:57 meeteOrite I guess I'll have to ask again: I wrote a returner that is sending data about highstate runs from minions off to a web server, but the output does not describe whether the a state succeeded or failed.  What I get looks like 'service_|-sshd_|-sshd_|-running', so it's describing something and what it should be configured as, but no output as to whether it failed.  Is there a way to increase the verbosity of the returner?
18:58 DammitJim thank you utahcon
18:58 DammitJim I'm running it now
18:58 indispeq I am having a very strange phenomenon , or rather it's just me who thinks this is weird, when doing the import from one map.jinja to another:
18:58 indispeq in the state2/map.jinja , in order for my var1 that Import, I need to do
18:59 indispeq {% from 'state1/map.jinja' import var1 %}
18:59 indispeq {% set var1 = var1 %}
18:59 indispeq and then I can do {% from 'state2/map.jinja' import var1 %}
18:59 indispeq otherwise it fails to find the var
18:59 indispeq is this this normal behavior that I need to declare set var1 = var1?
19:00 indispeq shouldn't the import make that implicit already and able to import from other sls files?
19:00 DammitJim dammit... that didn't do it, utahcon
19:00 DammitJim is it because I don't have a list of keys
19:01 DammitJim this is what I have at the top of my smb.conf file: {% set samba_sections = pillar.get('samba_sections', {}) %}
19:03 DammitJim ok, the error went away with the None
19:03 DammitJim but it didn't write anything :(
19:03 utahcon DammitJim, you are targeting the grains['id'], are you sure that matches up?
19:04 utahcon you can check the grains by running grains.item {item name}
19:04 utahcon so in this case grains.item id
19:04 jvblasco joined #salt
19:04 DammitJim the id is the server name, right?
19:05 pipps joined #salt
19:06 DammitJim maybe my problem is that I'm comparing it to == '*nsvstream*'
19:06 utahcon yeah, that is most likely it
19:06 utahcon lol
19:07 utahcon perhaps you need something like "contains"
19:07 utahcon I don't recall the proper syntax
19:07 DammitJim no, I'm already using that somewhere else and it works
19:07 DammitJim what is a simple way for me to go step by step and troubleshoot this?
19:07 DammitJim some kind of debug
19:08 DammitJim meaning, how do I even know if that's the step where it is getting stuck?
19:09 utahcon you can increase the log level by adding "-l debug" or "-l trace"
19:09 DammitJim to my salt command?
19:10 utahcon yes
19:10 ajw0100 joined #salt
19:11 nexus joined #salt
19:11 DammitJim hhmmmm... doesn't output anything
19:11 DammitJim I want to know that I'm at least in the for loop]
19:12 timoguin joined #salt
19:13 sdm24 I willl include {{ var }} at random points in the state
19:13 sdm24 just to make sure that it is being set correctly
19:13 jondonas joined #salt
19:13 DammitJim weird... I removed my if statement in my pillar
19:13 DammitJim and it didn't make a difference
19:13 DammitJim it's like this thing isn't even parsing my samba_sections
19:14 DammitJim sdm24, in the state or in the conf file?
19:14 jvblasco joined #salt
19:15 sdm24 In the state. So for a file.managed, I'll have "manage {{ var}} file: file.managed:   - name: /path/to/file, etc.
19:15 sdm24 and then I'll just run the state and see what the ID is called
19:16 DammitJim http://pastie.org/10330024 that's my init.sls for samba
19:18 zmalone joined #salt
19:18 jmreicha joined #salt
19:19 sdm24 https://gist.github.com/sdm24/cf5f35e6a421fb8c4555 that's how I do it
19:20 Edgan joined #salt
19:20 DammitJim hhmmmm...
19:20 DammitJim not sure how that relates to my problem
19:20 sdm24 it will print out what the variables are
19:21 sdm24 when you run the state
19:21 DammitJim but in my case, I don't have a variable in my state file
19:21 sdm24 oh
19:21 dergrunepunkt joined #salt
19:21 DammitJim I have the variable in my template file
19:21 DammitJim I think...
19:21 DammitJim that's where I'm confused
19:22 sdm24 in that case I would put them in the template file ( salt://samba/files/etc/samba/smb.conf ) at the end, and then run test=True for the state
19:22 DammitJim like I don't know if I'm even referencing the proper pillar
19:22 digitalhero joined #salt
19:23 sdm24 you could always make a quick test state. {% for var in salt[pillar.get]... %} \n echo {{ var }}: \n cmd.run   {% endfor %}
19:25 DammitJim ok, so samba_sections is empty!
19:25 DammitJim so, how the heck do I ensure I'm grabbing the right information from the right pillar?
19:25 DammitJim {% set samba_sections = pillar.get('samba', {}) %}
19:25 DammitJim is at the beginning of my smb.conf
19:25 digitalh_ joined #salt
19:26 DammitJim and my /srv/pillar/samba/init.sls is http://pastie.org/10329981
19:26 sdm24 what does salt '*' pillar.get samba return?
19:27 DammitJim nothing :(
19:27 DammitJim it just lists all the servers
19:27 sdm24 you want samba_sections
19:27 drawsmcgraw Stupid question... Pillar is rendered on the Master, isn't it ?
19:27 DammitJim so, the pillar isn't being applied properly
19:27 DammitJim actually, samba_sections does return stuff!
19:27 sdm24 in /srv/pillar/top.sls, you reference the samba.sls file. But the actual data on the minion is being applied as samba_sections
19:27 DammitJim only for the server I want to configure!
19:28 DammitJim I wonder why the heck when I run the state, it doesn't pick that up!
19:28 impi joined #salt
19:28 DammitJim ok
19:28 DammitJim I changed samba to samba_sections
19:29 DammitJim ok, that was it sdm24
19:29 DammitJim I changed it from samba_sections to samba earlier when I was getting the None error for jinja
19:30 sdm24 glad to help, and good to know you got it fixed
19:30 DammitJim you are the man!
19:30 DammitJim now I can go get some air
19:30 DammitJim I should have done that a while back
19:33 babilen Spo you haven't actually been using the same layout as in the pillar.example you pasted earlier?
19:33 c10b10 joined #salt
19:34 dude051 joined #salt
19:35 dthom91 joined #salt
19:36 XenophonF so i have the following state formula - https://github.com/irtnog/salt-states/tree/development/clamav
19:37 XenophonF when it renders the configuration files, only the settings from map.jinja appear in the files---the default settings are gone
19:37 XenophonF i thought that the "do default_settings...update(...)" code merged distro_map with default_settings, but that doesn't seem to be the case
19:37 XenophonF what am i missing?
19:41 PredatorVI I have an application that has 4 roles (rabbitmq_primary, rabbitmq_secondary, web, processor).  I currently have grains set for these roles on minions and use grain matching in top.sls to assign the state for that role.  The top file is getting larger.  Is it a good practice to assign the state folder to all minions for that application, and then inside the init.sls selectively target the minion based on grains in the init.sls?
19:42 XenophonF PredatorVI: use pillar for targeting, not grains, which is insecure
19:42 XenophonF i also target by server role
19:42 rideh joined #salt
19:43 XenophonF so i might have matches in top.sls for I@role:front-end and I@role:back-end
19:43 PredatorVI XenophonF:  Not sure I can visualize how to do that.  We do use pillars for each environment.  We'll have 5 or 6 enviornments by the time we are done
19:43 napsterX joined #salt
19:43 XenophonF PredatorVI: https://github.com/irtnog/salt-states/
19:43 XenophonF see also https://github.com/irtnog/salt-pillar-example
19:44 XenophonF that's my home network so it's a small example
19:44 dude051 joined #salt
19:44 XenophonF i have four environments (dev/test/staging/prod)
19:45 PredatorVI looking now..thanks for the examples
19:45 bhosmer_ joined #salt
19:45 XenophonF only three physical environments b/c i deploy to production from staging, perform final acceptance testing, then merge staging->production once changes are accepted, as this makes rolling back to the original production config easier
19:46 PredatorVI Can you elaborate on "merge staging->production"?
19:46 XenophonF yes
19:47 iggy XenophonF: you do know that salt doesn't actually run under python3 yet right?
19:47 XenophonF yes
19:47 lrojas what does state.orchestrate do ?
19:47 XenophonF doesn't mean the formulas shouldn't be python3 ready
19:47 iggy okay, just getting a jump on the inevitable formula shit show?
19:47 XenophonF exactly
19:47 XenophonF PredatorVI: the production environment == what we're running in production right now
19:48 XenophonF PredatorVI: when the shit goes down, we can deploy from that branch to go right back to where we were
19:48 XenophonF PredatorVI: when we finish testing production changes, we don't merge them from the testing branch into the production branch
19:49 iggy well, so long as it's little things, it's not a big deal, but I wouldn't expect the formulas volunteers to deal big python compatibility patches until it's actually going to do someone some good
19:49 deedubs joined #salt
19:49 XenophonF PredatorVI: instead, we merge them into the staging branch, and then our change procedure is to run the selected SLSes on the production servers via state.sls with saltenv=staging
19:50 XenophonF PredatorVI: if anything goes wrong, we can revert to the original production config by re-running highstate (or by re-running just those SLSes with saltenv=production)
19:50 spark_ joined #salt
19:51 gimpy2938 When compiling salt manually is there a way to have it install to a non-default location?
19:51 deedubs If my machine has an IAM role should I not be able to just do source: s3://<bucket>/bins/prometheus
19:51 manfred salt isn't compiled
19:51 manfred it is just python
19:51 manfred you can install it in any place wher eyou can import python from
19:51 CeBe joined #salt
19:52 hemphill joined #salt
19:53 XenophonF PredatorVI: ultimately, the production branch is supposed to always be deployable
19:54 PredatorVI XenophonF:  So you update state+pillar files in dev SCM branch, test, if passed, merge to test SCM branch, test, if passed-> merge to staging branch -> etc. if production fails, you revert production branch to previoius commit and rerun highstate....is my understanding accurate?
19:54 deedubs issuing `sudo salt '*' s3.get` I can get a list of buckets, can't use the files in SLSs
19:54 XenophonF no - i don't have to revert in the production branch at all
19:55 XenophonF to back out a change i just re-deploy from the production branch
19:55 XenophonF so my change process is to run "salt ... state.sls something1,something2 saltenv=staging", do a bunch of UAT
19:57 PredatorVI ah
19:57 otter768 joined #salt
19:57 XenophonF if all goes well, merge staging into production
19:57 PredatorVI Which branches are the physical/actual branches you work with
19:58 XenophonF if it breaks, run "salt ... state.highstate"
19:58 pi3r6 joined #salt
19:58 XenophonF i work mostly in development
19:58 baweaver joined #salt
19:58 adelcast joined #salt
19:59 icflournoy joined #salt
20:01 zwi joined #salt
20:02 bastion1704 joined #salt
20:02 baweaver joined #salt
20:03 dude051 joined #salt
20:05 dude^2 joined #salt
20:08 PredatorVI XenophonF: Okay, that is a cool way to do it.  I'm trying to figure that part out for our stack now, but we are using GoCD to orchestrate the process and idempotency is needed such that any deployment pipeline could be rerun at any time.  I've currently been going down the path of only using pillar branches for each environment, but not using gitfs for pillars, but instead pulling the pillars into the CD pipeline and archiving them as materials that can
20:08 nzero joined #salt
20:09 |Fiber^| joined #salt
20:09 DammitJim how does one handle doing stuff on a minion that requires a password?
20:10 DammitJim like I'm trying to join a minion to a domain and it'll ask for credentials
20:15 sdm24 cmd.run: | echo {{ password }} \n echo {{ password }}
20:16 sdm24 thats if it asks you to enter and repeat a password
20:16 GabLeRoux joined #salt
20:16 sdm24 there is probably a way where you can have a "cmd.run:" call and -p {{password}} or whatever in the command
20:17 DammitJim interesting
20:17 DammitJim so, I just put that in my state file?
20:17 DammitJim sorry for asking so many questions... I'm trying to get my hands as dirty as possible
20:18 gthank joined #salt
20:18 sdm24 no worries
20:20 sdm24 for example, this is how I add a user and password to pureftp, after setting the {{ user }} and {{ password }} variable with grains
20:20 sdm24 - name: "(echo {{ password }}; echo {{ password }}) | pure-pw useradd {{ user }} -u ftpuser -d /home/ftpuser/{{ user }} -m"
20:20 sdm24 err pillar not grains to set, but same difference
20:20 digitalhero joined #salt
20:23 DammitJim so, when do you enter the password?
20:23 sdm24 I set it in the pillar arguments
20:24 sdm24 and when I run the state, that echo {{password }} part will output it from the pillar, and then it asks to reenter the password so thats what the 2nd echo does
20:24 sdm24 and it runs the pure-pw useradd first
20:24 sdm24 so if in the cli I just did "pure-pw useradd testuser .."
20:24 sdm24 it would ask me to enter, and then renter, its password
20:25 DammitJim oh ok
20:25 DammitJim so, that information is legible?
20:25 DammitJim I don't care... just asking if it is
20:25 sdm24 in the pillar
20:25 sdm24 but most people accessing the ftp server a) won't have root access and b) don't know what salt is or how to use it
20:26 ethand320 joined #salt
20:26 sdm24 they just need an account made for them to use from their browsers
20:27 subsignal joined #salt
20:28 dthom91 joined #salt
20:28 DammitJim damn Windows Netbios!!!!
20:29 DammitJim I have to change my linux server names to be shorter than 15 characters
20:29 DammitJim ugh
20:29 jmreicha joined #salt
20:32 spark__ joined #salt
20:33 sroegner joined #salt
20:34 zmalone left #salt
20:34 cowpunk22 joined #salt
20:36 herpoderp joined #salt
20:40 babilen heh :)
20:40 rhodgin joined #salt
20:42 dfinn joined #salt
20:43 DammitJim NOT funny!
20:44 napsterX joined #salt
20:48 fersur3 joined #salt
20:48 quique joined #salt
20:49 quique i want to put a file in place with certain contains but allow it to be changed (not managed) what is the best way to do that?
20:50 baweaver joined #salt
20:51 cowpunk22 joined #salt
20:51 AndreasLutro quique: file.blockreplace maybe?
20:51 digitalhero joined #salt
20:52 mnml_ joined #salt
20:53 sdm24 quique: or maybe a prepend/append if you only want salt managing the start or end of the file
20:55 napsterX joined #salt
20:57 KyleG joined #salt
20:57 KyleG joined #salt
21:01 nzero joined #salt
21:02 gimpy2938 Have a minion installed to a virtualenv and I'm getting a "coercing to Unicode" error when starting the minion, any clue what can cause this?  https://gist.github.com/anonymous/951f27ecc625335f2cb5
21:03 AndreasLutro gimpy2938: salt-minion -l debug
21:03 AndreasLutro for more verbose errors (hopefully)
21:04 zmalone joined #salt
21:05 pipps99 joined #salt
21:06 Lionel_Debroux joined #salt
21:07 babilen ItalianUnicodeMafiaError
21:07 peters-tx joined #salt
21:14 TyrfingMjolnir joined #salt
21:17 digitalhero joined #salt
21:18 digitalhero joined #salt
21:23 PredatorVI I've started some refactoring and am selecting states in my init.sls based on grains currently.  I don't have it working yet and wondered if they way I'm doing it will work.  Can someone glance at it that knows templating + include and tell me if this will work when multiple grains match?  https://gist.github.com/PredatorVI/1a6c2835b4876480fc27
21:23 AndreasLutro PredatorVI: it won't, yaml doesn't allow duplicate keys
21:23 PredatorVI Ugh, thanks
21:24 subsignal joined #salt
21:24 AndreasLutro fwiw, personally I'd just put this in top.sls
21:24 PredatorVI My top.sls is gonna get huge and I thought that managing minion role in the application specific state would be cleaner
21:25 PredatorVI What is downside of doing  this?
21:27 SheetiS PredatorVI: you can keep your top clean still doing something similar to what you are, but mapping the state names directly from grains or a pillar.  Note that if grains give access to pillar data or anything else proprietary, assigning roles via them can be a security issue.
21:28 AndreasLutro complexity, indirection, less control of state/pillar ordering
21:28 whytewolf PredatorVI: downside? maintaing that is going to be worse than mataining a large top file.
21:28 hunmonk_ babilen: in case you were wondering, from our convo yesterday, i solved the filename extension removal issue by re-implementing the state using the pyobjects renderer. geez, you're right, it's so much nicer to have access to all the python functions instead of contorting to meet jinja's limitations. and i rather like the look of the code in that renderer, the only thing i miss from the jinja renderer is not having to quote everything.
21:29 SheetiS PredatorVI: this is what my top.sls looks like for ~100 minions: https://bpaste.net/show/2513b180f033
21:30 xDamox joined #salt
21:30 SheetiS I store all my roles for systems in one place (an external pillar), but the idea is I can look at one spot and see if something is applied to a particular minion
21:30 SheetiS without having to fish around for it.
21:31 PredatorVI SheetiS:  I've got 54+ applications, most with multiple minions being deployed to 5 different environments (dev, acc, int, stg, prd).
21:31 sdm24 SheetiS: I assume that part of the bootstrap state adds the "completed" grain?
21:31 PredatorVI By the time I get this implemented, our production environment will consist of 1000+ servers just for production(prd).
21:32 SheetiS sdm24: Yes correct.  I do that run some one-time things once salt-cloud finishes its provision.
21:32 sdm24 got it, thanks
21:34 babilen hunmonk_: Glad you like it. It is nice that one can switch renderers, but it would have been so much nicer if mako had been the default with its support for literal Python blocks. That would have covered a lot of the "just need a little Python" usecases just fine.
21:34 [1]PredatorVI joined #salt
21:35 dthom91 joined #salt
21:35 hunmonk_ babilen: but it is usable now, right?
21:36 babilen what is?
21:39 hunmonk_ babilen: you can use mako by explicit declaration, no?
21:40 baweaver joined #salt
21:41 baweaver Whenever I run a grain command for IP, why is it that it returns multiple hosts?
21:41 iggy there's not nearly as much documentation on !jinja+yaml
21:41 iggy baweaver: example?
21:41 baweaver and was that issue where glob / grain commands time out local client ever fixed?
21:42 digitalhero joined #salt
21:42 baweaver Give me a sec to simulate it.
21:42 babilen hunmonk_: Sure, but that doesn't really help much as, once I decide to not use the default renderer because I need some Python functionality I would just go all the way. I also don't want to use many different renderers in the same codebase and most formulas, documentation and so on is written for jinja.
21:42 quique thanks: AndreasLutro, sdm24 prepend works wonderfully
21:43 babilen hunmonk_: Due to the fact that none of the jinja SLS file actually include a shebang line (they simply rely on it being the default), you can't even switch the default renderer at your site.
21:43 babilen (as that would break all existing SLS files that rely on jinja being the default)
21:43 * iggy would accept formula patches to change that
21:43 babilen It should have never been allowed
21:44 iggy baby steps
21:45 cliluw When a Salt master runs "state.highstate", do the minions store a log file of the details of that run?
21:45 theologian joined #salt
21:46 FeatherKing joined #salt
21:46 baweaver iggy: Where were the curl commands to run for a local_async?
21:48 sdm24 cliluw: yes, it depends on the loglevel. By default, I believe minions will only log warnings and worse for master calls
21:49 cliluw sdm24: Do you know where that is logged perchance?
21:49 sdm24 Plus I think /var/cache/salt/minion somewhere stores the last run
21:49 sdm24 the regular log is /var/log/salt/minion
21:51 sdm24 on the minion /var/cache/salt/minion/highstate.p will return the highstate output
21:54 nzero joined #salt
21:55 cliluw sdm24: Thanks.
21:55 sdm24 no problem
21:56 fersur3 left #salt
21:56 napsterX joined #salt
21:57 forrest joined #salt
21:58 otter768 joined #salt
21:58 baweaver curl -svi http://localhost:8000 -H "Accept: application/x-yaml" -H "X-Auth-Token: $token" -d client=local_async -d tgt='1.2.3.4' -d fun='test.ping' -d expr_form=grain
21:58 baweaver for some reason it returns a list of minions instead of just one.
21:58 zmalone joined #salt
21:58 baweaver iggy: ^
21:59 baweaver Now to find that jid curl command
21:59 iggy I meant the output too
21:59 baweaver Just a sec.
22:02 KingJ joined #salt
22:03 baweaver iggy: https://gist.github.com/baweaver/4fab3f008cb4903a8f7a
22:03 jmreicha joined #salt
22:04 iggy not super helpful without the data that you are specifically asking questions about
22:04 baweaver iggy: aside, if you try and run that same command as local it'll never return
22:06 iggy the only thing I can guess is that you are expected to loop over the list and only use whatever info you need
22:06 baweaver https://gist.github.com/baweaver/4fab3f008cb4903a8f7a#gistcomment-1542325
22:07 baweaver I use a grain search for an IP that's unique. Local Async client returns a list of potential minions for some reason, but looking up the job id returns only one host
22:07 baweaver I'm more of curious as to why it returns a list of minions for that.
22:07 sdm24 https://github.com/saltstack/salt/issues/25664
22:07 saltstackbot [#25664]title: 2015.5.2  MySQL Returner: salt-run jobs.lookup_jid doesn't return full result for highstate output | I set up a MariaDB database to use MySQL returner recently, and it is correctly storing the jobs cache, and "salt-run jobs.list_jobs" correctly lists the jobs in the database. If I run "salt-run jobs.list_job <jid>", it will return all of the job data, including the results for all targeted minions. "salt-run job.print_job <jid>
22:08 sdm24 maybe thats why you are only getting 1 host
22:08 pipps joined #salt
22:09 baweaver iggy: Interesting possibility is that the IP addresses are getting recycled somehow and grains keep that old data.
22:10 iggy do you not delete keys when hosts go away? use open_mode?
22:11 baweaver another good point
22:12 iggy grep -rin 1.2.3.4 /var/cache/salt/master/minions
22:12 baweaver Trying to recycle them is fun through a Ruby API, still trying to figure that one out
22:12 dthom91 joined #salt
22:12 iggy that'll tell you if the master legitimately thinks there are multiple matches
22:12 baweaver something to the note of @wheel commands
22:13 iggy if that is the case, depending on how often you recycle the IPs, you can use the manage runner to delete the keys on a schedule
22:14 baweaver I believe there was some odd issue with REST Tornado not having a wheel handler for us to delete them
22:14 baweaver Though would it be possible just to make a cron script to sweep on occasion? Or can Salt tell that instances are dead and gone?
22:15 dthom91 joined #salt
22:15 baweaver We have a Ruby application that's managing deployment to AWS including instance deletion.
22:17 troyready joined #salt
22:18 KingJ_ joined #salt
22:18 iggy there's salt.wheel.key.delete
22:19 iggy if you have @wheel in the eauth for that user, it should be able to do that
22:19 baweaver So I happened to make a ruby gem to make what amounts to curl requests at a Rest Tornado API
22:19 baweaver Problem being there was some issue with wheel and rest tornado
22:19 baweaver it didn't have support.
22:20 iggy what version? saltnado should be functionally equivalent to cherrypy
22:20 baweaver just a sec
22:20 baweaver Server: TornadoServer/4.1 # That was the version right?
22:20 baweaver If not I'll go find it elsewhere.
22:21 druonysuse joined #salt
22:23 KingJ joined #salt
22:24 baweaver https://github.com/saltstack/salt/blob/develop/salt/netapi/rest_tornado/saltnado.py#L214 - Not in there iggy, unless I was looking in the wrong place
22:25 iggy what version of salt
22:27 KingJ joined #salt
22:27 baweaver How does one find that?
22:27 iggy salt --versions
22:27 sdm24 salt --version
22:27 baweaver salt --version; salt 2014.7.2 (Helium)
22:28 baweaver though that above code is in master
22:28 iggy do you have the option of upgrading to the latest?
22:28 baweaver insofar that I can tell, rest tornado has a whitelist of clients and cherrypie doesn't
22:28 baweaver checking if I can bribe the admin into it
22:29 iggy saltnado underwent quite a few changes in 2015.2
22:29 iggy err, 2015.5
22:29 iggy DAMN YOU SALT DEVS FOR CHANGING THAT!
22:29 snarfy joined #salt
22:30 baweaver heh, so it goes.
22:30 enator Any chance anybody knows of any good examples of using salt for application deployment?
22:30 baweaver Any convenient location for major changes between the versions?
22:30 iggy baweaver: release notes?
22:30 baweaver that'll work.
22:31 FeatherKing joined #salt
22:32 iggy they don't say anything about it
22:33 iggy jackson tj talked about it a bit at the conference
22:34 napsterX joined #salt
22:34 baweaver iggy: I'd bet the local timeout issues are due to that bit with leftover clients.
22:35 baweaver drat, looks like I'm stuck for the short term.
22:37 twork i have some salt code that's barely started, and i have to turn elsewhere for a bit but i don't want to delete it. usually at a time like ths i'll #-out whatever i'm working on, but currently that seems to be causing a minion's state to fail to compile. is there another way?
22:38 vando joined #salt
22:38 pipps joined #salt
22:38 iggy {# #} can be used over multiple lines
22:38 iggy (jinja comments)
22:38 twork aha, right. thanks.
22:38 sdm24 Yeah, even if you comment a line, the jinja will still render if not commented
22:41 c4t3l joined #salt
22:42 c4t3l greetings gurus.
22:46 c4t3l I am trying to reference a pillar key:value pair in another pillar file using an if statement.  Does anyone have any examples of this?
22:46 dthom91 joined #salt
22:47 sdm24 {% if salt['pillar.get']('key1') == 'value1' %} key2:  value2 ?
22:51 dimeshake joined #salt
22:51 intel joined #salt
22:52 c4t3l sdm24: I have this http://pastebin.com/jQYFxY6t
22:52 Bryson joined #salt
22:52 c4t3l basically for loop through the key/vals and an if on a three letter location code
22:53 c4t3l but it returns 'None'
22:53 iggy you can't use pillars in other pillars
22:53 sdm24 oh
22:54 c4t3l hmm
22:54 c4t3l even if pillar1 is set by a grain, you cant use the "output" of pillar1 to set a value in pillar2?
22:54 iggy no(t reliably)
22:56 c4t3l thanks iggy. big props my jinja ninja!
22:57 icflournoy joined #salt
22:58 iggy c4t3l: if you are setting the pillar via a grain value, can't you just use that same logic in the pillar
22:59 c4t3l yes.  Just trying to wrap my brain around this.  I'm in the process of migrating from a puppet role based set up to salt
23:00 iggy yeah, it sucks that roles aren't a more "core" part of salt (and that you can't trust using grains for roles)
23:00 _JZ_ joined #salt
23:01 c4t3l I suppose you could use some kind of custom grain to set a role?
23:01 iggy we use grains, yeah
23:01 c4t3l I need more console time with this.  Thanks for your help iggy
23:02 iggy but they are set using a custom grain module from GCE metadata (which still isn't safe, but it's "safe enough")
23:03 dthom91 joined #salt
23:04 PredatorVI joined #salt
23:05 timoguin joined #salt
23:09 rhodgin joined #salt
23:10 TyrfingMjolnir joined #salt
23:11 scott_w joined #salt
23:11 flogen joined #salt
23:11 flogen What is this channel about?
23:14 hasues joined #salt
23:16 dimeshake flogen: saltstack
23:19 VR-Jack2 I thought it was about pepper
23:19 slav joined #salt
23:20 drawsmcgraw left #salt
23:21 PredatorVI Is there a way in jinja to check for a substring value?  Such as:  {% if grains['role'].contains('rabbitmq') %} ??
23:21 slav hi I have a problem with our local windows repository. in /etc/salt/master I have changed te default path to /srv/salt/windows/repo and the master stopped sending files to minions (local files only) The git repo seems to work fine
23:22 slav also /srv/salt/windows is our windows environment
23:24 zzzirk joined #salt
23:24 slav and /srv/salt/windows/repo is added to the windows environment path  same as other folders like states and files.
23:25 snarfy PredatorVI, yeah I think that works. I know startswith and endswith work
23:25 slav if i run salt \* pkg.available_version vipre-agent-workstations I'm getting he minion function caused an exception: Traceback (most recent call last):       File "c:\salt\bin\lib\site-packages\salt\minion.py", line 1146, in _thread_return
23:25 slav any help
23:25 slav ?
23:25 PredatorVI snarfy: thanks...is dot notation the right syntax?
23:26 murrdoc joined #salt
23:26 druonysus joined #salt
23:27 dthom91 joined #salt
23:28 snarfy yeah I think so. I'm looking at examples in my states. i have a line like {%- if grains['fqdn'].endswith('org') %}
23:28 flogen joined #salt
23:28 PredatorVI kk
23:30 dthom91 joined #salt
23:34 zwi joined #salt
23:34 flogen joined #salt
23:37 hasues left #salt
23:40 omegamike joined #salt
23:41 otter768 joined #salt
23:41 levlaz PredatorVI: I do something similar but i use "in" instead of .contains
23:41 levlaz For example
23:41 levlaz {% if 'mini' in grains['id'] %}
23:42 levlaz That will be true for any minion that has the word mini in the ID
23:43 mosen joined #salt
23:44 napsterX joined #salt
23:46 zsoftich1 joined #salt
23:54 jmreicha joined #salt
23:57 Steven- joined #salt
23:58 baweaver joined #salt

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