Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-08-05

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

All times shown according to UTC.

Time Nick Message
00:06 spark_ joined #salt
00:07 murrdoc joined #salt
00:11 qmr joined #salt
00:18 TyrfingMjolnir joined #salt
00:21 hunmonk_ left #salt
00:22 PredatorVI levlaz: thanks
00:22 PredatorVI I think 'in' is the right way.  I can't find a 'contains' method in Python.
00:23 PredatorVI Does anyone know of a state module that will pull artifacts from a Maven repository given the GAV + optional qualifiers?
00:26 dthom91 joined #salt
00:29 auzty joined #salt
00:45 zwi joined #salt
00:45 napsterX joined #salt
00:51 murrdoc joined #salt
00:52 [dee] joined #salt
00:52 baweaver joined #salt
00:58 murrdoc how to delete grain
00:58 murrdoc delval dont work
01:05 enator_ joined #salt
01:07 timoguin joined #salt
01:24 mapu joined #salt
01:26 tiadobatima joined #salt
01:27 jmreicha joined #salt
01:29 omegamike joined #salt
01:35 nexus joined #salt
01:36 zzzirk joined #salt
01:42 ip` joined #salt
01:45 ip` I'm having the most difficulty ever trying to learn salt. Do you know of any websites or tutorials that are not on saltstack.com that could help?
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2015.5.2 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:49 nzero joined #salt
02:00 XenophonF ip`: what kinds of problems are you encountering? don't hesitate to ask questions here. everyone's really helpful.
02:03 XenophonF alternatively, there are a bunch of saltstack videos that are pretty good
02:03 zwi joined #salt
02:04 XenophonF ryan d. lane has a blog with lots of interesting salt use cases
02:04 otter768 joined #salt
02:06 spark_ joined #salt
02:09 Cerales joined #salt
02:09 spark_ joined #salt
02:10 Cerales I'm getting the message "'slack.send_message' is not available'" when I try to run the salt.send_message module at the salt command. I've got the api key configured for both the master and minion. Anyone know why i get this?
02:11 Cerales I'm running 2015.5.2; the docs say this feature was added at 2015.5.0, and I can see slack.py in the package files.
02:13 Cerales Looks like list_users and find_user work - just not send_message. Hm.
02:13 mosen is there a requirement for a python lib to be installed in order for the module to be available? ah guess not :)
02:16 deedubs anyone been able to get source: s3://<bucket>/file to work with IAM roles f.e. NOT specifing s3.key s3.keyid?
02:19 jmreicha joined #salt
02:20 XenophonF deedubs: iirc it was a confirmed bug in 2014.7 and 2015.5, dunno if it got fixed though
02:20 deedubs XenophonF: thanks!
02:20 XenophonF or maybe that was with ec2
02:22 XenophonF https://github.com/saltstack/salt/issues/13850 seems to indicate that instance role credentials should work out of the box
02:22 saltstackbot [#13850]title: s3:// urls in file.managed (and likely elsewhere) require s3.key and s3.keyid to be in minion config | Though the s3 module will read s3.key and s3.keyid from pillars, s3:// urls in file.managed and likely elsewhere require these to be in the minion configuration.
02:23 acchan joined #salt
02:24 XenophonF i need to recursively merge dictionaries in map.jinja, but the whole import_yaml/default_settings/do ...update() pattern doesn't do that
02:24 XenophonF :(
02:25 joehh krymzon: I would clear out ------
02:26 acchan hi everyone, i've got an issue about cmd.run that is when i try to execute command with vsftpd. i.e: vsftpd -v, my terminal display result but salt return empty string. Problem occurs only with vsftpd. Did anyone had face that?
02:26 joehh [[FrontPage]] > [[Departments]] > [[Consulting]]
02:26 joehh ------
02:26 joehh '''Last Meeting''': 29 July 2015
02:26 joehh '''Date/Time''': 05 August 2015
02:26 joehh whoops - sorry there bad click and paste :(
02:27 joehh krymzon: I would clear out any pyc (or py) files from /usr/lib/python2.7/dist-packages/salt/ or /usr/lib/pymodules/python2.7/salt/ before installation of the packages
02:27 joehh if you remove/purge the package, those locations should be empty, if not, remove any files there and reinstall
02:28 fmn joined #salt
02:30 evle joined #salt
02:35 zmalone joined #salt
02:38 napsterX joined #salt
02:41 omegamike joined #salt
02:50 hblah joined #salt
02:57 timoguin joined #salt
02:57 dthom91 joined #salt
02:59 druonysuse joined #salt
02:59 druonysuse joined #salt
03:01 dthom91 joined #salt
03:01 favadi joined #salt
03:02 Furao joined #salt
03:03 nzero joined #salt
03:07 oyermolenko joined #salt
03:16 subsignal joined #salt
03:20 fgimian joined #salt
03:25 zmalone joined #salt
03:27 djstorm joined #salt
03:32 zmalone joined #salt
03:36 clintberry joined #salt
03:36 timoguin joined #salt
03:41 krymzon joehh: thank you!
04:05 otter768 joined #salt
04:06 soren joined #salt
04:07 Laogeodritt joined #salt
04:08 bytemask joined #salt
04:10 zmalone joined #salt
04:10 spark_ joined #salt
04:11 forrest joined #salt
04:11 hblah joined #salt
04:17 subsignal joined #salt
04:24 hrumph joined #salt
04:24 hrumph hi
04:24 hrumph any plans to integrate the package management stuff with windows oneget (for windows)?
04:25 rdas joined #salt
04:27 ip` joined #salt
04:28 hrumph (should have googled first...)
04:28 Aidin joined #salt
04:29 hrumph https://github.com/saltstack/salt/issues/11769
04:29 saltstackbot [#11769]title: Support Microsoft "OneGet" repositories on WIndows minions | Seems useful for salt to [support this](http://blogs.technet.com/b/windowsserver/archive/2014/04/03/windows-management-framework-v5-preview.aspx)
04:34 druonysus joined #salt
04:47 ramteid joined #salt
04:48 jaybocc2 joined #salt
04:54 krymzon joined #salt
05:01 zzzirk joined #salt
05:01 hblah joined #salt
05:04 Fiber^ joined #salt
05:08 zzzirk joined #salt
05:15 napsterX joined #salt
05:18 subsignal joined #salt
05:19 oyermolenko joined #salt
05:21 malinoff joined #salt
05:22 malinoff joined #salt
05:22 jaybocc2 joined #salt
05:23 catpiggest joined #salt
05:26 stevednd joined #salt
05:40 pezus joined #salt
06:02 gcfhvjbkn joined #salt
06:06 otter768 joined #salt
06:09 AndreasLutro joined #salt
06:12 jeddi joined #salt
06:12 yomilk joined #salt
06:13 jaybocc2 joined #salt
06:14 lb1a joined #salt
06:18 ip` joined #salt
06:18 tiadobatima joined #salt
06:18 subsignal joined #salt
06:19 jmreicha joined #salt
06:24 dopesong joined #salt
06:25 dopesong_ joined #salt
06:29 jaybocc2 joined #salt
06:33 pi3r6 joined #salt
06:33 sjorge left #salt
06:35 stoogenmeyer__ joined #salt
06:41 KermitTheFragger joined #salt
06:42 ajw0100 joined #salt
06:49 sirex joined #salt
07:02 capricorn_1 joined #salt
07:03 kawa2014 joined #salt
07:06 monkey66 joined #salt
07:11 TyrfingMjolnir joined #salt
07:16 yomilk joined #salt
07:19 subsignal joined #salt
07:20 pi3r6 joined #salt
07:24 jab416171 joined #salt
07:24 funzo joined #salt
07:35 jaybocc2 joined #salt
07:38 amontalban joined #salt
07:38 stoogenmeyer__ joined #salt
07:38 Ztyx joined #salt
07:39 linjan joined #salt
07:39 Ztyx joined #salt
07:41 malinoff joined #salt
07:44 gcfhvjbkn joined #salt
07:47 krymzon joined #salt
07:50 jaybocc2 joined #salt
07:52 bougie is it possible to get the stdout output of a cmd.run in real time ?
07:53 AndreasLutro bougie: no
07:53 VooDooNOFX joined #salt
07:56 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. Is there a way to avoid that with Salt ?
07:58 _JZ_ joined #salt
07:58 voileux joined #salt
08:00 MohShami joined #salt
08:05 evilrob joined #salt
08:06 PI-Lloyd Horgix: remove the old key before re-provisioning the workstation. The only other way would be to set the master into open mode, but i would only do this if the master is on a trusted and secured network
08:07 otter768 joined #salt
08:08 Horgix PI-Lloyd: erf, I hoped that there would be something to remove it automatically :p Indeed, it is on a trusted and secured network, but I still prefer to avoid open mode.
08:09 chiui joined #salt
08:11 Horgix Is there a part of the Salt API made to handle keys ? So I could connect to the salt master and remove the key cleanly instead of doing something dirty that will call salt-key
08:11 jaybocc2 joined #salt
08:17 PI-Lloyd well, you could use a reactor to remove the existing key and add the new one
08:17 PI-Lloyd I think there is a reactor example of doing exactly that, I'll see if i can find it
08:18 PI-Lloyd http://docs.saltstack.com/en/latest/topics/reactor/#a-complete-example
08:20 subsignal joined #salt
08:21 linjan joined #salt
08:22 Horgix PI-Lloyd: oh, thanks a lot ! I didn't know about reactor, glad to discover it and that it has an example with the use case I'm looking for :)
08:27 jaybocc2 joined #salt
08:28 Furao joined #salt
08:32 lothiraldan joined #salt
08:32 eseyman joined #salt
08:36 PI-Lloyd no worries
08:41 Ztyx joined #salt
08:43 furrowedbrow joined #salt
08:54 shiriru joined #salt
08:54 jaybocc2 joined #salt
09:05 ITChap joined #salt
09:07 aarontc joined #salt
09:11 jaybocc2 joined #salt
09:12 jab416171 joined #salt
09:12 funzo joined #salt
09:17 N-Mi joined #salt
09:17 N-Mi joined #salt
09:19 lothiraldan joined #salt
09:21 subsignal joined #salt
09:25 kbr_ joined #salt
09:27 Norrland So, what's the recommended way of upgrading salt-minion from 2015.5.2 -> 2015.5.3 in debian jessie? Running 'pkg.upgrade dist_upgrade=true' leaves me with "dpkg: error processing package salt-minion (--configure): package is in a very bad inconsistent state; you shold reinstall it before attempting configuration"
09:33 jhauser joined #salt
09:45 monkey66 left #salt
09:47 AndreasLutro Norrland: that is probably the recommended way... I'd look for existing github issues about it or create a new one, and ssh into the machine and debug from there
09:49 Norrland AndreasLutro: yeah, and then I'm a bit stuck with machines not running ssh.
09:50 ksj joined #salt
09:51 XenophonF joined #salt
09:52 XenophonF i need to recursively merge dictionaries in map.jinja, but the whole import_yaml/default_settings/do ...update(distro_map) pattern doesn't do that
09:53 XenophonF so for example, https://github.com/irtnog/salt-states/tree/development/clamav, where the `clamav:clamd:AllowSupplementaryGroups: yes`  setting gets clobbered by distro_map
09:56 babilen Isn't it a wonder that something like that didn't make it to the stdlib in Python already?
09:56 babilen https://github.com/saltstack/salt/blob/develop/salt/utils/dictupdate.py#L20 might come in handy
09:56 XenophonF i found that
09:56 XenophonF and it is a wonder
09:57 XenophonF can I call that from Jinja? or is it type to learn how to do templates in Python?
09:58 babilen It's not an execution module
09:58 lothiraldan joined #salt
09:58 babilen (so no)
09:58 babilen But who knows? Maybe it gets monkey patched in too ... would be salt.utils.dictupdate.update
09:59 XenophonF could i put my own thing in _modules?
09:59 babilen You can indeed
09:59 XenophonF let me try calling salt.utils.dictupdate.update or salt['utils.dictupdate.update'] and see where that gets me
09:59 XenophonF failing that, i'll make my own convenience module
10:00 * babilen tries to prevent you from doing that ....
10:00 babilen *uuuughhhnnnnnngh*
10:00 XenophonF i totally don't want to
10:00 XenophonF you know, for my clamav SLS, it's no big deal to spam this one setting across map.jinja and call it done
10:01 XenophonF but i use the same pattern in my apache SLS, where there's a lot more data that i don't want to have to repeat
10:01 ws2k3 joined #salt
10:02 CeBe joined #salt
10:04 jim_ joined #salt
10:04 XenophonF any ideas where the "salt" dictionary gets defined?
10:04 supersheep joined #salt
10:05 XenophonF hm, renderers/jinja.py seems to call it __salt__, so let me look for that
10:06 XenophonF salt/loader.py
10:08 otter768 joined #salt
10:09 zer0def hngh, apparently salt 2015.5.3 doesn't play well with ubuntu15.04 on systemd
10:10 yomilk joined #salt
10:12 joehh zer0def: what is the issue?
10:12 joehh packaging related or something else?
10:13 zer0def joehh: service.running with enable=true errors out on not being able to enable a service
10:15 zer0def also, joehh, non-LTS ubuntu versions didn't yet get an update from 2015.5.2; i assume that's expected
10:17 lothiraldan joined #salt
10:17 jaybocc2 joined #salt
10:18 oravirt joined #salt
10:19 joehh I prepared packages for utopic, but launchpad wouldn't accept it
10:20 babilen zer0def: Did that service.running behaviour work before? Doesn't really sound like a packaging related problem though
10:20 zer0def joehh: gotcha
10:20 calmond joined #salt
10:20 zer0def babilen: that's not packaging related at all, but it works on ubuntu 14.04; afaik, it works on ubuntu 14.10 as well
10:21 zer0def just let me spin up a 14.10 machine just to be sure
10:21 joehh I'll upload a package for 15.04 later tonight, based on debian sid as I understand 15.04 no longer uses upstart
10:21 subsignal joined #salt
10:22 babilen zer0def: https://github.com/saltstack/salt/blob/develop/salt/modules/debian_service.py#L35
10:23 zer0def well, zing!
10:23 babilen Which means that you switch from that ^^^ to https://github.com/saltstack/salt/blob/develop/salt/modules/systemd.py
10:23 babilen (both have the same __virtual__ name, but I'm not surprised to see differences as they are, after all, different modules)
10:23 babilen What is the exact error you see (if any) ?
10:24 XenophonF babilen: no attribute 'utils.dictupdate.update', so i'm going to patch one in :-/
10:24 babilen XenophonF: Yeah, not really surprised about that tbh
10:24 zer0def babilen: let me re-run the state, one moment
10:25 zer0def babilen: http://codepad.org/EyGi6X99
10:26 zer0def i guess i'll need to parametrize all service states for debian distros on systemd
10:26 babilen zer0def: https://github.com/saltstack/salt/issues/23122
10:26 saltstackbot [#23122]title: service.{enabled,disabled,dead,running} broken on ubuntu 15.04+ | (Or systemd based ubuntus (for those wich run older versions, but with the systemd packages)....
10:27 babilen Curious that it (supposedly) works on Debian
10:27 babilen Might also just be an error in the bug report in that it is not specific to Ubuntu at all
10:28 babilen But then, we have some jessie boxes and I haven't encountered that particular error IIRC
10:28 babilen Ah, apparently just specific to systemd (maybe on os_family "Debian")
10:29 zer0def let me check whether i have a debian8 image laying around…
10:31 babilen I would expect it to not be specific to Ubuntu, but simply affect systems that use systemd
10:32 XenophonF babilen: re: dictupdate do you think this might work? https://gist.github.com/xenophonf/8ece41eccd5a1a4b5674
10:32 XenophonF my hope is that i can call salt['irtnog.dictupdate']() from jinja
10:33 XenophonF tell you what - tracing all of the monkey patching salt does is extremely confusing
10:33 XenophonF it's really difficult to tell definitively how stuff works
10:33 babilen https://github.com/saltstack/salt/pull/23060 has more info
10:33 saltstackbot [#23060]title: ubuntu systemd/legacy init support | This makes salt.service alike compatible with ubuntu>= 15.04...
10:34 babilen XenophonF: Isn't it?
10:34 babilen Doesn't look too shabby
10:34 zer0def babilen: yeah, caught onto that ticket as well, looking at it now
10:35 babilen zer0def: Not sure what they are doing, but it doesn't look like something that is/should be necessary
10:36 babilen Anyway, $lunch
10:36 is_null joined #salt
10:36 zer0def yeah, they're doing it in the systemd execution module, not quite related to the service state one
10:36 is_null hi all, is anybody able to spawn an lxc container with salt-cloud ? i'm facing this issue: https://github.com/saltstack/salt/issues/26024
10:36 saltstackbot [#26024]title: lxc_conf_unset in cloud.profile is ignored | Consider this cloud.profiles:...
10:37 is_null on the other hand i can't find the code that is supposed to do what the doc says it would :D
10:42 ksj why did the salt devs mix dicts and lists in the state hierarchy? seems to me the whole thing would work just as well if it was all ordered dicts, and it would prevent so many annoying errors
10:46 ksj I'm not criticising btw, there's probably a good reason, I'd just like to know what it is because I keep hitting errors that wouldn't be there if everything was dicts
10:48 XenophonF maybe because of how the state compiler works?
10:49 XenophonF `something: pkg.installed` is a funcall, after all
10:49 is_null ksj: this allows to set a key several times
10:49 is_null dunno if that's a good thing or not though
10:52 ksj is_null: that's actually one of the weaknesses, as I see it. for instance, in pkg.installed, I can have both skip_verify: false and skip_verify: true. If it were a dict that wouldn't be possible
10:53 AndreasLutro ksj: probably legacy reasons, but based on the fact you can provide both positional and named arguments to a function
10:53 evle1 joined #salt
10:53 AndreasLutro ksj: if you could assume only named arguments forcing it to be a dict would indeed be better
10:54 ksj AndreasLutro: yeah, I'm actually about to go through and change my pillar and python state to only use dicts, then convert what's necessary to lists at the last minute before returning the dict to salt.
10:55 ksj otherwise I have to loop over lists and check for duplicates and other ugliness
10:55 ksj there's no nice solution
10:56 slav0nic joined #salt
10:57 pi3r6 joined #salt
11:07 QiQe joined #salt
11:09 jaybocc2 joined #salt
11:13 slav0nic_ joined #salt
11:16 QiQe guys I have configured some new values on pillars for mine_functions
11:16 QiQe after run pillars.refresh and mine.update
11:16 QiQe nothing happens, but it works after a run a highstate on minions
11:17 QiQe any idea how to force all minion to update mine values from master?
11:18 oyermolenko joined #salt
11:24 QiQe joined #salt
11:25 yomilk joined #salt
11:26 lothiraldan joined #salt
11:35 markm joined #salt
11:39 NV joined #salt
11:45 jaybocc2 joined #salt
11:49 calmond joined #salt
11:50 pi3r6 joined #salt
11:51 Ztyx left #salt
11:56 stephanbuys joined #salt
12:01 zer0def babilen: while trying to prep myself a debian jessie image, i kinda got around to cleaning up my packer preseeds; thanks for that :)
12:01 rideh joined #salt
12:02 omegamike joined #salt
12:06 zzzirk joined #salt
12:09 otter768 joined #salt
12:10 riftman joined #salt
12:11 denys joined #salt
12:14 linjan joined #salt
12:17 DammitJim joined #salt
12:18 rhodgin joined #salt
12:23 subsignal joined #salt
12:29 rhodgin_ joined #salt
12:30 BlackBishop joined #salt
12:30 BlackBishop Hey, what would be a nice way to replace the current os and updates repo that come with a CentOS install with some local one ?
12:32 BlackBishop basically, what I'd like to do is replace the mirrorlist= lines in /etc/yum.repos.d/CentOS-Base.repo
12:32 elfixit joined #salt
12:32 BlackBishop for those 2 repos
12:35 oyermolenko Hi, All
12:35 oyermolenko does somebody see all time increasing number of open tcp connections on salt-master?
12:35 oyermolenko environment simple: salt-master + appr 140-150 salt-minions.
12:35 oyermolenko salt 2015.5.3 everywhere, zeromq-4.0.5
12:37 riftman joined #salt
12:39 cheus joined #salt
12:39 AndreasLutro all I want is a pillar + state top.sls that I can gitignore for messing around in a local environment, why does it have to be so hard >:-(
12:41 BlackBishop I think I got it
12:41 GabLeRoux joined #salt
12:45 dthom91 joined #salt
12:46 XenophonF BlackBishop: isn't there a pkgrepo state or something that would let you either deploy your own repo definitions or alter existing ones?
12:46 XenophonF BlackBishop: you can always use a file.replace state, too
12:50 babilen There is indeed a pkrepo state
12:51 dthom91 joined #salt
12:51 omegamike joined #salt
12:52 BlackBishop XenophonF: yeah, used pkgrepo.managed
12:52 BlackBishop seems to do what I want.
12:52 BlackBishop Thanks.
12:53 dthom91 joined #salt
12:53 furrowedbrow joined #salt
12:57 subsignal joined #salt
12:58 subsignal joined #salt
12:59 subsigna_ joined #salt
13:01 babilen Hi, I need to run multiple database instances on the same box and would love to be able to essentially just tell the master "one more" only to receive the information about the new one shortly afterwards .. How would you approach that?
13:01 Ahlee joined #salt
13:01 fgimian joined #salt
13:01 babilen (might also be an option to generate appropriate data beforehand, make it available via pillars and use that as input)
13:02 bhosmer joined #salt
13:05 XenophonF babilen: like different instances of a database engine? say, two different mysqlds, one listening on 3306 and the other listening on 3307?
13:08 jdesilet joined #salt
13:09 Tecnico1931 joined #salt
13:11 NV joined #salt
13:13 FeatherKing joined #salt
13:13 mapu joined #salt
13:15 racooper joined #salt
13:16 primechuck joined #salt
13:17 babilen XenophonF: Something along those lines, yeah
13:17 babilen I will have to check if different databases would suffice though
13:20 AndreasLutro tricky... what if you create 3 instances then want to remove the middle one?
13:21 AndreasLutro I'd rather just specify the different instances in a pillar explicitly
13:24 Ahlee joined #salt
13:24 cpowell joined #salt
13:25 bhosmer joined #salt
13:25 jaybocc2 joined #salt
13:31 hasues joined #salt
13:33 hasues left #salt
13:33 bmac2 joined #salt
13:34 icflournoy joined #salt
13:34 MohShami_ joined #salt
13:34 mpanetta joined #salt
13:34 bmac2 joined #salt
13:36 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/0fbcb807729c2653c403
13:38 yomilk joined #salt
13:44 bhosmer joined #salt
13:45 Ahlee joined #salt
13:47 soren joined #salt
13:50 zmalone joined #salt
13:52 carmony_ joined #salt
13:52 gthank joined #salt
13:52 gthank joined #salt
13:53 losh joined #salt
13:53 kossy joined #salt
13:56 pdayton joined #salt
13:57 shiriru joined #salt
13:58 XenophonF can anyone show me an example of a salt state formula that installs a python package from scratch (e.g., using "python setup.py install"), not using pip?
13:58 ingslovak joined #salt
14:01 jaybocc2 joined #salt
14:01 druonysus joined #salt
14:03 Tecnico1931 joined #salt
14:03 andrew_v joined #salt
14:09 dendazen joined #salt
14:10 otter768 joined #salt
14:11 pdayton joined #salt
14:12 dthom91 joined #salt
14:12 MohShami_ joined #salt
14:13 spark_ joined #salt
14:15 dthom91 joined #salt
14:17 spark_ joined #salt
14:21 lrojas XenophonF: why not use the cmd module?
14:22 twork related to that... i could swear i've seen a formula that depends on some package being present, but i can't recall how it was done. nudge?
14:24 dthom91 joined #salt
14:25 jaybocc2 joined #salt
14:28 Ahlee XenophonF: I agree with lrojas, if yuo need to run python setup.py install and not use pip or easy_install to a binary egg (or however you install wheel), just use cmd.run
14:28 twork clarifying myself: "...and if it isnt' there, installs it"
14:30 oeuftete In a module, is there a way to make locally-scoped pillar changes?  Or to call __salt__['some.module'], overriding some pillar values?
14:30 digitalhero joined #salt
14:30 clintberry joined #salt
14:31 oeuftete left #salt
14:31 oeuftete joined #salt
14:31 oeuftete joined #salt
14:33 dangra joined #salt
14:33 oeuftete For more context, I'd like to be able to use __salt__['docker.inspect_container'], but disable the various registries, and thereby the slow and unreliable external /auth to docker hub.
14:34 rideh joined #salt
14:34 oeuftete Really, it would be nice if the docker module had a _get_local_client() as well as a _get_client() so that methods that don't need the registry could be faster.
14:40 Mate 2015-08-05 16:37:24,942 [salt.minion      ][ERROR   ] Invalid keyword 'str' for variable 'master_type'
14:40 Mate love this change
14:41 slav0nic joined #salt
14:47 zmalone joined #salt
14:49 oeuftete To answer my own, looks like I can add "__pillar__['docker-registries'] = {}" etc. to my module.
14:55 amcorreia joined #salt
14:58 supershe_ joined #salt
14:59 napsterX joined #salt
15:00 mordonez joined #salt
15:01 sdm24 joined #salt
15:05 XenophonF lrojas, Ahlee: thanks for the feedback. i was hoping for a saltier way than cmd.run, but i think you're both right - that's probably the best way to do a manual package install
15:06 XenophonF does anyone here use saltpad with mod_wsgi? i'm not super familiar with it, and i'm running into some difficulty getting saltpad and apache to co-exist
15:07 DammitJim joined #salt
15:08 stoogenmeyer__ joined #salt
15:12 _JZ__ joined #salt
15:13 vaspiros joined #salt
15:18 rhodgin joined #salt
15:20 iggy ksj: ordered dicts didn't exist when salt started
15:21 markizano joined #salt
15:21 markizano hii all.
15:21 iggy ksj: also, they used to support passing arbitrary args via top level args (hence the lists and allowing duplicates)
15:21 markizano reqadd X-Forwarded-Proto:\\x5C http <- i'm trying to pass a value to a jinja template from the pillar, and it's escaping the backslash in everything.
15:21 markizano How can I send a literal backslash from the pillar to salt without it escaping the value ?
15:21 iggy quotes
15:21 supersheep joined #salt
15:22 markizano in init.sls {%- set haproxy = salt['pillar_ex.get']('net.haproxy') %}, and then {{ haproxy.cfg }} to render to the template.
15:22 markizano iggy: I do this in init.sls ?
15:22 markizano oh - make it a literal string...
15:22 markizano derp
15:22 markizano Thanks!
15:23 zmalone joined #salt
15:23 markizano wait
15:23 markizano iggy: in the init.sls I'm doing context: { haproxy: {{ haproxy }} } (shorthand)
15:23 markizano if I quote that, it'll end up a string in the template.
15:24 markizano if I put a quot in the template, it'll render a literal quote.
15:24 markizano haproxy config doesn't like quotes :/
15:24 markizano **iggy: in the init.sls I'm doing context: { haproxy: {{ haproxy }} } (shorthanded here for readability)
15:24 bhosmer joined #salt
15:25 iggy it shouldn't render the quotes in the template
15:25 iggy context: { haproxy: "{{ haproxy }}" }
15:25 iggy you're saying that renders quotes in the template?
15:26 dfinn joined #salt
15:26 markizano iggy: no, that actually will pass "context:haproxy" as a string.
15:26 markizano so when I attempt to access a value under the dictionary it is, it'll spit out str object has no attribute .get()
15:27 SheetiS joined #salt
15:27 iggy ahh haproxy is an object
15:28 markizano yeah.
15:29 iggy put quotes around it in the pillar file?
15:29 jartsu joined #salt
15:29 vieira joined #salt
15:30 vieira Hello, can I use schedule.add to run some job one hour from now? (only once)
15:31 iggy vieira: there's an at module
15:31 iggy (both execution and state modules)
15:31 oznah joined #salt
15:32 ekristen joined #salt
15:32 vieira I was trying to avoid that as I don't have the at packge on the machines...
15:32 jartsu What's the canonical way to create a salt state which installs a service and can distinguish between a master or slave instance of that service? For example, if I'm setting up a DNS nameserver, I want some hosts to be masters, and some to be slaves. How do I best do this? (yes, I've seen the bind formula, but I'm unclear about how to specify that some
15:32 jartsu machines should be slaves vs. masters)
15:33 sdm24 jartsu: the most common way is to set it in a pillar
15:33 zwi joined #salt
15:33 iggy jartsu: there's not really a canonical way to do that
15:33 alemeno22 joined #salt
15:33 sdm24 or have two different but similiar states, master.sls and slave.sls, and differentiate the two in your highstate top.sls
15:34 jartsu ok, is there any preference towards one way or the other?
15:34 supersheep joined #salt
15:34 iggy whatever works best for you really
15:34 jartsu cool, thanks
15:34 iggy salt is very much a "1000 ways to solve problems, choose what works best for you" type of tool
15:35 jim_ joined #salt
15:35 sunkist joined #salt
15:35 iggy kind of like a swiss army knife with a gun (with a hair trigger, so watch your toes)
15:35 sdm24 just have salt cmd.run everything you need /sarcasm
15:36 slav0nic joined #salt
15:37 mh888 joined #salt
15:37 oyermolenko joined #salt
15:38 oznah I want to log diffs when files change, but I can't seem to get that working. Eventually, I would like to log all of this centrally, but for now I would just be happy to get it to show files changes. Here are my master/minion configs. https://gist.github.com/oznah/cafd7ed944c28d877e8b
15:40 aparsons joined #salt
15:40 nzero joined #salt
15:40 viq joined #salt
15:40 brianfeister joined #salt
15:41 domel joined #salt
15:41 sdm24 is something other than salt making the changes?
15:41 timoguin joined #salt
15:42 sdm24 or do you want salt to log its own changes to files?
15:42 jmiller_ joined #salt
15:44 brianfei_ joined #salt
15:44 jmiller_ Hey guys - I'm having trouble setting up ext_pillar on a masterless minion. This was working fine for us on 2014.1.5. We are on ubuntu 14.04.
15:44 jmiller_ Here's come info: https://gist.github.com/johannmiller/fa4e52770cd29baf9283
15:45 iggy git ext_pillars didn't work in 2014.1
15:45 sdm24 I believe in 2015.5 you can drop git+ssh, and just have ssh://
15:45 jmiller_ That file worked for us.
15:46 jmiller_ We are using the git+ssh notation on our AWS salt-master. Would there be a diff masterless?
15:46 iggy hmm, apparently it did work, it just wasn't documented
15:47 sdm24 http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#simple-configuration I'm not 100% sure if that will work, but there is a small note at the bottom of that section about it
15:47 * iggy adds a /ignore for rule for masterless questions since he obviously doesn't know enough to be useful
15:48 dthom91 joined #salt
15:48 iggy sdm24: that's only for gitfs (not get ext_pillar)
15:48 jmiller_ iggy - I think gitfs for envs didn't work in 2014. That does work now :)
15:48 iggy they don't share any code (yet)
15:48 sdm24 I was wondering if they did share. gotcha. thanks
15:49 sdm24 hey where do I report small typos I found in help docs?
15:50 jmiller_ sdm24 - thanks for the doc. Will take a look now
15:50 domel if i wanted to include data from a pillar that is not in a top.sls file ntp as an example how would i invoke the salt call command trying sudo salt-call --local -l debug state.sls ntp pillar='{"ntp"}' but changes are not making it in. Once i include pillar data in top.sls file it seems to be working fine
15:50 sdm24 http://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.git_pillar.html#module-salt.pillar.git_pillar that doesn't use git+ssh:// either, but that could just be from limited examples
15:51 SheetiS sdm24: a github issue or a pull request with the correction (github.com/saltstack/salt) is how I've addressed in the past.
15:53 sdm24 SheetiS: Ok, so they are just filed with the other issues
15:54 favadi joined #salt
15:55 SheetiS sdm24: As far as I know that is still the case.
15:56 sdm24 thanks
15:57 cheus joined #salt
15:57 malinoff joined #salt
15:58 jmiller_ sdm24 & iggy - Should I file a bug for this ext_pillar issue on masterless minions? Can't get it to work
15:58 Brew joined #salt
15:59 sdm24 I personally don't know enough about ext_pillar, git, or masterless to properly troubleshoot, so I don't know if it is a bug, but couldn't hurt
16:00 jmiller_ Fair enough
16:00 zsoftich1 joined #salt
16:03 zer0def uh, ok, where is __salt__['service.enable'] defined?
16:03 zer0def tried looking in modules/service.py, but apparently that's not it
16:04 zer0def oh, nevermind
16:04 zer0def i'm just dumb
16:05 icflournoy joined #salt
16:06 dthom91 joined #salt
16:06 DammitJim joined #salt
16:06 markizano iggy: I solved it by using str.replace() in the rendering of the values in the template.
16:06 markizano crude, but at least we get a working service...
16:08 anotherZero joined #salt
16:09 pdayton1 joined #salt
16:10 kawa2014 joined #salt
16:10 otter768 joined #salt
16:12 anotherZero joined #salt
16:12 andrew_v joined #salt
16:12 dopesong joined #salt
16:13 writtenoff joined #salt
16:14 lrojas hi all, i am trying to set up a managed repository using thee pkgrepo.managed state
16:14 lrojas if i need to add deb and deb-source versions of the repo...
16:14 lrojas what is the right aproach?
16:15 lrojas just one after the other with the same file ?
16:15 lrojas like in - file: /etc/apt/sources.list.d/repo.list
16:16 lrojas do i set up two pkgrepo.managed entries?
16:16 VooDooNOFX joined #salt
16:16 iggy you _need_ the source version? Yes, 2 different states for each
16:17 timoguin_ joined #salt
16:17 lrojas iggy: my worry is that the - file entry is going to be the same file...
16:18 lrojas iggy: not sure how to handle that? will it append the entry ?
16:18 iggy you may have to use merge
16:18 iggy but why do you need them in the same file?
16:18 lrojas *shrugs* that's how i see ubuntu defines the repos...
16:19 iggy it's not a requirement
16:19 lrojas so, if i put them in separate files.. say repo.list and repo-source.list should be fine?
16:19 iggy si
16:19 spark_ joined #salt
16:20 dude051 joined #salt
16:21 shiriru joined #salt
16:22 dopesong joined #salt
16:23 lrojas iggy: sorry to be a pest, but what's wrong with this? http://pastebin.com/cRzLAjzR its failing with Rendering SLS 'base:node' failed: Conflicting ID 'pkgrepo.managed'
16:23 pi3r6 joined #salt
16:23 iggy you can't have 2 of the same function in 1 id
16:24 iggy so, nodesource_repo.... then nodesource_src_repo ....
16:24 iggy or whatever
16:24 iggy still not quite sure why you need the source repo
16:25 shiriru joined #salt
16:25 jaybocc2 joined #salt
16:26 bhosmer joined #salt
16:27 froztbyte urgh what
16:28 froztbyte I don't suppose there's anyone here who has knowledge of the htpasswd module/state?
16:28 xDamox joined #salt
16:28 froztbyte I'm seeing the weirdest thing. if I set it from a state in an SLS, I see a crypted password ending up there as I expect, but it doesn't work. if I use the module (from a salt-call on the node), it works
16:29 froztbyte thinking maybe a non-chopped newline or something?
16:29 froztbyte not that that makes much sense
16:29 lrojas iggy, that's how the setup script from nodejs setsit up
16:29 stoogenmeyer__ joined #salt
16:30 sdm24 have you tried using the crypted password as a string for the password? I found that sometimes Salt isn't the best at crypting
16:30 iggy lrojas: try without it, you generally don't need them unless you are rebuilding packages
16:31 murrdoc joined #salt
16:32 amcorreia joined #salt
16:32 froztbyte sdm24: it seems to hand it off to htpasswd as I would expect (when I view from -l debug)
16:33 VooDooNOFX joined #salt
16:34 BlackBishop left #salt
16:34 froztbyte ugh
16:34 froztbyte okay I missed a line earlier
16:35 froztbyte and my password as basically being set to pillar['....'][...].... etc
16:38 capricorn_1 joined #salt
16:40 froztbyte based on how long that took me to find, I should probably have more coffee or something
16:40 murrdoc heh
16:40 sdm24 coffee goes great... with salt!
16:41 sdm24 get it?
16:41 murrdoc no
16:41 murrdoc splain!
16:41 twork i have a couple vm's that live on an isolated net, with IP addresses that my master can't reach, host names that it can't resolve. i think i've seen a recipe for setting up a rig like this but i can't recall where. tips? ...or am i hallucinating?
16:41 murrdoc EX PLAIN
16:41 brianfeister joined #salt
16:41 murrdoc *dalek voice*
16:41 sdm24 because salt doesn't go well with coffee. It's a classic misdirection
16:41 twork the vm's did successfully register their keys. they can reach the boss fine.
16:41 murrdoc ( i had got it, was just dalek voicing
16:42 murrdoc )
16:42 zmalone joined #salt
16:42 sdm24 gotta do it whenever you get the opportunity. Can't blame you
16:43 murrdoc EXTERMINATE
16:43 iggy twork: the minions connect to the master (not vice-versa) so there shouldn't be a problem
16:43 twork wait, i think i'm being an idiot again. i was misreading "unaccepted" as "denied" or "rejected".
16:44 pi3r9 joined #salt
16:44 zzzirk joined #salt
16:44 twork thanks iggy. yeah, i do expect to be just fine. <clunks forehead with laptop>
16:44 eseyman left #salt
16:44 bezeee joined #salt
16:45 vincent_vdk joined #salt
16:46 dthom91 joined #salt
16:47 KyleG joined #salt
16:47 KyleG joined #salt
16:47 XenophonF left #salt
16:47 wendall911 joined #salt
16:56 dthom91 joined #salt
16:56 mordonez joined #salt
16:57 mordonez joined #salt
17:01 theologian joined #salt
17:05 cbrich82 joined #salt
17:06 ageorgop joined #salt
17:10 jmreicha joined #salt
17:11 SheetiS joined #salt
17:13 tomspur joined #salt
17:14 zmalone joined #salt
17:17 zzzirk joined #salt
17:18 gcfhvjbkn joined #salt
17:20 oznah sdm24: I am sorry I missed you earlier. I should have been more clear. I want to log when salt changes a file. ie. giving a record that would allow a rollback
17:20 sdm24 no worries
17:20 sdm24 http://docs.saltstack.com/en/latest/ref/states/backup_mode.html sounds like that is what you want
17:21 impi joined #salt
17:22 pipps joined #salt
17:22 oznah sdm24: I will check this out. That sounds like it. Otherwise, shouldn't other changes get logged somewhere also? ie. on host x user y was added/changed
17:23 sdm24 the jobs cache but that by default gets overwritten every 24 hours. the minion log will also have it I believe
17:24 tiadobatima joined #salt
17:24 sdm24 the backup_mode is nice because it keeps copies of the whole file, not just what was changed, so rolling back is very simple
17:25 cbrich82 joined #salt
17:26 oznah sdm24: yes I was reading. I think that will work. It sounds like I need to look into the jobs cache also. I am mainly worried about another admin making a change that causes issues, and being able to recover from said change, no matter what the change is.
17:33 forrest joined #salt
17:36 ajw0100 joined #salt
17:37 UtahDave joined #salt
17:39 pipps joined #salt
17:40 zmalone joined #salt
17:40 murrdoc joined #salt
17:47 Tyrm joined #salt
17:47 X67r joined #salt
17:57 tiadobatima joined #salt
17:57 baweaver joined #salt
17:57 levlaz left #salt
18:03 zzzirk joined #salt
18:08 zzzirk_ joined #salt
18:11 otter768 joined #salt
18:12 nexus joined #salt
18:13 dthom91 joined #salt
18:15 DammitJim what is wrong with this state?
18:15 murrdoc illinois ?
18:15 murrdoc too much corruption
18:15 murrdoc 80% population lives in the greater chicago area
18:15 MTeck joined #salt
18:15 iggy Texas? Too many Texans
18:15 DammitJim http://pastie.org/10331918
18:16 MTeck iggy: I was in TX Sunday
18:16 DammitJim no, in florida we are alright
18:16 MTeck Denver, though... and only for ~2hr
18:16 DammitJim nevermind
18:16 DammitJim missing the :
18:16 whytewolf Nevada, to many people from other places
18:16 MTeck My new job requires I learn Chef and I gotsta say... effing crap it's painful.
18:16 MTeck It's making me realize how incredibly much I love salt. :(
18:17 MTeck (and python)
18:17 DammitJim MTeck, no way around it, huh?
18:17 MTeck DammitJim: an easy typo to make :)
18:18 MTeck nah, client says chef, mteck does chef
18:18 DammitJim YES! I've been doing this typo for days!!! When am I going to learn?
18:18 DammitJim oh, client driven... yes, sir
18:19 MTeck this templating engine and how things are written is just ... :S
18:19 DammitJim anything you guys can recommend for configuring IP address?
18:19 DammitJim or do you guys normally configure a template VM server and change the IP after setting it up with salt-minion?
18:20 MTeck tbh, unless you'll be automatically deploying systems in a clustered environment, templating IP settings seems silly
18:21 sdm24 I have a setup state on our VM templates. After setting variables (hostname, maybe IP, maybe minionID), you manually call the setup state with salt-call --local. If no manual IP is set, the state will get the IP from a dig
18:21 DammitJim not sure what you mean
18:21 DammitJim sdm24, sounds interesting...
18:21 DammitJim how do you set the hostname, IP, minionID?
18:22 Tyrm joined #salt
18:22 iggy dhcp
18:22 sdm24 file.managed on /etc/host, /etc/hostname, /etc/network/interfaces
18:22 sdm24 and /etc/salt/minion_id
18:23 baweaver joined #salt
18:23 sdm24 https://github.com/sdm24/MySaltStates/tree/master/salt/linux/setup there might still be some crap in there. I tried taking out all the sensitive info and replacing it with first example.com, and then with pillar info but I probably missed some stuff
18:24 MTeck I created a VM template, in the template is a /root/deploy script that sets the minion_id, sets up /etc/network/interfaces, deletes ssh and salt keys, restarts the system. Then you need to approve the key on the master, and then everything else is done by salt
18:24 zer0def babilen: so apparently Canonical might've patched their systemd (currently at 219-7ubuntu3, whilst debian jessie's at 215-17+deb8u1) badly, which causes packages that don't have .service files to return an error, whilst still properly enabling them in sysv, which creates a need for PR#23060 monkey patching
18:24 sdm24 and yes, that was literally the first state I wrote with salt, so it could be more efficient and formatted better
18:24 MTeck doing the rest through an automation tool when each VM has a special purpose just seemed too silly
18:24 zer0def Canonical, because pirating can still get hard.
18:25 forrest basepi: Are you around?
18:25 krymzon joined #salt
18:25 MTeck basepi: I miss you! :(   ... and salt
18:25 forrest MTeck: You aren't using salt?
18:25 krymzon joined #salt
18:25 forrest and why are you using the short version of your login
18:26 X67r_ joined #salt
18:26 iggy they are both here
18:26 DammitJim sdm24, but how do you address that server? like how does the master find the minion?
18:26 forrest oh two different users
18:26 forrest /facepalm
18:27 MTeck forrest: new employment, current client doesn't allow outbound ssh (ssh->server->screen->irssi). Current client also uses chef and has no intention of changing.
18:27 forrest Disguisting
18:27 MTeck ya...
18:27 sdm24 DammitJim: I run the setup state as --local, with that folder saved on the template. So a new VM comes from the template, you set the variables, run the state, and then it will try to connect to the master. My master is just 'salt' so I don't need to change it
18:27 DammitJim wait... client doesn't allow outbound ssh???
18:27 MTeck but all things considered... I shouldn't be arguing
18:27 forrest I've been looking at jobs, lots of chef gigs, no thank you
18:27 DammitJim I had that problem at a large company... I changed my ports :D
18:28 DammitJim MTeck, I hear you... just pick your battles
18:28 sdm24 This really nice company that I have an in with, wants to hire a puppet guy :(
18:28 MTeck yup... next client may fully support salt
18:28 DammitJim sdm24, local... I'm going to have to read about that
18:28 DammitJim and you change your template with the appropriate "numbers"
18:28 MTeck http://dpaste.com/3PCCE4A  <-- I don't even get what's happening her
18:29 sdm24 salt-call --local will run the minion as if it was masterlist
18:29 MTeck here*
18:29 DammitJim oh ok, thanks sdm24
18:29 sdm24 masterless*
18:29 digitalhero joined #salt
18:29 DammitJim I guess that's the same thing as me creating a script that will ask me for information and it populates the stuff and the script is part of the VM
18:29 DammitJim ok, thanks!
18:30 MTeck aight... I should take off. back tonight!!
18:30 sdm24 DammitJim: no problem. The organization of my states can be a little wonky. We have both windows and linux VMs/templates, and I wanted the same state name for both, but need to keep them seperated on github. On a minion, in /srv/salt, is that variables.sls list and the setup state. You edit variables.sls with the values you want
18:31 sdm24 I'm not sure how to make salt ask for inputs, otherwise I would do it that way
18:31 cachedout joined #salt
18:31 vaspiros joined #salt
18:31 sdm24 but as of now, the process is the same for linux and windows minions, so it works for my co-workers who don't use salt
18:31 DammitJim thanks sdm24 ... how has your windows experience been?
18:32 sdm24 not too bad, but I really dont use it a lot
18:32 sdm24 my linux boss is the one who wanted salt
18:32 sdm24 all I do for windows is setup VMs and then a similiar 'networkcheck' state that makes sure nothing was changed
18:32 green_ joined #salt
18:33 sdm24 I found it is very easy to break the salt-minion process for windows
18:34 DammitJim oh no
18:34 nzero joined #salt
18:35 sdm24 soon (its in develop now I think?) they are gonna improve windows updates, which is what my windows boss is looking for, so I will use salt a lot more when that happens
18:36 green_ Hi, I have a list of servers, and I need to choose, using round robin, one of those servers per call on the state file. Any ideas how that might be plausible?
18:36 impi joined #salt
18:37 sdm24 green_: I would recommend using the mine. Do you want all the servers to be chosen over all calls?
18:37 sdm24 or are the list of servers not salt minions?
18:37 green_ OK I'll have to dig in the mine functionality more, I haven't quite looked into that. No they aren't salt minions
18:37 iggy truly round-robin? or just not the same one over and over {{ ['one', 'two', 'three'] | random }}
18:38 spark_ joined #salt
18:38 sdm24 oh then the mine won't work
18:38 green_ They are just servers I have to point to send commands to. Truly round robin would be best if possible
18:38 sdm24 the mine is so salt minions can see data from other minions
18:39 green_ Hmm. Ok. I was trying to think of a way to put it in a pillar and try to give a different server each time. Random would be better than nothing
18:39 iggy how many in the list?
18:39 green_ <5
18:41 iggy there are ways to do it, it just depends on more info than we know
18:41 green_ Hmm ok. Well they don't have salt minion installed on them
18:42 green_ Unfortunately
18:42 basepi MTecknology: We miss you too!
18:42 basepi forrest: am now
18:42 monkey66 joined #salt
18:42 iggy there is not however something built-in to salt, so it's basically going to come down to A. a predictable way of pulling something out of the list or B. Tracking what has been used and choosing based on that
18:43 dopesong joined #salt
18:45 green_ Yeah that makes sense. My ideal way is to figure out how to automate & pass in one of those server names into the state file as a parameter . I figured this was a bit too specific of a use case for it to be built in
18:45 forrest basepi: Do you know if the reactor for minions is in the latest release? I looked through the code a bit but it's not really clear to me still :\
18:45 murrdoc basepi:  do u know where the salt logging conifgs are defined, need it for custom runner
18:45 forrest basepi: https://github.com/saltstack/salt/issues/15265 is still open
18:45 sdm24 green_: one kind of convoluted way could be to have a state with {% set server = ['one', 'two', 'three'} | random %}, then run a script that will remove {{ server }} from the list, so next time a different one is used
18:45 saltstackbot [#15265]title: Bring reactor system to minions | Right now reactors are a master-only feature, but it would be really nice to be able to react locally to events, especially if not using a master. For instance, it would be really awesome to react to udev events or to etcd events.
18:46 basepi forrest: I'm not certain it ever happened
18:46 forrest I know Tom worked on it
18:46 forrest We talked about it a while back
18:46 iggy it's not in a release yet for sure
18:46 basepi RIght but I'm not sure he finished it
18:46 forrest Gotcha
18:46 basepi I'll have to check with him.
18:46 green_ Hmm ok. Then maybe once the set is empty I can reset?
18:47 forrest basepi: Okay.
18:47 basepi murrdoc: salt/log/setup.py I think
18:48 murrdoc thanks man
18:48 murrdoc u alright, despite what forrest says
18:48 murrdoc when u arent around
18:48 forrest What a troll
18:48 murrdoc for eg ^^
18:48 mrhobbeys joined #salt
18:49 mrhobbeys is this the right place for salt by saltstack?
18:49 green_ thanks for the ideas. Yes this is the SaltStack IRC
18:49 murrdoc depends , we are all out of the vinyl, but i can still get u some digital prints
18:50 mrhobbeys I am trying to use the vagrant demo virtual machines I got the demo to run but when I try to apply a command on the master machine I get "sudo: salt: command not found"
18:50 forrest murrdoc: :|
18:51 digitalhero joined #salt
18:51 forrest mrhobbeys: Can you link the repo/docs you're looking at
18:51 vaspiros joined #salt
18:51 mrhobbeys https://github.com/UtahDave/salt-vagrant-demo
18:52 linjan joined #salt
18:52 slav0nic can cmd.run use user environment?
18:52 mrhobbeys http://docs.saltstack.com/en/getstarted/fundamentals/index.html
18:52 forrest mrhobbeys: Did the salt-master package even get installed?
18:52 quantumriff joined #salt
18:53 sdm24 hey green_: I think I found a way to help your roud robin problem. I know nothing about python but this at least seems to work as a starting point. https://gist.github.com/sdm24/40c71db65d575eac0413
18:53 mrhobbeys vagrant is supposed to handle all of that so I assume that it is
18:53 quantumriff Is there a way, when running cmd.run, to sort the output? or even output into json, to make sorting easier?
18:53 druonysus joined #salt
18:53 druonysus joined #salt
18:53 mrhobbeys but I guess the error shows the assumption is wrong
18:53 forrest mrhobbeys: It should be, sometimes vagrant is weird though, the bootstrap (if it connects to a bad mirror) can dump out
18:53 forrest so vagrant will finish, but salt might not be installed.
18:54 CeBe1 joined #salt
18:54 mrhobbeys Ok, best to rm and start again?
18:54 forrest If that's the case, I usually just blow away the box and reprovision, but you should check to see if the master wasinstalled first.
18:54 forrest mrhobbeys: I'd see if salt was installed before doing that.
18:54 murrdoc the saltstack docs actually recommend a starting vagrant setup
18:54 lrojas hi all, when i am using - require: - pkg: <name>  does name referes to the actual package name or the reference i defined?
18:54 murrdoc to bootstreap and learn
18:54 forrest murrdoc: He's using Dave's example setup
18:55 forrest murrdoc: That the docs recommend, lol
18:55 whytewolf lrojas: the state id
18:55 forrest lrojas: reference you defined.
18:55 forrest lrojas: Which is the same as the state ID
18:55 forrest my_awesome_package:
18:55 oznah what's up with salt version numbers? some places I see semantic versions like 0.11.0 and other places I see version nums like 2014.7.0.
18:55 mrhobbeys Ok when connected to the "master" it says "the program 'salt' is currently not installed....." So I guess I will try again
18:55 forrest minus the :
18:55 forrest oznah: They swapped a year and a half or so back
18:55 mrhobbeys http://docs.saltstack.com/en/getstarted/fundamentals/index.html
18:56 forrest mrhobbeys: Well, it should be salt-master
18:56 forrest mrhobbeys: Is the name of the actual package
18:56 mrhobbeys sorry yes that is what it said
18:56 lrojas thanks
18:56 forrest mrhobbeys: Cool
18:56 oznah mrhobbeys: if I see the 0.110 style, i know it's a ref to an older version
18:56 forrest lrojas: NP
18:56 mrhobbeys Did you have a better package that I could get my feet wet with?
18:56 forrest mrhobbeys: Not that has a full environment that follows the tutorial
18:56 whytewolf oznah: a VERY old version
18:57 mrhobbeys ok, I'll give it another try then bbl
18:57 forrest mrhobbeys: The thing Dave put together is pretty good for playing with a master minion setup. Just watch the vagrant output as it goes to make sure it actually installs.
18:57 mrhobbeys thanks!
18:57 forrest mrhobbeys: NP, good luck
18:57 green_ sdm24:   Thanks, that's helpful. Is there a way to save the list from state to state? Could I store it in a pillar? I haven't gotten to use pillars very much yet
18:57 oznah whytewolf: thanks. that's kinda what I thought
18:58 sdm24 green_: not sure about that. What I was thinking was having 1 state that {% set list %} and does whatever, then another state imports list and num, and then removes num from list
19:00 MatthewsFace joined #salt
19:01 iggy green_: there's a wheel module to write pillars that you could utilize
19:01 bhosmer joined #salt
19:01 iggy (or any number of other means to store $last_used)
19:01 nzero joined #salt
19:04 babilen zer0def: That's just ugly .. stupid Ubuntu
19:04 zer0def babilen: yeah, as mentioned before, Canonical's still having problems pirating Debian
19:05 zer0def after a decade of efforts at doing so…
19:06 pviktori joined #salt
19:07 green_ Ok. Awesome thanks guys
19:11 stoogenmeyer__ joined #salt
19:13 stoogenmeyer__ joined #salt
19:15 gimpy2938 left #salt
19:15 cbrich82 joined #salt
19:17 nzero joined #salt
19:21 mohae joined #salt
19:38 cbrich82 joined #salt
19:38 quique joined #salt
19:39 mapu joined #salt
19:40 napsterX joined #salt
19:43 RandyT joined #salt
19:45 asoc So I am working on writing a custom grain and I can assign values to the grains dict but if I put a bunch of logic in the function then it doesn't actually put the values in the the grain when I sync grains.
19:45 asoc is there something I should be looking for that I am missing?
19:45 asoc I checked my whitespace and stuff and it all looks fine.
19:47 pi3r6 joined #salt
19:47 breakingmatter joined #salt
19:50 breakingmatter Is there any way to restrict states to only run on specific nodes? Like based on grains/globbing/nodegroup/etc?
19:52 digitalhero joined #salt
19:53 TOoSmOotH joined #salt
19:57 NightMonkey joined #salt
20:00 XenophonF joined #salt
20:00 nzero joined #salt
20:00 XenophonF finally got saltpad working on my freebsd master!  w00t w00t!
20:00 XenophonF (it's the little things in life)
20:04 druonysus joined #salt
20:04 druonysus joined #salt
20:04 asoc nevermind the minion log totally tells me my problems. Silly me.
20:09 timoguin joined #salt
20:12 otter768 joined #salt
20:19 druonysus joined #salt
20:19 che-arne joined #salt
20:22 baweaver joined #salt
20:23 nzero joined #salt
20:26 rabbitheart joined #salt
20:28 nzero joined #salt
20:29 sdm24 hey green_ are you still there? I think I found a solution for your round robin list
20:34 * iggy is interested too
20:34 sdm24 well I got to the point where it will widdle down to an empty list
20:34 rideh joined #salt
20:35 Tyrm Hey I have a state running for mysql that is saying I am not using a password causing an error but when I log into the minion and go to mysql the password has been applied, any idea what I could be doing wrong in regards to running my state?
20:36 kim0 joined #salt
20:36 kim0 Is everyone using salt on a black terminal :) colors hurt eyes on white one .. at least mine .. Any way to change that folks
20:37 Antiarc People voluntarily use non-black terminals?!
20:37 dthom91 joined #salt
20:37 Antiarc Doesn't that sear your eyes when you are haxx0ring the g1bs0n at 3 AM?
20:37 XenophonF lulz
20:37 Tyrm only the first time I open mac terminal on a new machine then it is back to black
20:37 XenophonF kim0: use the --no-color switch, or turn off color in the master/minion config files
20:38 kim0 I actually like color .. just not those colors :) Can we have --color=white | dark
20:39 baweaver joined #salt
20:39 jhauser joined #salt
20:39 sdm24 iggy: https://gist.github.com/sdm24/d9d3a352db281abe5359 here it is. I'm still trying to figure out how to repopulate the list once it empties to []
20:41 sdm24 oh I got it to repopulate the list, minus one, so I guess thats what we want
20:41 napsterX joined #salt
20:41 sdm24 updated the gist
20:41 druonysus joined #salt
20:42 sdm24 I had quotes around '[]' when I shouldn't have for the empty list
20:42 aw110f joined #salt
20:43 Tyrm Here are the errors I have when running a state, I verified I have a user and password for root but the state fails saying I am not using a password
20:43 Tyrm https://gist.github.com/cameronhopkin/a3c9d0c11911bbe5ed85
20:45 Tyrm when I run mysql.user_exists "name" "host" "password" on the master it is returning true
20:47 sdm24 Tyrm: do you have connection_pass set, or are you using connection parameters in the config?
20:47 sdm24 Can you connect to mysql normally using those credentials? "mysql -u root -p"
20:50 alex-sf_ joined #salt
20:51 XenophonF left #salt
20:51 Tyrm @sdm24 yes I can connect normally
20:52 Tyrm sdm24: I have the params set in the config
20:52 stoogenmeyer__ joined #salt
20:53 sdm24 what is the output of "salt '*' config.get mysql.pass"?
20:53 stoogenmeyer__ joined #salt
20:54 Tyrm blank
20:54 Tyrm in /etc/salt/minion is where I have the mysql credentials
20:54 sdm24 Then I don't think the config is being read properly. Try restarting the salt-minion service
20:55 napsterX joined #salt
20:55 Tyrm sudo service salt-minion restart on the minion itself and checked the master again for mysql.pass and still nothing
20:57 sdm24 will any of the other credentials show up? user, host , etc,
20:58 Tyrm yeah if I do a mysql.user_exists root localhost and password it returns true
20:58 sdm24 it should be mysql.pass, not mysql.password
20:58 stoogenmeyer__ joined #salt
20:58 Tyrm I am saying password instead of typing the actual password
20:59 sdm24 oh gotcha I thought you meant mysql.user as the config.get argument
20:59 stoogenmeyer__ joined #salt
20:59 sdm24 i meant what is the output of salt-call config.get mysql.user
21:00 yomilk joined #salt
21:00 Tyrm that is blank
21:00 sdm24 I think your minion isn't reading the mysql credentials
21:01 sdm24 FWIW, I made this mistake the first time. But the credentials should be on the minions accessing the mysql DB, not on the mysqlDB minion
21:02 pipps99 joined #salt
21:03 sdm24 otherwise I would try instead putting the credentials in /etc/salt/minion.d/mysql.conf, or something .conf. If that still doesn't work, try using - connection_user: and - connection_pass: in your mysql states
21:04 whytewolf personally i just used a defaults file
21:05 Tyrm Thanks this is my first salt stuff checking a working box now to see if they did it in a defaults or .conf
21:06 druonysuse joined #salt
21:06 druonysuse joined #salt
21:06 Tyrm the instructions just state run these salt states and magic happens basically
21:08 peters-tx joined #salt
21:08 coderMe joined #salt
21:09 theo__ joined #salt
21:17 green_ joined #salt
21:18 green_ sdm24: sorry I just saw you mentioned back you might have an answer
21:18 gladiatr joined #salt
21:18 sdm24 https://gist.github.com/sdm24/d9d3a352db281abe5359
21:19 sdm24 so if you defined your list in a) number.sls and b) twice in test.sls ( one to reset the list when it empties, another as a fallback if the list breaks), it will reiterate through that list. Replace the "echo {{ num }}" part with whatever commands you need to run
21:20 green_ Awesome. That's pretty slick, thank you. I think it will work well
21:20 iggy you can also use the pillar wheel module
21:21 iggy http://docs.saltstack.com/en/latest/ref/wheel/all/salt.wheel.pillar_roots.html#salt.wheel.pillar_roots.write
21:21 sdm24 yeah the two hardest parts were figuring out how to get number.sls to update without ruining the jinja, and how to reset the list once it eliminates to []
21:21 sdm24 the longest part was all of the dang formatting errors I made
21:24 green_ haha,  yeah formatting on the templates can get messy when you aren't sure what the errors are saying
21:24 sdm24 just make sure to keep that list on the salt master
21:24 zwi quick question on writing states..I have a module/init.sls and module/firewall.sls I was trying include: - module.firewall in the init.sls and that wasn't working. Can anybody point me in the right direction?
21:24 green_ thanks to both of you I should be set to get it working right
21:24 sdm24 include: \n - .firewall
21:25 sdm24 since they are both in the same directory
21:25 zwi sdm24:  grrr..thanks didn't try that
21:25 enator joined #salt
21:25 subsignal joined #salt
21:27 dthom91 joined #salt
21:28 amcorreia joined #salt
21:29 sdm24 iggy: so this might be too large of a question, but how do you "use" wheels?
21:31 sdm24 or would you have a reactore for when the state ran, that would update the pillar?
21:32 ingslovak joined #salt
21:33 sdm24 Oh you could use http://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html
21:34 iggy yeah, salt.states.saltmod.wheel
21:34 iggy !salt states.saltmod.wheel
21:34 saltstackbot http://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wheel
21:35 iggy that example is incorrect
21:35 sunkist joined #salt
21:35 iggy or meant for a reactor I suspect
21:36 iggy or orchestrate
21:37 timoguin_ joined #salt
21:38 sdm24 gotcha. I'll play around with that. Thanks
21:38 markm joined #salt
21:38 enator Can anyone point me in the direction of some documentation or an article on effectively using node groups and environments? I know it's super flexible, so I was hoping to see an example or two to see the possibilities
21:38 Nazca joined #salt
21:39 * iggy uses neither of those things
21:40 sdm24 I use it because our VMs are older than Salt, so there are many machines that for whatever reason shouldn't have states run on them. The Nodegroup of only Ubuntu 14-04 servers allows me to quickly access all of the minions I can use
21:40 sdm24 as for environments, I have a windows and linux environment, because a lot of the states will have the same name
21:41 tomspur joined #salt
21:41 sdm24 although a better environment setup would be production, qa, development, testing, etc.
21:42 iggy another one I've seen a couple of times is an env per "client" (or website, or domain, or cluster, or ...)
21:43 omegamike joined #salt
21:43 alex-sf_ we use environments to give different teams separate state trees and share the base tree, although I suppose there are other ways to do that
21:47 _JZ_ joined #salt
21:47 hacfi joined #salt
21:49 baweaver joined #salt
21:49 zwi dfdf
21:56 napsterX joined #salt
21:56 scbunn joined #salt
21:59 zwi joined #salt
22:01 hacfi joined #salt
22:03 baweaver joined #salt
22:09 zmalone joined #salt
22:13 nzero joined #salt
22:13 otter768 joined #salt
22:14 baweaver joined #salt
22:17 seb` joined #salt
22:18 yomilk joined #salt
22:25 cbrich82 joined #salt
22:28 hacfi joined #salt
22:33 pipps joined #salt
22:38 bfoxwell joined #salt
22:41 scbunn joined #salt
22:41 Corey Hmm. Trying to convert a Chef shop over to Salt as a PoC. They've got a rvm version with a patch that's applied; it doesn't look like the rvm state in salt supports that patch unless I'm missing something?
22:42 PredatorVI joined #salt
22:43 WesleyTech joined #salt
22:43 dangra joined #salt
22:43 omegamike joined #salt
22:45 PredatorVI Can I use 'include' in top.sls in order to allow the environment details to be distributed to application-specific folders?  Such as `include:  - myapp.mytop`?
22:50 dthom91 joined #salt
22:53 WesleyTech Howdy! I have a piece of pillar data defined as
22:54 WesleyTech runtime: ''
22:54 WesleyTech but it seems to get interpreted as the string 'None'
22:54 WesleyTech How do I keep that value as null?
22:55 nzero joined #salt
22:56 UtahDave yaml must be converting it.   have you tried     runtime: Null    ?
22:56 napsterX joined #salt
22:57 UtahDave an empty string isn't the same thing as null
22:57 WesleyTech tried Null, didn't seem to do it
22:58 WesleyTech so if I wanted the value to be the characters '' , I'd have to escape them?
22:59 UtahDave oh, yeah, I think so.
22:59 druonysuse joined #salt
22:59 druonysuse joined #salt
23:01 pdayton joined #salt
23:02 WesleyTech thx @UtahDave, this worked
23:02 WesleyTech runtime: "''"
23:02 WesleyTech (double quotes surrounding single quotes)
23:02 scbunn joined #salt
23:03 Tyrm_ joined #salt
23:03 meznyx joined #salt
23:04 meznyx Hey all. :)
23:07 mosen joined #salt
23:09 spark_ joined #salt
23:10 jmreicha joined #salt
23:15 PredatorVI Can I include another state file using the jinja syntax such as `{% include myapp.processor %}` (not sure the syntax is correct)?
23:16 _JZ_ joined #salt
23:17 Aidin joined #salt
23:23 forrest Salt, what are you doing! Command "service postgresql-9.3 initdb" run - Initializing database: ?[60G[?[0;31mFAILED?[0;39m]
23:23 baweaver joined #salt
23:23 forrest But a manual run of the exact same command runs? What the fuck
23:23 forrest my confusion meter is off the charts
23:23 mosen forrest: interesting, and confusing :)
23:23 forrest not interesting
23:23 forrest annoying, considering this worked fine last week ;)
23:24 pdayton joined #salt
23:25 murrdoc joined #salt
23:29 herpoderp joined #salt
23:33 cachedout joined #salt
23:34 forrest stable is labeling it as 2015.5, I'm testing now with 2015.8
23:34 forrest Pulled all the jinja out too, no dice
23:34 forrest Such a pain in the ass.
23:35 bluenemo joined #salt
23:46 womble joined #salt
23:47 womble What are people using for automated testing of salt states in CI, etc?
23:49 tkharju joined #salt
23:51 murrdoc joined #salt
23:53 murrdoc joined #salt
23:54 baweaver joined #salt
23:55 zer0def joined #salt
23:57 napsterX joined #salt
23:58 forrest womble: you can use salt test-kitchen
23:59 forrest For anyone following the postgres stuff, I tried on one of the more recent releases and no dice, salt is failing to cmd.run postgresql initdb, and I don't get why

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