Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-08-10

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

All times shown according to UTC.

Time Nick Message
00:01 scsinutz joined #salt
00:12 om joined #salt
00:13 whatevsz joined #salt
00:28 dyasny joined #salt
00:31 LessSneaky joined #salt
00:44 dyasny joined #salt
00:47 flowstate joined #salt
00:48 Joe_____ joined #salt
00:50 infrmnt joined #salt
00:58 Nahual joined #salt
01:02 alexlist joined #salt
01:05 edrocks joined #salt
01:09 Nahual left #salt
01:10 irctc614 joined #salt
01:11 catpigger joined #salt
01:17 ssplatt joined #salt
01:29 scsinutz joined #salt
01:29 drawsmcgraw joined #salt
01:29 drawsmcgraw left #salt
01:31 infrmnt joined #salt
01:33 k_sze[work] joined #salt
01:34 subsignal joined #salt
01:34 ssplatt joined #salt
01:39 infrmnt1 joined #salt
01:43 irctc614 Is it possible to match pillar environments in a top file based off pillar data?  It seems like i can only do minion id globbing or grains.
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.11, 2015.8.11, 2016.3.2 | 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:52 lorengordon joined #salt
02:00 mapu joined #salt
02:02 XenophonF irctc614: no
02:03 XenophonF logically, since pillar top file matching happens before pillar data gets assigned to a minion, one cannot refer to pillar data in the pillar top file
02:04 om joined #salt
02:06 khaije1 cheers Sokel :)
02:08 irctc614 what's the proper way for separating pillar data based on environment? If i set the pillarenv variable to "dev" in a minion's config, and i want that minion to get all the dev pillar data, what would that topfile look like?
02:08 timoguin joined #salt
02:11 mpanetta_ joined #salt
02:12 ZachLanich joined #salt
02:14 packeteer joined #salt
02:15 badon_ joined #salt
02:22 ssplatt is there a way to test in a state how a highstate was kicked off? if it had —local in the command?
02:23 ssplatt still trying to get a good way to see if i’m able to use the mine or not
02:23 ssplatt test $(salt-call config.get file_client | grep remote) == "remote"     isn’t working
02:23 ssplatt for use with - onlyif:
02:25 ssplatt need like a {% _m = salt[‘test.mine’] %} or something.
02:32 schemanic joined #salt
02:32 bastiand1 joined #salt
02:34 ssplatt {% set _c = salt['config.get']('file_client') %} seems to be the way to do it
02:35 subsignal joined #salt
02:35 ssplatt if _c == ‘remote’
02:36 schemanic Hi, I'm reading about multiple environments at https://docs.saltstack.com/en/latest/ref/states/top.html, and I'm confused by the part where it talks about the top.sls file after creating a dev, qa, and prod environment
02:36 schemanic You'd think that there would be separate top.sls files under /srv/salt/dev, /srv/salt/qa/, and /srv/salt/prod, but the example lists one without indicating if it meant that it's the 'normal' one under /srv/salt
02:36 schemanic can anyone comment?
02:46 flowstate joined #salt
03:05 fannet joined #salt
03:08 edrocks joined #salt
03:14 beardedeagle joined #salt
03:15 ssplatt joined #salt
03:20 om joined #salt
03:20 XenophonF irctc614: you could use anything for targeting
03:20 XenophonF irctc614: some people use grains set on the minion to do that
03:20 XenophonF irctc614: i personally think that's insecure
03:21 timoguin joined #salt
03:22 XenophonF irctc614: i don't use environments with pillar data, although if i were, i would probably key off the minion ID (which cannot be altered by the minion once its key gets accepted on the master)
03:23 XenophonF irctc614: i have sample pillar data posted on github if you'd like to see how i handle environment assignments using pillar data - https://github.com/irtnog/salt-pillar-example
03:23 XenophonF irctc614: you'll notice i rely on pcre matches, with both dev/test/prod pillar data in a single branch
03:24 XenophonF irctc614: i might revise this in the future
03:24 XenophonF irctc614: this works in concert with salt state assignments, where i use the 'role' and 'environment' pillar keys to target minions - https://github.com/irtnog/salt-states
03:25 sp0097 joined #salt
03:29 fracklen joined #salt
03:42 squishypebble1 joined #salt
03:47 flowstate joined #salt
04:12 schemanic Hey, I've got the highstate reactor example set up, but It doesn't appear to be calling highstate on my salt-cloud minions upon creation. What am I missing?
04:12 stooj joined #salt
04:19 evle joined #salt
04:26 permalac joined #salt
04:26 asoc_ joined #salt
04:33 om joined #salt
04:33 _JZ_ joined #salt
04:36 subsignal joined #salt
04:44 t0m0 joined #salt
04:46 flowstate joined #salt
04:59 ZachLanich joined #salt
05:00 stooj_ joined #salt
05:05 scsinutz joined #salt
05:05 fannet joined #salt
05:10 edrocks joined #salt
05:13 keldwud joined #salt
05:14 keldwud joined #salt
05:16 POJO joined #salt
05:26 POJO joined #salt
05:26 scsinutz joined #salt
05:37 subsignal joined #salt
05:45 rdas joined #salt
05:45 flowstate joined #salt
06:03 scavara quit
06:03 ivanjaros joined #salt
06:06 Miouge joined #salt
06:08 atmosx joined #salt
06:09 atmosx hello, I have a situation where I want to call an API call from a script, then grab some values and add them to a configuration file. What's the best way to accomplish this with salt? I have full control of the script, I could write on the file from the script, but I'd like to know if there's a way to handle this with salt.
06:14 ravenx joined #salt
06:14 jaybocc2 joined #salt
06:19 babilen atmosx: Make the call with http.query and use one of the file states to write the return. You might need to write a custom execution module for the data munging so it probably makes sense to do it all in there. You might then also decide to write a state module that builds on your execution module.
06:23 krymzon joined #salt
06:23 atmosx babilen: hmm that's too complicated. I'll make the script write to the file and then I'll just make salt restart the service
06:24 jaybocc2 joined #salt
06:24 babilen I don't see any problem with that .. it really depends on how complicated "grab some values" is
06:25 scsinutz joined #salt
06:25 babilen It should be noted that you keep all the "complicated" bits in you external script now as opposed to an execution module
06:32 bocaneri joined #salt
06:38 subsignal joined #salt
06:46 flowstate joined #salt
06:49 fracklen joined #salt
06:58 cyborg-one joined #salt
07:00 fracklen joined #salt
07:03 fracklen joined #salt
07:05 badon_ joined #salt
07:06 fannet joined #salt
07:12 Sylvain31 joined #salt
07:12 ivanjaros joined #salt
07:13 edrocks joined #salt
07:17 Elsmorian joined #salt
07:17 Electron^- joined #salt
07:25 om joined #salt
07:27 GreatSnoopy joined #salt
07:37 Sylvain31 hi is there a particular syntax to collect data into a dict of array in jinja?
07:38 Sylvain31 {%- set account = {}  %} works, this report an error: {%- set account[name] = []  %}
07:38 felskrone joined #salt
07:38 SWA joined #salt
07:38 babilen Sylvain31: name would be undefined there
07:38 subsignal joined #salt
07:38 Phoenix_Null joined #salt
07:39 babilen And it would be good to know the error
07:39 babilen So .. maybe paste the entire relevant code and error?
07:41 Sylvain31 http://paste.debian.net/787742/
07:41 jaybocc2 joined #salt
07:41 Phoenix_Null Hi, everyone. Is anyone here intimate with the templating language for salt? I'm having an issue and could use some experienced thoughts.
07:41 Sylvain31 I try to collect email from the first loop. line 7 to 27
07:42 Sylvain31 at loop2 : 29 to end use collected data
07:43 Sylvain31 account should be an dict of list with email inside.
07:44 babilen Sylvain31: Please reduce that to a more succinct example that exemplifies the behaviour. It sounds as if you are trying to access an undefined dictionary key. And, if I may say so, you have long passed the point where you should implement this in pure Python
07:44 Sylvain31 Phoenix_Null: paste example of your prob into for favorite oneline paste url
07:44 babilen (as long as that isn't pastebin.com)
07:44 Phoenix_Null I was actually checking the pastebin one, in case I got an idea.
07:46 Phoenix_Null It's actually a snippet and a question. Can we iterate over a dict.dict in jinja. Like this {% if gitlab.gl_web_server is defined %}
07:46 Phoenix_Null {% for key in gitlab.gl_web_server %}
07:46 Phoenix_Null web_server['{{key}}'] = {{gitlab.gl_web_server[key]}}
07:46 Phoenix_Null {% endfor %}
07:46 Sylvain31 babilen: true about "passed the point" ;) becomes unreadable
07:47 babilen Phoenix_Null: web_server['{{key}}'] looks wrong and should probably be web_server[key]
07:47 babilen Ah, no
07:47 flowstate joined #salt
07:48 babilen {% do web_server[key] = gitlab.gl_web_server[key] %}
07:49 Phoenix_Null okey. Turns I don't know the do command. Googling for info.
07:49 babilen Phoenix_Null: I would also recommend to implement that in Python to you :)
07:49 JohnnyRun joined #salt
07:50 babilen Phoenix_Null: http://jinja.pocoo.org/docs/dev/templates/#expression-statement
07:50 Phoenix_Null Honestly...I"m seriously thinking about it.
07:50 babilen What's stopping you
07:51 ronnix joined #salt
07:51 Sylvain31 but I suspect the error is in {%- do account[name].append(email) %} it seems I cant do {% set account[name].append(email) %} I must pass to some do call…
07:51 babilen Sylvain31: Are you sure that account[name] is defined at that point?
07:51 Phoenix_Null I bulk load dicts directly as context so as I to hold the pillar data as similar as a possible to a NoSQL db.In other words a big blob of a dict
07:52 Sylvain31 babilen: should be on line 19 {%- do account.update(name=[])  %} no?
07:52 Sylvain31 may be not?
07:53 Sylvain31 because {% set account[name] = [] %} fails too…
07:54 babilen Sylvain31: I think you want that to be "{%- do account[name] = [] %}"
07:54 Sylvain31 name=[] in the update is 'name' if fact not 'client1'… I guess
07:54 babilen account.update(name=[]) doesn't make sense and should fail
07:54 Phoenix_Null babilen: can we add python in jinja?
07:55 babilen Phoenix_Null: No .. which is the number one reason why jinja was a horrible choice as default templating engine (mako would have been much better)
07:56 Phoenix_Null babilen, I'll agree. It has been a pain in the rear, but I haven't seen mako yet.
07:56 babilen Phoenix_Null: You can perform some Python calls, but there is no way to include literal Python blocks as you can in mako. Which is why I just implement things in Python once I have to do something "complicated"
07:57 babilen Phoenix_Null: Mako allows you to do things like http://docs.makotemplates.org/en/latest/syntax.html#python-blocks which covers 80% of your "logic / data munging" needs in SLS files
07:58 babilen If you want to do the same in Jinja2 you typically end up implementing that in custom execution modules in Saltstack or just give up on jinja and use Python/mako/... right away
07:58 Phoenix_Null babilen: You shouldn't have said that. Damn...Dropping python like that in the templates.
07:58 Phoenix_Null seems sweet.
07:59 babilen Luckily Saltstack doesn't restrict you to using jinja and you can choose from a wide variety of renderers: https://docs.saltstack.com/en/latest/ref/renderers/all/index.html + https://docs.saltstack.com/en/2015.8/ref/renderers/index.html
07:59 babilen Phoenix_Null: It would have been a *much* better choice
07:59 toanju joined #salt
07:59 Sylvain31 babilen: with the "{%- do account[name]  = []  %}    <======================" I got                             SaltRenderError: Jinja syntax error: expected token 'end of statement block', got '='; line 23 (it is line 23 in my code) so it doesn't work, time to go to python then…
08:01 DaveQB joined #salt
08:02 babilen Sylvain31: The way you had it earlier should have worked (the {%- do account.update(name=[])  %} bit) but at one point you are trying to access an undefined key in that dictionary
08:02 Phoenix_Null brb, trying to try something.
08:02 copelco joined #salt
08:04 lovecraftian joined #salt
08:04 Sylvain31 babilen: {%- do account.update(name=[])  %} I think the key is name, not the value of name it that case
08:05 babilen Yes, that is the case
08:05 Sylvain31 in ipython : name = 'pipo' d.update(name=[]) reveals Out[4]: {'name': []} for d.
08:05 babilen Yeah, absolutely
08:05 Sylvain31 I want the value of name, not 'name'
08:06 Sylvain31 How do I rewrite as python code as it is a template for a file.managed, now?
08:06 babilen d.update({name: []})
08:06 AvengerMoJo joined #salt
08:07 Sylvain31 babilen: oh yeah!
08:07 babilen You use "py" as renderer and implement "run()" that returns a string. The returned string will be the content of the file.
08:08 jhauser joined #salt
08:08 mibr0 joined #salt
08:09 simonmcc joined #salt
08:09 nahkiss joined #salt
08:10 Sylvain31 babilen: The code with         {%- do account.update({name : []})  %} works. But I will try the py renderer, not supported by file.managed, but jinja template do by #!py right?
08:11 babilen Sylvain31: You'd just use "template: py" in the file.managed state
08:11 Sylvain31 really?
08:11 Sylvain31 https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
08:11 Sylvain31 template
08:11 Sylvain31 If this setting is applied then the named templating engine will be used to render the downloaded file, currently jinja, mako, and wempy are supported
08:12 babilen "It is also possible to use the py renderer as a templating option. "
08:12 babilen I have no idea why they claim that it is restricted to jinja, mako, and wempy
08:13 Sylvain31 it smels the ticket ;)
08:13 bstaz joined #salt
08:14 keimlink joined #salt
08:15 Phoenix_Null I checked as well. It's just kinda in the air, says it's for sls files not templates.
08:16 babilen It works fine, trust me
08:17 Sylvain31 I trust you babilen , I just want to contribute back so user wont fight with the doc as I did…
08:18 babilen Not sure what they mean by "supported" in there, but my guess is rather that it's a leftover from the past rather than a deliberate "we will ensure that other renderers will be broken at every point release"
08:19 Sylvain31 it uses: contents = salt.utils.templates.TEMPLATE_REGISTRY[template]() in https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.apply_template_on_contents
08:20 Sylvain31 internaly
08:20 Sylvain31 can the TEMPLATE_REGISTRY be dumped?
08:21 Sylvain31 listed
08:21 Phoenix_Null Sylvain31: I think I thought I read something deep in the docs about dumping the data, but it's been a long time ago.
08:21 Sylvain31 TEMPLATE_REGISTRY = {
08:21 Sylvain31 'jinja': JINJA,
08:21 Sylvain31 'mako': MAKO,
08:21 Sylvain31 'py': py,
08:21 Sylvain31 'wempy': WEMPY,
08:21 Sylvain31 'genshi': GENSHI,
08:21 badon joined #salt
08:21 Sylvain31 'cheetah': CHEETAH,
08:21 Sylvain31 }
08:22 Sylvain31 in /usr/lib/python2.7/dist-packages/salt/utils/templates.py
08:22 Sylvain31 I go for a pause, thanks for your help babilen ;)
08:22 babilen Why is py not capitalised?
08:22 babilen Discrimination!
08:27 Rumbles joined #salt
08:28 s_kunk joined #salt
08:32 lero joined #salt
08:33 whitenoise_ joined #salt
08:34 fannet joined #salt
08:37 fredvd joined #salt
08:42 Sylvain31 lol
08:44 Sylvain31 Phoenix_Null: my old time friend 'grep' found it as usual. My favorite tool ever! ;)
08:45 krymzon joined #salt
08:45 Phoenix_Null nice :)
08:45 flowstate joined #salt
08:47 N-Mi joined #salt
08:55 Saltuser0815 joined #salt
08:58 Saltuser0815 Hey chat. I have a question and maybe one of you can point me in the correct direction. I have a script on the master that generates a pillar *.sls file with users from a LDAP query that need to be present on a minion. I also have a state that uses that pillar information. How can I run this script on the master each time i want to apply that state?
08:59 Saltuser0815 Ive looked into the orchestration runner, but Im not sure its meant for this.
09:00 amy_ joined #salt
09:04 Saltuser0815 I have the master as a minion, so maybe I could use orchestrate after all. Execute the script on that minion and if successfull trigger the highstate on the other minion. .. will try that
09:06 lero__ joined #salt
09:07 Phoenix_Null Saltuser0815: I don't know if that helps. But orchestrate is run master-side.
09:08 Phoenix_Null Saltuser0815: You can essentially tell the "minion" side to do something. If you are looking to trigger something to the server from a minion.
09:08 Phoenix_Null Saltuser0815: Try checking the reactor module. Which runs stuff based on an event a minion publishes.
09:09 amy_ joined #salt
09:16 edrocks joined #salt
09:19 c4t3l joined #salt
09:25 mikecmpbll joined #salt
09:32 saintpablo joined #salt
09:33 saintpablo yo fam
09:33 saintpablo how can salt help me set this command:
09:33 saintpablo setcap cap_net_bind_service=+epi <JAVA_HOME>/bin/java
09:34 Phoenix_Null saintpablo: cmd.run would be a fast way to do it.
09:34 saintpablo okay
09:34 saintpablo thanks
09:40 subsignal joined #salt
09:46 flowstate joined #salt
09:54 sfxandy joined #salt
09:57 lero__ joined #salt
09:58 sfxandy morning all.  need a spot of advice on a subject that continually bugs me.  have a mine_function that I call 'public_ip' that returns an IP address from a CIDR I'm interested in.  In my state, I would like to access that IP address without having to resort for a 'for server, addrs in...' because anything I set inside that for loop immediately loses scope once outside the loop.  I guess I'm asking for the correct syntax to access the IP address directly.
09:58 sfxandy mine function and mine.get call in here... https://gist.github.com/anonymous/dd359ffc8baf1fd04e701a38d109b7b3
10:14 jaybocc2 joined #salt
10:19 krymzon joined #salt
10:19 fredvd joined #salt
10:26 gmacon joined #salt
10:33 babilen sfxandy: mine.get returns addresses for all matching minions (so you'd have multiple entries)
10:34 sfxandy yes but my targetting ensures that only one minion ever gets returned
10:34 babilen If you only have one you could just access the first tuple (from .items()) directly
10:34 Phoenix_Null babilen: Btw i found the issue. Didn't have to resolve to python. Thanks for the help before :)
10:35 babilen Phoenix_Null: Cool, what did you end up doing?
10:36 sfxandy babilen, ok so I end up with this ........... .items()[0][1]|first
10:36 sfxandy to just return the IP address
10:37 babilen Something along those lines, yes
10:37 sfxandy lovely :/ ... looks chronic
10:38 Phoenix_Null babilen: It was an error on my part. Forgot I have to look one nested dict lower. And as usual dump the entire pillar and have the template sort it out.
10:38 zifnab joined #salt
10:38 babilen sfxandy: Write a macro with proper error handling if you do this often
10:38 babilen (and mixing [0] and |first is a bit cryptic also)
10:38 sfxandy i know
10:39 sfxandy the macro is an idea....
10:39 sfxandy as I do it several times in my state
10:39 sfxandy getting IP addresses of servers that perform different functions in my environment
10:41 subsignal joined #salt
10:43 flowstate joined #salt
10:45 Electron^- joined #salt
10:47 babilen sfxandy: Are you aware of https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.network.html#salt.modules.network.ip_addrs type=private and type=public ?
10:50 teryx510 joined #salt
10:50 teryx510 left #salt
10:51 shoul joined #salt
10:53 permalac joined #salt
10:55 sfxandy babilen, no i wasnt...
10:56 babilen Might come in handy
10:58 viq joined #salt
11:03 shoul Hey there, I try to run a masterless vagrant box provisiond by salt and have a hard job to get it run. Please help me.
11:03 shoul I use this setup: https://gist.github.com/anonymous/d8be5dd94cd17059c91a1a844dcb89b0
11:04 shoul The minion try to connect to the master and I don't get it why.
11:05 Phoenix_Null shoul: I can't see much, but you'r missing pillar roots and I don't know if salt gets annoyed by that.
11:06 antpa joined #salt
11:06 viq also maybe it would be easier to set up master on the same node and set it up to connect there?
11:06 amcorreia joined #salt
11:07 Phoenix_Null He could but I can say for a fact the masterless vagrant boxes do work.
11:08 Phoenix_Null Although it gets tricky afterwards.
11:09 babilen scrips ?
11:09 babilen https://gist.github.com/anonymous/d8be5dd94cd17059c91a1a844dcb89b0#file-vagrantfile-L32
11:11 Phoenix_Null That does seem kinda out of place,since vagrant has it's own stuffz.
11:11 Phoenix_Null mastertrusty.vm.provision :salt do  |salt_boot|
11:11 Phoenix_Null salt_boot.minion_config='./bootstrap.cfg'
11:11 Phoenix_Null salt_boot.verbose= true
11:11 Phoenix_Null salt_boot.bootstrap_options="-P"
11:11 Phoenix_Null salt_boot.install_type="stable 2015.5"
11:11 Phoenix_Null end
11:11 Phoenix_Null This is more than enough to work.
11:12 Phoenix_Null Quick question. Do we have someone actually from salt-stack dev team?
11:12 Phoenix_Null By have, i mean if there's one online.
11:14 AndreasLutro considering they're all US based and it's 5:14 in salt lake city, probably not
11:14 babilen Most of them are in Utah so I wouldn't expect them to be active now .. Some Saltstack people are active here though
11:14 Phoenix_Null damn i forget the timezones all the time.
11:17 kshlm joined #salt
11:17 shoul <Phoenix_Null> Thank you for your answer. Absence of pillar roots: In the masterless docs is the need for pillar_roots not mentioned so I don't think ist up to that.
11:17 shoul The docs: https://docs.saltstack.com/en/2015.8/topics/tutorials/quickstart.html
11:18 mindscratch joined #salt
11:18 babilen It should just fall back to the default of /srv/pillar
11:18 Phoenix_Null probably yeah
11:18 Phoenix_Null I just throw them in for good measure.
11:19 edrocks joined #salt
11:21 shoul The tree of my masterless minions  \n/srv /srv/salt /srv/pillar
11:23 shoul Vorget the '\n' try to make a newline. That was stupid. :)
11:24 Phoenix_Null shoul: Is it working?
11:27 shoul I tried it but the reason of writing my own bootstrap_salt is, that the provitioning with the default vagrant bootstrap_salt script is faild because of the absence of pip.
11:27 Phoenix_Null add the -P options i added above
11:27 Phoenix_Null and the native script should work
11:28 Phoenix_Null .bootstrap_options="-P"
11:29 shoul Sorry misst it. What's in youre ./bootstrap.cfg'
11:33 Phoenix_Null https://gist.github.com/anonymous/cf21a9f834475f1e553f80e2621415b7
11:33 Phoenix_Null shoul: Not that much different as you see.
11:34 shoul Thanks, I try and return
11:35 Phoenix_Null Shoul: Focus on the vagrant file more. I think that's what's acting up.
11:36 shoul I hope the -P opton will do it :)
11:39 freelock joined #salt
11:42 subsignal joined #salt
11:45 babilen shoul: You shouldn't have to use your own bootstrap script
11:45 babilen It really works with the upstream one
11:46 Phoenix_Null babilen: 2015.5 at some point had that issue with the non-pip version. Probably got fixed?
11:46 babilen I remember that, yes
11:46 Phoenix_Null It was Vagrant-side though.
11:46 babilen It was and it has been fixed
11:46 Phoenix_Null :D
11:47 babilen (took quite a while, but it was finally resolved)
11:49 shoul <Phoenix_Null> Got an Error beause of the "-P" option:
11:49 shoul he following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!  /tmp/bootstrap_salt.sh  -P -c /tmp stable 2015.5
11:49 Phoenix_Null weird
11:50 Phoenix_Null like babilen said. They should have fixed that "-P option"
11:53 shoul Bevore I used that option I got an: Processing triggers for libc-bin (2.19-18+deb8u1) ... Processing triggers for systemd (215-17+deb8u2) ... /tmp/bootstrap_salt.sh: 1178: /tmp/bootstrap_salt.sh: pip: not found  * ERROR: Failed to run install_debian_stable()!!!
11:54 babilen Is that with your script?
11:55 shoul pip not found is the importend note here. I hade a look at that script and realy don't no wy pip is involved here: https://github.com/mitchellh/vagrant/blob/v1.8.4/plugins/provisioners/salt/bootstrap-salt.sh
11:56 shoul <babilen> No, it's with the default. That's wy I start to write my own ;)
11:56 Sylvain31 how do I get access to var "file.managed: defaults: var: val" from a py template?
11:56 babilen shoul: Do you install pip on the box before bootstrapping salt with it?
11:56 babilen Sylvain31: I don't use defaults, but __defaults__ ?
11:57 babilen (or defaults)
11:57 Sylvain31 what is the python code to read it?
11:58 babilen shoul: You are specifically allowing pip based installations with "-P"
11:58 babilen shoul: In fact that entire line reminds me of https://github.com/mitchellh/vagrant/issues/5973 which was resolved
11:58 saltstackbot [#5973][MERGED] Salt provisioner fails to upload minion config | Ran into a problem in 1.7.3 doing a vagrant up using a trusty64 box with a salt provisioner specifying a custom minion_config. This is the error:...
12:01 shoul <babilen> When I do install pip bevore, salt can be bootstrapt. But it can be done without pip. I don't want to install it first.
12:02 shoul <babilen> "-P" I tried that also but get an error
12:05 Sylvain31 babilen: it is an attribut of the function run()? that will be set by the state?
12:06 babilen Sylvain31: These things are typically monkey patched in module/global scope
12:06 keimlink joined #salt
12:08 shoul <babilen> I use vagrant version: 1.8.4 is the bug fixed bevore or after?
12:09 shoul <Phoenix_Null> Which version of vagrant du you use? the option 'salt_boot.install_type="stable 2015.5"' fails also on my box
12:10 keimlink_ joined #salt
12:10 Phoenix_Null one second
12:11 Phoenix_Null i'm using 1.7.2 actually.
12:13 Phoenix_Null And my own boxes. If that helps, i don't use hashicorp's.
12:14 babilen I use vagrant 1.8.4 as packaged in Debian with https://atlas.hashicorp.com/debian/boxes/jessie64 (and other Debian boxes)
12:14 pfallenop joined #salt
12:15 Sylvain31 utils/templates.py line 520 do a: setattr(mod, kwarg, kwargs[kwarg]) I suppose that it because part of the script attribute… Do I access to the var so?
12:18 jason2 Hi , I'm trying to call dockerng.create using Salt Python API
12:18 babilen shoul: And you need 2015.5, don't you?
12:18 jason2 I created a LocalClient object and calling cmd() method
12:18 jason2 I'm having a problem to pass the port_binding argument
12:20 shoul <babilen>I can use the stable also. It's an standalon minion
12:20 jason2 i'm trying something like this: [{"image":"some-image", "ports":['3000'], "port_bindings":"4000:3000"}]
12:21 west575 joined #salt
12:21 jason2 but I'm getting the minion throws exception that comes from docker-py: "object has no attribute 'iteritmes'"
12:21 jason2 what is the correct format for the port_bindings argument? the docs didn't help me.
12:24 infrmnt joined #salt
12:25 shoul <babilen> I try to use the box you mentioned.
12:26 babilen shoul: So, do you into this problem if you use a standard Vagrantfile such as http://paste.debian.net/787841/ ? (remove line 10-12 if you don't use kvm/libvirt)
12:26 babilen *do you run
12:26 numkem joined #salt
12:27 edrocks joined #salt
12:29 shoul <babilen> I try this out an return
12:33 saintpablos joined #salt
12:37 Sylvain31 babilen: found (how to access var from "file.managed: defaults: var: val") in python "var = globals()['context']['var']"
12:39 Sylvain31 http://paste.debian.net/787843/
12:41 POJO joined #salt
12:41 DammitJim joined #salt
12:41 ssplatt joined #salt
12:42 subsignal joined #salt
12:44 antpa joined #salt
12:45 ravenx jlj6
12:45 ravenx sorry i thought this was vim
12:48 irctc359 joined #salt
12:48 irctc359 Hello there
12:49 irctc359 I have a question regarding salt pillars
12:50 ze- salt-run manage.status
12:50 ze- 'PrinterLogger' object has no attribute 'trace'
12:50 ze- Anyone already seen that kind of error? :(
12:50 irctc359 can salt pillars use jinja?
12:50 ssplatt yes
12:50 irctc359 and how do i access minion id in there>
12:50 irctc359 ?
12:50 ssplatt minion_id: {{ grains.id }}
12:51 irctc359 cool.. thanks
12:51 babilen Sylvain31: Yes, it should be in global scope context['var'] should just work
12:51 ssplatt or grains[‘id']
12:51 ssplatt or salt[‘grains.get’](id, ‘somedefault’)
12:51 Sylvain31 it does, mentioned nowhere else but in the code…
12:52 Sylvain31 babilen: https://github.com/saltstack/salt/issues/35336
12:52 saltstackbot [#35336][OPEN] documentation state.file.managed parameter template not reflecting TEMPLATE_REGISTRY | Description of Issue/Question...
12:52 babilen cool
12:53 Sylvain31 babilen: do you know how to unittest such py template, providing them context and such is there some helper?
12:53 babilen nfc
12:54 Sylvain31 Nuclear Fuel Complex?
12:55 babilen "no fucking clue"
12:55 Sylvain31 lol, I was guessing the first two letter ;)
12:55 gh34 joined #salt
12:57 shoul <babilen> Guest additions not installed in this box. I do another test with an ubuntu box.
12:58 M-liberdiko joined #salt
12:58 babilen shoul: I'm using kvm/libvirt (can't stand virtualbox as it is soooo slow) -- but it shouldn't be a problem to install guest additions if you want them
12:58 TooLmaN joined #salt
12:58 babilen (with vagrant-libvirt)
13:04 west575_ joined #salt
13:08 shoul <babilen> I looked around but can't find a doku for vagrant-libvirt can you give a hint please?
13:09 squishypebble joined #salt
13:11 alexhayes joined #salt
13:11 ssplatt shoul: i use the bento project boxes with vagrant
13:11 ssplatt with success.
13:12 ssplatt also vagrant-linode (shameless plug)
13:12 shoul Thank's vor the hint
13:14 ze- https://docs.saltstack.com/en/latest/topics/development/logging.html
13:14 * ze- sighs... :(
13:14 ze- $ sudo salt-run manage.status
13:14 ze- 'PrinterLogger' object has no attribute 'trace'
13:14 ze- guess noone has clue what's wrong with logging in salt-run? :(
13:15 bearonis joined #salt
13:15 Rumbles Hi, I have this state http://paste.ofcode.org/d9PmvsKHdfBks9hAcf9AhP which creates an nginx config file for each entry for a server in the pillar, in the loop I places an include, but when there is more than 1 entry in the pillar for a host it fails as I then have multiple include statements.... can anyone suggest a way around or to fix this issue?
13:16 ze- Rumbles: get the include out, and loop to list the wanted items.
13:16 AndreasLutro Rumbles: https://www.lutro.me/posts/dynamic-includes-in-salt
13:17 pengyao joined #salt
13:17 ze- see the last loop on AndreasLutro 's link :)
13:18 babilen shoul: https://github.com/vagrant-libvirt/vagrant-libvirt
13:20 flowstate joined #salt
13:21 Rumbles thanks AndreasLutro just reading through it, no sure I get how the append works but I'll giv it a shot
13:21 flowstate joined #salt
13:21 rdas joined #salt
13:25 tpaul joined #salt
13:25 mapu joined #salt
13:29 KingOfFools Anybody here using a lot different events/reactors in salt? I'm looking for good solution so my master config won't be overloaded with reactors. Maybe some tag differentiation or something.
13:30 ssplatt KingOfFools: the docs page on that is pretty good
13:31 ssplatt i’m not sure i know what you are looking for exactly tho
13:34 west575 joined #salt
13:34 flowstate joined #salt
13:35 hasues joined #salt
13:37 hasues left #salt
13:38 KingOfFools ssplatt: I'm thinking of something like, for example: I have bunch for servers with, lets say, role video. And I have bunch of states which Im running to do some things there. For example Im sending event with tag /video/somejob. Then reactor which waiting for event with tag 'video/*' running some reactor state file and in that file Im running different orchestration or whatever states depending on last part of the tag.
13:39 KingOfFools ssplatt: or whatever solution which would help to not have like hundrends of different reactors.
13:40 hasues joined #salt
13:40 ssplatt orchestration would be the way to react on one thing and have many different things happen
13:41 west575_ joined #salt
13:41 Rumbles that's perfect thanks AndreasLutro !
13:42 ssplatt but you can probably do different if statements inside a rractor file to match different parts of the event tag
13:43 subsignal joined #salt
13:45 KingOfFools ssplatt: yea, and that not as good as if I had some substitution of part of tag to variable and then could run some state by variable name.
13:46 Tanta joined #salt
13:46 racooper joined #salt
13:46 fredvd joined #salt
13:46 KingOfFools dont like too much 'if' in code or whatever. Hm.. is there case in jinja? :D
13:51 west575 joined #salt
13:52 timoguin joined #salt
13:56 timoguin_ joined #salt
13:56 doublepeaks joined #salt
13:56 ravenx left #salt
13:59 doublepeaks hi I'm running salt as a step in automated provisioning, but am having problems detecting failures because sudo salt "*" state.highstate returns an exit code of 0 even if states fail
14:00 doublepeaks does anyone have any suggestions for how to detect failed states? do I need to grep the stdout?
14:01 AndreasLutro doublepeaks: I use an event returner and iterate through all the return data to detect failures myself
14:08 flowstate joined #salt
14:10 bowhunter joined #salt
14:14 doublepeaks OK thanks, I'll look at doing that too
14:15 hasues left #salt
14:16 tapoxi joined #salt
14:22 keimlink joined #salt
14:24 Tanta https://docs.saltstack.com/en/latest/ref/states/failhard.html
14:24 Tanta might look at this too
14:24 ronp_usa joined #salt
14:39 necronian joined #salt
14:39 M-MadsRC joined #salt
14:43 fracklen joined #salt
14:47 flowstate joined #salt
14:47 amy joined #salt
14:48 ZiLi0n joined #salt
14:51 fracklen joined #salt
14:51 scoates joined #salt
14:52 ZiLi0n Hello everyone, I have been reading through the different netapi modules available for salt-api: cherrypy, tornado or wsgi. any recommendation/suggestion or guidelines as to which one to use?
14:56 ZachLanich joined #salt
14:59 fracklen joined #salt
15:00 autofsckk joined #salt
15:03 cmarzullo I did cherrypy. Seemed pretty easy.
15:04 babilen Why not wsgi or tornado?
15:06 18WABHYRM joined #salt
15:07 stiefkind joined #salt
15:08 fracklen joined #salt
15:08 west575_ joined #salt
15:08 cmarzullo Not using it heavily at the moment. Seemed good enough. Only have a handful of api calls going in.
15:09 ivanjaros joined #salt
15:09 lovecraftian joined #salt
15:11 numkem joined #salt
15:11 antpa joined #salt
15:13 west575 joined #salt
15:15 cmarzullo My nginx formula has better options so could probably salt that wsgi piece now.
15:15 aea joined #salt
15:16 nZac joined #salt
15:17 Brew joined #salt
15:18 jenastar joined #salt
15:26 badon_ joined #salt
15:28 kevinquinnyo joined #salt
15:30 west575_ joined #salt
15:31 throwawayj joined #salt
15:35 spuder joined #salt
15:37 shoul left #salt
15:38 shoul joined #salt
15:38 ThisIsZenified joined #salt
15:39 lilvim joined #salt
15:44 Miouge joined #salt
15:45 subsignal joined #salt
15:47 flowstate joined #salt
15:47 scsinutz joined #salt
15:48 scsinutz joined #salt
15:48 sp0097 joined #salt
15:49 scsinutz1 joined #salt
15:51 amcorreia joined #salt
15:51 mapu_ joined #salt
15:52 mpanetta joined #salt
15:54 toastedpenguin joined #salt
15:54 flowstate joined #salt
15:57 mapu_ joined #salt
15:57 west575 joined #salt
15:58 toastedpenguin joined #salt
16:03 _JZ_ joined #salt
16:04 repl1cant joined #salt
16:15 sagerdearia joined #salt
16:18 scsinutz joined #salt
16:20 subsignal joined #salt
16:23 fredrick joined #salt
16:30 onlyanegg joined #salt
16:31 ssplatt joined #salt
16:32 spuder_ joined #salt
16:35 jenastar left #salt
16:40 psy0rz joined #salt
16:41 edrocks joined #salt
16:44 psy0rz is there a sample of how to use child templates? it seems salt cant find the file that i specify in {% extends "somefile.conf" %}
16:45 Vaelatern You have enabled templating for the file, right?
16:45 psy0rz yep
16:45 flowstate joined #salt
16:45 psy0rz its an nginx conf file that is specified in an sls file by using salt://templates/bla.conf, and using template: jinja
16:46 impi joined #salt
16:46 psy0rz is such a template rendered on the salt master or minion?
16:48 psy0rz the documentation just says "Template inheritance works fine from state files and files. The search path starts at the root of the state tree or pillar.
16:49 psy0rz "
16:50 west575_ joined #salt
16:52 fredrick On syndic servers the master config file.  does it really just need the syndic_master: ip, or does it require more?
16:54 jenastar joined #salt
16:55 Fr0Master joined #salt
16:55 mikecmpbll joined #salt
16:56 flowstate joined #salt
16:56 psy0rz fixed it: the file path is not relative, so i needed to add the path
16:58 jenastar left #salt
16:58 fredrick psy0rz nice, love when fixing is that easy.
17:00 psy0rz me to :)
17:02 ruxu joined #salt
17:03 bearonis joined #salt
17:04 kevinquinnyo possible to execute a runner from an orchestration?  I need to execute a custom runner as the final step
17:04 kevinquinnyo of a set of tasks already in the orchestration
17:04 nZac joined #salt
17:06 whytewolf kevinquinnyo: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.runner
17:07 fredrick On syndic servers the master config file,  does it really just need the syndic_master: ip, or does it require more?
17:08 kevinquinnyo whytewolf: perfect, thanks
17:08 ruxu joined #salt
17:11 Fiber^ joined #salt
17:12 felskrone joined #salt
17:15 felskrone joined #salt
17:16 cmarzullo fredrick: on your master you'll need a order_masters: True somewhere.
17:17 fredrick cmarzullo yup got that.  Just building a syndic state file and was wondering if the master file needs anything but just what its master is.
17:17 cmarzullo pretty sure that's it. I looked over mine and nothing else jumped out at me.
17:18 fredrick Cool, I love have a one line config file
17:18 fredrick well two with a comment on why..
17:18 cmarzullo heheh. I templated out the whole thing. Were I to do it again I'd just do {{ saltstack.master.config | yaml() }}
17:19 pipps joined #salt
17:20 fredrick Nice
17:21 blueelvis joined #salt
17:21 aea joined #salt
17:22 flowstate joined #salt
17:25 scsinutz joined #salt
17:26 ZachLanich joined #salt
17:27 teryx510 joined #salt
17:27 teryx510 syn
17:27 cmarzullo ack
17:28 teryx510 haha, sorry. wrong window.
17:29 GreatSnoopy joined #salt
17:30 shoul left #salt
17:30 scsinutz1 joined #salt
17:34 ThisIsZenified syn? ack?
17:35 atmosx rst
17:35 XenophonF rst fin
17:37 aea left #salt
17:38 ThisIsZenified SYN-ACK
17:38 spiette joined #salt
17:42 edrocks joined #salt
17:43 dfinn joined #salt
17:46 cyborg-one joined #salt
17:46 krymzon joined #salt
17:48 ZiLi0n_ joined #salt
17:49 pipps joined #salt
17:50 ZiLi0n_ cmarzullo babilen thanks for your responses! I think I am going to start playing with cherrypy for now as it looks like support more functionality as cmarzullo mentioned
17:50 Rumbles joined #salt
17:52 ageorgop joined #salt
17:52 cmarzullo great glad we could help. If you want a quick cert there's a nice salt module for it:
17:53 cmarzullo https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.tls.html#salt.modules.tls.create_self_signed_cert
17:54 pipps joined #salt
17:54 babilen letsencrypt-formula
17:54 cmarzullo yeah there's that too.
17:57 keimlink joined #salt
17:58 blueelvis joined #salt
18:03 pipps99 joined #salt
18:07 fracklen joined #salt
18:09 tawm04 joined #salt
18:10 ageorgop joined #salt
18:12 mikecmpbll joined #salt
18:18 LessSneaky joined #salt
18:19 kunersdorf joined #salt
18:19 kunersdorf is there a salt function to search for file?
18:20 nZac joined #salt
18:20 kunersdorf without a cmd.run
18:23 ssplatt i would doubt it. but if you want to test if a specific file exists, there is one.
18:24 cmarzullo let me google that for you: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.find
18:24 ssplatt i guess i’m not that surprieed
18:24 ssplatt s
18:25 sagerdearia joined #salt
18:28 kunersdorf coool, thx
18:35 pipps joined #salt
18:36 lero joined #salt
18:38 iggy that sounds like a terrible idea
18:39 iggy our highstates already take long enough... if someone put that in our salt tree, we would literally throw fruit/veggies at them
18:41 MajObviousman so I've just learned that the inventory tool we're currently using only has a SOAP API
18:41 MajObviousman so much for that external pillar
18:41 * MajObviousman sighs
18:42 jweede joined #salt
18:42 MajObviousman I suppose I could roll my own
18:45 flowstate joined #salt
18:48 ssplatt i’d say that pretty much any external pillar that you’d be using for inventory, outside of flat file, you’d have to write your own module
18:48 cmarzullo ^^
18:48 ssplatt unless it’s like, the foreman
18:48 flowstate joined #salt
18:49 toanju joined #salt
18:51 stanchan joined #salt
18:54 ZiLi0n joined #salt
18:55 ZiLi0n Hi all, someone using saltpad using the docker compose? I am running into "express" dependency missing
19:00 pipps joined #salt
19:01 stooj joined #salt
19:02 cmarzullo not e
19:02 cmarzullo me
19:04 dendazen joined #salt
19:05 dendazen I have this in my state
19:05 dendazen cmd.script:
19:05 dendazen - require:
19:05 dendazen - pkg: wget
19:05 dendazen and wget is installed on the minion
19:05 dendazen but i get an error
19:05 ZiLi0n thanks cmarzullo. I just seen an exception being raise because there is no module 'express'. It is strange, I think I got the right containers...
19:05 dendazen Comment: The following requisites were not found:
19:05 dendazen require:
19:05 dendazen pkg: wget
19:05 antpa joined #salt
19:05 dendazen why is that?
19:05 cmarzullo dendazen: did you have a state that installs wget? what's it's state id?
19:06 dendazen i have yes
19:07 cmarzullo waht's the state id? they need to match
19:07 Tanta if you have something like wget_pkg: - pkg:  - installed - name: 'wget'
19:07 Tanta then you can reference it by pkg: wget_pkg
19:07 Tanta I always use descriptive state IDs with 'name' arguments for this reason
19:08 dendazen oh ok, thanks.
19:08 stanchan joined #salt
19:09 dendazen but what if i do not have any state which installs any package, but want the state depend on some third party rpm, in that case is it possible to use pkg.require?
19:09 ruxu joined #salt
19:09 vincent_vdk is there something in Salt like Chef's Knife
19:09 cmarzullo It needs to have a state id. for packages that are 'alrady installed' you can just do pkg.installed
19:10 pipps joined #salt
19:10 bearonis joined #salt
19:10 babilen dendazen: requisites are only between states and have nothing to do with the external state of the system
19:11 babilen vincent_vdk: What would that do?
19:11 vincent_vdk babilen: a way to interact with a Salt master from a client (laptop for instance)
19:11 vincent_vdk (i'm a Salt noob)
19:12 babilen vincent_vdk: SSH ;)
19:12 vincent_vdk :)
19:15 dendazen and what can this be? Unable to cache script salt://packages/spcwlk_lon_reg/lon_spcwlk_enroll.sh from saltenv 'base'
19:15 dendazen probably wrong path
19:16 dendazen never mind.
19:16 Remedy joined #salt
19:18 Remedy Hello there, I have a question about design, I'm getting: Detected conflicting IDs, SLS IDs need to be globally unique it's complaining about the users formula
19:18 Remedy I have the users formula in multiple env and also different pillar data per env, I want base to have all admin accounts and then dev ect .. to have regular users
19:19 POJO joined #salt
19:23 iggy don't use environments?
19:27 Remedy how do separate code then
19:28 Remedy My point is I don't want to duplicate every users in every env
19:28 cscf joined #salt
19:30 fredvd joined #salt
19:30 jhauser joined #salt
19:31 Sketch i don't use environments, but if you can read it in a jinja variable, you can include that in the state name
19:31 Sketch {{env}}_user_blah:
19:31 XenophonF joined #salt
19:31 babilen Environments are such a pain
19:32 babilen Remedy: You could use separate masters
19:32 Remedy It's not something ppl use?
19:32 babilen I'd be inclined to say "no"
19:32 XenophonF environments?
19:32 Remedy So you create a state file for your app if you don't use env it's a pain to manage different versions
19:33 babilen Why is that?
19:33 jaybocc2 joined #salt
19:33 Remedy Well you have your state file for your dev app but the prod one is different with less features
19:34 jenastar joined #salt
19:34 Remedy so the two are different, it means you have two files in the same folder and you play with map to indicate which file to use
19:35 kunersdorf I use separate git branches and separate saltmasters
19:35 kunersdorf for each env
19:36 Remedy I'm trying to use git branches for different env
19:36 Remedy well that part is working, the part that is not is to manage formulas / pillars with branches
19:37 babilen Just don't do it all with the same master, configure a master per environment with static git branches
19:39 Remedy in that scenario it's one VM per branch then, you have a master per branch?
19:39 vincent_vdk can't you use pilars for different envs
19:40 cscf Where is the name of a formula defined?  Is it the name of the directory containing init.sls?
19:40 xist joined #salt
19:41 iggy cscf: there's not really a set "name", but yeah, if you want to look at it that way
19:41 west575 joined #salt
19:42 Remedy my current setup is simple I have different env ( dev, test, ect .. ) all mapped to a git branch, it s the same for Pillar
19:42 cscf iggy, ok.  So I've got the right name then.  My formula is added through gitfs and it's not found when I run state.apply.  Any ideas for tracking down the problem?
19:42 Remedy I installed the users formula to the base/master branch and also the dev branch, I put some accounts in base pillar and also in dev pillar when I tried to run It complained about diplicated IDs
19:43 iggy you don't need the formulas listed in every environment... just have different pillar data and the formula in base
19:44 jenastar left #salt
19:44 teryx510 joined #salt
19:46 XenophonF Remedy: you might be interested in how i use environments - https://github.com/irtnog/salt-states
19:46 stanchan joined #salt
19:46 XenophonF key thing there is that the base environment only gets used for targeting
19:47 XenophonF and i don't make references across environments because frankly, it gets too confusing
19:48 felskrone joined #salt
19:49 schemanic_ joined #salt
19:49 XenophonF right now i don't use environments with pillar, but i might change that (in that i would apply to my pillar data the same github flow-like model i use to manage changes to my salt states)
19:50 ageorgop joined #salt
19:51 schemanic_ Hey. I have a reactor state setup to run when salt-cloud minions are created. I can see that the reactor state is being called (it calls highstate when I make a new server), but I don't get the feedback from the highstate that it calls when I run salt-call -p
19:51 gimpy2938 joined #salt
19:52 gimpy2938 Is there a way to get an interactive shell on a minion via Salt?
19:54 Tanta not really
19:56 amcorreia joined #salt
20:02 xbglowx joined #salt
20:04 jaybocc2 joined #salt
20:14 scsinutz joined #salt
20:15 pipps joined #salt
20:17 scsinutz1 joined #salt
20:17 GreatSnoopy joined #salt
20:17 bearonis joined #salt
20:22 ruxu joined #salt
20:29 pipps joined #salt
20:29 pipps joined #salt
20:34 ZachLanich joined #salt
20:34 sp0097 joined #salt
20:35 Miouge joined #salt
20:39 tiwula joined #salt
20:40 Heartsbane joined #salt
20:40 amy_ joined #salt
20:45 bearonis joined #salt
20:51 fracklen joined #salt
20:52 kunersdorf {% set somefile = salt['file.find’](‘/path/to/search’, name=‘some.log', type='f', mindepth='2', maxdepth='2') %}
20:53 kunersdorf I've tried a bunch of diff formats for this, best it returned was "[]"
20:53 cmarzullo can you do it on the cli?
20:53 kunersdorf yes
20:54 cmarzullo It returns the needful?
20:55 ponyofdeath hi, trying ti have {{ var }} but modify it like removing certain chars from it
20:55 kunersdorf @cmarzullo:
20:55 kunersdorf salt ‘machines-*’ file.find /path/to/search name='some.log' type='f' mindepth='2' maxdepth='2'
20:55 kunersdorf machine:
20:55 kunersdorf - /path/to/search/some.log
20:56 cmarzullo ponyofdeath: {{ grains['id'] | replace('.','_') }}
20:56 kus joined #salt
20:57 cmarzullo kunersdorf: yeah it seems like it should work.
20:58 kunersdorf I suppose I can just do a cmd.run
20:59 kunersdorf but I'm trying to get away from them
21:00 kunersdorf this is the error: failed: Jinja variable 'file' is undefined
21:01 cmarzullo hmm looking at a snippit I invoked the module like this: {% if not salt.file.directory_exists(nagiosplugins.install_dir) %}
21:02 cmarzullo it's in a conditiional but maybe that helps
21:02 skogg joined #salt
21:05 stanchan joined #salt
21:07 losh joined #salt
21:07 FroMaster joined #salt
21:10 mohae_ joined #salt
21:11 scsinutz joined #salt
21:12 tiwula joined #salt
21:14 xbglowx joined #salt
21:14 lane_ joined #salt
21:16 scsinutz1 joined #salt
21:16 tawm04 joined #salt
21:21 MajObviousman kunersdorf: you mean we're not supposed to cmd.run ALL THE THINGS ?!?
21:22 MajObviousman man, I need to rewrite like, at least half of my states now
21:22 pipps joined #salt
21:24 Shirkdog joined #salt
21:24 ponyofdeath cmarzullo: thanks!
21:26 mavhq joined #salt
21:26 ronnix joined #salt
21:28 teryx510 joined #salt
21:28 heaje joined #salt
21:33 hasues joined #salt
21:33 hasues left #salt
21:34 jamesog kunersdorf: Do you really have curly quotes in your states or is that just your IRC client doing that? It wouldn't surprised me if they rendered oddly such that 'file.find' with curly quotes is not interpreted as a string
21:38 moooooo joined #salt
21:40 moooooo hey, I upgraded from 2015.8.10 to 2016.3.2 and now i'm getting timeouts allover the place from various things. Are there any upgrade steps I missed? I ssh'd into each minion and did a apt-get install salt-minion=newver , same on master then restarted everything
21:41 moooooo "Salt request timed out. The master is not responding. If this error persists after verifying the master is up, worker_threads may need to be increased."
21:41 moooooo if i manually start the master in debug mode (salt-master -l debug) everything seems to work perfectly, seems to just be the upstart version
21:42 moooooo using the packages provided in the salt PPA
21:44 moooooo nothing in the master log
21:44 mpanetta joined #salt
21:45 flowstate joined #salt
21:45 moooooo actually i'm getting this error: http://pastebin.com/6zRyzmfb
21:45 pipps joined #salt
21:48 moooooo guess I'll just go back to 2015 as this is buggy as hell
21:51 xbglowx joined #salt
21:53 lane__ joined #salt
22:05 stanchan joined #salt
22:06 kunersdorf @jamesog: http://pastebin.com/F0txSkfy
22:06 kunersdorf that is my current attempt
22:07 kunersdorf ty cmarzullo, I appreciate any help
22:07 west575 joined #salt
22:08 pipps joined #salt
22:15 deus_ex joined #salt
22:19 gimpy2938 left #salt
22:20 stanchan joined #salt
22:24 orion joined #salt
22:24 orion Hi. Are there known problems related to the rendering of Jinja templates with UTF8 in them?
22:27 alexhayes joined #salt
22:30 majuscule Is there any way to provision a saltmaster instance w/ salt w/o requiring another saltmaster to bootstrap it?
22:32 ronnix joined #salt
22:34 nZac joined #salt
22:35 lane_ joined #salt
22:35 xbglowx joined #salt
22:37 Edgan majuscule: salt-ssh is the way
22:38 Edgan majuscule: I reuse my salt-master master-mode code with salt-ssh to make a salt master.
22:40 scsinutz joined #salt
22:44 flowstate joined #salt
22:46 stanchan joined #salt
22:54 scsinutz joined #salt
22:59 scsinutz1 joined #salt
23:07 kkdok joined #salt
23:08 kkdok hello
23:08 kkdok just new here
23:13 antpa joined #salt
23:14 iggy orion: python2 + utf8 = no fun
23:25 alexhayes joined #salt
23:35 orion iggy: ok
23:35 orion left #salt
23:42 stanchan joined #salt
23:44 flowstate joined #salt
23:51 whytewolf Grrrr, stupid openstack exceptions.
23:54 whytewolf :/ can't get this stupid exception to match. it is a Conflict exception. only it doens't seem to come from keystone or openstackclient api's
23:56 stanchan joined #salt
23:57 spuder joined #salt

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