Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-01-26

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

All times shown according to UTC.

Time Nick Message
00:00 aawerner joined #salt
00:04 pipps99 joined #salt
00:09 xbglowx joined #salt
00:18 debian112 joined #salt
00:32 IdentService joined #salt
00:32 IdentService left #salt
00:33 Klas joined #salt
00:34 raspado joined #salt
00:40 abednarik joined #salt
00:46 catpig joined #salt
00:52 pipps joined #salt
01:00 sh123124213 joined #salt
01:15 madboxs joined #salt
01:16 tercenya joined #salt
01:17 nZac joined #salt
01:21 lasseknudsen joined #salt
01:34 debian112 joined #salt
01:40 amcorreia joined #salt
01:40 TheoSLC joined #salt
01:47 scsinutz joined #salt
01:47 onlyanegg joined #salt
01:48 scsinutz1 joined #salt
01:48 scsinutz1 hi, anyone use salt to upgrade salt?
01:54 cyborg-one joined #salt
01:55 JohnnyRun joined #salt
01:55 abednarik joined #salt
01:58 XenophonF sure, sometimes
01:59 scsinutz1 any tips or tricks on how to resume connection to a minion after the service is restarted?
01:59 XenophonF you mean, like in the middle of a job?
01:59 XenophonF no idea
01:59 scsinutz1 yea
01:59 XenophonF the service restart job appears to look like a timeout
02:00 XenophonF the minion reconnects later
02:00 XenophonF unfortunately, salt's not too good with that case
02:00 XenophonF it's a great config management tool
02:00 XenophonF not that great of a package manager
02:01 XenophonF in a perfect worlds, you could set up automatic updates on some schedule and the package manager (yum/apt/pkgng/wuauclt) would do the right thing w/r/t service restarts and whatnot
02:03 bltmiller joined #salt
02:03 XenophonF in my imperfect world, i'm looking at using at.present to fire off 'pkg upgrade && reboot' (or the Linux equivalent)
02:03 XenophonF long term i need to switch to a patch management solution that supports windows/macosx/linux
02:04 XenophonF we're using panorama9, which says it supports linux but doesn't, actually
02:10 sarcasticadmin joined #salt
02:13 debian112 joined #salt
02:14 MTecknology scsinutz1: what version are you using?
02:15 scsinutz1 2015.5.10 in prod, looking to upgrade to 2016.3.3
02:16 MTecknology I've had pretty good luck just pushing out pkg.latest salt-minion across the fleet
02:18 lorengordon joined #salt
02:18 MTecknology the only major issue you might run into is if you try to run state.highstate and part of that highstate has latest:salt and it updates in the middle of execution, but hasn't yet loaded all modules... it doesn't always mean breaking... just depends if the modules are compatible.
02:20 Gareth hrm. Anyone using salt-cloud & Google Computer Engine with Salt 2016.11?
02:22 whytewolf scsinutz1: https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-daemon-using-salt I typically use this instead of trying to restart salt directly
02:23 catpigger joined #salt
02:23 whytewolf which basicly just means. "restart salt through a means outside of salt, by setting it up using salt'
02:26 scsinutz1 ok… I can use 'at' - I can try nohup. how can I easily see the minions reconnecting to the masters?
02:27 iggy connectivity events?
02:27 scsinutz1 I was thinking about "salt "*" state.sls upgrade —async" and poll the jobid for status
02:27 whytewolf well if your useing at or nohup the job will return before the salt-minion will restart
02:27 scsinutz1 right..
02:28 scsinutz1 do connectivity events get logged in the /var/log/master ?
02:28 whytewolf you could watch the event bus for start events. or connectivity events
02:29 whytewolf https://docs.saltstack.com/en/2015.8/topics/event/index.html#listening-for-events
02:34 cacasmacas joined #salt
02:36 jeddi joined #salt
02:39 Shirkdog joined #salt
02:46 TheoSLC joined #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.4, 2016.11.1 <+> 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
02:49 evle joined #salt
02:52 raspado joined #salt
02:53 onlyanegg joined #salt
03:10 XenophonF joined #salt
03:13 onlyanegg joined #salt
03:14 scsinutz joined #salt
03:18 nZac joined #salt
03:19 onlyanegg joined #salt
03:22 abednarik joined #salt
03:26 adelcast joined #salt
03:34 mpanetta_ joined #salt
03:35 aidin joined #salt
03:47 TheoSLC joined #salt
03:49 raspado joined #salt
03:51 DEger joined #salt
03:53 onlyanegg joined #salt
03:54 PatrolDoom joined #salt
03:57 stooj joined #salt
04:01 k_sze[work] joined #salt
04:03 edrocks joined #salt
04:10 jeddi joined #salt
04:13 k_sze[work] joined #salt
04:17 seanz joined #salt
04:17 cro joined #salt
04:17 raspado joined #salt
04:29 stooj joined #salt
04:45 bocaneri joined #salt
04:58 TheoSLC joined #salt
05:04 dustywusty joined #salt
05:06 TheoSLC joined #salt
05:06 TheoSLC joined #salt
05:07 McNinja joined #salt
05:07 TheoSLC joined #salt
05:07 lazybear joined #salt
05:08 TheoSLC joined #salt
05:08 TheoSLC joined #salt
05:09 TheoSLC joined #salt
05:10 TheoSLC joined #salt
05:10 TheoSLC joined #salt
05:16 Vaelatern joined #salt
05:18 nZac joined #salt
05:23 jav joined #salt
05:45 sh123124213 joined #salt
05:48 stooj joined #salt
05:48 impi joined #salt
05:50 onlyanegg joined #salt
06:02 ivanjaros joined #salt
06:02 aidin joined #salt
06:03 SaucyElf joined #salt
06:06 scsinutz1 joined #salt
06:09 SaucyElf joined #salt
06:10 scsinutz joined #salt
06:11 jeddi joined #salt
06:18 mavhq joined #salt
06:18 cyborg-one joined #salt
06:39 jf_ joined #salt
06:39 jf_ does anybody have any recommendations for articles, videos, books, etc. to learn more about the mine? https://docs.saltstack.com/en/latest/topics/mine/ really isnt doing it for me
06:48 bltmiller joined #salt
06:55 onlyanegg joined #salt
07:03 lasseknudsen2 joined #salt
07:04 sh123124213 joined #salt
07:07 lasseknudsen joined #salt
07:07 CEH joined #salt
07:15 doublemetres joined #salt
07:19 nZac joined #salt
07:22 pipps joined #salt
07:28 nidr0x joined #salt
07:28 jeddi joined #salt
07:42 netcho joined #salt
07:56 stooj joined #salt
08:01 ronnix joined #salt
08:05 edrocks joined #salt
08:07 nfahldieck joined #salt
08:10 jhauser joined #salt
08:17 onlyanegg joined #salt
08:18 Miouge joined #salt
08:20 o1e9 joined #salt
08:21 Kelsar joined #salt
08:28 lorengordon joined #salt
08:36 scristian joined #salt
08:43 toanju joined #salt
08:47 XenophonF joined #salt
08:48 cyraxjoe joined #salt
08:53 sh123124213 joined #salt
08:56 ecdhe joined #salt
08:59 justanotheruser joined #salt
09:03 muxdaemon joined #salt
09:04 armyriad joined #salt
09:09 sfxandy joined #salt
09:10 Rumbles joined #salt
09:11 s_kunk joined #salt
09:15 lorengordon joined #salt
09:16 rofl____ is there a way to schedule a sls with the batch parameter so only one is ran at a time?
09:18 rofl____ is it the schedule.present maxrunning im looking for?
09:20 nZac joined #salt
09:21 daks hello
09:21 daks i want to use test-kitchen to test my formula, as i saw several others are tested with it
09:22 daks but kitchen keeps installing chef and omnibus when creating my vagrant VM
09:22 daks do anyone knows how to tell kitchen to not do it?
09:23 daks i'll ask in #kitchenci, it's more logical :)
09:25 necronian joined #salt
09:34 ruxu joined #salt
09:43 babilen daks: You mean you are using https://github.com/simonmcc/kitchen-salt ?
09:43 babilen But yeah, #
09:43 babilen #kitchenci is probably a better channel
09:46 daks babilen: that is what i want to use
09:46 daks i found options that do the job
09:46 daks require_chef and require_chef_omnibus set to false do the job
09:47 oida joined #salt
09:51 jeddi joined #salt
09:54 sh123124213 joined #salt
09:56 netcho joined #salt
09:57 mikecmpbll joined #salt
09:59 Neighbour can someone explain to me what the difference between saltenv and pillarenv is?
10:07 lasseknudsen2 joined #salt
10:11 ProT-0-TypE joined #salt
10:13 lasseknudsen joined #salt
10:18 onlyanegg joined #salt
10:26 yannis joined #salt
10:27 Guest87689 hey everyone! Does anyone know if there's a way to run a reactor module (that gets triggered by the Salt API component) and specify the POST data in the salt master command line?
10:28 Guest87689 basically I thought state.orchestrate (the orch runner) would be the answer, but it doesn't take "data" parameter :(
10:28 mikecmpbll joined #salt
10:29 muxdaemon joined #salt
10:29 AndreasLutro the orchestration runner takes a "pillar" arg which you can feed arbitrary data into
10:29 rpb joined #salt
10:30 Neighbour as long as it is a JSON-style dict :)
10:31 Guest87689 oh wait...... I remembered I got past that issue
10:31 ruxu_ joined #salt
10:31 Guest87689 my issue is that the definition of steps in a module run by reactor API and by orchestrate runner are different....... but come to think of it I think I have an example I can copy to solve my problem
10:32 ruxu_ joined #salt
10:33 ruxu_ joined #salt
10:33 Guest87689 namely I get something like "Comment: State 'cmd.saltutil' was not found in SLS 'reactor.deploy'" when I use state.orchestrate
10:34 Guest87689 but salt API is able to trigger that module without an issue
10:34 Guest87689 so I'm wondering what I need to do to test that module synchronously via command line
10:35 ruxu joined #salt
10:41 scsinutz joined #salt
10:58 madboxs joined #salt
11:09 amcorreia joined #salt
11:15 AndreasLutro Guest87689: easier if you just share the reactor + orchestrate sls you have
11:15 AndreasLutro but the way you'd run saltutil.whatever in an orchestrator is
11:16 AndreasLutro run_saltutil: { salt.function: [ name: saltutil.whatever, tgt: minion_id ] }
11:17 Guest87689 thanks for that AndreasLutro! I'm currently not going to block myself on this as I need to finish something, but the reason I didn't want to do your last suggestion is because I want to test my whole SLS file to verify it's correct, will come back to it some other time hopefully!
11:18 AndreasLutro the whole orchestration sls?
11:18 AndreasLutro sudo salt-run state.orchestrate name.of.sls_file pillar='{foo: bar}'
11:18 AndreasLutro I'm not aware of a way to manually test reactor sls
11:21 Guest87689 So the way I understand it so far is that the definitions inside SLS files for the cherry API events and the SLS files for, for example, minion start-up events have a different format
11:21 Guest87689 my SLS file for cherry API event has task definitions like: "cmd.saltutil.sync_grains"
11:22 AndreasLutro SLS is just a file format that returns a set of data
11:22 Guest87689 my SLS file for minion start-up event has task definitions like: "salt.state"
11:22 AndreasLutro and yes, reactors/orchestrators/states require that data to be structured differently
11:22 Guest87689 I was very pleased to discover state.orchestrate + the "salt.state" format works great
11:23 Guest87689 but state.orchestrate + the "cmd.saltutil.sync_grains" format doesn't, so would be great if there's an alternative :)
11:23 AndreasLutro like I said, salt.function for orchestration
11:23 AndreasLutro https://docs.saltstack.com/en/latest/topics/orchestrate/orchestrate_runner.html#examples
11:23 Guest87689 so I guess I don't need orchestratoin for the cherry API SLS file?
11:24 AndreasLutro I don't know what the cherry api sls file is
11:24 AndreasLutro you probably mean reactor sls
11:24 AndreasLutro it depends, we use reactors to call orchestrators a lot, but if you don't need orchestration features, you can just use reactors alone
11:25 Guest87689 for some rason I'm having difficulty finding docs for HTTP API + reactor SLS
11:26 Guest87689 my reactor events are prefixed "netapi/" if that helps
11:26 Guest87689 and in fact my definitions (as I described earlier) look like these http://bencane.com/2014/07/17/integrating-saltstack-with-other-services-via-salt-api/
11:27 AndreasLutro I don't use the api but what probably happens is that salt-api triggers a salt event. you configure reactors (SLS files) to run when specific events are triggered
11:28 Guest87689 cool, so I tried to convert my mysterious "cmd.saltutil.sync_grains" format to something like "salt.function" or "salt.state" but unfortunately the API event didn't work then
11:28 Guest87689 I got something like "ReactWrap object could not find 'cmd'" or similar
11:29 AndreasLutro you'll have to share your reactor + orchestration sls and the full error message
11:30 Guest87689 will do, give me 5 mins
11:35 netcho joined #salt
11:39 jhauser joined #salt
11:40 cloph joined #salt
11:42 Guest87689 hey AndreasLutro here you go: http://pastebin.com/wErrcXDf
11:42 Guest87689 read at the top what it is I'm trying to achieve
11:43 Guest87689 thanks for your help!
11:43 scsinutz joined #salt
11:43 AndreasLutro you've misunderstood - reactor SLSes and orchestration SLSes are not cross-compatible
11:43 cloph Hi *, quick question re subnet matching: once can target specific hosts on commanline via "-S 10.0.0.0/24" - but how's the syntax for having it in a sls? What would be the subnet equivalent to this one with a grain? {% if grains['os'] == "Ubuntu" %} ?
11:46 AndreasLutro Guest87689, consider calling an orchestrator from the reactor, like this https://bpaste.net/show/6fb62682e81f
11:46 AndreasLutro like I said I'm not aware of a way to manually run reactor SLSes for debugging
11:48 Guest87689 AndreasLutro ok cool, so there's basically no way for me to run the reactor SLS in CLI
11:49 amy joined #salt
11:49 AndreasLutro not afaik
11:49 Guest87689 can I call an orchestrate SLS module from within a reactor SLS?
11:49 Guest87689 maybe then I can use an extra layer to get what I want, and have a very small reactor SLS
11:50 AndreasLutro there's no such thing as an orchestrate sls module, you can see from my bpaste how to call an orchestration SLS from a reactor
11:50 Guest87689 right, but can I call an orchestration SLS from within a reactor SLS?
11:50 AndreasLutro see my bpaste link
11:51 Guest87689 ahhh
11:51 Guest87689 now I saw it :)
11:51 Guest87689 beautiful, I will try that!
11:51 Guest87689 as in I saw it earlier but didn't quite register, thanks man
11:55 DanyC joined #salt
12:00 impi joined #salt
12:01 kettlewell joined #salt
12:03 ronnix joined #salt
12:07 edrocks joined #salt
12:12 kbaikov joined #salt
12:18 onlyanegg joined #salt
12:25 amy joined #salt
12:26 viq AndreasLutro: thanks for the hint with ignore_missing, it's working for me now.
12:36 nomad_fr_ left #salt
12:36 evle1 joined #salt
12:38 Firewalll joined #salt
12:40 ReV013 joined #salt
12:44 scsinutz joined #salt
12:47 evle joined #salt
12:59 arapaho joined #salt
13:01 lasseknudsen2 joined #salt
13:02 abednarik joined #salt
13:05 oliv` joined #salt
13:07 muxdaemon joined #salt
13:17 numkem joined #salt
13:18 coredumb joined #salt
13:19 toanju joined #salt
13:29 lord2y joined #salt
13:37 nfahldieck joined #salt
13:39 nfahldieck Hi all, I'm looking for a way to read/import a yaml-file from a minion to it's pillar located on the salt-master under /srv/pillar/host/<minion_id>/ ... is there any way to achieve this?
13:39 ryan8403 joined #salt
13:39 DammitJim joined #salt
13:44 Hetman joined #salt
13:44 scsinutz joined #salt
13:45 Hetman Hello any trick to use wildcard with file.absent or different way ? something like /test/*.tmp: file.absent
13:45 abednarik joined #salt
13:54 nZac joined #salt
13:54 professor246 joined #salt
13:55 nicksloan joined #salt
13:56 ravenx joined #salt
13:56 ravenx does salt have an HTTP API?
13:56 ravenx i can only seem to find that it has a Python API
13:58 AndreasLutro salt-api
13:59 ravenx ah, so as long as that is running, i'm good?
13:59 AndreasLutro probably some extra stuff you need to configure, but look it up in the docs
13:59 ravenx excellent
13:59 ravenx thanks a bunch
14:07 lasseknudsen joined #salt
14:08 gladia2r joined #salt
14:10 cloph trying my luck again: quick question re subnet matching: once can target specific hosts on commanline via "-S 10.0.0.0/24" - but how's the syntax for having it in a sls? What would be the subnet equivalent to this one with a grain? {% if grains['os'] == "Ubuntu" %} ?
14:16 gladia2r heya - i have in a file various stuff, including some code like "format: "\"%{%s}t " wich apparently is getting caught by jinja for some reason | " Jinja syntax error: Encountered unknown tag 's'.; line 7", is there a way to avoid this somehow?
14:17 cloph put it into {{ }}
14:18 cloph or if you have many of those: {% raw %} <your jinja-like, but not quite jinja stuff here... {% endraw %}
14:18 brousch__ joined #salt
14:18 gladia2r cloph: maybe you can try matching the grains['ipv4'] if contains the IP you want, or fqdn_ip4 - if its about the main IP
14:19 cloph gladia2r: but I don't want to match a specific IP, but match against a subnet/CIDR style..
14:19 onlyanegg joined #salt
14:20 gladia2r well cloph, the thing is I have the variable already included {{ }}, problem is I have that thing outside of it, which is getting caught by jinja - and I need that basically in the file as it is - if you get what I mean
14:20 AndreasLutro cloph: you'll have to look for a salt execution module that checks CIDR. maybe the network module does it
14:21 AndreasLutro if I google "salt module cidr" I get some promising results
14:23 gladia2r - I guess I can't 'escape' that code in the file and need to find another method
14:24 cloph gladia2r: not sure whether I understood you correctly. if the file is in a separate file and interpreted there, why not use template: None to not do any jinja-stuff?
14:26 abednarik joined #salt
14:31 babilen cloph: You might just want to target states by CIDR, rather than restricting (partial) state applications inline
14:31 gladia2r cloph: i have a single file, in which I need to manage, and change the IP (aka {{ grains['fqdn_ip4'][0] }} ) - in the same file I have also that 'format: "\"%{%s}t' which for jinja spits a syntax error, do you say is there another way then jinja replacing stuff in a file based on a grain (?)
14:32 cloph babilen: yes, that's what I'd like to do, but how would I go around it in the sls if not by hiding those states within the if?
14:32 cloph what would be the proper way then?
14:32 Tanta joined #salt
14:32 babilen cloph: You would only target the appropriate states by CIDR to begin with
14:33 babilen (so that there's no need to filter)
14:33 babilen gladia2r: Could you paste what you have to one of http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
14:33 cloph babilen: that still leaves me puzzled, Apparently I don't see the forest in all those trees..
14:33 jhauser joined #salt
14:33 cloph care to explain how I would only target the states by CIDR?
14:34 babilen cloph: So, just to clarify: You have a number of states (say A, B and C) you want to execute on minions that have an address within a certain CIDR?
14:34 cloph yes.
14:34 babilen So, put all those states into a SLS and target that SLS by subnet
14:35 babilen Rather than targetting the SLS to minions on which you *don't* want to run those states and filtering the states inline
14:35 cloph but how?
14:35 babilen Ah!
14:35 cloph I don't want to call salt -S ...
14:35 babilen One second .. you'd do it in the top.sls
14:36 babilen https://docs.saltstack.com/en/latest/topics/targeting/ipcidr.html (i.e. "- match: ipcidr") or https://docs.saltstack.com/en/latest/topics/targeting/compound.html (i.e. "- match: compound" with "S@192.168.1.0/24 ")
14:37 cloph gladia2r: so you want jinja applied in the file, so I don't see why the raw-escapöing shouldn't work in there (although I admit I never tried {{ 'some raw string' }} or with raw block is what I'd expect to work...
14:37 babilen If you then run a highstate (i.e. "state.apply") against your minion it will run the "appropriate" (i.e. targeted) states
14:39 cloph babilen: thanks for the pointer, although I guess I kinda misunderstood your partial state application then. But at least I now have something to work with :-)
14:40 babilen cloph: "partial" simply meant "the part that is in the {% if grains['os'] == "Ubuntu" %} bit of your SLS"
14:40 babilen (adapted for the hypothetical subnet check)
14:40 anotherzero joined #salt
14:41 gladia2r babilen: this is what I have, and what I get: https://gist.github.com/gladia2r/100bf5c1db4070b52770a8b61bc9b47b
14:42 thebinary joined #salt
14:43 babilen gladia2r: You want to literally have "\"%{%s}t %I .\\n%{%s}t %O .\"" in that file?
14:44 cloph yeah, and I probably mixed up terminology then. I want to apply parts a sls file's definition, but don't need to use to customize snippets in that sls, rather comment out whole statements (lacking proper terminology here I think, but even with the targeting itself I can do what I intend, even not the same way I initially planned)
14:44 babilen cloph: The problem is that people refer to SLS files and the individual statements in there as "states"
14:45 babilen I tend to call the former simply SLS
14:45 scsinutz joined #salt
14:46 ravenx mine are used professionally, programmatically and they save me a lot of time, so that's a pro, more than a con
14:46 ravenx i've taken to calling the SLS files prostates
14:47 gladia2r babilen: yes - its part of a config template file that sets up http virtualhosts
14:47 AndreasLutro prostates hahaha
14:47 beardedeagle joined #salt
14:48 zhalla joined #salt
14:48 babilen gladia2r: Hmm, looks as if the renderer barfs all over the format strings in there .. you could enclose it in {% raw %} .... {% endraw %} if nothing else helps (more escaping that is)
14:50 zhalla left #salt
14:52 cloph looking at your paste: where is that you use jinja templating actually? To mee it looks you want that whole file to be raw/as is?
14:53 PatrolDoom joined #salt
14:53 gladia2r yess, indeed babilen - that works - thanks! all set :)
14:53 nfahldieck Can I store an arbitrary plain file for minion(s) as pillar data ?
14:56 babilen gladia2r: And cloph raises a valid point. Do you actually do *any* templating in that file?
14:56 gladia2r babilen: cloph - check line 13 - also i haven't pasted the whole file, there are more like that
14:57 cloph ah :-) just assumed the file would already be over with line 9 :-)
14:57 babilen right :)
14:57 babilen Fair enough then
14:58 gladia2r ty ty - its a big fat file ;) cheers!
15:02 ALLmightySPIFF joined #salt
15:02 Brew joined #salt
15:05 sevag joined #salt
15:09 sevag hello. i want to use the Salt-PyLint minpyver module to check Python 2.6 compatibility in my code. here is my setup.cfg (which i pass to pylint): http://pastebin.com/JdTUYwqM
15:09 eThaD joined #salt
15:09 sevag i specify disable-all because i already use flake8 for general linting, i only want to use PyLint for minpyver
15:09 sevag is this the right approach? i'm not getting any output from my test code which is 2.7 compatible but not 2.6
15:11 gladia2r joined #salt
15:16 onlyanegg joined #salt
15:16 andi- joined #salt
15:21 sarcasticadmin joined #salt
15:28 sevag i'm missing the "--enable=E0598" which is the code of minpyver
15:28 sevag works now
15:30 bergei joined #salt
15:32 alvinstarr joined #salt
15:32 mpanetta joined #salt
15:38 ssplatt joined #salt
15:39 Rumbles joined #salt
15:39 tyler-baker joined #salt
15:46 hasues joined #salt
15:46 hasues left #salt
15:58 ksk hola, one quick question; has salt builtin thread safety for user.add?
15:58 ksk as, linux useradd (which salt does use?) does not have such a feature. and if you have like some salt-calls that do a user.add things go broke?
16:01 cloph FYI: {% if salt['network.in_subnet']('10.0.0.0/24') %}  is what I had in mind/can use as initially planned - thanks babilen and AndreasLutro for the pointers.
16:02 babilen Splendid
16:02 carlpett joined #salt
16:04 _JZ_ joined #salt
16:05 carlpett Hi! Orchestration question: I want to pass in the targets of my orchestration as input parameters. I tried doing this as pillars, basically doing salt-run state.orchestrate my-orchestration pillar='{"nodes":["node-1","node-2"]}'. This isn't working very well... I'm setting tgt: {{ pillar['nodes'] }}, and it is passing the array as a string. How is this supposed to be done?
16:07 gtmanfred {{pillar['nodes'] | load_json }}
16:07 edrocks joined #salt
16:07 netcho joined #salt
16:07 carlpett In general, it seems very tricky to do anything dynamic with the targeting - there doesn't even seem to be any module/runner for getting a list of minions for some targetting parameter?
16:08 nickabbey joined #salt
16:08 gtmanfred you can use the manage.up runner? or use the cache.grains module to use the tgt_type and tgt?
16:08 thebinary joined #salt
16:09 carlpett hm, I'll have a look at the cache module, don't think I've seen that one yet. As for manage.up, I wasn't aware if it supported a targeting filter? I'll check that out as well, thanks!
16:09 gtmanfred cache runner
16:10 gtmanfred and manage supports it in 2016.11
16:10 thebinary joined #salt
16:10 carlpett It just seems a bit more contrieved than I expected, so I'm wondering if I'm going about it the wrong way :)
16:10 gtmanfred https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.manage.html#salt.runners.manage.up
16:10 carlpett Oh, haven't updated to 2016.11 yet, maybe I'll should do that as well
16:11 carlpett Both cache and the 2016.11-version of manage look very promising! Thank you
16:11 gtmanfred you can pass them in thru pillars, you might have to pass it thru the load_json filter to load the string as a list
16:12 monokrome joined #salt
16:16 bookwar joined #salt
16:17 alrayyes joined #salt
16:21 JohnnyRun joined #salt
16:26 bowhunter joined #salt
16:32 raspado joined #salt
16:33 sp0097 joined #salt
16:37 thebinary joined #salt
16:37 abednarik joined #salt
16:39 art5005 joined #salt
16:42 art5005 Hi all.. I'm getting a 'chkconfig' error about a service not having defined runlevels, anyone seen it before?
16:42 art5005 Here's my init.sls and the error:  https://gist.github.com/anonymous/cb90686708c67f3e9d40c33e034859a6
16:42 art5005 FWIW, if i rerun state.apply, the service spins up fine.
16:42 debian112 joined #salt
16:42 art5005 It's just when installing the service the first time that it won't.
16:43 anotherzero joined #salt
16:45 art5005 Hrm, so it looks like it is trying to start the service before it is added to chkconfig, but not sure why.
16:51 scsinutz joined #salt
16:51 Trauma joined #salt
16:52 netcho joined #salt
16:56 DanyC joined #salt
16:59 sh123124213 joined #salt
17:01 DEger joined #salt
17:01 chowmeined joined #salt
17:02 scsinutz joined #salt
17:05 sh123124213 anybody using saltstack with satellite ?
17:16 pipps joined #salt
17:16 anotherzero joined #salt
17:17 pipps joined #salt
17:18 debian112 joined #salt
17:24 impi joined #salt
17:24 bowhunter joined #salt
17:25 DammitJim joined #salt
17:27 woodtablet joined #salt
17:28 jf_ joined #salt
17:29 jf_ does anybody have any recommendations for articles, videos, books, etc. to learn more about the mine? https://docs.saltstack.com/en/latest/topics/mine/ really isnt doing it for me
17:30 Lionel_Debroux joined #salt
17:31 gtmanfred there isn't really anything else that the mine does than what is in that doc
17:32 bltmiller joined #salt
17:33 nZac joined #salt
17:34 DanyC joined #salt
17:37 whiteinge yeah. it's very simple. `mine.push` adds values to a cache on the master. `mine.get` gets values from that cache. and the `mine_functions` config runs that on a regular interval.
17:37 abednarik joined #salt
17:37 whiteinge er, `mine.send` rather
17:38 cacasmacas joined #salt
17:39 bltmiller what kind of targeting does the survey runner support? trying to target using nodegroups, but unsure on syntax https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.survey.html
17:40 amy_ joined #salt
17:40 tracphil joined #salt
17:41 whiteinge bltmiller: from the code it looks like if you pass `tgt_type` as a kwarg you can use any of the types. e.g., `tgt_type=compound`
17:42 tracphil Hi, what are you folk using for an ENC for Saltstack, if at all?
17:42 bltmiller whiteinge: hmm, such as: salt-run survey.diff tgt='mynodegroup' tgt_type='nodegroup' grains.item foo
17:43 gtmanfred bltmiller: yes
17:44 bltmiller no worky :/
17:44 gtmanfred do you get an error? have you tried nodegroups
17:45 gtmanfred might also try tgt='N@mynodegroup' tgt_type=compound
17:45 whiteinge bltmiller: ah, yes. higher in the code it's restricted to compound and pcre
17:45 gtmanfred looks like it might only be allowed to be compound or pcre https://github.com/saltstack/salt/blob/develop/salt/runners/survey.py#L157
17:45 bltmiller heh
17:46 bltmiller looks like it hands off to salt.client?
17:46 bltmiller ohhh I see what you're seeing now
17:47 bltmiller would it make sense to add support for more target type options on the survey runner?
17:47 onlyaneg1 joined #salt
17:47 gtmanfred ¯\(°_o)/¯
17:47 gtmanfred sure
17:49 nixjdm joined #salt
17:51 debian112 joined #salt
17:51 ipmb joined #salt
17:53 muep joined #salt
17:53 sh123124213 joined #salt
17:54 Miouge joined #salt
17:56 muep joined #salt
17:57 ipmb Any suggestions on how to handle edits in a file that is defined in another state? Basically all my minions get a default config file, but if I'm installing another package on the minion, I want to append a line to that file.
17:58 ipmb without breaking idempotency
18:00 swa_work joined #salt
18:01 ipmb looks like file.accumulated is exactly what I want... hadn't seen that one before
18:02 tracphil_ joined #salt
18:02 nickabbey joined #salt
18:02 Edgan joined #salt
18:03 StarHeart joined #salt
18:04 swa_work joined #salt
18:05 Trauma joined #salt
18:07 cscf Are nodegroup names allowed to contain numerals?
18:08 gtmanfred they should be
18:09 sh123124213 joined #salt
18:10 cscf I have a nodegroup match in top.sls that's ... not matching
18:10 Praematura joined #salt
18:11 darebwoi joined #salt
18:13 cscf gtmanfred, 'iaas-211' should be a valid name, then?
18:13 DanyC joined #salt
18:14 gtmanfred afaik yeah, i don't know of any limitations on nodegroup names
18:14 pipps joined #salt
18:15 cscf "salt -N iaas-211 test.ping" gets no matches.  It's defined in /etc/salt/master/master.d/nodegroups.conf, as are others that do work
18:16 darebwoi hi bros !
18:17 funzo_ joined #salt
18:17 gtmanfred did you restart the salt master after specifying the nodegroup?
18:17 cscf Oh, I'm dumb. Forgot a subdomain in their definition
18:17 gtmanfred ahh heh
18:17 cscf We have too many levels of subdomains
18:17 pipps99 joined #salt
18:18 debian112 joined #salt
18:21 ruxu joined #salt
18:21 darebwoi joined #salt
18:23 lumtnman joined #salt
18:24 XenophonF joined #salt
18:28 foundatron joined #salt
18:29 nicksloan joined #salt
18:29 s_kunk joined #salt
18:33 bltmiller still on the topic of the survey.diff runner, how might I place that in an SLS file? e.g. turn `salt-run survey.diff '*' grains.item foo` into {% for i in salt['saltutil.runner']('survey.diff' ...?`
18:33 bltmiller I always seem to mess up this syntax
18:34 edrocks joined #salt
18:39 gtmanfred ('survey.diff', '*', 'grains.item', 'foo')?
18:44 bltmiller returns error about length of parameters (TypeError: runner() takes exactly 1 argument (4 given))
18:46 gtmanfred what version of salt are you on?
18:46 gtmanfred oh
18:46 gtmanfred it has to be kwargs
18:47 bltmiller 2016.3.4
18:47 gtmanfred yeah doesn't matter, it has to be kwargs which will be fun because the survey runner doesn't actually have the accepted kwargs in the function name
18:48 bltmiller riiight lol, hence my question :D
18:48 bltmiller ('survey.diff', tgt='*', ??='grains.item', ??='foo')?
18:49 gtmanfred lol you can't do it
18:49 bltmiller woohoo!
18:49 gtmanfred because, it is using args
18:49 gtmanfred tgt and cmd have to be args https://github.com/saltstack/salt/blob/develop/salt/runners/survey.py#L149
18:50 Inveracity joined #salt
18:52 bltmiller in your opinion gtmanfred, is this a bug? feature request?
18:53 gtmanfred feature requewst
18:59 stevendgonzales joined #salt
19:00 Mattch joined #salt
19:00 vlfedotov joined #salt
19:00 nickabbey joined #salt
19:03 pipps joined #salt
19:03 oida joined #salt
19:09 onlyanegg joined #salt
19:13 debian112 joined #salt
19:14 Miouge joined #salt
19:15 SaucyElf joined #salt
19:16 SaucyElf joined #salt
19:16 candyman88 joined #salt
19:20 tercenya joined #salt
19:26 djgerm1 is there a way to change the python interpreter that salt uses?
19:26 gtmanfred that the salt master command runs with?
19:26 djgerm1 yah
19:27 djgerm1 not that anybody would ever want to :)
19:27 gtmanfred https://github.com/saltstack/salt/blob/develop/scripts/salt-master#L1
19:27 gtmanfred it just uses /usr/bin/env python
19:27 gtmanfred so whatever the first python binary in$PATH is is the one it will use
19:28 djgerm1 ah thanks
19:29 StolenToast joined #salt
19:30 StolenToast when a minion first connects to a master how does the master determine its hostname?
19:30 StolenToast I have two minions that are registered as different nodes but salt thinks they are the same, as in targeting node A gives a response for A and B together
19:30 gtmanfred the minion reports it
19:30 StolenToast where does the minion get this info?  Local hostname file or dns?
19:31 gtmanfred by default it is the fqdn
19:31 StolenToast I'm using DNS
19:31 gtmanfred but you can set id: in /etc/salt/minion
19:31 StolenToast ok I'll check if there's something wrong there
19:31 gtmanfred or just set it in /etc/salt/minion_id
19:32 morissette joined #salt
19:32 StolenToast ah that's strange, node B built with node A's ID in the minion_id
19:32 overyander Hi, can someone point me in the right direction to resolve a unit test test issue in my pull request? https://github.com/saltstack/salt/pull/38906   thanks
19:32 saltstackbot [#38906][OPEN] Added KMS and other features and more system flexibility | What does this PR do?...
19:34 overyander i found the test file https://github.com/saltstack/salt/blob/develop/tests/unit/modules/win_license_test.py but i have no clue what needs to be done
19:36 StolenToast gtmanfred: if I wipe out the minion_id from all the minions and reboot the service do you think it would sort itself out?
19:36 gtmanfred MTecknology: i am not going to have any time to work on those unit tests any time soon
19:36 StolenToast there are actually about a dozen of these in among a larger node group
19:36 gtmanfred StolenToast: also remove the minion keysi n /etc/salt/pki
19:37 StolenToast on the minion?
19:37 gtmanfred yes
19:37 StolenToast ok
19:38 nickabbey joined #salt
19:39 gtmanfred overyander:you should just need to update the expected calls to be %systemroot% instead of C:\\
19:39 swa_work joined #salt
19:40 overyander gtmanfred thanks, wasn't sure if it was really that easy.
19:40 gtmanfred it is :D
19:41 MTecknology everything is easy when done with salt!
19:41 StolenToast cool that worked
19:41 StolenToast everything is shiny again
19:41 MTecknology err.. s/easy/easily repeatable/ :P
19:43 pmcg joined #salt
19:43 ipmb joined #salt
19:52 hackel joined #salt
19:54 bltmiller joined #salt
19:56 twork_ joined #salt
19:58 twork_ so... i know that "- order: 1 ; - order: 2 [...]" isn't the recommended way to order things.  but i'm in a spot where it's about the only way i see to make things work.  but:
19:59 sjorge joined #salt
20:00 Renich joined #salt
20:00 pipps joined #salt
20:01 twork_ i need to do, essentially, "cmd.run: order: 1 ...{{ loop of names}}: [ do stuff ] ; cmd.run: -order: [last]
20:01 bowhunter joined #salt
20:02 twork_ if that makes sense.  probably it doesn't.  i'll go write mail.
20:02 pipps99 joined #salt
20:04 twork_ ...but if you do get my drift, is there a way to convey "- order: [last]"?
20:06 PatrolDoom twork_: so you're wanting to run the "last" cmd after every loop or just after the loop?
20:15 swa_work joined #salt
20:15 twork_ PatrolDoom: after the loop.
20:15 mpanetta joined #salt
20:15 PatrolDoom so add it to a block outside of the loop w/ a last option?
20:15 djgerm1 can salt states generally be thrown in any old yaml parser checker and verify that it's syntactically valid?
20:16 twork_ PatrolDoom: yeah.  is there such a thing, a "last"?
20:16 PatrolDoom the ordering option iirc, i've only used it minimal
20:17 PatrolDoom i mean dont see a clear problem, you run one state for the foor loop & another for the final command
20:18 gtmanfred yes, you can use order: last
20:19 gtmanfred it will be the last state run
20:19 twork_ PatrolDoom: my wish would be: [state -order: 1] [state with a loop -order 2] [state with a loop -order 3] [non-looping state -order: 4]
20:19 twork_ where the 4th one fires after all the loops are done
20:20 twork_ gtmanfred: thanks. that'll do me for now.
20:20 PatrolDoom sounds like what you mentioned would work.
20:20 twork_ thanks guys.  i'm off to go try it.
20:26 sgo_ joined #salt
20:29 llua when you are using jinja2 templating in file.managed and give a list of keys/values via the context keyword, how do you access them inside the template?
20:30 gtmanfred {{key}}
20:30 gtmanfred it just makes an object inside of jinja inside of the source file
20:31 llua ok, i thought they were in an hash. thank you.
20:34 art5005 does a required file have be defined as a resource to salt.. aka, it can't check a file exists on the FS without first defining that file in salt somewhere?
20:37 cscf art5005, what sort of resource?  Not sure what you mean.  On master or minion?
20:37 edrocks joined #salt
20:38 art5005 eh, master.. i have a service.running that requires a file to exist.
20:38 art5005 so i have something like.. "require: file: /opt/file.txt"
20:38 art5005 but that file exists, and it still says it is missing it and can't start the service.
20:39 cscf art5005, oh I see.  - require requires states.  Some states happen to have the name of a file.
20:39 bowhunter joined #salt
20:39 cscf art5005, you want to make a file.exists state for it
20:40 art5005 ah.
20:40 art5005 then use that in the require?
20:40 cscf which is literally just:   /opt/file.txt: \n   file.exists
20:41 cscf art5005, yes, then you can require: file: /opt/file.txt
20:41 den joined #salt
20:41 art5005 got it.. alright, thanks.
20:41 den hello
20:41 cscf hi
20:41 dyasny joined #salt
20:41 den anybody knows if jinja is supported in other extension files besides .sls ?
20:42 den for example .xml?
20:42 den o_o'
20:42 cscf den, you mean files that you want to file.managed?
20:42 den yup
20:42 cscf den, just add - template: jinja to file.managed
20:43 den ahh sweet
20:43 den thanks for your help!
20:43 den :)
20:43 cscf np
20:43 pipps joined #salt
20:47 nicksloan joined #salt
20:48 XenophonF joined #salt
20:51 nicksloan joined #salt
20:52 nicksloan joined #salt
20:53 Xenophon1 joined #salt
20:55 stooj joined #salt
20:57 tercenya joined #salt
21:00 nicksloan joined #salt
21:01 nicksloan joined #salt
21:07 Shirkdog joined #salt
21:07 Shirkdog joined #salt
21:11 thebinary joined #salt
21:32 Rumbles joined #salt
21:38 cebreidian joined #salt
21:38 toanju joined #salt
21:39 abednarik joined #salt
21:43 pfallenop joined #salt
21:46 bltmiller joined #salt
21:50 DEger joined #salt
21:53 dirosden joined #salt
21:54 saintromuald joined #salt
21:54 sfxandy joined #salt
21:59 keltim joined #salt
22:00 keltim isn't there a way to prevent service restarts until highstate is finished? i.e., to prevent many service restarts throughout highstate
22:01 xbglowx joined #salt
22:05 swa_work joined #salt
22:06 dirosden hi. would like the salt minion to log some grain details in the log output. i dont see options other than python logrecord supported fields - e.g. log_fmt_console: '%(asctime) %(levelname) %(module) %(funcName) %(message)'
22:07 swa_work joined #salt
22:07 dirosden how can i get environment and/or grain data logged. thanks.
22:08 swa_work joined #salt
22:10 swa_work joined #salt
22:11 swa_work joined #salt
22:18 swa_work joined #salt
22:18 swa_work joined #salt
22:18 rebbdohr joined #salt
22:19 TashKLee joined #salt
22:19 xbglowx joined #salt
22:21 DEger joined #salt
22:21 TashKLee Question about salt-cloud map files. Is it possible to use "require:" statements in a map file to enforce a specific sequence of server builds? Example: I want to build my SQL server first, then have the web servers go last so when they complete, the database is already up and waiting.
22:25 lord2y joined #salt
22:28 cyborg-one joined #salt
22:32 swa_work joined #salt
22:34 sh123124213 joined #salt
22:36 rylnd joined #salt
22:39 swa_work joined #salt
22:42 drawsmcgraw1 left #salt
22:44 mikecmpbll joined #salt
22:49 mpoole joined #salt
22:49 MTecknology TashKLee: sounds like you want the orchestration stuff
22:50 mpoole hey, does anyone know how to debug random file management timeouts? Unable to manage file: Message timed out
22:50 mpoole it's small config files, nothing big
22:50 MTecknology probably a communication problem w/ the master
22:51 mpoole it's just over an AWS VPC
22:51 mpoole salt 2016.11.1
22:55 mpoole I'm starting to think my salthiera DB is getting too big
22:56 nidr0x joined #salt
23:02 mpoole seems to only effect files that pull from that ext pillar
23:21 MTecknology mpoole: you're storing "files" in pillar?!
23:21 MTecknology I guess I've done it, but usually only for keys 'n such
23:23 PatrolDoom MTecknology: supposed to use pillars for everything
23:23 * PatrolDoom looks at nginx.ng formula
23:25 mpoole no, i'm writing files with data from a pillar from salthiera
23:27 PatrolDoom mm salt w/ puppet stuffs
23:27 * PatrolDoom googles
23:27 mpoole it's for storing encrypted vars in pillars
23:28 PatrolDoom OHHH nice
23:28 PatrolDoom i def need something like this
23:28 PatrolDoom mpoole: ty
23:28 PatrolDoom i doubt mine will get very large
23:28 MTecknology PatrolDoom: what makes it better than gpg encryption?
23:28 PatrolDoom MTecknology: pracmatically being able to do so
23:28 PatrolDoom pragmatically*
23:28 mpoole the cool way to do it these days is using vault
23:28 mpanetta mmmm vault
23:29 PatrolDoom i still need to wrap my head around vault
23:29 PatrolDoom i like ti
23:29 MTecknology that.. doesn't make sense
23:29 PatrolDoom MTecknology: you mean adding gpg encrpted pillar?
23:29 PatrolDoom where i have to manually do so?
23:29 PatrolDoom i just want a simpler way to interact w/ pillars outside of git :|
23:29 mpanetta Uh, don't you 'manually' have to add it to heiera?
23:29 PatrolDoom guess i'm not explaining it correctly
23:30 mpoole you have to use eyaml to encrypt the value with a public key and store the priv key on the salt master
23:30 mpoole uses PKI
23:30 * MTecknology grumbles. I have some stuff that was supposed to be delivered tomorrow, but that was gonna suck and now it's conveniently being delivered today, but alread 17:30 so about 1.5 hr left /if/ I get to see it...
23:30 mpoole TBH if I was starting again i'd definitely use Vault
23:30 mpoole i've just been too lazy to migrate
23:30 justanotheruser joined #salt
23:31 mpoole / busy
23:31 PatrolDoom just wish tehre was already integration for it
23:31 MTecknology eyaml is a requirement?
23:31 * PatrolDoom would pay someone
23:31 MTecknology mpoole: what is "Vault"?
23:31 mpoole hiera-eyaml and salthiera gems are a requirement
23:31 mpoole https://www.vaultproject.io/
23:32 mpoole it's like a secret store with access control
23:32 MTecknology ah.. yuck
23:32 PatrolDoom MTecknology: yeah it's neat but still weird at the same time
23:33 PatrolDoom i'm trying to recall what ansibles vault implementation is like
23:33 mpoole there is definitely a way to add vault as an ext pillar for salt
23:34 PatrolDoom as a module yeah, i was pondering doing the same when i heard about it a year or so ago
23:34 PatrolDoom need some $time & 4motivatio
23:34 MTecknology PatrolDoom: s/module/ext_pillar/
23:35 PatrolDoom yeah that
23:35 PatrolDoom wth is up w/ my keyboard... fuuu IPMI
23:38 Eugene Supermicro Java console?
23:41 MTecknology a painful luxury...
23:43 keltim I hate keeping secrets in the pillar myself
23:45 CeBe joined #salt
23:46 MTecknology it doesn't bother me when it's encrypted
23:55 keltim it makes dealing with the salt repo a complete pain in the ass not to mention exposes you to grain manipulation to expose secrets ... I'd just as soon put them somewhere safer
23:57 MTecknology If you can't trust your minions, at least to some degree, then a system like salt is a bad choice

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