Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-07-01

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

All times shown according to UTC.

Time Nick Message
00:00 leszq joined #salt
00:04 intel joined #salt
00:10 JDiPierro joined #salt
00:19 napsterX joined #salt
00:23 baweaver joined #salt
00:23 itru joined #salt
00:29 prwilson joined #salt
00:29 LtLefse joined #salt
00:30 Pixionus joined #salt
00:30 Pixionus joined #salt
00:30 thehaven joined #salt
00:31 ingslovak joined #salt
00:32 aqua^c joined #salt
00:34 otter768 joined #salt
00:35 aqua^c joined #salt
00:39 Tejeev_ joined #salt
00:40 theo__ joined #salt
00:41 mrbigglesworth joined #salt
00:41 aqua^c joined #salt
00:42 monokrome joined #salt
00:42 mapu joined #salt
00:44 theologian joined #salt
00:47 biggdoggg joined #salt
00:47 pravka joined #salt
00:48 julez joined #salt
00:48 quasiben joined #salt
00:51 cozby joined #salt
00:53 thehaven joined #salt
00:56 baweaver joined #salt
00:58 Aidin joined #salt
00:59 sunkist joined #salt
01:03 hasues joined #salt
01:04 hasues left #salt
01:04 patrek joined #salt
01:07 patrek joined #salt
01:11 pdayton joined #salt
01:12 pdayton1 joined #salt
01:13 pdayton1 left #salt
01:15 Ahlee hrm. why doesn't cmd.run 'date.exe' on windows systems work
01:16 Ahlee oh. it prompts to set
01:16 Ahlee well that's annoying
01:19 napsterX joined #salt
01:21 cpowell joined #salt
01:23 darknight87 joined #salt
01:25 favadi joined #salt
01:27 Aidin joined #salt
01:31 g3cko joined #salt
01:33 Aidin joined #salt
01:36 napsterX joined #salt
01:40 beauby joined #salt
01:50 kevinquinnyo joined #salt
01:53 evilrob joined #salt
02:01 dendazen joined #salt
02:08 juanito joined #salt
02:09 thehaven joined #salt
02:09 beauby joined #salt
02:12 cpowell joined #salt
02:13 murkey joined #salt
02:15 kzrl joined #salt
02:15 Furao joined #salt
02:22 juanito joined #salt
02:23 viq joined #salt
02:24 Cidan joined #salt
02:25 sunkist1 joined #salt
02:27 mindlace joined #salt
02:27 \ask joined #salt
02:35 aqua^c joined #salt
02:36 julez joined #salt
02:39 beauby joined #salt
03:10 jonlangemak joined #salt
03:10 beauby joined #salt
03:12 bfoxwell joined #salt
03:17 quasiben joined #salt
03:21 dyasny joined #salt
03:31 cilkay joined #salt
03:31 aqua^c joined #salt
03:34 cilkay Hello. I have a masterless minion configuration that I'm deploying in a Debian VM running in VirtualBox. The only thing I want the users to be able to touch is the /etc/salt/minions.d/server.conf file, which will be put in a shared folder with the host. The rest of the files in /srv/salt, I'm cloning from Mercurial repo.
03:35 cilkay I have a chicken/egg situation. In production, I can't use Vagrant so the shared folders have to be set up manually in VirtualBox, which means I need the VirtualBox guest additions. For reasons I don't understand, I'm not able to script the installation of the guest additions.
03:36 pcn Does apt-get installing them work for you if you log into the VM?
03:36 cilkay All I have to do is "inject" the server.conf file into the VM. The users won't have any accounts on the VM and even if they did, they wouldn't know what to do with it anyway.
03:36 cilkay I'm using the binary from VirtualBox.org and yes, I can install manually.
03:37 cilkay Any ideas on how I can "inject" that file into the VM?
03:37 otter768 joined #salt
03:37 cilkay Assume that we have no shared folders.
03:38 cilkay I was thinking they could put the file on a web server and I could wget the file. However, the URL of the server would have to be known in advance.
03:38 cilkay ... the URL of the file on the web server.
03:39 pcn This is more of a vagrant question I think.  But have you tried using the shell provisioner to execute a shells script containing the master file you want to do that?
03:39 pcn Or am I mis-understanding exactly what you're trying to do.
03:40 cilkay I can't use Vagrant in the production deployment. These have to be "appliances" where they just hit the "Start" button.
03:41 quasiben joined #salt
03:41 juanito joined #salt
03:42 pcn https://www.virtualbox.org/manual/ch04.html#guestadd-guestprops
03:42 * cilkay reading
03:42 pcn Get the guest additions in the image, and have an rc script that slams the file in place from the guestprops.
03:43 pcn vboxmanage can get+set those properties
03:43 pcn https://www.virtualbox.org/manual/ch08.html#vboxmanage-setproperty
03:47 cilkay "get the guest additions in the image" is the real issue. If I could automate that, it's smooth sailing from there.
03:49 cilkay With Salt, I'm cloning a couple of Mercurial repos, installing Node.js packages, bower packages, configuring nginx, setting up the pm2 Node.js app server all automatically.
03:49 cilkay The revisions of the repos I'm cloning/pulling from are specified in the config file. We tag releases and put that tag in the rev: property.
03:51 cilkay It's really quite something. I can start with a shell script that takes the Debian netinstall CD, builds the base box, and then bootstraps every aspect of the VM except for installing the VB guest additions.
03:53 pcn Have you tried adding the contrib and non-free to your debian sources.list and just used apt to install the additions, with dkms?
03:53 pcn http://unix.stackexchange.com/questions/121118/install-the-virtual-box-guest-additions-debian-wheezy
03:53 cilkay Yes, and for some reason, that never seems to work with Jessie.
03:53 pcn I've done that in ubuntu guests, I hadn't gotten debian to work for me when I had time to play with tat.
03:54 cilkay I've done it with wheezy.
03:55 eccentricson Anyone know how to get the minion to send results back to the master on a different port than 4505?  from what I've been reading, the master_port is the auth and return port for the master, which by default is 4506.   Thoughts?
03:55 soren joined #salt
03:56 cilkay I think it's specified in /etc/minion
03:56 cilkay master_port is but I don't see return port
03:56 eccentricson Any idea on what the configuration item is for it?
03:56 eccentricson yeah :(
03:56 pcn master_port
03:56 pcn just grep port /etc/salt/minion
03:57 eccentricson Master_port works just fine, but it's the masters publish port I need to set.
03:57 pcn So your master already has the publish_port set?
03:57 cilkay # Overwrite the default tcp ports used by the minion when in tcp mode
03:57 cilkay #tcp_pub_port: 4510
03:57 cilkay #tcp_pull_port: 4511
03:58 cilkay Is that it?
03:58 eccentricson quite possibly!  Let me check
03:58 cilkay That's out of my Debian 8 /etc/minion
03:59 eccentricson I see the entries here.  I hope 4510 and 4511 aren't default or else that's not going to be it.  Let me see what I can gather.    I have a salt master running in a docker container, and docker is forwarding a high port to 4505 and 4506.
04:00 eccentricson So I need to be able to set that high port to be the publish so it doesn't use 4505 by default
04:01 pcn You probably need to have the port in the container mapped to the same port on the outside.
04:01 wabkia joined #salt
04:02 eccentricson That's my fear, but then I have to create a dockerfile for each salt master with the explicit exposed ports
04:07 quasiben joined #salt
04:11 eccentricson So unfortunately it looks like the minion takes the publish port from the master and uses that.
04:16 vaspiros joined #salt
04:18 Furao joined #salt
04:23 ajw0100 joined #salt
04:24 aphor joined #salt
04:37 rdas joined #salt
04:38 pcn cilkay: what part of the jessie apt-get virtualbox additions didn't work for you?
04:40 cilkay I install the dkms and virtualbox-guest-utils in the preseed.cfg file. I have an entry in fstab for a shared folder. The vboxsf kernel module isn't loaded after installing the packages so the shared folder can't mount and in fact, the machine drops to single user mode at a root shell.
04:40 cilkay I'm trying another experiment right now.
04:41 cilkay I'm doing: echo "vboxsf" >> /etc/modules; modprobe vboxsf
04:41 cilkay ... the late_command.sh
04:41 cilkay It's building away right now.
04:44 Aidin joined #salt
04:45 clintberry1 joined #salt
04:48 ramteid joined #salt
04:49 campee_ joined #salt
04:51 Furao_ joined #salt
04:52 cilkay pcn: It worked! Now I have to figure out how to run state.highstate. I read something in minion about how to do that when the minion daemon is started.
05:00 darknight87 joined #salt
05:01 napsterX joined #salt
05:02 sunkist joined #salt
05:03 baweaver_ joined #salt
05:17 ramaseshan joined #salt
05:27 dkrae joined #salt
05:34 pcn Cool!
05:34 pcn One way is /etc/rc.local...
05:35 clintberry1 joined #salt
05:37 catpiggest joined #salt
05:38 otter768 joined #salt
05:39 agj does any have an example of extending a jinja template from another environment?
05:39 agj suppose this would take a custom extension to file.manage state/module if i was really concerned about implementing this
05:40 whytewolf cilkay: for highstate on minion start look into reactor
05:43 cilkay Will do, thanks.
05:43 whytewolf cilkay: maybe something on this page will help http://docs.saltstack.com/en/latest/topics/cloud/reactor.html
05:53 NightMonkey joined #salt
05:59 colttt joined #salt
05:59 vaspiros joined #salt
06:00 jhauser joined #salt
06:00 NightMonkey joined #salt
06:04 andygabby joined #salt
06:05 stoogenmeyer__ joined #salt
06:07 zekoZeko joined #salt
06:13 AndreasLutro joined #salt
06:14 Furao joined #salt
06:16 darknight87 joined #salt
06:19 dopesong joined #salt
06:23 michelangelo joined #salt
06:25 joeto joined #salt
06:26 flyboy joined #salt
06:29 ramteid joined #salt
06:37 Antiarc joined #salt
06:39 evle1 joined #salt
06:41 kawa2014 joined #salt
06:48 ValF Is there a Windows salt specialist around ? I imagine it's quite a rare thing :)
06:49 mosen hah, true
06:57 jradd joined #salt
07:00 otter768 joined #salt
07:01 cilkay I have "startup_states: 'highstate'" in /etc/minion in my masterless minion. According to the comments in that file, it's supposed to run highstate when the daemon starts. I see no evidence it's doing that because the machine is coming up way too fast. highstate normally takes a few minutes to run. Is it good practice to invoke highstate that way?
07:04 cilkay I suppose I could invoke it from rc.local
07:04 cilkay Or cron, @reboot
07:04 TodPunk joined #salt
07:04 favadi joined #salt
07:12 igor__ joined #salt
07:14 markm joined #salt
07:14 igor__ Hi there, is there a way to get value of test (as in salt-call state.highstate test=True) in template?
07:15 MK_FG joined #salt
07:15 igor__ I didn't find the answer in the documentation
07:16 thalleralexander joined #salt
07:20 KermitTheFragger joined #salt
07:22 kawa2014 joined #salt
07:25 babilen What do you mean by "in template" ?
07:26 babilen ValF: Yeah, there are some though (also in this channel). Do you want to hunt them down?
07:26 igor__ jinja template for example
07:27 dopesong_ joined #salt
07:27 babilen igor__: So you want to run a highstate test run from within a highstate ?
07:27 igor__ No, I generate file and I want to know from the template if it is test run
07:28 ange whytewolf: thanks
07:29 babilen igor__: I don't think so, but there might be a way. What would you use that for? (just curious)
07:29 ValF babilen, I'll struggle with windows a bit longer and will start the hunt, thanks!
07:30 igor__ I am using salt['cmd.run']("some command") in template, and it runs every time even if it is test run
07:30 stoogenmeyer__ hey does anyone know how to enable line statements in salt jinja templates? I've been writing comments using a single # for about a month now and just realized that's not a valid comment in jinja
07:31 stoogenmeyer__ but by enabling line statements you can use ## as comments
07:31 babilen igor__: .. and you don't want that?
07:31 igor__ exactly
07:32 babilen hmm :-/
07:33 freelock joined #salt
07:34 ValF igor__, maybe modify the state that manages this template to handle the cmd.run in the state instead of in the template itself so Salt state execution actually consider it as something to NOT execute on a test run and not simply render the template including your cmd.run.
07:34 igor__ I need an output in the template
07:34 impi joined #salt
07:35 ndrei joined #salt
07:36 favadi joined #salt
07:37 leszq joined #salt
07:38 igor__ I found, it is in opts['test'], thanks anyway
07:39 ValF Nice, thanks for letting us know ;)
07:43 ange whytewolf: in https://gist.github.com/whytewolf/67ec9b4175cfb6570d2b are you able to access args from the module ? __opts__ ?
07:44 lb1a joined #salt
07:47 darknight87 joined #salt
07:48 linjan joined #salt
07:52 stephanbuys joined #salt
07:55 Antiarc joined #salt
08:02 julez joined #salt
08:10 cberndt joined #salt
08:11 keimlink joined #salt
08:14 aw110f joined #salt
08:16 Xevian joined #salt
08:20 al joined #salt
08:22 gcfhvjbkn joined #salt
08:24 intel joined #salt
08:25 juanito joined #salt
08:31 gaborn joined #salt
08:31 gaborn left #salt
08:35 CeBe joined #salt
08:39 impi joined #salt
08:40 N-Mi joined #salt
08:41 kiorky joined #salt
08:47 Guest____ joined #salt
08:48 Guest____ hi everybody
08:48 dopesong_ joined #salt
08:49 sfxandy have a query about the pkg.installed state .... its not behaving as I think it should (but equally not ruling out the posibility its behaving properly and my understanding is wrong!!!)
08:51 iwishiwerearobot joined #salt
08:56 juanito joined #salt
09:00 cilkay I have "@reboot salt-call --local state.highstate" root's crontab. Shouldn't that invoke highstate on reboot?
09:01 cilkay This is a masterless minion, btw.
09:01 jeddi joined #salt
09:02 otter768 joined #salt
09:03 cilkay Apparently, it needs a hard restart, not just an init 6.
09:03 cilkay It's doing it's thing now.
09:03 napsterX joined #salt
09:06 ange for a python custom module how to return a fail ?
09:10 impi joined #salt
09:11 yomilk joined #salt
09:12 yomilk joined #salt
09:15 ange in the case of an orchestrate task run on a minion or more, the returned result is an list of results with each minion;
09:15 sgargan joined #salt
09:16 ange so the "False" returned from 1 minion does not qualify as fail and a require condition proceed
09:17 denys joined #salt
09:18 ange any idea to either run a python module on the master from the orchestrate task and get a False/True directly or how to get the orchestrate require to match on a specific minion response ?
09:19 ange maybe there is a much easier way to do that
09:24 kawa2014 joined #salt
09:25 Furao joined #salt
09:25 FRANK_I joined #salt
09:25 ksj is it possible to match only part of a pillar in a top file?
09:26 davidone joined #salt
09:26 ksj meaning, instead of passing the whole X.sls file, is it possible to match a hosts and send only X.subsection ?
09:29 ramteid joined #salt
09:42 OliverMT I need to use a reactor to have a state on machine X update if a info from a mine in minion Y changes, right?
09:43 Furao_ joined #salt
09:46 babilen ksj: No, but you can easily split your files and let salt merge them automagically when they include overlapping keys
09:47 babilen OliverMT: That would be one approach, yeah. There is also the peer system or the option of simply keeping shared data in the mine and run highstates periodically ..
09:47 babilen I like reactors though
09:47 FRANK_I joined #salt
09:48 slav0nic joined #salt
09:54 eliasp joehh: ping - you're the Debian/Ubuntu Salt packager, right?
09:56 CeBe1 joined #salt
10:02 matthew-parlette joined #salt
10:05 Grokzen joined #salt
10:05 supersheep joined #salt
10:07 ajw0100 joined #salt
10:09 soren joined #salt
10:11 cilkay "@reboot salt-call --local state.highstate" in root's crontab is just flakey. For instance, I change the IP address in the config file, reboot the VM, and it works once and then doesn't work again. Is there a reliable way of invoking highstate in a masterless minion?
10:12 Aidin joined #salt
10:12 gcfhvjbkn joined #salt
10:23 ksj babilen: thanks. it's for handling sensitive data. I'm still trying to figure out the best way. it's nice and easy when you're just dealing with e.g. a mysql password - then it goes in a mysql pillar file that's only accessible by the dba - but we have a lot of sensitive data that historically has never been protected in any way, and there's not a great deal of logic to divide it all up
10:24 ksj therefore I was thinking of having a "sensitive.sls" pillar, accessible only by sysadmins, that the top file would only send the relevant parts to the minion
10:24 ksj I could split it up into lots of separate pillars, but like i said, there's no obvious way of organising this stuff
10:26 ksj I'll figure it out. At least salt is fairly flexible on these things
10:35 jradd joined #salt
10:39 ndrei joined #salt
10:40 OliverMT babilen: thx
10:41 IanV0rn2341 joined #salt
10:46 giantlock joined #salt
10:48 rakan joined #salt
10:48 rakan Hello Everyone
10:48 rakan Is there a way to use the python APIs to check on whether a certain minion is at the highstate or not?
10:50 Sacro Should be doable
10:51 riftman joined #salt
10:52 Romlok joined #salt
10:53 rakan Am looking here, but seems like all there is, is to run commands. http://docs.saltstack.com/en/latest/ref/clients/#runnerclient
10:56 napsterX joined #salt
10:57 ninkotech joined #salt
10:59 dopeson__ joined #salt
11:00 Mate rakan: you can't be sure until you run a highstate test=True
11:01 Mate and it will only return 0 changes if your states are clean
11:02 rakan Mate, so i should manually invoke running the highstate but with a test=True flag
11:02 rakan right?
11:02 Mate yes
11:02 Mate but it's a bit different to real runs
11:02 Mate so you have to double check the states
11:03 ingslovak joined #salt
11:03 AndreasLutro test=True can also report wrong results in some edge cases, so you can't rely on it for an automated run
11:04 rakan hmm... the setup i have is basically a master with a bunch of minions that i am creating on AWS automatically. But that's not through the "salt cloud" apis
11:04 rakan So the purpose of the question is to check if all those new instances are up and in the highstate
11:05 rakan so that i can invoke more stuff. But the highstate has to be reached before
11:06 Mate how do you manage the minion keys?
11:08 AndreasLutro rakan: well, if you run highstate twice it shouldn't cause any changes if you've done everything correctly, so I don't see the problem in just doing that
11:09 rakan It's a bit of an overhead if i do that on 10 or 20 instances and i run the highstate on each of them just to check
11:14 masterkorp Hello everyone,
11:15 masterkorp What do you guys use to automate the creation of VPCs on Amazon ?
11:15 drawsmcgraw Sounds like what rakan wants is a sort of auditing, though I also agree that running highstate twice should be benign, if slightly inefficient.
11:15 Aidin joined #salt
11:17 ange is there a way to pass a pillar dictionnary in : caller.sminion.functions['state.sls']("foo_state") ?
11:17 rakan Mate: minion keys are auto-accepted for now
11:18 aqua^c joined #salt
11:18 rakan drawsmcgraw: yea ... the only thing i can think of is to actually do right now is invoke the highstate manually rather than through "startup_state" config.
11:20 drawsmcgraw rakan: I wonder if an Engine would be a good route here?
11:20 rakan Engine?
11:20 darknight87 joined #salt
11:20 drawsmcgraw My understanding of your situation is something like -> There's a new minion, let's be sure he looks the way we need him to (i.e. has successfully run a highstate) before we do anything more to him.
11:21 drawsmcgraw Yeah, new feature that compliments Beacons. Engines are processes running on the master that plug into the event bus
11:21 rakan Yup exactly
11:21 drawsmcgraw Like Reactor, but on steroids because you have all of Python available.
11:21 drawsmcgraw Instead of just mapping events to states.
11:22 drawsmcgraw rakan: http://docs.saltstack.com/en/develop/ref/engines/all/index.html
11:23 drawsmcgraw You would write you own, I imagine. Using the 'test' Engine as a reference -> https://github.com/saltstack/salt/blob/develop/salt/engines/test.py
11:23 drawsmcgraw This may not be what you need (I don't have hands-on experience with Engines) but it comes to mind for situations like yours.
11:23 rakan drawsmcgraw: woo i didn't reach this far with salt... but that looks  promising
11:24 drawsmcgraw I'm anxious for an excuse to write an engine and/or beacon :)
11:24 drawsmcgraw The rabbit hole goes very, very far down
11:24 rakan True :D
11:26 alekibango joined #salt
11:27 leszq joined #salt
11:36 ctolsen joined #salt
11:39 mpanetta joined #salt
11:39 jhauser joined #salt
11:39 chiui joined #salt
11:40 julez joined #salt
11:45 napsterX joined #salt
11:45 darknight87 joined #salt
11:50 leszq joined #salt
11:56 amcorreia joined #salt
12:11 ndrei joined #salt
12:12 leszq joined #salt
12:18 jhauser joined #salt
12:18 JDiPierro joined #salt
12:18 murrdoc joined #salt
12:19 aqua^c joined #salt
12:20 napsterX joined #salt
12:26 gcfhvjbkn grains.get returns None when invoked in configuration file template (with jinja) for some reason
12:26 gcfhvjbkn works alright when called with salt cli
12:27 gcfhvjbkn is this the way it is supposed to work?
12:29 murrdoc nope
12:31 gcfhvjbkn seems so
12:31 gcfhvjbkn btw i can get grains.get for "host" but not for "ip4_interfaces:eth0"
12:32 gcfhvjbkn that's funny, i can do mine.get, but not grains.get on the same value pretty much
12:32 gcfhvjbkn host.name={{ salt["mine.get"](grains.get("host"), "kafka_ip")[grains.get("host")][0] }}
12:32 gcfhvjbkn instead of {{ grains.get("ip4_interfaces:eth0") }}
12:33 mpanetta joined #salt
12:33 patrek joined #salt
12:36 napsterX joined #salt
12:38 wnkz joined #salt
12:38 dendazen joined #salt
12:40 DammitJim joined #salt
12:45 elfixit joined #salt
12:46 riftman joined #salt
12:46 leszq joined #salt
12:55 DammitJim if I want to use a minion in a windows server, what version should I use?
12:55 ndrei joined #salt
12:55 DammitJim I am running salt-master on Ubuntu 14.04-2 from the regular repos (not ppa)
12:56 subsignal joined #salt
12:59 zer0def joined #salt
13:01 VSpike DammitJim: ideally the minions should be the same version as the master
13:02 DammitJim how do I find the version of the master that I am running?
13:03 VSpike Although you can probably safely move forward on minor releases on minions if you have specific bugs you need fixed. I'm running 2015.0 on my master and 2015.5.2 on Windows minions
13:03 DammitJim dpkg --list | grep salt says 0.17.5
13:03 VSpike DammitJim: salt-run manage-versions van be useful
13:03 VSpike s/van/can
13:03 VSpike DammitJim: salt-run manage.versions
13:03 VSpike sorry ... brain too hot
13:03 DammitJim weird... Function 'manage-versions' is unavailable
13:04 DammitJim blah... it just says: up to date: and lists all my minions
13:04 VSpike Doesn't it say master at the top?
13:04 otter768 joined #salt
13:04 VSpike well, 0.17.5 is your master version by the sound of it
13:04 ange answer to my previous question : "caller.sminion.functions['state.sls']('build_app', pillar=pillar_dict)" where pillar_dict is a dictionnary
13:05 DammitJim but how does 0.17.5 relate to 200x.y?
13:05 VSpike it's an older version numbering scheme
13:05 murrdoc 0.17.5 is v1 … its when they were doing semver
13:05 VSpike DammitJim: look here for a partial list of versions https://docs.saltstack.com/en/2014.7/topics/releases/index.html
13:06 murrdoc then they went to date version with 2014.1
13:06 murrdoc then 2014.7
13:06 murrdoc then 2015.0 ? then .2 and now .8
13:06 babilen .5
13:06 murrdoc … my bad
13:06 babilen (.2 was renamed to .5)
13:06 patrek joined #salt
13:06 murrdoc ubuntu only keep .17.5 in their upstream
13:07 murrdoc not sure why
13:07 murrdoc so thats why we have people like joehh to thank , who for the love of it i presume :) , maintain a ppa for salt in launchpad
13:08 DammitJim ouch
13:08 murrdoc there are other maintainers too … but i only use debs so its all about joehh for me
13:08 murrdoc saltstack is hiring and ramping up so there is talk of them maintaining their own versions and what not
13:08 ingslovak1 joined #salt
13:08 murrdoc but i cant speak to that …
13:09 DammitJim so, what that means is that my version is just 0.17.5?
13:09 DammitJim right after that, they went to 2014.1.0
13:09 VSpike If I'm using salt cloud and want to make a recipe for a master, is it better to use the make_master: True optiom in salt-cloud, or to make a recipe using the salt formula?
13:10 tkharju joined #salt
13:10 VSpike Seems like the latter should be more flexible
13:10 leszq joined #salt
13:10 Aidin joined #salt
13:11 murrdoc DammitJim:  https://docs.saltstack.com/en/2014.7/topics/releases/index.html
13:11 murrdoc i think semver is useless so i like the date version
13:12 VSpike DammitJim: it's probably well worth adding the PPA if you can, even though it's now a couple of versions out of date
13:12 VSpike You'll still most likely be a lot better off
13:13 VSpike It's worse than that, Jim .. a lot of bugs have been fixed on Windows since then too.
13:14 napsterX joined #salt
13:19 N-Mi joined #salt
13:19 nebuchadnezzar hello
13:19 murrdoc left #salt
13:19 murrdoc joined #salt
13:22 kbyrne joined #salt
13:26 Deevolution joined #salt
13:26 mapu joined #salt
13:29 peters-tx joined #salt
13:31 Tecnico1931 joined #salt
13:37 cpowell joined #salt
13:38 cpowell_ joined #salt
13:41 sectionme joined #salt
13:41 N-Mi joined #salt
13:41 ange is there a "canonic" way to log from a custom python module ?
13:43 tkharju joined #salt
13:44 icflournoy joined #salt
13:47 Deevolution ange: Log to salt?
13:47 ange Deevolution: yes, so that messages go in the salt log
13:48 ange I thought import logging & LOG = logging.getLogger(__name__) would do
13:48 Deevolution ange: that's what we use.  It works fine in my environment.  Just "log.debug('message')"
13:49 Deevolution I take it that's not working for you?
13:49 ange maybe due to the log level
13:49 ange but yes, I don't see the messages appear in the log
13:53 Gue______ joined #salt
13:53 Gue______ hi eveyone.  got a question about cmd.wait...
13:53 _sfxandy hi eveyone.  got a question about cmd.wait...
13:54 yomilk joined #salt
13:54 napsterX joined #salt
13:55 _sfxandy you can use watch to ask the cmd to run when a specific state changes or is executed.  what i'd like to do is get cmd.wait to fire when one if/when one of my states in a for loop executes.  basically i have a .sls that creates a number of yum repositories and if one is changed/removed/added I would like the cmd.wait state (that will do a "yum clean all") to fire.
13:57 supersheep joined #salt
13:59 iggy _sfxandy: pkgrepo has to use require_in on the states that require it
14:00 iggy it's an oddity of the way it was written
14:02 timoguin joined #salt
14:06 Ymage joined #salt
14:07 aqua^c joined #salt
14:08 darknight87 joined #salt
14:08 GrueMaster joined #salt
14:10 andrew_v joined #salt
14:10 _sfxandy hmmmm k
14:10 _sfxandy ok
14:10 N-Mi joined #salt
14:12 jradd joined #salt
14:15 dima___ joined #salt
14:15 dima___ hello
14:17 froztbyte where can I do some reading about salt-key behaviour?
14:17 froztbyte the design, what to expect/not to expect, etc?
14:19 _JZ_ joined #salt
14:19 racooper joined #salt
14:22 spark_ joined #salt
14:22 kawa2014 joined #salt
14:23 _sfxandy iggy, looks like pkgrepo only requires_in a pkg state...
14:26 joehh eliasp: yes
14:26 furrowedbrow joined #salt
14:27 kawa2014 joined #salt
14:28 VSpike I currently have a salt master, and I have the pillars, states and /etc/salt/ in three different git repos (not using git backend, except for formulas)
14:29 VSpike I want to create a second master, and want it salted. How offensive would it be to make my recipe just use git to get the /etc/salt tree from bitbucket?
14:29 SheetiS joined #salt
14:30 VSpike I see the salt formula has a lot of capability for configuring all of that through pillar, but that would be quite an effort to use I think compared to just cloning what I have
14:30 Brew joined #salt
14:34 eliasp joehh: great… ;) are you aware of the missing bsdmainutils dependency? this causes 'service' states to fail on systemd-using systems…
14:35 eliasp joehh: the 'systemd' service virtual uses 'col' from 'bsdmainutils' to parse systemctl output
14:35 joehh no, wasn't aware of that
14:35 joehh which releases is it important on?
14:54 ilbot3 joined #salt
14:54 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/
14:54 joehh ubuntu packages for 2015.5.2 are now available in ppa:saltstack/salt-testing
14:54 petong joined #salt
14:54 slav0nic joined #salt
14:54 yomilk joined #salt
14:54 pcn sporkd2: http://docs.saltstack.com/en/latest/ref/clients/index.html#salt.client.LocalClient.cmd_batch
14:55 joehh unless I hear they are severly broken, I'll copy them to the main ppa in 12-24 horu's
14:55 joehh hours
14:55 Tritlo joined #salt
14:55 sporkd2 thank you pcn!
14:56 pcn sporkd2: looks like it could use a serial flag if you wanted to do 1 at a time, but in practice 1 is going to be less common than wanting a subset
14:56 zipkid joined #salt
14:57 OGuilherme joined #salt
14:57 sporkd2 well actually I need a group of minions to run a highstate and they throw up if more then 1 minion is connecting to the cluster at once
14:57 sporkd2 so that'll solve my problem
14:58 murrdoc use -b 3
14:58 murrdoc salt -b 3 '*' state.highstate
14:58 murrdoc also setup a redis returner for your master job cache
14:58 pcn Oh, duh.  Yeah.  that's better.
14:58 pcn -b 1
14:58 APLU joined #salt
14:59 sporkd2 yea, thats what I'll do
14:59 Gareth o/
14:59 sporkd2 will only need it on the launch of the initial cluster anyway
15:01 pcn If you're thinking of e.g. cassandra, do introduce a wait between node startups
15:01 pdayton joined #salt
15:01 sporkd2 pcn: exactly what I'm doing
15:03 ndrei joined #salt
15:03 CeBe joined #salt
15:03 pcn If you mean you're doing cassandra specifically, let me know if you want to talk.  I've done this with salt, and I'm interested in other people's perspective on how they're doing it with salt.
15:04 mohae joined #salt
15:04 icflournoy joined #salt
15:04 akitada joined #salt
15:04 kutenai joined #salt
15:05 otter768 joined #salt
15:05 sdm24 joined #salt
15:05 dima___ hi, how do i suggest new formula ?
15:05 darkhuy joined #salt
15:06 murrdoc … speak on it dima___
15:06 dima___ it's apache-flex installation and configuration for linux
15:06 dima___ https://github.com/dimalev/flex-formula
15:07 SubOracle joined #salt
15:07 murrdoc does it look similar to the saltstack-formula/template-formula
15:07 debian112 joined #salt
15:08 sporkd2 pcn: sent you a pm
15:08 murrdoc dima___:  https://github.com/saltstack-formulas/template-formula
15:08 dima___ well, i tried to stick tutorial on http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
15:09 murrdoc well shoot
15:09 dima___ well, yes, i think it looks similar
15:09 murrdoc we should update that page
15:09 murrdoc we (os community, i dont work for salt)
15:09 robinsmidsrod joined #salt
15:10 dyasny joined #salt
15:10 vaspiros joined #salt
15:10 murrdoc i would email the saltstack formula mailing list
15:10 murrdoc request that your formula get forked in
15:10 murrdoc i dont have perms to pull formulas in
15:10 murrdoc i can merge stuff in
15:11 murrdoc forrest can, he isnt here
15:11 dima___ cool, can you give me saltstack formula mailing list plz ?
15:11 murrdoc its not in the topic
15:12 * murrdoc googles
15:12 murrdoc https://groups.google.com/forum/#!forum/salt-formulas
15:13 Jarus joined #salt
15:14 dima___ how to use that thing ? :)
15:14 dima___ https://github.com/gravyboat is this forrest ?
15:14 riftman joined #salt
15:15 dima___ oh, how do i contact him from github ?..
15:15 murrdoc https://groups.google.com/forum/#!forum/salt-formulas
15:15 murrdoc login with google creds
15:15 murrdoc start a new thread
15:15 murrdoc dear salt-formulas,
15:15 murrdoc i have this super dope formula, and i want to share with the world
15:15 murrdoc please fork
15:15 murrdoc <3 dima___
15:15 mapu joined #salt
15:15 murrdoc <link to formula>
15:16 dima___ hmhmhm... in this case i will have to do this later
15:16 dima___ ok, thank you
15:17 murrdoc :)
15:17 darkhuy hey guys, I'm running into an issue running environ.setenv, I'm passing it a dict() via LocalClient, but in the return, i keep seeing the error environ value must be string or dict
15:17 julez joined #salt
15:18 murrdoc got gist ?
15:18 darkhuy yea ill throw it up one sec
15:18 murrdoc sick
15:19 darkhuy https://gist.github.com/anonymous/4ee2dc03a5f474defb90
15:20 quantumsummers anyone run into the issue that saltssh cancels gpg decrypt operation when NEED_PASSPHRASE when using data encrypted with multiple recipients?
15:23 dykhan joined #salt
15:23 murrdoc darkhuy:  sorry no clue
15:24 murrdoc my recommendation read the actual code in github/salt
15:24 N-Mi joined #salt
15:25 quantumsummers been all in the code
15:25 quantumsummers seems like communication with gpg-agent is not successful
15:25 murrdoc ah
15:26 murrdoc make an issue ?
15:26 quantumsummers although the result is the same with agent running or not
15:26 quantumsummers yeah, might have to make an issue
15:26 Deevolution left #salt
15:26 Deevolution joined #salt
15:27 quantumsummers let me see if I can get python-gnupg to work by itself with this first
15:28 JDiPierro joined #salt
15:30 riftman joined #salt
15:34 ndrei joined #salt
15:34 pdayton joined #salt
15:38 darkhuy darn ok thanks murrdoc
15:39 CeBe joined #salt
15:42 ndrei joined #salt
15:43 darkhuy murrdoc: the funny thing is, it still seems to set the environment variables...or else my processes on the minion wouldn't be able to write to db
15:44 joehh debian and ubuntu packages for 2015.5.2 are now up at ppa:saltstack/salt-testing and the various -testing repos at debian.saltstack.com
15:44 sdm24 woohoo! thanks
15:44 murrdoc i think, and i could be wrong, but its misrepoing something darkhuy
15:44 murrdoc also thanks joehh
15:44 murrdoc u the dbest
15:44 murrdoc all the other maintainers are whack
15:45 joehh Any probs, please let me know, otherwise I'll push them to the main repos/ppa in roughly 12-24 horu's
15:45 joehh :) thanks
15:45 murrdoc are there ways to ship beer
15:45 joehh I really can't type hours on this keyboard
15:45 murrdoc i d ship u a beer
15:45 murrdoc or a bear
15:45 murrdoc whatever u crazy aussies are into
15:45 ingslovak joined #salt
15:45 murrdoc :)
15:45 AzraOmega joined #salt
15:46 sdm24 I believe over there they are called "koalas"
15:46 murrdoc srsly we should ship joehh some thank u beer
15:47 ndrei joined #salt
15:48 joehh nice idea thanks, but I'm looking to cut back on beer consumption :)
15:49 murrdoc so bear it is
15:49 murrdoc sdm24:  we need to figure out how to ship koalas
15:49 sdm24 I normally deal with Pandas :(
15:50 supersheep joined #salt
15:50 sdm24 So dumb question, but to download the debian repo 2015.5.2, I just add "deb http://debian.saltstack.com/debian wheezy-saltstack testing" to /etc/apt/sources.list right?
15:50 juanito joined #salt
15:50 joehh not so dumb question - wheezy-testing
15:50 joehh instead of wheezy-saltstack-testing
15:51 sdm24 ok thanks
15:51 joehh let me know how it goes
15:51 sdm24 should I inlcude "main" at the end?
15:52 joehh yes
15:52 sdm24 thanks, I see the update, now upgrading my test master
15:53 rickflare joined #salt
15:54 rickflare does anyone know how you would use salt to create a file share that only hosts that matched a certain hostname could access?
15:54 ndrei joined #salt
15:55 drawsmcgraw rickflare: Are you using Salt Mine at all?
15:55 yomilk joined #salt
15:55 rickflare no
15:55 rickflare not familar with it
15:55 andygabby joined #salt
15:56 drawsmcgraw That's probably what you want. Small data store that lives on the master. Contains information you specify, like names of minions, their IP addresses, whatever you decide to put in there.
15:56 drawsmcgraw You can query the Mine for "all hosts that match this pattern"
15:56 geekatcmu yes, but if you do multi-master it doesn't work right.
15:56 drawsmcgraw That's your list of hosts. Now you can configure your fileshare accordingly.
15:56 aqua^c joined #salt
15:56 drawsmcgraw geekatcmu: Uf. I hadn't thought about implications with multi-master...
15:56 rickflare ok thank you sir
15:56 rickflare I will check it out
15:56 drawsmcgraw rickflare: yep. It's good stuff.
15:57 geekatcmu https://github.com/saltstack/salt/issues/7697
15:58 tmclaugh[work] joined #salt
15:58 drawsmcgraw geekatcmu: Wow. I thought it was a "We can just rsync it away" type of problem.
15:59 drawsmcgraw That's right-out *broken* :/
15:59 rickflare are the salt mines available to all minions
15:59 drawsmcgraw as far as I understand, yes.
15:59 geekatcmu yeah, it's been outstanding for 2 years.
15:59 geekatcmu As much as I want it fixed, I'm ... not hopeful.
16:00 geekatcmu I took a quick gander through the code and, to be perfectly frank, I'd have to spend a lot of time learning the salt internals before I'd be anything like competent to work on the required change.
16:00 drawsmcgraw geekatcmu: How many people are using multi-master setups? And is it just for redundancy or are there other cases?
16:01 drawsmcgraw Yeah. That's getting down a bit deep into the guts of Salt.
16:01 rickflare ok
16:01 rickflare now if I wanted to restrict it
16:01 rickflare to selected nodes
16:01 rickflare can I do that
16:01 geekatcmu I have no idea how many people use it.  *we* use it for redundancy.
16:01 jradd joined #salt
16:02 murrdoc geekatcmu:  u at carnegie mellon ?
16:02 drawsmcgraw geekatcmu: Noted. I can understand the desire. Though we have our salt master build automated, so the build script + restore our backup of /etc/salt should get us a new master.
16:02 drawsmcgraw Though I can appreciate cases where even *a little* downtime is not acceptable.
16:02 drawsmcgraw rickflare: I'm not certain that there's any access control on the salt-mine
16:03 drawsmcgraw If you need access control, I'd recommend Pillar
16:03 drawsmcgraw is your environment fairly static? Or are you creating/destroying minions all the time?
16:03 rickflare not static at all
16:03 murrdoc also geekatcmu do u run events ?
16:03 murrdoc or just highstate
16:04 drawsmcgraw rickflare: Okay. If access control is a *must*, then I'd look into some ways of dynamically updating Pillar
16:04 drawsmcgraw There's the ext_pillar system, where you can store data in (say) a database or Git
16:04 drawsmcgraw rickflare: Keeping in mind, that putting data into the Salt Mine is an opt-in thing. Not all minions have to put data in there.
16:05 drawsmcgraw Not sure if that helps your situation at all...
16:05 quique joined #salt
16:05 rickflare but how would you control that
16:05 rickflare im thinking these files are very sensitive
16:05 rickflare and I would not want other minions
16:05 rickflare to just be able to read it
16:05 rickflare unless it a specific host name
16:06 quique how do i pass kwargs to a runner in an sls file?
16:06 cachedout joined #salt
16:06 darkhuy murrdoc: https://gist.github.com/anonymous/28b07ad8d86ce7ebcd20
16:06 darkhuy does that look right to you?
16:07 geekatcmu murrdoc: not in 6 years
16:07 murrdoc darkhuy:  i would do pillar.get(name) other wise yes
16:07 murrdoc geekatcmu:  hah nice
16:08 drawsmcgraw rickflare: ah, hold on a sec
16:08 drawsmcgraw The only thing publicly available is the data you put in Salt Mine (hostnames and ip addresses)
16:08 drawsmcgraw Is *that* information sensitive to you?
16:08 darkhuy murrdoc: hrm ok, so what did you mean by it might be misrepoing?
16:09 murrdoc mis reporting ?
16:09 murrdoc could be a 'non true anymore' log call sitting around somewhere
16:10 drawsmcgraw You would take the information from the mine (i.e. a list of hostnames), and configure your file server to only allow access to a subset of that list of hostnames.
16:10 CeBe joined #salt
16:10 darkhuy ah
16:11 desposo joined #salt
16:12 Grokzen joined #salt
16:12 darkhuy murrdoc: changing to pillar.get(name) fixed the error
16:12 darkhuy murrdoc: thats awkward
16:13 murrdoc its python + nature of queued work
16:13 murrdoc bubbling up errors is tough
16:13 jalbretsen joined #salt
16:14 geekatcmu murrdoc: no, we don't run events that I'm aware of
16:14 geekatcmu (sorry, I'm on a call)
16:15 darkhuy murrdoc: alright, thanks for the help :-)
16:15 * murrdoc nods
16:15 murrdoc geekatcmu:  np
16:15 conan_the_destro joined #salt
16:15 venu0336 joined #salt
16:18 ndrei joined #salt
16:19 icflournoy joined #salt
16:21 spark_ joined #salt
16:26 johnsalt_lordofg joined #salt
16:26 amcorreia_ joined #salt
16:28 KyleG joined #salt
16:28 KyleG joined #salt
16:30 riftman joined #salt
16:31 rm_jorge joined #salt
16:32 johnsalt_lordofg hi all. I ran into an error today "detected conflicting ids, sls ids need to be globally unique. I had assumed since imports are used like "include: module.submodule" that ids wouldn't all be put into a single namespace. Now I'm not exactly sure how to proceed, because of my faulty assumption (this is my problem no one elses). My questions are: How does one generally handle multiple environments with this restriction? There
16:33 johnsalt_lordofg perhaps these can be resolved using grains?
16:33 bluenemo joined #salt
16:33 bluenemo joined #salt
16:34 sdm24 There are a couple of causes for this error, where IDs are the same
16:35 sporkd2 johnsalt_lordofg: that usually means you've named two states the same in your sls'
16:35 sdm24 I usually get them mostly doing for-loops, like importing multiple users, and I dont have {{ user }} in the ID
16:36 tmclaugh[work] joined #salt
16:37 johnsalt_lordofg Yeah i know why I have the error; dev/module/file.sls with build_python_pkg; prod/module/file.sls with build_python_pkg;
16:38 sdm24 that'll do it
16:38 cwyse joined #salt
16:40 johnsalt_lordofg I just didn't expect that to be an issue since they are in different environments. i figured only the modules listed in the top file would be loaded so there would be no collisions
16:40 ekristen joined #salt
16:40 johnsalt_lordofg instead it appears everything is loaded regardless of what modules you've specified for use for a machine
16:41 sdm24 oh are those 2 .sls not run at the same time?
16:41 johnsalt_lordofg lol oh shit
16:41 tmclaugh[work] joined #salt
16:42 johnsalt_lordofg as soon as i wrote that I took a second look at my top file
16:42 johnsalt_lordofg there were name collisions
16:42 johnsalt_lordofg my bad. so it does work the way I expected
16:43 sdm24 no worries, at least it was an easy fix
16:43 hasues joined #salt
16:44 johnsalt_lordofg hey thanks for commenting, probably wouldn't have figured this out as quickly.
16:46 sdm24 glad I could help, and not give the wrong advice haha
16:48 hasues left #salt
16:52 nitenq joined #salt
16:52 sdm24 Is it just me, or in 2015.5.2 is it taking a lot longer for salt to timeout on calls? I didn't use the new config file when I upgraded, and I restarted my salt-master
16:52 nitenq Hi, how to remove a rejected key to be able to readd it ?
16:52 sdm24 nitenq: salt-key -d (id to remove)
16:52 sdm24 that will delete from rejected
16:53 sdm24 and then if its still connected to the master, it will be moved into pending
16:54 nitenq sdm24: ok but thing is that the hostname of my node was wrong, so I wanted to delete it and readd it with the new hostname
16:54 sdm24 did you reset the salt minion service on the minion host?
16:54 sdm24 since changing the id?
16:55 nitenq yep
16:55 sdm24 and it didnt use a new ID for the key?
16:55 sdm24 did you edit /etc/salt/minion and/or /etc/salt/minion_id?
16:56 sdm24 cause if you do that, then restart salt-minon, it should use its new ID to connect
16:56 nitenq nop i just changed the hostname
16:57 MatthewsFace joined #salt
16:57 sdm24 oh. If the id field in /etc/salt/minion isn't commented out, then the ID won't change if the hostname changes
16:57 nitenq works, thanks
16:57 sdm24 And if it commented out, I'm not sure if it will automatically change when the hostname changes
16:57 sdm24 no problem, glad I coudl help
16:58 nitenq I changed the /etc/salt/minion_id
16:58 sdm24 thats the easiest way to do it
16:58 MatthewsFace joined #salt
17:00 dopesong_ joined #salt
17:00 forrest joined #salt
17:02 jradd joined #salt
17:03 Gareth ..../w 40
17:03 Gareth erm
17:05 darkhuy murrdoc: still here?
17:05 theologian joined #salt
17:05 stoogenmeyer__ joined #salt
17:06 otter768 joined #salt
17:06 forrest joined #salt
17:06 julez joined #salt
17:07 chiui joined #salt
17:07 murrdoc sup
17:08 darkhuy so running it manually via cmd-line salt-ssh '*', seems like it throws up crap on every envier except the first one
17:08 murrdoc running what ?
17:08 darkhuy highstate
17:09 quique i have this send.event: http://fpaste.org/238517/ that fire this reactor: http://fpaste.org/238520/ which runs a function with the header line: def ebsattach(instance_id, lineage_tag, default_size, instance_az): when I run a highstate on the client with debug on the master I get: SaltRenderError: Jinja variable 'dict object' has no attribute 'instance_id'
17:09 spookah joined #salt
17:09 quique the kwargs are not getting to the function
17:09 solidsnack joined #salt
17:09 quique what format do I need to use to pass the kwargs to through the runner to the function?
17:12 darkhuy murrdoc: seems like the issue is it doesn't like me passing int, apparently 192.168.x.x is read as a string, but port 27017 is int -_-
17:14 ndrei joined #salt
17:18 lionel joined #salt
17:19 IanV0rn2341 Is there anyway of getting a "salt state.highstates" run to show progress? It can sit there for agest esp on first run.
17:19 theologian joined #salt
17:22 twork_ joined #salt
17:22 DammitJim joined #salt
17:22 DammitJim I have all my files in /srv on the salt master
17:23 DammitJim can I change the group from root to something else for the salt folder?
17:23 DammitJim or does it have to be part of the root program?
17:23 DammitJim I mean, root group
17:24 SheetiS as long as salt can read the folders/files where your states are stored, it shouldn't care about the permissions.
17:24 SheetiS same with pillar.
17:25 DammitJim yeah, so what user does salt run as?
17:25 DammitJim just root, right?
17:25 DammitJim or the user that has been granted privileges
17:26 SheetiS Salt runs as root by default.
17:26 DammitJim under client_acl:
17:26 * twork_ has a basic terminology question. at: http://docs.saltstack.com/en/latest/ref/states/top.html ...top paragraph. "what nodes should pull from which environments", "which matches systems should draw from". is a "node" same as a "system"?
17:26 murrdoc yes
17:27 twork_ thanks
17:27 aparsons joined #salt
17:29 mindlace joined #salt
17:36 johnkeates joined #salt
17:39 IanV0rn2341 Just incase anyone knows, I'll just ask once more... Is there anyway of getting a "salt state.highstates" run to show progress? It can sit there for ages esp on first run.
17:40 impi joined #salt
17:40 SheetiS you can always look at salt-run jobs.active to look at the active job
17:40 SheetiS it will show you the minions that have not returned yet
17:40 IanV0rn2341 so, kick off the highstates, then query the jobs.active?
17:44 dergrunepunkt joined #salt
17:44 andygabby If running on one or two servers, I like to run "salt-call state.highstate" on the minion rather than pushing from the master. It's not a progress bar, but it gives you a much better idea of what is happening on the minion. Obviously not feasible if you are running it on lots of servers.
17:44 yomilk joined #salt
17:45 aqua^c joined #salt
17:46 IanV0rn2341 yeah, I was after a more centralised approach. but goodf info, cheers.
17:47 johnkeates left #salt
17:47 IanV0rn2341 I've trying to get ruby installed via rvm, I've used http://docs.saltstack.com/en/latest/ref/states/all/salt.states.rvm.html, which returns true/exists. but I cannot find it! anyone know where it went??
17:48 cliluw joined #salt
17:51 supersheep joined #salt
17:52 ksj what's the best way to implement "function" like functionality in templates? as in a programmatic function. I'm trying to organise the directory hierarchy sitewide. It's not a good fit for a static pilar, but equally it will make the pillar really messy if I do it in jinja. Essentially what I want is in a template file to be able to say {{ dir("logs","nginx","production") }} and keep the logic elsewhere in the
17:52 ksj dir() function
17:54 MTecknology iggy: You figure out what your talk next year is gonna be about?
17:56 darknight87 joined #salt
17:57 patrek joined #salt
17:57 ajw0100 joined #salt
17:57 solidsnack joined #salt
17:59 leszq joined #salt
18:02 vaspiros joined #salt
18:04 tmclaugh[work] joined #salt
18:04 yomilk joined #salt
18:05 yomilk joined #salt
18:07 yomilk joined #salt
18:07 catpigger joined #salt
18:07 murrdoc joined #salt
18:09 ksj alternatively, is there a way to do an "eval" in jinja? e.g. if in my pillar I had logDir: 'logBaseDir + "/" + application + "/" + environment', is there a way in a template to say something like {{ eval(logDir) }}. I don't want to repeat that same logDir format throughout the templates and states
18:17 whytewolf ksj: http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#macros
18:17 SheetiS ksj: macros would work like a function
18:17 SheetiS whytewolf has the link :D
18:17 TyrfingMjolnir joined #salt
18:18 twork_ i was just about to ask (almost) ksj's question. whee!
18:19 Bryson joined #salt
18:19 twork_ "...i know i've read how to do this..."
18:19 SheetiS lurking has its benefits for sure
18:19 sporkd2 ^
18:19 twork_ truly
18:19 hasue1 joined #salt
18:19 hasue1 left #salt
18:20 twork_ conversely, when in doubt, ask your question.
18:20 Bryson joined #salt
18:21 Bryson joined #salt
18:22 yomilk joined #salt
18:24 sectionme joined #salt
18:27 yomilk joined #salt
18:31 baweaver joined #salt
18:31 dergrunepunkt joined #salt
18:32 dergrunepunkt hi guys, I'm having a rare problem, the salt-master upstart job does not seem to be woking, but directly form the console works
18:34 desposo joined #salt
18:35 alexanderilyin joined #salt
18:40 JDiPierro joined #salt
18:40 ajw0100 joined #salt
18:40 yomilk joined #salt
18:41 yomilk_ joined #salt
18:45 chiui joined #salt
18:46 yomilk joined #salt
18:48 khris joined #salt
18:49 murrdoc joined #salt
18:50 ksj sorry, boss called me into a long conversation, the gist of which was "it's very unlikely we're going to increase your wage in the foreseeable future"
18:51 ksj anyway, thanks
18:51 jradd joined #salt
18:52 ksj but macros don't really do it, I think. Where would I define them? I can't call a macro that's in a pillar from a template file.
18:54 ksj I want to have a single, global function that I can conveniently call from any template/state file. basically, dir(dirtype, environment, application...) which returns a string that's the correct pathname
18:54 baweaver joined #salt
18:54 geekatcmu do it all in pyobjects?
18:55 SheetiS a macro inside of states could do that as long as you had dirtype, environment, application were defined or pulled from a pillar.  you'd just have to have an include at the top of any sls that used it
18:55 CeBe joined #salt
18:58 ksj ok, so maybe create a set of jinja macros in a separate file that you import at the top of every state/template?
18:59 yomilk joined #salt
18:59 denys joined #salt
18:59 ksj I hadn't really considered importing. I was hoping there was a way of globally defining a function and was looking into creating new python modules, which might be the way to go
19:00 ksj alternatively, my second solution was the "eval" solution. I'm happy to do it that way if it's possible in jinja
19:00 ksj alternatively, is there a way to do an "eval" in jinja? e.g. if in my pillar I had logDir: 'logBaseDir + "/" + application + "/" + environment', is there a way in a template to say something like {{ eval(logDir) }}. I don't want to repeat that same logDir format throughout the templates and states
19:01 ksj repeated for those without a scroll bar
19:01 baweaver joined #salt
19:01 baweaver joined #salt
19:04 icarus joined #salt
19:04 yomilk_ joined #salt
19:04 berserkir joined #salt
19:05 berserkir joined #salt
19:06 _two_ joined #salt
19:06 blakev_ joined #salt
19:07 otter768 joined #salt
19:10 forrest ksj: https://github.com/gravyboat/hungryadmin-sls/blob/6751b32b66cdb925c00e62d3cd18d53db820321b/pillar/hungryadmin.sls#L4
19:11 forrest ksj: That's a pretty old method of doing it, so there might be a cleaner way to do it
19:11 forrest I just haven't rewritten it.
19:14 mirko joined #salt
19:15 leszq joined #salt
19:16 racooper joined #salt
19:16 yomilk joined #salt
19:17 yomilk joined #salt
19:18 wabkia joined #salt
19:18 ndrei joined #salt
19:20 sdm24 Does anyone have a good method to upgrade their Windows salt-minion versions? "C:\salt\salt-call pkg.install Salt-Minion" works but "salt -G 'os:Windows' pkg.install Salt-Minion" doesn't
19:20 sdm24 and I really don't want to have to log in to each minion and manually run it
19:21 baweaver joined #salt
19:21 mindlace joined #salt
19:22 yomilk joined #salt
19:24 Brew1 joined #salt
19:25 ajw0100 joined #salt
19:26 clintberry joined #salt
19:28 berserkir joined #salt
19:34 aqua^c joined #salt
19:34 yomilk joined #salt
19:35 yomilk_ joined #salt
19:35 drawsmcgraw sdm24: What happens when you try to target your Windows machines with -G ?
19:37 juanito joined #salt
19:39 yomilk joined #salt
19:43 sdm24 I can target the minions fine. Right now I'm using a -L list because I have multiple windows minions, when I only want to test this on 2 of them
19:43 SheetiS sdm24: the problem is that the pkg.install on windows actually causes the state run to terminate before the job actually runs because the salt-minion package is trying to replace itself.  salt-call locally can get around that.  Your best bet would be to do some type of scheduling trick
19:43 sdm24 Ok thanks SheetiS
19:44 sunkist joined #salt
19:44 sdm24 Another method I was thinking was using file.manage to move over the installer, and then cmd.run: C:\salt-minion-2015....
19:44 SheetiS There are a few guys who have fairly large windows deployments around here that might have specific examples (I'm 99.999% linux here so it doesn't affect me as much).
19:44 sdm24 with /S at the end to make it silent
19:45 matulor joined #salt
19:45 matulor hey
19:45 sdm24 except now I'm getting "the file or directory is corrupted and unreadable" when I try to install
19:45 drawsmcgraw Ah.... I had assumed the 'upgrade Salt' problem was solved for Windows as well. Yeah you'll want to schedule the job to run some time in the near future.
19:45 intel joined #salt
19:46 drawsmcgraw sdm24: :/
19:46 matulor can anyone confirm that the python26 package hs been pulled from the centos5 salt repo?
19:47 CeBe joined #salt
19:47 sdm24 Why can't windows just be as easy as linux :(
19:47 whytewolf cause microsoft
19:49 SheetiS matulor: from epel? http://dl.fedoraproject.org/pub/epel/5/x86_64/ definitely is definitely missing salt RPMs
19:51 matulor i know it had been pulled fro epel, but now it's missing in https://copr-be.cloud.fedoraproject.org/results/saltstack/salt-el5/epel-5-x86_64/ as well
19:52 yomilk joined #salt
19:52 matulor last time i got it from there was yesterday :(
19:52 ajw0100 joined #salt
19:52 yomilk joined #salt
19:55 sinonick joined #salt
19:57 yomilk_ joined #salt
19:59 spark_ joined #salt
20:01 mapu joined #salt
20:03 aparsons_ joined #salt
20:03 Brew joined #salt
20:06 subsignal joined #salt
20:09 yomilk joined #salt
20:10 yomilk joined #salt
20:14 yomilk_ joined #salt
20:16 sectionme joined #salt
20:21 dopesong_ joined #salt
20:22 quique how do I add grains from the salt-conrib project?
20:22 murrdoc pull request to it
20:22 quique hmmm i guess i stated that wrong
20:22 quique i want to be able to use the ec2_info.py grain
20:22 quique where do i put that on the salt-master
20:23 murrdoc :)
20:24 quique ?
20:24 murrdoc mkdir <whatever-srv-salt-root-file-dir>/state/_states
20:24 murrdoc put the file there
20:24 murrdoc saltutil.sync_all
20:26 _ikke_ joined #salt
20:27 yomilk joined #salt
20:28 pcn murrdoc: _states or _grains?
20:28 murrdoc _<customodulename>
20:29 leszq_ joined #salt
20:29 pcn I'm using _grains for the ec2_info grain, so I'm wondering what the difference is
20:30 mapu_ joined #salt
20:32 babilen should be _grains (as it is a custom grain)
20:36 _ikke_ What is a good way to check if a grain item is set? It doesn't have a particular value
20:36 juanito joined #salt
20:36 _ikke_ (in jinja)
20:37 spark_ joined #salt
20:37 sporkd2 is defined
20:37 murrdoc joined #salt
20:39 sdm24 I found part of a work around for the mass windows-minion upgrade. It will upgrade the minion, but it will leave the old .exe's along with the new .bat's
20:39 _ikke_ sporkd2: Thanks, that worked
20:40 sdm24 https://gist.github.com/sdm24/33b8260717d91b924c0e I copy over the installer on the minion and then cmd.run to open the installer
20:41 tomh- joined #salt
20:41 sdm24 just deleting the old .exe's seems to fix that issue though, so I guess file.absent them
20:42 dopeson__ joined #salt
20:43 dkrae joined #salt
20:44 julez joined #salt
20:45 dopesong joined #salt
20:55 Eccentricson joined #salt
20:56 ramblinpeck hi all, trying to put together a sls file that create a deployer user and distributes a read-only deploy key to it. The output looks like its successful, but doesn't seem to be there, do I have an error in my syntax? https://gist.github.com/peck/337cf53ae7c50ab45fbd  sls, vagrant up output, and ls in gist, thanks!
20:57 jhauser joined #salt
20:58 yomilk joined #salt
20:59 giantlock joined #salt
20:59 Ch3LL_ theres an error in the output log [ERROR   ] Parent directory not present
21:00 ramblinpeck Ch3LL_: ah, I thought that file.managed took care of that
21:00 Ch3LL_ my guess but not sure is that the .ssh directory is not there. might have to create it.
21:00 ramblinpeck so I need to create the dir as well?
21:01 Ch3LL_ there might be a better salt module to manage keys let me look unless someone else knows
21:01 forrest ramblinpeck: no, just use makedirs
21:01 forrest http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
21:01 forrest scroll down/ctrl-f for makedirs
21:02 aparsons joined #salt
21:02 ramblinpeck Ch3LL_: I found the module about doing pub key deployment, but nothing specific for priv-keys
21:02 ramblinpeck forrest: thanks!
21:02 Ch3LL_ k yes and forrest is right jsut makedirs: True
21:02 forrest ramblinpeck: Even better: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
21:02 forrest use 'createhome: True'
21:03 forrest so the user's home dir will be created.
21:03 forrest bah I fail in linking
21:03 forrest hang on
21:03 forrest http://docs.saltstack.com/en/latest/ref/states/all/salt.states.user.html#salt.states.user.present
21:03 forrest I wish you could link subsections...
21:03 forrest but yeah, just add createhome: True to that user, and you're all set.
21:03 iggy MTecknology: how not to do your first conference presentation (probably)
21:04 MTecknology LOL!!
21:04 ramblinpeck forrest: createhome looks like it defaults to true, its the .ssh subdir thats missing :)
21:04 forrest ramblinpeck: Ahh okay cool
21:05 MTecknology iggy: I finally settled on mine. I'll be drawing up some general outlines this weekend and writing a more detailed outline shortly after
21:05 ajw0100 joined #salt
21:05 MTecknology I need redemption!
21:06 iggy I need redemption too... and to talk about 50% slower
21:07 murrdoc iggy:  !
21:07 murrdoc arent u on vacation foo
21:07 viict joined #salt
21:07 viict joined #salt
21:07 viict joined #salt
21:07 otter768 joined #salt
21:08 iggy flight delayed, living it up in the Cozumel airport
21:09 viict Hi guys, i'm trying to rsync a folder with salt, but, didn't figure how to keep permissions, is there an option to do so?
21:10 zmalone In rsync?  -a and run it as root on both ends.
21:10 iggy viict: be careful with that, salt doesn't spin stuff like that into the background, so you'll have possibly long running processes holding up the minion/highstate/etc
21:11 viict iggy that would be a state manually run when needed, not a thing to be hanging there running
21:13 viict So rsync is working, it run pretty good actually, but, all files are set to root when synced and I need it to keep all permissions, didn't figured how to pass that rsync option
21:14 cburtonnoaa left #salt
21:15 baweaver joined #salt
21:15 LtLefse viict: paste what you're doing? (e.g. to gist.github.com)
21:17 ramblinpeck forrest, CH3LL_: that worked, thank you both
21:17 forrest ramblinpeck: NP
21:17 viict LtLefse: https://gist.github.com/viict/2b4027f7acf453e1ac8c
21:18 sunkist joined #salt
21:18 mgar joined #salt
21:19 viict haha i tried that perms: true ;P not working
21:20 slimmons joined #salt
21:22 LtLefse hmm. in rsync.py I see "options = ['-avz']"
21:22 aqua^c joined #salt
21:23 LtLefse so it should be saving permissions by default
21:25 slimmons Any help with a pip.installed problem is appreciated. https://gist.github.com/johnsimmons/01532fca5bc40c56c11a
21:25 slimmons Let me know if you need more information than that on the problem
21:25 viict hmm where I can check that at my installation?
21:25 mgar joined #salt
21:25 mgar joined #salt
21:26 viict found it ;) yeah, but, it's not keeping, i will look into code and my rsync bin
21:27 LtLefse viict: you didn't happen to end up with a /home/infra-clone/infra/, did you?
21:28 viict oh
21:28 viict indeed
21:28 viict LOL
21:28 LtLefse I think you'll want a trailing slash on the src path
21:29 viict god dam a slash causing me 4 hour pain -.-
21:29 LtLefse it's one of rsync's endearing quirks
21:31 edrocks joined #salt
21:35 viict yeah, just check the original command and if i had did that i few hours ago i would be pretty happy
21:36 dhscholb does anyone know if the onchanges requisite will fire if there are two requisite states, but only one of them changes?
21:37 dhscholb i.e. is it a logical AND or a logical OR relationship?
21:39 ingslovak joined #salt
21:39 cberndt joined #salt
21:40 jradd joined #salt
21:40 dhscholb ah, just found this issue: https://github.com/saltstack/salt/issues/19592
21:41 sunkist joined #salt
21:41 ajw0100 joined #salt
21:42 Nazzy joined #salt
21:42 jaybocc2 joined #salt
21:44 jaybocc2 would someone be able to explain to me the difference between a .key generated from salt-key w/ transport=RAET vs the .pub and .pem when transport=zmq and how it is used with regard to preseeding salt master?
21:44 slimmons nevermind on my issue if anybody reads it.  I think it's a corporate firewall problem.
21:46 linjan joined #salt
21:49 quique joined #salt
21:49 jahmed joined #salt
21:49 jahmed is halite deprecated
21:49 jahmed or not supported any more
21:50 zmalone replaced by a commercial product, last I checked
21:50 zmalone https://groups.google.com/forum/#!msg/salt-users/rmMWLSaw0RY/N5PGRqDkwQgJ
21:54 zer0def joined #salt
21:55 JDiPierro joined #salt
21:57 zer0def joined #salt
21:58 yomilk joined #salt
22:02 Vynce joined #salt
22:04 spark_ joined #salt
22:05 ajw0100 joined #salt
22:05 aparsons joined #salt
22:05 Vynce left #salt
22:07 c10 joined #salt
22:07 seth__ joined #salt
22:08 seth__ anybody know if there is a way to failhard if a pillar renderer throws a rendererror?
22:08 seth__ There must be an option for this somewhere, no?
22:08 murrdoc no
22:09 murrdoc write a validation state somewhere
22:09 aparsons_ joined #salt
22:10 seth__ Eck
22:10 seth__ Ok
22:11 jhauser joined #salt
22:11 baweaver joined #salt
22:12 pipeep joined #salt
22:13 sifusam joined #salt
22:16 yomilk joined #salt
22:20 cberndt joined #salt
22:25 catpiggest joined #salt
22:32 subsignal joined #salt
22:35 ajw0100 joined #salt
22:43 catpigger joined #salt
22:45 jahmed joined #salt
22:45 Whissi joined #salt
22:51 bfoxwell joined #salt
22:51 sgargan joined #salt
22:52 paolo joined #salt
22:52 dude_salt joined #salt
22:54 ajw0100 joined #salt
22:56 dude_salt i am having trouble with permissions!! the default value for user in the master config file is root, yet when i try to call something like "salt-master restart," i get a IOError: [Errno 13] Permission denied: '/var/log/salt/master'
22:57 mosen joined #salt
23:00 dude joined #salt
23:00 dude hellllo?
23:00 catpiggest joined #salt
23:00 Guest18804 config problems//
23:02 Guest18804 https://gist.github.com/ggrahambaker/f82c069a61bc33090a2e
23:03 Guest18804 halp
23:04 Aidin joined #salt
23:08 murrdoc joined #salt
23:08 otter768 joined #salt
23:09 jasonrm joined #salt
23:11 Ch3LL_ Guest18804 you do not have sufficient privileges. Sudo ?
23:11 aqua^c joined #salt
23:12 noob_dude____ yip! config file specifies root privileges to the user
23:12 sunkist1 joined #salt
23:13 jaybocc2 noob_dude____: you need to run the cmd as root, not a regular user
23:13 vaspiros joined #salt
23:13 noob_dude____ from master config file
23:13 noob_dude____ # The user under which the salt master will run. Salt will update all # permissions to allow the specified user to run the master. The exception is # the job cache, which must be deleted if this user is changed.  If the # modified files cause conflicts set verify_env to False. #user: root
23:13 noob_dude____ default is root
23:13 mosen joined #salt
23:14 jaybocc2 vagrant user doesn't have priviliges to do anything to any processes or files owned by root
23:15 jaybocc2 thus permission denied /var/log/salt/master
23:16 noob_dude____ how can i change that?
23:16 jaybocc2 i'm a noob, but i doubt salt escalates its own permissions as that would be insane and i wouldn't let it run on my box
23:16 jaybocc2 sudo salt-master restart
23:16 jaybocc2 sudo su
23:16 jaybocc2 salt-master restart
23:18 ajw0100 joined #salt
23:24 jasonrm joined #salt
23:27 vaspiros joined #salt
23:29 Bryson joined #salt
23:30 otter768 joined #salt
23:30 Bryson joined #salt
23:37 baweaver joined #salt
23:42 aqua^c joined #salt
23:55 cberndt joined #salt
23:55 Norbell joined #salt
23:57 Heartsbane service salt-master restart
23:59 murrdoc restart salt-master

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