Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-04-01

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

All times shown according to UTC.

Time Nick Message
00:02 paydro joined #salt
00:04 hightekvagabond1 joined #salt
00:06 jagguli joined #salt
00:12 joe_n joined #salt
00:12 nickfrez Is there a list of valid keys in a require (e.g., pkg, file, sls, etc.)?
00:13 hemebond nickfrez: Isn't it just a module?
00:13 iggy salt.states.*
00:14 nickfrez ahh, I see... thanks!
00:17 kliquori joined #salt
00:24 hightekvagabond joined #salt
00:25 onlyanegg joined #salt
00:30 Tertain joined #salt
00:34 aqua^c_ joined #salt
00:40 t0m0 joined #salt
00:54 flowstate joined #salt
01:02 justanotheruser joined #salt
01:05 kliquori joined #salt
01:12 sxar_ joined #salt
01:15 LondonAppDev__ joined #salt
01:20 onlyanegg joined #salt
01:29 viq joined #salt
01:31 fracklen joined #salt
01:32 flowstate joined #salt
01:32 orion I keep getting this error on salt-loud 2015.8.8: DeprecationWarning: The term 'provider' is being deprecated in favor of 'driver'.
01:32 orion warning*
01:33 orion However, when I rename 'provider' to 'driver', I get this error: https://gist.github.com/centromere/ec33a09907363efd74d2a11420d1930f
01:33 orion Anyone know why this might be happening?
01:34 aw110f joined #salt
01:46 beardedeagle joined #salt
01:46 Tertain Hi all, has anyone had trouble installing on debian? I've tried using the current bootstrap version, the develop version, and version 2015.08.06. I've tried installing saltstack v2015.8.8, and a few others.
01:46 Tertain I get different errors depending on the combination of script version and saltstack version, but if I eventually install all the dependencies, I get an error saying salt-master.service start operation timed out.
01:46 Tertain Tried fresh versions of debian. Debian 8 btw.
01:47 XenophonF orion: you likely have a typo in your salt-cloud config
01:49 XenophonF orion: compare what you have with this - https://github.com/irtnog/salt-states/blob/development/salt/files/cloud.providers.d/irtnog.conf
01:49 cpowell joined #salt
01:52 k_sze[work] joined #salt
01:53 flowstate joined #salt
02:02 edrocks joined #salt
02:06 kliquori joined #salt
02:06 ajw0100 joined #salt
02:10 Tertain Update: it looks like the community repo works on debian. It's only the bootstrap scripts, and repo.saltstack that are having issues.
02:12 writtenoff joined #salt
02:14 aharvey joined #salt
02:15 xurong joined #salt
02:19 s_kunk joined #salt
02:19 s_kunk joined #salt
02:25 xurong joined #salt
02:27 favadi joined #salt
02:28 cyborg-one joined #salt
02:29 west575 joined #salt
02:30 orion XenophonF: Everything works properly when I use "provider:" instead of "driver:"
02:30 orion That's literally the only change.
02:31 beardedeagle yeah that is a changed in  2015.8.0
02:31 beardedeagle was*, even
02:33 orion beardedeagle: I'm on 2015.8.8, so I'm confused as to why "driver" doesn't work.
02:34 beardedeagle was it your provider or profile that you had driver in?
02:34 orion profile
02:34 hasues joined #salt
02:34 beardedeagle provider = driver, profile = provider
02:36 orion Oh, I see what's happening... the salt-formula formula is installing outdated config files: https://github.com/saltstack-formulas/salt-formula/blob/master/salt/files/cloud.providers.d/ec2.conf#L18
02:36 hasues left #salt
02:36 beardedeagle sure is
02:37 orion I'll file a report.
02:38 spuder joined #salt
02:40 spuder_ joined #salt
02:55 flowstate joined #salt
02:57 evle joined #salt
03:00 orion hmm
03:01 orion This is odd behavior: ext_pillar seems to use git from the command line while states use gitfs which uses pygit2.
03:09 hasues joined #salt
03:09 hasues left #salt
03:13 beardedeagle ugh. why do pillars hate mako
03:16 XenophonF orion: salt-formula needs some love, and iggy et al have been quite responsive
03:16 XenophonF so if you have the energy to cons up a pull request, the community would be mighty obliged
03:17 XenophonF murrdoc was going to rewrite the thing, but then his wife had a baby and he's nowhere to be found :)
03:18 kshlm joined #salt
03:19 orion XenophonF: Merged: https://github.com/saltstack-formulas/salt-formula/pull/215
03:19 saltstackbot [#215]title: Renamed "provider" to "driver" | On 2015.8.8 I get the following warning:...
03:20 XenophonF awesome
03:20 XenophonF you're the best
03:26 XenophonF you're the best, unlike this stupid XML config file I'm trying to template, which is totally the worst omfg kill me now
03:26 kaushal_ joined #salt
03:28 rem5 joined #salt
03:37 anmolb joined #salt
03:51 cpowell joined #salt
03:54 flowstate joined #salt
03:54 kliquori joined #salt
03:55 joe_n joined #salt
03:58 djgerm left #salt
03:59 jjasinski_ joined #salt
04:07 tercenya joined #salt
04:08 subsignal joined #salt
04:25 iggy I don't actually use gitfs or the salt-formula anymore
04:25 iggy but if you have a PR that looks sane and you have proof of actual testing, I could probably merge
04:28 joe_n joined #salt
04:35 orion iggy: Why don't you use gitfs anymore?
04:43 ageorgop joined #salt
04:49 garphy joined #salt
04:50 favadi joined #salt
04:55 flowstate joined #salt
04:55 mavhq joined #salt
04:58 sfxandy joined #salt
04:59 josue joined #salt
05:02 garphy joined #salt
05:06 iggy different job
05:07 zer0def joined #salt
05:07 sauvin joined #salt
05:14 sauvin joined #salt
05:15 kawa2014 joined #salt
05:16 beardedeagle problem is you just broke salt-formula for anyone not on 2015.8.*
05:16 beardedeagle you need to test and add backwards compatability with 2015.5.*
05:16 iggy who?
05:21 joe_n joined #salt
05:25 rdas joined #salt
05:26 ramteid joined #salt
05:26 favadi joined #salt
05:28 mavhq joined #salt
05:33 fracklen joined #salt
05:34 orion ha, whoops
05:35 orion beardedeagle: What do you think the best way to test for the salt version is?
05:36 iggy it's in grains
05:37 orion So it is.
05:37 beardedeagle Sorry, was away. what iggy said
05:39 orion Is it a faux pas to directly test grains using jinja within a file?
05:41 beardedeagle no, I do it in pillars, states, and jinja templates
05:41 beardedeagle iggy may have a preference though
05:42 orion So something like this would be acceptable?: https://gist.github.com/centromere/d0f230f28ba118ad64bc4d9cdf207579
05:43 joe__n joined #salt
05:44 beardedeagle problem with that is what happens when 2016.3 releases
05:46 orion So: {% if grains.saltversioninfo[0] >= 2015 && grains.saltversioninfo[1] >= 8 %}
05:46 mavhq joined #salt
05:48 mavhq joined #salt
05:50 babilen *sigh*
05:50 babilen orion: It is "and" rather than "&&"
05:51 orion *sigh*
05:51 orion ok
05:51 beardedeagle with and it will fail again
05:51 beardedeagle that evals to true false
05:51 beardedeagle when ran against 2016.3
05:52 cpowell joined #salt
05:53 orion ha, yes
05:54 sfxandy morning all
05:55 kliquori joined #salt
06:00 flowstate joined #salt
06:02 catpig joined #salt
06:03 babilen Guess I'm not updating formulas today then :)
06:04 sfxandy easy day for you then babilen!
06:08 beardedeagle sorry, not trying to be an ass
06:09 jhauser joined #salt
06:10 ninjada_ joined #salt
06:10 sfxandy joined this convo a bit late, has something gone bang?
06:13 orion beardedeagle: if grains.saltversioninfo[0] >= 2016 or (grains.saltversioninfo[0] >= 2015 and grains.saltversioninfo[1] >= 8)
06:15 beardedeagle that *should* work
06:15 babilen It would, yeah
06:15 babilen (assuming no breaking changes are introduced in, say, 2016.7)
06:16 babilen And this is why you want a non-date based, semantic versioning scheme :)
06:16 kshlm joined #salt
06:16 beardedeagle @babilen: shhhh
06:16 beardedeagle we don't speak of things that make sense
06:19 orion https://github.com/saltstack-formulas/salt-formula/pull/216
06:19 saltstackbot [#216]title: Added version check for provider/driver backwards compatibility | #215 breaks versions lower than 2015.8, this should fix it.
06:22 babilen ta!
06:22 orion Thanks, babilen, beardedeagle.
06:22 beardedeagle np
06:23 beardedeagle I dont even use that formula lol
06:23 babilen I do
06:23 babilen (on 2015 in places)
06:24 beardedeagle well good thing for that pr then lol
06:27 imarobot joined #salt
06:28 ravenx joined #salt
06:30 beardedeagle *sight* back to figuring out why pillars hate mako
06:33 sjorge joined #salt
06:33 sjorge joined #salt
06:33 felskrone joined #salt
06:35 felskrone joined #salt
06:42 kliquori joined #salt
06:53 fracklen joined #salt
06:55 dgutu joined #salt
06:55 Guest10296 joined #salt
06:56 flowstate joined #salt
07:01 garphy joined #salt
07:05 linjan joined #salt
07:06 djgerm joined #salt
07:06 slav0nic joined #salt
07:08 favadi joined #salt
07:08 djgerm hello! I was wondering what the pillar data would look like for the last comments user state in this gist: https://gist.github.com/UtahDave/3785738
07:08 boss joined #salt
07:12 sfxandy ok, so grains['ip_interfaces']['eth0'] returns a list with one entry i.e. ['192.168.1.2'].  which renders as a single element list in Jinja.  easiest way to convert it to a string?  my best so far is to use the |first filter
07:12 sfxandy anything better/neater?
07:12 iggy djgerm: the pillar is in that paste?
07:13 iggy sfxandy: what I use
07:13 sfxandy i dont follow iggy?
07:13 ntropy sfxandy: you can do grains['ip_interfaces']['eth0'][0]
07:13 djgerm oh at the top?! thanks!
07:13 sfxandy ah ok
07:14 djgerm how embarrassing.
07:15 KermitTheFragger joined #salt
07:19 dmaiocchi joined #salt
07:20 iggy sfxandy: I'd just stick with |first
07:24 dgutu joined #salt
07:28 beardedeagle this is freaking odd. salt is mixing up my states with my pillars when I run orch tasks via webhook. like it renders the pillar and fails instead of rendering the state.
07:33 iggy never saw that when using orch or the api
07:36 beardedeagle No matching sls found for 'cppv3' in env 'base'
07:36 beardedeagle my pillar was previsouly /srv/pillar/cppv3/init.sls and it would render and complain about not being formed as a list
07:36 beardedeagle renamed it to cppv3_secret/init.sls
07:36 beardedeagle and now it is complaining that it can't find the state
07:36 beardedeagle Could not find file from saltenv 'base', u'salt://cppv3.sls'
07:37 beardedeagle Could not find file from saltenv 'base', u'salt://cppv3/init.sls'
07:37 beardedeagle even though that last one exists in my actual states
07:38 beardedeagle only happens when my pillar is rendered in mako
07:38 beardedeagle if I switch it back to jinja it won't fail
07:39 favadi joined #salt
07:39 msn joined #salt
07:40 msn so totally beginner question. I am trying to convert the mysq yaml_jinja top.sls into python code, can't figure how to deal with the 'base' environment, the docs say not to use it so what to do
07:42 beardedeagle yup, totally an issue with having mako in your pillars
07:42 dariusjs joined #salt
07:43 punkoivan joined #salt
07:43 punkoivan left #salt
07:45 babilen sfxandy: fwiw, unless you are *really* interested in the IP on a specific interface, you might want to consider using network.ip_addrs with a suitable cidr for the network in question. Most of the time you want the address in a specific network, rather than the address on some interface. You *might* assign that address to that interface, but there is no need to.
07:46 babilen beardedeagle: I'm so sorry :(
07:46 babilen (you might want to open issues for this)
07:47 beardedeagle yeah I was talking to jfindlay about it earlier but hadn't really dug into it yet.
07:48 beardedeagle just means for now I have to use jinja for my pillars. which is fine since I don't really put a lot of logic into them.
07:49 babilen iggy: I had the mad idea to compile a global list of all pillars used in salt-formula formulas and to check for conflicts that would prevent users from using formulas together ..
07:54 cpowell joined #salt
07:54 vilitux joined #salt
07:54 favadi joined #salt
07:59 ronnix joined #salt
08:01 iggy they should be "namespaced" pretty well
08:01 iggy but it's not a bad option
08:07 babilen Do you know if it is possible to fill in the username dynamically in a standard salt-ssh roster? I'd like to share some configuration and don't want to use a single "maint" account for this, but would prefer if people were to use their own accounts.
08:07 msn babilen: any pointers on where to start to convert the top.sls into python :) i took your advice coverting it all into python now
08:08 babilen wut?
08:08 msn though i can't figure what to do with 'base'
08:08 babilen I simply mentioned that there are other renderers .. and I keep my top.sls in simple yaml
08:09 msn k
08:09 msn top.sls seems tougher cookie to crack for python
08:10 babilen But we could figure that out if you were to paste what you have and the problems you run into. I mean, in the end you want a suitable dictionary to be returned from run(), I guess.
08:10 * iggy hopes he never has to work with msn's code base
08:10 babilen But, to be honest, I'd keep top.sls rather simple.
08:10 msn iggy:  i hope that too
08:10 msn <--- is bad coder, the worst kind
08:11 babilen No need to go "full Python everywhere" and if you were under the impression that that was my advice you would be mistaken.
08:11 iggy way to go babilen... spreading misinformation
08:11 * iggy runs
08:11 babilen I meant that I typically use Python whenever I need some heavy logic rather than trying to do it in obtuse jinja or another renderer.
08:12 babilen iggy: haha
08:12 msn babilen: no i know it wasn't my impression, my thought was to make it more .... uniform
08:12 garphy joined #salt
08:13 babilen Shouldn't be too hard, but my feeling is that, unless you want to create top.sls dynamically, you don't gain anything by rendering top.sls in Python.
08:24 froztbyte soooo
08:24 froztbyte I want to feed a pillar automatically
08:24 froztbyte it's on a `salt-call --local` though
08:25 froztbyte I thought I could maybe do a python yaml.dump() to write out the SLS but that fails to render
08:26 iceyao joined #salt
08:29 froztbyte do I end up making an external pillar somehow?
08:29 iggy ext_pillars and masterless seems... odd
08:29 froztbyte yeah
08:29 froztbyte the problem here is ..... annoying
08:30 ronnix_ joined #salt
08:30 froztbyte I've got a mildly complicated piece of software that I have to ship to Elsewheres, and I'm setting it up with salt locally (basically just copying my existing states out and running them with masterless)
08:30 froztbyte but it needs some user input (auth creds, etc)
08:31 froztbyte I'm not sure if I can trust the user to do yaml correctly
08:31 froztbyte so I've tried to make a small python application that can write out the appropriately-shaped yaml, but that fails to render as a pillar SLS
08:33 josuebrunel joined #salt
08:33 * froztbyte goes to read the sls loader source
08:34 froztbyte oh actually
08:34 froztbyte s/yaml.dump/yaml.safe_dump/
08:35 froztbyte yay
08:35 froztbyte and then problem goes away
08:37 joe__n joined #salt
08:40 teatime joined #salt
08:42 msn joined #salt
08:43 msn I am trying to write to top.sls to handle 3 different environments so dynamically generating top.sls is looking very lucarative
08:43 kliquori joined #salt
08:44 elsmo joined #salt
08:46 sw joined #salt
08:47 sw in salt-cloud, is there a way to disable ssl verification? our vsphere only has self-signed certs
08:48 remyd1 joined #salt
08:49 flowstate joined #salt
08:49 joe__n joined #salt
08:50 remyd1 Hi,
08:50 darxmurf joined #salt
08:50 remyd1 Can anyone help me with slatstack repositories in my state http://paste.debian.net/423151/
08:51 nihe joined #salt
08:51 remyd1 I have a problem with the GPG keys in ubuntu repo
08:51 froztbyte sw: throw Let's Encrypt at it?
08:51 ronnix joined #salt
08:51 cliffstah joined #salt
08:51 Ludo- joined #salt
08:51 froztbyte remyd1: indicate what your problem is, otherwise people won't know where to start looking
08:52 teatime that was going to be my non-answer suggestion, but I figured a non-answer might be annoying
08:52 froztbyte I guess the pain might be that you have to write something to renew that every <=90 days
08:52 remyd1 W: GPG error: http://repo.saltstack.com trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E08A149DE57BFBE
08:53 remyd1 When running my state on my minion
08:53 s_kunk joined #salt
08:53 AirOnSkin joined #salt
08:54 teatime instructions for importing the key are right in the docs on http://repo.saltstack.com
08:54 teatime wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
08:55 froztbyte sw: the suggestion of LE aside, I don't know if you can do that
08:58 remyd1 teatime: I have no problem to install the minion, but it does not work properly when I attempt to do it from a state (I am doing it to upgrade my minion when there is an update of salt code)
08:59 teatime hrm, I don't follow
08:59 west575_ joined #salt
09:01 remyd1 teatime: http://paste.debian.net/423152/
09:02 remyd1 I just need the good URL for the pubkey
09:02 sw froztbyte: i'll see with our infrastructure guys, if i was in charge of vsphere it's been a while those certs would be valid :)
09:02 remyd1 s/pubkey/key url
09:02 remyd1 in the ubuntu definition
09:02 teatime ah, so you did include the info to import the key
09:03 remyd1 yes
09:03 froztbyte sw: sounds like you already have your answer then ;)
09:03 remyd1 Comment: Failed to configure repo 'salt': W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7CDE3A860A53F9FD
09:04 teatime hrm, those are two different keys
09:04 teatime oh because that's a PPA
09:04 remyd1 ahh yes
09:04 sw froztbyte: yeah, but a verify_ssl: False would have been neat for my tests :)
09:07 remyd1 teatime: Comment: Failed to configure repo 'deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main': Error: HTTP 404: Not Found
09:07 remyd1 -_-
09:09 teatime er wtf
09:10 teatime it def. exists
09:11 kbyrne joined #salt
09:12 remyd1 yes I know, and the minion is able to ping google
09:12 remyd1 very strange
09:16 ronnix joined #salt
09:20 remyd1 Ok, this error was due to another package without its public key
09:20 remyd1 gpg key
09:30 kliquori joined #salt
09:30 GreatSnoopy joined #salt
09:33 impi joined #salt
09:37 mavhq joined #salt
09:42 mavhq joined #salt
09:48 fracklen joined #salt
09:55 cpowell joined #salt
09:59 flowstate joined #salt
10:02 ronnix joined #salt
10:03 traph joined #salt
10:06 Antiarc joined #salt
10:10 orion__ joined #salt
10:14 ronnix_ joined #salt
10:16 antpa joined #salt
10:18 antpa Is anyone familiar with ruby gem states?  I seem to be having an intermittent with installing gems across some of our workstations.  All run on ubuntu 14.04.  Here's my gem state and error log: https://gist.github.com/anthonyscolaro/6d06588c127bce5589d73fb0bde7827f
10:26 lero joined #salt
10:28 mavhq joined #salt
10:31 kliquori joined #salt
10:40 nHarzilei joined #salt
10:40 nHarzilei hi
10:40 mavhq joined #salt
10:41 iceyao joined #salt
10:41 nHarzilei i'm no native speaker and could use an explanation of the meaning of "dunder dictionaries". i googled about it and it appears to be about "sugar canes", so i guess it is "convenience syntactic sugar". is the technique specific to salt? is the name of the technique specific to the salt development community?
10:43 teatime dunder comes from "double underscore"
10:43 teatime it's a python thing
10:44 teatime https://wiki.python.org/moin/DunderAlias
10:44 rogst joined #salt
10:44 nHarzilei ah, thanks, that encouraged me to search further and indeed i found ... .oO( ^W^W^W ) your mentioned url
10:46 mavhq joined #salt
10:47 ravenx left #salt
10:48 ronnix joined #salt
10:51 mavhq joined #salt
10:52 msn joined #salt
10:53 flowstate joined #salt
10:54 amcorreia joined #salt
10:55 JohnnyRun joined #salt
10:58 JohnnyRun joined #salt
11:01 fracklen joined #salt
11:06 josuebrunel joined #salt
11:07 JohnnyRun joined #salt
11:09 josuebrunel joined #salt
11:09 cyteen_ joined #salt
11:10 AirOnSkin joined #salt
11:12 AndrewPashkin joined #salt
11:12 rburkholder joined #salt
11:13 zer0def joined #salt
11:16 kawa2014 joined #salt
11:17 iceyao joined #salt
11:26 JohnnyRun joined #salt
11:29 mavhq joined #salt
11:48 mavhq joined #salt
11:53 flowstate joined #salt
11:57 cpowell joined #salt
11:57 rem5 joined #salt
12:01 sfxandy if I want to define/create a dictionary in Jinja i.e. with a {% set ... %}, how do I do it?
12:02 AndreasLutro set mydict = { 'foo': 'bar' }
12:02 sfz- joined #salt
12:03 sfxandy thanks AndreasLutro
12:03 mavhq joined #salt
12:11 punkoivan joined #salt
12:12 punkoivan joined #salt
12:12 punkoivan left #salt
12:17 kliquori joined #salt
12:27 mavhq joined #salt
12:27 felskrone1 joined #salt
12:29 dgutu joined #salt
12:30 hasues joined #salt
12:35 akhter joined #salt
12:35 akhter joined #salt
12:36 morissette joined #salt
12:37 akhter_1 joined #salt
12:38 hasues left #salt
12:42 linjan joined #salt
12:47 zer0def joined #salt
12:50 evle joined #salt
12:51 fracklen joined #salt
12:52 joe__n joined #salt
12:53 antpa joined #salt
12:53 msn joined #salt
12:54 ronnix joined #salt
12:55 Rumbles joined #salt
12:58 sjorge joined #salt
12:58 sjorge joined #salt
13:04 Wospy joined #salt
13:05 Wospy left #salt
13:06 CampusD joined #salt
13:07 CampusD Hi all, I just had a question about embedding a jinja var into a pillar path
13:07 TaiSHi joined #salt
13:07 CampusD Let's say I have "{% for some_var_a, details in pillar.get('some-pillar-dict', {}).items() %} "
13:07 kliquori joined #salt
13:08 CampusD I want to insert "some_var_a"
13:08 CampusD would this work? "{% set some_var_b = pillar['other-pillar-dic']['some_var_a']['protocol'] %}"
13:08 CampusD any help is appreciated
13:09 AndreasLutro yes, just remove the quotes around some_var_a
13:09 CampusD perfect, thanks so much
13:14 akhter joined #salt
13:16 akhter_1 joined #salt
13:16 kbaikov joined #salt
13:17 numkem joined #salt
13:17 subsignal joined #salt
13:19 dariusjs_ joined #salt
13:19 hasues joined #salt
13:20 hasues left #salt
13:24 Tertain joined #salt
13:25 flowstate joined #salt
13:25 mavhq joined #salt
13:27 dariusjs joined #salt
13:28 josuebrunel joined #salt
13:29 ronnix_ joined #salt
13:29 flowstate joined #salt
13:31 mavhq joined #salt
13:34 mavhq joined #salt
13:35 mavhq joined #salt
13:36 tkharju joined #salt
13:38 riftman joined #salt
13:40 akhter joined #salt
13:41 akhter_1 joined #salt
13:41 spiette joined #salt
13:42 RandyT_ joined #salt
13:44 akhter joined #salt
13:45 flowstate anyone here at the moment use the boto states?
13:45 flowstate my machines are immediately failing and stopping, but I don't see how to set disable rollback, so I can't check the cloud init logs and see what failed
13:45 mavhq joined #salt
13:46 mpanetta joined #salt
13:48 akhter_1 joined #salt
13:48 quix joined #salt
13:51 cpowell joined #salt
13:52 akhter joined #salt
13:53 mavhq joined #salt
13:53 edrocks joined #salt
13:53 shiriru joined #salt
13:57 shoemonkey joined #salt
13:59 mavhq joined #salt
13:59 edrocks joined #salt
14:00 jerredbell joined #salt
14:00 ronnix joined #salt
14:02 mavhq joined #salt
14:02 anmol joined #salt
14:02 akhter joined #salt
14:04 mavhq joined #salt
14:07 akhter_1 joined #salt
14:08 remyd1 Does anyone know can I apply a state from another directory ? For example I have formulas in /srv/salt/test and I want to include states from /srv/salt/test/foo and /srv/salt/bar in it.
14:09 akhter joined #salt
14:09 iceyao joined #salt
14:11 mavhq joined #salt
14:13 akhter joined #salt
14:14 mavhq joined #salt
14:14 Muchoz joined #salt
14:18 flowstate directory.path.state
14:18 flowstate so bar.state
14:18 flowstate and foo.state
14:18 flowstate starting from the file_roots you set in the config
14:18 flowstate not a relative path
14:19 flowstate you CAN use relative paths, which start with a . but I wouldn't suggest it
14:19 cpowell joined #salt
14:19 DammitJim joined #salt
14:20 GreatSnoopy joined #salt
14:20 mavhq joined #salt
14:20 barajasfab joined #salt
14:21 andrew_v joined #salt
14:21 kaptk2 joined #salt
14:24 alvinstarr joined #salt
14:27 ronnix_ joined #salt
14:28 remyd1 ok thx flowstate
14:28 flowstate no probs
14:29 shoemonkey joined #salt
14:32 Brew joined #salt
14:32 XenophonF babilen, regarding XML and templates, here's the direction i'm heading now
14:33 XenophonF Pillar example - https://github.com/irtnog/shibboleth-formula/blob/master/pillar.example#L93
14:33 XenophonF XML template - https://github.com/irtnog/shibboleth-formula/blob/master/shib/sp/files/shibboleth2.xml
14:33 XenophonF it's a work in progress
14:34 XenophonF it's a bit tricky to render the file so that both the template and the resulting XML look right
14:38 slav0nic joined #salt
14:41 ronnix joined #salt
14:42 babilen XenophonF: I still don't quite understand why you don't built the XML programmatically in Python and simply write it once you are done with it.
14:44 kliquori joined #salt
14:45 fracklen joined #salt
14:46 racooper joined #salt
14:47 mavhq joined #salt
14:48 xurong joined #salt
14:49 armguy joined #salt
14:51 iceyao joined #salt
14:53 XenophonF babilen: because then the pillar data looks like this - https://github.com/irtnog/shibboleth-formula/blob/9a409262f5deed53d816ffcbcca228260b88c259/shib/sp/files/shibboleth2.yaml
14:53 felskrone joined #salt
14:54 alvinstarr joined #salt
14:54 nZac joined #salt
14:55 XenophonF and because some elements can appear more than once, which isn't easy to represent in YAML
14:55 XenophonF anyway, I couldn't figure it out
14:56 XenophonF i mean, the whole render-dict-to-XML thing, that's pretty easy using elementree or whatever
14:57 XenophonF but how to represent the data in the first place, in a way that's easy for people who are not me (e.g., me in six months) to comprehend---that's where i was stuck
14:57 mavhq joined #salt
15:00 andrew_v_ joined #salt
15:01 rem5 joined #salt
15:04 akhter_1 joined #salt
15:06 akhter joined #salt
15:07 mavhq joined #salt
15:09 orion__ Does anyone know why there is a Consul execution module but no state module?
15:12 akhter_1 joined #salt
15:12 fracklen joined #salt
15:14 spuder joined #salt
15:14 rem5 joined #salt
15:17 akhter joined #salt
15:17 _JZ_ joined #salt
15:17 opdude_ orion__: That happens a lot :) people make modules and then just use them with the module.run as a state....
15:18 fracklen joined #salt
15:19 zahna left #salt
15:19 mavhq joined #salt
15:20 punkoivan joined #salt
15:20 punkoivan left #salt
15:21 ecdhe A command module but no state module always confused me when I was new to salt as well.  "I came here for the states, man!"
15:22 mavhq joined #salt
15:22 ecdhe Seems like it could save effort if there was a canonical way for a command module to automatically become a first-class state module instead of having to be addressed by module.run.
15:22 anmol joined #salt
15:23 opdude_ could be nice I guess but I don't know what more it would offer over just using module.run anyways
15:26 akhter_1 joined #salt
15:27 akhter joined #salt
15:28 mapu joined #salt
15:30 akhter_1 joined #salt
15:32 Nazca__ joined #salt
15:33 west575 joined #salt
15:34 akhter joined #salt
15:34 amcorreia joined #salt
15:42 digitalhero joined #salt
15:45 digitalhero joined #salt
15:47 ronnix_ joined #salt
15:47 Rumbles joined #salt
15:48 mapu joined #salt
15:50 onlyanegg joined #salt
15:51 AndreasLutro depends on what you're doing.. if you replaced your user.present states with module.runs of user.create you'd have duplicate users everywhere
15:55 fracklen joined #salt
15:56 cyborglone joined #salt
16:00 DammitJim joined #salt
16:01 ronnix joined #salt
16:01 beardedeagle joined #salt
16:07 quix_ joined #salt
16:12 hackel joined #salt
16:14 Rumbles joined #salt
16:14 Tertain joined #salt
16:16 akhter_1 joined #salt
16:17 hightekvagabond joined #salt
16:17 digitalhero joined #salt
16:18 flowstate joined #salt
16:19 akhter joined #salt
16:20 nat0 left #salt
16:22 akhter_1 joined #salt
16:26 akhter joined #salt
16:29 flowstate joined #salt
16:29 akhter_1 joined #salt
16:29 digitalhero joined #salt
16:32 hightekvagabond joined #salt
16:35 ageorgop joined #salt
16:38 aharvey joined #salt
16:42 akhter joined #salt
16:45 digitalhero joined #salt
16:54 garphy joined #salt
16:58 scoates joined #salt
16:59 rm_jorge joined #salt
17:00 josuebrunel joined #salt
17:01 baweaver joined #salt
17:03 cyteen_ joined #salt
17:04 brotatochip joined #salt
17:08 beardedeagle joined #salt
17:15 nZac joined #salt
17:16 cpowell joined #salt
17:18 aharvey joined #salt
17:21 paydro joined #salt
17:22 flowstate joined #salt
17:26 digitalhero joined #salt
17:26 UtahDave joined #salt
17:33 Rumbles joined #salt
17:33 brotatochip joined #salt
17:34 forrest joined #salt
17:39 garphy joined #salt
17:40 onlyanegg joined #salt
17:40 djgerm does anybody have a good reactor on new minion ID do a thing (in this case run the ddns module)
17:40 djgerm or an example I can tweeeek
17:44 fracklen joined #salt
17:45 aw110f joined #salt
17:49 ajw0100 joined #salt
17:51 orion__ I've seen states that have one dict key such as "sshd" with multiple state modules within. what happens if you have multiple state modules within the same key?
17:51 orion__ For example, what if you had two file.managed states under an sshd dict key in sshd/init.sls?
17:52 mapu_ joined #salt
17:55 flowstate djgerm: would it hurt to run the ddns module more than once per new minion?
17:55 flowstate because you could then use the minion start event
17:56 flowstate that runs the first time a new minion connects, but it will run more than just that one time
17:56 source47 joined #salt
17:56 flowstate though I'm not sure of the exact frequency
17:57 flowstate you could also, on start event, add the minion id to a list you save in a file somewhere. Then, if the minion id already exists, just exit
17:57 s_kunk joined #salt
17:57 source47 hi guys, how can i prevent salt from having to redownload the file each time it goes through for testing it? eg https://gist.github.com/developerinlondon/5b9ea17d97814331c629bd90e6726195
17:57 flowstate either that, or define a custom event as part of your minion bootstrapping
17:57 flowstate then make a simple reactor for that
17:57 source47 this becomes really slow every time
17:57 source47 as the file takes a while to download and check hash
17:58 flowstate how often does that file change?
17:58 source47 flowstate: hardly ever
17:58 om joined #salt
17:59 source47 its just downloading an image
17:59 Zachary_DuBois joined #salt
17:59 flowstate then have a state scheduled daily, which downloads the image to a known location on your disc
17:59 flowstate turn the state you posted into file.copy
17:59 flowstate from that known location to the testing location
17:59 source47 ah i see.
18:00 flowstate might not be the most elegant solution, but should work
18:00 impi joined #salt
18:00 digitalhero joined #salt
18:01 source47 i was thinking if there was a way to download the hash somehow and check that first
18:01 source47 and only download the file if the hash is not the same anymore
18:01 AndreasLutro that's what file.managed does
18:01 source47 well it downloads the whole file
18:01 AndreasLutro if it keeps re-downloading, it means the file it's downloaded doesn't match the hash
18:01 flowstate ^that's what I thought
18:01 source47 i can remotely host the hashsum also
18:02 AndreasLutro you should probably do that
18:02 source47 well it says it didnt redownload, but it spends a long time
18:02 AndreasLutro source_hash accepts an url
18:02 AndreasLutro mmm ok
18:02 AndreasLutro I would double-check that and check the hashsum of the file manually
18:02 baweaver joined #salt
18:03 dmaiocchi joined #salt
18:03 UtahDave orion__: the salt state compiler will complain and stop if you have two `file.managed` keys under the same ID declaration
18:04 djgerm flowstate: thanks. Yeah DDNS can run infinite times, no issue. so new minion connects is a good event to trigger on
18:04 orion__ I see.
18:04 SaltyWaterBoston joined #salt
18:04 flowstate k djgerm, lemme pull up the documentation I used to set up my reactor
18:04 flowstate one sec
18:04 orion joined #salt
18:04 djgerm thanks!!!
18:05 fracklen joined #salt
18:08 source47 well file.copy is not working with a URL
18:08 source47 all i needed to do is only manage the file if it didnt already exist
18:08 source47 i am not so bothered about the hashsum
18:08 SaltyWaterBoston salt engineer position open-- boston, ma
18:09 baweaver joined #salt
18:10 cb joined #salt
18:15 beardedeagle wait, there are discount codes for registration with saltconf?
18:15 beardedeagle how do you get yourself one of those?
18:17 CampusD joined #salt
18:21 ronnix joined #salt
18:21 CampusD question, is this a valid include?  - path.to.my.dir.* to include all state/pillar files in the dir
18:26 beardedeagle any saltstack employees lurking? have saltconf questions.
18:28 amcorreia joined #salt
18:28 forrest beardedeagle, talk to jfindlay
18:29 UtahDave beardedeagle: here!
18:29 beardedeagle Woot
18:29 beardedeagle do you know what time the conference ends on the 21st? booking everything right now
18:30 UtahDave I think everything is mostly wrapped up at 5:30pm
18:30 UtahDave Yeah, that's what the agenda is saying
18:31 jfindlay beardedeagle: did you get the code?
18:32 beardedeagle I dont even know how you get a discount code. I assume you have to be a SSE customer or something
18:33 beardedeagle werd, @UtahDave, looks like I am flying out the next day then
18:33 UtahDave beardedeagle:   use this code  SALTUSER213X  for 200 bucks off
18:34 beardedeagle thank you sir, that worked
18:34 UtahDave :)
18:34 mapu_ joined #salt
18:36 Rumbles joined #salt
18:37 fracklen joined #salt
18:40 ronnix joined #salt
18:41 beardedeagle so many conflicting dates though. meh, booking for 18th through 22nd should get me fine
18:44 MindfulMonk joined #salt
18:46 punkoivan joined #salt
18:46 punkoivan left #salt
18:46 digitalhero joined #salt
18:47 numkem joined #salt
18:52 GreatSnoopy joined #salt
18:53 edrocks joined #salt
18:53 josuebrunel joined #salt
18:54 Rumbles joined #salt
18:59 fracklen joined #salt
19:00 beardedeagle registered, thanks again @UtahDave and @jfindlay
19:01 jfindlay cool
19:05 akhter joined #salt
19:21 UtahDave beardedeagle: you're welcome!
19:23 quix joined #salt
19:25 ageorgop joined #salt
19:26 jfindlay quiet day today
19:26 forrest Yep
19:26 jfindlay everybody must be on spring break
19:27 jfindlay there were only three new issues this morning
19:27 forrest It's Friday, no one has deadlines to hit today so they aren't spamming for help ;)
19:29 quasiben joined #salt
19:30 beardedeagle @jfindlay: do you want issues? I have mako issues out the ass I could throw at you lol.
19:32 jfindlay beardedeagle: I'm sure of it :)
19:32 andrew_v_ joined #salt
19:34 jerredbell joined #salt
19:35 rain_osborne joined #salt
19:35 garphy joined #salt
19:36 brotatochip joined #salt
19:38 mapu_ joined #salt
19:39 rain_osborne i'm trying to listen for events that arrive from the master on a minion - the eventlisten.py example listens, but only sees events that are generated on a minion. What can I do to see the events arriving from the master?
19:39 djgerm flowstate: any luck digging up them there docs you mentioned?
19:40 DammitJim joined #salt
19:40 flowstate yep, sry, got pulled into a meeting
19:40 flowstate https://docs.saltstack.com/en/latest/topics/reactor/#mapping-events-to-reactor-sls-files
19:40 flowstate the top event is the minion start
19:41 flowstate so I added that, put in a 'start.sls' in /srv/salt/reactor
19:41 flowstate and then just put my states in there
19:41 flowstate MAKE SURE you look at the debugging section below before you go charging off to implement
19:41 flowstate I'm totally not telling you that because I wasted more than a single hour before seeing that info
19:41 flowstate nope. definitely not
19:42 djgerm hehehe ok thanks
19:42 flowstate np, holler if you have any issues
19:42 flowstate DM me
19:42 forrest flowstate, djgerm I have a working example as well here: https://github.com/gravyboat/docka-docka-docka/tree/master/docka-salt
19:42 flowstate or just be all smart and use his code. where were you yesterday, forrest!?!
19:43 forrest I was around, probably just wasn't reading the chat.
19:43 djgerm it was this morning
19:43 DammitJim man, this is driving me nuts
19:44 forrest I've only been around for 3 hours or so, one of the joys of being unemployed is you don't wake up super early.
19:44 DammitJim I don't understand why one of my minions is running a state that I haven't assigned in the top file
19:44 DammitJim is there a way to troubleshoot this efficiently?
19:44 forrest DammitJim, Did you already clear out the cache?
19:44 DammitJim the cache on the master?
19:44 DammitJim it's a new server
19:44 DammitJim (new minion)
19:44 forrest ahh
19:45 DammitJim this is crazy and it's driving me nuts
19:46 djgerm my motto is "The working man is a sucker." but maybe I'm old fashioned.
19:46 DammitJim at least it's running the state I want it to run, but I don't see any place where I'm defining that
19:46 forrest I mean, a paycheck IS pretty nice.
19:46 DammitJim I'm a sucker... I knew that already
19:48 AndreasLutro DammitJim: are you using gitfs? or environments in general?
19:48 DammitJim no
19:48 DammitJim that's why this is so frustrating... this should be super simple
19:49 AndreasLutro if you run salt-call state.show_top, does the state you don't want to be run show up?
19:49 DammitJim ooohhh... interesting
19:49 DammitJim let me see
19:49 AndreasLutro or salt name-of-minion state.show_top
19:49 baweaver joined #salt
19:50 DammitJim it does!!!
19:50 jfelchner joined #salt
19:50 DammitJim ok, this might be a REGEX that I have or whatever you call it
19:50 DammitJim that is not working right in my top.sls
19:50 spiette left #salt
19:50 AndreasLutro quite possible
19:50 DammitJim this is very helpful because it shows other states that weren't running just because I had no pillar for them
19:50 DammitJim thank you so much!
19:51 DammitJim yup, I found it
19:52 DammitJim this is my pcre: nsapps[2,4,9](0|1)1*.*.com
19:52 DammitJim the server I was calling was nsapps202test.example.com
19:52 DammitJim I couldn't understand why that pcre match was picking it up
19:53 subsignal joined #salt
19:53 DammitJim still can't... will need to read up on that
19:53 teatime it's not pcre or any kind of regex
19:53 teatime it's globbing, specifically python fnmatch globbing
19:53 DammitJim oh, python fnmatch
19:53 DammitJim I can't mix globbing with regex?
19:54 teatime mmmm, there is regex available as an advanced/combined match type
19:54 teatime but you have to ask for it explicitly
19:54 teatime the default is globs
19:54 teatime if you've asked for regexes, forgive me
19:54 DammitJim teatime, this is in my top.sls btw
19:55 teatime the globbing doesn't have alternation (the "|") though
19:55 DammitJim right!
19:55 DammitJim that's probably my issue
19:55 ageorgop joined #salt
19:55 teatime also I think the syntax is [249] rather than [2,4,9]
19:55 UtahDave rain_osborne: a minion can't listen to events from the master
19:57 mapu_ joined #salt
20:00 beardedeagle So I will ask here before filing a bug: has anyone here tried to use mako in their pillars and were you successful.
20:01 rain_osborne UtahDave: interesting. how does the minion receive jobs or other information?
20:01 jeffspeff joined #salt
20:01 digitalhero joined #salt
20:01 rain_osborne from master I can see events with 'tgt': <minionid> going
20:05 DammitJim can I do something like *xp*34*.example.com ?
20:05 teatime yes
20:06 UtahDave rain_osborne: the minion listens to the master's pub port for jobs to run.
20:06 teatime there is regexes, you just have to specify that
20:06 UtahDave rain_osborne: events on the minion flow up to the master, so that's why on the master you can see the minion's events
20:09 teatime and you can mix different kinds of match in one OR statement
20:09 teatime but you have to specify that, too
20:11 cilkay AndreasLutro: I've been looking for a way to tell which state is currently running on a masterless minion. You just suggested salt name-of-minion state.show_top a few minutes ago and I tried salt-call --local state.show_top. That showed me that state.highstate was running with a certain PID.
20:12 cilkay Do you know if there is a way to tell which state is being within highstate?
20:12 DammitJim weird... do I need to escape backslashes?
20:13 AndreasLutro cilkay: you can't know which state is currently running, you'd have to strace the salt-call process or something
20:15 hasues joined #salt
20:15 hasues left #salt
20:16 aharvey joined #salt
20:17 BonesMcCoy DammitJim, I'm a doctor not a regular expressions expert!
20:17 DammitJim I'm definitely not a regex expert... I'm reading up on it now
20:17 DammitJim Bones!
20:17 DammitJim lol
20:18 flowstate anyone have a good strategy for programmatically removing dead minions?
20:18 flowstate something like "if it hasn't been connected once in the last hour, delete"
20:18 flowstate or something?
20:19 orion XenophonF: How do you handle situations where multiple nodes need access to the same pillar value, such as a DB password (shared by the DB and the app)?
20:19 DammitJim flowstate, I like that
20:19 flowstate apparently time since last checkin isn't managed
20:19 flowstate I think you'd have to have a reactor that, on checkin (start or auth event?) updated a file with the timestamp
20:19 flowstate the closest we have is
20:20 flowstate salt-run manage.down removekeys=True
20:20 rain_osborne UtahDave: thanks for explanation. is there a doc i can read more about intricacies communication? this wasn't apparent from events page in the docs.
20:20 flowstate related docs here https://github.com/saltstack/salt/issues/13141
20:20 saltstackbot [#13141]title: Method to delete keys belonging to old dead minions | A method is needed to delete keys from old minions that haven't connected to the master in $x minutes/seconds....
20:20 rem5 joined #salt
20:21 cilkay AndreasLutro: OK, thanks. I came up with a hack. I call each of the states individually in a shell script as opposed to calling highstate and push a message into a Redis queue.
20:21 cilkay ... for each state
20:21 AndreasLutro yuck
20:21 DammitJim is there a way to double check the syntax of a pillar file?
20:22 AndreasLutro flowstate: you'd probably want to use an event returner to store events in a database, then do a query to find minions that haven't sent any pings within the last hour
20:23 AndreasLutro definitely not something that's available out of the box
20:23 cilkay AndreasLutro: Not much choice until there is a way to have reactors working in masterless minions in an official release.
20:23 garphy joined #salt
20:23 rain_osborne UtahDave: what could i do for an app to be aware of events that happened on a diffrerent system? currenlty i am emititng on one minion, catching and firing again with a reactor and hoping to see something on the minion.
20:23 rain_osborne peer communication?
20:24 AndreasLutro cilkay: what exactly do you need to achieve?
20:24 hightekvagabond joined #salt
20:24 AndreasLutro if you just want to know which state is currently running... reactors won't really help you
20:24 joe__n joined #salt
20:24 cilkay I need to provide updates on a web page what is going on in the VM that is being provisioned.
20:25 cilkay Right now, I'm writing strings to /etc/issue and killing agetty, which is an ugly hack.
20:26 AndreasLutro salt is very much designed in a way that makes that difficult/impossible
20:26 cilkay E.g. "Configuring networking", "Configuring PostgreSQL".
20:26 cilkay I've noticed, which is why I've resorted to an external solution.
20:27 cilkay Do states run sequentially or can they run in parallel?
20:27 AndreasLutro sequentially, unless you've specified otherwise
20:27 cilkay I haven't so the hack I described above should work reliably.
20:28 XenophonF orion: I assign the pillar SLS containing the shared credential to all of the minions that need it.
20:29 XenophonF orion: like say i'm running wordpress - I'll have a Pillar SLS named "blog/example/com/init.sls" a/k/a "blog.example.com" in top.sls
20:29 StolenToast I'd like to check a value in /sys and do (something) if it's an expected value.  Can anyone tell me the easiest way to do so with jinja?
20:30 XenophonF and it has all of the settings needed by the wordpress servers in it
20:32 orion XenophonF: And you use, say, a list compound matcher in your pillar top file?
20:34 beardedeagle The problem with using an alternate renderer is non existent docs or no one uses it to be able to ping things off of.
20:34 XenophonF orion: like this - https://github.com/irtnog/salt-pillar-example/blob/master/top.sls#L54
20:35 orion XenophonF: But nothing is shared there. Those are just host specific pillar files.
20:36 orion I'm talking about separate servers needing access to the same pillar data.
20:37 brotatochip joined #salt
20:41 armguy joined #salt
20:43 XenophonF orion: look again - https://github.com/irtnog/salt-pillar-example/blob/master/top.sls#L89
20:43 XenophonF sorry had to push some changes
20:44 XenophonF more than one minion can be assigned a pillar SLS
20:45 XenophonF so put those pillar keys/values shared among minions into one SLS file and assign it to the minions that need it
20:45 XenophonF i try to make it look pretty with the directory and SLS names
20:50 buddyp450 joined #salt
20:54 orion XenophonF: I see.
20:54 orion So, I'm doing something like 'L@foo??-dev,bar??-dev': match:compound ...
20:55 baweaver joined #salt
20:56 UtahDave cilkay: you can enable state events which will send an event to the salt master for each event.
20:57 UtahDave rain_osborne: In that situation I'd have the master do something when you see a certain event.  So for example:    minion A sends event foo.  Reactor on salt master sees event from minion A and then tells minion B to do some action
20:59 cpowell joined #salt
21:01 XenophonF i wish there was an easier way to debug templates
21:03 ageorgop joined #salt
21:07 digitalhero joined #salt
21:12 DammitJim dammit... is my spacing supposed to be 2 or 4 characters in my pillar files?
21:12 DammitJim I'm assuming pillar is basically yaml?
21:13 AndreasLutro if you use the default renderer, yes - 2 spaces
21:14 DammitJim AndreasLutro, not sure if you use vim, but is there a yaml checker?
21:14 DammitJim or something that can show proper spacing?
21:14 AndreasLutro no idea
21:15 forrest DammitJim, Use 2 and https://github.com/saltstack/salt-vim
21:15 forrest it will give you the correct indenting at least.
21:15 forrest no yaml checker though sadly
21:19 AndreasLutro apparently I am the only person who finds yaml consistent and easy to write
21:19 buddyp450 i highly doubt that
21:20 brotatochip joined #salt
21:22 DammitJim AndreasLutro, it is
21:22 DammitJim this is to help my pupil
21:24 DammitJim I wonder if I have something else overriding my tab to 2 spaces now with salt-vim
21:24 DammitJim oh, 2 spaces is only for sls files
21:24 cilkay UtahDave: I don't have a salt master. We only deploy masterless minions.
21:24 DammitJim not yml files
21:25 hightekvagabond joined #salt
21:25 beardedeagle @AndreasLutro: do you know if the space req is different for mako in pillars?
21:25 digitalhero joined #salt
21:25 cilkay Does it make any difference if it's 2 spaces or 4 spaces as long you're consistent?
21:26 DammitJim cilkay, I think that's defined in the renderer
21:26 UtahDave cilkay: so you're using masterless and want to be aware of events on other masterless minions?
21:26 cilkay It works with 4 spaces here.
21:26 DammitJim oh
21:26 DammitJim what does?
21:26 cilkay YAML and .sls files
21:26 AndreasLutro beardedeagle: mako is used to render yaml, so yaml whistespace rules still apply
21:27 beardedeagle so doesnt matter, just be consistant
21:27 AndreasLutro yaml is pretty good at guessing how many spaces you use for indentation
21:27 DammitJim didn't know that
21:27 DammitJim that's great
21:28 AndreasLutro you don't even need to be consistent http://yaml-online-parser.appspot.com/?yaml=one%3A%0A+two%3A%0A+++three%3A%0A++++++++four%3A%0A+++++++++++++++++++++++++five%3A%0A++++++++six%3A%0A+++seven%3A%0A+eight%3A&amp;type=json
21:28 AndreasLutro (you still should though)
21:28 beardedeagle lol
21:29 UtahDave I recommend using 2 spaces in yaml with Salt though. It will save you many headaches from hitting weird edge cases with yaml
21:29 UtahDave yaml is actually a huge specification for doing all kinds of weird things. Salt uses a small subset
21:31 cilkay UtahDave: I only need to know within the VM that is being provisioned which state is being executed.
21:31 beardedeagle I was hoping for magic, mako pillars be broken
21:32 UtahDave cilkay: if you enable state events, then an event will be sent on the minion's event bus for every event
21:32 MindDrive joined #salt
21:35 cilkay Ultimately, I need to be able to capture those events and push them out to a web page on the same VM. The Redis solution I described earlier serves that purpose. I'll take a look at enabling state events.
21:36 cilkay I had looked at this and was told this wouldn't work in masterless minions.
21:37 flowstate joined #salt
21:37 UtahDave Hm. I could be wrong on that, but I'd give it a try
21:38 Agustin joined #salt
21:38 Agustin hi everryone!
21:38 UtahDave hey!
21:38 twork_ joined #salt
21:39 Agustin I need a hand with salt and the usage of gitfs. Does anyone know anything about that?
21:39 Agustin I mean, I have it set up correctly (i think). I just need guidance on how to use it correctly
21:39 UtahDave OK, describe your setup
21:40 Agustin ok
21:41 Agustin i'm trying to deploy salt to deploy sensu and sensu checks to clients
21:41 Agustin so far, i'm working on a lab i've created with ec2
21:41 cilkay UtahDave: The (very sparse) docs suggests that it should be possible to use events in masterless minions. I couldn't make head or tail of the docs so I went with an external hack - using redis-cli to push messages into Redis and having Django listen to those messages and react accordingly.
21:42 digitalhero joined #salt
21:42 Agustin this is my fileserve.conf file
21:43 Agustin under /etc/salt/master.d
21:44 Agustin mmm if i paste http://pastebin.com/E2fuNtQc
21:45 UtahDave Agustin: did you restart your salt-master after modifying the config file?
21:46 Agustin yes, the git set up is working. I dont have a clue on how to use the states i put on git
21:46 UtahDave cilkay: It's my understanding that you can use reactors on a masterless minion based on events happening on the minion
21:46 Agustin that's my problem
21:46 UtahDave salt \* state.sls mystatefile
21:46 cilkay UtahDave: Not yet but it will be soon according to this: https://github.com/saltstack/salt/issues/15265
21:46 saltstackbot [#15265]title: Bring reactor system to minions | Right now reactors are a master-only feature, but it would be really nice to be able to react locally to events, especially if not using a master. For instance, it would be really awesome to react to udev events or to etcd events.
21:46 UtahDave do you see your states that are in your git repo when you run   salt \* cp.list_master
21:48 UtahDave cilkay: ah, ok.
21:48 Agustin yes,
21:48 Agustin i can see them
21:49 UtahDave Agustin: ok, then now you can use them like any state.  The minions don't know they are coming from git
21:49 jean-michel joined #salt
21:49 Agustin so if i want to use a formula from the git repo, i just use it? Cause when i use file_root, i have to specify where the formulas are
21:50 Agustin but i have no idea if i have to do the same thing when using gitfs
21:51 Agustin with file_root, i just did something like this
21:51 UtahDave well, the git directory structure is essentially overlayed over what you would have had in file_roots
21:51 jean-michel hi.  anyone know the proper way to pass a pillar to the salt api.  The following command is failing:
21:51 jean-michel curl -ksi https://salt1:9998/run -H "Accept: */*" -d client=local -d fun=pillar.get -d tgt='myhost.at.my.company.com' -d arg=config -d username=saltgod -d password='redacted' -d eauth=pam -d pillar={"sysctl": {"net.core.netdev_max_backlog": "1000000", "net.core.rmem_max": "33554432"}}}
21:52 UtahDave so if you have a directory in the root of your git repo  like this    mysql/client.sls
21:52 UtahDave then you would run   salt '<minion id>' state.sls mysql.client
21:52 baweaver joined #salt
21:52 stanchan joined #salt
21:52 Agustin cool. I think i got the idea mmm
21:53 Agustin its the same thing when I write my own sls files right?
21:53 brotatochip After playing with saltstack for 2 hours I feel like the biggest asshole in the world for ever using puppet for anything...
21:53 Agustin lol
21:53 jean-michel typo above: the command is: curl -ksi https://salt1:9998/run -H "Accept: */*" -d client=local -d fun=pillar.get -d arg=sysctl -d tgt='myhost.my.company.com' -d username=saltgod -d password='redacted' -d eauth=pam -d pillar='{"sysctl": {"net.core.netdev_max_backlog": "1000000", "net.core.rmem_max": "33554432"}}}'
21:54 jean-michel I expect to see a pillar output, but just get {"return": [{"myhost.my.company.com": ""}]} instead
21:54 jean-michel any ideas?
21:55 UtahDave Agustin: yep
21:56 Agustin UtahDave: is this the correct way to use the formulas i have on my repo then? http://pastebin.com/SDgX0Kch
21:56 UtahDave Agustin: yep!
21:56 Agustin awesome
21:57 UtahDave jean-michel: that can be tricky. Could you ask on the salt-users mailing list?  I'll point someone here internally at your question.
21:59 Agustin Thanks UtahDave! This is what I needed.
22:00 UtahDave You're very welcome, Agustin
22:02 hightekvagabond joined #salt
22:06 djgerm what populates name in this data jinja? {{ data['name'] }} Do I need to have a set name before I use that? reading https://docs.saltstack.com/en/latest/topics/cloud/reactor.html
22:07 beardedeagle it's a dict
22:08 beardedeagle so you would need { data: { name: 'someting'} }
22:09 djgerm this is one of the things I am consistently confused on: how do I get grain data in their?
22:09 beardedeagle can you gist whatever it is you are trying to do?
22:10 rem5 joined #salt
22:10 beardedeagle so that is talking about passing in event data
22:10 beardedeagle which would already have name in it
22:11 beardedeagle sorry should have looked at the link. it is grabbing that from salt itself when you spin up a minion
22:14 ageorgop joined #salt
22:15 Matum joined #salt
22:15 djgerm and it's just grain IDs right?
22:16 beardedeagle not a grain, but irrelevant. it is raw event data.
22:17 beardedeagle have you ever launched salt-master in debug mode and spun up a cloud instance?
22:17 djgerm no. that sounds noisy :)
22:17 djgerm but the data is what you're talking about there?
22:17 djgerm ok…. yeah I get what you mean
22:21 beardedeagle a good example would be webhooks
22:21 beardedeagle you could do a data.get('headers', {}).get('X-My-Secret-Key') %}
22:22 ninjada joined #salt
22:29 brotatochip joined #salt
22:31 beardedeagle bbiab
22:31 digitalhero joined #salt
22:37 kliquori joined #salt
22:40 zenlot6 joined #salt
22:40 digitalhero joined #salt
22:44 thejrose1984 joined #salt
22:44 baweaver joined #salt
22:44 djgerm I guess really what it comes down to is, I want the grains from the newly created minion, not the event data
22:45 djgerm in the triggered reactor event. I at least see the reactor being triggered.
22:45 djgerm but my reactor state is  bad.
22:52 digitalhero joined #salt
22:53 amcorreia joined #salt
22:55 Agustin joined #salt
23:02 Agustin hello again
23:09 chingadero joined #salt
23:10 djgerm so this is my reactor state
23:10 djgerm https://gist.github.com/anonymous/c1589d5a9726ddf82e599acfef0213c9
23:11 djgerm and I see (when it's not able to be rendered) that it's being triggered on cloud create
23:11 djgerm but in this current state I see no errors and yet it doesnt seem to apply
23:12 beardedeagle joined #salt
23:16 polyidus joined #salt
23:18 hightekvagabond joined #salt
23:19 iceyao joined #salt
23:19 ninjada joined #salt
23:25 chingadero {{ salt['cloud.get_instance'](grains['id']) }} in sls file is returning None for a salt-cloud ec2 instance. Is that because the first item returned by $ salt '*' cloud.get_instance myinstance is from a minion that did not create the instance? Is it possible to pass minion id of the salt-cloud master to cloud.get_instance in an sls file?
23:25 tampakrap left #salt
23:26 chingadero $ salt <minion id of salt-cloud master> cloud.get_instance <myinstance> returns what I'm looking to use in the sls file
23:29 chingadero https://gist.github.com/jbeigh/e18f62230a210c5d1270ea04e50f1dc0/raw/48fc92df8fb39deb130337d1ad3926e581323ad9/test.sls
23:36 CampusD joined #salt
23:38 CampusD hi all, quick question, is there a dynamic way to check whether a state file exists before including it?
23:39 mosu_ joined #salt
23:40 nZac joined #salt
23:42 kliquori joined #salt
23:45 polyidus joined #salt
23:49 Muchoz joined #salt
23:50 chingadero @CampusD I haven't tried it, but does this work? {% if salt['file.file_exists')('<file>') %}
23:51 iggy file_exists checks the local filesystem, includes work out of the salt fileserver
23:51 digitalhero joined #salt
23:56 mapu joined #salt
23:57 rem5 joined #salt

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