Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-05-10

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

All times shown according to UTC.

Time Nick Message
00:01 asyncsec joined #salt
00:02 hashwagon joined #salt
00:15 XenophonF joined #salt
00:16 rem5_ joined #salt
00:18 woodtablet left #salt
00:25 onlyanegg joined #salt
00:33 nikdatrix joined #salt
00:52 pipps joined #salt
01:02 DEger joined #salt
01:02 DEger joined #salt
01:02 felskrone joined #salt
01:14 patrek joined #salt
01:14 edrocks joined #salt
01:14 shoemonkey joined #salt
01:17 DEger joined #salt
01:28 shoemonkey joined #salt
01:32 shoemonkey joined #salt
01:41 quasiben joined #salt
01:42 canci joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.4 <+> Support: https://www.saltstack.com/support/ <+> SaltStack Webinar on Carbon, Nitrogen, and Enterprise 5.1 on May 18, 2017 https://goo.gl/PvsOvQ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
01:49 prg3 joined #salt
01:50 onlyanegg joined #salt
01:59 zerocoolback joined #salt
01:59 rmelero joined #salt
02:08 k_sze[work] joined #salt
02:12 shoemonkey joined #salt
02:12 gnomethrower joined #salt
02:12 bigjazzsound joined #salt
02:13 shoemonkey joined #salt
02:14 pipps joined #salt
02:23 Tantagel joined #salt
02:24 skeezix-hf joined #salt
02:34 nikdatrix joined #salt
02:34 onlyanegg joined #salt
02:40 evle joined #salt
02:41 Xenophon1 joined #salt
02:41 dnull joined #salt
02:44 cyborg-one joined #salt
02:46 prg3 joined #salt
02:56 wych42 joined #salt
03:00 shoemonkey joined #salt
03:05 prg3 joined #salt
03:12 aneeshusa joined #salt
03:24 prg3 joined #salt
03:29 dezertol joined #salt
03:30 miruoy joined #salt
03:36 aneeshusa joined #salt
03:41 Acy joined #salt
03:45 dnull joined #salt
03:45 Praematura joined #salt
03:52 onlyanegg joined #salt
04:34 Gareth joined #salt
04:35 nikdatrix joined #salt
04:37 Gareth joined #salt
04:38 Gareth joined #salt
04:44 LeProvokateur joined #salt
04:55 Bock joined #salt
04:59 treaki joined #salt
05:06 armyriad joined #salt
05:07 edrocks joined #salt
05:08 dnull joined #salt
05:08 prg3 joined #salt
05:24 fredvd joined #salt
05:27 londo_ joined #salt
05:34 yuhl______ joined #salt
05:35 masuberu joined #salt
05:37 gmoro_ joined #salt
05:46 ronnix joined #salt
05:48 DEger joined #salt
05:50 preludedrew joined #salt
05:57 asyncsec joined #salt
05:58 rdas joined #salt
06:05 aldevar joined #salt
06:06 impi joined #salt
06:09 dnull joined #salt
06:10 golodhrim|work joined #salt
06:12 alex-zel joined #salt
06:13 alex-zel hello, is it possible to make salt-minion use specific python version?
06:14 alex-zel we have some old servers that use python 2.6 and it is causing issues with pip packages
06:17 do3meli joined #salt
06:17 do3meli left #salt
06:20 Ricardo1000 joined #salt
06:28 rdas joined #salt
06:33 dnull joined #salt
06:36 nikdatrix joined #salt
06:37 asyncsec_ joined #salt
06:45 DEger joined #salt
06:47 fracklen joined #salt
06:52 hasues joined #salt
06:53 candyman88 joined #salt
06:55 hasues If I'm trying to use Jinja to use pillar data in a salt state, do I use pillar.get ('desc:subdesc') == 'value'?  Or do I use pillar['desc]['subdesc'] ==
07:03 hemebond hasues: Use salt['pillar.get']('desc:subdesc')
07:03 hasues Thank you.  I will try that now.
07:04 fracklen joined #salt
07:05 hasues Wouldn't that be used in say, a template file and not an init.sls file?
07:09 hemebond It can be used in any state or template file.
07:09 toanju joined #salt
07:09 hasues http://dpaste.com/0MYSQHE
07:09 hasues It keeps complaining as if I am not terminating an if block
07:10 hemebond Because you've still got things like `pillar['lvm':'use_lvm']` in a file somewhere.
07:11 hasues Okay, let me see if I can make this uniform...again :)
07:11 hemebond Also, pillar['blah':'blah'] is completely invalid.
07:11 hasues great.
07:13 Hybrid joined #salt
07:17 dnull joined #salt
07:17 jas02 joined #salt
07:18 o1e9 joined #salt
07:20 jas02 joined #salt
07:25 candyman89 joined #salt
07:30 cb joined #salt
07:33 fracklen joined #salt
07:33 zulutango joined #salt
07:59 geomacy joined #salt
08:00 fracklen joined #salt
08:00 fracklen joined #salt
08:02 Rumbles joined #salt
08:03 s_kunk joined #salt
08:03 mikecmpbll joined #salt
08:03 nikdatrix joined #salt
08:04 hemebond How are people creating templated states that use different contexts? Jinja macros?
08:04 N-Mi__ joined #salt
08:09 edrocks joined #salt
08:10 hasues hemebond: Maybe that combined with pillar and/or different file_roots for varied contexts?
08:11 hemebond hasues: It's for use on the same minion.
08:11 hemebond A bit like deploying and configuring a whole lot of similar packages I suppose (but not actual packages).
08:12 bdrung_work joined #salt
08:12 hemebond I've used and called macros to create the same group of states multiple times.
08:12 hemebond Wondering if there's another way to handle it.
08:13 hasues Could you not set these contexts of what those imply in Pillar, then handle them in a varied fashion using Jinja?
08:13 hemebond e.g., somehow including a file with the states but supplying a different context each time.
08:14 hasues Well, instead of simply having a .sls file defining a state, could you not make a directory that contained an init.sls, and for other states, have other.sls in that directory that you call?
08:15 hemebond I'm not sure what you mean.
08:15 hasues like say mysql/init.sls  mysql/server.sls?  By default, the init.sls has mere definition of installing a client, but the server would install the server?
08:15 hemebond The group of states would be almost identical each time.
08:16 hasues Hm, I guess Jinja is all I could think of in that context.
08:16 hemebond Oh this is more like, e.g., unzipping an archive and creating some symlinks.
08:16 hemebond Yeah Jinja would be the only way.
08:16 hemebond But within Jinja I'm wondering if macros are the only/best way to handle it.
08:16 impi joined #salt
08:17 hasues Well, I reduced my issues, but I'm still having those same parse errors. http://dpaste.com/3FKDD6T
08:17 hasues Do you see anything else?
08:17 hemebond Regarding the unzipping example, there would be multiple archives but they'd all be handled in a similar way; hence using a macro to write the states for each.
08:17 hasues Going back to your issue, you could just not use Jinja and write Python if you really had to.
08:18 hasues Granted, I could see the appeal in not doing that.
08:18 hemebond I am using Jinja.
08:18 babilen hemebond: What are the invariants and what are the variable bits?
08:18 hemebond babilen: The state IDs and file names would change.
08:19 babilen Then just iterate over a list of archives (from pillars?) and make (parts of) the archive name part of the state ID (or simply enumerate the states)
08:19 babilen Wouldn't that do it?
08:19 hemebond A loop? Yeap, that would work too.
08:20 hemebond The only issue there might be re-use in other parts of the formula. Or separation of tasks.
08:22 hemebond A macro might very well be the best method, I'm just curious if there were any other methods.
08:22 hemebond hasues: Is that the entire state file?
08:22 babilen All I'm saying is that if the only thing you want to do is to generate a number of states from a single variable datum, you could iterate over the data and use that data in the state definitions
08:22 hasues It is.
08:23 hemebond hasues: `(% endif %}`
08:23 hemebond That opening bracket is wrong
08:23 pbandark joined #salt
08:23 permalac joined #salt
08:23 hemebond In fact you've used the wrong backet multiple times.
08:23 hasues I don't see it.
08:23 hasues I guess I don't understand Jinja well enough
08:24 whytewolf starting at like 102, again on 112 and again on 122
08:24 babilen Which paste are you discussing?
08:24 whytewolf { != (
08:24 hasues oh I see it
08:24 babilen Ah, there it is
08:24 hasues sigh
08:25 whytewolf hasues: also one question. are you actually setting this pillars to the string none?
08:25 hemebond babilen: Yeap, the loop is how I usually do it.
08:25 hasues whytewolf: in certain situations
08:25 whytewolf okay. just asking cause that is what you are testing for. the string none
08:25 hasues That is correct
08:26 whytewolf not the Type None. or a missing setting
08:26 whytewolf just making sure
08:26 hasues Well, there is probably a more savant way of doing it :(
08:26 hasues s/probably/definitely/
08:26 hasues But I'm not there yet.
08:27 hasues It sounds like what you are saying is that I should either set the value, and if I don't set it, just test it for None
08:27 whytewolf wasn't suggesting anything. was just asking about your logic on what you do have
08:27 whytewolf I'm to tired to suggest right now
08:28 hasues amen
08:28 hasues tired + age = mistaking brackets and parens
08:28 Mattch joined #salt
08:29 LondonAppDev joined #salt
08:29 whytewolf hasues: after time when you start getting to used to jinja you start doing stupid things like this https://github.com/whytewolf/dyn_salt_top
08:30 whytewolf [not the best example. needs tweeks]
08:30 rgrundstrom Hmm I am trying to get an if to check if {{user}} in a pillar file is present. I would guess that file.managed.contex would be the right chooise. But I cant find any examples online for doing this. Anyone that can provide example?
08:30 hasues I need to have a conversation on what I can and can't put in top.sls.
08:30 hasues But not right now.
08:33 colegatron joined #salt
08:33 whytewolf rgrundstrom: please explain more. where is this check? in pillar? what are you expecting file.managed(context=blah) to do?
08:34 babilen rgrundstrom: You could use {% if foo.bar is defined %} in your SLS, but it would be nice(r) to see an actual code snippet you need help with
08:34 babilen There are typically different approaches to "missing" data (e.g. explicitly testing for it, provising sensible default values, ...)
08:35 hasues here comes sleep...thanks for your help..I'll try to look at more breakage tomorrow.
08:36 rgrundstrom I have a pillar file and that makes creating users relly easy.  What I need is a {% if %} that checks this pillar if a user is present in this pillar file when another pillar is set to user.absent.
08:36 hasues left #salt
08:36 coredumb joined #salt
08:36 coredumb Morning
08:36 rgrundstrom So that the user is not created and then removed suring the same run over and over.
08:37 rgrundstrom during
08:37 babilen rgrundstrom: I'd handle that with an explicit "absent: True" k/v pair in the user definition
08:38 babilen Why do you generate states for missing data to begin with?
08:38 rgrundstrom That would be a good option as well.
08:38 colegatron left #salt
08:38 rgrundstrom Should be able to fix that.
08:41 rgrundstrom I asked my teamlead what he would thing is the best way and he wants a diffrent pillar for user removal. So im going to need that if statement.
08:42 babilen What do you mean by "different pillar for removal" exactly?
08:42 babilen But .. as said earlier: You can use "... is defined" to test if a (nested) value has been defined
08:43 rgrundstrom Hang on ill write the basics of what i need and then share the code
08:43 babilen Sounds like a plan :)
08:44 rgrundstrom Absolutly :)
08:48 colttt hello,
08:48 rdas joined #salt
08:48 colttt babilen: with |yaml_encode it works
08:49 colttt Neighbour: now it works with the correct indent
08:50 babilen colttt: Great, expected that :)
08:50 babilen nice nice
08:52 colttt so, next step, how i get the cert for a non-specific host..
08:52 babilen non-specific host?
08:52 colttt https://paste.debian.net/931729/ line 1-3 a specific, how can it work like line 5-6 ?
08:53 babilen What doesn't work when you do that?
08:54 babilen Ah, you have nested {% and {{ .. }} %}
08:54 colttt {% import_text certificate/{{ grains['fqdn']|lower }}.pem as cert %} <<-- this dont work
08:54 colttt babilen: exact
08:55 babilen So, don't nest them?
08:55 babilen 'foo' ~ grains['bar']|frobnicate ~ '.key' or something
08:57 rgrundstrom Here is the basics that i need for my user.absent: https://justpaste.it/16gu4
08:57 Neighbour colttt: ah, good
08:58 rgrundstrom And yes I see that i have some variables that are wrong.
08:58 babilen rgrundstrom: If removed_user in create_user_dict (assuming 'removed_user' is a key in the "users to create" dictionary)
08:58 Neighbour colttt: maybe this? {% import_text 'certificate/' + grains['fqdn']|lower + '.pem' as cert %}
08:59 Neighbour or with ~...still not sure when to use ~ or when to use +
08:59 babilen colttt: In short: Just built up the string as you please
09:00 rgrundstrom babilen: sorry I dont understand what you mean...
09:01 babilen Neighbour: + "adds" two objects (e.g. 2+2 = 4) with the special behaviour that "added" strings concatenate ... ~ is explicit string concatenation and also coerces its arguments to strings
09:02 babilen rgrundstrom: Could you give an example of the datastructures of both 'user' and 'delete-user' ?
09:04 Neighbour babilen: Hmm, I've had unicode issues with ~ that worked with + though
09:05 Reverend halp pls
09:05 Reverend https://hastebin.com/deqiquvozo.pas
09:05 Reverend :D
09:05 Reverend we haven't specificed a remote... so it's using origin... but origin isn't a thing :(
09:05 babilen Neighbour: 不可能!
09:05 rgrundstrom sure. one moment
09:07 Neighbour babilen: alas...I don't have an example at hand, but very possible, unfortunately
09:10 colttt holy shit it works..
09:10 colttt Neighbour: thanks a lot!
09:10 rgrundstrom Updated: https://justpaste.it/16gu4
09:10 colttt babilen: thanks a lot!
09:11 colttt a hard way for you but now it works for me ;)
09:14 babilen rgrundstrom: {% for del_user in salt['pillar.get']('removeuser', []) %} ... {% if del_user in salt['pillar.get']('users', {}) %} $FREAK_OUT {% else %} ..... {% endfor %}
09:14 babilen (feel free to remove the data lookup calls from the loop and into the outer scope)
09:17 rgrundstrom Is $FREAK_OUT actually something that would work??? Because that would the most awsome thing ever :)
09:19 Reverend I have a feeling that the "remote" entry in the git state is a lie xD 'If the repository already exists, and a remote by this name is not present, one will be added.'
09:19 Reverend haha
09:19 Reverend time to start reading through salt internals -_-
09:25 babilen rgrundstrom: Unfortunately not .. I'm also still missing the |do_what_i_mean filter
09:31 rgrundstrom Hmmmm  "Rendering SLS 'base:users.delete-users' failed: Jinja variable 'removeuser' is undefined"
09:36 babilen rgrundstrom: Sounds as if you forgot ' or "
09:36 rgrundstrom Nope i Got it working now :)
09:37 rgrundstrom babilen: Now i just need to get it to send "Error"... e.g. replace $FREAK_OUT with something :)
09:38 Terminus joined #salt
09:41 babilen rgrundstrom: Why do you need to error?
09:41 babilen And what does that really mean?
09:42 rgrundstrom I want salt to notify me that a user in the delete-user.sls is present in users.sls so i can correct it.
09:42 babilen Notify you how?
09:43 rgrundstrom That is an execelent question... My general thoughts was output on scrren but since this will run on cron later thats a bad idea.
09:43 babilen I still don't understand why you want to maintain two datastructures, where membership in one implies non-membership in the other
09:47 Acy joined #salt
09:53 Reverend babilen, you know how you're all super clever n stuff...
09:54 Reverend can you explain why git.latest state needs to have a "remote" set, and defaults to origin? the state that I'm running has a "name" of the remote... why does it need to think that that's origin...
09:54 Reverend O.o
09:55 dps joined #salt
10:10 babilen Reverend: 'origin' is a git default: https://git-scm.com/book/be/v2/Git-Basics-Working-with-Remotes
10:11 edrocks joined #salt
10:11 Reverend babilen: but the salt docs say it's supposed to add origin as a remote...
10:11 Reverend which it hasn't -_-
10:12 babilen Which docs say that and why do you think that "it" hasn't done that?
10:14 Reverend the salt docs say 'If the repository already exists, and a remote by this name is not present, one will be added.'
10:17 Reverend I just removed the repo, and asked salt to push it out again, and it appears to have added origin in. I take it salt doesn't check to see if origin is a thing before it tries to fetch. hmm/
10:19 oida joined #salt
10:27 DanniZqo joined #salt
10:31 dendazen joined #salt
10:42 Reverend Okay, so I think the plan is to nuke the existing git repos, and push from fresh. see if that fixes it permanently.
10:42 babilen Are you trying to pull into repos that can't be ff'ed?
10:45 Reverend I'm fetching to a bare repo from codecommit. It's a mirror, so FF doesn't really make much sense.
10:45 Reverend the error we get from git is that origin doesn't exist, which is true... for some reason. I would expect that salt would create it though, seeing as it says it will. derp. still, I've already nuked the repos :D gonna push them all now.
10:47 babilen Did you look into the many force_* arguments to git.latest?
10:47 Reverend haha
10:47 Reverend yeah
10:47 Reverend :D
10:47 Reverend dw about it babilen... something somewhere fucked up, so we'll just go through and fix it :)
10:47 Reverend thanks though.
11:08 aldevar left #salt
11:10 felskrone joined #salt
11:17 amcorreia joined #salt
11:19 numkem joined #salt
11:21 asyncsec joined #salt
11:31 KingOfFools joined #salt
11:32 Mattch joined #salt
11:32 KingOfFools Can I have total output for all minions at the end? For example, after I run salt-ssh 'web-server*' state.sls some_state, I would like to see at the end how many commands was completed, failed etc.
11:33 KingOfFools It's not that handy to scroll all the way up to see that.
11:34 KingOfFools I'm using "state_output: changes" if it matters.
11:36 numkem joined #salt
11:40 dnull joined #salt
11:41 _JZ_ joined #salt
11:47 Tantagel joined #salt
11:48 LondonAppDev joined #salt
11:54 numkem joined #salt
12:01 dnull joined #salt
12:09 _s4t0r1ch4ll3ng3 joined #salt
12:10 _s4t0r1ch4ll3ng3 joined #salt
12:12 evle1 joined #salt
12:18 s4t0r1ch4ll3ng3 joined #salt
12:21 coder joined #salt
12:22 coder hello
12:23 dendazen joined #salt
12:24 s4t0r1ch4ll3ng3 joined #salt
12:24 _s4t0r1ch4ll3ng3 joined #salt
12:25 Guest18011 -
12:27 Guest18011 left #salt
12:28 s4t0r1ch4ll3ng3 joined #salt
12:29 _s4t0r1ch4ll3ng3 joined #salt
12:30 zerocoolback joined #salt
12:31 noobiedubie joined #salt
12:31 mirko joined #salt
12:31 s4t0r1ch4ll3ng3 joined #salt
12:32 ______s4t0r1ch4l joined #salt
12:32 _____s4t0r1ch4ll joined #salt
12:32 ____s4t0r1ch4ll3 joined #salt
12:32 ___s4t0r1ch4ll3n joined #salt
12:32 __s4t0r1ch4ll3ng joined #salt
12:32 _s4t0r1ch4ll3ng3 joined #salt
12:32 _______s4t0r1ch4 joined #salt
12:32 ________s4t0r1ch joined #salt
12:32 _________s4t0r1c joined #salt
12:32 __________s4t0r1 joined #salt
12:32 ___________s4t0r joined #salt
12:32 ____________s4t0 joined #salt
12:32 _____________s4t joined #salt
12:32 ______________s4 joined #salt
12:32 _______________s joined #salt
12:32 ________________ joined #salt
12:37 deshke joined #salt
12:37 skeezix-hf joined #salt
12:38 candyman88 joined #salt
12:38 s4t0r1ch4ll3ng3 joined #salt
12:39 __s4t0r1ch4ll3ng joined #salt
12:39 _s4t0r1ch4ll3ng3 joined #salt
12:39 ____s4t0r1ch4ll3 joined #salt
12:39 ___s4t0r1ch4ll3n joined #salt
12:39 _____s4t0r1ch4ll joined #salt
12:39 ______s4t0r1ch4l joined #salt
12:39 _______s4t0r1ch4 joined #salt
12:39 edrocks joined #salt
12:39 ________s4t0r1ch joined #salt
12:39 _________s4t0r1c joined #salt
12:39 __________s4t0r1 joined #salt
12:39 ___________s4t0r joined #salt
12:39 ____________s4t0 joined #salt
12:39 _____________s4t joined #salt
12:39 ______________s4 joined #salt
12:39 _______________s joined #salt
12:39 ________________ joined #salt
12:39 deshke Aloha, is there some way to use gitfs as a backend for reactor? afaik pillars can be in a subdirectory as well as states but there is no thing for reactor - correct ?
12:42 s4t0r1ch4ll3ng3 joined #salt
12:42 __s4t0r1ch4ll3ng joined #salt
12:42 _s4t0r1ch4ll3ng3 joined #salt
12:43 _____s4t0r1ch4ll joined #salt
12:43 ____s4t0r1ch4ll3 joined #salt
12:43 ___s4t0r1ch4ll3n joined #salt
12:43 ______s4t0r1ch4l joined #salt
12:43 _______s4t0r1ch4 joined #salt
12:43 ________s4t0r1ch joined #salt
12:43 _________s4t0r1c joined #salt
12:43 __________s4t0r1 joined #salt
12:43 ___________s4t0r joined #salt
12:43 ____________s4t0 joined #salt
12:43 _____________s4t joined #salt
12:43 ______________s4 joined #salt
12:43 _______________s joined #salt
12:43 ________________ joined #salt
12:43 rdas joined #salt
12:44 kiltzman joined #salt
12:45 s4t0r1ch4ll3ng3 joined #salt
12:45 _s4t0r1ch4ll3ng3 joined #salt
12:45 __s4t0r1ch4ll3ng joined #salt
12:45 ___s4t0r1ch4ll3n joined #salt
12:45 ____s4t0r1ch4ll3 joined #salt
12:45 _____s4t0r1ch4ll joined #salt
12:45 ______s4t0r1ch4l joined #salt
12:45 _______s4t0r1ch4 joined #salt
12:45 ________s4t0r1ch joined #salt
12:45 _________s4t0r1c joined #salt
12:45 __________s4t0r1 joined #salt
12:45 ___________s4t0r joined #salt
12:45 ____________s4t0 joined #salt
12:45 _____________s4t joined #salt
12:45 ______________s4 joined #salt
12:45 _______________s joined #salt
12:45 ________________ joined #salt
12:46 toastedpenguin joined #salt
12:46 keldwud joined #salt
12:48 keldwud joined #salt
12:48 LondonAppDev joined #salt
12:49 Guest18011 joined #salt
12:49 Guest18011 hello
12:49 tellendil joined #salt
12:50 s4t0r1ch4ll3ng3 joined #salt
12:50 _s4t0r1ch4ll3ng3 joined #salt
12:50 07EAAUXRV joined #salt
12:50 ___s4t0r1ch4ll3n joined #salt
12:50 07EAAUXRT joined #salt
12:50 07EAAUXRS joined #salt
12:50 _____s4t0r1ch4ll joined #salt
12:50 ____s4t0r1ch4ll3 joined #salt
12:50 __s4t0r1ch4ll3ng joined #salt
12:50 ______s4t0r1ch4l joined #salt
12:50 _______s4t0r1ch4 joined #salt
12:50 ________s4t0r1ch joined #salt
12:50 _________s4t0r1c joined #salt
12:50 __________s4t0r1 joined #salt
12:50 ___________s4t0r joined #salt
12:50 ____________s4t0 joined #salt
12:50 _____________s4t joined #salt
12:50 ______________s4 joined #salt
12:50 _______________s joined #salt
12:50 ________________ joined #salt
12:53 c_g joined #salt
12:54 c_g joined #salt
12:58 ssplatt joined #salt
13:05 rem5 joined #salt
13:11 demize joined #salt
13:14 Neighb0ur joined #salt
13:18 ronnix joined #salt
13:19 asyncsec joined #salt
13:20 penguinpowernz joined #salt
13:28 racooper joined #salt
13:29 s_kunk joined #salt
13:29 hemebond left #salt
13:33 nicksloan joined #salt
13:38 rmohta joined #salt
13:44 edrocks joined #salt
13:44 Tantagel joined #salt
13:52 Ricardo1000 Hello
13:52 Ricardo1000 Any body home ?
13:57 KingOfFools nah
13:59 DammitJim joined #salt
14:00 PatrolDoom joined #salt
14:09 Drunken_Panda nope all at work
14:16 deshke does anyone know how to force salt-api to listen on both v4 and v6 ?
14:16 mpanetta joined #salt
14:16 deshke IPv4 / IPv6 *
14:18 edrocks joined #salt
14:20 brousch__ joined #salt
14:22 zerocool_ joined #salt
14:23 zerocoolback joined #salt
14:24 thinkt4nk joined #salt
14:30 ssplatt listen :::1?
14:33 ahrs joined #salt
14:33 ssplatt setting host to :: instead of 0.0.0.0 should listen on both v4 and v6
14:33 ssplatt is my guess.
14:34 sarcasticadmin joined #salt
14:34 asyncsec joined #salt
14:36 deshke tried that, but it does not come up `[salt.client.netapi][ERROR   ][2899] Did not find any netapi configurations, nothing to start`
14:36 LondonAppDev joined #salt
14:38 ssplatt host: “::”
14:38 deshke ah single quotes '::'
14:38 ssplatt using cherrypy?
14:39 deshke yep
14:39 deshke https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html
14:42 ssplatt it looks like cherrypy itself can handle teh “::”, so it’s probably just a matter of getting salt/yaml to not munch the “::”
14:42 ssplatt munch/munge
14:43 ssplatt alternatively, use something like nginx + uwsgi
14:44 ssplatt https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_wsgi.html
14:44 ssplatt https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_wsgi.html#using-a-wsgi-compliant-web-server  is the specific part i meant to link
14:45 greyeax joined #salt
14:47 penguinpowernz joined #salt
14:52 tom[] joined #salt
14:54 hatifnatt Hello. Is there any way to get list of active minions in Jinja similar to "salt-run manage.up"?
14:56 hatifnatt "salt '*' grains.get id" is close, but it return dict, may be there is some easier solution.
14:57 jas02 joined #salt
14:57 Cottser joined #salt
15:05 edrocks joined #salt
15:06 tapoxi joined #salt
15:11 Cottser joined #salt
15:12 s4t0r1ch4ll3ng3 joined #salt
15:12 fracklen joined #salt
15:12 Huggersage joined #salt
15:12 Serpentclever joined #salt
15:12 Huntermirror joined #salt
15:12 Arrowswift joined #salt
15:12 Scribecoral joined #salt
15:12 Thiefgeode joined #salt
15:12 Killerfir joined #salt
15:12 Glazerroad joined #salt
15:12 Napefoil joined #salt
15:12 Sentrybush joined #salt
15:12 Antlersheer joined #salt
15:12 Deerbattle joined #salt
15:12 Ladyveil joined #salt
15:12 Boltember joined #salt
15:12 Antlercarnation joined #salt
15:12 Apespring joined #salt
15:12 Scarglitter joined #salt
15:12 Bunnyglacier joined #salt
15:12 Edgestone joined #salt
15:12 Eyejelly joined #salt
15:12 Falconivy joined #salt
15:12 Ferretred joined #salt
15:12 Stingerrune joined #salt
15:12 Beecosmic joined #salt
15:12 Daggerspiral joined #salt
15:12 Palmblossom joined #salt
15:12 Viperivory joined #salt
15:12 _Horsewhip joined #salt
15:12 Sagesummer joined #salt
15:12 Foebubble joined #salt
15:12 Mothebony joined #salt
15:12 Gorillachrome joined #salt
15:12 Lasherwater joined #salt
15:12 Divebog joined #salt
15:12 Chillersteel joined #salt
15:12 Tonguegray joined #salt
15:12 Wyrmember joined #salt
15:12 Spikeeast joined #salt
15:12 Kittenbasalt joined #salt
15:12 Guest18011 hello
15:13 Knifeslime joined #salt
15:13 Hairdot joined #salt
15:13 Turnerproud joined #salt
15:13 Duckiris joined #salt
15:13 Deercloud joined #salt
15:13 Eyebrindle joined #salt
15:13 Fingercat joined #salt
15:13 Coyotevivid joined #salt
15:13 Fangstream joined #salt
15:13 Wolverineripple joined #salt
15:13 mat_ Mmm, I have two states, a foo: service.running, and a config file, cfg: file.managed. I have been trying to figure out how to make it so that when the cfg file is changed, the foo service is restarted, but I can't seem to figure it out
15:14 ssplatt mat_: look up “requisites” in the docs
15:14 mat_ I have a require: so that the service needs the file before it is ran, but if the file is changed, the service is not restarted
15:14 ssplatt - watch: is probably what you are looking for
15:14 ssplatt onchanges: also has similar functionality
15:15 mat_ I tried onchange, if the service is not running and the configuration file does not change, the service is not started
15:15 mat_ I'll try watch
15:16 englishm_llnw joined #salt
15:16 mat_ the problem with watch is that the doc has a big json dump that is there for "clarity" all I feel it does is make you look away because I don't have a clue of what it means
15:17 ssplatt ?
15:17 mat_ there https://docs.saltstack.com/en/latest/ref/states/requisites.html#watch
15:18 mat_ I admit that I saw that and went to  look for something else because it did not mean anything to me
15:19 ssplatt i guess as a beginner seeing the message bus could be scary. but you could’ve just skipped over that blurb and kept reading
15:19 ssplatt just below that “A good example of using watch is with a service.running state. When a service watches a state, then the service is reloaded/restarted when the watched state changes, in addition to Salt ensuring that the service is running."
15:20 mat_ I feel the example should be before the big blurb, because all it does is scare people away :-)
15:21 BlackBishop joined #salt
15:22 ssplatt possibly. i;d just say that page isn’t a part of a “quick start” or “tutorial” so it’s more aimed at explaining exactly what is going on so you can understand salt a whole better. but i see your point and still hear a lot of our devs complain the docs are too tough
15:22 deshke did anyone stumble upon "EauthAuthenticationError: Authentication failure of type "eauth" occurred for user xzy"  for salt-api ? user exists, can login via ssh,  and external auth is also configured
15:24 mat_ ssplatt, well, I did the quick start thing two weeks ago, and then, once I more or less got how it was all working, I went on to convert my puppet installation, so I'm reading the rest of the doc to do things the right way :-)
15:25 KyleG joined #salt
15:25 KyleG joined #salt
15:26 Inveracity joined #salt
15:28 deshke nvm found it, typo
15:29 cyborg-one joined #salt
15:33 penguinpowernz joined #salt
15:35 sp0097 joined #salt
15:42 fracklen_ joined #salt
15:43 prg3 joined #salt
15:43 greyeax joined #salt
15:43 dezertol joined #salt
15:45 tiwula joined #salt
15:53 kiltzman joined #salt
15:54 mpanetta joined #salt
15:55 fracklen joined #salt
15:56 rem5_ joined #salt
16:01 nicksloan joined #salt
16:02 fracklen joined #salt
16:04 nicksloan joined #salt
16:05 kiltzman joined #salt
16:05 sarcasticadmin joined #salt
16:05 kiltzman joined #salt
16:07 kiltzman joined #salt
16:08 kiltzman joined #salt
16:09 onlyanegg joined #salt
16:11 dnull joined #salt
16:11 dezertol joined #salt
16:12 anotherzero joined #salt
16:13 Praematura joined #salt
16:16 nicksloan joined #salt
16:17 DEger joined #salt
16:17 kiltzman joined #salt
16:24 impi joined #salt
16:26 nicksloan joined #salt
16:30 impi joined #salt
16:31 dnull joined #salt
16:34 impi joined #salt
16:34 woodtablet joined #salt
16:35 impi joined #salt
16:36 impi joined #salt
16:37 impi joined #salt
16:38 edrocks joined #salt
16:47 ChubYann joined #salt
16:48 lasseknudsen joined #salt
16:50 deuscapturus joined #salt
16:51 keldwud joined #salt
16:51 keldwud joined #salt
16:52 pipps joined #salt
16:53 asyncsec joined #salt
16:54 censorshipwreck joined #salt
16:54 impi joined #salt
16:55 pipps joined #salt
17:00 dnull joined #salt
17:04 Hybrid joined #salt
17:04 pipps joined #salt
17:08 onlyanegg joined #salt
17:10 Andy__ joined #salt
17:12 prg3 joined #salt
17:13 raspado joined #salt
17:14 impi joined #salt
17:15 Sketch hmm, can't i use cmd.run like {% if not salt['cmd.run']('command|grep foo') %} to wrap a state that i only want to run when the command returns false?
17:15 Sketch it doesn't seem to behave as expected
17:15 Sketch (well, when the grep returns false.  the particular command appears to always return true, even when the file it's attempting to operate on doesn't exist)
17:16 whytewolf Sketch: use https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.retcode
17:17 Sketch aha
17:18 whytewolf you could also use run_all and compar agenst the retcode portion of the return
17:20 Andy__ Hi all - should it be possible to use a matcher of type 'pillar' in a pillar top.sls file?
17:20 whytewolf Andy__: no
17:20 Andy__ According to the docs (https://docs.saltstack.com/en/latest/topics/pillar/), it should - "Salt pillars can use the same matcher types as the standard top file", but it doesn't work for me :/
17:21 Andy__ Ah
17:21 whytewolf Andy__: chicken, egg, which came first?
17:21 wendall911 joined #salt
17:22 Andy__ Well yeah, it did seem a bit magic.  I thought maybe it would figure things out in the order of the file, e.g. applying pillars to minions as it went down, anything relying on other pillars would need to be defined after those ones
17:23 whytewolf nope, because of how things work with rendering and top file exacution. it just isn't possable. top file is already run and figured out before any pillar file is actually looked at
17:24 Andy__ Fair enough, I think I was a bit optimistic to hope it would work, but didn't know what's going on under the hood
17:24 whytewolf it is possable to use ext_pillars as matches. however. but i personally have never done it so most likely will not be able to help down that path
17:25 Andy__ I'm trying to do this because of another chicken vs egg scenario - I want to use Salt to provision minions, as part of that provisioning I want to tell each minion what role, environment, etc it has.  According to the docs it seems pillars are the best way to do this key-value stuff, so I'd like to do that.  But then I'd like to make use of those attributes to apply other pillars, giving out different values to minions in different envi
17:25 spaceduck_ joined #salt
17:26 Sketch whytewolf: hmm, apparently i need to set python_shell: True to use pipes.  how do i pass that argument when using salt['cmd.retcode']?
17:27 mikecmpbll joined #salt
17:28 pipps joined #salt
17:28 whytewolf Sketch: salt['cmd.retcode'](cmd='command|grep foo',python_shell=true)
17:28 spaceduck_ hey all, do you have examples anywhere on doing multiprocessing via an execution module? I see that the normal Python multithreading module isn't supported, but I can't find a good example of doing separate threads/processes via the salt event handler
17:29 Andy__ I'm trying to start using Salt in a legacy system, where hostnames are used to determine roles, e.g. <ENV><ROLE>NN - so using the top file to say any host matching 'qa*' would get the qa.sls pillar, which includes 'env: qa'.  I'm then trying to use that 'env' attribute to apply other pillars.
17:32 Sketch whytewolf: aha, thanks.  that seems to invert the logic from what i was expecting, but it works
17:33 kiltzman joined #salt
17:36 Sketch side note: it's too bad file.managed doesn't support capabilities, as i'm using this to run setcap only if getcap doesn't return the required capabilities
17:37 nixjdm joined #salt
17:41 cliluw joined #salt
17:44 Trauma joined #salt
17:45 spaceduck_ >.> <.<
17:48 deuscapturus joined #salt
17:48 deuscapturus joined #salt
17:51 dezertol I seem to remember a command from the Salt Conference that would pull up doc..
17:52 ssplatt sys.doc
17:52 dezertol something like 'salt '*' doc cmd.run' ... or something and it would print out the options for it
17:52 dezertol ah..
17:52 dezertol that sounds right
17:52 dezertol thanks
17:54 fracklen joined #salt
18:06 druonysus joined #salt
18:07 toanju joined #salt
18:11 GMAzrael joined #salt
18:12 iggy Andy__: you can't use pillars in pillar
18:14 schemanic_ joined #salt
18:21 raspado joined #salt
18:25 pipps joined #salt
18:28 XenophonF joined #salt
18:35 aldevar joined #salt
18:37 cyborg-one joined #salt
18:37 LeProvokateur joined #salt
18:39 londo_ joined #salt
18:41 XenophonF joined #salt
18:44 thinkt4n_ joined #salt
18:45 pratch joined #salt
18:45 XenophonF joined #salt
18:47 greyeax is there a way to "reload" the master after changing the master config?
18:48 whytewolf greyeax: no, only restart
18:48 thinkt4nk joined #salt
18:48 whytewolf does not currently work on a reload
18:48 greyeax will that break anything and is it needed?
18:48 greyeax like i enabled presence events
18:48 greyeax in the config
18:48 iggy it's needed if you changed anything
18:48 rem5 joined #salt
18:49 greyeax is there a safe way to run a restart or...?
18:49 iggy it won't break anything really, the minions will all reconnect
18:49 whytewolf if you want your changees to take effect then it is needed
18:49 spaceduck_ anyone for my ? above? :/
18:49 whytewolf https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-minion-daemon-using-salt-after-upgrade this also works for the master
18:50 iggy spaceduck_: you can't that's not how salt works
18:50 iggy spaceduck_: depending on what you're doing, you could use the event system and just have multiple things triggered by the event
18:50 greyeax so i can basically just # systemctl restart salt-master?
18:51 whytewolf greyeax: yeap
18:51 whytewolf i do it all the time
18:51 greyeax aight
18:51 greyeax tyty
18:52 SaucyElf joined #salt
18:53 nixjdm joined #salt
18:55 CrummyGummy joined #salt
18:55 spaceduck_ iggy: gotcha, so we're writing some stress test modules, and the one in question spins up a series of threads to stress the CPU on a node
18:57 iggy yeah... you might try the mailing list to see if you get more ideas, I can't really think of a way to do that
18:57 spaceduck_ will do; thanks!
19:05 Praematura joined #salt
19:10 pbandark joined #salt
19:14 impi joined #salt
19:19 deuscapturus joined #salt
19:21 censorshipwreck joined #salt
19:21 whytewolf iggy: just got back, but yeah i can think of a way. if he wrote is multithreaded program compleatly seperate from salt and just called it from a module. allowing his program to be multithreaded and salt from blowing up
19:37 pppingme joined #salt
19:44 cyborg-one joined #salt
19:52 nixjdm joined #salt
19:52 nicksloan joined #salt
20:00 mikecmpbll joined #salt
20:01 pipps joined #salt
20:02 asyncsec joined #salt
20:03 pipps joined #salt
20:08 candyman88 joined #salt
20:13 ssplatt joined #salt
20:14 asyncsec joined #salt
20:15 pipps joined #salt
20:18 pipps joined #salt
20:24 candyman89 joined #salt
20:26 londo joined #salt
20:29 druonysus joined #salt
20:31 deuscapturus joined #salt
20:33 dyasny joined #salt
20:35 numkem joined #salt
20:39 rem5_ joined #salt
20:40 numkem joined #salt
20:42 asyncsec joined #salt
20:46 aldevar left #salt
20:52 nixjdm joined #salt
20:54 onlyanegg joined #salt
21:04 pipps joined #salt
21:08 censorshipwreck joined #salt
21:11 Lionel_Debroux joined #salt
21:22 prg3 joined #salt
21:28 nicksloan joined #salt
21:36 iggy hmm, I thought about that (just calling `stress` or whatever)... wasn't sure how the module would handle being basically hung on that one call
21:37 hashwagon Alright friends, is there a state I could use to wait for a directory to deploy before it 'file.managed' 's a configuration file to that directory?
21:37 whytewolf eh, seen some worse hanging issues with other states.
21:39 dezertol hashwagon you should be able to put a require on the next state
21:40 dezertol whatever order your looking to force..
21:43 hashwagon So my first state is a tomcat war file which will unpack a directory, this takes several seconds. So technically that state would complete before the directory unpacks. So what I was wondering is if there's a function to wait for that directory to populate.
21:45 hashwagon First state: copy tomcat war file to webapps directory, it unpacks which takes several seconds. Second state: when the directory unpacks throw this config file in.
21:46 c_g joined #salt
21:48 iggy an inotify beacon and events?
21:48 dezertol you'll want to use an orchestration runner for that..
21:49 iggy I don't think that'll work
21:49 iggy the problem with WARs is they aren't unpacked by salt, they are unpacked by the java process itself
21:50 dezertol ya, but why would you drop an .war on there that you had to modify "after" it was unpacked
21:51 dezertol I run a bunch of different tomcat clusters with a handfull of different apps/wars..
21:51 dezertol and in every case, the local.properties or server.xml or one of the other settings things.. can handle any config settings
21:51 pipps joined #salt
21:52 dezertol the actual contents of the war shouldn't need to be modified.. or so it has been my expirecne..
21:52 dezertol I am not a Java or Tomcat expert..
21:52 dezertol I'm just going off of my expirence with them
21:52 hashwagon A developer is sending these wars to us and they're being deployed to various locations. Each location would need a config file edited for IP addresses after it deploys.
21:53 dezertol and there isn't a way to pull that value out into local.properties or some other location?
21:53 hashwagon It would be nice if they pointed to an external configuration file, but I guess that's out of their scope unfortunately.
21:53 dezertol ya that sucks,
21:53 hashwagon I can look into that.
21:54 dezertol I'd ask if posslbe.. but outside of that.. using a Reactor
21:54 dezertol to kick of an orch runner might be your best bet..
21:55 hashwagon Thanks I'll check that out. On your war deployments do you use 'tomcat.war_deployed' or are you placing wars in the webapps dir?
21:55 dezertol as iggy indicated, using a beacon/event is the same thing as reactor
21:56 dezertol on one of the apps it's just a drop the war into the webapps folder
21:56 dezertol but on the others... it's more complicated..
21:56 dezertol we more or less have the entire tomcat structure and everything in svn
21:56 dezertol and extract it all into place then drop in the hand full of war files
21:57 dezertol they are plugins and modules and junk
21:57 hashwagon Ahh I see what you mean
21:57 dezertol but all the "settings" are still in local.propertis or the context.xml
21:57 dezertol etc..
21:58 dezertol either way.. if you can't get them to move the setting out (which should be fairly easy)..
21:58 dezertol we have had the dev team move settings like that out for us in the past
21:58 mpanetta Hey I just noticed that there is another PR that got merged that does part of what this does, but could I get reviews on: https://github.com/saltstack-formulas/powerdns-formula/pull/8 please? :)
21:58 saltstackbot [#8][OPEN] Sqlite3 backend + state and execution modules. |
21:58 dezertol but you might be stuck with it as you said scope issues etc..
21:59 jas02 joined #salt
21:59 mpanetta Actually is this the best place for that question?
22:00 dezertol in which case you'd have to load a little bash script to watch for that file to "exist" the send a salt-call to the event bus, and let a reactor kick off the next step
22:00 * MajObviousman reads through cmdmod.py, needs a shower now
22:00 dps joined #salt
22:00 iggy mpanetta: does it not conflict with the other PR mentioned (tl;dr)?
22:01 mpanetta iggy: It probably does at the moment
22:01 mpanetta Oh
22:02 mpanetta It isn't merged yet
22:02 mpanetta It is just approved
22:02 mpanetta sorry iggy
22:02 hashwagon Exactly. Nearing deadlines doesn't help with the process either. I like the salt-call to push to events idea. I'll see what I can do. Thanks for the input.
22:02 mpanetta So yeh it won't show conflicts but it probably has some.
22:03 mpanetta we both added support for sqlite3 backend, I went a bit further with it...
22:03 mpanetta iggy: ^
22:03 hemebond joined #salt
22:03 relidy Using salt-cloud with Linode, how would I get the *minion ID* set to a FQDN? "salt-cloud -p linode fqdn.domain.tld" errors out because Linode doesn't allow periods in the descriptive names.
22:04 mpanetta I have a test state sls I am using to test the modules as well, I just don't know where it should go.
22:04 mpanetta Maybe in the readme as an example...
22:04 hemebond relidy: Nothing allows periods in host names.
22:06 pcn For the thorium reactor, is there a runner or sometehing else to dump the register?
22:06 relidy hemebond: So what's the preferred method for getting the minion ID set to something that has them? Do people just not do that?
22:07 hemebond You can set the minion ID explicitly rather than letting it use the host name.
22:08 relidy Via salt-cloud? I didn't see an option for that.
22:08 hemebond relidy: https://docs.saltstack.com/en/latest/topics/cloud/config.html#minion-configuration
22:09 hemebond Pretty sure you can just put the ID in there.
22:10 hemebond I don't use it myself.
22:10 relidy I guess I did see that, but wrote it off since I'd need to create configuration stanzas for each minion (something I wasn't initially planning, but may just need to do)
22:10 relidy Okay, I'll circle back to trying to find best practices. Thanks for the quick sanity check.
22:11 whytewolf relidy: generally i believe normally you use a map file and put the minion config settings in the map file.
22:12 relidy whytewolf: Yeah, I was afraid of that. I was trying to avoid having filesystem artifacts for each minion, but that may be inevitable. Any chance the config can come from an external source, like a database?
22:13 whytewolf relidy: wellll, you could always do something like use salt to manage the files ...
22:13 druonysus joined #salt
22:14 relidy Wowzers that could get meta, but has some promise.
22:15 whytewolf https://docs.saltstack.com/en/latest/faq.html#salting-the-salt-master
22:15 dps joined #salt
22:16 pipps joined #salt
22:16 relidy Thanks whytewolf and hemebond. All food for thought.
22:17 debian1121 left #salt
22:24 sp0097 joined #salt
22:25 seanz joined #salt
22:25 aneeshusa joined #salt
22:31 vlebo joined #salt
22:39 iggy mpanetta: so you're saying PR 8 is more advanced and should be merged?
22:40 mpanetta iggy: I believe so.  But only WRT the sqlite3 stuff and the modules.
22:40 mpanetta iggy: What could be done, is the other PR could remove the sqlite3 bits, and then get merged, and if you like mine you can merge it as well.
22:41 iggy there, if I get yelled at, so be it
22:41 mpanetta hah ok
22:42 mpanetta iggy: Thanks :)
22:44 iggy in actuality, that other one should have been 2 PRs to begin with
22:44 iggy "I'm going to add 2 completely unrelated pieces of functionality to one PR!"
22:44 mpanetta hah, well technically mine should have been too :P
22:45 iggy ssshhh
22:45 mpanetta All though I guess the state and execution modules are more related to the sqlite3 backend than the addition of an os :P
22:45 mpanetta I used them to test the sqlite3db stuff :P
22:45 mpanetta iggy: haha
22:47 pcn Has anyone here used thorium?
22:47 mpanetta iggy: I guess I just got a bit obsessed when I was thinking how I should test the sqlite3 stuff...  I was "Oh lets just add a state and execution module so I can test in a state!" ...
22:59 mikecmpbll joined #salt
22:59 druonysus joined #salt
23:04 dendazen joined #salt
23:09 Tantagel joined #salt
23:09 DEger joined #salt
23:12 MajObviousman https://github.com/saltstack/salt/commit/3b9a8451450eebc10d5ee23a3e5b6864c50954d3  maddening! Took me forever to see it, and then I find out it was patched a mere 8 days ago
23:15 sarlalian joined #salt
23:24 brd joined #salt
23:24 iggy your nick next to that statement is mildly ironic (or whatever that other word is that people always confuse for ironic)
23:26 Tantagel its like 10000 spoons when all u need is a fork
23:26 * Tantagel rimshot
23:35 pipps joined #salt
23:44 aneeshusa joined #salt
23:49 nikdatrix joined #salt

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