Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-10-11

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

All times shown according to UTC.

Time Nick Message
00:01 pipps joined #salt
00:02 nineteen joined #salt
00:03 leev joined #salt
00:03 nicksloan joined #salt
00:08 Brew joined #salt
00:13 nineteen joined #salt
00:16 woodtablet left #salt
00:18 sh123124213 joined #salt
00:22 ekristen joined #salt
00:22 nineteen joined #salt
00:25 abednarik joined #salt
00:29 nZac joined #salt
00:30 nZac_ joined #salt
00:41 nineteen joined #salt
00:44 DEger joined #salt
00:49 pipps joined #salt
00:52 baikal joined #salt
00:52 nineteen joined #salt
00:55 sh123124213 joined #salt
00:55 rem5 joined #salt
00:55 DEger joined #salt
00:55 rem5 joined #salt
01:03 DEger joined #salt
01:03 nineteen joined #salt
01:10 watersoul_ joined #salt
01:10 catpigger joined #salt
01:11 pipps joined #salt
01:11 pipps99 joined #salt
01:12 davidhoude joined #salt
01:12 nineteen joined #salt
01:22 nineteen joined #salt
01:24 John_Kang joined #salt
01:32 nineteen joined #salt
01:38 DEger_ joined #salt
01:40 ntropy joined #salt
01:41 sebastian-w joined #salt
01:46 nineteen joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.8.12, 2016.3.3 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:53 nineteen joined #salt
01:57 mavhq joined #salt
02:00 DEger joined #salt
02:01 nineteen joined #salt
02:02 mpanetta_ joined #salt
02:06 nZac joined #salt
02:08 DEger joined #salt
02:11 nineteen joined #salt
02:18 DEger joined #salt
02:21 nineteen joined #salt
02:28 DEger joined #salt
02:30 pfallenop joined #salt
02:32 nineteen joined #salt
02:34 sqwishy joined #salt
02:37 pipps joined #salt
02:38 DEger joined #salt
02:39 stooj Hmm... can anyone point me in the right direction? I have a jinja template with my username hard-coded in. I'd like to replace it with {{ user }}:
02:39 stooj {{ salt['pillar.get']('syncthing:stooj:port', '1234') }}
02:39 stooj I'm guessing that nesting {{ jinja }} vars won't work
02:42 nineteen joined #salt
02:44 hemebond stooj: You don't need {{ }} within the Jinja tags.
02:46 stooj hemebond: So, {{ salt['pillar.get']('syncthing:user:port', '1234') }} would magically know the 'user' is not a literal string?
02:46 hemebond No
02:47 hemebond {{ salt['pillar.get']('syncthing:' ~ user ~ ':port', '1234') }}
02:47 stooj Ah!! Thanks hemebond :D
02:47 hemebond ūüĎć :-)
02:48 DEger joined #salt
02:48 amontalban joined #salt
02:48 amontalban joined #salt
02:50 alexhayes joined #salt
02:50 evle joined #salt
02:53 nineteen joined #salt
03:00 DEger joined #salt
03:02 nineteen joined #salt
03:08 DEger joined #salt
03:12 nineteen joined #salt
03:26 g3cko joined #salt
03:27 DEger joined #salt
03:31 nineteen joined #salt
03:33 DEger joined #salt
03:36 pipps joined #salt
03:40 pipps joined #salt
03:42 nineteen joined #salt
03:51 nineteen joined #salt
03:53 neilf__ joined #salt
04:00 kihued_ joined #salt
04:03 nineteen joined #salt
04:11 theblazehen_ joined #salt
04:11 nineteen joined #salt
04:14 komputes joined #salt
04:19 pipps joined #salt
04:21 nineteen joined #salt
04:23 ksa joined #salt
04:23 toabi joined #salt
04:23 graffic joined #salt
04:23 dandelo joined #salt
04:24 J0hnSteel joined #salt
04:24 daks joined #salt
04:30 netcho_ joined #salt
04:31 nineteen joined #salt
04:39 sh123124213 joined #salt
04:41 nineteen joined #salt
04:45 sh123124213 joined #salt
04:51 sh123124213 joined #salt
04:51 nineteen joined #salt
04:52 eMBee joined #salt
04:55 sh123124213 joined #salt
04:56 sh123124_ joined #salt
05:00 sh123124213 joined #salt
05:01 nineteen joined #salt
05:03 mikea joined #salt
05:07 sh123124213 joined #salt
05:10 sh123124213 joined #salt
05:11 mikea joined #salt
05:13 nineteen joined #salt
05:17 mohae_ joined #salt
05:17 justan0theruser joined #salt
05:18 onlyanegg joined #salt
05:19 kihued joined #salt
05:21 nineteen joined #salt
05:27 bocaneri joined #salt
05:28 cosming joined #salt
05:30 mikea joined #salt
05:32 nineteen joined #salt
05:36 useruoi joined #salt
05:36 armguy joined #salt
05:41 felskrone joined #salt
05:41 nineteen joined #salt
05:44 mikea joined #salt
05:46 impi joined #salt
05:48 DEger joined #salt
05:51 nineteen joined #salt
06:00 kihued_ joined #salt
06:02 nineteen joined #salt
06:06 ivanjaros joined #salt
06:08 Narfology joined #salt
06:09 zulutango joined #salt
06:11 sh123124213 joined #salt
06:11 nineteen joined #salt
06:30 kihued joined #salt
06:31 netcho_ joined #salt
06:38 hemebond joined #salt
06:40 diegows joined #salt
06:41 nineteen joined #salt
06:43 akw joined #salt
06:44 sgo_ joined #salt
06:44 rem5 joined #salt
06:51 nineteen joined #salt
06:53 onlyanegg joined #salt
06:54 stooj Hi - does anyone have pointers on debugging jinja? I'm getting "None" returned when I get an entry from my pillar, but my syntax looks correct to me
06:54 hemebond stooj: You can render the templates from a Python console.
06:55 stooj Oh wow, how? Presumably on the master?
06:55 hemebond Yeah, or any machine that can access the file.
06:55 hemebond It also depends what you have in the template.
06:56 hemebond If it's a basic template that doesn't rely on Salt stuff, you can just render it directly with Jinja2.
06:56 stooj It's a jinja file that depends on pillar data
06:57 stooj *jinja template in my states repository
06:57 hemebond If it needs Salt stuff you should be able to use salt.utils.templates.render_jinja_tmpl
06:58 hemebond Also, you can you just run your salt-master is debug mode and it should show you the pillar that it's rendered.
06:58 hemebond Which should give you a hint about what your Jinja syntax should be.
06:59 ivanjaros joined #salt
07:01 Electron^- joined #salt
07:03 nineteen joined #salt
07:03 Edur joined #salt
07:06 stooj Thanks hemebond - I'll try running the minion in debug and see if I can figure out why.
07:06 fleaz joined #salt
07:07 Rumbles joined #salt
07:07 hemebond Oh yeah, I think you can use "salt-call -l debug blah" to see the output directly for a particular call.
07:07 hemebond I've not used that method myself.
07:09 Tuxick joined #salt
07:10 nineteen joined #salt
07:13 yuhlw_____ joined #salt
07:16 kihued_ joined #salt
07:17 aidin joined #salt
07:21 kihued joined #salt
07:22 nineteen joined #salt
07:22 toanju joined #salt
07:23 samodid joined #salt
07:29 ronnix joined #salt
07:32 kshlm joined #salt
07:33 west575 joined #salt
07:33 ronnix_ joined #salt
07:35 impi joined #salt
07:35 dariusjs joined #salt
07:36 netcho_ joined #salt
07:48 bocaneri joined #salt
07:51 nineteen joined #salt
07:51 debian112 joined #salt
07:52 mikecmpbll joined #salt
07:53 zulutango joined #salt
08:01 nineteen joined #salt
08:05 jesusaur joined #salt
08:05 wendall911 joined #salt
08:06 smcquay joined #salt
08:07 jacksontj joined #salt
08:09 krymzon joined #salt
08:11 krymzon joined #salt
08:12 nineteen joined #salt
08:13 _KaszpiR_ joined #salt
08:14 samodid joined #salt
08:14 Rumbles joined #salt
08:15 mavhq joined #salt
08:16 geomacy joined #salt
08:20 infrmnt joined #salt
08:20 krymzon joined #salt
08:21 nineteen joined #salt
08:24 keimlink joined #salt
08:25 lero joined #salt
08:31 seet_ joined #salt
08:32 Narfology I have a hostname demox000.eu.example.com (and minion_id from hostname). I want to set a grain that is exactly the first segment of the hostname (e.g. demox000). How can I do that?
08:32 raeven_ joined #salt
08:32 lero__ joined #salt
08:33 dh_ joined #salt
08:33 krymzon_ joined #salt
08:33 xmj_ joined #salt
08:36 filippos_ joined #salt
08:36 dariusjs joined #salt
08:36 Garo__ joined #salt
08:36 jeblair_ joined #salt
08:36 lv_ joined #salt
08:37 elektrix joined #salt
08:39 llua` joined #salt
08:39 sqwishy1 joined #salt
08:39 egilh joined #salt
08:40 arif-ali_ joined #salt
08:40 ange__ joined #salt
08:40 angvp1 joined #salt
08:40 rdrake_ joined #salt
08:41 gnord_ joined #salt
08:42 georgemarshall joined #salt
08:44 davisj joined #salt
08:44 rome_390 joined #salt
08:45 Zachary_DuBois joined #salt
08:45 hoonetorg joined #salt
08:46 wendall911 joined #salt
08:46 west575 joined #salt
08:49 ramblinpeck joined #salt
08:49 gerhardqux joined #salt
08:49 ventris joined #salt
08:49 keimlink joined #salt
08:49 samodid joined #salt
08:49 yuhlw_____ joined #salt
08:49 hemebond joined #salt
08:49 mikea joined #salt
08:49 daks joined #salt
08:49 dandelo joined #salt
08:49 g3cko joined #salt
08:49 wwalker_ joined #salt
08:49 godlike joined #salt
08:49 cryptolukas joined #salt
08:49 synapse_ joined #salt
08:49 Ryan_Lane joined #salt
08:49 twodayslate joined #salt
08:49 antonw joined #salt
08:49 futuredale joined #salt
08:49 nahkiss joined #salt
08:49 samkottler joined #salt
08:49 OliverMT joined #salt
08:49 JamieH joined #salt
08:49 vaelen joined #salt
08:49 esharpmajor joined #salt
08:49 ub1quit33 joined #salt
08:49 xenoxaos joined #salt
08:49 Arendtsen joined #salt
08:49 error_ joined #salt
08:49 baffle_ joined #salt
08:49 McNinja joined #salt
08:49 evilrob joined #salt
08:49 shalkie joined #salt
08:49 izibi joined #salt
08:49 esc\ joined #salt
08:49 _workthrick joined #salt
08:49 skr0bul joined #salt
08:49 basepi joined #salt
08:49 al joined #salt
08:49 djural joined #salt
08:49 WKNiGHT joined #salt
08:49 jor joined #salt
08:49 ThomasJ joined #salt
08:50 ramblinpeck joined #salt
08:51 nineteen joined #salt
08:51 netcho_ joined #salt
08:53 futuredale joined #salt
08:53 JamieH joined #salt
08:53 wm-bot4 joined #salt
08:53 onlyanegg joined #salt
08:54 jhauser joined #salt
08:56 froztbyte joined #salt
08:56 froztbyte joined #salt
09:00 nineteen joined #salt
09:03 debian112 joined #salt
09:07 mavhq joined #salt
09:11 nineteen joined #salt
09:17 rbjorklin joined #salt
09:19 rbjorklin I'm trying to use mine_functions to gather in two package versions from a server but it doesn't seem to be possible to use pkg.version more than once. Is this correct?
09:20 rbjorklin My original problem is that I'm deploying nightly to stage and want to push that version to prod if it passes the tests in the morning.
09:20 nineteen joined #salt
09:21 rbjorklin Which is my reason wanting to keep track of what's deployed.
09:21 s_kunk joined #salt
09:25 Reverend `    Passed invalid arguments to state.apply: 'NoneType' object has no attribute '__getitem__'`
09:25 Reverend huh?
09:26 Reverend ignore me. I'm being a douche
09:26 Reverend I had a random 'something:' in the middle of my SLS without any additional attributes.
09:26 Reverend kek
09:27 AndreasLutro rbjorklin: if you want to store both versions in the same mine entry, you'll have to write a custom execution module for it
09:27 Reverend does one -need- a base: in his
09:27 Reverend sls?
09:30 babilen rbjorklin: You might want to use a mine function alias
09:31 rbjorklin babilen: Yeah just found it and it works... Sorry I should have RTFM...
09:35 Narfology I have a hostname demox000.eu.example.com (and minion_id from hostname). I want to set a grain that is exactly the first segment of the hostname (e.g. demox000). How can I do that?
09:35 ProT-0-TypE what is the correct way to escape a string starting with ! in YAML? even if I put it between quotes (single or double) it's still seen as "tag" by salt
09:35 babilen rbjorklin: Wonderful
09:36 Reverend omfg babilen - where hath thou been?
09:36 Reverend <3
09:36 halbomin joined #salt
09:40 nineteen joined #salt
09:40 ProT-0-TypE nvm the issue was somewhere else. single quotes escape the !
09:45 Narfology how can I extract a substring in salt via jinja?
09:47 Reverend it's basically python, so I'mg oign to guess at substr()
09:48 Reverend oh
09:48 Reverend wait
09:48 Reverend wrong language
09:49 Reverend Narfology - what exactly is it you need to do? can you regex match it?
09:49 Narfology I have a hostname demox000.eu.example.com (and minion_id from hostname). I want to set a grain that is exactly the first segment of the hostname (e.g. demox000). How can I do that?
09:50 nineteen joined #salt
09:51 Reverend ooooo. errr
09:51 Narfology the python code would be url.split('.')[0]
09:51 sh123124213 joined #salt
09:52 Reverend alternatively... re module?
09:52 Reverend gimme regex.
09:52 Reverend gimme.
09:53 Narfology it doesn't matter, my problem is how to use it in jinja
09:53 Narfology not how to get my name part
09:53 Reverend ohhhh yeah. url.split then might be your best option... I'm not even sure you can import in jinja :S AndreasLutro will tell us
09:54 Reverend url.split might work... just do {% set blah = blah.split....... %}
09:54 Reverend see whgat it throws out
09:54 Reverend might work. might not
09:54 Reverend NOBODY KNOWS!
09:55 hemebond Template("{{ 'this.is.a.string'.split('.')[0] }}").render() == u'this'
09:55 netcho joined #salt
09:56 Narfology great, thanks
09:56 Reverend yay for hemebond <3
09:56 hemebond ūüĎć
09:56 Reverend omg an ascii thumbs up. holy shit. you make me happy.
09:56 hemebond Unicode thumbsup :-)
09:56 Reverend same shit
09:57 Reverend :P
09:57 hemebond I really should add more. They're neat.
09:57 Reverend right, I need to jack in... get this stuff finished before lunch time :) bbiab jokers!
09:58 mavhq joined #salt
09:58 hemebond ‚ėļ
10:00 nineteen joined #salt
10:03 RandyT joined #salt
10:04 xmj joined #salt
10:06 klaas joined #salt
10:08 mavhq joined #salt
10:09 N-Mi joined #salt
10:09 N-Mi joined #salt
10:11 c4t3l joined #salt
10:12 nineteen joined #salt
10:13 halbomin joined #salt
10:13 mavhq joined #salt
10:14 evle joined #salt
10:16 Antiarc joined #salt
10:20 nineteen joined #salt
10:22 sh123124213 joined #salt
10:24 losh joined #salt
10:25 aidin joined #salt
10:30 halbomin left #salt
10:32 nineteen joined #salt
10:35 kihued_ joined #salt
10:38 imnotarobot joined #salt
10:38 imnotarobot Hi. Does anyone know if it's possible to run a script / command locally within a state module? So something like:
10:39 imnotarobot grains.append: - name "somename" - value: script.sh
10:39 imnotarobot obviously with the formatting correct :)
10:40 nineteen joined #salt
10:41 DEger joined #salt
10:48 netcho !pastebin
10:48 saltstackbot To paste snippets of code/sls/etc, please use a code paste site, such as: https://gist.github.com or http://refheap.com
10:49 Narfology what's the proper way to create and/or set a grain? (if it doesn't exist, it should be created, then set to value)?
10:49 buxy joined #salt
10:49 Narfology grains.list_present creates a list, but I want a 1:1 grain key/value mapping
10:49 netcho hi all, here is my state.. used to work but now it does not.. it installs only awscli and not boto package
10:49 netcho https://www.refheap.com/123260
10:49 hemebond Like grains.items ?
10:50 arif-ali joined #salt
10:50 netcho Narfology: grains.append ?
10:50 nineteen joined #salt
10:50 netcho or grains.setval
10:50 buxy Is there any setting that controls how long the orchestration runner is willing to wait for minions to complete a specific task?
10:51 buxy Because I have a long running task that fires up on 3 servers and I want to wait the completion of the task on all 3 but right now it seems to wait only those that take less than 6 hours or something like that.
10:51 Narfology netcho: they need the grain to exist
10:51 netcho no
10:52 netcho Append a value to a list in the grains config file. If the grain doesn't exist, the grain key is added and the value is appended to the new grain as a list item.
10:52 netcho https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html
10:53 netcho anyone knows why pip does not install boto?
10:54 Narfology netcho: ... as a list item
10:54 Narfology netcho: not as a plain k/v pair
10:54 onlyanegg joined #salt
10:54 Narfology this means when I get the value, it returns ['value']
10:54 Narfology and I need t fix this everywhere I use it
10:55 dariusjs joined #salt
10:57 dariusjs joined #salt
10:58 Narfology ok
10:58 Narfology grains.present
10:58 Narfology yay
10:58 sgo_ joined #salt
11:01 netcho https://www.refheap.com/123262
11:01 dps joined #salt
11:02 imnotarobot possible to call bash / python within jinja? Something like {% set foo = /bin/bash hostname %}
11:03 ivanjaros3916 joined #salt
11:03 netcho imnotarobot: i don't get it why it dows not want to install a pip package
11:03 netcho simple state should install 2 packages
11:03 netcho it installs only one
11:04 netcho https://www.refheap.com/123260
11:04 imnotarobot can you install boto on pip from cli?
11:05 netcho yes
11:05 AndreasLutro you can't provide more than one argument to the same state with the same argument name
11:06 imnotarobot think it's pkgs:
11:06 imnotarobot - boto
11:06 imnotarobot -awscli
11:06 AndreasLutro either make 2 separate states or find out if pip.installed takes another argument that lets you install multiple
11:06 imnotarobot but obv check docs.
11:10 nineteen joined #salt
11:11 mikea joined #salt
11:17 netcho ok, i divided packages and now it works
11:17 netcho but still... it used to work
11:17 netcho and why did it install second package..
11:18 netcho who knows
11:20 nineteen joined #salt
11:21 impi joined #salt
11:23 ivanjaros joined #salt
11:27 patrek joined #salt
11:28 amcorreia joined #salt
11:31 nineteen joined #salt
11:32 patrek joined #salt
11:39 jeddi joined #salt
11:50 nineteen joined #salt
11:52 dh joined #salt
11:54 abednarik joined #salt
11:55 amontalban joined #salt
11:55 amontalban joined #salt
11:56 mavhq joined #salt
12:01 aidin joined #salt
12:02 nineteen joined #salt
12:06 s_kunk joined #salt
12:10 nineteen joined #salt
12:12 wsayo Is there a need to run more than one Master? Similar to how Docker Swarm suggests using more than one manager in case the leader of the Swarm goes down
12:16 Antiarc joined #salt
12:18 oliver_are joined #salt
12:20 nineteen joined #salt
12:21 oliver_are Hi guys, I'm facing a strange error while running on a state.sls  http://dpaste.com/0H7V5A0
12:21 oliver_are could someone help me in fixing this
12:25 edrocks joined #salt
12:28 Mads[m]1 joined #salt
12:30 nineteen joined #salt
12:32 vegasq joined #salt
12:38 mavhq joined #salt
12:40 nineteen joined #salt
12:40 netcho joined #salt
12:41 west575_ joined #salt
12:42 DEger joined #salt
12:44 misconfig Hi everyone, is there a way with jinja to dynamically add a value to a dictionary?
12:44 jeddi oliver_are: is it bundle or bundler?
12:45 misconfig I tried '.update' to no avail
12:46 misconfig here is my example: https://gist.github.com/ndobbs/8889265bb0572d02dc47302dfd7d2543
12:47 Electron^- joined #salt
12:49 numkem joined #salt
12:49 ivanjaros joined #salt
12:50 nineteen joined #salt
12:55 onlyanegg joined #salt
13:02 nineteen joined #salt
13:03 SaltyVagrant joined #salt
13:06 oliver_are jeddi, its bundle
13:09 nineteen joined #salt
13:19 Electron^- joined #salt
13:20 TOoSmOotH joined #salt
13:20 dariusjs joined #salt
13:20 west575_ joined #salt
13:20 nineteen joined #salt
13:21 Kakwa_ is there a way to enable a returner systematically? (without having to pass --return "my_returner")
13:22 yannj joined #salt
13:23 yannj Hello there, I am trying to find a way to use Salt with HTTPS, is there any way to do it?
13:23 Reverend say what?
13:23 Reverend how do you mean yannj ?
13:25 yannj is there any support of transport using websocket with ssl in salt?
13:28 jdipierro joined #salt
13:29 misconfig Is there a way with jinja to dynamically add a value to a list?
13:29 racooper joined #salt
13:30 nineteen joined #salt
13:31 dps joined #salt
13:31 AndreasLutro {% do mylist.append(myvalue) %}
13:34 Tanta joined #salt
13:35 jas02 joined #salt
13:37 Reverend yannj - I'm not sure what the point of that would be, even if you could.
13:37 Reverend as in, why do you need a websocket, when you have ssh, and agents?
13:38 Reverend I'm going to be of absolutely no assistance, but I'm just wondering what hte use case is of that :S
13:38 yannj We have customers that only allow us to use HTTPS
13:39 yannj My first idea is to switch to tcp transport and add HTTP connect
13:40 Brew joined #salt
13:40 subsignal joined #salt
13:40 nineteen joined #salt
13:41 subsignal joined #salt
13:46 Sketch you can do ssh.  do they actually require https, or do they just require ssl...which ssh uses?
13:49 eris SSH doesn't use SSL.
13:50 DaveQB joined #salt
13:52 nineteen joined #salt
13:52 Sketch $ ldd /usr/bin/ssh|grep ssl
13:52 Sketch libssl3.so => /lib64/libssl3.so (0x00007f61445af000)
13:53 * Sketch is surprised to learn that his distro's current openssh installation uses nss rather than openssl
13:53 eris It uses functions from OpenSSL, which are now in libcrypto.
13:53 eris But it doesn't use SSL itself.
13:53 Sketch oh, i guess it does still use libcrypto
13:53 Sketch right
13:53 Sketch i think the encryption is from libcrypto
13:53 Sketch which is close enough to ssl imho ;)
13:54 eris Oh please.
13:54 eris Nothing about tho protocols are the same.
13:56 LotR sure there is. they both encrypt stuff ;)
13:57 whytewolf sigh
13:58 mapu joined #salt
14:00 nineteen joined #salt
14:05 Sketch they use (some of) the same encryption methods
14:07 subsign__ joined #salt
14:07 buxy Do we have any execution module that can return a list of minion id corresponding to some target pattern?
14:08 cscf buxy, well there's always test.ping
14:09 drawsmcgraw buxy: if you're trying to query all known minions within a state file (or something similar), you could have your minions send their ID to the Salt mine.
14:09 drawsmcgraw Then you can query that with some nominal targeting.
14:09 nineteen joined #salt
14:10 vegasq joined #salt
14:11 imsalty joined #salt
14:12 imsalty is it possible to run commands locally on the minion as part of a state?
14:13 Reverend Sketch - https and ssl are in no way the same. They use the same cryptographic libraries, but the two protocols are vastly different
14:14 lovecraftian joined #salt
14:14 lovecraftian joined #salt
14:14 Reverend a cucumber isn't a banana just because it's wrapped in a banana skin ;)
14:14 whytewolf imsalty: states are run on the minion. what exatly do you mean?
14:14 imsalty Sorry, I meant to write master.
14:14 imsalty As in, as part of a state, can I do a cmd.run and target the master?
14:15 AndreasLutro no, that would be a huge security hole
14:15 imsalty Hm, okay, thank you.
14:15 Reverend AndreasLutro: care to elaborate? out of interest on my part
14:16 whytewolf you would want orchestration for something like that. and a minion running on the master. the minion would not run the commands on the master.
14:16 buxy drawsmcgraw: It's to be used in salt.wait_for_event since needs a list of "id" to wait for
14:16 AndreasLutro Reverend: state code can be manipulated on the minion, so if your minion got compromised you'd give the attacker remote execution rights on your salt master
14:16 AndreasLutro which would be a disaster
14:17 Reverend AndreasLutro: I see. However, I think what he was asking is whether or not the master can be it's own master, whcih is a slightly different scenario, correct?
14:17 buxy basically I run a task of all minions matching some pillar data and then I want to wait that task to complete with salt.wait_for_event but unfortunately, wait_for_event does not allow to build the id list with similar "tgt" attributes
14:17 Reverend AndreasLutro: ofcourse, if minions could run shit on master, you'd just be asking for trouble. But even with master being able to run commands on itself, the states are still only on the minions, amirite? :S
14:18 imsalty Okay, to rephrase, is there any way I can explicitly target a minion as part of the state?
14:18 drawsmcgraw buxy: You might want to look into Orchestrate
14:18 AndreasLutro Reverend: the salt master machine can run both a minion and a master at the same time, that doesn't make them the "same"
14:18 fizmat joined #salt
14:18 pipps joined #salt
14:18 AndreasLutro imsalty: maybe look up "publish" in the docs, that might be what you're after
14:18 imsalty Thanks, I'll take a look.
14:19 misconfig @AndreasLutro, your suggestion with the append function worked. Thank you!
14:19 nineteen joined #salt
14:19 DammitJim joined #salt
14:20 Reverend AndreasLutro: sorry - I'm struggling to see what you mean. Thanks though. as much as I'd like to delve deeper into teh world of salt security, I have to go map some nat stuff >_< sorry pal. x
14:20 buxy drawsmcgraw: this is all in the context of the orchestrate runner obviously
14:20 Reverend AndreasLutro: we'll pick it up another time probably :) x
14:21 AndreasLutro no worries! ping me any time and I'll reply if I have time
14:21 Reverend thanks dude ;)\
14:22 ProT-0-TypE is there a way to get only unique values from a list in jinja?
14:23 AndreasLutro ProT-0-TypE: sadly not
14:23 fizmat In python the laziest way is to transform it into a set and back into a list, but I don't know about jinja.
14:23 jdipierro joined #salt
14:23 ProT-0-TypE uhm
14:24 drawsmcgraw buxy: Ah, of course. Apologies :)
14:25 ProT-0-TypE is there a suggested workaround to have a unique list in a template?
14:25 mamalos joined #salt
14:25 mamalos hey all
14:25 drawsmcgraw In that case, I think the Salt Mine is the way to go. That will let you use normal targeting to build a list of minion IDs
14:25 AndreasLutro what I do is check for existence in the list before adding it
14:25 AndreasLutro https://www.lutro.me/posts/dynamic-includes-in-salt has an example
14:25 AndreasLutro {% for plugin in app.get('plugins', []) if plugin not in plugins %}
14:26 AndreasLutro annoying but don't know any other way
14:26 nicksloan joined #salt
14:26 SaltyVagrant_ joined #salt
14:27 mamalos I am new to salt and I'm trying to write some modules, where I sometimes find myself having trouble executing commands on the minions (usually piped), so here's the question: when exactly should I use python_shell=True? Because a quick glance in the documentation was not very enlightening
14:29 cyborg-one joined #salt
14:31 ProT-0-TypE well, that's a clever hack! thanks @AndreasLutro
14:31 west575_ joined #salt
14:31 edrocks joined #salt
14:31 AndreasLutro would be better if we just implemented a unique filter in jinja already
14:31 nineteen joined #salt
14:31 AndreasLutro I'll remember to make a PR for it some day
14:32 lompik joined #salt
14:33 ProT-0-TypE in the meantime I'll bookmark your blog post :D
14:33 ProT-0-TypE in ansible they added a unique filter
14:34 ProT-0-TypE and I actually thought it was a jinja default
14:35 AndreasLutro jinja's default use case is one where you have authorship fo the python code that renders your jinja templates.. in that case it's very easy to transform your list to become a unique one
14:35 AndreasLutro so as a core jinja feature it's kinda unnecessary
14:35 gableroux joined #salt
14:37 dendazen joined #salt
14:37 mamalos any comments about when python_shell=True should be used?
14:40 nineteen joined #salt
14:44 netcho hey all is it possible to set custoim grains on minion creation using salt-cloud (withouth using maps)
14:45 netcho or, if maps are the only way can it recieve a parameter?
14:48 DEger joined #salt
14:49 impi joined #salt
14:49 amontalb1n joined #salt
14:50 nineteen joined #salt
14:50 west575_ joined #salt
14:51 tercenya joined #salt
14:54 _JZ_ joined #salt
14:54 rherna joined #salt
14:57 ub1quit33 joined #salt
14:59 ivanjaros joined #salt
14:59 llua joined #salt
15:00 DammitJim joined #salt
15:01 nineteen joined #salt
15:01 DEger joined #salt
15:02 angvp joined #salt
15:03 hasues joined #salt
15:03 ekristen joined #salt
15:05 DEger_ joined #salt
15:06 west575_ joined #salt
15:08 hasues left #salt
15:10 nineteen joined #salt
15:10 tiwula joined #salt
15:11 Narfology I want to restart a service if a certain salt file.managed file has been changed. How would I encode this in yaml?
15:12 dariusjs joined #salt
15:14 DEger joined #salt
15:17 fizmat joined #salt
15:17 whytewolf Narfology: https://docs.saltstack.com/en/latest/ref/states/requisites.html#watch
15:18 DEger_ joined #salt
15:19 noraatepernos joined #salt
15:19 sp0097 joined #salt
15:20 sp0097 left #salt
15:20 nineteen joined #salt
15:22 west575_ joined #salt
15:24 DEger joined #salt
15:29 nineteen joined #salt
15:33 sjorge joined #salt
15:33 sjorge joined #salt
15:34 iggy or listen
15:35 iggy netcho: you can set them in the provider/profile file as well I think... not sure if you can set them with command line args
15:36 gleo_ joined #salt
15:38 iggy ProT-0-TypE: you could always write the state in something other than jinja that makes it easier to handle that case
15:38 netcho iggy: i tried in profile but it does not work
15:38 netcho i got nothing against maps if i can pass a minion name as argument
15:39 ProT-0-TypE @iggy I think I'll add the unique filter
15:39 netcho salt -m /path/to/map mynimion-1
15:39 onlyanegg joined #salt
15:42 fxdgear joined #salt
15:42 iggy netcho: so you want to only create one instance out of the map file?
15:43 iggy because a map is supoosed to describe an entire group of servers... so setting a name doesn't really make sense
15:44 netcho yeah i know
15:44 gleo_ hey wanted use salt-cloud via the api and was wondering if i can pass the api key n secret via the parameters as well
15:45 netcho i would just like to create custom grains on first hidhstate run
15:46 mpanetta joined #salt
15:48 gleo_ client.create(names=['myinstance'], provider='my-ec2-config',
15:48 gleo_ can i pass api-key n secret instead of provider
15:49 nineteen joined #salt
15:50 west575_ joined #salt
15:51 DEger joined #salt
15:55 cyteen joined #salt
15:59 nineteen joined #salt
16:00 samodid joined #salt
16:09 n1x0n joined #salt
16:10 n1x0n Hello, any hints on how to run splay with new version of salt ? Looks like it was removed ?
16:10 nineteen joined #salt
16:10 n1x0n I was able to do splay.splay 60 but not it just complains, I can't find any documentation that would epxlain what happened to it
16:14 pipps joined #salt
16:18 abednarik joined #salt
16:19 nineteen joined #salt
16:20 Edgan joined #salt
16:23 Antiarc joined #salt
16:27 sgo_ joined #salt
16:28 DEger joined #salt
16:29 nineteen joined #salt
16:31 fxhp joined #salt
16:33 sh123124213 joined #salt
16:33 N-Mi joined #salt
16:33 N-Mi joined #salt
16:33 lero joined #salt
16:33 pipps joined #salt
16:35 pipps99 joined #salt
16:38 c4rc4s joined #salt
16:40 mikecmpbll joined #salt
16:40 nineteen joined #salt
16:43 tercenya joined #salt
16:44 woodtablet joined #salt
16:44 Antiarc joined #salt
16:45 _KaszpiR_ joined #salt
16:48 hoonetorg joined #salt
16:49 nineteen joined #salt
16:49 oliver_are joined #salt
16:53 samodid joined #salt
16:59 edrocks joined #salt
16:59 yannj joined #salt
16:59 nineteen joined #salt
17:02 UtahDave joined #salt
17:03 keimlink joined #salt
17:06 sh123124213 joined #salt
17:07 pipps joined #salt
17:10 nineteen joined #salt
17:11 dataman joined #salt
17:13 jenastar joined #salt
17:20 nineteen joined #salt
17:21 impi joined #salt
17:21 sjorge joined #salt
17:21 sjorge joined #salt
17:22 mohae joined #salt
17:22 sgo_ joined #salt
17:25 wendall911 joined #salt
17:28 nineteen joined #salt
17:34 jdipierro joined #salt
17:35 s_kunk joined #salt
17:35 s_kunk joined #salt
17:35 tapoxi joined #salt
17:36 mikecmpbll joined #salt
17:36 fizmat1 joined #salt
17:37 Joe630 joined #salt
17:38 tapoxi joined #salt
17:39 nineteen joined #salt
17:43 mavhq joined #salt
17:48 ivanjaros joined #salt
17:48 nineteen joined #salt
17:49 jdipierro joined #salt
17:52 iggy it looks like it's still there
17:52 iggy https://docs.saltstack.com/en/latest/ref/executors/all/salt.executors.splay.html#module-salt.executors.splay
17:53 Mads[m]1 It should still be there. I'm using it heavily and haven't noticed any regression over the last few versions
17:53 Mads[m]1 regressions related to splay that is...
17:54 Mads[m]1 there's plenty of other regressions :D
17:57 mpanetta joined #salt
17:57 lero joined #salt
18:00 edrocks is there a state scheduler for salt? ie something like cron or do people just use the cron module from salt?
18:02 Mads[m]1 Yup there's a scheduler
18:02 Mads[m]1 Let me find the doc
18:02 edrocks what's it called? I thought I read about it before but can't find it or the name
18:02 evle1 joined #salt
18:02 edrocks I'm setting up automatic backups and thought it might be helpful
18:02 Mads[m]1 https://docs.saltstack.com/en/latest/topics/jobs/
18:02 impi joined #salt
18:03 nineteen joined #salt
18:03 Mads[m]1 Defined in either minion config or as a pillar
18:04 Mads[m]1 I've defined mine as pillar, for running periodic highstates and ensuring user access (and user access revocation) to servers
18:04 pipps joined #salt
18:05 Mads[m]1 and then use the splay functionality to make sure all highstates don't run at the same time (Think it's something like every 20 minutes+[1..9]minutes)
18:06 Mads[m]1 Though my problem ended up (as I haven't fixed it yet) that the event system is borked, so I don't get notified on failed state runs. That could be a problem for you if you plan on setting up auto backup
18:09 nineteen joined #salt
18:09 sh123124213 joined #salt
18:11 edrocks thats not good
18:11 edrocks Was it borked because you configured it wrong or an issue with salt?
18:12 edrocks I hope it didn't just randomly stop working
18:12 Mads[m]1 Salt issue
18:12 Mads[m]1 It can't react to failed state runs. It's either a notification for every state run or none
18:12 Mads[m]1 which is a regression
18:13 Mads[m]1 Which I'll have to fix soon, it's getting harder and harder to live without that feature at work...
18:15 Llmiseyhaa joined #salt
18:16 tercenya joined #salt
18:19 nineteen joined #salt
18:20 ecdhe joined #salt
18:25 schro joined #salt
18:26 schro Hello everyone! Quick question: I've been trying to find a way to easily run a follow up command if one particular package has been upgraded but I'm not really seeing anything. Am I stupid, or is there no module to handle something quite like this? Thanks
18:26 Mads[m]1 looked into the only_if condition?
18:27 pipps joined #salt
18:27 schro I did, but I didn't see a way to specify if one package changed
18:28 beardedeagle joined #salt
18:29 nineteen joined #salt
18:29 schro caI could maybe hook it off pkg.latest I suppose though
18:29 Mads[m]1 So you want to run a specific command if a specific package was updated during this state run?
18:30 schro yeah. It's gitlab, so if gitlab updates, I need to run "gitlab-ctl reconfigure"
18:31 schro but I'd rather not just have that fire off every time, so I'd like to somehow have something that says "If the package gitlab-ce was modified, then run the command"
18:32 Mads[m]1 Gimme a sec and I'll come up with something :D
18:32 pipps99 joined #salt
18:32 edrocks schro: it's easy if you use the docker image. just do `dockerng.imageprest: gitlab-image:latest` with force set to True so it goes and checks the registry
18:33 schro Mads[m]1: Thanks!
18:33 schro edrocks: Might work, but operational limitations prevent me from using docker
18:33 edrocks schro: what does that mean?
18:34 schro edrocks: Boss is afraid of docker, doesn't want uncontrolled "machines" in the environment. I'm lucky I got salt approved. We're federal, so any new wave hippie-dippie devops stuff really freaks the old guys out
18:34 Mads[m]1 That means his employer aren't allowing Docker in production :D
18:34 edrocks well that makes me sad
18:34 schro yeah tell me about it lol
18:35 edrocks have you considered just running a script that exits if your criteria aren't met?
18:35 Mads[m]1 schro: the onchanges conditional should be able to do what you're looking for. Documentation mentions using it on files, however, I thinkg it should work on pkg's aswell
18:35 edrocks and if it doesn't exit it updates gitlab, reconfigures, etc
18:35 Mads[m]1 Unfortunately I don'
18:35 Mads[m]1 't have a salt dev server operational right now so can't test for you
18:35 schro Mads[m]1: I'll check it out, thanks! edrocks: That's a good idea, too. If I get tired of trying to do it the salt way it'd be a pretty trivial shell script
18:36 edrocks schro: it worked for someone else the other day. It tends to be a good backup plan at the very least :)
18:37 schro yeah I appreciate it, thanks guys
18:37 schro or gals, w/e
18:38 Mads[m]1 schro: No problem. Try having a look on prereq also, might also help you
18:38 keimlink joined #salt
18:39 bfrog joined #salt
18:39 tmkerr joined #salt
18:40 bfrog it seems like my gitfs_remotes aren't working... is there an easy way to debug it?
18:40 bfrog I have fileserver_backend: - roots and - git setup
18:42 nineteen joined #salt
18:43 bfrog ah, salt-master -l trace seems to be a general way of debugging
18:44 Mads[m]1 -l debug is usually fine, I fine trace way to verbose :D
18:44 Mads[m]1 Though I think I've had to use trace once, but most times debug is fine
18:44 dps I have a really dumb question.  I am getting really inconsistent results with minions not returning when running salt commands, or when running something basic like test.ping.  I only have like 20 minions added to my master; is this common?  do I need to performance tune minions or the master?  I can't find much documentation on addressing this problem, this is something that I would hope would just work consistently.
18:45 bfrog ah I appear to have missed a - match: grain in my role match line
18:45 bfrog bah
18:45 cliluw joined #salt
18:46 Mads[m]1 dps: I've got 60ish minions connected to a single master, doing fine, no special config
18:46 dps Mads thank you for responding.  This is driving me nuts I can't figure out what is causing it.
18:46 cliluw joined #salt
18:47 Mads[m]1 dps: No problem, How's the connections to the minions? is it stable, how's the latency?
18:47 schro lol I found an easier way...I can just watch gitlab's version-manifest for changes
18:47 schro which, of course, is modified every time it updates
18:47 schro derp
18:47 edrocks I was running with 12 instances a while ago, no issues
18:47 abednarik joined #salt
18:48 dps Mads[m] its all in the same data center inside the same firewall, there's no problems with latency at all
18:48 bfrog anyone here familiar with the hadoop formula?
18:49 dps I am not sure what you mean by stable but we run a high availability environment, it's well maintained and up-to-date (we manage things reasonably well)
18:49 edrocks dps: no concern with it being in a single dc?
18:50 edrocks We recently spread out to 3 DCs across america
18:50 dps edrocks: we partition the data center in half for HA, we have redundant power, generators, etc
18:50 Mads[m]1 dps: So you're seeing minions randomly not returning from state runs, that's it right?
18:50 PerilousApricot joined #salt
18:50 dps Mads[m]1 that is exactly what I am seeing
18:50 hoonetorg joined #salt
18:50 dps its very inconsistent, rapid invocations return different results
18:51 nineteen joined #salt
18:51 Mads[m]1 Now that I think of it, I do see that too, though it's very rare. Seeing it alot?
18:51 dps almost every time i run a command
18:51 dps it is unusually that all minions return
18:51 mdhas joined #salt
18:51 dps *unusual
18:51 Mads[m]1 hmm
18:52 dps i dont even know how to troubleshoot it
18:52 mdhas joined #salt
18:52 dps other than start doing packet traces and firewall logs
18:52 Mads[m]1 Have you tried changing message broker?
18:53 bfrog reading this, but doesn't appear to work as expected unfortunately http://stackoverflow.com/questions/34477677/a-quick-guide-on-salt-based-install-of-spark-cluster/34482247#34482247
18:53 dps Mads[m]1 I have not
18:53 dps is there documentation on that?
18:53 Mads[m]1 meh, not message broker, I meant message transport
18:53 dps no i have not
18:53 dps doc?
18:54 Mads[m]1 https://docs.saltstack.com/en/latest/topics/transports/index.html
18:54 Mads[m]1 Though I've never experienced problems with ZeroMQ...
18:54 UtahDave dps: how much ram and storage does your master have?
18:56 dps @UtahDave i believe i have enough of both free, (storage available), here is how much memory I have free https://gist.github.com/dsulli99/9ce2faa40fabad75738f6c51abd1d51b
18:57 pipps joined #salt
18:58 kihued joined #salt
18:58 UtahDave dps: how much storage?   Can you also pastebin the output of   `salt-master --versions-report`
18:58 iggy dps: using anything out of the ordinary? (multi-master, !zeromq, etc)
18:59 edrocks dps: have you tried watching your memory usage when you run salt commands?
18:59 dps iggy: no, just default install.  UtahDave I updated the gist to include the stoage and versions report (https://gist.github.com/dsulli99/9ce2faa40fabad75738f6c51abd1d51b)
18:59 dps edrocks: i have not, although I can.
19:00 nineteen joined #salt
19:00 dps now it appears to be working consistently, all minions responding to ping time after time again
19:00 dps but this problem has been going on for a long time, i am not convinced that it is fixed by any means
19:00 iggy I used to see things like that a while back in gce with an older version of Salt (that had a keepalive bug)
19:00 iggy but it's been quite some time
19:01 dps its really frustrating
19:04 dps can i increase the minion timeout?  i didn't see anything in the master config for it
19:05 pipps joined #salt
19:06 UtahDave dps  can you run `df -i`  ?
19:07 UtahDave dps: also, I'm not seeing the versions report in that gist
19:07 UtahDave Yeah, that is very frustrating.
19:07 dps UtahDave: I appreciate your help.  I updated it with -i and made sure the versions report is there: https://gist.github.com/dsulli99/9ce2faa40fabad75738f6c51abd1d51b
19:09 nineteen joined #salt
19:09 toanju joined #salt
19:09 DammitJim joined #salt
19:10 Trauma joined #salt
19:10 UtahDave dps: sometimes on smaller filesystems the Salt master can exhibit problems when the filesystem is starved for inodes
19:10 dps UtahDave: I see
19:10 MTecknology "Rendering SLS 'sensu.checks' failed. Please see master log for details."],"  but... this is in the master log. I don't see any more detailed error. :(
19:10 UtahDave but that doesn't seem to be the case here
19:11 UtahDave MTecknology: have you tried upping your logs to debug level?
19:11 MTecknology only tried upping to info; I can try debug
19:11 pipps joined #salt
19:11 iggy easier to just run it in the foreground (for me)
19:12 MTecknology I'd prefer do that, but I don't have enough sanity available at the moment. :(
19:13 MTecknology debug isn't helping me out either. Maybe I'll get to do foreground.
19:14 pipps99 joined #salt
19:15 m4rx joined #salt
19:16 iggy this is a pillar? Did you try just running it through a yaml parser?
19:17 MTecknology I did not. I'll try that now!
19:17 mavhq joined #salt
19:18 Edgan MTecknology: I have had to do trace before
19:19 Edgan MTecknology: logging at the right log level is often wrong
19:20 nineteen joined #salt
19:20 MTecknology ah
19:21 MTecknology will try out trace...
19:21 MTecknology If I come back crying, it's your fault! :P
19:21 Edgan MTecknology: Sure it isn't a one space vs two space issue? It is the easiest way to have bad rendering.
19:21 iggy or missing :
19:21 iggy I do that one _all_the_time_
19:22 Edgan iggy: What do you use as an editor?
19:22 whytewolf I hate the missing : cause the issue that shows up is almost random and has to do with what ever lineis under the missing :
19:23 Edgan Another issue I just noticed yesterday. Sometimes the printed title in output doesn't match the official title in the sls.
19:23 DammitJim can I set up a nodegroup like this? mygroup: '*apps4*'
19:23 DammitJim with 2 wildcards?
19:24 whytewolf does that work with globs [the answer is yes]
19:24 tercenya joined #salt
19:24 DammitJim do I have to do G@*apps4* ?
19:25 DammitJim I don't know why my salt command is saying no target minions
19:25 whytewolf yes, you need the G:
19:26 whytewolf as per the first line of the node groups documentation "Nodegroups are declared using a compound target specification."
19:26 Edgan G@mygroup:*apps4* ?
19:26 whytewolf mygroup: 'G:*apps4*'
19:26 DammitJim I thought G was for grains
19:26 Edgan yeah
19:27 whytewolf [although iirc compound assumes glob if no specifier]
19:27 MTecknology Oh ya! iggy told me to check syntax and I started but forgot. Back to that one!
19:27 whytewolf you are right. I am tired
19:27 DammitJim this is so werid
19:27 DammitJim weird
19:27 whytewolf so mygroup '*apps*' should work
19:28 whytewolf err. speaking of missing :
19:28 whytewolf mygroup: '*apps*'
19:28 DammitJim hhmmmm... maybe using 'and' is messing it up
19:28 whytewolf what is the whole line you are trying?
19:29 nineteen joined #salt
19:29 DammitJim railscheduler: '*js*.railrug.com and *ftp*'
19:29 whytewolf humm. does that work from the cli with -C [not sure about wildcards in the middle]
19:30 DammitJim let me test
19:30 DammitJim no, it didn't like it
19:32 DammitJim the word and is messing me up I think
19:32 whytewolf i think you might need to move to E [PCRE Minion ID]
19:32 DammitJim but with pcre I can't use *
19:32 DammitJim right?
19:32 MTecknology bummer... the file passes a yaml parser
19:33 whytewolf DammitJim: do you have minion id's that fit both the js name and has ftp in the name?
19:33 DammitJim no
19:33 DammitJim oh, OR ?
19:34 whytewolf exactly ... and means it meats A and B
19:34 DammitJim DAMMIT!
19:34 DammitJim that's like 1st grade logic!
19:34 whytewolf ... yes ... it is
19:35 DammitJim and I bet I can do x, y, z and (a or b) ?
19:35 giany hi, what could be the reason for this warning : [WARNING ] jid does not exist
19:35 giany [WARNING ] Returner unavailable:
19:35 giany Happens when running salt-cloud on a minion with lxc driver..
19:35 nicksloan joined #salt
19:36 whytewolf DammitJim: no, that would be a list
19:36 whytewolf not a glob
19:36 whytewolf well the x,y,z
19:36 DammitJim sorry, I meant like
19:37 DammitJim x*,y*,z* and (a* or b*)
19:37 whytewolf only if you expect your minion id to have commas in it
19:37 DammitJim oh... otherwise, I need to do x* or y* or z* ?
19:38 whytewolf yes.
19:38 whytewolf x*,y*,z* is a list of globs. I don't think there is a setting in salt to accept that
19:38 DammitJim L@ ?
19:38 whytewolf lists IIRC don't accept globs
19:39 nineteen joined #salt
19:40 whytewolf nowww, if you were using PCRE [keep in mind it has been awhile. '(x|y|z).*'
19:41 DammitJim right
19:41 DammitJim how would I do NOT
19:42 whytewolf 'not E:(x|y|z).*'
19:43 whytewolf or was that and not?
19:43 whytewolf I don't remeber if salt got rid of the need fo rand there
19:43 whytewolf i think I am cracking
19:43 DammitJim don't crack, dude
19:43 DammitJim you are talking to me
19:43 noraatepernos joined #salt
19:44 whytewolf to be safe '* and not E:(x|y|z).*'
19:46 tercenya joined #salt
19:46 tapoxi joined #salt
19:47 whytewolf i think my next position i should do in an office again. the lack of human interaction is starting to get to me
19:47 whytewolf or at least half and half
19:47 DEger joined #salt
19:49 nineteen joined #salt
19:50 whytewolf btw you could right the glob the same way, [x-z]*
19:55 mavhq joined #salt
19:58 nineteen joined #salt
20:05 cyborg-one joined #salt
20:06 toastedpenguin joined #salt
20:08 nidr0x joined #salt
20:09 nineteen joined #salt
20:10 MTecknology 2016-10-11 20:00:41,409 [salt.loaded.int.output.highstate][ERROR   ][4012] Data passed to highstate outputter is not a valid highstate return: {'myhost.tld': ['Pillar failed to render with the following messages:', "Rendering SLS 'sensu.checks' failed. Please see master log for details."]}
20:11 MTecknology Even with trace logging enabled, I don't see anything on the master.
20:11 MTecknology the pillar file sensu/checks.sls is valid yaml/jinja
20:12 hemebond Have you tried commenting out blocks of it until is compiles?
20:13 noraatepernos joined #salt
20:16 pipps joined #salt
20:19 nineteen joined #salt
20:19 lero joined #salt
20:19 mikea joined #salt
20:20 mikea Is there a way to dynamically set the target for orchestration calls?
20:22 mikea I need to execute an API call from salt-api that reboots a host and returns when it's back up. I see how I can write an orchestration state to accomplish that, but the target is hard coded.. I need to be able to specify the target as part of the API call
20:27 DEger_ joined #salt
20:27 MTecknology mikea: what do you have now?
20:28 nineteen joined #salt
20:28 mikea MTecknology, we run the system.reboot execution module, which doesn't return and reboots the box
20:28 mikea We want to reboot and ensure that the box is back up
20:28 fxdgear I have a reactor question wrt to salt-cloud. I'm looking at the docs for using reactor to run `highstate` afer a minion has been created with salt-cloud.
20:28 mikea I think we can do it with state.orchestrate_high()
20:29 fxdgear the tag specified in the docs is `salt/cloud/*/created`
20:29 MTecknology hemebond: it's kinda interesting because this apparently works from salt-call, but salt 'host' produces the error, and saltutil.sync_pillar works fine.
20:29 Tanta mikea: you can use a @reboot cron to perform commands after the reboot -- you could have it email or notify you
20:29 fxdgear But when I run `salt-cloud -p profile_name minion_name`
20:29 fxdgear and i tail the logs for salt-master
20:29 DEger__ joined #salt
20:29 fxdgear i don't see any reference of the salt-cloud key...
20:30 fxdgear i see the minion started tag... `salt/minion/minion_name/start`
20:30 mikea Tanta, doesn't really work for me. Orchestration can do it.
20:30 fxdgear how can I make sure that salt-cloud reactor events are being sent?
20:30 MTecknology hemebond: iggy: Edgan: Turns out it was bad pillar data stuck in cache.
20:30 Tanta okay, just an idea. I like to use the OS scheduler to perform routine tasks
20:30 fxdgear or even being listened too
20:31 mikea fxdgear, have you tried watching the event bus? do you not see the events?
20:31 UtahDave fxdgear: have you watched the event bus during the process?
20:31 fxdgear how do i watch the event bus?
20:31 UtahDave fxdgear: `salt-run state.event pretty=True`
20:33 fxdgear @UtahDave @mikea creating a new minion with salt-cloud and watching the bus will report back shortly
20:33 woodtablet1 joined #salt
20:36 fxdgear @UtahDave @mikea ok so the cloud events aren't displaying in the event bus
20:36 UtahDave fxdgear: what's the output of   salt-cloud --version   ?
20:36 fxdgear I got `salt/auth`, `minion_start` and `salt/minion/minion_name/start`
20:36 fxdgear `salt-cloud 2016.3.3 (Boron)
20:37 nsidhu joined #salt
20:38 UtahDave fxdgear: Hm. That's likely a regression, then.  Can you open an issue on github for that?
20:39 fxdgear @utahdave i can... is there a work around for the time being?
20:39 UtahDave I would use the `salt/minion/minion_name/start` tag
20:40 UtahDave I generally would use that tag anyway, because that means the minion is up and running and is ready to receive commands
20:40 fxdgear @utahdave ok I'll use that I was thinking that the cloud one would be prefered since the the minion was created via cloud...
20:40 UtahDave The salt/cloud/<minion id>/created  tag doesn't necessarily mean the minion is listening to the master yet. Just that the VM has been created
20:41 fxdgear AHHH
20:41 fxdgear ok i though it fired AFTER the cloud process was finished
20:41 UtahDave and possibly that the minion is installed
20:41 fxdgear ie after the minion start tag was fired.
20:41 UtahDave Yeah, the salt cloud process might be finished, but the minion still has to negotiate encryption and authentication with the master.  I would consider the minion start tag more reliable
20:42 nineteen joined #salt
20:42 netcho joined #salt
20:43 iggy there's already an issue
20:47 fxdgear @utahdave thanks for the heads up. issue is here: https://github.com/saltstack/salt/issues/36920
20:47 saltstackbot [#36920][OPEN] Possible Regression in Salt-Cloud firing of events.  | Description of Issue/Question...
20:48 UtahDave thanks!
20:50 nineteen joined #salt
20:50 aagbds joined #salt
20:51 toastedpenguin anyone run into a minion not logging on when it is deployed via salt-cloud?
20:51 toastedpenguin I have several windows minions that aren't logging anything to the log file
20:51 toastedpenguin go to troubleshoot deployment issues and the file is emtpy
20:53 KajiMaster joined #salt
20:55 DEger joined #salt
20:56 rylnd joined #salt
20:58 nineteen joined #salt
21:00 DEger joined #salt
21:02 DammitJim joined #salt
21:04 rylnd hey all! has anyone found a way to use vmware custom attributes as grains or change custom attributes of a VM based of an event or state/module run?
21:04 DammitJim what is the proper way to exclude a minion when targeting?
21:04 DammitJim I have a nodegroup as follows:
21:04 pipps99 joined #salt
21:04 pipps joined #salt
21:05 DammitJim mygroup: '(myapps*02p* and not L@myapps802p*)'
21:05 whytewolf why do you have L@?
21:05 DammitJim sorry, that was supposed to be L@myapps802p.domain.com
21:06 whytewolf ok
21:06 DammitJim it's weird... for example, it doesn't target myapps502p.domain.com
21:06 DammitJim or myapps302p.domain.com
21:07 whytewolf again, not sure how well the wildcard in the middle works
21:07 DammitJim oh... and that is followed by or myapps*01p*
21:07 DammitJim oh, it worked when I didn't have: and not L@myapps802p.domain.com
21:07 khaije1 joined #salt
21:08 whytewolf well try dropping the L@
21:08 nineteen joined #salt
21:08 khaije1 I'd like to experiment with jinja line statements http://jinja.pocoo.org/docs/dev/templates/#line-statements in my states. Is this possible?
21:09 cyteen joined #salt
21:12 whytewolf I don't think salt enables line statments.
21:13 flowstate joined #salt
21:14 cheesus joined #salt
21:14 UtahDave toastedpenguin: what is the log file level set in your minion configs?
21:17 PerilousApricot joined #salt
21:17 UtahDave khaije1: I'm guessing that it should be possible to enable line statements, but you'd probably have to open an issue on github to track the request. Maybe we could make it an option. I'm not sure if there are any performance considerations
21:18 whytewolf wish salt exposed more of jinja directly
21:18 nineteen joined #salt
21:18 whytewolf allowing a lot more options.
21:19 jhauser joined #salt
21:20 woodtablet joined #salt
21:21 UtahDave yeah, that would be nice.
21:22 hemebond More of Jinja?
21:24 amontalban joined #salt
21:24 amontalban joined #salt
21:28 synapse_ joined #salt
21:29 nineteen joined #salt
21:31 toastedpenguin UtahDave: looks like the windows minion version 2016.3.2 has a typo in the conf file, the logfile setting is set to "log_level:" not "log_level_logfile:"
21:31 UtahDave toastedpenguin: log_level is just for the cli.
21:33 UtahDave toastedpenguin: I'd try adding that minion config option to your salt-cloud profile so that salt-cloud adds that to the minion config for you automatically.  Then  you can set it to the log level you want.  I believe it defaults to 'warning' if you don't set it explicitly.
21:33 whytewolf hemebond: not more of jinja, more like the ability to actualy do some of jinjas kewler tricks. such as the ability to add extensions, enable line statments, add filters, loop controls, with, changing autoescape
21:33 UtahDave back in a few
21:34 DammitJim whytewolf, the parens were messing me up!
21:34 hemebond Ah I see. I've not actually looked at adding new filters and stuff to Salt.
21:34 whytewolf well ...
21:34 toastedpenguin UtahDave: so the conf file needs both the log_level and log_level_logfile?  I had to append the existing conf file in order for the minion to start logging
21:35 toastedpenguin with the log_level_logfile
21:35 toastedpenguin before it wasn't logging anything, it was set to info
21:35 whytewolf i know there are times something like with would be really useful. the ability to have a variable set for only a block
21:36 sh123124213 joined #salt
21:36 abednarik joined #salt
21:36 whytewolf loop controlls would be nice now and then also. the ability to break out of loop early?
21:36 chevy joined #salt
21:37 hemebond Is that not in the default Jinja?
21:37 whytewolf http://jinja.pocoo.org/docs/dev/templates/#loop-controls no
21:37 hemebond The Python renderer is quite nice.
21:38 hemebond Though I've only just started using it a little.
21:38 whytewolf the python render is the only way to do some of these things currently. but it doens't have to be that way
21:40 whytewolf humm, did salt enable do?
21:41 nineteen joined #salt
21:42 hemebond Enable it? I've used it.
21:42 hemebond It's used in many formulas.
21:43 whytewolf okay. normally that is an extension that needs enabled.
21:48 Rumbles joined #salt
21:48 nineteen joined #salt
21:49 pipps joined #salt
21:50 fxdgear @utahdave hey you still around so using the `salt/minion/*/start` tag now and trying to get the orchestration example listed here: http://www.powelltechconsulting.com/salt-cloud-executing-an-auto-high-state/ to work
21:50 fxdgear (at the bottom)
21:50 fxdgear I'm getting the following error: [DEBUG   ][23635] Sending event - data = {'fun_args': [], 'jid': '20161011214912737420', 'return': 'Exception occurred in runner state.orchestrate: Traceback (most recent call last):\n  File "/usr/lib/python2.7/dist-packages/salt/client/mixins.py", line 330, in low\n    expected_extra_kws=CLIENT_INTERNAL_KEYWORDS\n  File
21:50 whytewolf humm. interesting... I never checked out what extensions salt loads and they really don't say anywhere
21:50 fxdgear "/usr/lib/python2.7/dist-packages/salt/utils/__init__.py", line 1000, in format_call\n    used_args_count\nSaltInvocationError: orchestrate takes at least 1 argument (0 given)\n', 'success': False, '_stamp': '2016-10-11T21:49:12.740677', 'user': 'Reactor', 'fun': 'runner.state.orchestrate'}
21:51 whytewolf with_, do and loopcontrolls are the only ones enabled
21:51 whytewolf along with there own "SerializerExtension"
21:52 xet7_ joined #salt
21:53 whytewolf humm, looking at this... it wouldn't be difficult to add other options.
21:53 hemebond whytewolf: Regex filter ūüĎć
21:53 hemebond (or conditional, or test, or whatever the proper name for it would be)
21:54 hemebond (the thing everyone tries to use and asks for)
21:54 whytewolf that doesn't sound like a filter
21:54 hemebond Yeah, test I think.
21:54 hemebond Well, don't know. Whatever would allow people to do a regex comparison.
21:54 noraatepernos joined #salt
21:55 whytewolf filters are used for changing the output of one item into another
21:55 whytewolf not for testing
21:55 hemebond Ah
21:56 whytewolf i think you want a extension
21:56 whytewolf [or hell an that could be done with a salt module with out touching jinja]
21:58 whytewolf or a jinja test
21:59 nineteen joined #salt
22:00 Perilous_ joined #salt
22:01 noraatepernos joined #salt
22:01 abednarik joined #salt
22:02 edrocks joined #salt
22:05 pipps joined #salt
22:08 justanotheruser joined #salt
22:11 lero joined #salt
22:12 nineteen joined #salt
22:13 nicksloan joined #salt
22:13 Edgan MTecknology: I have had that kind of problem before if I update salt with patches, but the version number doesn't change.
22:15 noraatepernos joined #salt
22:17 mikea Is it possible to include a reactor in the minion that reacts to its key being rejected and salt-calls a execution module?
22:17 mikea We package our own minion that gets deployed, so we could easy include the reactor and execution module
22:18 nineteen joined #salt
22:18 mikea the idea is to make the minion authenticate itself against a web service which will then sign the key on the master
22:19 khaije1 @UtahDave: good to know, thanks! FWIW, I'm looking for a good way to clearly define exclusions/applicability of states, so limiting states by OS or similar. The line statement syntax would make this fairly tidy when used sparingly at the head and tail of a file without distracting from more conventional jinja logic "inside" the state.
22:22 coval3nce joined #salt
22:22 coval3nce Anyone have some complete orchestrate runner examples for doing complex conditional like waiting on an API endpoint to come back up in a rolling upgrade scenario?
22:23 coval3nce Trying to figure out how to do some complex orchestration between api’s and running commands on boxes.
22:24 nicksloan joined #salt
22:28 nineteen joined #salt
22:36 haam3r joined #salt
22:37 * Heartsbane blames robawt.
22:38 nineteen joined #salt
22:39 oida joined #salt
22:39 haam3r1 joined #salt
22:40 lero joined #salt
22:44 noraatepernos joined #salt
22:47 capri_on joined #salt
22:49 nineteen joined #salt
22:50 Salander27 joined #salt
22:57 nineteen joined #salt
22:58 hemebond joined #salt
23:00 PerilousApricot joined #salt
23:03 edrocks joined #salt
23:08 nineteen joined #salt
23:17 N-Mi joined #salt
23:22 pipps joined #salt
23:29 nineteen joined #salt
23:31 pipps joined #salt
23:34 pipps joined #salt
23:38 nineteen joined #salt
23:39 schro Alright so I'm still stuck, actually.
23:39 schro If a file gets modified OUTSIDE of a salt state
23:39 schro if it changes
23:39 schro I need to run a command on the next highstate
23:39 schro however, I don't know what the contents might change to
23:39 schro and I can't seem to find a way to do it
23:40 hemebond schro: States are for enforcing state.
23:40 hemebond So you should know what you want the file contents to be and use Salt to make sure it has that content.
23:40 schro So, is there a way to compare the last version of a file that highstate saw
23:40 schro and if it changes, affect execution flow?
23:41 hemebond If your file.managed makes a change, you can have other states apply too.
23:41 hemebond States can watch other states for changes.
23:41 hemebond https://docs.saltstack.com/en/latest/ref/states/requisites.html#direct-requisite-and-requisite-in-types
23:41 sh123124213 joined #salt
23:41 schro So here's what I'm dealing with: We're running gitlab-ce, which updates occasionally. When it updates, I need to kick off a reconfigure script
23:42 schro The gitlab update is triggered by a pkg.upgrade
23:42 schro OH wait, I can blacklist the gitlab upgrade and use it as it's own state
23:42 schro if it changes gitlab upgraded
23:42 schro I can watch that state
23:43 schro I think, anyways
23:44 hemebond Well, if you use pkg.installed and "latest" then, if it changes, it means it's updated the package.
23:44 schro salt states are enforced seqentially, right?
23:44 hemebond Yes, unless otherwise re-ordered by requisites.
23:48 M-liberdiko joined #salt
23:50 Mads[m] joined #salt
23:50 freelock[m] joined #salt
23:50 M-MadsRC joined #salt
23:50 dnull[m] joined #salt
23:51 schro does pkg.latest return false in the event that the package had to be updated?
23:52 dps joined #salt
23:53 vegasq joined #salt
23:53 samodid joined #salt
23:53 kihued_ joined #salt
23:56 keimlink_ joined #salt
23:57 Ashald joined #salt
23:59 samkottler_ joined #salt
23:59 nahkiss joined #salt

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