Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-05-09

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

All times shown according to UTC.

Time Nick Message
00:00 raspado joined #salt
00:02 Vye_ joined #salt
00:02 ChubYann joined #salt
00:03 Zaunei joined #salt
00:03 druonysus joined #salt
00:05 asyncsec joined #salt
00:05 ahrs joined #salt
00:07 shoemonkey joined #salt
00:09 __number5__ joined #salt
00:14 dps joined #salt
00:15 oida_ joined #salt
00:19 demize joined #salt
00:22 thinkt4nk joined #salt
00:22 ConnorCG joined #salt
00:27 zerocoolback joined #salt
00:30 druonysus left #salt
00:35 thinkt4nk joined #salt
00:39 jab416171 joined #salt
00:58 onlyanegg joined #salt
00:59 sp0097 joined #salt
01:00 aneeshusa joined #salt
01:05 edrocks joined #salt
01:13 felskrone joined #salt
01:14 Nahual joined #salt
01:15 zerocoolback joined #salt
01:16 Terminus joined #salt
01:17 zerocoolback joined #salt
01:23 mikecmpbll joined #salt
01:26 rmelero joined #salt
01:26 Acy joined #salt
01:30 nahkiss joined #salt
01:32 jas02 joined #salt
01:38 prg3 joined #salt
01:47 nikdatrix joined #salt
02:16 raspado joined #salt
02:17 prg3 joined #salt
02:24 bbhoss joined #salt
02:45 aneeshusa joined #salt
02:47 prg3 joined #salt
03:00 shoemonkey joined #salt
03:07 edrocks joined #salt
03:10 toastedpenguin joined #salt
03:16 dnull joined #salt
03:17 onlyanegg joined #salt
03:25 aneeshusa joined #salt
03:26 tcolvin joined #salt
03:27 BOyK joined #salt
03:38 onlyanegg joined #salt
03:40 chatter29 joined #salt
03:40 chatter29 hey guys
03:40 chatter29 allah is doing
03:40 chatter29 sun is not doing allah is doing
03:40 chatter29 to accept Islam say that i bear witness that there is no deity worthy of worship except Allah and Muhammad peace be upon him is his slave and messenger
03:40 hemebond sod off
03:41 chatter29 joined #salt
03:47 nikdatrix joined #salt
03:48 chatter29 joined #salt
03:54 Praematura joined #salt
04:11 mpanetta_ joined #salt
04:17 prg3 joined #salt
04:33 prg3 joined #salt
04:37 pipps joined #salt
04:40 pipps joined #salt
04:50 dnull joined #salt
04:55 preludedrew joined #salt
04:56 treaki_ joined #salt
04:57 felskrone joined #salt
05:05 shoemonkey joined #salt
05:09 edrocks joined #salt
05:13 packeteer joined #salt
05:13 cyborg-one joined #salt
05:16 golodhrim|work joined #salt
05:21 rdas joined #salt
05:31 impi joined #salt
05:32 jas02 joined #salt
05:44 scooby2 joined #salt
05:48 preludedrew joined #salt
05:48 nikdatrix joined #salt
05:51 mpanett__ joined #salt
05:55 gnomethrower joined #salt
06:05 jas02 joined #salt
06:06 jas02 joined #salt
06:07 do3meli joined #salt
06:07 do3meli left #salt
06:09 jas02 joined #salt
06:20 impi joined #salt
06:22 Rumbles joined #salt
06:28 linovia joined #salt
06:32 bvcelari joined #salt
06:45 ravenx joined #salt
06:45 ravenx i have a salt formula which are made with like 5-7 states and one of them, step number 6 posts to slack, with an "onfail:" requisite.
06:46 ravenx which tells me if steps 1-5 has failed as i put those states under the onfail:
06:46 ravenx and it does work just fine.   the problem is that:  it tends to run state #7 as well, which is a "post a success message on slack"
06:47 ravenx how can i make my formula immediately exit after #6 has been ran?
06:47 hemebond ravenx: You don't. Set your "success" state to require success on all the regular states.
06:48 ravenx hemebond: so the success message should only run if and _only_ if steps 1-5 is a success?
06:48 hemebond yeah
06:48 ravenx wow
06:48 ravenx that is such a simple/elegant solution
06:48 ravenx and here i was googlling for a bunch of exit codes/requisites.
06:48 ravenx thanks hemebond
06:50 ravenx hemebond: though there is no "on success" requisite
06:50 ravenx am i missing somethign?
06:55 fracklen joined #salt
06:59 EvaSDK ravenx: use require
06:59 EvaSDK that's what it means :)
07:02 DEger joined #salt
07:03 scooby2 joined #salt
07:04 ravenx EvaSDK: thank you :)
07:05 rgrundstrom Good morning.
07:06 shoemonkey joined #salt
07:07 aldevar joined #salt
07:08 ravenx good morning
07:11 rgrundstrom Is it possible to add pillar data into a diffrent pillar?
07:13 flughafen joined #salt
07:18 o1e9 joined #salt
07:20 toanju joined #salt
07:23 rgrundstrom left #salt
07:23 rgrundstrom joined #salt
07:23 pbandark joined #salt
07:26 thijn__ So.. i managed to get the
07:27 JohnnyRun joined #salt
07:27 thijn__ {% if grains['id'] == 'minion' %} working leaving me with empty lines. is there a way to clean those up withing SAlt/jinja?
07:27 thijn__ https://gist.github.com/anonymous/6e79b6c140fd55b4cf542d416e396d88
07:27 fracklen joined #salt
07:28 fracklen joined #salt
07:30 flughafen how do i get minion ids in a salt state that have a specific grain...
07:34 upb thijn__:
07:34 upb You can also strip whitespace in templates by hand. If you add a minus sign (-) to the start or end of a block (e.g. a For tag), a comment, or a variable expression, the whitespaces before or after that block will be removed:
07:35 armyriad joined #salt
07:38 rgrundstrom I am trying to simplify the configuraton of users to my minions. Here is what i have today and what i want to do. Anyone that can give me an idea or solution?
07:38 Elsmorian joined #salt
07:38 rgrundstrom https://justpaste.it/16fcx
07:40 armyriad joined #salt
07:40 Xenophon1 joined #salt
07:40 impi joined #salt
07:49 nikdatrix joined #salt
07:53 mikecmpbll joined #salt
07:58 oida joined #salt
07:58 nikdatrix joined #salt
08:04 thijn__ upb: re: thanx.. will look into that..and try some more.. thanx!
08:07 bdrung_work joined #salt
08:08 simonmcc joined #salt
08:09 Rumbles joined #salt
08:10 geomacy joined #salt
08:12 s_kunk joined #salt
08:15 zulutango joined #salt
08:16 OliverMT joined #salt
08:18 raspado joined #salt
08:30 Mattch joined #salt
08:30 colttt babilen: Hi, i try it with pillars to manage my certificates, but it doesn't work.. https://paste.debian.net/931543/
08:30 flughafen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event  <- is it possible to do that without a salt master?
08:51 Reverend whytewolf think i've found some useful info... https://hastebin.com/jepuzeduvi.pl
08:51 babilen flughafen: I don't think so
08:52 ronnix joined #salt
08:52 toanju joined #salt
08:52 babilen colttt: Might be the dots in there
08:53 flughafen ah babilen .  i frogot about the reset thing.
08:53 flughafen that this is a masterless
08:56 Reverend babilen... you wouldn't have seen that EBADF issue before would you>?
08:58 candyman88 joined #salt
08:59 babilen Reverend: EBADF?
08:59 Reverend yeah, getting hundreds of bad file descriptors on this machine :(
08:59 Reverend not sure if that's normal or not
08:59 Reverend wait, i think a salt-minion update might have fixed it...
08:59 Reverend you know how I was saying that everything was taking 20 billion years to update files yesterday?
09:00 Rumbles joined #salt
09:00 babilen aye
09:00 Reverend aye to being normal, or seeing it before, or me moaning? :P
09:02 babilen colttt: I would recommend to remove the grains['fqdn'] bit for now, rename it to something simple and try again
09:03 mikecmpbll joined #salt
09:07 shoemonkey joined #salt
09:10 wiqd joined #salt
09:13 ronnix joined #salt
09:15 mbologna joined #salt
09:20 N-Mi__ joined #salt
09:29 nethershaw joined #salt
09:33 akhilm946 joined #salt
09:33 zerocoolback joined #salt
09:34 colttt babilen: Rendering SLS 'certificate' failed, render error:
09:34 colttt expected a comment or a line break, but found '-'; line 5 -- but a certificate starts with ----- BEGIN CERT -----
09:35 akhilm946 left #salt
09:35 zulutango joined #salt
09:38 candyman88 joined #salt
09:38 xet7 joined #salt
09:48 haam3r colttt: Indented by four spaces?
09:49 mikecmpbll joined #salt
09:52 N-Mi__ joined #salt
09:54 colttt haam3r: now I have a new line right after the '|' but it still fails, it looks like  because of this: https://github.com/saltstack/salt/issues/5480
09:54 saltstackbot [#5480][MERGED] Multiline strings tricky when used with ``file.managed`` ``contents`` param | This one is best articulated with an example. In short, if the `contents` param of `file.managed` is a function call that returns a multi-line string the template indentation is wrong....
09:55 colttt I just want to manage my ssl-certs in pillars per host..
10:03 haam3r colttt: Could you make a gist or paste of your code somewhere?
10:05 wych42 joined #salt
10:06 babilen colttt: I guess that you have to ensure that it is indented/formatted correctly. Something like: http://paste.debian.net/931559/ maybe?
10:06 babilen (adjust indentation as necessary)
10:08 babilen Also |yaml_encode has been used to great effect in those situations IIRC
10:08 babilen Actually try that first
10:21 rgrundstrom babilen: Are you here?
10:23 BlackBishop joined #salt
10:27 dendazen joined #salt
10:33 dRiN joined #salt
10:38 babilen rgrundstrom: Just ask if you have a question
10:39 chowmein__ joined #salt
10:40 felskrone joined #salt
10:41 ronnix joined #salt
10:42 rgrundstrom I am trying to simplify user administration. Ive created a pillar file that contains my users. Problem I have is that i want to call a sudoers formula with the same {{user}} as im using in the users. That way we can easly create default and administrator users.
10:42 rgrundstrom My config files: https://justpaste.it/16fjy
10:45 babilen rgrundstrom: I see two options: 1. Use the users-formula for this (cf. https://github.com/saltstack-formulas/users-formula/blob/master/pillar.example#L36) or 2. Define both sudo rules (for sudoers formula) and user settings in the same pillar SLS (You'd have, at least, two top-level keys in there then). This data will then be used in different, unrelated, states.
10:49 babilen Optionally for 2.: Tie the states together with requisites
10:53 rgrundstrom babilen: Thank you. Ill have a look and see what i can work out.
10:59 Siva joined #salt
11:01 Guest49246 Any module to create a Oracle database available ?
11:08 shoemonkey joined #salt
11:10 evle joined #salt
11:11 edgr joined #salt
11:13 Xenophon1 nick XenophonF
11:13 XenophonF whoops sorry
11:13 tyagiprince joined #salt
11:14 tyagiprince hey.. I am facing trouble in passing pillars to publish.publish module.. can somebody help me out here? thanks
11:14 tyagiprince @channel @all
11:14 edrocks joined #salt
11:14 lorengordon joined #salt
11:17 dunz0r tvinson_: This isn't slack, so @channel/@all wouldn't work... also, it would be pretty rude to highlight EVERYONE
11:19 tyagiprince dunz0r: I am sorry about that..
11:19 dunz0r tyagiprince: Any error messages?
11:19 tyagiprince Adding the error I am getting..
11:19 tyagiprince The minion function caused an exception: Traceback (most recent call last):   File "/usr/lib/python2.7/site-packages/salt/minion.py", line 1363, in _thread_return     return_data = executor.execute()   File "/usr/lib/python2.7/site-packages/salt/executors/direct_call.py", line 28, in execute     return self.func(*self.args, **self.kwargs)   File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 933, in sls     high_,
11:19 tyagiprince essentially it says Invalid IPv6 url
11:20 dunz0r tyagiprince: Paste the full output on https://gist.github.com
11:20 tyagiprince https://gist.github.com/tyagiprince/a6e3470a8d15620a6107363e8424bfdb
11:21 dunz0r Well... could it be an invalid IPv6 URL perhaps?:)
11:21 dps joined #salt
11:22 tyagiprince I am not using any urls here.. I think the regex is fucked up and its trying to parse it as an url..
11:22 fleaz dunz0r: depends on your setup. Most of the people I know also have all/channel configured in their IRC server. So yeah, I just got a highlight ;)
11:25 dunz0r tyagiprince: Hmm, what's the command / state you/re trying to run / apply?
11:26 tyagiprince __salt__['publish.publish'](tgt=' or '.join(map(lambda x: 'E@' + x, minion_list)), fun='state.sls', arg="['mods=deploy.test','queue=True','pillar=\"{\'app_name\':\'appname1\'}\"']", expr_form='compound', timeout=1000)
11:28 dps_ joined #salt
11:30 Reverend babilen whytewolf - updating the master and the minion apparently fixed the horrible laggy issues.
11:30 Reverend thanks for the help boys and girls ;)
11:33 tyagiprince dunz0r: I think there's some problem with the way I am passing pillars around..
11:34 dunz0r Yeah, I suspect that as well. I can't tell what it is just by looking at it though, sorry :/
11:34 LondonAppDev joined #salt
11:53 Praematura joined #salt
11:57 Xenophon1 joined #salt
12:02 tyagiprince joined #salt
12:03 tyagiprince hey guys.. need help in passing pillars to state through publish module.. I cant find this in documentation.. can sombody please help!!!
12:06 thinkt4nk joined #salt
12:17 tooth joined #salt
12:20 evle joined #salt
12:23 numkem joined #salt
12:31 Nahual joined #salt
12:33 thinkt4n_ joined #salt
12:42 spicyJalapeno joined #salt
12:43 edrocks joined #salt
12:45 jas02 joined #salt
12:45 fracklen joined #salt
12:48 colttt babilen: ok, i do that, but now i get an other error.. http://paste.debian.net/931583/
12:49 colttt sorry, but why is it so complicated to "just" copy a file from a pillar to somewhere?!
12:49 valkyr2e joined #salt
12:56 Neighbour colttt: Could you explain to me what you're trying to do? (possibly with an example?) It sounds like something I've done in the past (create a single cert file with multiple pillar values as contents)
12:57 rgrundstrom Any ideas why i get this?
12:57 rgrundstrom 'utf8' codec can't decode byte 0xc3 in position 51: invalid continuation byte
13:03 Neighbour rgrundstrom: without context it's hard to say, but some file is interpreted as having an UTF-8 encoding, but it either does not, or contains invalid UTF-8 encoded data
13:03 XenophonF colttt: if you want to store keymat in pillar (which I do), then it's a simple matter of either using the contents_pillar kwarg to file.managed or putting something like `{{ salt.pillar.get('key') }}` into a jinja template
13:04 XenophonF you can use base-64 encoding to embed binary files in YAML, too
13:04 XenophonF or you can use the filetree ext_pillar
13:05 rgrundstrom Neighbour: log files are not much help eather im afraid.
13:05 Reverend do all states tolerate "names" over "name" ?
13:05 Neighbour colttt: See if this will help you: http://paste.debian.net/hidden/da902191/
13:05 Neighbour Reverend: no
13:05 Reverend darnit
13:06 Reverend thanks Neighbour
13:06 Reverend :)
13:06 XenophonF just say "no" to the indent filter
13:06 Neighbour np :)
13:06 Neighbour XenophonF: it works peachy, so why should I say 'no'?
13:06 XenophonF much, much safer to use a format string and then filter that through yaml_encode
13:07 toanju joined #salt
13:07 Neighbour XenophonF: If you have a working example that does the same thing using the method you prefer, I'm very interested to see it :)
13:08 thinkt4n_ joined #salt
13:09 shoemonkey joined #salt
13:09 XenophonF not quite the same, but similar - https://github.com/search?q=org%3Airtnog+yaml_encode&amp;type=Code
13:10 XenophonF for file templates like that, I recommend avoiding `contents` except for very simple things (think one-liners)
13:10 XenophonF again, safer to use a proper templated file
13:10 rgrundstrom Neighbour: Found the problem.
13:11 Neighbour rgrundstrom: ah, good...what was it?
13:11 amcorreia joined #salt
13:11 XenophonF if you're going to concatenate certificates like that (used for chaining), better to do that in the pillar data first
13:11 XenophonF which is how I do it - https://github.com/irtnog/apache-formula/blob/master/apache/init.sls#L97
13:11 Inveracity joined #salt
13:11 jas02 joined #salt
13:11 c_g joined #salt
13:12 hemebond left #salt
13:12 XenophonF I dunno - I got bit by serialization/deserialization issues in the past, especially when writing templates that work on both Unix and non-Unix operating systems
13:13 XenophonF it's a pet peeve of mine - I call him Billy, and he is such a good boy, yes you are, you are a good boy!
13:13 XenophonF ahem
13:13 Neighbour XenophonF: I don't see where that example concatenates multiple certs into one file...could you point it out?
13:14 XenophonF the Pillar data has them concatenated already
13:14 Neighbour ah
13:14 XenophonF https://github.com/irtnog/salt-pillar-example/blob/master/www/example/com/init.sls#L26
13:15 XenophonF admittedly, for apache that requires 2.4.8 or newer
13:15 colttt Neighbour: at the moment my config looks like that (in the meantime I fixed some little typos) https://paste.debian.net/931543/
13:15 XenophonF (dunno about other web app servers - and for IIS it's completely different)
13:18 Neighbour colttt: And are you stlil getting the same error (at line 42)?
13:19 rgrundstrom Neighbour: Something seems broken with the formula i added for test puposes....
13:20 yuhl______ joined #salt
13:23 Neighbour colttt: I think the error lies at lines 53,54 of your paste...Even though XenophonF would not approve, I think using the indent-filter would fix your issue
13:23 XenophonF :-D
13:24 colttt Neighbour: at the moment it looks like this, with the following error: https://paste.debian.net/931590/
13:24 XenophonF OMG import_text is a thing?
13:25 XenophonF how did I miss that?  is that new?
13:25 Sketch neat
13:25 babilen XenophonF: It's not new, no .. I recommended that to colttt yesterday
13:26 * XenophonF runs off to re-write a bunch of Pillars
13:26 Sketch https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html
13:26 Sketch apparently you can also import_yaml or import_json
13:26 babilen XenophonF: See https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#gather-external-data for details
13:26 XenophonF funny thing is, i use import_yaml and import_json all the time
13:27 asyncsec joined #salt
13:27 XenophonF and I was wondering just the other day, wouldn't it be nice if I could just import a file?
13:33 jas02 joined #salt
13:34 Neighbour XenophonF: you can even import yaml or json, modify it in jinja, and write it to a file again (like the pillar.top file for example :P)
13:35 Neighbour colttt: could you change line 8 to end with | instead of |- ?
13:39 colttt Neighbour: done, but the same error message
13:42 Neighbour colttt: ok, how about adding two spaces to the start of line 9, so the "{{" does not start at the same position as "ssl-cert: |"
13:43 Neighbour You need to indent line 9 with the same amount as you specify in the indent filter, as well has indent it more than the line above that contains the |
13:44 rem5_ joined #salt
13:44 impi joined #salt
13:48 colttt Neighbour: what do you mean with that? now i used 4 instead of 8..
13:48 * colttt is feeling like https://vignette2.wikia.nocookie.net/glee/images/2/27/Burn_computer.gif/revision/latest?cb=20121109111615
13:50 cyborg-one joined #salt
13:52 PatrolDoom joined #salt
13:53 dps joined #salt
13:55 jvelasquez joined #salt
13:55 Acy joined #salt
13:55 Neighbour colttt: look at http://paste.debian.net/hidden/da902191/   The {{ starts at the same indent as is specified in the indent filter (6 spaces before it)
13:56 Neighbour and the lines with {{ are indented more than the line above it ending with |
13:59 DammitJim joined #salt
14:04 nicksloan joined #salt
14:08 colegatron joined #salt
14:10 noobiedubie joined #salt
14:19 greyeax joined #salt
14:20 raspado joined #salt
14:22 Sketch hmm, how can i set a jinja variable to be an empty string?  if i set variable = '' or "" i get None
14:24 spicyJalapeno does anyone know how many or how long minion jobs are cached if you set cache_jobs: True ?
14:29 dps joined #salt
14:33 mikecmpbll joined #salt
14:35 LondonAppDev joined #salt
14:37 armyriad joined #salt
14:38 toastedpenguin joined #salt
14:38 five04tluv updated our SL 7.3 salt-master to 2016.11.4 and getting "WARNING: yacc table file version is out of date" when running salt commands. My python-pycparser version is up-to-date at 2.14-1.el7
14:39 Sketch kinda surprised variable|string doesn't work
14:39 Sketch {{ variable|string }}
14:41 colttt Neighbour: sorry you snippet doesnt exist anymore..
14:42 Neighbour colttt: http://paste.debian.net/931611/
14:42 Neighbour I set it to a 1-hour timeout
14:44 Shirkdog joined #salt
14:45 colttt Neighbour: ok thanks, i will check this tomorrow, now i have "feierabend"
14:45 mrrmann joined #salt
14:46 Neighbour colttt: You'd better copypaste it somewhere then, because in one hour the snippet won't exist anymore
14:47 XenophonF colttt: that's better than having feuerabend
14:50 _JZ_ joined #salt
14:58 * Sketch gives up, just wraps it in an {% if %}
14:58 Sketch it doesn't seem like there's any way to force a variable to be a string
15:04 rewbycraft Sketch: Define "force to be a string"
15:04 rewbycraft What are you trying to achieve by doing that?
15:05 XenophonF Sketch: try {{ variable|yaml_encode }}?
15:05 Sketch rewbycraft: trying to pass an empty string as a jinja variable
15:05 XenophonF b/c `foo: {{ '' }}` will render as `foo: `
15:05 Sketch (for file.managed)
15:06 XenophonF IIRC
15:06 rewbycraft Try with yaml_encode, another option to try would be the quote filter
15:06 Sketch {% set var = '' %}  ... {{ var }} renders as None
15:06 XenophonF stuff like this is why i always use the yaml_encode filter
15:07 rewbycraft Actually
15:07 rewbycraft Wouldn't this work? {{ foo if foo is not None else '' }}
15:07 Sketch hmm, maybe
15:07 rewbycraft I vaguely recall using that for something at some point
15:08 rewbycraft Another option could be the "default" filter
15:08 Sketch yaml_encode works
15:08 XenophonF in jinja the special constants true, false, and none are lower case
15:09 XenophonF http://jinja.pocoo.org/docs/dev/templates/#literals
15:10 shoemonkey joined #salt
15:10 XenophonF Sketch: and that's why i always tell people to use yaml_encode
15:10 XenophonF :-D
15:10 Sketch "Everything between two double or single quotes is a string." is not true when there's nothing between the quotes ;)
15:10 Sketch well, i guess it's _technically_ true, since there's nothing there...
15:10 heaje_ joined #salt
15:13 cscf Sketch, it's still a string type, it just has a value of emptystring
15:13 Sketch cscf: but it renders as None
15:13 cscf At least in most languagues
15:13 Sketch which makes me think it's probably not being rendered as a string
15:13 cscf Sketch, ah, well that's what you get when you throw out types in exchange for convenience :P
15:14 Sketch right
15:14 Sketch i was kinda surprised |string didn't work.  i also tried |join and just appending ~ ""
15:14 mikecmpbll joined #salt
15:14 babilen colttt: Did you try the |yaml_encode way as I suggested earlier? (i.e. ssl-cert: {{ cert|yaml_encode }}
15:15 Sketch presumably none of them worked because it wasn't as tring
15:15 Sketch oh well, hooray for yaml_encode :)
15:16 tapoxi joined #salt
15:16 raspado joined #salt
15:18 sarcasticadmin joined #salt
15:19 hashwagon joined #salt
15:24 dezertol joined #salt
15:27 keltim joined #salt
15:30 anotherzero joined #salt
15:31 chron0 hmm, I'd like to use network.managed to change the MTU of eth0 - but I don't want to keep/change the rest of the configuration
15:31 chron0 but when I just supply - mtu: 1476 it fails with Missing parameter type for state network.managed
15:32 chron0 any ideas how I could change the MTU of the interface?
15:33 rmelero joined #salt
15:35 Sketch have you tried setting type:
15:36 Sketch i doubt your interface type is changing, so it probably won't hurt to set it
15:37 chron0 Sketch: no, I just started working on the issue and have been googling without any sensible hint so far, I'll try to add it, thanks already
15:38 evle1 joined #salt
15:38 nicksloan joined #salt
15:44 mugundan joined #salt
15:47 relidy Can anyone help explain environments? I'm trying to set up a situation where I have one master. I'd like to have a stable branch of my states and pillar data that is used by default (base), but I'd also like to be able to have a development set of states and pillar data that I can enable as needed for specific minions. I'm fine with having to pass a command line argument each time I want the development states (e.g. salt 'minion-1' state.highstate
15:47 relidy saltenv=develop).
15:47 relidy I can't seem to figure out the combination of top file structure and merging strategy to make that work. The states/pillars are all in a git repo, but I'm not using GitFS for it at the moment (just cloned copies in two places on the correct branches). The top files are intentionally the same (it's the same file, just in different git branches). I think everything is fine if I specify an env, but where things get weird is if I don't. A state.show_sls
15:47 relidy lists states in both environments (but I'd only want the base env). Example files: https://gist.github.com/rhoths/95a100927166d6c71650ac0aa1a8b306 Help?
15:49 relidy state.show_top (not show_sls)
15:54 onlyanegg joined #salt
15:56 fracklen joined #salt
15:56 Praematura joined #salt
15:59 Tantagel joined #salt
16:00 chron0 Sketch: hmm :) I think it was a godd idea, but the host is now offline :)
16:02 aldevar left #salt
16:07 XenophonF relidy: for salt states, you have to use gitfs
16:07 XenophonF that's the only way branches will be mapped to environments
16:07 XenophonF for pillar, the story is more challenging especially if you use pillar itself for targeting
16:08 relidy XenophonF: Would not manually cloning two copies of the repo into the filesystem not accomplish the same task sans-GitFS?
16:08 XenophonF for that you'd probably need some combination of the git ext_pillar and pillarstack, or at least that's the route i'm going to head down in my Copious Free Time
16:09 XenophonF that would work (and then set things up in file_roots accordingly), but gitfs just DTRT so why not go directly there?
16:10 relidy I think gitfs is eventually in the cards, I just needed a simplified test system and that introduces another layer of things that could go wrong.
16:10 relidy My issue is how to get minions to pick up the appropriate states. I just can't seem to wrap my head around how the env targeting is supposed to work.
16:11 XenophonF ah
16:12 XenophonF well, here's how I do it: https://github.com/irtnog/salt-pillar-example/blob/master/top.sls
16:12 XenophonF and: https://github.com/irtnog/salt-states/blob/master/top.sls
16:12 rewbycraft pillarstack... sounds interesting
16:13 XenophonF using hostnames as keys like that probably doesn't scale to beyond 100s of servers
16:15 XenophonF I don't use environments with Pillar b/c there's no easy way to override Pillar data using state.apply outside of specifying it on the command line
16:15 XenophonF unlike how you can pass saltenv=... to state.apply
16:16 relidy XenophonF: What merging strategy do you use with that setup (and does it matter)?
16:17 XenophonF whatever the defaults are - I didn't change it
16:17 dyasny joined #salt
16:17 XenophonF if I need to override Pillar data for testing, I'll either commit it (and then revert the commit if testing fails) or specify it on the command line.
16:18 tru_tru joined #salt
16:18 XenophonF since I generally have completely separate dev/test/prod systems, and since test mostly == prod, it mostly works out
16:20 pipps99 joined #salt
16:21 pipps99 joined #salt
16:21 relidy Apparently I need to go look at the matching rules again. The 'I@environment:...' is matching on pillar data?
16:21 XenophonF right
16:21 XenophonF it's a compound match
16:21 dps joined #salt
16:22 relidy Whew. Okay. Thanks a ton for the examples. I think I need to sit down and run that through my head a bit before asking more questions. Thanks so much.
16:22 ssplatt joined #salt
16:23 XenophonF NP - and don't get too hung up on environments
16:23 XenophonF not everybody uses them or even recommends them
16:24 ahrs joined #salt
16:25 swa_work joined #salt
16:25 relidy Is there a recommended alternative for testing new/altered states that avoids using environments on a single master?
16:27 relidy I feel like I'm drowning in options, sometimes. Salt seems to give you plenty of rope, lots of types of knots, and even the tree to hang yourself from.
16:27 ahrs joined #salt
16:30 lorengordon joined #salt
16:31 pipps joined #salt
16:32 nicksloan joined #salt
16:33 thinkt4n_ joined #salt
16:44 pipps joined #salt
16:45 thinkt4nk joined #salt
16:48 * MTecknology screams
16:48 MTecknology http://dpaste.com/3BNDJC5
16:49 dps joined #salt
16:49 fracklen joined #salt
16:49 raspado if anyone is familiar with openstack, can I modify the cloud config post provision within the guest OS? Its centos and it automatically adds a swap volum in /etc/fstab
16:49 MTecknology because... -name: {{ salt['pillar.get']('jabberd2:pkg_version', 'some-default') }} is just too easy, apparently.  (that's not showing the over-use of a {{self}} var either.
16:50 whytewolf node_cfg.get? thats a new one. I'm used to config.get
16:50 impi joined #salt
16:51 impi joined #salt
16:51 MTecknology whytewolf: it's a custom module that parses a data structure (dict) available from pillar because pillar was like totally not good enough for their super advanced requirements.
16:51 pipps99 joined #salt
16:52 whytewolf oh this is $client.. got it
16:52 MTecknology whytewolf: the best part is that it's only a 16,000 line yaml file that's shared with every single minion
16:58 michaelb What call do I make to get a variable from Powershell - on a minion - into a pillar? - I presume I have to call the script and suck in the input from $something
16:59 woodtablet joined #salt
17:00 Trauma joined #salt
17:00 thinkt4n_ joined #salt
17:00 michaelb (that's got to be infinitely better than a 16,000 line json file)
17:02 ChubYann joined #salt
17:02 MTecknology from powershell to pillar?
17:02 MTecknology I don't think I understand
17:03 michaelb so in Powershell I have $Somevariable = 5
17:03 michaelb so I want to get that variable, into a Pillar on Salt, so I can use it elsewhere / later etc
17:04 mudfly joined #salt
17:07 rmelero prob a mine function
17:07 rmelero https://docs.saltstack.com/en/latest/topics/mine/
17:10 shoemonkey joined #salt
17:12 brousch__ joined #salt
17:14 whytewolf michaelb: just to be clear. you want a variable that is already on the minion. sent to the master. to be put back on the same minion?
17:15 michaelb the variable could be something I've taken from an external function - so its just a random piece of data collected from PS
17:16 whytewolf not what i asked
17:16 michaelb it could be that minion, or another
17:16 edrocks joined #salt
17:16 whytewolf why pillar?
17:17 michaelb primarily the same one
17:17 michaelb actually a mine would work too (I think)
17:17 whytewolf a mine might be better. that is why i was asking
17:18 whytewolf or might not even be needed at all and you just access the variable locally. say save it to a grain
17:18 michaelb that's the part I'm not sure about, how to pass it back
17:19 whytewolf yes. and the thing i was asking was WHY pass it back
17:19 whytewolf if it is to be used in another system i can see a mine
17:19 michaelb there are a few occasions where other machines would need the data
17:19 whytewolf okay. then a mine gets that part out of the way
17:20 whytewolf save the data to a grain.
17:20 whytewolf then mine that grain
17:24 michaelb How do I get the data into a grain? (I'm rather new to Salt)
17:27 whytewolf what is the data?
17:28 whytewolf is it part of a script or an enviroment variable?
17:28 whytewolf honestly this part is more about your system then salt.
17:28 ekristen joined #salt
17:29 whytewolf if it is part of a script just have the script add a bit about salt-call grains.set
17:30 michaelb I've just found that bit of the documentation - its starting to make sense now - thank you :)
17:33 ekristen I have a custom salt-runner and it returns a json and seems to be successful? But salt stays the JID was not successful
17:33 asyncsec joined #salt
17:34 whytewolf ekristen: add -l trace to you rcommand while running it
17:35 cyteen joined #salt
17:40 aldevar joined #salt
17:40 chron0 if I use network.managed and give only - mtu: 1476 and - type: eth in my state, it seems that salt erases the rest of the running interface config and thereby took the box offline
17:41 whytewolf chron0: well ... yeah you told it to only have an mtu ...
17:42 whytewolf it did exactly what you said
17:42 chron0 this is a VPS, so I have little control over network and most certainly don't configure it manually. So i won't have any other network configuration in my states, I just want to specifically change the mtu of the interface
17:42 Sketch sorry, i have never used network.managed ;)
17:42 Sketch you could always use cmd.run
17:42 chron0 I found "retain settings" for the system wide network config, which reads pretty much like what I'd like to use
17:43 chron0 Sketch: no worries :)
17:43 chron0 but there doesn't seem to be an option like that for network.managed
17:44 whytewolf chron0: it is a kwarg
17:45 pipps joined #salt
17:46 chron0 "Use `retain_settings` to retain current network settings that are not otherwise specified in the state
17:46 chron0 does it apply to system setting only or does it apply to network.managed as well?
17:48 whytewolf what os are you on?
17:49 whytewolf it looks like kwargs are passed into ip.build_interface
17:49 whytewolf so if ip for the same os supports it then yes
17:50 chron0 xenial
17:51 whytewolf okay, ubuntu based, debian then
17:52 druonysus joined #salt
17:53 whytewolf interesting. can't find a reference to retain_settings in debian_ip
17:54 ekristen whytewolf: hrm, ok well salt-run says it successful but the salt_returns table says it wasn't, I'm using the mysql return to save all return information
17:54 ekristen whytewolf: the success column is always 0, but success: True is set in the return data
17:55 ekristen whytewolf: other runs and other jobs seem to get the success column set correctly
17:55 ekristen hrm, maybe it's a problem with all salt-runs
18:00 whytewolf chron0: welp i can't find the retain_settings option in the code. [only looked 2 modules deep] but have work to do. i would suggest trying it. i don't see why it wouldn't be supported.
18:03 chron0 whytewolf: thanks a lot, I'll definitely try it tomorrow, once my boss has dropkicked the now dead VM and given me a new one to kill :)
18:04 asyncsec joined #salt
18:06 fracklen joined #salt
18:06 Puckel_ joined #salt
18:06 Praematura joined #salt
18:07 fracklen joined #salt
18:07 demize joined #salt
18:08 keltim joined #salt
18:14 LondonAppDev joined #salt
18:19 ekristen I am seeing saltstack run boto and it's failing with iam credentials 404 not found. Is there a recommended IAM profile for saltstack?
18:20 impi joined #salt
18:22 Elsmorian joined #salt
18:32 raspado for openstack instance creation via salt/cloud-init, anyone happen to know where the cloud config is stored on the minion?
18:38 ahrs joined #salt
18:46 thinkt4nk joined #salt
18:49 thinkt4n_ joined #salt
19:08 pbandark joined #salt
19:09 raspado ah i found it
19:11 raspado how can I use  userdata_file to disable auto swap mounting for system provisioning via salt-cloud?
19:11 shoemonkey joined #salt
19:12 aneeshusa joined #salt
19:13 whytewolf raspado: userdata is just a blob of data that gets passed to the instance from the metadata server.
19:13 whytewolf typically ran as a bash/powershell script
19:14 raspado is there a set of valid key/values I can pass ?
19:14 whytewolf again it is just a shell script
19:14 whytewolf that the cloud-init program runs
19:15 raspado oh so its not really a template per se?
19:15 whytewolf no
19:16 raspado is it possible to disable cloud-init from automounting ephemeral storage via userdate_file?
19:18 raspado hmm i think i need to see an example, ill google it
19:22 thinkt4nk joined #salt
19:23 whytewolf raspado: there are 2 ossabilities. you are already using a userdata script that is doing the automount. OR the more likely you have setup the image to automount a swap
19:24 whytewolf swap is not something that is default in most images
19:25 raspado in my instance in /etc/cloud/cloud.cfg, I  see "mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']"
19:26 raspado seems to resemble the pattern for this vdb mount im trying to get rid of "/dev/vdb    /mnt    auto    defaults,nofail,comment=cloudconfig    0    2"
19:27 raspado should I just build an OS image with an empty array so it looks like "mount_default_fields: []" within /etc/cloud/cloud.cfg?
19:28 whytewolf no i thought you were trying to not mount swap. that isn't swap.
19:28 raspado its ephemeral storage
19:29 raspado in salt, we define /dev/vdb to swap
19:29 whytewolf ahhh then yes
19:29 whytewolf https://cloudinit.readthedocs.io/en/latest/topics/examples.html#adjust-mount-points-mounted
19:29 whytewolf read that
19:29 raspado ahh kk thx !
19:31 dps joined #salt
19:31 raspado joined #salt
19:38 rem5 joined #salt
19:44 Trauma joined #salt
19:46 raspado joined #salt
19:51 dps joined #salt
19:53 cyborg-one joined #salt
20:01 nixjdm joined #salt
20:03 pipps joined #salt
20:03 pipps99 joined #salt
20:04 censorshipwreck joined #salt
20:05 asyncsec_ joined #salt
20:07 fracklen joined #salt
20:09 fracklen_ joined #salt
20:17 lorengordon joined #salt
20:18 thinkt4n_ joined #salt
20:23 thinkt4nk joined #salt
20:24 asyncsec joined #salt
20:28 pipps joined #salt
20:32 nikdatrix joined #salt
20:36 tkharju joined #salt
20:37 mikecmpbll joined #salt
20:43 johnkeates joined #salt
20:45 edrocks joined #salt
20:45 sjorge joined #salt
21:11 hemebond joined #salt
21:12 asyncsec joined #salt
21:12 shoemonkey joined #salt
21:13 pipps joined #salt
21:18 nixjdm joined #salt
21:39 c_g joined #salt
21:49 Trauma joined #salt
22:04 pipps joined #salt
22:05 dps joined #salt
22:17 cyborg-one joined #salt
22:18 sp0097 joined #salt
22:20 onlyanegg joined #salt
22:20 fredvd joined #salt
22:32 nikdatrix joined #salt
22:35 pipps joined #salt
22:53 justanotheruser joined #salt
22:58 raspado joined #salt
22:59 rem5 joined #salt
23:00 Xenophon1 joined #salt
23:03 edrocks joined #salt
23:07 hemebond joined #salt
23:13 shoemonkey joined #salt
23:16 swa_work joined #salt
23:36 pipps joined #salt

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