Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-02-26

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

All times shown according to UTC.

Time Nick Message
00:00 mavhq joined #salt
00:06 mavhq joined #salt
00:09 MatthewsFace joined #salt
00:17 NeckBeardPrince joined #salt
00:19 jkleckner joined #salt
00:20 jkleckner joined #salt
00:29 Nazca joined #salt
00:30 sinonick joined #salt
00:32 kevinquinnyo1 joined #salt
00:36 jim__ joined #salt
00:40 flowstate joined #salt
00:42 mavhq joined #salt
00:43 nZac joined #salt
00:43 fracklen joined #salt
00:46 mavhq joined #salt
00:53 joe_n joined #salt
00:54 lemur joined #salt
00:56 lemur joined #salt
00:58 iceyao joined #salt
01:00 iceyao_ joined #salt
01:01 rotbeard joined #salt
01:02 bhosmer_ joined #salt
01:03 jim__ joined #salt
01:12 amcorreia joined #salt
01:12 RobertChen117 joined #salt
01:15 twork joined #salt
01:16 rem5 joined #salt
01:17 twork i'm wrestling with a specific formula (bind). is this the place to ask questions, or should i look for someplace more specific?
01:18 murrdoc mebbe we can help
01:20 twork there are a couple file states:
01:23 twork ...each one draws from a source template. there are templats for zone files, and there's one, 'named.conf.options', with a comment that seems to be for 'everything else'
01:25 twork in that template file there's a template for (bind's literal statement) 'optins', with a structure inside it that handles all sorts of possible values...
01:26 twork but wherever else i look in the formula i haven't been able to find the "right place" to list other sorts of bind config items, that aren't 'options' or zone entries.
01:27 twork fair enough; i could, say, append the 'options' file with more entries
01:27 twork but i've learned that outsmarting formula files can come around to bite me.
01:30 twork so, i thought i'd see if someone who knows this formula better than i do could point me in the right direction. where ti stick my 'acl' directive, for instance.
01:30 ajw0100 joined #salt
01:40 ajw0100 joined #salt
01:41 flowstate joined #salt
01:42 jtylers joined #salt
01:49 twork doesn't help that bind and jinja both use so many curly braces, in my trial and error it's tough to tell where one leaves off and the other begins.
01:52 mpanetta joined #salt
01:57 bhosmer_ joined #salt
01:57 west575 joined #salt
01:57 _Cyclone_ joined #salt
01:58 iceyao joined #salt
02:04 iceyao_ joined #salt
02:04 akhter joined #salt
02:05 nZac joined #salt
02:09 shaggy_surfer joined #salt
02:10 donmichelangelo joined #salt
02:15 tim^ joined #salt
02:15 zmalone joined #salt
02:17 tligda joined #salt
02:24 zmalone joined #salt
02:24 RobertChen117 joined #salt
02:27 neilf__ joined #salt
02:34 Diaoul joined #salt
02:34 RobertChen117 joined #salt
02:38 baweaver joined #salt
02:38 MatthewsFace joined #salt
02:41 flowstate joined #salt
02:42 hvn joined #salt
02:45 tim^ can anyone let me know the best way to rollout minion updates to windows 7,8,10 workstations?  are esky builds & saltutil.update the way to go/current ?
02:45 pppingme joined #salt
02:47 ilbot3 joined #salt
02:47 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.7 | Register for SaltConf16: http://saltconf.com/register/ | Paid support available for open source Salt! https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | Ask with patience as we are volunteers and may not have immediate answers
02:49 RobertChen117 joined #salt
02:51 iceyao joined #salt
02:53 anmol joined #salt
02:56 Miouge joined #salt
02:59 MatthewsFace joined #salt
03:01 tim^ can anyone let me know the best way to rollout minion updates to windows 7,8,10 workstations?  are esky builds & saltutil.update the way to go/current ?
03:02 malinoff joined #salt
03:06 racooper joined #salt
03:08 rem5 joined #salt
03:09 totzky joined #salt
03:17 intr1nsic joined #salt
03:20 rem5 joined #salt
03:21 favadi joined #salt
03:21 MatthewsFace joined #salt
03:39 ajw0100 joined #salt
03:41 flowstate joined #salt
03:42 evle joined #salt
03:45 bhosmer joined #salt
03:47 zmalone joined #salt
03:50 joe_n joined #salt
03:55 antpa joined #salt
04:02 quasiben joined #salt
04:07 LondonAppDev__ joined #salt
04:08 mavhq joined #salt
04:11 auzty joined #salt
04:12 auzty joined #salt
04:15 andrew_v joined #salt
04:17 Score_Under joined #salt
04:24 antpa joined #salt
04:26 west575_ joined #salt
04:26 sauvin joined #salt
04:32 hasues joined #salt
04:32 hasues left #salt
04:35 antpa joined #salt
04:38 bujordan joined #salt
04:39 bhosmer_ joined #salt
04:40 bujordan joined #salt
04:40 hightekvagabond1 joined #salt
04:45 fracklen joined #salt
04:46 cberndt joined #salt
04:47 zmalone joined #salt
04:47 tim^ can anyone let me know the best way to rollout minion updates to windows 7,8,10 workstations?  are esky builds & saltutil.update the way to go/current ?
04:52 MatthewsFace joined #salt
04:52 ramteid joined #salt
05:00 viq joined #salt
05:11 justanotheruser joined #salt
05:21 garphy joined #salt
05:27 ageorgop joined #salt
05:31 mavhq joined #salt
05:33 bhosmer joined #salt
05:39 flowstate joined #salt
05:41 josuebrunel joined #salt
05:43 bujordan joined #salt
05:49 bujordan joined #salt
05:59 rdas joined #salt
06:00 RobertChen117 joined #salt
06:01 zer0def joined #salt
06:12 totzky joined #salt
06:16 totzky joined #salt
06:17 keimlink joined #salt
06:19 evle joined #salt
06:23 favadi joined #salt
06:28 bhosmer_ joined #salt
06:28 antpa joined #salt
06:38 linjan_ joined #salt
06:39 josuebrunel joined #salt
06:47 dmaiocchi joined #salt
06:48 evle1 joined #salt
06:56 illern joined #salt
06:57 colttt joined #salt
07:02 felskrone joined #salt
07:08 CeBe joined #salt
07:09 kshlm joined #salt
07:13 mavhq joined #salt
07:17 illern joined #salt
07:19 mavhq joined #salt
07:22 bhosmer_ joined #salt
07:24 anthpa joined #salt
07:25 joe__n joined #salt
07:27 denys joined #salt
07:28 kshlm joined #salt
07:28 Miouge joined #salt
07:31 tfra joined #salt
07:32 _JZ_ joined #salt
07:39 rubendv joined #salt
07:39 jhauser joined #salt
07:41 flowstate joined #salt
07:44 antpa joined #salt
07:47 anmol joined #salt
07:48 anmol joined #salt
07:51 bujordan joined #salt
07:53 bujordan joined #salt
07:57 keimlink joined #salt
08:03 jakwas joined #salt
08:11 mavhq joined #salt
08:12 slav0nic joined #salt
08:13 jbrnds joined #salt
08:16 bhosmer_ joined #salt
08:18 jbrnds2 joined #salt
08:20 anthpa joined #salt
08:20 RobertChen117 joined #salt
08:21 MadHatter42 joined #salt
08:26 jbrnds joined #salt
08:26 jimcroft joined #salt
08:29 impi joined #salt
08:40 totzky joined #salt
08:40 flowstate joined #salt
08:45 bujordan joined #salt
08:46 bujordan_ joined #salt
08:47 bujorda__ joined #salt
08:49 bujorda__ joined #salt
08:51 bujordan joined #salt
08:52 bujordan_ joined #salt
08:53 ronnix joined #salt
08:54 bujordan_ joined #salt
08:55 bujorda__ joined #salt
08:58 bujordan joined #salt
08:58 denys joined #salt
08:58 bujorda__ joined #salt
08:59 bujordan_ joined #salt
09:00 bujord___ joined #salt
09:01 bujor____ joined #salt
09:04 antpa joined #salt
09:04 ronnix_ joined #salt
09:06 ronnix__ joined #salt
09:11 bhosmer_ joined #salt
09:15 josuebrunel joined #salt
09:19 dgutu joined #salt
09:19 antpa joined #salt
09:21 Miouge Can one do “unless: {{% foo == bar %}}” in a cmd.run state?
09:22 babilen no
09:24 GreatSnoopy joined #salt
09:27 kawa2014 joined #salt
09:28 Miouge Any workaround that?
09:29 babilen You'd simply wrap the state in {% if not foo == bar %} ... {% endif %}
09:29 babilen (not a workaround though)
09:30 babilen And I personally prefer foo in [bar, baz, ...] ..
09:31 bujordan joined #salt
09:31 ronnix joined #salt
09:32 _JZ__ joined #salt
09:32 Miouge If i wrap if if/endif then it does not show up on the output when foo == bar.
09:32 west575 joined #salt
09:32 babilen How so?
09:33 tfras joined #salt
09:33 Shirkdog_ joined #salt
09:33 Shirkdog_ joined #salt
09:34 antpa joined #salt
09:35 16WAAE9BX joined #salt
09:35 deus_ex joined #salt
09:35 lorengordon joined #salt
09:35 jfindlay joined #salt
09:36 ronnix_ joined #salt
09:37 s_kunk joined #salt
09:40 malinoff joined #salt
09:42 Miouge babilen: I output something like that: http://pastebin.com/Wbv8n5YA
09:44 Xevian joined #salt
09:44 Miouge Maybe I am crazy but I am thinking “ unles: ‘exit {{ int(foo != bar)}}’ “
09:46 jhauser joined #salt
09:54 wathoom joined #salt
09:57 N-Mi joined #salt
09:57 N-Mi joined #salt
10:03 babilen Miouge: What's "targeted output" ?
10:04 Miouge The output I would like to have :)
10:04 Miouge Bad choice of words
10:04 babilen I thought you don't want to run it if "foo != bar" ?!
10:05 bhosmer_ joined #salt
10:05 babilen What are you actually trying to achieve?
10:05 atmosx joined #salt
10:05 tweakism I think he wants to see in the output that the state was skipped because of the condition
10:06 Miouge Exactly. I am trying to update firmware HDD. So I was thinking to emulate a “hdd.firmware_update” state with a cmd.run + unless
10:06 tweakism rather than have it completely gone.
10:06 Miouge Something like: run the update command, unless it is already the latest firmware
10:06 tweakism Miouge: unless runs a command, so if you determine the update version based on running a command, it's what you want
10:06 Miouge tweakism: yep, this way I can see “oh that drive is already up to date” instead of not showing up at all
10:07 babilen I don't see why that would be necessary .. you know that the state was skipped if the condition holds true, but  .. by all means .. use a dummy state in the "else" part for "logging"
10:07 tweakism babilen: I see no reason for the attude, but by all means, continue to speak to people that way.
10:07 babilen Can you programmatically check if the drive is "up to date" ?
10:08 sfxandy joined #salt
10:08 babilen huh?
10:08 Miouge Yep, I already have that info (update to date or not, serial number etc…) in a jinja variable
10:08 tweakism Miouge: how does it get there?
10:08 babilen Miouge: Can you run a command on the minion to get hold of that information?
10:09 babilen Or, even better, check if the drive is up to date?
10:09 pugo joined #salt
10:09 tweakism babilen: sorry, I partly mis-read what you said
10:09 sfxandy hi babilen, you pointed me in the direction of pillarstack yesterday - which seems to work really well!!  however I've got a question about it that I can't seem to answer by looking at the example PillarStack usage in the docs...
10:09 tweakism and partly have had a really crappy day.
10:10 pugo Hi, im running into a problem on windows with state archive.extracted. It tells me that E:_myfolder_myotherfolder.zip is not an absolute path.
10:10 tweakism pugo: do you need a \ in there?
10:10 tweakism oh; does it use _ on windows??
10:10 Miouge There is a command that returns a list of all detected drives and their firmware status in JSON. So I am looping over that with a for and a load_json
10:10 babilen Miouge: In the end you could write an execution module that allows you to do this, with state logic on top of it. I'd consider that a bit too much work simply for having the output you desire.
10:11 pugo might be that I need a \ or a / but my configuration is all '/'
10:11 malinoff joined #salt
10:11 pugo I looked at the source of the archive state and I kind of see that replacement but I do not understand what it's for
10:11 Miouge babilen: I am starting to see that
10:12 babilen tweakism: That's okay, no worries. I was simply not sure what was so offensive
10:12 pugo It seems that this replacement is made before calling file.managed to get the zip to the minion
10:12 tweakism he might have also missed your 'dummy state in {% else %}' tip
10:12 tweakism is there on that just return log info?
10:13 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html#salt.states.test.succeed_with_changes
10:13 tweakism pugo: oh yeah I remember seeing that.
10:13 babilen (or without_changes .. probably more appropriate)
10:14 pugo tweakism: do you also remember what happens there?
10:14 pugo .. and what might go wrong..
10:14 Miouge I did not know about the test.* state! good catch babilen and tweakism
10:15 tweakism pugo: I think it mangles the names so it can xfer them all to the same dir before operating on them; but no, not really.
10:17 pugo tweakism: OK that would make sense, so it's rather that the file does not find its way to the minion?
10:17 tweakism I really have no idea.
10:18 pugo do you know where the files are put when downloading to the minion?
10:18 tweakism nope.
10:20 ronnix joined #salt
10:21 impi joined #salt
10:24 pugo OK, files go to [salt]\var\cache\salt\minion\files\base...
10:24 pugo A script got through and has been executed successfully. Is still in the cache. No zips there...
10:26 sfxandy in the documented example here, https://docs.saltstack.com/en/develop/ref/pillar/all/salt.pillar.stack.html
10:26 sfxandy for the pillar.get ('roles', []) statement, where would 'roles' be defined?   in regular filesystem Pillar?  or within the PillarStack config?
10:28 tweakism it shows it being in the pillarstack
10:28 tweakism just below that
10:28 tweakism I'm curious how that works tho, now I have to go look at it
10:29 tweakism I take it back, you're right it doesn't specify precisely where that's defined
10:31 josuebrunel joined #salt
10:33 sfxandy yeah i know
10:33 sfxandy confused me too !!
10:33 inad922 joined #salt
10:34 tweakism it seems like it would have to be in fs pillar, or previous ext_pillar
10:34 sfxandy based on the example given, it cant be defined in any of the minions.yml files because they get evaluated last of all according to the .cfg file
10:34 tweakism otherwise pillarstack would have to be really complex
10:35 malinoff joined #salt
10:35 bujordan joined #salt
10:35 sfxandy yeah, glad to know its not just me who is confused!!  babilen, you got any thoughts?
10:37 exe joined #salt
10:37 sfxandy ok, figured it out
10:38 tweakism do tell.
10:38 sfxandy just replicated what they had and you can define it in filesystem Pillar provided you have ext_pillar_first set to False
10:38 anthpa joined #salt
10:39 sfxandy so use fs Pillar to simply assign your roles, then do everything else in PillarStack .... essentially
10:39 test_ Hi guys! Has anyone seen salt not cleaning zombie processes?  I've got around 160 (and counting!) "[salt-minion] <defunct>" in processes :(. OS: ubuntu 16.04 amd64, "salt-minion 2015.8.7 (Beryllium)".
10:40 sfxandy I would imagine if you moved your roles definitions into PillarStack and accessed them via the 'stacks' variable, then you really would have no need at all for fs Pillar...
10:43 Miouge tweakism and babilen: it works like a charm with test.succeed_without_changes, thank you for the help!
10:47 antpa joined #salt
10:49 amcorreia joined #salt
10:49 babilen Miouge: Enjoy :)
10:51 txmoose morning all.  I need a quick hand with SLS files.  I thought I understood em, but I'm not so sure anymore.  I'm trying to write a very, very simple SLS file to install/ensure a repo exists in apt sources.  I think I have it written properly, but the only return I get is "no matching sls found for repo.sls in env 'base'".  I didn't think I needed to have something in my top.sls to just run a state.sls against
10:51 txmoose a minion.
10:51 txmoose But I could be utterly misunderstanding the whole thing.
10:53 Miouge txmoose: it sounds like you are doing “state.sls repo.sls” instead of “state.sls repo”
10:54 txmoose Miouge: already tried that :\ same result
10:55 babilen txmoose: Could you show us the actual SLS, your command and output on one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ? That would help tremendously and would be much appreciated.
10:56 txmoose can do, babilen one moment
10:56 babilen (also include the filesystem layout and file_roots config if applicable/changed)
10:56 norobot joined #salt
10:57 norobot Hi, I have a few questions for guys, I am not very used to salt and I wants to make a macro (which will execute a bunch of states) and call that macros from where I need
10:57 norobot But I can't see how I can apply dependency to the macro call
10:57 norobot I would like the call to the macro to require another state, any idea how I could do that /
10:57 norobot I would like the call to the macro to require another state, any idea how I could do that ?
10:58 babilen Could you clarify what you refer to as "macro" in this context?
10:58 txmoose babilen: https://gist.github.com/txmoose/c15966b6655259278f49
10:58 norobot yep sorry
10:58 txmoose File root is /srv/salt/
10:59 txmoose this is in /srv/salt/saltstack/
10:59 babilen So that's /srv/salt/repo.sls ?
10:59 bhosmer_ joined #salt
10:59 babilen ah, okay .. and then?
10:59 txmoose /srv/salt/saltstack/repo.sls to be specific.  Only other thing in that dir is the key itself.
11:00 babilen Fair enough. What's your command and its output? (probably more than one line, add to the gist if necessary)
11:01 norobot a gist like this one for example : https://gist.github.com/bloody76/8e4a84bc558c769790fa
11:01 babilen Ah, jinja macro
11:01 txmoose babilen: gist updated with out put from salt command
11:01 norobot Macro as a function parametrized with arguments to call states
11:01 norobot ok sorry I didn't know there were several kind of macros
11:02 norobot Yes then a jinja macro :P
11:02 babilen norobot: You want "salt 'foo' state.sls saltstack.repo
11:02 honestly I am now at the point where a state rendered using the py renderer behaves differently from one written using jinja that results in a functionally identical rendered state.
11:02 babilen ENICK, sorry
11:02 babilen txmoose: You want "salt 'foo' state.sls saltstack.repo"
11:02 norobot And I would like to call that macro from somewhere else in the states but make a requirement on the call in order to get the dependencies right before calling it
11:02 honestly It makes me a very sad saltine.
11:02 babilen honestly: Congratulations. You broke salt. ;)
11:03 honestly I am pushing envelopes over bleeding edges and they are very sharp indeed
11:03 txmoose babilen: That gets me a new error... "saltstack.repo is not a dictionary"  :\ Guess my YAML is wrong?
11:04 babilen norobot: So you would have to pass additional arguments that will form the "require" bit. But then, I'd opt for a different approach and render those states from pillar data.
11:04 babilen txmoose: Is that the *entire* content of repo.sls ?
11:04 txmoose it is
11:05 txmoose OK
11:05 txmoose babilen: I needed an identifier
11:05 babilen norobot: But I'm not using macros much, so am probably not the best person to discuss this.
11:05 honestly I'll go cut down my py sls so it renders an *actually* identical state
11:05 txmoose second, going to update gist again
11:05 babilen txmoose: Exactly, every state needs an ID
11:05 norobot Hum, maybe I am doing thinkgs wront then
11:05 norobot werong*
11:05 norobot ..
11:05 norobot I will try and explore a few things then, maybe think again and I would like to handle that. Thanks :)
11:07 txmoose babilen: I am tracking now.  I guess I didn't realize I was telling it to look elsewhere, but I do recall reading in the docs now that you can call down directory structures with periods and, yes, I was a derp for not having an ID.  Thanks for the help.
11:07 babilen norobot: If you need that much logic and "automation" in your SLS files you might want to write them in Python or another renderer right away. I found jinja to not be a great choice for SLS that require heavy lifting.
11:07 babilen txmoose: So, works now?
11:07 norobot I don't really need a big logic
11:07 norobot I just want to factorize code
11:07 norobot and parametrized the states depending on what to do ..
11:08 txmoose babilen: yes, sir, it does.  Now, I'm going to apply salt-ssh to use this and another sls to install and configure a salt minion
11:08 babilen norobot: Generally speaking I am in favour of SLS files that are mostly data/pillar driven and simply create states according to that data
11:08 babilen txmoose: Wonderful :)
11:09 babilen txmoose: You are aware of https://github.com/saltstack-formulas/salt-formula/ aren't you?
11:09 txmoose I understand that I'm SUPER basic here, all the examples I find online are more Jinja2 than YAML, but I'm trying to learn
11:09 txmoose so thanks :D
11:09 norobot I agree pillars are most of the time a good choice
11:09 txmoose babilen: I've seen that, but it's hard to grok what all is going on with a ton of those yet.  I have to start at the ground floor and work up to em
11:10 norobot babilen: I will try to use a different logic including pillars, I will see if it can fits as I want :P
11:10 babilen txmoose: Sure .. but it's a good formula that you can actually just use "right away". If you want to understand it in its entirety you would have to spend some time on it though.
11:10 honestly mrrgh. how do I make salt spit out the result of rendering a statefile?
11:11 babilen norobot: I mean in the end all your macro does is to generate a datastructure in yaml that can then be parsed .. The data concerning requisites has to come from somewhere (e.g. by passing it to the macro), but you'd probably end up writing rather complicated macros.
11:11 txmoose thank you, babilen That's a good point.  I guess I don't have to reinvent the wheel
11:11 kumar joined #salt
11:12 norobot I am trying to pass the values/data by the grains in fact
11:12 babilen txmoose: It's fine for learning and playing around, but the salt-formula is probably one of the best maintained formulas and I wouldn't hesitate to use it in place of whatever I'd cook up :)
11:12 babilen norobot: Why grains?
11:13 babilen "Can't trust 'em"
11:13 norobot Because I am versionning the pillars and states
11:13 sfxandy babilen's favourite "sore point" !!
11:13 txmoose babilen: What I'm working on tonight is mostly learning.  It's all personal servers that I'm poking at, but I'm trying to work up to a PoC that I can put to business applications.
11:13 pugo For those probably interested: My archive.extracted windows problem goes away when I define the name (the path to extract to) with escaped \, eg D:\\foo\\bar instead of /, e.g. D:/foo/bar
11:13 babilen sfxandy: hehe ...
11:13 norobot And I need to easily change the datas
11:14 norobot so I though grains would be better
11:14 norobot anyway I have to go
11:14 norobot thank you for helping :)
11:14 honestly I think my real question is "how do I get salt-ssh to write minion logs"
11:14 honestly I got that to work by accident some time but I have no idea now...
11:14 babilen sfxandy: Yeah, I really don't like the "grain abuse" that is going on. Also don't see why you would want to save that data in a distributed datastore that you cannot trust.
11:14 denys joined #salt
11:15 sfxandy agreed.  you gave me the same argument a good 12 months ago.
11:15 txmoose babilen: I don't really know/understand Jinja2 yet, either.  I think I understand what an import is, but import foo with context I have no clue about.  Waht context is it referring to, etc...?
11:15 txmoose So it's a slow process for me, but I'm getting there
11:15 sfxandy only use them for writing platform/os agnostic states now
11:15 dunz0r_ joined #salt
11:15 babilen sfxandy: They are, however, great for static data about the "real world" situation of the minion and for maintaining steps during orchestration/reactors
11:16 sfxandy am interested in the ".... maintaining steps during orchestration/reactors" part of that statement
11:16 babilen txmoose: You might want to read http://jinja.pocoo.org/docs/dev/templates/ -- it's the "missing manual" for Jinja (as the salt documentation doesn't really explain it much)
11:17 txmoose I have *not* seen that page.  Thanks.  Going into the bookmarks now.
11:17 honestly ah there we go, it logs to running_data/salt-call.log now...
11:17 babilen sfxandy: Say you want to do things in multiple steps and you have a specfic order for them .. you can set a grain "foo_orchestration_step: 1" grain on the minion and then kick of "step 2" next
11:18 sfxandy would like to see an example of that babilen...
11:20 babilen sfxandy: Essentially tgt_type: grains, tgt: "foo_orchestration_step:1" and according "step 2" state sls...
11:20 sfxandy ah ok, gotcha
11:21 babilen sfxandy: Another thing I'd really like to do is to tie those steps together via events that are emitted at the end of "steps". A suitable reactor would then see that event and kick off the next step (that fires a suitable event also)
11:21 catpig joined #salt
11:22 babilen sfxandy: I think of this like a FSA with events denoting the "edges" between states.
11:22 RobertChen117 joined #salt
11:22 sfxandy yeah we use events a lot, fire_event with a custom tag
11:22 babilen Nice weekend project for this year
11:23 babilen Absolutely .. I use that for orchestrating certificate generation and distribution, but in the end it is something a lot more generic
11:24 rominf joined #salt
11:24 sfxandy yeah we use events to hook into our CD tool chain so we know precisely what states Salt has completed and we get fast notification of failure if anything goes wrong
11:25 sfxandy wrote some custom Python listeners that grab particular events on the event bus and do stuff off the back of that...
11:27 babilen Ah, that's great
11:27 honestly arggh, the py renderer doesn't drop the rendered state into the log
11:27 AndreasLutro log it yourself!
11:28 AndreasLutro logging.getLogger(__name__).debug(retval)
11:28 babilen sfxandy: How do you handle the notification bit?
11:28 sfxandy notification bit?  how do you mean?
11:28 babilen "and we get fast notification of failure if anything goes wrong" ← please elaborate
11:30 sfxandy yeah so if a state fails for some reason, the event payload contains a "return: False" with the "comments" (from memory?) containing the reason for the failure.  that gets picked up by the listener then thrown up as an error on our build radiator so even if the highstate plods along, we have immediate visibility of errors or failures
11:31 babilen Right ... I should do something like that
11:31 babilen That's something I've been missing without realising that I do miss it :)
11:31 evle joined #salt
11:31 sfxandy would be happy to help out with the event processing logic.  they're not the easiest thing to deconstruct
11:31 AndreasLutro how do you set up those event listeners sfxandy? reactors usign custom modules?
11:31 AndreasLutro I use returners but need to change that because they run on the minion, and there are failures that are not apparent to the minion
11:32 sfxandy no, just a Python listener process daemonized.  am sure theres a better way of doing it...
11:32 AndreasLutro odd choice
11:32 AndreasLutro I'm gonna work on doing the same with a reactor right now actually
11:33 sfxandy it was done for speed and it works very well, but am sure you can get it running with a reactor easily enough
11:34 sfxandy i did mean to look at porting it to a reactor but as is often the case, never get round to it!
11:34 sfxandy thing is the Python code makes it dead easy to do REST API calls etc. into our tool chain
11:35 babilen I like that
11:35 honestly AndreasLutro: I went and added logging to the py renderer directly.
11:36 ronnix joined #salt
11:37 AndreasLutro sfxandy: a custom module/runner would be pure python anyway
11:37 sfxandy ok
11:37 sfxandy i'm not a massively experienced Python dev anyway
11:44 honestly urrrgghhh
11:44 honestly the pprint, it does nothing!
11:44 impi joined #salt
11:46 ronnix joined #salt
11:47 honestly json.dumps, the poor man's pprint
11:49 AndreasLutro I don't understand why a returner can't be set up to run on the master anyway...
11:53 bhosmer joined #salt
11:58 RobertChen117 joined #salt
11:58 honestly it has come to this: https://gist.github.com/duk3luk3/1cbf059b7a34b07ee7ae
11:59 honestly two identical states
11:59 honestly one of them fails
12:00 honestly aaaand I forgot to censor my password hash out of it
12:00 honestly https://gist.github.com/duk3luk3/49eb48b8abb939002627
12:03 Hetman clear
12:03 AndreasLutro oh dear
12:04 honestly it's a secret gist sooo... I *guess* it probably wasn't picked up by any scrapers?
12:04 AndreasLutro anyone know if event_return_whitelist accepts globs?
12:05 Hetman Hello can anyone assist me howto set variable that is visible to salt (env one). I cannot restart elasticsearch service because it's complaying JAVA_HOME not found or no JAVA in PATH ... I've got .sh file in /etc/profile.d that export updated PATH and JAVA_HOME ... this does not work and I've got even now in my elastic formula environ that set's JAVA_HOME with update_minion=True and it's still does not work. Is there is any trick for that kind of issues?
12:05 AndreasLutro if tag in self.opts['event_return_whitelist']:
12:05 AndreasLutro guess not
12:06 honestly Hetman: you'd probably be best off using the cmd.run state, it supports setting environment variables - https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.run
12:07 bujordan joined #salt
12:07 Hetman honestly: thanks
12:07 honestly Hetman: but really, a system service shouldn't depend on the environment of the user session it is started from
12:08 Hetman honestly: will think, got elasticsearch platinium support may raise that with them...
12:08 impi joined #salt
12:08 honestly you could just put the variables directly into the init / service file
12:09 Hetman yes I'm installing it from RPM will compromise integrity then
12:12 totzky joined #salt
12:17 kevinquinnyo1 joined #salt
12:23 AndreasLutro weird... service salt-master restart suddenly stopped working, creating a bunch of defunct processes
12:25 fracklen joined #salt
12:29 flowstate joined #salt
12:31 virtualguy joined #salt
12:32 jeddi joined #salt
12:33 jbrnds2 joined #salt
12:33 slav0nic joined #salt
12:47 _Cyclone_ joined #salt
12:47 bhosmer joined #salt
12:49 Andre-B joined #salt
12:51 TheLoeki joined #salt
12:54 johnkeates joined #salt
12:56 sjorge Rebus: are you sure the dockerng bits are not yet in 2016.3?
12:58 flowstate joined #salt
12:59 txmoose OK, got another problem that no one in #ubuntu seems to be able to help with.  OTHER than explicitly setting id: foo in minion config, I'd like for my minions to pull the hostname sans domain from the server.  Is that possible?
12:59 txmoose So, foo instead of foo.local (or foo.example.com, etc)
13:02 txmoose Ubuntu 14.04.2 would not append domains to hostnames while 14.04.4 does.  I asked over there if resolv.conf could be set to not throw that into /etc/hosts but it occurs to me that there may be a salt minion option to just drop the domain, too
13:02 AndreasLutro txmoose: I'd recommend *always* writing to /etc/salt/minion_id
13:03 AndreasLutro I think if that's not set it just uses socket.getfqdn(), which you have no control over
13:03 txmoose AndreasLutro: that's what I was afraid of.  Dang.  OK, thanks for the confirmation.
13:05 iceyao joined #salt
13:06 elsmo joined #salt
13:08 quasiben joined #salt
13:21 babilen txmoose: You can also set the id in the minion config (which can be managed with salt-formula) if that makes things easier
13:21 tweakism AndreasLutro: Not saying it's bad advice, but you can certainly control what getfqdn() returns.
13:22 txmoose babilen: Yea, I was looking for a way to avoid that, but I think that might be my best option.
13:22 txmoose tweakism: how would you manage what getfqdn() returns?
13:22 tweakism it does the same thing hostname --fqdn does
13:23 tweakism you'd make an entry in /etc/hosts
13:25 txmoose tweakism: on install, /etc/hosts is getting a first line of "127.0.0.1 foo.local foo" whereas older versions of ubuntu would inject a first line of "127.0.0.1 foo"
13:25 jbrnds joined #salt
13:25 txmoose I'm just curious why that changed, but it's not the end of the world
13:25 txmoose was just a quick ask :D Thanks for the help, guys
13:25 tweakism not really sure
13:25 tweakism sounds like a poor choice on ubuntu's part to me
13:26 tweakism .local is for mdns
13:26 gh34 joined #salt
13:26 tweakism but you can overwrite it with whatever is appropriate for your env
13:26 tweakism either:  127.0.0.1 hostname.example.com hostname localhost
13:27 AndreasLutro tweakism: I mean, in the context of salt alone, you can't
13:27 tweakism or just localhost for 127.0.0.1, and have a line for your static IP, if you know that and can depend on it
13:27 txmoose tweakism: Actually, here at home, I have internal DNS that is "foo.lan" A records and PTR records for the same.  I guess it pulled "foo.lan" from the PTR record?  Not sure.
13:27 jimcroft joined #salt
13:27 tweakism or if you're purist, leave localhost w/ 127.0.0.1 and make another localhost addr for your fqdn & hostname
13:27 tweakism like 127.0.1.1
13:27 tweakism txmoose: you said .local :)
13:28 txmoose lol fair enough
13:28 akhter joined #salt
13:28 tweakism AndreasLutro: what do you mean?
13:28 txmoose was trying to be non-specific about my setup
13:28 txmoose as in using "foo" instead of the machines actual name
13:28 txmoose but I see where I shot myself in the foot there
13:28 tweakism txmoose: at install time, if you don't override it, it'll use DNS to figure it out, yes.
13:28 fracklen joined #salt
13:29 txmoose So my fault there was having DNS exist before the device did
13:29 txmoose tweakism: ^
13:30 malinoff joined #salt
13:30 dmaiocchi joined #salt
13:30 malinoff joined #salt
13:31 tweakism I am overly particular about some things, but I really don't like to make up TLDs
13:31 tweakism you can register a domain name and put internal records under that domain
13:31 tweakism you don't have to publish their DNS outside your site
13:31 akhter joined #salt
13:32 tweakism one day, there may be an actual .lan TLD
13:32 tweakism especially now that there are so many new ones being created
13:32 upb like .live :)
13:32 tweakism man, there are tons and tons of them now.
13:32 txmoose I'm severely unimpressed with the new gTLD system that's being put out, but .lan made sense for inside the apartment.  And on that note, tweakism you don't really need to register a domain if you're just gonna have it on a private network ;)
13:33 tweakism or was that one that was used in some huge/famous deployment?
13:33 tweakism txmoose: you do, if you want to avoid the case where someone else registers it and then you can't get to their stuff
13:33 renaissancedev joined #salt
13:33 txmoose haha touche
13:33 tweakism :)
13:34 txmoose The "internal .lan TLD" was a convention that some old buddies and I started back in college and it's just stuck with me
13:34 tweakism I don't know of a reserved name w/ RFC blessing
13:34 upb nah, once i was about to complain that what the fsck, that isn't resolvable over the internet (an external service was about to be configured to connect to such a hostname) until i tested it
13:34 tweakism which kind of surprises me
13:34 tweakism example.com is reserved for examples :)
13:35 morissette joined #salt
13:35 tweakism upb: ah, hehe
13:35 txmoose I think domain.com is reserved like example.com as well
13:35 txmoose or maybe domain.org
13:35 txmoose idk
13:35 flughafen joined #salt
13:35 tweakism nafaik
13:36 tweakism domain.com appears to be a commerical site
13:36 flughafen is there a way to set a packate state via the command line?
13:36 txmoose ahh example.com and example.org
13:36 tweakism localdomain might be reserved, but I think it's specifically for the localhost
13:37 flowstate joined #salt
13:37 bujordan joined #salt
13:38 txmoose Reserved TLDs:  ".test .example .invalid .localhost" and reserved Domains:  "exmaple.com example.net example.org"  http://tools.ietf.org/html/rfc2606
13:39 babilen flughafen: package state?
13:39 flughafen babilen: yes
13:39 harkx joined #salt
13:40 rotbart joined #salt
13:40 txmoose tweakism: before we started the ".lan TLD" convention, I was young and dumb and just had bare names being served by BIND inside my apartment.  Literally, "foo" was an A record for whatever that host's IP was.  I did it because I was too lazy to type a TLD when I wanted to hit something in my apt... I thought I was clever.
13:40 nZac joined #salt
13:40 babilen flughafen: You could install a package to change its state from "not installed" to "installed"
13:41 flughafen babilen: how?
13:41 babilen flughafen: But I was under the impression that you are asking about something more specific which is why I would encourage you to elaborate on the "package state" part
13:41 Rumbles joined #salt
13:42 babilen flughafen: On which distribution?
13:42 flughafen well, if i could change package state via the command line, i wasn't sure if I could at all.
13:42 bhosmer joined #salt
13:42 flughafen babilen:opensuse
13:42 babilen flughafen: And the package state is "installed", "removed", "purged" .. in this context?
13:42 babilen https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.zypper.html#module-salt.modules.zypper
13:43 flughafen ah thanks babilen this is really helpful
13:45 babilen flughafen: Note that the corresponding state is https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html (the states are not specific to the package manager and just "do the right thing")
13:45 rem5 joined #salt
13:46 babilen I am also under the impression that zypper might not be quite as widely used as either apt or yum, so there might be features that are not yet supported on that platform
13:46 tweakism txmoose: it's not an uncommon practice at all, like I said I'm overly particular.  definitely more worthwhile to think about w/ all the gTLDs now, though.  a lot of people use .local too which is a bigger error.
13:46 flughafen right.
13:47 txmoose tweakism: That's a good point, man.  I like this channel.  Good people here. :D
13:50 numkem I'm trying to write my first execution module and I can't get it to be called by salt-call on the targeted minion. I put it in /srv/salt/_modules/migration.py or even /srv/salt/_modules/migration/__init__.py and while I can get it to be replicated using saltutil.sync_modules I can't call it
13:50 numkem It only gives me "is not available" as an error
13:50 DanyC joined #salt
13:52 flowstate joined #salt
13:52 AndreasLutro numkem: call saltutil.sync_modules or sync_all first
13:53 numkem AndreasLutro: I've done that already, I see the files being sent to the minion and I can see it on the minion in /var/cache/salt/minion
13:53 tweakism wouldn't it need to be {extension_modules_dir}/{type}/migration.py, not {extension_modules_dir}/migration.py ?
13:54 numkem tweakism: I've tried both ways, no dice.
13:54 AndreasLutro _modules/migration.py should work just fine
13:54 AndreasLutro are you sure the function name is correct?
13:54 numkem I've tried _modules/modules/migration.py as well
13:54 numkem AndreasLutro: yes, there is only one
13:55 DanyC hi all, need a bit of help here in case someone has an idea. Trying to run via a sls the below block and i get a jinja error caused by the comma. Any other way i can workaround ? http://hastebin.com/ibalopuhir.django
13:56 subsignal joined #salt
13:56 tweakism that's actually a yaml error
13:56 tweakism perhaps if you use a multi-line | string for onlyif: like you do for name:
13:57 tweakism should save you from having to escape your quotes
13:57 numkem I've found it... If a module doesn't have all the required python dependancies, it won't be available, doesn't show in logs
13:58 lompik joined #salt
13:58 DanyC tweakism: SUPERB, much thanks !
13:58 subsigna_ joined #salt
13:59 tweakism yay, I'm helping.
13:59 numkem Weird thing is, the package is available locally...
14:00 fracklen joined #salt
14:01 subsigna_ joined #salt
14:03 srinivas joined #salt
14:03 ronnix joined #salt
14:04 srinivas_ joined #salt
14:11 godlike joined #salt
14:12 dyasny joined #salt
14:15 disbound joined #salt
14:24 MadHatter42 joined #salt
14:25 * AndreasLutro gives up on gitfs
14:29 babilen Why?
14:30 flowstate joined #salt
14:33 racooper joined #salt
14:34 AndreasLutro https://github.com/saltstack/salt/issues/30500
14:34 saltstackbot [#30500]title: Salt master+minion: Received bad data when setting the match from the top file when gitfs fails to check out? | On our salt masters, it looks like if a gitfs checkout fails, a `salt '*' state.apply` fails ONLY for the minion running on the same salt master. Every other minion works fine. If I wait a bit and run the same command, it'll work just fine....
14:34 antpa joined #salt
14:36 bhosmer joined #salt
14:37 ZiLi0n joined #salt
14:43 ZiLi0n Hi everyone is there a way in a jinja file to load all variables of the pillar? What I am trying is to avoid to type "pillar['var']" every time to access a variable
14:45 akhter joined #salt
14:52 babilen ZiLi0n: All of it or everything beneath a certain key?
14:54 ZiLi0n all of it for that correspond to that minion only.
14:54 ZiLi0n babilen thanks for your help!
14:55 flowstate joined #salt
14:57 zmalone joined #salt
14:58 alexlist joined #salt
15:02 babilen ZiLi0n: All of it would just be the original pillar to begin with. What are you trying to simplify?
15:03 flowstate joined #salt
15:04 babilen You can use pillar.var or pillar.get('var', VAL_IF_MISSING) also
15:04 izrail joined #salt
15:05 anotherZero joined #salt
15:08 bujordan joined #salt
15:13 ZiLi0n Thanks babilen. The thing is that I have already a long jinja file created that acceses variables as {{ var }}. So I was wondering if I could tell salstack to look for those variables in the pillar without having to modify the jinja file to add pillar['var']
15:14 felskrone1 joined #salt
15:14 babilen And they are all over the pillar and not subsumed under a single key? Well .. you have to do the lookup somehow and {{ pillar.var }} would work (not for nested values though)
15:14 babilen Is that file in some specific format?
15:15 babilen Ah, just give an example on one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … and we might be able to spot something
15:15 zsoftich4 joined #salt
15:16 felskrone joined #salt
15:19 flowstate joined #salt
15:19 Miouge joined #salt
15:20 Heartsbane joined #salt
15:21 pooogles joined #salt
15:21 ZiLi0n thanks babilen! I will upload an example
15:29 hasues joined #salt
15:30 hasues left #salt
15:30 bhosmer joined #salt
15:32 hightekvagabond joined #salt
15:34 zzzirk joined #salt
15:37 Brew joined #salt
15:40 armguy_ Ive started running into a strange issue I am not sure the best way to debug, in my output I am starting to see "[ERROR   ] Template was specified incorrectly: False" in output but nothing breaks the highstate or anything like that and everything is appearing to still function. Anyone have any ideas
15:42 _JZ_ joined #salt
15:42 AndreasLutro armguy_: I usually see that when a pillar template fails to render - check your master logs
15:42 armguy_ kk thank you
15:46 * AndreasLutro weekend
15:47 Netwizard joined #salt
15:47 perfectsine joined #salt
15:49 hairytoez joined #salt
15:51 flowstate joined #salt
15:51 brianfeister joined #salt
15:52 pmcg joined #salt
15:52 johnkeates joined #salt
15:53 johnkeates Can someone add this to saltstack-formulas's group: https://github.com/johnkeates/mailhog-formula
15:54 babilen johnkeates: Best to write a mail to the mailing list
15:55 johnkeates so much work.. :p
15:55 johnkeates but ok
15:57 dmaiocchi joined #salt
16:00 Brew joined #salt
16:01 racooper joined #salt
16:03 andrew_v joined #salt
16:05 rvankleeck joined #salt
16:06 rvankleeck I’m looking for a way to update specific minions when another minion with the same tags disconnects. I have the presence_events turned on and can see when minions drop off. Is there a way to get the grains from the lost minion and kick off an event (e.g. with reactor) to send a highstate to other minions with similar grains?
16:06 zzzirk joined #salt
16:07 flowstate joined #salt
16:09 zzzirk_ joined #salt
16:14 nZac joined #salt
16:14 nZac joined #salt
16:16 mpanetta joined #salt
16:17 flowstate joined #salt
16:17 hbsage joined #salt
16:18 rvankleeck joined #salt
16:32 rvankleeck joined #salt
16:34 tligda joined #salt
16:35 rvankleeck joined #salt
16:40 jimklo joined #salt
16:41 ALLmightySPIFF joined #salt
16:42 ALLmightySPIFF joined #salt
16:43 kahiru joined #salt
16:43 pcdummy joined #salt
16:44 ALLmightySPIFF joined #salt
16:47 dmaiocchi joined #salt
16:48 jgarr joined #salt
16:49 jgarr is there a way to run a salt command with an input file? I have a file with a list of hostnames I want as my target
16:49 johnkeates xarg?
16:49 jgarr I don't see it on the options. Maybe I could convert it to a comma separated list and use -L
16:52 jimklo joined #salt
16:53 flowstate joined #salt
16:54 ponylog joined #salt
16:56 akhter joined #salt
16:59 ageorgop joined #salt
17:00 shaggy_surfer joined #salt
17:01 capricorn_1 joined #salt
17:02 ronnix_ joined #salt
17:06 andrew_v joined #salt
17:07 flowstate joined #salt
17:09 writtenoff joined #salt
17:29 ilbot3 joined #salt
17:29 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.7 | Register for SaltConf16: http://saltconf.com/register/ | Paid support available for open source Salt! https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | Ask with patience as we are volunteers and may not have immediate answers
17:29 Horgix joined #salt
17:30 Fiber^ joined #salt
17:31 andrew_v joined #salt
17:32 Horgix joined #salt
17:35 izrail joined #salt
17:35 zsoftich4 joined #salt
17:38 bujordan joined #salt
17:38 ZiLi0n Hello, If I am not mistaken I remember there was a parameter to display the progress step by step as a state is executing, the idea is to provide feedback
17:39 ZiLi0n --display-progress?
17:43 Netwizard joined #salt
17:44 AndreasLutro I think you are mistaken
17:45 johnkeates joined #salt
17:49 beardedeagle joined #salt
17:50 eykd joined #salt
17:52 eykd Is there any way to determine the AWS zone of an EC2 instance through grains?
17:53 anotherZero joined #salt
17:53 ZiLi0n AndreasLutro thanks for your response. So there is no way to show feedback everytime a module is executed to sww how it progresses?
17:53 muep is there some way to figure it out from inside the instance?
17:55 eykd muep: Good question; there probably is, but I’d have to look into it.
17:55 hoonetorg joined #salt
17:55 tweakism there's the metadata service
17:56 tweakism http queries to, iirc, 169.254.169.254
17:56 muep eykd: if you know how you'd do it otherwise, you can add a custom grain module that finds it and makes it available in grains
17:56 tweakism I think there's some stuff typically exposed from /proc too, but forget specifics
17:56 stupidnic I have a state that depends on a service from another state (apache2), how do I tell that service to restart when this other state changes a file? is there like a watch_in  or something similar?
17:56 tweakism stupidnic: yes, exactly, it's in the docs
17:57 AndreasLutro ZiLi0n: no - salt works in a way that the master tells the minion what to do, and the minion doesn't respond until it's 100% done
17:57 stupidnic tweakism: thanks
17:57 tweakism stupidnic: the docs example is even about restarting apache
17:57 eykd muep: Well that’s refreshingly simple: `wget -q -O - http://instance-data/latest/meta-data/placement/availability-zone`
17:57 stupidnic I always struggle to find what I want in the manual
17:57 tweakism stupidnic: me too :)
17:58 tweakism stupidnic: I'll try to find it too
17:58 ZiLi0n AndreasLutro I see, ok thanks very much. It is strange like waiting for few minutes, like an upgrade kernel operation without knowing it is got stuck at some point or it is doing something (at least waiting for the kernel upgrade to be done_
17:58 stupidnic tanks
17:58 stupidnic big metal tanks
17:58 stupidnic thanks too
17:59 tweakism stupidnic: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt2.html
17:59 rominf joined #salt
18:00 johnkeates joined #salt
18:00 AndreasLutro ZiLi0n: I agree, but in my eyes, salt isn't mainly aimed at interactive use, it's meant for automation and running based on events
18:01 stupidnic tweakism: I am not seeing a reference to watch_in there
18:01 tweakism in this case it's just watch
18:02 tweakism but I think you can put the watch_in referencing the service in your file state
18:02 stupidnic let me try and see how badly it breaks things :)
18:03 stupidnic hmmm... I might be able to cheat this another way actually
18:03 flowstate joined #salt
18:03 stupidnic instead of specifically telling apache2 to watch a file... I can just set it to watch /etc/apache2/sites-enabled/*
18:04 stupidnic that's the more pragmatic solution
18:07 amcorreia joined #salt
18:08 flowstate joined #salt
18:10 Ashald hey guys
18:10 Ashald do you know whether I can do {{ salt[''getattr](myobj, 'field', 'default-value') }} in SLS files?
18:10 malinoff joined #salt
18:11 whytewolf stupidnic: watch is state based. it only watches state behavour. as such unless /etc/apache2/sites-enabled/* is a bunch of state id's it won't match anything
18:12 flowstat_ joined #salt
18:12 stupidnic whytewolf: hmmm okay... once again... dropping the knowledge.
18:12 stupidnic whytewolf: so is watch_in what I need to be looking at then?
18:12 flowstate joined #salt
18:12 whytewolf stupidnic: watch_in is the reverse of watch.
18:13 stupidnic Okay. What is the syntax"
18:13 whytewolf stupidnic: https://docs.saltstack.com/en/latest/ref/states/requisites.html
18:14 stupidnic Okay I think I understand
18:14 stupidnic It would be nice if there was an example of it in use
18:15 stupidnic I think I got it though... - watch_in: - service: apache2
18:15 whytewolf yeap
18:15 whytewolf thats it.
18:17 ksalman I upgraded minion and master from 2014.7.5 to 2015.8.7. When i try highstate it starts spamming "[ERROR   ] Template was specified incorrectly: False". What could be doing that? All my templates are set to ' - template: jinja', and there are a couple with ' - template: py'
18:19 AndreasLutro ksalman: checked your master log file?
18:20 perfectsine joined #salt
18:20 ksalman AndreasLutro: there's nothing in the log file. I could restart it in debug mode and try agin
18:21 whytewolf ksalman: you can just run salt-call -ldebug on a minion that is showing the signs.
18:22 AndreasLutro ksalman: that's what I'd do then
18:22 ksalman alrighty
18:22 AndreasLutro whytewolf: not so sure... pillars get rendered on the master, not the minion
18:23 AndreasLutro so if the template in question is a pillar (it usually is for this type of error in my experience) salt-call -l debug won't always make a difference
18:23 lompik joined #salt
18:24 ksalman Another thing is that this only happens sometimes between multiple call of state.highstate, not all the time
18:24 ksalman i can try debugging both on the minions and the master
18:25 whytewolf AndreasLutro: a quick way to determine if it is pillar based is run a saltutil.pillar_refresh a couple of times
18:30 ronnix joined #salt
18:35 bujordan joined #salt
18:36 ageorgop joined #salt
18:42 flowstat_ joined #salt
18:42 baweaver joined #salt
18:42 bujordan joined #salt
18:46 bujordan joined #salt
18:46 bujordan joined #salt
18:48 eykd joined #salt
18:48 linjan_ joined #salt
18:51 ZiLi0n Hello. is there a way to install a package rpm that was uploaded locally to the minion?
18:52 beardedeagle rpm -iUvh
18:52 ZiLi0n I see that pkg.installed is  using yum
18:52 beardedeagle oh you mean with salt lol
18:53 ZiLi0n beardedeagle thanks, yeah using salt so that it is idempotent as well
18:53 beardedeagle you should be able to feed it sources to pkg.installed
18:53 beardedeagle - sources:
18:53 beardedeagle - qux: /minion/path/to/qux.rpm
18:54 beardedeagle should be in the docs for pkg.installed
18:55 ZiLi0n beardedeagle thanks, yes, indeed I had it in front of me and I didn't see it :) thank you
18:55 beardedeagle np
18:55 Guest7180 joined #salt
18:55 srinivas joined #salt
18:56 Vivek joined #salt
18:58 Aleks3Y joined #salt
19:00 bujordan joined #salt
19:03 felskrone joined #salt
19:08 GreatSnoopy joined #salt
19:09 ronnix joined #salt
19:10 baweaver joined #salt
19:16 denys joined #salt
19:20 jimcroft joined #salt
19:20 rem5 joined #salt
19:21 flowstate joined #salt
19:26 cwright i'm looking for some examples of how to use the gpg.encrypt/gpg.decrypt functions with gpg_passphrase
19:26 cwright Via https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.gpg.html#salt.modules.gpg.decrypt
19:26 cwright it says "Passphrase is received from pillar" but that is not very helpful
19:26 cwright searching the google group results in nothing: https://groups.google.com/forum/#!searchin/salt-users/gpg_passphrase
19:30 AndreasLutro think we'll have to check the source
19:30 cwright well, i've been doing that too and it is not consistent
19:30 baweaver joined #salt
19:30 cwright This block makes it look like the value is stored in __salt__['pillar.item']('gpg_passphrase')
19:31 cwright https://github.com/saltstack/salt/blob/develop/salt/modules/gpg.py#L929
19:31 cwright and yet this block makes it look like its stored in __salt__['pillar.item']('gpg_passphrase')['gpg_passphrase']
19:31 cwright https://github.com/saltstack/salt/blob/develop/salt/modules/gpg.py#L1071-L1074
19:32 AndreasLutro pillar.item returns a dict, not a single value
19:32 AndreasLutro so it's just gpg_passphrase
19:32 AndreasLutro not sure why pillar.get isn't just being used instead
19:32 cwright so which of those code blocks is wrong?
19:32 Antiarc joined #salt
19:33 cwright one is setting gpg_passphrase to a dict, the other is setting it to a string
19:33 AndreasLutro I would say one of those is bugged
19:33 hightekvagabond joined #salt
19:33 nZac_ joined #salt
19:33 AndreasLutro unless there's something funky with the passphrase arg to gpg.sign
19:33 MindDrive joined #salt
19:34 AndreasLutro but it should just be `gpg_passphrase: my_passphrase` in your pillar
19:35 cwright right. but it doesn't seem that can possibly work when looking at the code
19:35 ajw0100 joined #salt
19:35 AndreasLutro I agree, but try it anyway
19:36 AndreasLutro either there's something we're not seeing making it work, or you can use your test output to file a bug report
19:36 AndreasLutro win/win
19:39 nidr0x joined #salt
19:39 flowstate joined #salt
19:42 flowstate joined #salt
19:43 anotherZero joined #salt
19:44 hightekvagabond joined #salt
19:46 antpa joined #salt
19:50 brianfeister joined #salt
19:56 srinivas joined #salt
19:59 rmc3 joined #salt
20:00 rmc3 As part of a workflow, I need to restart a server. That's easily accomplished with salt.modules.system.reboot. The harder part is: How do I detect when the system is back up and the minion is once again available? Haven't been able to find much on how to solve this elegantly. Currently I'm just running a test.ping against the minion every few seconds until it starts succeeding again, but that doesn't seem like the best solution.
20:01 whytewolf rmc3: you might want to look into reactors and the event system.
20:01 rmc3 whytewolf: Will do, thanks.
20:07 numkem is there something already in salt for transferring files between minions? Or taking a file and adding it to the master temporarily?
20:07 viq joined #salt
20:07 jfindlay rmc3: also beacons if you need to send an event to salt from an external source
20:08 jfindlay numkem: there are functions in the cp module to do this
20:08 jfindlay I always forget what the names are
20:08 jfindlay `cp.push` and `cp.push_dir` sends files and dirs to the master
20:09 gtmanfred jfindlay has been using too much slack too
20:09 hasues joined #salt
20:09 hasues left #salt
20:10 perfectsine joined #salt
20:10 brianfeister joined #salt
20:10 whytewolf numkem: you might be able to use modules.rsync as well. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.rsync.html#module-salt.modules.rsync
20:11 numkem it would be nice if I wouldn't have to send the file to the master
20:11 numkem thank you jfindlay and whytewolf
20:11 blarghmatey joined #salt
20:11 gtmanfred numkem: yeah, there has been talk about that for the longest time
20:11 gtmanfred raet was supposed to help fix that, but it sounds like not much is going on with that anymore
20:11 gtmanfred but there is a want to be able to do that some day
20:11 jfindlay gtmanfred: I like quoting code in `` :-).  I've been doing it since before I learned MD, probably as analogy to shell and perl `` quoting
20:12 gtmanfred ahh :)
20:12 jfindlay gtmanfred: also, I use slack's IRC gateway :)
20:12 gtmanfred heh
20:12 gtmanfred i am the worst linux guy, i like the gui :/
20:12 numkem I only use an IRC client, for IM, IRC (duh) and slack
20:13 whytewolf gui? only good thing about the gui is it lets me run more xterms
20:13 * whytewolf is a grumpy old unix guy
20:13 jfindlay gtmanfred: well, I use thunderbird instead of mutt, so that makes me a goober, I guess
20:13 gtmanfred i use outlook
20:13 whytewolf lookout?
20:13 numkem whytewolf: what editor do you use (ultimate test)
20:13 gtmanfred so i can schedule meeting rooms
20:13 whytewolf numkem: vi
20:13 whytewolf can't stand emacs
20:13 gtmanfred but i do use vim, i am hoping to get to use atom.io soon
20:14 numkem whytewolf: have you tried spacemacs? I'm a total convert
20:14 whytewolf good operating system, but it's text editer sucks
20:14 gtmanfred whytewolf: pretty good irc client too
20:14 numkem whytewolf: I use spacemacs (emacs) for my emails too through the mu4e layer
20:15 rmc3 gtmanfred: I've been using atom for a few weeks, it's okay as a vim replacement (with the right add-ons), but it's not *too* far ahead of just using a terminal for me at this point XD
20:15 whytewolf I just use mutt with vim as the EDITOR. had a couple of hand built scripts to control it
20:15 gtmanfred same
20:15 gtmanfred i had vim aliased to atom for about a day
20:15 gtmanfred then i had a bug in something, and wanted to fix it quickly, and very very quickly switched to running \vim
20:15 gtmanfred over and over
20:16 gtmanfred vim
20:16 * gtmanfred closes atom
20:16 gtmanfred \vim thing
20:16 numkem I used to use mutt but I got annoyed with it's support for HTML and attachments and having to use something else for better search
20:16 whytewolf oh if i was searching email i just greped my mail dir
20:17 numkem that still requires to open another term, it's just annoying
20:17 gtmanfred whytewolf: check out notmuch
20:17 numkem mu4e built-in search is pretty amazing
20:17 gtmanfred https://notmuchmail.org/notmuch-mutt/
20:17 gtmanfred super good
20:18 ajw0100 joined #salt
20:18 jfindlay cool
20:19 gtmanfred i can't wait till i don't have to have outlook installed anymore
20:19 jimcroft joined #salt
20:19 numkem gtmanfred: what do you need it for?
20:19 jfindlay numkem: as for other terms, I make heavy use of screen and tmux
20:20 whytewolf outlook never touches my own systems. I have to use it at work though. and it drives me nuts anytime i want to do anything in it
20:20 numkem jfindlay: I just used i3. I probably should learn more about tmux eventually
20:20 whytewolf tmux was a godsend.
20:20 gtmanfred numkem:all our meeting rooms are tied into outlook, so i have to have outlook to be able to schedule meetings and reserve a room
20:20 whytewolf I still use screen on my mac though. is great for accessing a serial port when i need to console a machine
20:21 numkem gtmanfred: couldn't you do it just in the web page? The web ui has gotten a lot better
20:21 gtmanfred i need to get my linux desktop back running at home, down right now cause i broke my raid card
20:21 gtmanfred https://github.com/SirCmpwn/sway but i wanna switch to wayland and using this tiling window manager
20:21 numkem I'm having a hard time getting used to work with a Mac, I come from a pretty custom Arch system.
20:21 gtmanfred numkem: :/ i tried the ui for a bit
20:21 bujordan joined #salt
20:22 whytewolf numkem: I have a mac which basicly has 1 large iterm2 windows open all day.
20:22 numkem whytewolf: what do you do for web browsing?
20:23 whytewolf links
20:23 numkem whytewolf: I have a hard time believing you
20:23 jfindlay lol
20:23 whytewolf okay i have chrome open on another window.
20:23 jfindlay lynx :)
20:23 gtmanfred w3m
20:23 whytewolf but i actually do use links heavily
20:24 whytewolf jfindlay: I actually miss lynx sometimes. it was my first web browser
20:24 whytewolf well that and gopher browser
20:25 numkem I saw something about a good browser in emacs, I have yet to take the time to look it up
20:25 whytewolf i wouldn't be shocked if emacs had a decent web browser.
20:25 whytewolf it does everything else
20:26 whytewolf sweet. my 6 SAS drives just got here for my 2950
20:28 whytewolf now if only the guy that i ordered the replacment storage battery from would ship it
20:32 fracklen joined #salt
20:36 numkem the cp.push seems to do the trick but how can I delete it afterwards? I'm gonna do all of this through an execution module
20:37 jfindlay delete from the master?
20:38 whytewolf numkem: as long as your master also is a minion you can just use file.absent
20:39 numkem I guess I could do that... the minion does have the master's minion id in it's grains if I'm not mistaken
20:39 baweaver joined #salt
20:40 numkem or does those files eventually expire?
20:41 whytewolf they are in the cache so they should eventually. in thoery
20:41 felskrone joined #salt
20:41 numkem I'll wait to see what it does through the week-end
20:42 irctc276 joined #salt
20:44 numkem darn, cp.push caches files for a single minion. Doesn't seems like you can transfer it to another
20:46 dimeshake joined #salt
20:46 antpa joined #salt
20:48 bujordan joined #salt
20:48 ajw0100 joined #salt
20:49 bujordan joined #salt
20:50 ajw0100 joined #salt
20:50 bujordan joined #salt
20:50 baweaver joined #salt
20:50 bujordan joined #salt
20:53 RandyT joined #salt
20:56 ZiLi0n Hello, does pip saltstack module allow install local python modules that are in the minion? Or are the pip repos always used?
20:57 onlyanegg joined #salt
20:58 adelcast left #salt
21:00 garphy joined #salt
21:01 jfindlay ZiLi0n: do you mean local python packages?
21:02 jfindlay the pip.installed state allows you to specify an alternate `index_url` for python packages
21:02 ZiLi0n jfindplay yes, so I have a python module in the master, and I am wondering how I can installe it in the minions
21:03 adelcast joined #salt
21:05 ZiLi0n jfindplay that index_url is a webservice? or can it be a salt path (salt://)
21:05 ZiLi0n ?
21:09 jfindlay I'm not sure. If you don't want to expose your salt master with a webservice, you could host it on another minion, or send the file down to the minions and have pip source the local file
21:10 MatthewsFace joined #salt
21:10 ZiLi0n jfindplay ok, I can send the file down to the minions. But how do I pip the source local file?
21:11 jfindlay I'm not sure, I've never tried that before
21:12 baweaver joined #salt
21:16 joe__n joined #salt
21:21 MatthewsFace joined #salt
21:21 rem5 joined #salt
21:23 ZiLi0n jfindplay well I am trying to send a folder to the minions and I can't seem to find a good way to do it ither :). Files I know how, but can't find an elegant way to send folders
21:23 jfindlay file.recurse?
21:26 ZiLi0n jfindlay cool thanks!
21:26 jfindlay nice :)
21:28 brianfeister joined #salt
21:31 saltlix joined #salt
21:31 saltlix Hello everyone!
21:31 kerrick joined #salt
21:32 saltlix I have a question for yall.
21:33 kerrick When using file.managed with Jinja templates, can I set Jinja environment parameters like keep_trailing_newline somehow?
21:33 saltlix What does vm_overrides do?
21:34 saltlix Like here: https://github.com/saltstack/salt/blob/dbad00567b5fd832785f3b01980fb88922d0e47a/salt/cloud/__init__.py#L308
21:34 totzky joined #salt
21:34 gtmanfred saltlix: i believe it is used to override stuff for each vm in a map file
21:34 gtmanfred so you can set per minion grains in your map file, and they are passed in there
21:35 saltlix So I couldn't use it to say, override a static IP in a profile?
21:35 gtmanfred i do not believe so
21:36 saltlix Darn. Is there any Salt provided way to do so?
21:36 gtmanfred at least not form the salt-cloud command line
21:36 gtmanfred you can from the cloud module
21:36 gtmanfred https://github.com/saltstack/salt/blob/develop/salt/modules/cloud.py#L185
21:36 gtmanfred saltlix: there is not a way currently from the salt-cloud commandline that I am aware of
21:36 gtmanfred saltlix: https://github.com/saltstack/salt/issues/10149
21:36 saltstackbot [#10149]title: [salt-cloud][Feature Request] Override settings on the command line | It would be really nice to set everything for a profile for a one off command, or to be able to select a profile and then override something....
21:39 saltlix Hmm.
21:40 saltlix So I could import the cloud module in a python script, but how could I override the IP?
21:40 Netwizard joined #salt
21:40 Netwizard ugh
21:41 tpaul joined #salt
21:41 gtmanfred saltlix: you would not be able to do it that way
21:42 gtmanfred saltlix: you would need to run it through the LocalClient, and assign it to run from a minion
21:42 gtmanfred it is salt <tgt> cloud.profile <profilename> <servername> vm_overrides='{"key": "value"}'
21:42 gtmanfred or you can use the localclient api
21:49 dlam joined #salt
21:49 dlam hey is there a python shell way i can test out to see if a thing i putinto unless: / onlyif: will work?
21:51 whytewolf dlam: unless and only if work through cmd.retcode with python_shell=true
21:52 antpa joined #salt
21:52 bujordan joined #salt
21:53 perfectsine joined #salt
21:56 dlam oo is this right way to test it on the shell?    ``sudo salt-call cmdmod.retcode  "ls ~/"``
21:57 dlam ...i get  cmdmod.retcode' is not available.   =(
21:57 kerrick joined #salt
21:57 whytewolf it is cmd.retcode
21:57 whytewolf cmdmod.py is the name of the file but the module name is cmd]
21:58 dlam oh i idiot thanks thx
21:58 rem5 joined #salt
22:00 whytewolf but it will return the retern code of the command. and unless and onlyif take that return code and decide if it was true or false 0 being the command ran with out errors. anything else being there was errors.
22:06 deniszh joined #salt
22:10 bujordan joined #salt
22:10 tweakism jfindlay: you around?
22:14 chmod666org joined #salt
22:16 bluenemo joined #salt
22:19 Horgix joined #salt
22:21 nZac joined #salt
22:23 rem5 joined #salt
22:23 perfectsine joined #salt
22:27 chmod666org joined #salt
22:27 baweaver joined #salt
22:29 Horgix joined #salt
22:32 jfindlay tweakism: what do you need?
22:33 tweakism jfindlay: do you need to assign some of https://github.com/saltstack/salt/wiki/December-2015-Sprint-Beginner-Bug-List to me, or can I just jump in
22:33 tweakism and 2) it seems like individual files are in individual PR's; can I put multiple files in one branch/PR, or do I need to separate them
22:33 jfindlay tweakism: you can assign yourself whatever you want on there
22:33 tweakism k
22:33 jfindlay you can do as many in a single PR as you want
22:34 tweakism k, that's all, thanks
22:34 bujordan joined #salt
22:34 jfindlay although I recommend separate files i different commits
22:35 tweakism sure, n/p there
22:35 jfindlay thanks, tweakism
22:35 cyrus_mc joined #salt
22:36 cyrus_mc Coming from mcollective for orchestration. The thing I liked about mco is that it could use meta-data (facts from puppet) to address a subset of machines
22:36 cyrus_mc Does salt have something similar, such that you don't have to maintain a list of servers
22:36 ajw0100 joined #salt
22:37 tweakism puppet : facts :: salt : grains
22:37 tweakism more or less
22:38 garphy joined #salt
22:38 cyrus_mc tweakism: k
22:39 tweakism cyrus_mc: since grains can be changed from the minion though, it's a security issue if you target sensitive data based on grains
22:39 adelcast left #salt
22:39 tweakism cyrus_mc: so like, if you make a 'role' grain, and then put SSL private keys on minions with the 'web' role, any minion that gets compromised could be re-configured to receive to your SSL private keys
22:40 onlyanegg What's the best way to share a common set of templates between environments?
22:40 cyrus_mc tweakism: got it
22:41 zenlot1 joined #salt
22:41 adelcast joined #salt
22:42 amcorreia joined #salt
22:44 bhosmer joined #salt
22:45 josuebrunel joined #salt
23:02 shiriru joined #salt
23:03 akhter joined #salt
23:05 BhavyaM joined #salt
23:07 baweaver joined #salt
23:09 bujordan joined #salt
23:11 subsignal joined #salt
23:40 khaije1 Is anyone here using runner.state.orchestrate in a reactor?  I'm getting an error similar to open issue https://github.com/saltstack/salt/issues/29529 and am concerned that the use case may just be broken at present.
23:40 saltstackbot [#29529]title: Reactor can't call runners with `fun` arg | Reactor SLS:...
23:40 flowstate joined #salt
23:43 khaije1 Opps, I meant to say: I'm using runner.state.orchestrate_single
23:44 ajw0100 joined #salt
23:49 bujordan joined #salt
23:49 brianfeister joined #salt
23:51 shaggy_surfer joined #salt

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