Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-06-15

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

All times shown according to UTC.

Time Nick Message
00:01 sgargan_ joined #salt
00:19 otter768 joined #salt
00:28 mschiff joined #salt
00:28 mschiff joined #salt
00:29 hasues joined #salt
00:30 hasues left #salt
00:40 dec joined #salt
00:40 jonlangemak joined #salt
00:41 Not_ joined #salt
00:49 jonlangemak joined #salt
01:03 kermit joined #salt
01:08 forrest joined #salt
01:20 edrocks joined #salt
01:25 amcorreia_ joined #salt
01:28 beauby joined #salt
01:28 david_an111 joined #salt
01:38 moos3 joined #salt
01:43 aqua^c joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2015.5.1 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
02:02 tonocm joined #salt
02:03 tonocm_ joined #salt
02:04 tonocm_ sup guys -- I'm new to Salt and I'm really excited to contribute to the community
02:04 tonocm_ Are there any crucial features you would like to see implemented?
02:09 beauby joined #salt
02:11 theologian joined #salt
02:17 malinoff joined #salt
02:20 otter768 joined #salt
02:21 tonocm joined #salt
02:23 moos3 joined #salt
02:35 beauby joined #salt
02:35 JDiPierro joined #salt
02:48 donmichelangelo joined #salt
03:10 beauby joined #salt
03:17 favadi joined #salt
03:29 Aidin joined #salt
03:31 moos3 joined #salt
03:48 tonocm joined #salt
04:02 tonocm joined #salt
04:12 Xiao joined #salt
04:12 hasues joined #salt
04:13 tonocm joined #salt
04:21 otter768 joined #salt
04:22 onorua joined #salt
04:22 hasues left #salt
04:38 spookah joined #salt
04:39 Furao joined #salt
04:40 ramteid joined #salt
04:49 subsignal joined #salt
04:51 Pratheeba joined #salt
04:52 evle1 joined #salt
04:52 Pratheeba hey all.... im very very new to saltstack.... i just want to know if there's any way to automatically deploy the states to the minions...say...once in every 30 minutes or something...?
04:53 jY ya use the scheduler
04:54 Pratheeba ok..thanks...will go through the scheduler! :)
04:54 jY https://gist.github.com/mzupan/7aa59b764a7357603706
04:54 jY that goes in the minion config
04:55 Pratheeba thank you so much!
05:00 joeto joined #salt
05:03 keimlink joined #salt
05:03 armguy joined #salt
05:07 catpigger joined #salt
05:11 Nazca__ joined #salt
05:14 oravirt joined #salt
05:15 Furao joined #salt
05:18 evle1 joined #salt
05:22 evle3 joined #salt
05:36 forrest joined #salt
05:48 viq joined #salt
05:48 viq joined #salt
05:51 Not_ joined #salt
05:56 ndrei joined #salt
05:58 evle1 joined #salt
05:59 renat joined #salt
06:04 sarlalian joined #salt
06:04 MatthewsFace joined #salt
06:06 colttt joined #salt
06:07 aqua^c joined #salt
06:08 AndreasLutro joined #salt
06:09 favadi joined #salt
06:18 ramaseshan joined #salt
06:22 otter768 joined #salt
06:22 Pratheeba joined #salt
06:23 rdas joined #salt
06:25 aqua^c joined #salt
06:32 al joined #salt
06:37 ajw0100 joined #salt
06:38 flyboy joined #salt
06:38 linjan joined #salt
06:38 trikke joined #salt
06:46 Auroch joined #salt
06:56 joshin joined #salt
06:56 joshin joined #salt
06:56 thalleralexander joined #salt
06:57 favadi joined #salt
06:58 lb1a joined #salt
07:03 magnusf joined #salt
07:04 dRiN joined #salt
07:16 armguy joined #salt
07:17 aqua^c joined #salt
07:21 eseyman joined #salt
07:21 chiui joined #salt
07:26 ndrei joined #salt
07:27 kawa2014 joined #salt
07:35 steven_ joined #salt
07:36 ramteid joined #salt
07:36 steven_ Hi I try to update only on computer in a sls file and it doesn't work. What do you wrong? update:  'fqdn:BSS-WKS01.blues2.local':   - match:grain    win_update.installed:     - categories:      - 'Critical Updates'      - 'Security Updates'      - 'Update Rollups'      - 'Updates'      - 'Windows 7'
07:36 Romlok joined #salt
07:43 favadi joined #salt
07:45 cberndt joined #salt
07:46 ndrei joined #salt
07:47 baoboa joined #salt
07:49 julez joined #salt
07:52 dkrae joined #salt
07:53 linjan joined #salt
07:57 Furao joined #salt
08:07 iwishiwerearobot joined #salt
08:12 AndreasLutro joined #salt
08:12 Grokzen joined #salt
08:12 fe92 joined #salt
08:20 aqua^c joined #salt
08:21 skuaskua joined #salt
08:21 ange hello
08:22 ange anyone familiar with https://github.com/saltstack-formulas/ec2-autoscale-reactor and a way to add grains values based on EC2 tags ?
08:22 skuaskua left #salt
08:23 AndreasLutro joined #salt
08:23 otter768 joined #salt
08:23 ajw0100 joined #salt
08:25 babilen ange: https://github.com/saltstack/salt-contrib/blob/master/grains/ec2_info.py
08:42 Xevian joined #salt
08:47 ingslovak joined #salt
08:49 ndrei joined #salt
08:51 stoogenmeyer joined #salt
08:55 linjan joined #salt
08:56 markm joined #salt
08:59 ange babilen: interesting,
09:00 PI-Lloyd joined #salt
09:03 kawa2014 joined #salt
09:03 supersheep joined #salt
09:07 wvds-nl joined #salt
09:11 Auroch joined #salt
09:13 fredfoo joined #salt
09:15 fredfoo Has anyone a hint how to dump the current configuration of the master or the minion?
09:16 fredfoo would like to check if the master is actually working with my config values :)
09:16 Auroch joined #salt
09:17 keimlink joined #salt
09:21 keimlink joined #salt
09:23 ndrei joined #salt
09:28 ntropy pillar includes minion / master config by default
09:28 ntropy just run pillar.items on the node
09:31 markm joined #salt
09:34 ksj anyone have any idea why the jinja default filter definition includes "default_value=u''". what is the "u" for?
09:36 babilen ksj: That's a unicode string in Python
09:37 ksj babilen: ahh ok, thanks
09:38 ksj any idea why this doesn't work to set a default variable:  {% set domains = pillar['config_entities'][entity]['live']['nginx']['frontend']['subdomain'] | default(['none'])  %}
09:39 ksj or will the "pipe" not work when setting a variable. do I have to put the default on every print statement - e.g.{{ domains|default(['none'])
09:40 babilen ksj: I would recommend to adopt a different approach to settings defaults and, in particular, one that keeps them in distinct file and then uses deep pillar merging. You can see that being used in, for example, the salt-formula and the collectd-formula
09:41 babilen And no, I don't think that you can do something like that while assigning a variable
09:41 scoates_ joined #salt
09:43 babilen Python unfortuantely doesn't have a general get_in method/function to retrieve varlues from an optionally nested collection that also allows you to define a default value. You can only perform lookups on *one* level so that you have to chain .get() calls if you want to define default values
09:43 ksj babilen: ok, makes sense. I'd rather keep the defaults in pillar, but I wasn't really sure how to go about doing it. I'll take a look at the salt formula. hopefully it's clear
09:44 babilen ksj: You would still keep data in the pillar, but keep the *defaults* somewhere else. My main point was the deep pillar merging though.
09:46 yuhl_work___ joined #salt
09:50 ksj are you talking about using a defaults.yaml file? I can't find much info about it and how you do deep pillar merging. google seems to have screwed up indexing the docs since the format change
09:52 babilen https://github.com/saltstack-formulas/salt-formula/blob/master/salt/defaults.yaml + https://github.com/saltstack-formulas/salt-formula/blob/master/salt/map.jinja#L69 + https://github.com/saltstack-formulas/salt-formula/blob/master/salt/master.sls#L1
09:55 ksj babilen: ok, thanks...it's beginning to make sense....
09:55 babilen (see other formulas such as collectd, influxdb, ... for more examples)
09:57 babilen The trick is the merge=True which does deep pillar merging with the defaults in place.
09:57 lothiraldan joined #salt
10:01 favadi joined #salt
10:02 ndrei joined #salt
10:08 ksj babilen: yeah. I've avoided the map.jinja thing so far, because it's confusing and ugly. Isn't there a way to set a global set of defaults for pillar without it?
10:09 fredfoo ntropy: no luck with pillar.items or raw, just empty, even after saltutil.refresh_pillar
10:09 babilen ksj: Why is it ugly? And no, there isn't as you have to do the merging/definition of the default *somewhere*. You don't have to call it map.jinja though ;)
10:11 KermitTheFragger joined #salt
10:13 fredfoo More ideas? Just dump the configuration data in use for a master?
10:14 ndrei joined #salt
10:16 moos3 joined #salt
10:16 lothiraldan joined #salt
10:19 babilen fredfoo: What are you really trying to do?
10:22 Grokzen joined #salt
10:22 zerthimon joined #salt
10:24 otter768 joined #salt
10:24 aqua^c joined #salt
10:26 cheine_ joined #salt
10:26 ndrei joined #salt
10:31 cheine joined #salt
10:36 fredfoo I am turning my single environment into a multi environment setup
10:36 fredfoo getting not top file error
10:36 agentnoel joined #salt
10:36 fredfoo added my file roots to master.d and would like to see if the master picked up that configuration
10:37 chrisw joined #salt
10:37 fredfoo if I can dump the current configuration values used by the master I could exclude that as the source of the problem
10:37 fredfoo or identify it as such :)
10:37 chrisw hey all, what’s the “right” way to map states to hosts?
10:38 AndreasLutro chrisw: I don't think there is a right way :)
10:38 chrisw (so, for example, when a highstate runs it will pick up the right states for the host it runs on, based on some static config in either the state or pillar tree)
10:39 chrisw AndreasLutro: that’s a bit sad… what are the options?
10:39 AndreasLutro why is it sad? you have a ton of options
10:39 AndreasLutro https://docs.saltstack.com/en/latest/ref/states/top.html
10:40 AndreasLutro https://docs.saltstack.com/en/latest/ref/states/top.html#other-ways-of-targeting-minions has a lot of examples
10:42 cberndt joined #salt
10:43 chrisw ah, okay, I think I see now :-)
10:43 chrisw thanks for the help!
10:43 ampex joined #salt
10:43 chrisw left #salt
10:44 Cidan joined #salt
10:45 markm joined #salt
10:47 ndrei joined #salt
10:53 che-arne joined #salt
10:54 mejiamariano joined #salt
10:56 sgargan joined #salt
10:57 AndreasLutro no problem
11:06 giantlock joined #salt
11:06 chrisw joined #salt
11:07 CeBe joined #salt
11:10 ndrei joined #salt
11:21 fe92 is there any way to structure a project for using target groups and group_vars in a similar way as ansible using salt.roster?
11:21 JDiPierro joined #salt
11:22 linjan joined #salt
11:24 mephx joined #salt
11:24 fe92 we have 60 different group_vars files)
11:26 Aidin joined #salt
11:27 ksj babilen: ok, this happens every time I start reading about map.jinja and defaults...I want to kill myself. The only examples I ever see are related to different package names on different OSs. What I ideally want is to be able to reference a pillar item in a template, and know that if that item is not defined, it will be a default var (in my case, an empty list). I don't want to have extra crap in my
11:27 ksj state/template files, because that gets messy.
11:27 ksj sorry, not meaning to sound like I'm complaining. it's just an area of salt that I find frustrating
11:28 ksj it keeps things so much cleaner when everything's defined in pillar. That's one of the reasons I don't use any salt formulas.
11:29 babilen ksj: So define a default map and then deep merge the pillar into that as exemplified in https://github.com/saltstack-formulas/influxdb-formula/blob/master/influxdb/map.jinja#L46
11:30 XenophonF left #salt
11:30 babilen ksj: Formulas cannot define everything in pillars because they have no means to add data to the pillar apart from asking the user to do so. The basic idea is to ship sensible defaults that can then be easily overriden or extended by the user
11:31 Brew joined #salt
11:33 samnmax joined #salt
11:33 VSpike Funnily enough I was just looking at how the postfix formula manages that.
11:35 babilen Not in the "Fancy new Style"™
11:37 bezaban can't decide whether I want to make my simpler states handle any distro or split up and apply different states depending on distribution
11:37 VSpike I had a related question actually. If a formula requires me to put some piece of data in a specific pillar data structure (e.g. the mynetworks item in the postix config) but I already have some or all of that defined elsewhere in a pillar (e.g. a list of trusted networks) ....
11:38 VSpike is there a way to refer to another bit of pilar within the pillar? I don't think so, but maybe there's one wierd trick
11:38 VSpike From what I saw in the issues lists, YAML anchors don't work in pillar
11:40 che-arne joined #salt
11:41 babilen bezaban: I'd not introduce distribution specific states, but design states "semantically" (in the sense of "configure mailserver") and ensure that they do the right thing on each platform.
11:41 babilen That way you have one place to deal with differences
11:41 babilen (and extensions)
11:43 drawsmcgraw joined #salt
11:44 bezaban babilen: yeah, that sounds like what I'm trying to accomplish. Redone the design a few times since I started out
11:45 aqua^c joined #salt
11:45 bezaban but for stuff like vim being vim-enchanced in centos it seems a bit tedious
11:45 babilen https://github.com/saltstack-formulas/vim-formula
11:46 babilen https://github.com/saltstack-formulas/vim-formula/blob/master/vim/map.jinja + CentOS PR = bliss
11:46 VSpike This is where the idea of a totally static pillar-type key/value store that could be referenced in pillar would be really useful. Which I think was babilen's idea
11:46 ndrei joined #salt
11:46 babilen yeah
11:46 bezaban ah helpful!
11:47 babilen https://github.com/saltstack/salt/issues/23910
11:47 bezaban yes, that looks like a good way of doing it
11:49 VSpike I guess I'm out of luck on a way to avoid repeating this config data then?
11:49 bluenemo joined #salt
11:54 babilen VSpike: I'd love to have "pillar redirects" so that you could easily use generic formulas, while still keeping "project specific" configuration in one place.
11:55 babilen For that you would, like with any good formal grammar, need terminal symbols in the form of static pillars
11:55 amcorreia_ joined #salt
11:59 linjan joined #salt
12:05 iwishiwerearobot joined #salt
12:09 yuhl_work___ joined #salt
12:16 fredvd joined #salt
12:16 ndrei joined #salt
12:20 linjan joined #salt
12:23 supersheep joined #salt
12:25 otter768 joined #salt
12:25 Aidin joined #salt
12:29 chrisw joined #salt
12:29 numkem joined #salt
12:32 sieve joined #salt
12:32 sieve Salt-cloud is not installing salt on these centos7 instances
12:32 sieve on AWS
12:34 lothiraldan joined #salt
12:39 kawa2014 joined #salt
12:41 subsignal joined #salt
12:41 GabLeRoux joined #salt
12:42 felixhummel joined #salt
12:46 aqua^c joined #salt
12:48 kulty joined #salt
12:51 Aidin joined #salt
12:52 dendazen joined #salt
12:58 wnkz joined #salt
13:01 FeatherKing joined #salt
13:02 Aidin joined #salt
13:02 elfixit joined #salt
13:03 ferbla joined #salt
13:03 bhosmer joined #salt
13:05 JDiPierro joined #salt
13:06 ange sieve: you might have some options to set to trigger the bootstrapping
13:06 ndrei joined #salt
13:08 linjan joined #salt
13:09 ange anyone using ec2_info "addon" ?
13:10 teryx510 joined #salt
13:11 chrisw joined #salt
13:12 babilen ange: Are you?
13:13 ange I am trying to, not sure what one is supposed to do from there
13:15 AndreasLutro https://bpaste.net/show/a61edb40a0c6 can anyone think of any creative ways to achieve this? currently it doesn't work because I have to define mysql_pass in every web_site child
13:18 Aidin joined #salt
13:19 sieve joined #salt
13:19 Tyrm joined #salt
13:20 VSpike babilen: I was thinking the same yeah.. a pillar alias, sort of like a yaml anchor but within pillar itself. But I figured that would probably require static pillar to be implemented in any sensible way
13:20 VSpike Even if yaml anchors worked it would be handy
13:21 AndreasLutro maybe like this! https://bpaste.net/show/ac953cbef6b7
13:22 jY ange: i'm using it
13:22 jY the grain you mean not addon?
13:22 babilen VSpike: That is exactly what I have in mind there, yeah
13:23 babilen ange: What have you tried so far?
13:23 impi joined #salt
13:24 Furao joined #salt
13:25 emaninpa joined #salt
13:26 renat joined #salt
13:28 murrdoc joined #salt
13:30 sgargan joined #salt
13:34 mpanetta joined #salt
13:34 giantlock joined #salt
13:35 ange babilen: not much, copied the file in _modules, then I can call ec2_info.ec2_info for a node or more; that's not really enough
13:35 torchinz joined #salt
13:38 Aidin joined #salt
13:38 c10b10 joined #salt
13:39 ange I am looking for a way to get pillar or grains altered upon a call through salt-api (auto scale, create on ec2); https://github.com/saltstack-formulas/ec2-autoscale-reactor/blob/master/reactor/ec2-autoscale.sls should trigger the appropriate bootstrapping but I need to get some grains and pillar set before that happen
13:39 c10 Any idea why "Comment: State 'npm.bootstrap' was not found in SLS 'deploy.site.dev.npm'" would appear
13:39 c10 ?
13:40 ange converting EC2 tags into grains might be enough, I suppose what ever I have defined in the salt cloud profile as basics will be inherited by the new hosts as well
13:41 Deevolution joined #salt
13:42 kawa2014 joined #salt
13:43 kaptk2 joined #salt
13:45 ndrei joined #salt
13:48 cpowell joined #salt
13:48 sieve joined #salt
13:48 rm_jorge joined #salt
13:50 babilen ange: Isn't it an external grain (and should therefore be in _grains) ?
13:50 slav0nic joined #salt
13:51 babilen yeah, definitely
13:51 ange no idea
13:54 Aidin joined #salt
13:55 ange seems http://blog.renaissancedev.com/from-heroku-to-aws-with-saltstack-part-2.html has some good points on the topic
13:55 ange time for a coffee and I will check
13:56 ksj babilen: so, sorry to continue to annoy you, but after reading up about the defaults.yaml and map.jinja stuff, I'm really not sure it's what I'm looking for. basically what I want to do is this: http://dpaste.com/3F5GDPZ - but it fails on accessing the pillar entry if it's not defined. is there a way to change this behaviour? to assign "null" instead of failing?
13:58 mapu joined #salt
14:00 timoguin joined #salt
14:02 ntropy im writing a state using the py renderer, any way to see the python stacktrace when it fails?
14:03 ntropy i just get the "Unknown yaml render error" and line number
14:03 sgargan joined #salt
14:04 ntropy does that error mean salt is trying to render the state with yaml instead of py renderer?
14:04 ntropy i have #py on line #1
14:04 wendall911 joined #salt
14:04 ntropy oh, sorry for the noise, #py isn't a valid shebang line
14:05 ntropy here come python traces
14:05 _JZ_ joined #salt
14:06 rojem joined #salt
14:07 babilen That would be pillar.get('config_entities', {}).get(entity, {}).get('live' .... (and so on) in Python
14:07 babilen Python is ridiculous in that it doesn't have anything like https://clojuredocs.org/clojure.core/get-in, https://clojuredocs.org/clojure.core/assoc-in or https://clojuredocs.org/clojure.core/merge-with
14:09 c10 joined #salt
14:09 andrew_v joined #salt
14:11 JDiPierro joined #salt
14:12 nicksloan left #salt
14:12 AndreasLutro is anyone familiar with this error message? https://bpaste.net/show/7427a0b0c2b1
14:12 TranquilityBase joined #salt
14:13 AndreasLutro it starts happening the second time I run highstate - trying to narrow down which state causes it to happen now
14:14 Furao joined #salt
14:15 jonlangemak joined #salt
14:16 iwishiwerearobot joined #salt
14:18 julez joined #salt
14:20 sieve ange: nah, default behaviour is to install salt
14:20 renat Hi! Does anybody know why in parted module no yet ext4 support? Need the patch?
14:20 sieve I think I found the problem
14:21 toastedpenguin joined #salt
14:23 toastedpenguin joined #salt
14:24 ange that post is interesting but still fuzzy
14:25 c10 is there any way to make a state wait for the execution of a macro?
14:26 otter768 joined #salt
14:27 jdesilet joined #salt
14:28 babilen ange: So, have you tried using it as external grain? What have you done exactly and what did happen?
14:32 c10 asked differently, is there any way of adding a require statement to an include
14:32 c10 ?
14:32 dyasny joined #salt
14:34 sieve1 joined #salt
14:34 favadi joined #salt
14:35 aqua^c joined #salt
14:37 onorua joined #salt
14:44 babilen c10: no
14:46 bhosmer joined #salt
14:46 giantlock joined #salt
14:50 bhosmer joined #salt
14:51 clintberry joined #salt
14:58 mohae joined #salt
14:58 ageorgop joined #salt
15:00 Ssquidly joined #salt
15:03 ALLmightySPIFF joined #salt
15:03 jalbretsen joined #salt
15:06 ALLmightySPIFF joined #salt
15:09 iwishiwerearobot joined #salt
15:16 pullphinger joined #salt
15:19 c10 i'm getting "State not found" for npm.bootstrap and I can't figure out why
15:19 c10 any ideas why a core state might be not found by salt?
15:20 sdm24 joined #salt
15:24 Grokzen joined #salt
15:24 bmac2 joined #salt
15:27 teryx510 Hi guys, is there a way to pull files out of pillar similar to source: salt:// or is the only option to use contents_pillar?
15:31 babilen teryx510: What's the problem with contents_pillar? (and yes, that is the way you would populate a file from pillars)
15:32 bhosmer_ joined #salt
15:34 sieve joined #salt
15:35 iggy ange: salt-contrib has some pre-built ec2 grains
15:36 iggy babilen: the problem is binary data I'd imagine
15:36 iggy teryx510: and no, there is however a bug (or 5) open about it
15:36 teryx510 babilen: It's just doesn't seem as flexible as being able to call for a file directly.
15:37 teryx510 Thanks for providing an answer though.
15:39 iggy c10: probably because you don't have npm (or whatever deps the modules has) installed on the minion or you have a version mismatch between whatever docs you are looking at and what you have installed
15:39 GabLeRoux joined #salt
15:40 c10 i checked, npm is installed
15:43 iggy c10: what version is it?
15:43 c10 1.4.28
15:43 iggy should be okay then
15:44 c10 yeah, it's weird
15:44 iggy can you run salt minionid npm.list
15:45 c10 i'm getting the list of packages
15:46 c10 the weird thing is that if i replace npm.bootstrap with cmd.run: npm install, it works
15:47 c10 and the bootstrap state exists, i checked the npm.py file in the salt states dir
15:47 c10 running 2015.5.0 btw
15:48 iggy npm.list?
15:48 c10 salt 'minionid' npm.list returns the list of npm packages
15:49 c10 (was that what you were asking?)
15:51 desposo joined #salt
15:54 iggy yes
15:54 iggy that means the states should load
15:54 c10 i'm looking at the verify_data in salt/state.py method that spits out the error about the npm.bootstrap state not existing. I was thinking of dumping the contents of salt.states, but seems that my code is ignored. does salt have any cache?
15:54 c10 *the verify_data method
15:54 c10 *salt.states = self.states
15:55 iggy shouldn't
15:56 iggy oh, well, you'll have to restart the daemon
15:57 c10 i'm running everything through salt-ssh, so no restart should be needed, right?
15:57 * iggy runs
15:57 ndrei joined #salt
15:57 writtenoff joined #salt
15:57 * c10 watches iggy running
15:58 iggy I don't really know that much about salt-ssh
15:58 thedodd joined #salt
16:00 c10 there's no difference, everything's just run through ssh
16:01 teryx510 left #salt
16:01 premera joined #salt
16:01 premera joined #salt
16:05 snarfy joined #salt
16:09 iggy there are some differences
16:09 iggy do you have any regular minions?
16:11 hal58th joined #salt
16:12 GabLeRoux joined #salt
16:13 c10 i don't know what you mean by regular, but, yes, I do have minions (for salt-ssh, they are kept in a roster)
16:14 hal58th_ joined #salt
16:14 iggy can you check if the npm states are working on one of the minions?
16:14 conan_the_destro joined #salt
16:15 hal58th__ joined #salt
16:19 aparsons joined #salt
16:20 ecerulm joined #salt
16:21 desposo joined #salt
16:22 c10 i can confirm npm.installed state def works
16:23 iwishiwerearobot joined #salt
16:23 aqua^c joined #salt
16:26 c10 https://www.dropbox.com/s/6jy0cpmfoqcpsad/Screenshot%202015-06-15%2019.26.42.png?dl=0
16:26 otter768 joined #salt
16:27 desposo joined #salt
16:29 hasues joined #salt
16:31 hasues left #salt
16:32 cruatta joined #salt
16:33 MatthewsFace joined #salt
16:33 cruatta joined #salt
16:34 GabLeRoux joined #salt
16:35 cruatta_ joined #salt
16:35 iggy works where? salt-ssh or minions?
16:35 mordonez joined #salt
16:36 MatthewsFace joined #salt
16:38 smcquay joined #salt
16:39 c10 ah, i see what you mean. it works with salt-ssh. i have no master-minion setup so i can test like that.
16:39 aparsons joined #salt
16:39 linjan joined #salt
16:43 c10 i'll try setting a master-minion relationship and test it out like that, but tbh, i see no reason why it shouldn't work with salt-ssh and work with master-minion
16:43 iggy the new loader is a tricky little beast
16:44 Voziv joined #salt
16:44 c10 joined #salt
16:46 Voziv When using a salt master to configure a minion, is the jinja in a template evaluated at the master or minion? EG: {{ salt['dnsutil.A']("example.com")[0] }}
16:46 sdm24 minion
16:47 iggy states are on the minion, pillar is on the master
16:47 bhosmer joined #salt
16:51 Voziv Awesome, thanks!
16:53 ecerulm joined #salt
16:55 ange am I supposed to get rendering errors on py states when apparently the state is run (I can see it logging properly through the file.write calls in it) ?
16:57 theologian joined #salt
17:03 lexter joined #salt
17:04 Gareth morning morning
17:04 linjan joined #salt
17:04 XenophonF joined #salt
17:06 supersheep joined #salt
17:07 forrest joined #salt
17:07 ajw0100 joined #salt
17:08 forrest joined #salt
17:08 iggy ange: if there's an error rendering it, yes (although I imagine in this case, it's a slightly different type of rendering than with your normal jinja+yaml)
17:09 ange iggy: if there is an error rendering it, I would guess that it can't reach the end of it or not run it at all
17:11 baweaver joined #salt
17:13 acdha joined #salt
17:13 keimlink joined #salt
17:15 iggy it normally renders and then tries to run what's in the rendered output
17:15 JDiPierro joined #salt
17:15 iggy but that's for jinja+yaml
17:16 iggy I'm guessing with #!py states, you're just ending up with invalid syntax and that's somehow getting caught as a render error
17:17 iggy try "python /path/to/my/py/state.sls"
17:17 joeto1 joined #salt
17:17 iggy it should do nothing
17:18 coval3nce joined #salt
17:18 tomh- joined #salt
17:18 Not_ joined #salt
17:20 coval3nce hmmm, do salt-minions reject a master if the master’s key materical changes (e.g. its rebuilt) but the salt-master uses the same master_sign.pub ?
17:20 racooper joined #salt
17:21 XenophonF coval3nce: are you talking about the contents of /etc/salt/pki/master or /etc/salt/pki/minion, on this hypothetical master?
17:22 XenophonF coval3nce: assuming you restored the original contents of /etc/salt/pki/master on the master, I don't think the minions will notice anything changed
17:23 XenophonF the minion running on the master itself is no different than any other minion
17:23 ecerulm joined #salt
17:23 coval3nce XenophonF: correct, lets say salt-minion joins salt-master, salt-master is configured for signing (as is the minion) using master_sign.pub.  Salt master is rebuild to salt-master’ , the minion rejoins salt-master’, will the minion continue to function as long as master_sign.pub is carried over correctly to the salt-master’ instance?
17:23 XenophonF yup
17:24 coval3nce ok, in this case i want to only carrry over the master_sign.pem and master_sign.pub to the new/additional or rebuilt master
17:24 XenophonF as long as you don't touch the keymat under /etc/salt/pki/master (or equiv. location for your O/S), minions won't notice anything changed
17:24 coval3nce Well, /etc/salkt/pki master will be different on the newly build salt-master, but only the master_sign.* will be carried over from the previous instanct.  The various salt-minions stay as-is
17:25 XenophonF you'll probably need to re-accept all of the minion keys, then
17:25 coval3nce Gotcha
17:25 XenophonF gah, just checked and the freebsd package of salt puts the pki stuff into /usr/local/etc/salt
17:26 XenophonF when it ought to be under /var/db/salt
17:26 spookah joined #salt
17:26 hal58th__ that is a terrible place for pki stuff.
17:26 KyleG joined #salt
17:26 KyleG joined #salt
17:27 ange iggy: yeah does nothing (on the master)
17:27 baweaver joined #salt
17:28 ajw0100 joined #salt
17:28 XenophonF hal58th__: /var/db is the canonical location for "automatically generated system-specific database files" according to heir(7)
17:28 hal58th__ i was refering to the other place, but good to know
17:28 XenophonF oh hah sorry
17:29 hal58th__ all good
17:30 ange iggy: https://gist.github.com/mcansky/853ceb25a4ebd329607f (in case I am missing something obvious)
17:30 iggy ange: okay, so that _probably_ means you don't have a syntax error... not really sure what to do beyond that unfortunately :/
17:31 snarfy^ joined #salt
17:34 iggy looks okay to me
17:35 ange iggy: am I supposed to add the python renderer in the master config ?
17:35 iggy no
17:35 iggy the config file changes the default renderer
17:35 iggy you just need to put the #!py at the top
17:36 Furao joined #salt
17:37 ange ok
17:38 ange babilen: I could get what I want apparently through the base reactor
17:39 buMPnet joined #salt
17:39 ange so for now trying that
17:40 coval3nce XenophonF: thank for the sanity check
17:40 sdm24 Random question, and not entirely related to salt, but how do I input exclaimation points in the middle of python statements? I'm trying to hash a password, using the command at http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.shadow.html#salt.modules.shadow.set_password, which is python -c "import crypt; print crypt.crypt('test!ing', '\$6\$SALTsalt\$')", but it is not working
17:40 CeBe1 joined #salt
17:41 sdm24 I tried using ('test\!ing'...) but that changes the password to the string "test\!ing"
17:41 sdm24 otherwise I get an error that "!ing,: event not found"
17:41 snarfy__ joined #salt
17:42 joshin joined #salt
17:42 iggy that's in quotes, your shell shouldn't be trying to expand it
17:42 iggy try reversing the quotes (' on the outside, " on the inside)
17:42 sdm24 I tried that and the hash was like 6 characters long
17:43 sdm24 with no \$6\$SALTsalt at the start
17:44 iggy the command as originally written in the docs works for me
17:44 ageorgop joined #salt
17:45 llua` joined #salt
17:46 sdm24 using only period, forward slash, and alpha-numeric characters only?
17:48 iggy no... like straight c&p from the docs
17:48 ange iggy: could it be because of the format / look of ret ? (updated the gist with the value)
17:49 sdm24 I did exactly that, and it works fine for 'password', and I succesfully changed the password to that with its hash, but it won't work for 'pass!word' or anything else with a ! in it
17:50 sdm24 could just be an issue with me or the python im using
17:50 sdm24 *python version
17:51 iggy ange: nah, if you reverse that in a yaml parser, it looks okay
17:52 ange :(
17:52 ange odd
17:52 fllr joined #salt
17:52 ange a simpler py state did work (just logging out stuff to the file) so I will try making it simpler just to see
17:52 murrdoc joined #salt
17:52 ange iggy, babilen : thanks for the help
17:53 ange time to close the laptop for the night
17:53 baweaver joined #salt
17:55 Not_ joined #salt
17:56 sdm24 iggy: it seems to work if I have salt do a cmd.run with the crypt command. Maybe thats just what I have to do
17:56 fllr Hey guys. I'm trying to run a file.touch, but I'm getting this warning: "'group' and 'user' are invalid keyword arguments for 'file.touch'. If you were trying to pass additional data to be used in a template context, please populate 'context' with 'key: value' pairs. Your approach will work until Salt Carbon is out. Please update your state files." How am I supposed to set the permissions of a file I touch moving forward?
17:57 sdm24 Can you post your state into gist.github.com or somewhere similiar?
17:58 ecerulm joined #salt
17:58 buMPnet joined #salt
17:59 giantlock joined #salt
18:00 buMPnet joined #salt
18:00 iggy sdm24: how were you doing it? I thought you were just trying to run a command on the cmd line
18:02 Voziv Is there a way to get file.managed to just create the file once, and then leave it alone if it already exists?
18:02 sdm24 I was, and it wasn't working. But I quickly made a state https://gist.github.com/sdm24/9b6e73df86c2b22d7e46 to run the command and it works
18:02 Voziv I think I'm just thinking about it the wrong way which is why my googling is failing me
18:02 murrdoc how do i give a list of mininos to highstate against
18:02 teryx510 joined #salt
18:02 murrdoc salt -L 'mini1, mini2, banana' state.highstate fails
18:03 sdm24 Voziv: add "- replace: False"
18:03 iggy replace If this file should be replaced. If false, this command will not overwrite file contents but will enforce permissions if the file exists already. Default is True.
18:03 iggy dang, beat me to it
18:03 sdm24 haha but you gave more info
18:03 iggy murrdoc: no spaces
18:04 Voziv sdm24, iggy Thanks
18:05 murrdoc iggy:  u aight man
18:05 murrdoc for a texan
18:05 coval3nce hmm can salt.renderers.gpg use in masterless salt to bootstrap a node?
18:09 clintber_ joined #salt
18:10 vexati0n joined #salt
18:10 baweaver joined #salt
18:11 riftman joined #salt
18:11 kaptk2 joined #salt
18:12 aqua^c joined #salt
18:14 conan_the_destro joined #salt
18:16 bhosmer joined #salt
18:18 Ryan_Lane coval3nce: yeah, but you need access to the gpg key
18:18 Ryan_Lane coval3nce: you should consider a secret management service, like vault or keywhiz
18:18 coval3nce Ryan_Lane: so, setup the /etc/salt/gpgkeys like normal, and the minion will be able to decrypt pillar data itself without a master?
18:19 Ryan_Lane yeah. external pillars and renderers and such work fine on masterless
18:19 AndreasLutro joined #salt
18:19 coval3nce nice, will try to test that out here
18:19 llua joined #salt
18:19 llua joined #salt
18:19 coval3nce projectvault.io looks really cool
18:19 coval3nce be cool to add a renderer that can tie to that
18:20 Ryan_Lane probably want an external pillar for it
18:20 AndreasLutro I've got postgres states that manage databases and users, and they work - but if I add "postgres.host: localhost" to the minion config, suddenly it says it wants to re-create all the users and databases with test=True. I don't dare turn off test=True, does anyone have any idea what could cause this?
18:20 hal58th_1 joined #salt
18:20 coval3nce yeah, an external pillar for secrets
18:20 hal58th_2 joined #salt
18:20 coval3nce not a bad idea
18:20 Ryan_Lane that's what I'm doing, but i have my own secret management service
18:21 Ryan_Lane hopefully one day I'll get to open source it :D
18:21 hal58th_3 joined #salt
18:21 coval3nce nice ;)
18:21 coval3nce I wouldn’t mind on working on a plugin for vault or something - maybe have to weekend project htat one
18:21 ndrei joined #salt
18:21 Ryan_Lane it should be a bit more secure than gpg renderer
18:21 Ryan_Lane though you still have a chicken/egg problem
18:22 Ryan_Lane maybe you could add salt auth to vault :D
18:22 coval3nce there is always a chicken/egg problem ;)
18:22 Ryan_Lane my secret management system doesn't have one because it uses AWS's KMS
18:22 Ryan_Lane so AWS provides the chicken
18:22 jonlangemak joined #salt
18:22 coval3nce that throws down something in a pseudo filesystem or something?
18:23 Ryan_Lane KMS just provides an encryption key that can be used to encrypt/decrypt
18:23 coval3nce e.g. each VM “has” something when its provisioned somwhow?
18:23 Ryan_Lane and the encrypt and decrypt actions can be limited by IAM policy
18:23 Ryan_Lane I should have some blog posts on this pretty soon :D
18:24 coval3nce cool, i’ll have to stay tuned for them
18:25 coval3nce the whole secrets problem hasn’t really been solved in a nice consistent way taht i’ve seen
18:25 denys joined #salt
18:28 otter768 joined #salt
18:28 Ryan_Lane coval3nce: AES-GSM with AAD (additional authenticated data)
18:28 Ryan_Lane + IAM policy
18:28 Ryan_Lane it's pretty excellent
18:30 coval3nce ooh ooh, will RTFM Ryan_Lane thanks!
18:34 Ryan_Lane yw :)
18:35 ekristen joined #salt
18:35 Ryan_Lane if you're using AWS this may be a better alternative to gpg, or could be used along with gpg to protect your key
18:40 terratoma joined #salt
18:41 andrew_v joined #salt
18:45 murrdoc kms?
18:45 murrdoc aws is easier than hardware
18:46 murrdoc s/easier/moves faster so is easier/
18:48 rap424 joined #salt
18:48 aboe joined #salt
18:50 baweaver joined #salt
18:54 froztbyte Ryan_Lane: that sounds cool. Having keys everywhere is a major duplicity bugbear for me
18:54 froztbyte Verification needs the privkey :(
18:55 snarfy__ what is this _schedule.conf shit
18:56 c10 joined #salt
18:56 impi joined #salt
18:56 iggy it's how salt persists the schedule data across reboots
18:56 snarfy__ what schedule?
18:56 iggy salt has a scheduler built in
18:56 drawsmcgraw iggy: Is it... a new thing? I noticed it after upgrading ot 2015.5.0
18:56 Ahlee is there no way to move an accepted key to rejected once it's accepted?
18:56 snarfy__ is there default schedule data
18:56 drawsmcgraw I've been using Pillar to store schedule stuff.....
18:56 snarfy__ because i don't believe I have any schedules set up
18:57 Ahlee i have localhost.localdomain as a down minion, which i'd very much like to reject in the future
18:57 iggy drawsmcgraw: it is new
18:57 Ahlee without having to delete it, rejoin it, then reject it before accepting
18:57 forrest Ahlee: Not as far as I am aware.
18:57 iggy snarfy__: yes, there are default schedules
18:57 drawsmcgraw Interesting.... Do I need to read the release notes more closely or did that one slip through because I don't remember reading about it
18:57 Ahlee Poo.
18:57 Ahlee forrest: thanks
18:57 Ahlee i'll see if i can just move the key manually
18:57 snarfy__ so this _schedule.conf with a mine.update function in it
18:58 snarfy__ is default behavior in the new version of salt?
18:58 iggy snarfy__: yes
18:58 iggy drawsmcgraw: I don't think it was mentioned in the release notes, not entirely sure though
18:58 spookah joined #salt
18:58 snarfy__ was it something that was always happening and is just now codified in this included config file?
18:59 drawsmcgraw snarfy__ doesn't like surprised :)
18:59 forrest good thing to note for mysql_grants, you can't do - database: *.*
18:59 drawsmcgraw surprises*
18:59 mou joined #salt
19:00 snarfy__ well i'm with you, man. i've been scouring the website and the internet at large for an aswer to this question and i can't find anywhere that just says "oh yeah by the way expect a new file you've never seen before to be included in your config dir"
19:00 snarfy__ try searching saltstack.com for _schedule.conf and you get 0 results.
19:01 iggy I don't know, I thought it was pretty obvious what it was when I first saw it
19:01 snarfy__ sure. but how about WHY it is
19:02 drawsmcgraw Have to say, I kinda agree with snarfy__. I'm just too distracted to have the same concern/indignation.
19:02 iggy bug tracker
19:02 peters-tx joined #salt
19:02 snarfy__ not documentation? :)
19:02 iggy the docs can't (and probably shouldn't) have every bit of minutae about every single change that goes into git
19:03 aparsons joined #salt
19:03 drawsmcgraw It looks like a nicety to me. To be honest, that's something I set forever ago and forgot I even did - configuring minions to report their IPs to the Salt Mine
19:03 snarfy__ horse pocly the docs should include basic default functionality and so should version release notes :p
19:03 iggy file a bug
19:04 iggy see if anyone agrees with you enough to retroactively change all the docs
19:04 snarfy__ well i appreciate you clearing it up
19:04 snarfy__ i honestly had no idea there were salt min functions occurring
19:04 snarfy__ i thought using the mine was something that had to be specifically included like reactor configs
19:05 snarfy__ to be fair i did see mine.update in the master event queue, but I thought it was leftover cruft from something my predecessor did
19:05 aboe can somebody help me quickly fix some jinja magic in php-formula
19:05 aboe I want to test if a jinja look up is iterable
19:06 snarfy__ and i wasn't sure if I was seeing salt codify some obscure settings that someone else set, or if it was just new default behavior
19:06 * snarfy__ is revamping the salt master
19:08 ajw0100 joined #salt
19:08 snarfy__ :/ i think i may file a bug report for the docs. the documentation says this : "To enable the salt mine, the mine_functions option needs to be applied to a minion"
19:08 snarfy__ it doens't say that it's applied to all minions by default and is now a default part of the installation
19:09 iggy it's not applied by default
19:10 iggy the job that reads the mine_functions config and runs said functions and returns said data to the master runs by default
19:11 iggy it always has, it just used to be built into salt's threads and now it runs as a scheduled job (and as such shows up in the config file that persists the scheduled jobs across reboot)
19:12 baweaver joined #salt
19:13 hybridpollo joined #salt
19:15 c10 joined #salt
19:15 snarfy__ no comprende.
19:16 snarfy__ there's something im missing here.
19:17 bhosmer joined #salt
19:21 snarfy__ if i'm not using the salt mine. is _schedule.conf doing anything at all?
19:21 snarfy__ provided i'm not scheduling anything.
19:22 iggy yes, it runs mine.update every hour by default... however mine.update does nothing unless you tell it to
19:22 snarfy__ ah ok
19:23 snarfy__ is there any sense in reducing traffic to the master by not running mine.update?
19:23 iggy https://github.com/saltstack/salt/issues/21903
19:23 iggy that's your bug to document it
19:24 SheetiS joined #salt
19:24 iggy if you don't have any mine_functions setup, then mine.update won't do anything
19:25 spiette joined #salt
19:25 snarfy__ cool
19:25 iggy (and I think if you try to erase that file, it gets recreated because that scheduled job is special)
19:26 snarfy__ this behavior i did notice
19:27 snarfy__ but that's why i thought maybe it was some config in pillar or elsewhere that someone else had set
19:27 rypervenche joined #salt
19:28 chiui joined #salt
19:29 aboe joined #salt
19:30 ntropy hey, i just noticed that using : delimiters with  __pillar__.get doesn't work
19:30 ntropy what understanding am i missing here?
19:31 iggy ntropy: __pillar__ is a dict
19:31 iggy __salt__['pillar.get']() is a module function called via the __salt__ dict
19:32 ntropy ha, that makes sense, although the docs seem to indicate that its a module
19:32 ntropy https://github.com/saltstack/salt/blob/develop/salt/renderers/py.py#L8
19:32 murrdoc joined #salt
19:33 murrdoc joined #salt
19:34 iggy "this module" is referring to the salt.renderers.py module... not the dicts listed below
19:36 ntropy cool, thanks for the clarification
19:38 matthew-1arlette joined #salt
19:40 pcn I notice that the sun-java formula doesn't try to add alternatives for e.g. /usr/bin/java or any other location on ubuntu.  What's the expected way for a state to install java then install a package and run it if java isn't in $PATH?
19:41 notnotpeter joined #salt
19:42 scoates time for a dumb question: I've recently started using 2015.5 ; the output of salt-call is dramatically different (I have to scroll way up to see that there was an error). I'd like to see "N states failed" at the end. What am I doing wrong? (-:
19:42 scoates (`salt-call state.highstate` that is)
19:42 clintberry joined #salt
19:45 ggoZ joined #salt
19:45 ntropy scoates: not sure aobut the difference in output, but state_verbose and state_output configuration options might help to get what you want?
19:45 ntropy http://docs.saltstack.com/en/latest/ref/configuration/minion.html#state-verbose
19:45 ntropy applies both to minion and master config
19:46 scoates ntropy: that looks helpful. Thanks.
19:46 iggy yeah, we have that set to false on the master but true (Default) on the minions... generally if we get to the point of running salt-call on the minions, we are trying to debug anyway
19:56 murrdoc joined #salt
19:56 scoates I also set state_output to terse and passed --hard-crash. Thanks again. (-:
19:58 pcn Is there a canned way to get java into $PATH?
19:58 pcn I mean into the existing $PATH.  I'm seeing the cassandra startup scripts be very unhelpful in this case.
19:59 iggy pcn: nope, pretty much everybody does it their own way so far
19:59 monkey66 joined #salt
20:01 pcn Okey dokey
20:01 aqua^c joined #salt
20:02 baweaver joined #salt
20:02 snarfy joined #salt
20:04 desposo joined #salt
20:05 AbyssOne joined #salt
20:07 aparsons joined #salt
20:07 LtLefse pcn: if systemwide is okay, you could use the alternatives system
20:09 LtLefse (e.g. update-alternatives)
20:10 pcn Yeah, I'll probably do that for now, and see about dealing with upgrades later.
20:11 pcn (I mean the nitty-gritty - I know alternatives already helps with that)
20:11 druonysus joined #salt
20:12 aboe left #salt
20:18 linjan joined #salt
20:19 Matthews_ joined #salt
20:28 khris joined #salt
20:28 theologian joined #salt
20:28 otter768 joined #salt
20:31 desposo joined #salt
20:36 notnotpe_ joined #salt
20:40 spiette joined #salt
20:41 aparsons joined #salt
20:42 aparsons joined #salt
20:43 aparsons joined #salt
20:50 kaptk2 joined #salt
20:52 notnotpeter joined #salt
20:59 teryx510 joined #salt
20:59 beneggett joined #salt
21:00 cberndt joined #salt
21:00 paclat joined #salt
21:01 paclat i am trying to create a specialized version of one of the built in states
21:02 paclat in particular I would like file.recurse to simply say things are okay if there is a missing directory on the msaster
21:02 paclat I tired importing the salt.state.file and then delegating
21:03 paclat seems like the imported modulei is not getting loaded by the loader and is missing __salt__
21:03 paclat any suggestions?
21:05 c10 joined #salt
21:08 c10 joined #salt
21:10 drboyer joined #salt
21:13 aparsons joined #salt
21:14 murrdoc joined #salt
21:15 iggy you can't do that
21:16 catpiggest joined #salt
21:16 monkey66 joined #salt
21:16 cruatta joined #salt
21:17 writtenoff joined #salt
21:19 monkey66 left #salt
21:21 utahcon are the docs for 2014.1.10 still online anywhere? or shall I resort to sys.doc?
21:29 iggy read the docs still has them up afaik
21:31 giantlock joined #salt
21:32 moos3 joined #salt
21:36 subsignal joined #salt
21:38 keimlink joined #salt
21:39 baweaver joined #salt
21:41 ndrei joined #salt
21:42 jonlangemak joined #salt
21:45 tonocm joined #salt
21:46 tfield joined #salt
21:48 aparsons joined #salt
21:48 druonysus joined #salt
21:48 druonysus joined #salt
21:50 Guest89 joined #salt
21:50 aqua^c joined #salt
21:50 toastedpenguin joined #salt
21:56 c10 joined #salt
22:02 AbyssOne joined #salt
22:03 daryl256 joined #salt
22:13 icarus_ joined #salt
22:14 murrdoc joined #salt
22:16 Ryan_Lane In a custom state module I need to access the returns from previous states (really from a listener, so mod_watch). there's some dictionary for this that's accessible, right?
22:17 sporkd2 is there a way to translate salt '*' grains.get id into a state file so I can loop over minions that match the target?
22:17 monkey66 joined #salt
22:18 hal58th_3 sporkd2, the simple answer to that is no. The long answer is you need to use salt-mine
22:18 sporkd2 ok, i kinda figured
22:18 iggy Ryan_Lane: __context__ ?
22:19 Ryan_Lane iggy: __context__ has the results from state returns in a state run?
22:20 iggy no, but you can store info there that lasts over a state run
22:20 Ryan_Lane yeah, but I think there's some actual feature in the state system for this :)
22:21 icarus_ Hey guys - trying to get salt-master setup with netapi module on RHEL7, but its just not coming up. I have rest_cherrypy specified, not seeing any errors in trace/debug logs. Any idea what I could be missing?
22:21 Ryan_Lane iggy: oh, also, state modules don't have access to __context__
22:22 icarus_ salt-master 2015.5.2-6146-g5f417d5 (Lithium)
22:22 Ryan_Lane you have to call out to an execution module for that
22:22 iggy that seems odd (based on it's expected use as a store for state related data)
22:22 bhosmer joined #salt
22:23 Ryan_Lane running
22:23 Ryan_Lane I think that's what I'm looking for
22:23 Ryan_Lane of course, that may not be accessible from the mod_watch context
22:24 Ryan_Lane guess I should try accessing __running__
22:25 Ryan_Lane seems it may be passed in the kwargs
22:27 murrdoc i thought u can get __context__ by callig a function for it
22:27 murrdoc which i have forgotten what it was
22:29 otter768 joined #salt
22:32 Ryan_Lane :D
22:32 Ryan_Lane if running won't work for me, I'll resort to __context__
22:32 Singularo joined #salt
22:33 aparsons_ joined #salt
22:34 Ryan_Lane hm. seems I need context
22:35 murrdoc there is an util fucntion for it
22:35 Ryan_Lane what it is?
22:36 Ryan_Lane I only see context.func_globals_inject
22:36 Ryan_Lane which lets you set something, but get nothing
22:36 jonlangemak joined #salt
22:37 fllr joined #salt
22:37 druonysus joined #salt
22:38 iggy icarus_: did you start salt-api?
22:38 Ryan_Lane murrdoc: which function do you see? :)
22:38 murrdoc ah let me look
22:39 druonysus joined #salt
22:39 druonysus joined #salt
22:39 murrdoc salt.utils.get_contex ?
22:40 Ryan_Lane Returns debugging context around a line in a given string
22:40 murrdoc yeah
22:40 murrdoc not it
22:40 murrdoc starting in master.py
22:40 * murrdoc whips out shovel
22:41 icarus_ iggy - I think I misunderstood what was meant by "salt-api" is included with saltstack
22:41 icarus_ so it still needs to start seperately, eventhough netapi module directory is present?
22:42 joshin joined #salt
22:42 joshin joined #salt
22:43 Ryan_Lane sys.modules[__salt__['test.ping'].__module__].__context__.pop('pkg._avail', None)
22:43 icarus_ but it does work with salt-api now, so i will just use it that way. just curious about that one
22:43 Ryan_Lane I see something horrible like this in a state module
22:43 Ryan_Lane that is really, really terrible.
22:44 murrdoc it could be worse
22:44 Ryan_Lane seems you can get access to the context by loading an execution module
22:44 murrdoc no it couldnt
22:44 Ryan_Lane hahaha
22:44 Ryan_Lane yeah, that's pretty terrible.
22:44 murrdoc i think salt.loader should have a context get function
22:44 murrdoc that would make sense
22:45 iggy icarus_: correct, you don't need salt-api installed via pip any longer, but you still need the init script (which usually is in a separate distro package)
22:45 Ryan_Lane or __context__ should just be patched into state modules
22:45 druonysus joined #salt
22:45 icarus_ gotcha, thanks iggy!
22:45 ange iggy: apparently one of the lines causing trouble is : vm_['reactor'] = True
22:47 druonysus joined #salt
22:47 druonysus joined #salt
22:52 ange very odd
22:54 cruatta_ joined #salt
22:55 cruatta__ joined #salt
23:00 igorwidl left #salt
23:01 Aidin joined #salt
23:01 desposo joined #salt
23:01 druonysus joined #salt
23:02 Nazca joined #salt
23:05 hal58th_3 ange, if "vm_" is a variable, I think python might not like it ending with a _
23:05 hal58th_3 not sure
23:07 Nazca__ joined #salt
23:14 Nazca joined #salt
23:14 hal58th joined #salt
23:14 iggy should be fine, just can't start with a number
23:15 hal58th_ joined #salt
23:16 hal58th__ joined #salt
23:17 iggy (you will see the _() localization convention used in python from time to time)
23:19 keimlink_ joined #salt
23:20 Nazca__ joined #salt
23:21 slimmons joined #salt
23:22 slimmons Hey, if i'm using git.latest, and I have a ton of minions (and i'm cloning from gitlab), is there a any way to do this without adding an ssh key to every minion?
23:23 murrdoc yeah git clone on master
23:23 murrdoc and serve files from master
23:23 beneggett joined #salt
23:24 slimmons well when you say it like that, the question just seems silly
23:24 slimmons :)
23:24 slimmons thanks
23:25 mosen joined #salt
23:26 murrdoc its a good question
23:31 forrest joined #salt
23:32 slimmons would you have to have a script that cloned the repo to your server, then have that run salt.highstate, or will salt.states.git clone something to the salt master?
23:33 slimmons *state.highstate*
23:33 sgargan joined #salt
23:38 iggy have a git.latest state that was targeted at the minion running on the master, then the dir where that is checked out is in your file_roots somewhere
23:38 aqua^c joined #salt
23:39 druonysus joined #salt
23:40 cberndt joined #salt
23:40 murrdoc what he said
23:40 baweaver joined #salt
23:41 SheetiS joined #salt
23:41 theologian joined #salt
23:45 ajw0100 joined #salt
23:47 druonysus joined #salt
23:48 aparsons joined #salt
23:50 aqua^c joined #salt
23:50 Ryan_Lane sigh, the pkgrepo state module is so crappy
23:52 mosen :(
23:52 Ryan_Lane it's riddled with bugs :(
23:53 bfoxwell joined #salt
23:53 otter768 joined #salt
23:53 Ryan_Lane works fine if you're using a PPA, but horribly if you need to add a custom repo
23:53 mosen we can fix it.. the community
23:54 Ryan_Lane :D
23:54 iggy it's always worked fine for me
23:55 Ryan_Lane yeah. I should add issues, but it's going to be a bunch and I'm feeling a bit lazy at the moment
23:55 beneggett joined #salt
23:57 timoguin joined #salt
23:57 Ryan_Lane iggy: if you define the url in the name, then you change it, it just adds another entry into the file
23:58 Ryan_Lane you can't specify a gpg key except through a keyserver or url. can't install it via a salt:// url
23:58 Ryan_Lane if you specify a url that's not valid it just ignores it silently

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