Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-04-17

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

All times shown according to UTC.

Time Nick Message
00:00 shaggy_surfer Hi guys, so I got things to work but am confused.
00:00 shaggy_surfer I am following up to see if you guys might be able to make sense of it.
00:00 ingwaem`` joined #salt
00:01 iggy most of us are of the opinion that "whatever works..."
00:02 shaggy_surfer https://gist.github.com/mf-collinhayden/e623e7b71686122fc7ca
00:03 Vynce "… can't be fixed." ?
00:04 shaggy_surfer it both cases the return value is 0
00:04 cmcmacken joined #salt
00:04 shaggy_surfer maybe it has something to do w/ start-stop-daemon ??
00:04 druonysuse joined #salt
00:06 iggy try taking out --no-close
00:07 iggy that's not something you should generally use with --background
00:09 shaggy_surfer that worked iggy
00:10 riftman joined #salt
00:11 shaggy_surfer how do you know this?
00:11 iggy mostly by fire
00:13 amcorreia joined #salt
00:15 Alexey1 joined #salt
00:20 shaggy_surfer do you work for salt iggy?
00:20 shaggy_surfer you seem very active in the channel, I always appreciate your time and help on these things.
00:22 mgw joined #salt
00:23 bmac2 joined #salt
00:28 bhosmer joined #salt
00:29 pdayton joined #salt
00:32 thayne joined #salt
00:41 ipmb joined #salt
00:44 clintberry joined #salt
00:48 iggy I do not
00:49 MatthewsFace joined #salt
00:49 iggy just avoiding doing actual work
00:49 Vynce yeah, ++iggy appreciation society
00:51 mosen MVP iggy
00:52 markm_ joined #salt
01:01 Vynce why have i been typing salt['grains.get'](…) instead of salt.grains.get(…) ?
01:03 SeeDickCode joined #salt
01:04 ipmb joined #salt
01:05 shaggy_surfer joined #salt
01:06 p0rkbelly joined #salt
01:06 Vynce in salt's jinja, should include paths be salt://foo or relative to the current template or something else?
01:06 mapu joined #salt
01:06 dalexander joined #salt
01:06 yomilk joined #salt
01:08 bmac2 joined #salt
01:09 pdayton joined #salt
01:09 sk_0 joined #salt
01:12 Vynce also, is there a way to include-as-raw, to prevent the incldue from being jinja-parsed?
01:14 pdayton joined #salt
01:20 sunkist joined #salt
01:26 bezeee joined #salt
01:29 shaggy_surfer joined #salt
01:32 Alexey1 joined #salt
01:34 p66kumar joined #salt
01:36 ckao joined #salt
01:41 primechuck joined #salt
01:45 NightMonkey joined #salt
01:45 clintber_ joined #salt
01:55 salty_to_the_cor joined #salt
01:57 salty_to_the_cor Hola! Got a question about salt upgrades. is it possible to upgrade a minion using a salt formula?
01:57 TyrfingMjolnir joined #salt
01:59 salty_to_the_cor I am not planning to use yum install, but instead a manual installation process, by downloading the tar and using python setup.py install.  Any comments
02:04 SamSando joined #salt
02:10 ipmb joined #salt
02:22 adrianhannah joined #salt
02:24 ITChap joined #salt
02:28 XenophonF joined #salt
02:28 XenophonF do s3 URLs not work with the windows package manager?
02:30 pdayton joined #salt
02:31 daryl256 joined #salt
02:34 daryl256 I'm considering making the switch from Chef to Salt. Anyone have any experience/recommendations to share?
02:36 cberndt joined #salt
02:36 scbunn joined #salt
02:38 dendazen joined #salt
02:38 Alexey1 joined #salt
02:40 bmac2 joined #salt
02:40 donmichelangelo joined #salt
02:42 salty_to_the_cor any idea how to use a beacon?
02:42 salty_to_the_cor or how to call it
02:44 favadi joined #salt
02:44 Vynce http://docs.saltstack.com/en/latest/glossary.html glossary refers to (but does not link to) "Salt's Jinja documentation" — any idea where that actually is?  doe sit just mean the renderers.jinja page?  because that's a bit sparse on how jinja works
02:46 XenophonF Vynce: you want to refer to the jinja2 docs
02:46 XenophonF let me see if i can find the salt-specific stuff there
02:46 salty_to_the_cor Vynce: http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#module-salt.renderers.jinja
02:47 XenophonF http://jinja.pocoo.org/docs/dev/
02:47 salty_to_the_cor also : http://jinja.pocoo.org/
02:47 favadi joined #salt
02:48 XenophonF and http://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html#getting-to-know-the-default-yaml-jinja
02:49 TheoSLC joined #salt
02:52 CeBe1 joined #salt
02:54 evle joined #salt
02:56 saltnewb joined #salt
02:56 Vynce yeah,t eh particular thing i was looking for was in the "getting to know".
02:56 Vynce thanks, both
02:56 ajw0100 joined #salt
03:00 viq joined #salt
03:02 MatthewsFace joined #salt
03:02 Vynce where can i read about pros & cons of grains vs salt.grains.get ?
03:03 saltnewb so frustrated with salts handling of timeouts, e.g. if a minion is down, salt '*' test.ping will sit there for the duration of gather_job_timeout in the config, I can set it to something like 10 seconds fine, but then if i run salt '*' state.highstate=True it will return after 10 sec and say "no response from minion" - since my highstate probably takes 5 minutes to run (apt-get update and so on)
03:04 saltnewb so then I have to go and do "salt-run jobs.list_jobs" to find the job id of that highstate run to check the output, but that list_jobs takes forever because I have a cron that test.ping's all the host every 60 seconds because otherwise the ZMQ connections are just lost after a few hours randomly, so my job_list is spammed full of those test.ping's and its a chore to lookup the job results :(
03:06 saltnewb i tried 2015.2rc and to use RAET to fix the zmq stuff, but there is a bug that prevents it from connecting, its one of the issues in github
03:07 writtenoff joined #salt
03:07 bhosmer joined #salt
03:08 saltnewb sorry, I know this is a rant, but its just beyond frustrating, I dont know what use cases people have, I just have around 50 servers in various clouds around the world. The zmq connection between minions and salt is seriously the single most unreliable connection of any software i have ever tried :)
03:08 Vynce use manage.status instead of test.ping ?
03:09 Vynce (for your quick CLI who's-alive, i mean)
03:10 Vynce does jinja have regex or substring match? i don't see indication of it in jinja docs.
03:11 saltnewb @vynce: just tried that and it is indeed faster! however all minions return "'manage.status' is not available." - cant find anything on top of google, is this the expected response?
03:12 Vynce er, no, sorry, let me remind myself syntax...
03:13 Vynce salt-run manage.status
03:13 saltnewb ah, and salt-run manage.up
03:13 saltnewb just found it too!
03:13 saltnewb ok thanks vynce!
03:13 saltnewb one less frustration!! :)
03:13 Vynce np.
03:13 daryl256 saltnewb: Yeah, that's a big selling point for me too
03:14 daryl256 saltnewb: Chef doesn't do remote execution well
03:14 daryl256 And their enterprise offering smells suspiciously like Salt
03:15 saltnewb i have no experience with chef, but I only put the servers under config management 2 months ago, so I had a choice of the newer solutions like salt and ansible (or the old stuff like chef and puppet, but everywhere i looked said how easy salt and ansible are in comparison, so the choice was between those two)
03:16 saltnewb i initially tried going minion-less, meaning to just use salt-ssh and connect to the minions on-demand
03:16 saltnewb however salt-ssh is too limited, i couldn't run many of the more complex states
03:16 daryl256 Which I believe is all Ansible gives you
03:16 pdayton joined #salt
03:17 saltnewb so im bootstrapping the minions with salt-ssh now to install salt-minion, and then rely on zmq to connect back to the master, i have tweaked all the connection timeouts for zmq and gone through like 3 dfiferent versions of zmq up to zmq4, the connection reliability is just insanely bad, i still cant understand it, but basically my connections are over the open internet, that seems to be a no go
03:17 daryl256 I find Chef takes a lot of work to stand up even a basic config
03:18 seev I use an AMI and some shell scripting to bootstrap salt
03:18 daryl256 What's your environment look like?
03:18 daryl256 seev: Do you have a master setup?
03:19 saltnewb yeah so basically I'm seriously wondering whether I should switch to Ansible, allthough we have written quite a lot of salt states and all the servers are under management now, so it would be a major rewrite basically, and I dont know what ansible's connection situation would be
03:19 seev I do daryl256
03:19 seev I use a single master that is hard-coded into /etc/hosts
03:19 pahko joined #salt
03:20 seev I used salt to replace an old crusty puppet setup
03:20 daryl256 How do you manage keys between minions and master?
03:20 saltnewb so just to give some context: I have a single Master (happens to run on Azure, but thats irrelevant), and then minions at AWS and Google Compute and Azure and some random VPS from different locations all over the world. They are all supposed to connect back to the Master, all I want is to roll out config changes to all of those hosts easily, and sometimes do some simple remote execution of one-off commands, so basically what salt do
03:21 daryl256 saltnewb: As far as I understand, Ansible uses SSH exclusively
03:21 saltnewb the salt states work fine, its the connection and realiability and management of jobs that is not working well imho
03:21 seev I have auto-accept: True
03:21 Vynce saltnewb: maybe you should look at a distributed master setup?
03:22 saltnewb @daryl256: yes, thats why I think it would not have those connection issues, since it will just connect to the minion on-demand right, vs. salt where in my case the salt-minions are all connecting back to the master and if the zmq connection is down or frozen the salt-master seems to have no way to renew that connection
03:22 daryl256 It sounds like you need a more reliable master
03:23 huleboer joined #salt
03:23 saltnewb yes but distributed master just means to put a master into the private network on lets say AWS and then hope that all AWS minions have a reliable TCP connection to the master that never goes down?
03:23 daryl256 Or set of them
03:24 daryl256 How often is the connection down?
03:24 saltnewb but what about the VPS that I have littered in different places around the world, and some other random hosts, those cannot benefit from that
03:24 saltnewb @daryl256: daily
03:24 Vynce yeah, a master for each colo / set, then maybe use salt-ssh to keep the masters all in line?  dunno, talkin' out my ear here
03:24 saltnewb so currently have about 50 minions, i start fresh and get them all connected, after few hours about 20% of them will have lost the connection
03:24 scbunn joined #salt
03:25 Vynce well, each of the outliers would potentially have one of the masters closer / reachable, i'd think
03:25 saltnewb yes so if I put Masters closer to each server group, it would potentially increase reliability, but i dont see it fixing the problem in general
03:25 Vynce the masters don't have to be on the private networks
03:25 Vynce *shrug* dunno
03:26 Vynce i can't even make my jinja templates DTRT.
03:26 daryl256 seev: auto-accept just seems so wrong to me as our security guy too
03:27 seev I have my deployment inside a VPC where I control every aspect of the infrastructure daryl256
03:27 saltnewb @seev: yeah in that case I assume you dont have the problem with the ZMQ (TCP?) connections going stale
03:27 saltnewb i kinda know its a problem in the zmq connection, when i do the salt '*' test.ping cron every 60 seconds, I can have 50 hosts still connected after 24 hours, without the keep alive test.ping the first hosts loose connection after few hours only.
03:28 seev you can always have the minions perform a job from cron that will keep it fresh
03:28 seev like a pillar refresh
03:28 seev do that once an hour, and you'll have working connections
03:28 daryl256 seev: I'm just paranoid :)
03:28 saltnewb @seev: ah hmm i may try that instead of the master initated ping! thanks for the suggestion
03:32 daryl256 seev: I don't trust a node just because it's in the VPC
03:36 bmac2 joined #salt
03:36 seev I guess I'm a bad sysadmin then
03:37 daryl256 seev: Nah, I'm just paranoid
03:38 evle joined #salt
03:39 bhosmer_ joined #salt
03:41 Furao joined #salt
03:44 pahko joined #salt
03:46 Vynce paranoid is a good trait for a sysad.
03:46 daryl256 I'm architect, sys admin, and whenever hat comes my way that day :)
03:47 seev I'm just a ghetto scripter who runs some VMs
03:53 TheoSLC joined #salt
03:53 ITChap joined #salt
03:53 Vynce i'm also a mad hatter
03:54 voxxit_ joined #salt
03:55 OneAngryDBA joined #salt
03:57 voxxit joined #salt
04:00 daryl256 Vynce: Having just one hat is boring :)
04:01 hal58th__ joined #salt
04:16 Vynce anybody use jinja {% include %} in a salt-related template?
04:20 ITChap joined #salt
04:24 Vynce ugh.  relative path: can't find it.  salt:// path: can't find it.  full absolute path: unsupported path.
04:26 Vynce wait, why is that a minion error?  is it trying to do the composing ont he minion side?
04:28 Vynce http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#include-and-import notably says very little about include
04:30 daryl256 joined #salt
04:31 I3olle_ joined #salt
04:36 tkharju joined #salt
04:42 Alexey2 joined #salt
04:43 p66kumar joined #salt
04:59 Alexey3 joined #salt
05:09 rdas joined #salt
05:09 otter768 joined #salt
05:30 tomasfej1 joined #salt
05:33 nafg_ joined #salt
05:34 glyf joined #salt
05:45 pravka joined #salt
05:45 isodude_ joined #salt
05:45 jhauser joined #salt
05:50 ITChap joined #salt
05:56 krelo joined #salt
05:58 colttt joined #salt
06:00 JayFK joined #salt
06:01 pravka joined #salt
06:07 malinoff joined #salt
06:10 pravka joined #salt
06:16 flyboy joined #salt
06:17 dopesong joined #salt
06:19 nafg_ joined #salt
06:25 AndreasLutro joined #salt
06:28 nafg_ joined #salt
06:31 ITChap joined #salt
06:32 mattiaswolff joined #salt
06:32 ndrei joined #salt
06:40 saltnewb joined #salt
06:44 bdf joined #salt
06:47 iromli joined #salt
06:49 KermitTheFragger joined #salt
06:50 nafg_ joined #salt
06:53 lb1a joined #salt
06:53 steffo joined #salt
06:55 lb1a joined #salt
06:55 lb1a basepi, thanks for the slides of your talk last time i asked something here. i'm still waiting for the talk on youtube, but i found another one from you at PyCon and the link to your salt book. reading it right now and just wanted to say thank you :)
06:57 lb1a joined #salt
06:57 keimlink joined #salt
07:07 chiui joined #salt
07:07 eseyman joined #salt
07:07 Romlok joined #salt
07:08 Alexey2 joined #salt
07:09 bhosmer joined #salt
07:10 otter768 joined #salt
07:11 M_n_K joined #salt
07:13 gareth_void joined #salt
07:14 tomasfej1 joined #salt
07:15 kawa2014 joined #salt
07:16 thayne joined #salt
07:16 dopesong_ joined #salt
07:16 gareth_void hi, I want to know if I can use salt module in salt reactor file
07:17 gareth_void like {{ salt["grains.item"]("id") }}
07:19 soren_ joined #salt
07:21 wilfried joined #salt
07:31 catpig joined #salt
07:33 Grokzen joined #salt
07:42 favadi gareth_void: yes, you can
07:48 bhosmer joined #salt
07:50 echo joined #salt
07:51 ggoZ joined #salt
07:54 gasbakid joined #salt
07:56 favadi left #salt
07:57 ktosiek joined #salt
08:02 isodude_ Hi, stupid question, but can I run state.sls on a salt formula? i.e. salt '*' states.sls powerdns , I can get that to work, but powerdns.powerdns-mysql is not called at all.
08:03 isodude_ And if I run states.sls powerdns.powerdns-mysql it seems to require that certains variables is implemented in powerdns.
08:04 PI-Lloyd it depends how your state is written
08:04 Furao joined #salt
08:04 PI-Lloyd bu the sounds of it, you have a 'require' or 'watch' in the mysql state that is requiring something from the powerdns state
08:05 krelo joined #salt
08:05 isodude_ Actually, I'm calling the formula directly from salt-cli
08:06 PI-Lloyd yeah so "salt 'sometarget' state.sls powerdns" ?
08:06 isodude_ yup
08:06 PI-Lloyd that will still work through the sls the same as if it was being called in a highstate
08:06 isodude_ ok
08:06 PI-Lloyd if calling the powerdns state isn't calling the mysql state, then you are probably missing an include in the powerdns state
08:07 Vynce joined #salt
08:07 Xevian joined #salt
08:07 isodude_ it doesn't include powerdns-mysql at all from the init.sls what I can see
08:08 isodude_ but
08:08 isodude_ the powerdns-mysql does include powerdns
08:08 Alexey2 joined #salt
08:08 isodude_ so it would make sense to run salt 'sometarget' state.sls powerdns.powerdns-mysql
08:08 PI-Lloyd I see
08:08 isodude_ that does however tell me that the config parameter is not define, which is defined in powerdns..
08:08 lb1a joined #salt
08:09 isodude_ I saw that it was possible to do salt '*lb1*' state.sls [powerdns,powerdns.powerdns-mysql]
08:09 isodude_ quite neat =)
08:10 PI-Lloyd oo, I didn't know that one!
08:11 isodude_ so include doesn't actually make the jinja template variables getting set
08:11 isodude_ this is the error:
08:11 isodude_ Rendering SLS 'base:powerdns.powerdns-mysql' failed: Jinja variable 'config' is undefined
08:11 PI-Lloyd where are you pulling the 'config' variable from? Pillar?
08:12 isodude_ powerdns is pulling it from pillar
08:13 PI-Lloyd ok so the probelm isn't requires or includes, it's missing pillar data
08:15 isodude_ ok, so powerdns-mysql includes powerdns
08:15 isodude_ powerdns includes pillar data like so
08:15 isodude_ {% set config = powerdns.get('config', {}) -%}
08:15 isodude_ powerdns-mysql complains that jinja variable config is misssing
08:15 AndreasLutro sounds like the formula is incorrectly written
08:15 TyrfingMjolnir joined #salt
08:16 AndreasLutro yeah it is
08:16 PI-Lloyd powerdns.get is that valid?
08:16 isodude_ I've read that jinjas set-command is a bit kinky when it comes to scopes
08:16 AndreasLutro it's not
08:16 PI-Lloyd didn't think so
08:16 AndreasLutro but they're defined on a per-file basis, just like in python
08:17 isodude_ Was it actually tested before being sent to github? =)
08:17 AndreasLutro possibly not ;)
08:18 isodude_ the best part is that I had to uncomment half of the code to make it work in my environment
08:18 isodude_ =/
08:18 ITChap joined #salt
08:18 aquassaut joined #salt
08:18 isodude_ s/best/worst
08:18 AndreasLutro it is an old formula, last update 2 years ago
08:19 PI-Lloyd ^^
08:19 isodude_ missed that one
08:19 AndreasLutro if you push your changes upstream and make a pull request I'm sure others will appreciate that
08:20 isodude_ sure
08:20 PI-Lloyd when you getting working :p
08:20 isodude_ yup
08:20 isodude_ :D
08:20 isodude_ soon!
08:20 AndreasLutro personally I've always seen the formulas as examples and starting points, never something you just use out of the box
08:20 PI-Lloyd +1
08:22 isodude_ never used formulas since before
08:22 isodude_ started using salt 4 days ago
08:22 isodude_ now I have a production ready system <3
08:22 isodude_ well, soon
08:25 glyf joined #salt
08:27 PI-Lloyd anyone know if it's possible to fake mine data?
08:28 ndrei joined #salt
08:34 mattiaswolff joined #salt
08:34 huddy joined #salt
08:38 thayne joined #salt
08:38 favadi joined #salt
08:46 stoogenmeyer__ joined #salt
08:51 rawzone^ joined #salt
08:51 losh joined #salt
08:52 kevc does anyone have a salt example creating a postgres user with login ability?
08:52 kevc I have a feeling the postgres user module has a bug
08:56 fredvd joined #salt
09:07 N-Mi joined #salt
09:10 otter768 joined #salt
09:17 Nils- joined #salt
09:21 packeteer gawd, spent 4 hours trying to fix a puppet issue today, so over that crap
09:24 Auroch joined #salt
09:26 kevc seems puppet is getting panned these days
09:27 Furao joined #salt
09:38 peters-tx joined #salt
09:50 wnkz joined #salt
09:50 yomilk joined #salt
09:52 matthew-parlette joined #salt
09:54 bhosmer joined #salt
10:00 sunkist joined #salt
10:01 elfixit joined #salt
10:11 packeteer unfortunatly my team loves it
10:12 packeteer large corp, many many silos
10:13 packeteer and everybody uses their own tool
10:14 packeteer 9 different monitoring and alerting systems on just 1 project
10:17 malinoff packeteer, can you say your company's name?
10:17 packeteer large aussie telco
10:18 malinoff thanks, I'll never give them my CV :)
10:18 packeteer lol
10:18 packeteer it's a contract role, but half the team are contracters
10:19 ITChap joined #salt
10:19 packeteer the money is good, but i had to supply my own equipment (a good thing, coz I can use my mbp)
10:22 zerthimon joined #salt
10:24 isodude_ packeteer: we run puppet as well, it's good for what it's good for.
10:24 isodude_ Don't try to bend it :)
10:25 packeteer heh. well it doesnt help that whoever set up the bits i was working on had no clue. it is overly complex
10:25 analogbyte can somebody tell me what the p1 - p4 labels in the bug tracker are supposed to mean?
10:25 packeteer i really want to throw saltstack into the mix
10:26 isodude_ theforeman does that quite neat
10:26 isodude_ you could import the grains and states along side puppet modules
10:27 wilf1rst joined #salt
10:27 packeteer yeah, they have that already. and the complete atlassian stack
10:28 malinoff analogbyte, severity
10:28 monkey66 joined #salt
10:28 monkey66 left #salt
10:30 heise joined #salt
10:30 analogbyte malinoff: a finer scale for already existing high severity label then? with 1 being more severe than 5? an whats P supposed to mean? this is totally intuitive :D
10:31 AndreasLutro priority, and I would assume 1 is more urgent
10:31 malinoff analogbyte, jesus, sorry. I meant 'priority'
10:32 analogbyte AndreasLutro: ah, it makes sense that way :)
10:32 malinoff analogbyte, talking about one thing, but brain is thinking about another
10:32 analogbyte malinoff: happens, thanks though
10:34 isodude_ packeteer: are they completely against salt?
10:36 cberndt joined #salt
10:42 packeteer no
10:42 packeteer no idea what it is
10:46 kawa2014 joined #salt
10:48 isodude_ heh
10:50 packeteer so, when i get put onto a project, i'll push for my tools :)
10:51 isodude_ well you could slide in salt without them knowing
10:52 isodude_ we run it perfectly right beside theforman and puppet :)
10:52 packeteer yeah, i'm thinking about that too
10:52 isodude_ do it =)
10:53 isodude_ the thing is, when the say, hey we need to run this command on all servers.. well write a mcollective plugin god dammit
10:53 isodude_ you say, hey, look at this cmd.run thing
10:53 isodude_ and they go, wth, that look so awesome!
10:54 isodude_ and they say, well, that looks dangerous, oh wait, it does acl as well!!
10:54 bhosmer_ joined #salt
10:55 mosen joined #salt
10:55 packeteer yeah, i know about it
11:04 agend joined #salt
11:06 yomilk joined #salt
11:11 frankhanner joined #salt
11:11 otter768 joined #salt
11:13 kawa2014 joined #salt
11:14 Auroch joined #salt
11:14 johnkeates joined #salt
11:15 frankhanner hi people, I am interested in your views on proper salt-formula management. I would like to follow external git repositories for salt formulas (i.e. https://github.com/saltstack-formulas/ntp-formula) but am a bit confused as to why there are no versions that I can pin to. I am hesitant to follow an upstream branch and automatically pulling in all changes. How are you gals doing that?
11:16 Ssquidly joined #salt
11:16 johnkeates frankhanner: pin to a commit hash
11:17 frankhanner was my though also, but why has there not been any kind of versioning proposed? Or is there a discussion about that to be found somewhere?
11:17 johnkeates because you are pulling from a Git repo :)
11:17 johnkeates they could use tags to have 'versions'
11:17 johnkeates or branches
11:18 johnkeates but they don't
11:18 johnkeates :p
11:18 johnkeates it's up to the person updating the repo to do that
11:18 johnkeates so far, it's also pretty common to not even have a CHANGES file with the history
11:18 johnkeates history*
11:18 johnkeates probably because a ton of the stuff is user-submitted
11:19 frankhanner well lets say I have a formula that requires another formula. How do I manage dependencies? I guess what I am missing is something akin to a manifest.json found in Puppet that enables proper package management and dependency handling
11:19 giantlock joined #salt
11:20 johnkeates ah yes, that is a different issue
11:20 johnkeates and a known one
11:20 johnkeates i think an effort is underway to use npm style package management
11:20 johnkeates I saw it somewhere in the issue tracker
11:20 johnkeates it's not in the current release, but might be in the next, or the one after that
11:21 Ssquidly joined #salt
11:22 frankhanner ok, thanks I'll have a look around for that. It's just something that I am really missing, coming from Puppet.
11:23 amcorreia joined #salt
11:23 Rory_ joined #salt
11:23 frankhanner I'll pin to commit for now and then we'll see, thanks!
11:23 johnkeates good luck :)
11:30 cberndt joined #salt
11:40 frankhanner johnkeates: ok now I think my brain is stuck in standby. I could've sworn that I read somewhere how to pin a gitfs_remote to a certain commit. But I cannot find it anymore. Could you lead me into the right direction again?
11:41 johnkeates frankhanner: I think that is done using gitfs_env_whitelist
11:42 arthurlutz joined #salt
11:43 frankhanner hm there they are talking about environments. I am not concerned with environments here. I want to say: "Use https://github.com/saltstack-formulas/ntp-formula, but only the state of the repository at commit 382287a"
11:44 frankhanner I think I may have misread the documentation before, because I cannot find that as a feature anymore
11:45 johnkeates gitfs_env_whitelist is the one :) while it can be used to restrict versions to envs
11:45 johnkeates if you don't have or don't want to use environments, just ignore that part
11:45 johnkeates put everything in base and restrict base to the version you want
11:57 wilf1rst joined #salt
12:01 redzaku joined #salt
12:03 wnkz joined #salt
12:12 mattiaswolff joined #salt
12:15 yomilk joined #salt
12:15 wnkz joined #salt
12:18 isodude_ joined #salt
12:21 heaumer_ joined #salt
12:25 MTecknology joined #salt
12:31 sathya joined #salt
12:31 sathya Hi all
12:31 XenophonF hi
12:32 zwi joined #salt
12:32 sathya M new to slat
12:32 M_n_K joined #salt
12:32 sathya I just did mysql returners following this link
12:32 sathya http://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.mysql.html
12:32 sathya Now that i need help in redirecting the grains information to mysql DB
12:33 sathya do we have any template or sample returner for this which i can modify ?
12:33 cmcmacken joined #salt
12:33 sathya outout of follwing code
12:33 sathya *************************** 4. row ***************************        fun: test.ping        jid: 20150417162911115237     return: true         id: INCHEAMVL045.ad.csscorp.com    success: 1   full_ret: {"fun_args": [], "jid": "20150417162911115237", "return": true, "retcode": 0, "success": true, "fun": "test.ping", "id": "INCHEAMVL045.ad.csscorp.com"} alter_time: 2015-04-17 16:29:11
12:34 sathya need help on redirecting grains and o=pkg installed on a server to a mysql database
12:39 cmcmacken joined #salt
12:40 sathya any help ?
12:46 dendazen joined #salt
12:49 Deevolution sathya:  I haven't personally used returners at all.  Have you looked at: http://docs.saltstack.com/en/latest/ref/returners/
12:49 Deevolution NM.  I see the link above.
12:50 sathya yeh, that was the link i used to configure it
12:50 isodude_ the powerdns formula should be removed, seriously, nothing works as intended at all =(
12:50 Deevolution The mysql returner doesn't work when you use the '--return mysql'?
12:51 sathya The idea here is , we have close to 200 + servers configured with salt minions, now management needs help in getting all the server information on a GUI with ,( hostname, ip address, arch, pakages installed etc)
12:51 sathya In order to do that, i need to insert all these information to DB and from there i can take it out in web( GUI)
12:51 sathya using hyperlinks
12:52 sathya so i need help in doing that, M not gud in coding or rather i dont have the option of reading and doing it since its little urgent
12:52 sathya Just a inventory kind of thing ... does it make sence ?
12:53 Deevolution sathya:  Apologies, but I don't think I'm going to be much help.  While I have some similar use cases, I've taken very different paths to solving them (no DB are involved).
12:53 sathya IF we have any other options in getting this done, please tell me
12:53 Deevolution Is this a one time thing, or something that's going to be ongoing?
12:54 sathya its going to be in the system for every, but when every people need information, we have to use this method to get the information
12:55 Deevolution I see above you're just doing a test.ping, is there other information you're trying to gather, or just an inventory of what exists.
12:55 subsignal joined #salt
12:56 Deevolution sathya:  Perhaps https://github.com/saltstack/halite can show what you want shown?
12:56 sathya test.ping , i use it for testing( as mentioned in the site), the actual information that M trying to pull out is ( hostname, ip address,domain,arch,os version & Os family, package installed in a single server)
12:57 sathya I have that halite installed, it doesnt show the information what M looking for
12:58 sathya we cannot us halite to take software or hardware inventory reports
12:58 bfoxwell joined #salt
12:59 evle1 joined #salt
12:59 sathya use*
13:00 baoboa joined #salt
13:01 bhosmer joined #salt
13:02 kawa2014 joined #salt
13:04 heaumer_ hello, i have a simple salt module: http://paste.awesom.eu/7x3u ; log_file is defined to /var/log/salt/minion in my /etc/salt/minion
13:05 heaumer_ but still, i can't see log.info's output
13:05 heaumer_ what am i missing?
13:08 johnkeates joined #salt
13:09 tvinson heaumer_: is your log_level configured for info?
13:10 kawa2014 joined #salt
13:11 ndrei joined #salt
13:11 _JZ_ joined #salt
13:11 sathya guys any help for my query ?
13:12 sathya i just did a grains.items redirecting it to DB, M seeing all the output's and its jumbled :(
13:12 sathya This out put cannot be read by php :(
13:12 otter768 joined #salt
13:13 pullphinger joined #salt
13:13 drawsmcgraw sathya: You need output redirected to a database?
13:13 echo joined #salt
13:14 drawsmcgraw Like via a salt-returner?
13:14 sathya yeh
13:14 drawsmcgraw And you've tried returners or no?
13:14 sathya yes i did and i have explained in the top post
13:14 drawsmcgraw Yeah, just finished reading it, sorry
13:14 sathya Np
13:14 drawsmcgraw Yeah you want a returner
13:15 bhosmer_ joined #salt
13:15 drawsmcgraw I wouldn't go with Halite (the old web UI) as it's rather abandoned
13:15 drawsmcgraw Depending on your current database, you can find (or build) a simple read-only app that just lets people explore the DB
13:15 I3olle joined #salt
13:15 drawsmcgraw http://docs.saltstack.com/en/latest/ref/returners/
13:16 drawsmcgraw Of more interest to you would be the existing returners - http://docs.saltstack.com/en/latest/ref/returners/all/index.html#all-salt-returners
13:16 babilen sathya: "M seeing all the output's and its jumbled :(" -- could you elaborate on that?
13:16 sathya @babilen, its not allienged where i can ask my code to pick it up
13:17 sathya I can past the output here if you want
13:17 sathya mysql> select * from salt_returns\G *************************** 1. row ***************************        fun: grains.items        jid: 20150417183252745103     return: {"biosversion": "6.00", "kernel": "Linux", "domain": "ad.csscorp.com", "osrelease": "6.5", "zmqversion": "3.2.5", "kernelrelease": "2.6.32-431.el6.x86_64", "selinux": {"enforced": "Disabled", "enabled": false}, "serialnumber": "VMware-42 2b b8 32 fd e4 5f e2-d1 42 34 0
13:18 drawsmcgraw Oh so you're *already* using the mysql returner
13:18 Qwazerty joined #salt
13:18 babilen sathya: Please use http://refheap.com for pastes
13:18 sathya oh yeh
13:18 babilen Also not entirely sure what "allienged" us supposed to mean
13:19 babilen *is
13:19 sathya sure
13:19 drawsmcgraw sathya: Are you using the MySQL returner or are you using another method to dump the output into MySQL?
13:19 Qwazerty left #salt
13:19 * babilen would suggest pasting the entire setup + commands + output to http://refheap.com
13:19 qwazerty joined #salt
13:19 babilen (modulo sensitive information)
13:20 sathya @ babilen, i just did that
13:20 babilen Do you have the link?
13:20 babilen And you don't need the @ in here. IRC isn't twatter
13:20 sathya @drawsmcgraw, yeh M using mysql returner
13:20 sathya alrite
13:20 niseak joined #salt
13:21 sathya https://www.refheap.com/99724
13:21 nene left #salt
13:23 babilen That seems to have worked
13:23 sathya All i want to do is, get the grains output store in DB as coloums and my php will get that info and display it in browser
13:24 sathya i got the output, but its not the way, M want it, i need all the information to be coloum wise to get the output to GUI
13:24 sathya with that info, i cannot pick up the right ones from my script to display on browser
13:25 sathya I dont know how to modify this mysql-returner code to get that view
13:25 drawsmcgraw sathya: the 'return' col seems to be JSON
13:25 babilen Ah, okay. I guess that you'd have to write your own returner for that or parse the return value into something your can sue.
13:25 drawsmcgraw Is there any possible way you can just ingest that column, and neatly display the JSON?
13:25 babilen *use
13:26 drawsmcgraw Yeah that's what it looks like. You have two choices - 1) Parse and display the json or 2) copy the mysql returner to make a custom version that writes the values to their own column.
13:27 babilen I mean the mysql returner can't magically convert data returned from all sorts of jobs into a suitable database format, create those tables/columns and take it from there.
13:27 babilen You would essentially write a "grains to mysql" returner.
13:27 drawsmcgraw sathya: The quickest route to what you want is to make a small webapp that reads from the database, parses the 'return' column, and makes a data table
13:28 drawsmcgraw PHP, Javascript, whatever you're most comfortable with
13:28 racooper joined #salt
13:28 sathya ok guys, PHP is what M using
13:28 sathya alrite, now i dont know json and i have no comments on that
13:29 drawsmcgraw I'm sure PHP has some json modules that will convert a json object to a hashtable for you
13:29 sathya drawsmcgraw, you said the output looks like json
13:29 sathya is there a way to change that ?
13:29 sathya i can see in the code it says, import json
13:29 drawsmcgraw Yep. Look around for some PHP libs that will do your json -> (something) conversion
13:30 sathya hmm
13:30 drawsmcgraw It's been years since I touched PHP but I imagine you want it converted to a hashtable or whatever PHP calls dictionaries/hashes/etc...
13:30 babilen I would be *very* surprised if there is no library for that
13:30 babilen (not that I ever plan to know enough about PHP to answer that)
13:30 sathya let me try and come back
13:31 sathya thanks guys for your help
13:31 Romlok I'd be surprised if it weren't built into the base PHP install these days
13:31 babilen You might also want to write to the mailing list and ask if there are ways to save "mine data" into MySQL
13:31 babilen Romlok: Absolutely
13:31 sathya sure, will do
13:31 babilen sathya: The mine I am referring to is http://docs.saltstack.com/en/latest/topics/mine/
13:32 drawsmcgraw babilen: Now that's a neat idea. Either way, takes a little bit of coding though
13:33 drawsmcgraw Hey how about a topic change?  salt-cloud with passwords instead of SSH keys
13:33 babilen boooring
13:33 babilen (just kidding)
13:33 drawsmcgraw Salt seems to be using *not* the password I'm specifying in my config file
13:33 drawsmcgraw http://dpaste.com/3NERC3H
13:34 drawsmcgraw I wired up a debug statement and it's trying to use what I can only describe as a hash or some other mathematical output from the password I'm specifying
13:34 numkem joined #salt
13:34 drawsmcgraw I hope I'm just using it wrong and I haven't hit a bug. Am I supposed to specify the *actual* password in that config?
13:35 xintron If I have roles on my machines (grains) and do {% if "role" in grains["get"]("roles", []) %} file: file.managed... {% endif %}, is there some easy way to have that file removed if the role is removed (without checking all possible generated files and see if they are in the roles list, if not - removing them with file.absent)?
13:35 lude {% else %} ?
13:36 _gothix_ joined #salt
13:37 hasues joined #salt
13:37 xintron Ah. So simple!
13:37 hasues left #salt
13:37 timoguin joined #salt
13:38 lude yeah sometimes it's the easiest solutions that are the hardest to find
13:38 babilen drawsmcgraw: I think you are supposed to provide the actual password, yeah
13:39 babilen (not that you would want to do that, but use keys instead)
13:39 drawsmcgraw babilen: I'd like to, but for whatever reason, this openstack cluster isn't injecting keys into the instances
13:39 qwazerty joined #salt
13:39 Romlok keys are just really hard to remember passwords anyway
13:39 drawsmcgraw Any idea why Salt is using some other value when it trys to log in?
13:39 heaumer_ tvinson: nop
13:40 qwazerty left #salt
13:40 drawsmcgraw I'm not against keys. I prefer it, actually. It's just "one more thing" to chase down in order to make this openstack cluster inject keypairs like it should(?) be.
13:40 Qwazerty joined #salt
13:41 _gothix_ joined #salt
13:41 heaumer_ tvinson: ok, now it works
13:44 _gothix_ joined #salt
13:44 perfectsine joined #salt
13:44 Brew joined #salt
13:44 Brew joined #salt
13:47 babilen drawsmcgraw: So, you do specify the password, but it is not being used?
13:47 _gothix_ joined #salt
13:47 xintron lude, We were trying to solve it with a "dynamic and super smart"-solution but using a for loop over pre-defined file names (matching roles) and running if/else will solve it in an easier and better way (more control).
13:47 xintron :)
13:48 _gothix_ left #salt
13:48 drawsmcgraw babilen: Correct. I mean, Salt is using _a_ password when it tries to SSH to the new instance. It's just not the password I specified
13:49 mapu joined #salt
13:50 _gothix_ joined #salt
13:50 gothix joined #salt
13:52 pdayton joined #salt
13:52 CedNantes joined #salt
13:52 CedNantes hello
13:53 zwi joined #salt
13:54 niseak_ joined #salt
13:54 babilen drawsmcgraw: That is unfortunate. Sorry, I never tried to use passwords for salt-ssh, but your configuration doesn't necessarily strike me as wrong when glimpsing over it.
13:54 drawsmcgraw babilen: As an example, if I put 'password' in my config, Salt is attempting to log in with -> 3Vvmu7B8mcZi
13:54 alub joined #salt
13:54 drawsmcgraw It's salt-cloud instead of salt-ssh if that's any different to you
13:55 drawsmcgraw Making instances on an Openstack cluster
13:55 drawsmcgraw That's alright. I should chase down why Openstack isn't injecting keypairs...
13:55 StDiluted joined #salt
13:56 CedNantes is anyone here using fileserver_backend and git on master configuration.
13:56 pdayton joined #salt
13:57 babilen CedNantes: Assume "Yes" and ask your real question (unless that is your real question in which case: "Assume yes")
13:57 debian112 joined #salt
13:57 CedNantes I'm new to git and couple of weeks into salt and i'm trying to understand how to ask my salt master to connect to my repository on bitbucket
13:58 CedNantes <babilen> i wanted to add a "?" but it ended as a "." :p
13:58 CedNantes so yes that was a question ^^
13:58 babilen CedNantes: Are you aware of http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html ?
13:59 babilen Or to ask differently: What have you tried so far? (Please provide detailed information on a pastebin such as http://refheap.com if applicable)
13:59 XenophonF CedNantes: in addition to the fine manual, you should check out https://github.com/saltstack-formulas/salt-formula
14:00 CedNantes yes, i'm on it right now... but trying to restart salt-master i get a parsing error
14:00 CedNantes seems like - user and -password aren't working
14:01 CedNantes i'll take a look on github
14:02 dopesong joined #salt
14:02 XenophonF CedNantes: I ended up using GitPython and accessing Git over ssh.  I'm using GitHub but I'm sure it's the same for bitbucket.
14:02 XenophonF CedNantes: my masters have their own github accounts with r/o access to selected repositories because i'm paranoid
14:05 bhosmer joined #salt
14:05 ekristen joined #salt
14:07 andrew_v joined #salt
14:07 CedNantes ok thanks for all the quick answers
14:08 CedNantes i'll keep testing things
14:08 CedNantes i've started working with salt very recently and with git a few days ago so i'm still on a discovery roll :p
14:12 Furao joined #salt
14:13 OneAngryDBA joined #salt
14:17 mrchris joined #salt
14:17 dyasny joined #salt
14:17 mrchris HI.  So I'm trying out salt and occasionally get a message like this when running state.highstate :    The function "state.highstate" is running as PID 9070 and was started at 2015, ....
14:18 mrchris What am I supposed to do?  Manually ssh in and kill it?
14:18 wilf1rst joined #salt
14:18 mrchris The process has been running for a while.  I think there was a problem stopping it.
14:19 timoguin `salt-run jobs.list_jobs` to find the JID of the running highstate, then `salt 'minions' saltutil.term_job <JID>
14:19 timoguin ignore my attempts at formatting
14:20 lb1a i'm so failing at writing my *.sls files. i just want to sit in a corner and cry. either i don't get my head around yaml or salt is just not intutive enough for me :( give me cookies .. i drown in self-pity
14:21 robothands lb1a: post examples and I'm sure someone smarter than me will help you
14:21 robothands lb1a: refheap, or pastecrap or whatever
14:22 lb1a robothands, thanks that's what i wanted to hear :D helpful people always cheer me up :)
14:22 mrchris timoguin: thanks.  How would I kill all of the jobs?
14:22 drawsmcgraw lb1a: Step one, if you're using vim to write your statefiles, is grabbing the salt-vim syntax files.
14:22 drawsmcgraw I'd lose my mind if I had to write state files without it.
14:22 timoguin mrchris: salt-run jobs.active should show you all the running jobs. use the term_job command to kill each one of them. don't think there's a command to kill all of them.
14:23 lb1a drawsmcgraw, oh that's something i didn't know ... *google*
14:23 robothands drawsmcgraw: I use nano, won't forsake my principles just for a syntactically easier life :)
14:24 drawsmcgraw whatever works, man. No judgement in here
14:24 bhosmer joined #salt
14:25 mrchris minute of silence for nano...
14:26 wilf1rst joined #salt
14:28 ndrei joined #salt
14:28 wwwBUKOLAYcom joined #salt
14:30 aawerner joined #salt
14:32 racooper at least he didn't say emacs... :o
14:32 awerner_ joined #salt
14:32 kaptk2 joined #salt
14:32 unni joined #salt
14:33 fusionx86 joined #salt
14:33 lb1a drawsmcgraw, oh much better, thanks Oo
14:33 unni Hi, I am trying to automate csf installation via salt. How can I download an external file ? Can I use file.managed?
14:34 aawerner joined #salt
14:34 racooper what is csf?
14:34 drawsmcgraw lb1a: No problem. You may have already found a glaring error in your yaml :)
14:34 Karlthane joined #salt
14:34 aawerner joined #salt
14:34 drawsmcgraw unni: You can use file.managed() with the 'source' parameter but you'll have to specify a hash for the file
14:35 drawsmcgraw I usually get lazy and just wget the file, or (if possible), host it on the Salt master
14:35 lb1a drawsmcgraw, no, i removed almost everything because i always got error in a salt state.highstate :/
14:35 drawsmcgraw lb1a: ah, highstates...
14:35 otter768 joined #salt
14:35 aawerner joined #salt
14:35 unni From the docs, I understood, the file from master can be fetched. But can I fetch a file from an external server ,say a file server?
14:36 lb1a drawsmcgraw, i'm just at the beginning, but i don't get a pkg installed and ensured that the corresponding service is startet/running. i always got errors. so another try :/
14:36 CedNantes another quick question : if want to use file.managed but not for a single file but an entire directory, is there a "directory.managed" or something similar?
14:38 lb1a btw, how to just throw a bunch/list of package names into the pgk.installed function?
14:38 JaredR joined #salt
14:38 Romlok CedNantes: there's file.recurse
14:39 babilen lb1a: - pkgs: - foo - bar - baz
14:39 Karlthane_ joined #salt
14:40 danemacmillan joined #salt
14:40 lb1a babilen, is that for the cli command or for a sls file?
14:41 drawsmcgraw lb1a: It takes time. Definitely prune everything back to just one state, in one state file, then run it with state.sls instead of state.highstate
14:41 rojem joined #salt
14:43 babilen lb1a: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed
14:43 lb1a drawsmcgraw, it's basically the same because my top.sls just loads my basics.sls. which should just install a bunch of packages that should always be present... including services when appropriate
14:44 babilen lb1a: See "pkgs" in there
14:44 CedNantes <Romlok> thx works like a charm !
14:44 drawsmcgraw lb1a: Fair enough
14:44 lb1a babilen, thanks
14:44 drawsmcgraw If you get stumped, go ahead and dump the error on pastebin/dpaste/whatevs and link it here
14:46 xf10e joined #salt
14:46 xf10e hi
14:48 hasues joined #salt
14:48 lb1a drawsmcgraw, http://hastebin.com/zevatirofe.avrasm
14:49 iggy unni: file.managed (according to the docs) supports salt:// s3:// http:// ftp:// ... so, you've got some optins
14:49 alub left #salt
14:50 drawsmcgraw lb1a: I see
14:50 iggy lb1a: ssh:\n  svc.running:\n    - enabled: True
14:50 unni ok thanks. I too used wget in cmd.run :)
14:50 drawsmcgraw one second...
14:51 lb1a iggy, thanks, i'll try
14:52 iggy take a look at the formulas for some inspiration
14:52 iggy and there are actually quite a few companies that make their states available on github
14:53 lb1a iggy, Comment: State 'svc.running' found in SLS 'basics' is unavailable
14:53 lb1a hm
14:53 drawsmcgraw lb1a: http://hastebin.com/movudipudo.avrasm
14:53 lb1a drawsmcgraw, thanks
14:54 drawsmcgraw NB: I may have mistyped the 'name' parameter to service, sorry about that
14:54 iggy doh, service, not svc
14:54 iggy I do that frequently
14:54 xf10e someone mentioned on salt-users everything is OrderedDicts now, right? So how is a state module suppossed to handle something like "[OrderedDict([('service', ['admin'])])]" it now get's from the exec module? (https://github.com/saltstack/salt/issues/22782)
14:54 xf10e iggy: solaris user? *g*
14:55 drawsmcgraw lb1a: Basically, you just needed a '- running' below line 56 in the link I sent you
14:55 lb1a drawsmcgraw, yes i'm confused about the docs sometimes because is seems to mix the function before the package and the other way round . but i'm eager to learn it ;)
14:55 iggy and we prefer pkg.installed and service.running (vs pkg\ninstalled service\nrunning)
14:55 drawsmcgraw lb1a: Yeah I like to be very explicit when I write states. A personal pet peeve of mine (for better or worse) is implied actions.
14:55 drawsmcgraw Think of them just as functions calls. And each line is another parameter to the function.
14:56 drawsmcgraw Because, actually, that's exactly what it is :)
14:56 xf10e lb1a: function before the name when you want the state ID to be s/t different then the service or pkg name
14:56 lb1a i'm learning :D
14:56 lb1a xf10e, ok thanks for the info
14:56 drawsmcgraw It takes time, for sure. It took me a couple weeks to wrap my head around this stuff
14:57 xf10e lb1a: like "ssh-server:\n  pkg.installed:\n    - name: openssh-server\n  service.running:\n    - name: ssh"
14:57 lb1a yeah i'm just new to salt and yaml. i just used xml and json before...
14:57 lb1a although it seems logical i always mess up the yaml syntax/concept
14:57 lb1a xf10e, thanks
14:59 iggy search github for salt-states or salt_states and you'll see lots of states
14:59 iggy I always learn better by example
14:59 quantumriff joined #salt
15:00 quantumriff I'm trying to use jinja with a file.. Is it possible to tell the templated file to comment out a line if a varialbe is set?
15:00 lb1a drawsmcgraw, i dont get the part of the require line. since it seems you're refering to yourself ... it looks like chicken-egg problem to me Oo
15:00 iggy quantumriff: most anything is possible in jinja
15:00 quantumriff or would it be as simple as a "if var defined, then put this, else, put this"?
15:01 iggy quantumriff: that's one way
15:01 xf10e oh, btw: has anyone seem problems with logging in custom state modules in 2014.7.4?
15:01 xf10e s/seem/seen/
15:02 tmclaugh[work] joined #salt
15:03 drawsmcgraw lb1a: Yeah that also takes some time to learn
15:04 drawsmcgraw In human terms, it means "I require that the state "pkg: install-basics" has succeeded before I will run"
15:04 drawsmcgraw Or in friendlier terms, "Don't bother starting ssh-server if the package isn't installed yet"
15:04 lb1a i see.
15:04 drawsmcgraw Another reason I like to make explicit states and give them names (instead of using their name as the assumed 'name' parameter)
15:05 lb1a drawks, now could i make this service statement depended on a grain? since the service name on my ubuntuserver is 'ssh' and on my fedora servers it's 'sshd'
15:06 scbunn joined #salt
15:06 Chuck_ joined #salt
15:06 CedNantes For beginners i find this link http://docs.saltstack.com/en/latest/topics/best_practices.html very interesting because of all the states example
15:06 dewdrop joined #salt
15:06 mpanetta joined #salt
15:06 drawsmcgraw lb1a: Ah... you've hit a deep topic :)
15:07 drawsmcgraw The short-term hack is to use jinja templating with some 'if' statements
15:07 drawsmcgraw The other arrangement is to build a 'vars.map' file a la how the Salt Formulas are built
15:07 mpanetta joined #salt
15:08 drawsmcgraw lb1a: In fact, here's the SSH formula https://github.com/saltstack-formulas/openssh-formula
15:08 lb1a drawsmcgraw, ok then i will try my first approach. referencing different sls files depending on the os in my top.sls that worked well
15:08 drawsmcgraw sounds good.
15:09 lb1a this salt formular looks interessing but yet a bit oversized for my first steps :D
15:09 drawsmcgraw agreed. It's... uh... topheavy for this use case
15:12 Chuck_ Hello. I am working with Salt and Python Client API using Flask and Angularjs. I have created a web application that allows me to select software and on submit run salt highstates to install selected software. I want to be able to display some time of output back to the html pages. Does anyone know how to obtain, save and display highstates output for which packages have been installed and which have failed?
15:12 ndrei joined #salt
15:13 Chuck_ I have been able to display different outputs such as job IDs and that its running but i cannot get this information specifically.
15:14 malinoff joined #salt
15:14 p66kumar joined #salt
15:15 speedlight hi ppl, the process log of a state runing in a minion is supossed to be in the minion log right?
15:16 speedlight cuz isnt showing nothing, but the master run the state wihout problem
15:16 StDiluted joined #salt
15:17 illern joined #salt
15:17 pravka joined #salt
15:17 xf10e speedlight: only if something in at least the loglevel you've configured on your minion occurs
15:18 xf10e speedlight: set loglevel_file (I think..) to "debug" so see what's going on
15:18 wintamute joined #salt
15:21 speedlight oh good to know thnkz, strange that the same install of minions in one the log only show the key cached mgs, and in others show all the things running from the states..
15:21 speedlight i'll check out that anyway, thnkz again
15:22 evilrob joined #salt
15:22 whytewolf Chuck_: if you asre using this http://docs.saltstack.com/en/latest/ref/clients/ youmight want get_cli_returns http://docs.saltstack.com/en/latest/ref/clients/#salt.client.LocalClient.get_cli_returns or start looking into salt api.
15:23 lb1a drawsmcgraw, success http://hastebin.com/ilixulatas.vhdl :D
15:23 drawsmcgraw lb1a: Sweet! Nice job
15:24 lb1a drawsmcgraw, it's like i'm a little kid again learning my first hello world :D
15:24 drawsmcgraw It certainly feels like it at times :)
15:27 speedlight by default can i run states to two or more minions at the same time?
15:27 nxf joined #salt
15:28 speedlight i have a state running in one and 'll take time to finish, so i want to test other things in my test minion :)
15:30 xf10e speedlight: not the same state module on the same minion. when a minion is running state.highstate you can't run state.sls on that minion
15:30 nxf Hi, new to Salt. I want to configure some laptops regularly. Is there a way to run a state each time the laptops connect to the master? Can/should I trigger this from the minions when the user logs in, or from the master when the minion connects?
15:31 speedlight xf10e: oh ok, are two different minions, but the same state, is that a problem?
15:31 xf10e nope
15:31 speedlight great thnkz
15:32 xf10e nxf: a reactor acting on laptop's minion connecting to the master
15:32 nxf xf10e: thanks! i'll read up on that.
15:32 xf10e nxf: s/t like this was on the salt-users google-group a week ago I think
15:33 basepi lb1a: which talk are you still waiting for? and I'm glad you're enjoying my book! =)
15:34 lb1a basepi, i just finished watching your talk of the pycon2015
15:34 lb1a basepi, i'm waiting for the saltconf15 talk
15:34 Sketch there are chinese people everywhere, you just have to find them ;)
15:35 Sketch er, wrong #
15:36 murrdoc joined #salt
15:38 c4urself joined #salt
15:39 c4urself howdy, i'm writing a module for salt and need a third-party library (the python requests lib), what's the canonical way ensure it's on the client?
15:39 thedodd joined #salt
15:41 nebuchadnezzar joined #salt
15:41 xf10e c4urself: make your states install the pkg? and implement __virtual__() in your module
15:41 murrdoc c4urself:  what version of salt are you using
15:41 c4urself xf10e: i was thinking that :)
15:41 lb1a so i'm leaving for today, thanks everybody for your support!
15:41 robothands see ya
15:42 robothands glad those people smarter than me helped you lol
15:42 lb1a :D
15:42 c4urself murrdoc: i'm running 2014.1
15:42 lb1a in terms of salt, you are smarter than me ;)
15:42 robothands haha maybe
15:42 murrdoc and c4urself are u trying to fetch urls ?
15:42 c4urself murrdoc: yep
15:42 murrdoc or do more then just gets
15:43 murrdoc yep to more than get
15:43 murrdoc or are u just doing gets
15:43 c4urself murrdoc: yes to only get initially
15:43 murrdoc ok
15:44 murrdoc you can use __salt__['cp.file'](url) to fetch urls
15:44 murrdoc so no need to test for include requests and write the whole process
15:45 c4urself murrdoc: oh sweet, will look into that
15:45 murrdoc https://github.com/saltstack/salt/blob/v2014.1.13/salt/modules/cp.py#L238
15:46 murrdoc so now the amount of code u write is reduced
15:46 shaggy_surfer joined #salt
15:47 murrdoc c4urself:  only reason version is relevant, in 2015.2 u have this lib to use https://github.com/saltstack/salt/blob/v2015.2/salt/utils/http.py
15:49 isodude_ joined #salt
15:49 desposo joined #salt
15:50 c4urself murrdoc: thanks for the info. wish i was on the latest version for various reasons but afraid that's too much work atm
15:51 nxf joined #salt
15:51 murrdoc no i get that, i am just saying, if you are writing modules in salt, try to use existing stuff from salt, so it doesnt conflict with upgrades later
15:51 murrdoc i am not saying upgrade meow!
15:51 murrdoc :)
15:51 c4urself haha, yep totally get it
15:52 Jimlad joined #salt
15:52 perfectsine joined #salt
15:52 soren_ joined #salt
15:53 dramagods joined #salt
15:56 roy_ joined #salt
15:58 iggy upgrade right meow!
15:58 iggy actually 2014.1 -> 2015.2 was pretty painful
15:58 murrdoc this is true
15:58 murrdoc barring cmd.run
15:58 murrdoc shits smooth sailing
15:59 raygunsix joined #salt
16:00 perfectsine joined #salt
16:01 TheoSLC joined #salt
16:02 monkey66 joined #salt
16:04 ipmb joined #salt
16:05 bhosmer joined #salt
16:05 Guest70 joined #salt
16:08 spookah joined #salt
16:09 zwi joined #salt
16:12 bhosmer joined #salt
16:14 WesleyTech joined #salt
16:15 perfectsine joined #salt
16:16 writtenoff joined #salt
16:18 bhosmer joined #salt
16:20 raygunsix joined #salt
16:21 c4urself iggy: any tips/tricks for upgrading to 2015.2 (from 2014.1)?
16:22 TheoSLC joined #salt
16:23 shaggy_surfer joined #salt
16:24 rocket joined #salt
16:24 iggy c4urself: off the top of my head (stuff that isn't documented)... the cmd.run/cmd.shell thing was big
16:24 iggy 2015.2 is a lot chattier
16:24 iggy good and bad thing
16:24 iggy and it depends what features  you're using
16:25 murrdoc what do u upgrade first ?
16:25 murrdoc minion or master ?
16:25 iggy scheduler/orchestrate/reactor changed a good bit, but that's not something that a lot of people use
16:26 iggy I did minions (via cmd.run), then master
16:26 iggy 2014.7 minions seem to run fine against 2015.2 master though
16:26 iggy I imagine 2014.1 would too, but I didn't risk it
16:27 rocket is 2015.2 out now?
16:28 KyleG joined #salt
16:28 KyleG joined #salt
16:28 iggy it is not
16:29 c4urself iggy: did you upgrade to 2014.7 first?
16:29 rocket thanks iggy
16:30 smcquay joined #salt
16:30 ja-s joined #salt
16:32 theologian joined #salt
16:33 teogop joined #salt
16:34 aparsons joined #salt
16:36 iggy c4urself: nope, 2014.1 -> 2015.2 direct
16:36 murrdoc its the #ssceapproved wawy
16:36 murrdoc way*
16:36 otter768 joined #salt
16:39 ja-s joined #salt
16:40 aparsons joined #salt
16:40 MatthewsFace joined #salt
16:40 pdayton joined #salt
16:41 zwi joined #salt
16:43 jalbretsen joined #salt
16:44 Heartsbane So I have this one host that won't take any states that I have added to my top.sls
16:44 iggy not matching probably
16:44 Heartsbane so I try to use state.sls to fire manually
16:44 denys joined #salt
16:44 Heartsbane and it returns: No matching sls found for 'linux:conf.devuser' in env 'base'
16:45 Heartsbane but the state executes flawlessly on every other server
16:45 murrdoc does test.ping work ?
16:45 Heartsbane yes
16:45 murrdoc envs fine too ?
16:46 Heartsbane ya
16:46 iggy different minion_id's? key accepted?
16:46 Heartsbane 88 servers have deployed conf.devuser
16:46 Heartsbane yes
16:48 murrdoc damn
16:48 murrdoc re install salt-minion ?
16:48 murrdoc delete keys
16:48 murrdoc all that
16:48 Heartsbane the minions_id is identical and the key is accepted
16:48 Heartsbane ok
16:48 robawt Heartsbane: sounds like it's not seeing its configuration, or not receiving files
16:49 robawt Heartsbane: have you tried oxblood or any other ritual sacrafice?
16:49 Heartsbane Fresh out of virgins, Rob
16:50 Heartsbane I could use a developer as a substitute
16:50 dramagods joined #salt
16:50 robawt Heartsbane: do things like test.ping return from it?
16:50 Heartsbane ya
16:50 murrdoc same thing
16:50 murrdoc devs dont get any
16:51 Heartsbane murrdoc: good point
16:51 murrdoc nuke the minion, reinstall and re accept key
16:51 robawt murrdoc++
16:51 robawt this is new hotness version right?
16:51 dramagods joined #salt
16:51 iggy yeah, we are in a cloud, when I have a minion that doesn't play well with others... delete -> redeploy
16:52 Heartsbane it only does the '*' in my top.sls no other states... odd
16:52 murrdoc i dont mean kill the machine, just the salt-minion
16:52 isodude_ does the sls get copied to the minions?
16:52 Heartsbane k nuking the minion
16:52 Heartsbane yes
16:52 isodude_ can't you list what states exist on the minion?
16:53 isodude_ state.clear_cache etc
16:53 isodude_ state.list_disabled
16:54 ajw0100 joined #salt
16:54 murrdoc hmm good call
16:54 isodude_ shouldn't state.show_highstate return the correct stuff?
16:54 murrdoc state.list_disabled
16:55 redzaku joined #salt
16:55 xf10e done for today, can't continue until https://github.com/saltstack/salt/issues/22782 is fixed anyway...
16:55 elektrix_ when pulling a variable from pillar, in my jinja template, it's putting the string as ['string'] instead of just string...ideas?
16:55 xf10e have a nice weekend everyone
16:56 dramagods joined #salt
16:56 isodude_ Heartsbane:  does the log say anything?
16:56 faust joined #salt
16:56 Auroch joined #salt
16:57 iggy I like cp.list_master for obnoxious amounts of information that I have to sift through on my own
16:58 isodude_ would be nice to know if /var/cache/salt/minion/files/base/top.sls has ben damaged
16:59 elektrix_ nm, figured it out...in my pillar, I didn't have var: 'value', instead I had the value below the var with a "-", and it was treating it as an array (I guess)
17:00 dthorman joined #salt
17:00 Heartsbane isodude_: no, but state.show_highstate doesn't even show devuser getting to the host
17:01 clintberry joined #salt
17:01 Heartsbane I think I am going to blow away the minion
17:01 Heartsbane and blame robawt
17:01 iggy elektrix_: - means list
17:01 iggy elektrix_: and in python [] means list
17:01 elektrix_ ahh...thanks
17:02 isodude_ Heartsbane: try to clear the cache before
17:02 isodude_ maybe the minion thinks it has the data
17:02 elektrix_ so if I was going to do a for/each loop, then I would do it that way (right)?
17:02 rojem joined #salt
17:02 elektrix_ to operate on each item in the list
17:03 Heartsbane isodude_: tried that
17:03 iggy elektrix_: true
17:03 Heartsbane isodude_: same results
17:03 isodude_ Heartsbane: k, does the devuser state exist in the cache folder?
17:03 isodude_ in /var/cache/salt/minion/files/base/
17:03 elektrix_ awesome...not doing that yet, but I already know of some things I have to do where that will be necessary
17:03 Heartsbane it does not
17:03 isodude_ if you didn't change cache_dir
17:04 isodude_ hmm
17:04 isodude_ wonder if you could do strings on the cache-file
17:06 isodude_ well
17:07 isodude_ clear_cache did not remove the cache files at all
17:08 isodude_ well
17:08 Heartsbane no I am just going to reinstall the salt-minion
17:08 sk_0 joined #salt
17:08 Heartsbane sorry coworker came and talked to me
17:08 isodude_ maybe removing files/base would force it to readd
17:08 mapu joined #salt
17:08 isodude_ tried removing the top.sls by hand and it got re-added
17:09 markm joined #salt
17:09 isodude_ note that state.clear_cache did not remove those files.
17:10 druonysus joined #salt
17:10 rm_jorge joined #salt
17:10 isodude_ removing the whole base folder worked
17:11 isodude_ :)
17:11 rap424 joined #salt
17:11 monkey66 left #salt
17:12 Guest70 joined #salt
17:12 Heartsbane Done, reinstalled the minion, reaccepted the keys, deleted it from the top.sls, cleared the cache, readded it top.sls, ran state.highstate test=True
17:12 Heartsbane and now it wants to add
17:12 Heartsbane Thanks for your help guys
17:12 murrdoc 'help'
17:12 jeremyalons Any idea what minimum salt version is needed for the map.jinja's to render?
17:13 bhosmer joined #salt
17:15 huddy joined #salt
17:17 Alexey1 joined #salt
17:19 jeremyalons duh, nevermind.  You gotta import the map file into any templates also using it if you're not passing hte values with context
17:22 Fiber^ joined #salt
17:26 madhadron joined #salt
17:26 sunkist joined #salt
17:27 madhadron Does anyone know of documentation how to set up ssh keys for a tunnel with Salt?
17:28 echo joined #salt
17:30 smcquay joined #salt
17:32 quantumriff joined #salt
17:32 iggy nothing special about ssh keys for a tunnel
17:33 madhadron Oh, actually I just switch from ed25519 to rsa and now it's happy
17:37 [arx] joined #salt
17:37 [arx] joined #salt
17:44 nafg_ joined #salt
17:44 madhadron ...and it appears I was running an ancient version of salt. Yeesh.
17:45 iggy yeah, I kind of wish debian/ubuntu/etc would just drop salt from it's main repo's (if they aren't planning on keeping up)
17:45 debian112 left #salt
17:46 echo joined #salt
17:46 Alexey1 joined #salt
17:46 madhadron That's true of a lot of packages, unfortunately
17:46 c4urself does salt have it's own archive?
17:46 madhadron Yes, it does
17:47 madhadron I just neglected to run apt-get update before installing and after adding the PPA
17:47 madhadron Because I'm evidently a blithering idiot
17:47 c4urself ahhh, gtk
17:47 zwi joined #salt
17:48 madhadron Fortunately I have Salt, so I can just run the update command on all the hosts. (:
17:48 quantumriff in a template file, I have this defined:
17:48 quantumriff {% set hostname=salt['grains.get']('host') %}
17:48 quantumriff i'm trying to use jinja to set the value with this:
17:48 quantumriff INITGRP={{ salt['pillar.get']('initgrp', '{{ hostname }}') }}
17:48 dewdrop joined #salt
17:48 quantumriff if the pillar is set, use it, otherwise use {{ hostname }}
17:48 manfred quantumriff:  don't need the extra quotes
17:49 quantumriff what I am ending up with is INITGRP={{ hostname }}
17:49 thayne joined #salt
17:49 manfred INITGRP={{ salt['pillar.get']('initgrp', hostname) }}
17:49 quantumriff ahh, don't even need the brackets?
17:49 murrdoc iggy:  https://gist.github.com/puneetk/08b8f96089a95dfdae56
17:49 manfred it is a variable in jinja, and you are already inside jinja, so you can just reference the variable
17:49 manfred quantumriff:  you already have brackets
17:49 quantumriff haha!
17:49 manfred so you can do stuff like
17:50 manfred {{ salt['pillar.get']('initgrp', salt['grains.get']('host')) }} if you wanted
17:50 quantumriff okay.  what about concating things? like:
17:51 quantumriff INITGRP={{ salt['pillar.get']('initgrp', hostname+'grp' ) }}
17:51 quantumriff ?
17:51 quantumriff to add a -grp to the hostname?
17:51 quantumriff with spaces
17:51 manfred , "%s-grp"|format(hostname)
17:51 iggy hostname ~ 'grp'
17:51 manfred you could also do that^^
17:51 manfred yeah
17:51 iggy or format
17:52 manfred i just like format
17:52 iggy <3 format
17:52 iggy might as well learn some python while you're learning salt
17:52 manfred quantumriff:  INITGRP={{ salt['pillar.get']('initgrp', '{{ hostname }}') }}
17:52 manfred bah
17:52 iggy you'll need it later
17:52 evilrob joined #salt
17:52 manfred quantumriff:  http://jinja.pocoo.org/docs/dev/templates/#other-operators
17:52 manfred quantumriff:  http://jinja.pocoo.org/docs/dev/templates/#format
17:53 quantumriff manfred: iggy: thanks
17:53 manfred np
17:56 iggy murrdoc: I think we want merge in newer versions... nope that just ends up calling update anyway
17:56 iggy and update exists all the way back to 2014.1
17:56 iggy so... yeah
17:56 murrdoc once whiteinge fixes the bug, we dont need this module, cos we can just do salt.utils.dictupdate.update or merge
17:56 murrdoc till thing i am using this duct tape
17:57 murrdoc up to u if u want to use it in the formula stuff
17:57 iggy it's useful for old versions of salt I guess
17:57 murrdoc its needed in 2014.7 right now
17:58 iggy I thought that bug only impacted 2015.2
17:58 murrdoc nah it doesnt work in 2014.7
17:58 murrdoc {% set default_settings.rsyslog = salt.utils.dictupdate.update(default_settings.rsyslog,  flavor_map) %}    <======================
17:59 murrdoc Rendering SLS 'base:formula.rsyslog.package' failed: Jinja syntax error: expected token '=', got '.'
17:59 murrdoc thats the error i get in 2014.7
17:59 iggy I don't think salt (in jinja) has utils
17:59 iggy only modules
18:00 iggy i.e. you can't do salt.states.file.managed
18:00 iggy only salt.somethinginmodules.function
18:00 iggy so I don't think you are hitting that bug, you are hitting expected behavior
18:00 murrdoc word
18:00 iggy you don't want _every_ bit of salt functionality available in jinja context
18:01 iggy so that module would be required long term
18:01 iggy (although it's a useful bit of functionality that shouldn't be too heavy, so it should probably be exposed via a module by default)
18:03 murrdoc shit maybe i should have made it a utils hook
18:04 timoguin joined #salt
18:04 murrdoc not sure why utils is not available, its already loaded before modules
18:05 iggy salt.modules.utils.* (and just grab in the important bits out of utils
18:05 druonysuse joined #salt
18:05 druonysuse joined #salt
18:05 iggy because a lot of it is probably heavy for modules/states
18:05 iggy I think a utils module that selectively grabbed stuff from salt.utils would be a better idea than just pulling in everything from utils
18:05 murrdoc there isnt a salt.moduls.utils
18:06 iggy right... yet ;)
18:06 iggy but really, my goal is to obviate the need for that in templates
18:06 murrdoc woah there buddy
18:06 iggy beef up defaults.get or something
18:06 IronBalls joined #salt
18:06 murrdoc slowdown
18:07 murrdoc its friday
18:07 iggy lol
18:07 murrdoc dont be using words like obviate
18:07 murrdoc in a conversation
18:07 murrdoc on FRDAIY
18:07 murrdoc :D
18:10 iggy defaults -> grains['os'] -> grains['oscodename'] -> grains['osvariant'] (or whatever rh uses) -> pillar -> pillar:lookup (back compat)
18:10 iggy do a single function that looked that up...
18:11 iggy it's been a while since I've used Salt on a RH(like) distro
18:12 murrdoc http://i.imgur.com/g7tqL6J.gifv
18:13 randomuser joined #salt
18:14 iggy wtf did I just watch
18:16 krelo joined #salt
18:16 evilrob Don't mess with the Hoff!
18:16 quantumriff iggy: if you don't understand.. we can't explain it :)
18:18 ajw0100 joined #salt
18:20 hasues evilrob: I thought it was "Don't hassle the hoff".
18:20 evilrob hasues: I sit corrected
18:20 tr_h joined #salt
18:20 hasues evilrob: I see what you did there.
18:28 Alexey1 joined #salt
18:31 Alexey2 joined #salt
18:37 otter768 joined #salt
18:38 finisherr joined #salt
18:40 basepi aw, man, lb1a left. Here's my custom modules talk from saltconf15: https://www.youtube.com/watch?v=7CxJGglQhxQ&amp;feature=youtu.be
18:41 Topic for #salt is now Welcome to #salt | 2014.7.4 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/
18:43 ndrei joined #salt
18:47 rocket_ joined #salt
18:53 druonysus joined #salt
18:56 moos3 joined #salt
18:57 elektrix_ is there a snippet someone that shows how to check if a state/function is being called (e.g. procmail.installed, or just the procmail.sls), and do something if it is, but do nothing otherwise
18:57 elektrix_ s/someone/somewhere
18:58 murrdoc saltstack requisites onchanges
18:59 elektrix_ k, I'll read that over again...
19:00 murrdoc basically add a - onchanges: - state: statename
19:00 murrdoc to notify a state to run
19:00 murrdoc i think
19:02 elektrix_ yeah...that sounds about right...what I'm trying to do is: I have a managed file in a state. if I put a certain state file in top.sls, then the managed file should know this, and have slightly different content
19:03 elektrix_ e.g. my postfix/main.cf will be one way if procmail is installed, and another way if not
19:04 murrdoc ah
19:04 murrdoc whats a good way to know
19:04 murrdoc which package was installed
19:05 raygunsix joined #salt
19:05 elektrix_ in my init.sls, I have {% if salt['pkg.install']("procmail_settings.procmail_pkg") %}
19:07 elektrix_ if in my procmail formula, if I just have the simple procmail: pkg.installed, it works
19:07 Guest8940 joined #salt
19:08 elektrix_ but when I start putting all my pkg names and whatnot in defaults.yaml and map.jinja in the /srv/salt/procmail dir, it quits working
19:09 UForgotten so I’m trying to run a cmd line salt action on ten nodes, node01.fqdn-node10.fqdn.  Is there a good/proper way to do this, because regex and -C don’t seem to be working as I expect. i.e. -C ‘E@node0[1-9]* or E@node10*’ somehoe gets nodes 11-19 as well, and using ‘and’ does nothing.
19:09 elektrix_ ehh...I'll figure it out...
19:10 murrdoc i think on_caches work
19:10 murrdoc or maybe listen_in
19:10 daemonkeeper joined #salt
19:11 madhadron UForgotten, Your second regex matches zee or more 0's
19:11 madhadron UForgotten, Try E@node0[1-9] or E@node10
19:12 madhadron zero or more, rather
19:12 UForgotten that won’t match the rest of the fqdn though?
19:12 UForgotten I can try putting it in.
19:12 madhadron Unless you add $ to the end, it shouldn't have to
19:13 UForgotten it always has before
19:13 UForgotten if you dont put the * it wont match the hostname
19:13 madhadron Ah, my bad then. Try adding .* after the 10
19:14 Vynce joined #salt
19:14 UForgotten adding the fqdn appears to work
19:14 madhadron Or use 'node[01-10]' and see if it works.
19:14 UForgotten 01-10 definitely doesn’t work
19:14 madhadron Okay, I didn't know how smart it was
19:14 Vynce that would be a zero, anything between a one and a one, or a zero
19:14 UForgotten only as smart as regexes :)
19:14 * Vynce loves regex
19:14 UForgotten ./s
19:14 madhadron But what was going on was node10* matched zero or more 0's, so node1 and node11 would both match
19:15 elektrix_ eh...will just work within what's possible...will set a variable in my postfix formula "procmail = yes" then call the procmail formula and change main.cf as needed
19:15 UForgotten yeah, makes sense. thanks.
19:15 UForgotten I need to stop being lazy with that *
19:15 madhadron UForgotten, Yeah, it's not a shell glob.
19:15 madhadron I try to avoid regexes when I can. I've spent too much of my life debugging them.
19:17 madhadron Usually I can avoid them by setting some identifying metadata or writing an actual parser.
19:17 bhosmer__ joined #salt
19:17 SheetiS joined #salt
19:19 ajw0100 joined #salt
19:20 robinsmidsrod joined #salt
19:20 thayne joined #salt
19:22 rojem joined #salt
19:31 ggoZ joined #salt
19:33 murrdoc joined #salt
19:43 Vynce "writing an actual parser" sounds like a pain. ( :
19:44 Brew joined #salt
19:45 wwwBUKOLAYcom joined #salt
19:47 SheetiS joined #salt
19:47 smcquay joined #salt
19:48 madhadron Vynce, I got spoiled in Haskell land where it's easier than regexes.
19:49 pdayton joined #salt
19:49 madhadron Or you can often get systems to emit json or something else with a proper grammar and do structural transformations instead
19:50 furball365 joined #salt
19:50 Vynce yeah, using a parser seems saner
19:51 furball365 left #salt
19:57 Not joined #salt
19:59 pdayton joined #salt
19:59 hasues left #salt
20:00 scbunn joined #salt
20:00 thomas joined #salt
20:03 Guest70 joined #salt
20:04 iggy quiet in here today... I seem to be getting stuff done
20:06 denys joined #salt
20:06 MatthewsFace joined #salt
20:09 funzo joined #salt
20:12 bmac2 so iggy I take it you are lonely today
20:12 bmac2 lol
20:13 iggy I have a timer that reminds me to say something at least every 2 hours
20:13 murrdoc I AM SO RONERY
20:13 murrdoc uhmerika!
20:13 bmac2 lol
20:14 fbettag joined #salt
20:15 cpowell joined #salt
20:16 cpowell joined #salt
20:18 madhadron iggy, You could just have it say 'ping' for you and not get distracted.
20:19 MatthewsFace joined #salt
20:19 aquassaut joined #salt
20:20 iggy true, but then I'd miss all the repeated questions
20:23 I3olle joined #salt
20:24 murrdoc i hae a state with a pillar i want to use, thoughts ?
20:27 iggy have one of your lackeys do it
20:29 soren_ joined #salt
20:30 iggy speaking of lackeys... who wants to move Houston and be mine?
20:32 dingo from what i can tell you're all mad crazy, i think the heat boils your brains
20:33 iggy it's quite possible... we definitely enjoy our AC
20:34 pravka joined #salt
20:35 Pixionus I'm attempting to transfer an individual file to a single minion and can't seem to get it to work
20:35 Pixionus salt 'ts7600-488cf5' cp.get_file salt://temp.sh /test/
20:35 murrdoc is it heavy
20:36 daryl256 joined #salt
20:36 murrdoc does it exist in /{file-roots}/temp.sh
20:36 Pixionus I've tried storing the file in the root directory where I was using salt://root/temp.sh
20:36 Pixionus yes it does.
20:37 murrdoc put it on /root/temp.sh and use cp.file /root/temp.sh destination
20:37 iggy what output do you actually get? Tried running it as (from the minion) salt-call -l debug cp.get_file salt://temp.sh /test/
20:38 rap424 joined #salt
20:38 otter768 joined #salt
20:38 kossy_ joined #salt
20:39 daryl256 joined #salt
20:43 cmcmacken joined #salt
20:44 hemphill joined #salt
20:44 Pixionus http://www.pastebin.ca/2975527
20:45 Pixionus had some trouble with pastebin.com being overloaded
20:45 murrdoc use gist
20:45 murrdoc also can u do an ls {file_root}/temp.sh
20:46 jopecko joined #salt
20:46 hemphill left #salt
20:46 murrdoc please Pixionus
20:46 Pixionus not sure what you mean.  It exists in / and in /root/ though
20:46 hemphill joined #salt
20:46 iggy that's not file_roots
20:46 iggy file_roots would be /srv/salt by default
20:46 Pixionus ah
20:47 Pixionus that would be my problem I am sure.
20:47 iggy that's the base of the salt:// uri namespace
20:47 Pixionus thank you
20:47 Pixionus yeah forgot
20:47 Pixionus been a while since I had to use anything that cared
20:47 Pixionus Thanks yall
20:47 jopecko joined #salt
20:51 Pixionus [ERROR   ] An un-handled exception was caught by salt's global exception handler:
20:51 Pixionus IOError: [Errno 21] Is a directory: '/test/'
20:51 hemphill joined #salt
20:52 Pixionus is it not expecting a directory?
20:52 hemphill left #salt
20:53 iggy no, full path
20:53 SheetiS joined #salt
20:53 pullphinger15 joined #salt
20:54 iggy the docs and examples aren't really clear that it's a requirement
20:55 Pixionus No they're not.
20:55 Pixionus It worked though so thank you,
20:55 michelangelo joined #salt
20:55 murrdoc murrdoc
20:55 murrdoc put it on /root/temp.sh and use cp.file /root/temp.sh destination
20:56 murrdoc i mentioned it
20:56 murrdoc but it wasnt ssceapproved
20:56 murrdoc so u know there is that
20:56 iggy that's what you get for being a day late to the party
20:56 iggy and by party, I mean saltconf
20:56 murrdoc i was working
20:56 iggy (which for me was very much a party ;)
20:56 murrdoc (yes i saw)
20:57 pdayton joined #salt
20:57 teogop joined #salt
20:57 Pixionus lol
20:57 cwyse_ joined #salt
20:57 Pixionus every day I lament the fact that I missed it
20:59 svx joined #salt
20:59 dunz0r joined #salt
21:00 hemphill joined #salt
21:00 Tahm joined #salt
21:05 pravka joined #salt
21:05 giantlock joined #salt
21:07 shaggy_surfer joined #salt
21:07 shaggy_surfer joined #salt
21:11 fusionx86 left #salt
21:13 rojem joined #salt
21:24 hasues joined #salt
21:24 hasues left #salt
21:27 Setsuna666 joined #salt
21:29 kaictl joined #salt
21:30 bhosmer joined #salt
21:35 iggy defaults.get()'s code is... looks strangely over-engineered
21:36 murrdoc what u looking at
21:36 iggy https://github.com/saltstack/salt/blob/develop/salt/modules/defaults.py
21:37 iggy I get what it's doing
21:38 pdayton joined #salt
21:38 iggy seems like it would have been easier to do it as a jinja context thing rather than a module (that is clearly meant to be run via jinja and not on the command line)
21:40 murrdoc this is bad
21:40 dave_den joined #salt
21:40 mattiaswolff joined #salt
21:41 fusionx8_ joined #salt
21:42 amcorreia joined #salt
21:43 murrdoc this is bad
21:43 murrdoc coupling is toooo tighet
21:43 murrdoc tight*
21:44 murrdoc it should have just parses the yaml
21:44 iggy it seems weird that it's assuming the files it needs wouldn't be in the cache
21:45 iggy when almost everything else I've seen assumes (rightly so afaik) that everything from the master is cached
21:48 rojem joined #salt
21:49 fusionx86 joined #salt
21:52 fusionx8_ joined #salt
21:53 fusionx86 joined #salt
21:54 otter768 joined #salt
21:57 Uni joined #salt
21:57 tomh- joined #salt
21:58 Uni not readily finding any info on how to only install a given pkg on a specified platform(distro) and to ignore other distros/platforms, could somone point to the proper docs if they exist?
21:59 Uni found plenty of info on specifying variables/etc depending on platform, but not a way to ignore all but platform X
22:01 mattiaswolff joined #salt
22:01 iggy target the state that installs it using grains in the top file
22:03 * Uni facepalms
22:03 Uni there's my duh moment for the day
22:03 Uni was just assuming the jop.sls wasn't getting passed through the template engine for some reason
22:04 Uni top.sls rather
22:07 iggy it does, but that wasn't really what I meant
22:08 iggy https://gist.github.com/iggy/0441dec0a77bbc549eb7
22:08 iggy something like that, but instead of targeting roles, you target other grains
22:09 iggy so like.... 'oscodename:jessie'
22:12 echo joined #salt
22:14 ajw0100 joined #salt
22:17 soren joined #salt
22:18 Vynce OK, so in "salt 'target' thing.stuff what is the thing.stuff called ? and, follow-up, where do i get a list of appropriate things?
22:20 murrdoc thing is module
22:20 murrdoc stuff is function
22:20 murrdoc saltstack modules
22:21 Vynce (i had a cron on some minions that now i want gone; i removed it from their highstate definition, but it's still there, and salt 'them' cron.absent isn't working….)
22:21 Vynce ah.
22:21 JayFK joined #salt
22:22 hal58th_ Vynce, it might be because you didn't add the "identifier" for your cron
22:22 Vynce no, CLI doesn't have cron.absent
22:22 Vynce it has… well, docs unclear: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cron.html#salt.modules.cron.rm  eitehr rm or rm_job.
22:23 hal58th_ hmmmm, never used just the module. I just use the cron state
22:23 eesh joined #salt
22:23 iggy salt.modules.* are command line stuff salt.states.* are for sls files
22:23 eesh hey all...
22:23 Vynce iggy: an interesting and not well-messaged distinction.
22:24 Vynce but thanks. ( :
22:24 iggy Vynce: you are better off adding a state that says cron.absent... what about the hosts that are down? etc...
22:25 Vynce "the hosts that are down"?  there are exactly two hosts that have this, atm — iadded it to them by mistake last night
22:25 iggy Vynce: that's an entirely simplistic view of things... you can call modules in sls files and states on the command line... you just usually don't
22:25 iggy Vynce: fine, but in a general sense...
22:26 eesh I'm having a problem...I just took over another persons role.  I have very little experience with Salt and am trying to get up to speed.  The previous person had a solid understanding of Salt...I am trying to install Nagios by means of local rpms.  When the machine is first provision, all rpms seem to install fine.  However, when I re-highstate the same server, I get error messages about the nagios packages.
22:26 Vynce well, i don't want to create a mystery later if someone manually adds this cron
22:27 eesh Please see https://gist.github.com/anonymous/21463b9c63206af8d665 for init.sls
22:28 iggy eesh: paste versions, the state files you are using, error messages, etc... (preferrably to gist.github.com as separate files ;)
22:30 eesh https://gist.github.com/anonymous/0686c860414786b68a51
22:30 eesh (Don't know how to use gist)
22:32 eesh When I re-highstate one of the other persons init.sls files, I get all green, saying the machine is up-to-state.  What am I doing wrong?
22:33 iggy the first part of the source should match the package name
22:33 iggy so nagios_common: salt://nagios_client/files/nagios-common-3.5.1-1.el7.x86_64.rpm
22:33 iggy should be nagios-common: salt://nagios_client/files/nagios-common-3.5.1-1.el7.x86_64.rpm
22:34 iggy nagios_nrpe -> nrpe
22:34 iggy etc
22:34 eesh ok..lemme try that...
22:34 eesh thanks iggy.  You've helped me before.  'Preciate it!
22:35 ajw0100 joined #salt
22:36 otter768 joined #salt
22:37 eesh Seems to have made a difference, but still not there yet...https://gist.github.com/anonymous/5e084e2ba744a55ac26b
22:37 eesh I don't understand why the pkg.install doesn't come back green, saying "is in the correct state"
22:38 Vynce does anybody know how jinja's {% include %} works in salt space?
22:42 iggy eesh: just left a comment on there
22:42 iggy Vynce: be more specific
22:43 hasues joined #salt
22:43 pahko joined #salt
22:44 hasues left #salt
22:44 eesh Thanks Iggy, but I really don't see the difference between your comment and my init.sls
22:44 eesh *scanning
22:44 iggy lots of s/_/-/
22:45 eesh of course of course.
22:45 eesh Thanks! Trying again...
22:46 timoguin joined #salt
22:47 Jimlad_ joined #salt
22:49 Vynce iggy: well, i have a state that renders a jinja template, which has an {% include SOMEFILE %} … if SOMEFILE has a relative path, it says it can't find it.  if i have a salt:// path, it can't find it. if i have an absolute path, i get a "MinionError" — which makes me wonder if the rendering happens on the minion side?  which would be surprising, to me.
22:50 iggy state rendering is on the minion
22:51 iggy relative paths and salt:// paths don't work
22:51 Vynce that would explain it.  not at all clear fromt he docs on salt+jinja
22:51 iggy (I'm pretty sure the docs mention relative paths with imports, but probably not salt:// ... because that doesn't really make sense)
22:52 Vynce please tell me where.  the docs i ound for include didn't actually talk about include.
22:53 Vynce http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#include-and-import
22:54 echo joined #salt
22:57 Vynce <- constant quest for docs
22:59 ajw0100 joined #salt
22:59 Alan_S joined #salt
23:03 iggy maybe I dreamed it up... who knows
23:04 daryl256 joined #salt
23:08 Vynce ah, well. here is it explained that jinja templates get rendered on the minion?  I'm wondering if there's other stuff of that level that i need to know.
23:08 Vynce (if you know where)
23:11 iggy I don't know the docs that well
23:11 iggy plus the docs have changed a bit since I would have learned that anyway
23:13 Alexey1 joined #salt
23:14 Vynce ah, well. … next question: in my quest to be less reliant on cmd.run, i'm looking for an equivalent of ls — i expected it to be under salt.modules.file, but i'm not seeing it.  any pointers?
23:15 Vynce and http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.fsutils.html#module-salt.modules.fsutils is blank. \ :
23:16 iggy for what?
23:16 iggy I mean what are you using ls to find out?
23:18 Vynce … what's in a directory?
23:19 bhosmer_ joined #salt
23:19 iggy how very ambiguous
23:20 Vynce particular questions: exactly what a particular file is named that i'll knw when i see it, but have forgotten the name of.  What the zipped version of that file is.  how many old versions of that have been kept (it's rotated). etc.
23:20 murrdoc joined #salt
23:20 Vynce well, i mean, what do you ever use ls for?
23:20 iggy in salt states... nothing
23:21 Vynce yeah, this isn't in a state. this is from the CLI.
23:22 iggy file.readdir file.path_exists
23:23 iggy but really, I'd just use cmd.* on the command line
23:23 iggy too lazy to look up modules for one off shit like that
23:23 solidsnack joined #salt
23:23 Vynce maybe this is why the docs bother me more than they bother some — i am *constantly* looking up docs for things.
23:24 Vynce hm.  there's no listing for salt.modules.cmd at http://docs.saltstack.com/en/latest/salt-modindex.html … are there things that can go after cmd. other than run ?
23:25 iggy it's cmdmod
23:25 iggy cmd would clash
23:25 iggy there are a few other modules/states like that
23:27 Vynce … k …
23:28 solidsnack I am trying to use `gitfs` and the module seems to always check out a bare repo...
23:28 solidsnack Tried a local repo (file:///...) as well as a remote. Same result.
23:28 iggy solidsnack: how are you checking?
23:30 solidsnack `ls /var/cache/salt/master/gitfs/...`
23:30 iggy solidsnack: that's normal
23:31 iggy gitfs looks at the git objects themselves (rather than the normal checked out copy you would expect)
23:31 iggy solidsnack: I take it you've reached this point trying to debug something else (normal people don't go digging around in cache dir's for no reason)
23:32 iggy "salt-call cp.list_master" is helpful for seeing what the master dir/file structure looks like
23:35 solidsnack iggy: Okay, interesting. It works.
23:35 solidsnack iggy: However, it seems that with a remote repository, it doesn't.
23:35 iggy for that you want "salt-run -l debug fileserver.update"
23:35 solidsnack (Same repo, once as git@github.com:... and then again as file:///...)
23:35 pahko joined #salt
23:36 iggy should really write all these down somewhere
23:36 solidsnack So this is odd: `gitfs received 0 objects for remote git@github.com:__/_.git`
23:37 Alexey1 joined #salt
23:37 iggy nothing before that?
23:37 solidsnack `gitfs is fetching from git@github.com:instacart/salt-states.git`
23:37 iggy like errors about keys, etc.
23:37 solidsnack No errors, no.
23:37 solidsnack iggy: `pygit2 gitfs_provider enabled`
23:38 solidsnack And the like.
23:39 iggy can you try the fetch manually?
23:39 iggy as the root user on the master
23:44 shaggy_surfer joined #salt
23:47 hernan604 joined #salt
23:47 radd joined #salt
23:51 pdayton joined #salt
23:53 Alexey1 is there way to make http request from state file? i currently use cumstom grains script for that, but it's require distribute that grains on the boxes before highstate, and that's not dynamic. Same like a external_pillar which require you to hardcode paramaters.
23:53 Alexey1 I want to make http request with parameter from salt state
23:54 Alexey1 and use returned data
23:57 iggy Alexey1: depends what you want to do with it
23:57 iggy and what version of salt
23:57 Alexey1 i wan't get data from consul, with a live boxes and make config with salt
23:58 ajw0100 joined #salt
23:59 iggy file.managed has http uri support

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