Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-10-21

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

All times shown according to UTC.

Time Nick Message
00:03 fsteinel_ joined #salt
00:04 tobbez hekken: "Don't ask to ask, just ask" is usually a good idea on IRC. I.e, ask your question and see if anyone answers.
00:06 GabLeRoux joined #salt
00:11 mapu joined #salt
00:11 DanGarthwaite joined #salt
00:14 evle joined #salt
00:15 moloney Is there any way to use Jinja in my CLI commands?
00:16 moloney something like: salt '*' cmd.run 'echo {{ grains['host'] }}'
00:23 kinetic joined #salt
00:24 kitplummer joined #salt
00:27 iggy https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.template_str  maybe?
00:32 ageorgop joined #salt
00:33 moloney iggy: Thanks, not a user friendly as I hoped but I might be able to make it work
00:37 tedski joined #salt
00:37 otter768 joined #salt
00:41 whytewolf moloney: if you were still here, I would have added that this works for most modules. salt '*' cmd.run 'echo {{grains["os"]}}' template=jinja
00:42 kitplummer joined #salt
00:42 rubenb joined #salt
00:52 flou joined #salt
00:53 cyborg-one joined #salt
00:58 iggy never knew that
00:58 * iggy remembers for next time
01:00 Seth___ joined #salt
01:00 sunkist joined #salt
01:03 perfectsine_ joined #salt
01:04 knite joined #salt
01:06 PeterO joined #salt
01:12 clintberry joined #salt
01:14 gmoro joined #salt
01:15 kbyrne joined #salt
01:19 pratikmallya joined #salt
01:24 srpeters joined #salt
01:32 kinetic joined #salt
01:35 geomyidae_ joined #salt
01:51 timoguin joined #salt
01:54 rubenb joined #salt
02:02 knite joined #salt
02:17 RandyT Ryan_Lane: can you expand on this comment/thought? "we really just need to come up with a generic way of connecting minions in AWS, then it wouldn't be necessary to use salt-cloud at all"
02:17 RandyT Ryan_Lane: maybe in a blog post. :-)
02:18 Zachary_DuBois joined #salt
02:27 subsignal joined #salt
02:36 yidhra_ joined #salt
02:37 breakingmatter joined #salt
02:39 malinoff joined #salt
02:48 evle joined #salt
02:55 writtenoff joined #salt
03:00 rubenb joined #salt
03:00 kitplummer joined #salt
03:00 TyrfingMjolnir joined #salt
03:01 favadi joined #salt
03:01 ajw0100 joined #salt
03:22 trph joined #salt
03:24 zwi joined #salt
03:25 __number5__ hmm, so onlines docs for 2014.7.x is gone? :(
03:26 otter768 joined #salt
03:31 alemeno22 joined #salt
03:32 synical joined #salt
03:32 Laogeodritt joined #salt
03:42 Destreyf joined #salt
03:47 opensource_ninja joined #salt
04:03 zmalone joined #salt
04:03 ramteid joined #salt
04:04 Destreyf I'm looking at this https://github.com/saltstack/salt/issues/570 and i'm wondering about the mentions of reloading the nodegroups section so that it can be updated frequently without restarting the whole system.
04:04 saltstackbot [#570]title: master/minion should accept a SIGHUP and reload config |
04:06 TyrfingMjolnir joined #salt
04:15 kitplummer joined #salt
04:18 aparsons joined #salt
04:20 PeterO joined #salt
04:21 amit_k joined #salt
04:21 amit_k Can someone check my sls file am getting error
04:24 ageorgop joined #salt
04:42 knite joined #salt
04:51 Ryan_Lane RandyT: well, I don't do master/minion, so it probably won't be me writing that :)
04:52 Ryan_Lane mostly I mean a way to launch instances and just have the master trust them when they start
04:55 knite joined #salt
05:05 knite joined #salt
05:06 jalbretsen joined #salt
05:08 jalbretsen joined #salt
05:16 rdas joined #salt
05:20 larsfronius joined #salt
05:22 favadi joined #salt
05:23 jimklo joined #salt
05:29 chequers joined #salt
05:29 chequers hi, I want to install node package from a custom repo by running a command -- how could I write this in salt?
05:30 chequers command is something like `curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - && sudo apt-get install -y nodejs`
05:31 chequers I guess the obvious way is with cmd.run and unless -- but is there a better approach?
05:33 brent joined #salt
05:34 __number5__ chequers: check out pkgrepo state and pkg.installed on docs.saltstack.com
05:34 knite joined #salt
05:34 kitplummer joined #salt
05:35 brent joined #salt
05:37 chequers oh nice. someone has done the work with that too https://github.com/choonkending/salt-states/blob/master/node/source.sls
05:37 rmnuvg joined #salt
05:38 rofl____ joined #salt
05:40 brent joined #salt
05:41 opensource_ninja joined #salt
05:46 rdas_ joined #salt
05:48 aparsons_ joined #salt
05:56 kinetic joined #salt
06:16 lb joined #salt
06:24 stephanbuys joined #salt
06:30 impi joined #salt
06:31 flyx left #salt
06:32 iggy __number5__: I'm not sure it ever was on the new docs site, rtd might still have it
06:42 __number5__ iggy: rtd now rediredct to docs.saltstack.com, it's ok, I got a copy at my laptop, it just not convienient to share with others
06:43 iggy sucks
06:43 iggy the latest docs should be usable as long as you watch out for the version annotations
06:43 iggy (although they often get missed, but I try to file bugs every time I see them missing)
06:46 kitplummer joined #salt
06:47 chequers left #salt
06:57 linjan joined #salt
07:09 KermitTheFragger joined #salt
07:09 edulix joined #salt
07:14 felskrone joined #salt
07:18 CeBe joined #salt
07:29 eseyman joined #salt
07:37 rim-k joined #salt
07:37 rim-k joined #salt
07:37 rim-k morning
07:37 rim-k morning
07:38 rofl____ morning
07:38 ingwaem joined #salt
07:38 ingwaem left #salt
07:56 stephanbuys left #salt
07:56 chiui joined #salt
07:57 Rumbles joined #salt
08:00 dyasny joined #salt
08:08 thalleralexander joined #salt
08:10 brent joined #salt
08:13 MaZ- joined #salt
08:14 MadHatter42 joined #salt
08:16 chrismckinnel joined #salt
08:18 zanhsieh joined #salt
08:22 zanhsieh hi, how do i execute single one state within multiple states in tb / production environment? have tried state.sls, state.single with no luck.
08:23 kinetic joined #salt
08:33 GreatSnoopy joined #salt
08:35 s_kunk joined #salt
08:38 dankrs left #salt
08:39 MadHatter42 joined #salt
08:44 ingwaem joined #salt
08:45 rmnuvg joined #salt
08:46 babilen Is there a way to mark minions as temporarily down?
08:49 kitplummer joined #salt
08:50 larsfronius joined #salt
08:50 fredvd joined #salt
08:52 thoma joined #salt
08:54 larsfron_ joined #salt
08:54 thoma left #salt
08:56 dalibro_ whois /dalibro
08:58 ingwaem joined #salt
08:59 kinetic joined #salt
09:00 ingwaem joined #salt
09:01 losh joined #salt
09:01 ingwaem left #salt
09:06 ingwaem joined #salt
09:07 ingwaem left #salt
09:09 bosch joined #salt
09:10 bosch Hi. Does the Windows Minion installer provide a switch to install to an alternate directory?
09:15 ingwaem joined #salt
09:16 ingwaem` joined #salt
09:17 OliverUK1 joined #salt
09:17 ingwaem` left #salt
09:21 ingwaem` joined #salt
09:22 ingwaem` joined #salt
09:24 nkuttler babilen: hm, exclude them by id?
09:25 babilen nkuttler: No, I mean .. "this minion is offline. Yes, it is being repaired. No, you don't have to wait for it to return. Just assume that everything is fine"
09:25 nkuttler babilen: but the minion is really down?
09:25 rubenb joined #salt
09:25 babilen The option right now is to remove the minion's key (thereby "denying" it) or to wait for it to return, which is bad as the master has to wait for a timeout
09:25 babilen Yes, the minion is down.
09:26 babilen Which we are totally fine with
09:26 babilen Scheduled maintenance.
09:26 nkuttler hm, yeah, can't think of anything other than "not"
09:27 ingwaem joined #salt
09:27 ingwaem left #salt
09:33 kinetic joined #salt
09:38 markm joined #salt
09:41 stolenmoment joined #salt
09:42 larsfronius joined #salt
09:43 gasbakid__ joined #salt
09:48 N-Mi joined #salt
09:49 stevej joined #salt
09:51 gasbakid_ joined #salt
09:55 gasbakid__ joined #salt
09:58 mattiasr joined #salt
09:59 wordstoliveby joined #salt
10:02 giantlock joined #salt
10:09 kinetic joined #salt
10:11 brent joined #salt
10:16 av___ joined #salt
10:18 stevej joined #salt
10:19 markm_ joined #salt
10:20 markm_ joined #salt
10:27 goldbuick__ joined #salt
10:28 sfxandy joined #salt
10:28 sfxandy hi everyone
10:30 sfxandy got a minor issue using MongoDB as an external pillar provider.  for some reason, saltutil.refresh_pillar isn;t showing the changes made to the collection in MongoDB.  anyone got any ideas?
10:30 bluenemo joined #salt
10:31 sfxandy ok, ignore that.  schoolboy error!!
10:31 sfxandy for got to issue a "use pillar" in my Mongo shell before i made the changes.
10:33 fredvd joined #salt
10:43 kinetic joined #salt
10:45 sfxandy anybody else here use ext_pillar providers at all?
10:51 kitplummer joined #salt
10:57 rmnuvg joined #salt
10:58 sgargan joined #salt
10:59 Grokzen joined #salt
11:01 sk_0 joined #salt
11:08 catpig joined #salt
11:12 pguinardco joined #salt
11:18 kinetic joined #salt
11:21 OliverUK1 Hiya #salt :-)
11:23 kawa2014 joined #salt
11:28 giantlock joined #salt
11:30 bhosmer joined #salt
11:32 mortis_ what is service.get_all actually showing? what does it mean by "available"? that it exists and could be started? trying to find a salt function to list all running serices :) this one wasnt it hehe
11:34 Rumbles joined #salt
11:35 mortis_ hmmm modules.ps maybe
11:40 RandyT_ joined #salt
11:41 RandyT- joined #salt
11:43 RandyT| joined #salt
11:44 RandyT joined #salt
11:44 RandyT^ joined #salt
11:45 RandyT_ joined #salt
11:46 RandyT- joined #salt
11:47 RandyTa joined #salt
11:49 RandyT| joined #salt
11:50 RandyT joined #salt
11:51 RandyT_ joined #salt
11:52 RandyT- joined #salt
11:53 kinetic joined #salt
11:54 RandyT^ joined #salt
11:54 RandyTa joined #salt
11:55 RandyT joined #salt
11:55 breakingmatter joined #salt
11:55 RandyT| joined #salt
11:57 RandyT_ joined #salt
11:58 RandyT- joined #salt
11:58 RandyTb joined #salt
11:59 mortis_ status.procs :)
11:59 RandyT^ joined #salt
12:00 RandyT joined #salt
12:02 RandyT_ joined #salt
12:02 RandyT| joined #salt
12:02 zwi joined #salt
12:02 Ahlee joined #salt
12:03 mehakkahlon joined #salt
12:03 RandyT- joined #salt
12:04 gasbakid__ joined #salt
12:05 RandyT joined #salt
12:06 RandyT^ joined #salt
12:07 DammitJim joined #salt
12:08 RandyT_ joined #salt
12:08 RandyT- joined #salt
12:09 RandyT| joined #salt
12:10 RandyT joined #salt
12:11 RandyTa joined #salt
12:11 RandyT^ joined #salt
12:12 ferbla joined #salt
12:12 brent joined #salt
12:13 RandyT_ joined #salt
12:16 N-Mi joined #salt
12:16 RandyT joined #salt
12:18 RandyT_ joined #salt
12:19 RandyT- joined #salt
12:21 RandyT| joined #salt
12:22 RandyT joined #salt
12:22 malinoff joined #salt
12:23 RandyT^ joined #salt
12:24 RandyT_ joined #salt
12:24 RandyT- joined #salt
12:28 RandyT joined #salt
12:28 Barbarossa left #salt
12:29 RandyT_ joined #salt
12:29 kinetic joined #salt
12:29 Eureka703 joined #salt
12:30 amcorreia joined #salt
12:32 RandyT- joined #salt
12:33 RandyT joined #salt
12:34 RandyT_ joined #salt
12:35 RandyT| joined #salt
12:36 RandyT^ joined #salt
12:37 mfournier joined #salt
12:37 RandyTa joined #salt
12:40 RandyT joined #salt
12:41 mfournier joined #salt
12:42 RandyT_ joined #salt
12:43 RandyT- joined #salt
12:44 RandyT| joined #salt
12:45 evle1 joined #salt
12:47 jhauser joined #salt
12:47 RandyT joined #salt
12:48 furrowedbrow joined #salt
12:48 is_null hi all, any idea when the saltstack 2015-08 debian packages will be release ?
12:48 RandyT_ joined #salt
12:49 RandyT- joined #salt
12:50 RandyT| joined #salt
12:50 RandyT^ joined #salt
12:51 RandyTa joined #salt
12:51 RandyTb joined #salt
12:52 RandyT joined #salt
12:53 RandyTc joined #salt
12:54 RandyT_ joined #salt
12:54 kitplummer joined #salt
12:55 RandyT- joined #salt
12:57 JDiPierro joined #salt
12:57 RandyT joined #salt
12:58 RandyT_ joined #salt
12:58 anotherZero joined #salt
12:59 RandyT| joined #salt
12:59 zer0def uh, quick question: is there any descriptive documentation on what wheel modules are and how one should perceive them?
12:59 RandyT- joined #salt
13:00 RandyT^ joined #salt
13:00 subsignal joined #salt
13:01 RandyTa joined #salt
13:03 RandyT joined #salt
13:03 ericof_ joined #salt
13:04 RandyT_ joined #salt
13:04 kinetic joined #salt
13:04 zer0def i get the concept of runners and execution modules, especially in the context of the reactor system, but i'm like "wut?" on wheel modules
13:04 RandyT- joined #salt
13:05 toastedpenguin joined #salt
13:05 RandyT| joined #salt
13:06 RandyT^ joined #salt
13:07 RandyTa joined #salt
13:08 RandyT_ joined #salt
13:10 RandyT joined #salt
13:10 dyasny joined #salt
13:12 RandyT- joined #salt
13:12 toastedpenguin joined #salt
13:14 toastedpenguin joined #salt
13:14 RandyT_ joined #salt
13:15 flou joined #salt
13:16 bhosmer joined #salt
13:20 toastedpenguin joined #salt
13:22 pcn zer0def: Yeah, it's hard to figure out which things would be used for what purpose, and how they fit in my bigger picture.
13:24 chrischris joined #salt
13:26 numkem joined #salt
13:31 jdesilet joined #salt
13:32 edulix joined #salt
13:35 winsalt joined #salt
13:35 toastedpenguin has anyone been able to get salt to handle joining a windows server (2008 & 2012 R2) to a windows domain?
13:38 ubikite joined #salt
13:39 kinetic joined #salt
13:42 aqua^c joined #salt
13:45 eliasp is_null: see repo.saltstack.com
13:46 eliasp toastedpenguin: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_system.html#salt.modules.win_system.join_domain
13:47 toastedpenguin eliasp:  tried it as part of a salt-cloud deploy and the instances never join
13:47 toastedpenguin says it did but we arent seeing it
13:47 ggoZ joined #salt
13:48 eliasp toastedpenguin: run it directly on the minion using 'salt-call -l debug system.join_domain …' and check the debug log for possible issues
13:51 wordsToLiveBy joined #salt
13:55 mpanetta joined #salt
13:58 hasues joined #salt
13:58 hasues left #salt
13:59 zmalone joined #salt
14:00 ericof joined #salt
14:01 stevej joined #salt
14:02 evilrob joined #salt
14:02 kaptk2 joined #salt
14:04 thefish joined #salt
14:07 stephanbuys joined #salt
14:08 toastedpenguin eliasp: ok I ran it on the windows 2012 R2 host, and the debug switch, " The specified domain either does not exist or could not be contacted" however when I do it the "windows way" via Computer>Properties>System>Change settings it worked
14:09 toastedpenguin so the host can reach the DC and join to the domain
14:09 andrew_v joined #salt
14:09 mapu joined #salt
14:10 orion__ joined #salt
14:11 kitplummer joined #salt
14:12 babilen How would I call functions in salt/utils from within a pillar?
14:14 kinetic joined #salt
14:17 babilen (in particular salt.utils.dictupdate.update)
14:19 lumtnman joined #salt
14:19 pratikmallya joined #salt
14:20 pratikma_ joined #salt
14:30 stephanbuys left #salt
14:34 _JZ_ joined #salt
14:35 breakingmatter joined #salt
14:36 tourist joined #salt
14:37 Rkp joined #salt
14:37 brent joined #salt
14:39 Erik____ joined #salt
14:39 tourist hi all! ... I have some physical servers to manage, as well as a few Linode machines ... I'm thinking how I set up connectivity to Linode / tryingt to understand ... can I set up the master to automatically salt-ssh in to the Linode machines? would that be considered good practice?
14:39 Akhter joined #salt
14:39 Erik____ hi all i have a problem with win repo can someone help?
14:39 debian112 joined #salt
14:42 ksj pretty sure the answer's no, but is it possible to force the highstate options state_verbose and state_output on the command line?
14:44 bhosmer joined #salt
14:45 winsalt Erik____, I might be able to help with winrepo
14:45 zsoftich2 joined #salt
14:45 Erik____ thanks
14:46 impi joined #salt
14:46 Erik____ i am new and i set up the winrepo with 1 pkg all is ok from the salt-master but the salt-minion cant see the pkg (i run the salt -G 'os:windows' pkg.refresh_db)
14:46 subsigna_ joined #salt
14:46 dthom91 joined #salt
14:47 flou joined #salt
14:48 winsalt so when you run that. you just see the minion name return and nothing else?
14:48 Erik____ yes
14:49 winsalt do you have "winrepo_source_dir: salt://win/repo" in your minion config
14:49 kinetic joined #salt
14:49 clintberry joined #salt
14:49 winsalt or actually, what version of salt do you have
14:49 Erik____ there is defult no?
14:51 Akhter joined #salt
14:51 winsalt im just testing it on my side, when i comment out the winrepo dir then i dont see any packages refresh
14:52 Erik____ ok win_repo: '/srv/salt/win/repo' and win_repo_mastercachefile: '/srv/salt/win/repo/winrepo.p' are set and master restarted
14:53 Erik____ still the same issue
14:54 winsalt are you using 2015.8 or 2015.5, because they recently changed the parameter names
14:55 Akhter joined #salt
14:55 tobbez left #salt
14:56 tourist trying to understand: What happens if I have a public-facing Salt server at saltmaster.company.com and some minions in the field - and someone hacks our DNS provider and changes the record for saltmaster.company.com to a rogue server? will the minions refuse to obey the new master because of the keys on the master?
14:56 murrdoc joined #salt
14:57 Erik____ 2015.8
14:57 winsalt https://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#config-options-for-minions-2015-8-0-and-later
14:58 DammitJim why would a minion return None when I do a saltutil.refresh_pillar ?
14:59 winsalt try "winrepo_source_dir: salt://win/repo" "win_repo_cachefile: winrepo.p"
15:00 toastedpenguin gettting "The specified domain either does not exist or could not be contacted" when I use system.join_domain on a Win2012 R2 host however I can manually join the instance to the domain
15:00 oznah joined #salt
15:00 Brew joined #salt
15:00 Erik____ still the same :-)
15:00 Erik____ :-(
15:01 winsalt did you restart the salt-minion service?
15:01 orion___ joined #salt
15:01 BogdanR How can I specify multiple grains with tgt when I have tgt_type: grain ?
15:01 dave_den joined #salt
15:02 Erik____ yes
15:02 kitplummer joined #salt
15:02 BogdanR Can I do something like ( tgt: 'roles:haproxy,environment:prod' ) or should it look different?
15:03 penguin_dan joined #salt
15:03 winsalt what about the master config erik, does it have "winrepo_dir: /srv/salt/win/repo winrepo_cachefile: winrepo.p"
15:06 Erik____ so i need to set it on the minion? not on the master?
15:06 cpowell joined #salt
15:09 Heartsbane joined #salt
15:09 Heartsbane joined #salt
15:09 timoguin joined #salt
15:12 ageorgop joined #salt
15:13 sdm24 joined #salt
15:13 mapu joined #salt
15:13 zwi joined #salt
15:15 Erik____ still the same
15:17 dthom91 joined #salt
15:17 TheLoeki joined #salt
15:18 mpanetta joined #salt
15:20 Erik____ this is my master
15:20 Erik____ win_repo_mastercachefile: '/srv/salt/win/repo/winrepo.p'
15:20 Erik____ win_repo: '/srv/salt/win/repo'
15:20 SheetiS joined #salt
15:20 Erik____ this is my minion
15:20 Akhter joined #salt
15:20 Erik____ win_repo_cachefile: 'salt://win/repo/winrepo.p'
15:23 Rumbles joined #salt
15:23 kinetic joined #salt
15:27 tourist joined #salt
15:29 murrdoc this is my life
15:40 flyx joined #salt
15:41 kitplumm_ joined #salt
15:42 kinetic joined #salt
15:43 dthom91 joined #salt
15:43 thalleralexander joined #salt
15:46 bfrog joined #salt
15:47 boargod2 joined #salt
15:47 alemeno22 joined #salt
15:47 kinetic joined #salt
15:49 sjlu joined #salt
15:49 sjlu Is there a way I can obtain url parameters in my salt-api reactor? e.g. salt/netapi/hook/deploy/*
15:49 sjlu I cant seem to reference it in my deploy.sls file
15:50 sjlu Or don't know how actually
15:50 kinetic joined #salt
15:51 turisti joined #salt
15:53 big_area anyone signed up for the "predictive orchestration" webinar being asked for a password to join?
15:53 murrdoc takemymoney
15:54 larsfronius joined #salt
15:56 winsalt Erik____ i think win_repo should be winrepo_dir and winrepo_cachefile should just be winrepo.p
15:58 aparsons joined #salt
15:59 RedundancyD joined #salt
15:59 Erik____ let me check
16:00 jimklo joined #salt
16:02 edulix joined #salt
16:03 Erik____ no still the same
16:03 Erik____ when i run salt-run winrepo.genrepo i see
16:03 Erik____ name_map:     ----------     Java 8 Update 60:         jre repo:     ----------     jre:         ----------         8.0.600:             ----------             full_name:                 Java 8 Update 60             install_flags:                 /s INSTALLDIR=c:\java\jre             installer:                 salt://win/repo/jre8_x86/jre-8u51-windows-x64.exe             locale:                 en_US             reboot:
16:03 aphor joined #salt
16:04 Erik____ on the minion the setup is win_repo_cachefile: 'winrepo.p'
16:06 Akhter joined #salt
16:10 sdm24 What version of salt are you using, Erik___?
16:12 devopslibrary joined #salt
16:14 ajw0100 joined #salt
16:15 Erik____ let me check to be sure i know its 2015 8
16:15 Erik____ this is the master
16:15 sfxandy joined #salt
16:16 Erik____ master salt 2015.8.0 (Beryllium)
16:17 sdm24 I joined in the middle of this problem, but 2015.8 changed the names of the options for the winrepo
16:17 Erik____ minion salt-minion 2015.8.1 (Beryllium)
16:17 sdm24 I don't know if you already tried that
16:18 Erik____ this is the settings on the master winrepo_cachefile: 'winrepo.p' winrepo_dir: '/srv/salt/win/repo'
16:18 Erik____ this is the minion win_repo_cachefile: 'winrepo.p'
16:18 devopslibrary left #salt
16:19 devopslibrary_ joined #salt
16:20 devopslibrary_ Hi!  Sorry to bother everyone!  We've made a few videos on Salt and just started a kickstarter for producing a full course on it.  Is here a good place to post that?  (If not I won't, definitely not trying to spam!)
16:23 sdm24 Erik___: have you run "salt -G 'os:Windows' pkg.refreshdb"?
16:23 sdm24 refresh_db, excuse me
16:24 moogyver devopslibrary_: the mailing list may be a better place.
16:25 dthom91 joined #salt
16:25 devopslibrary_ ty @moogyver!  Is that the one on google groups? (https://groups.google.com/forum/#!forum/salt-users)
16:25 moogyver devopslibrary_: yup
16:26 devopslibrary_ perfect, will do, ty :)
16:27 aparsons_ joined #salt
16:28 OliverUK1 left #salt
16:29 shadowbeast joined #salt
16:30 pratikmallya joined #salt
16:31 GreatSnoopy joined #salt
16:36 aron_kexp joined #salt
16:36 jmreicha joined #salt
16:37 jmreicha joined #salt
16:37 CheKoLyN joined #salt
16:37 murrdoc does salt have a way to say
16:38 murrdoc KILL ALL JOBS THAT ARE OLDER THAN A DAY
16:39 murrdoc sorry caps is not yelling, more frustation
16:40 iggy nein
16:45 sarlalian joined #salt
16:45 cberndt joined #salt
16:45 rodr1c joined #salt
16:45 rodr1c joined #salt
16:45 bhosmer joined #salt
16:49 mpanetta joined #salt
16:50 Erik____ Yes i did
16:52 knite joined #salt
16:55 larsfronius joined #salt
16:57 flou joined #salt
17:00 moogyver hm.  is there a way to do some type of polling job that will repeat itself for X times every Y seconds until Z max?  ( idea being that you fire off a job that is polling and waiting for a server/service to come online )
17:01 moogyver For next 10 minutes, keep attempting some task until success, and try it every 30 seconds.
17:02 moogyver A beacon would work for a service, but not sure how to accomplish it externally from the system ( for something like a reboot )
17:04 lumtnman joined #salt
17:04 aron_kexp joined #salt
17:05 dthom91 joined #salt
17:05 shiriru joined #salt
17:07 XqueZme joined #salt
17:09 XqueZme Hi all, I'm trying to find the best pracitce for environment specific deployments using salt 2015.8. I read documentation online, but none seem to work - always get into pillar compile errors. Anyone has some good read or pointers?
17:09 pratikmallya joined #salt
17:10 pratikma_ joined #salt
17:20 Fiber^ joined #salt
17:20 mohae joined #salt
17:23 murrdoc iggy:  quickest way to accept 'denied' keys
17:24 flou joined #salt
17:26 rickflare joined #salt
17:26 iggy mv
17:27 iggy moogyver: a runner that blocks until it's done?
17:27 TOoSmOotH joined #salt
17:27 moogyver yeah, was thinking that or an EM module
17:28 WildPikachu_ joined #salt
17:28 gasbakid joined #salt
17:28 lumtnman joined #salt
17:29 iggy if it was going to be a part of your infra that ran a lot, you could use a beacon and just have a short-circuit var that effectively disabled it
17:29 NachoDuck joined #salt
17:29 moogyver so that I could write it generically ( salt 'host' poll.cmd 'some command' <max tries> <sleep between tries> )
17:30 moogyver naw, it's more for checking when a host comes online
17:30 moogyver for our provisioning automation
17:30 moogyver but could see it used for other purposes
17:30 llua joined #salt
17:30 llua joined #salt
17:30 bbhoss joined #salt
17:31 JDiPierro joined #salt
17:31 JonGretar joined #salt
17:32 gasbakid joined #salt
17:32 Jahkeup joined #salt
17:33 ablemann joined #salt
17:34 Brew joined #salt
17:35 otter768 joined #salt
17:37 tkharju joined #salt
17:37 kaictl joined #salt
17:37 alemeno22 joined #salt
17:40 Rumbles joined #salt
17:41 timoguin joined #salt
17:46 sirtaj joined #salt
17:46 cyborg-one joined #salt
17:47 timoguin_ joined #salt
17:48 APLU joined #salt
17:48 babilen Is there a way to mark a minion as being temporarily away so that salt won't wait for its reply and assumes that everything is fine? (scheduled maintenance)
17:49 robawt babilen: is there an issue with stopping the minion on the host?
17:49 moogyver babilen: not that i know of, no
17:50 babilen robawt: The box has been shut down
17:50 moogyver babilen: besides the obvious of targeting on systems that don't have a pillar of 'maintenance: yes'
17:50 moogyver or something like that
17:50 babilen sure, but that won't help with '*'
17:51 moogyver yeah
17:51 sfxandy joined #salt
17:51 babilen I just want to say "salt-key --maint foo" (or so)
17:51 moogyver could move the key out of /etc/salt/pki/master/minions
17:51 babilen Might suggest it, couldn't find it either and it feels like a nice feature to have
17:51 aphor babilen: just salt-key -d foo
17:51 iggy should be doable (salt-key moves the key out of accepted, sets a schedule to move it back later
17:51 babilen Yeah, it's not complicated
17:51 aphor babilen: keep a list of 'foo' minions, and when they are out of maintenance, salt-key -a foo
17:52 babilen I'll give it some thought and suggest something along those lines
17:52 ctolsen joined #salt
17:52 babilen yay #salt, thanks :)
17:52 kitplummer joined #salt
17:53 aphor babilen: if you install a minion on the salt master, and you use Reactor events, you can put stuff in maintenance and take it out based on events.
17:54 aphor babilen: then you can put maintenance lists in pillars named for change records, etc.
17:54 flou joined #salt
17:55 babilen "named for change records" ?
17:56 babilen It isn't entirely clear to me what you mean by that?
17:56 babilen err
17:56 Rumbles joined #salt
17:56 babilen s/?/!/
17:56 aphor babilen: name a pillar "refinagle_2015_11_11" and make it a list of minions.
17:57 rhand_ joined #salt
17:58 babilen Hmm, that reminds me ... I'd like a nice, atd like, way of ad-hoc scheduling tasks in salt
17:58 babilen (that will then go away)
17:58 aphor babilen: then you can send events with a meaningful name referring to the maintenance change record
17:58 babilen yeah, that's a sensible idea
17:59 aphor babilen: and the reactor will know "oyeah, these keys need to be deleted/added" as it gets start/end events
18:00 Bryson joined #salt
18:00 aphor babilen: then you can manage multiple concurrent maintenance lists for separate maintenance efforts starting and ending independently.
18:00 ferbla_ joined #salt
18:01 aphor babilen: this process should be deprecated though, and all the manual maintenance should be effected through states.
18:02 GreatSnoopy joined #salt
18:03 Ahlee is there a way to pass a timeout to a runner? looks like even embedding it into kwarg fails to get passed through
18:03 moogyver Ahlee: salt-run has a -T option
18:03 moogyver to timeout
18:03 babilen aphor: Write me a salt-state to change a mainboard and I'm all ears
18:03 dthom91 joined #salt
18:03 moogyver babilen: lol
18:04 moogyver that'd be something to see at saltconf :D
18:04 babilen I mean I could use some proxy minions for my datacentre crew ;)
18:04 Ahlee moogyver: right, but not the Runner class, so you can't pass a timeout through the salt-api or via instantiating a runner object on the master
18:05 Ahlee looks like if kwarg isn't formatted as a dict it throws the values away and then sets it back to {}
18:05 Ahlee so i'll muck with my encoding to see if i can get this to come through as {'timeout:30'}
18:06 moogyver Ahlee: hm, the cmd_sync func has a timeout keyword, but I'm not sure how it gets called from 'cmd'
18:06 moogyver would have to look at the code
18:07 zsoftich2 how do you get teh salt orchestrate runner to halt on a failed state?
18:07 moogyver zsoftich2: use a 'require'
18:08 DammitJim how crazy of an idea is this?
18:08 moogyver step2 would require that step1 runs
18:08 pratikmallya left #salt
18:08 Ahlee guess I get to shell out to salt-run and take that output as the input to this
18:08 Ahlee lovely
18:09 zsoftich2 oh thanks...was reading that as ordering
18:09 DammitJim I want to have salt deploy a file to a server whenever I see that file been updated on the source directory
18:09 moogyver Ahlee: does calling cmd_sync on the runner client obj not work for you?
18:09 moogyver Or are you doing this thru salt-api
18:10 Ahlee salt-api was desired end point, but i'll take what I can get at this point
18:10 Ahlee when did cmd go away in favor of cmd_sync vs cmd_async =\
18:11 moogyver Ahlee: cmd is still there
18:11 winsalt joined #salt
18:12 Ahlee https://github.com/saltstack/salt/blob/develop/salt/runner.py is what you instantiate, right?
18:12 moogyver yea
18:12 baweaver joined #salt
18:12 Ahlee ah, it must come in via mixins from salt.client
18:13 moogyver yeah
18:13 moogyver https://github.com/saltstack/salt/blob/develop/salt/client/mixins.py#L103
18:13 moogyver that's what it's using
18:13 moogyver specifically, it's doing this: ret = event.get_event(tag=ret_tag, full=True, wait=timeout)
18:14 moogyver DammitJim: use a beacon?
18:15 DammitJim a beacon?
18:16 moogyver beacons are things a minion can use to monitor things for event changes
18:16 babilen yes, the inotify beacon
18:16 Ahlee meh. i get a larger list than i expect since the runner isn't giving the remote minions long enough to return, so I'll just iterate over that list and run a test.ping and use that secondary output as my list
18:16 moogyver and salt already has what babilen just said - an inotify beacon
18:17 kevinforbes joined #salt
18:17 babilen beacons are not nearly used to their full potential right now
18:17 moogyver inotify monitors for filesystem changes, so the beacon uses that to monitor for fs changes
18:17 moogyver and then sends events
18:17 Ahlee do beacons run as seperate processes, or are they embedded into the minion's thread?
18:18 moogyver which you would then use reactor to fire off a state
18:18 Ahlee and same for engines
18:18 moogyver engines are a separate process on the master
18:18 kevinforbes Hey all, need help. salt_cloud is failing to bootstrap my new instances: http://pastebin.com/GV4xvqy9
18:18 moogyver not sure about beacons
18:18 kevinforbes It started last night
18:18 kevinforbes E: There are problems and -y was used without --force-yes
18:18 moogyver i believe they are in the minion thread
18:18 Ahlee i'll add investigating those to my bakclog
18:19 bhosmer_ joined #salt
18:19 jeffpatton1971 joined #salt
18:21 baweaver joined #salt
18:21 iggy one of the beacons uses inotify
18:21 iggy there's also one that lamely reads a file every (period of time)
18:21 aron_kexp joined #salt
18:22 iggy so I imagine they are in their own thread
18:22 murrdoc joined #salt
18:23 knite joined #salt
18:25 kevinforbes It’s happening during pip install: WARNING: The following packages cannot be authenticated!
18:25 kevinforbes libpgm-5.1-0 libzmq3 python-m2crypto dctrl-tools debconf-utils python-crypto
18:25 kevinforbes python-dateutil python-mako python-msgpack python-zmq
18:25 Ahlee own thread, but do I need to ensure they're always running via supervisord or similar as well?
18:25 kevinforbes Anyone know what cannot be authenticated means?
18:26 Ahlee kevinforbes: sounds like a key used in signing packages is invalid
18:27 flou joined #salt
18:27 bhosmer_ joined #salt
18:28 moogyver Ahlee: uses tornado.ioloop.PeriodicCallback to handle the beacons
18:28 kevinforbes Maybe I’ve got an out-of-date version of salt running on my master. How do I upgrade?
18:28 felskrone joined #salt
18:30 babilen Ahlee: The bootstrap script might not properly handle repo.saltstack.com yet too ... lets see
18:30 * babilen reluctantly opens the pastebin.com link
18:31 dthom91 joined #salt
18:32 zmalone Ahlee|babilen: When I checked earlier this week, the salt-bootstrap script hadn't been updated in months, so it will be out of date with regards to the new repos.
18:32 zmalone There was a commit this week, but it was just a copyright update and whitespace changes.
18:34 KyleG joined #salt
18:34 KyleG joined #salt
18:35 jeffpatton1971 I'd like salt to build out my Nagios host config files, I'm thinking the best way may be a managed file on the Nagios server itself which means this formula would run on the Nagios minion. Can a minion go and get a list of all other minions to populate this file? list salt * test.ping ? then foreach server returned grab the handful of grains needed to populate this file? or would I need to define all the servers in
18:36 hasues joined #salt
18:36 hasues left #salt
18:36 babilen zmalone: Yeah, https://github.com/saltstack/salt-bootstrap/issues/672 underlines that
18:36 saltstackbot [#672]title: Migrate to new Ubuntu repo to allow installation of 2015.8 | The old ppa doesn't have it.
18:37 Sketch jeffpatton1971: i was looking at doing something similar, and couldn't really find a good way to do it.  unless you want to manually create the list, i think you'd have to use a reactor to add minions to the list automatically
18:37 zmalone That bootstrap script is pretty terrifying though.
18:37 Rumbles joined #salt
18:37 zmalone "Why are you adding these random PPAs?  Where is the real PPA coming from?  I don't even know!"
18:38 zsoftich2 jeffpatton1971: you can use salt['mine.get'] to return a list of minions and aggregate grains
18:38 jeffpatton1971 @zsoftich2 you can run that from a minion?
18:38 babilen Yeah, the mine is the way to go there
18:39 Ahlee moogyver: nice, thanks
18:39 mpanetta joined #salt
18:39 babilen jeffpatton1971: Yeah, look into https://docs.saltstack.com/en/latest/topics/mine/ -- you could incorporate the salt['mine.get'](...) call into a template for the host.cfg and fill it automagically with all hosts for which you find information in the mine
18:40 babilen jeffpatton1971: https://github.com/saltstack-formulas/hostsfile-formula/blob/master/hostsfile/init.sls does something comparable for /etc/hosts
18:40 geomyidae_ joined #salt
18:41 zsoftich2 jeffpatton1971: one thing with the salt mine...make sure you restart salt-minion after setting the mine_function in your pillar
18:41 RedundancyD joined #salt
18:42 jeffpatton1971 so you'd set that as a managed file /etc/hosts and in the jinja for that put that code? or...it appears his is in the init.sls
18:42 Sketch hmm, guess it's time for me to revisit this ;)
18:42 babilen jeffpatton1971: You could do something similar in a managed file which would, presumably, be a more appropriate solution for your usecase
18:43 babilen Sketch: :-þ
18:43 Sketch babilen: i asked in here when i was just starting out with salt and told reactors were pretty much the only way to do it
18:43 babilen It gets really crazy when you start rolling out automagic nagios checks for service states that you deploy (e.g. "when you configure MySQL on box A ensure that suitable nagios checks are configured")
18:45 Sketch babilen: in my case, that's the easy part.  i'm using check_mk, so extra checks are configured as plugins on the host side.
18:45 babilen check_mk ++
18:45 jhauser joined #salt
18:45 Akhter joined #salt
18:46 babilen Much preferred over nagios .. Should still play more with shinken too
18:46 racooper joined #salt
18:49 Eugene joined #salt
18:52 cberndt joined #salt
18:52 erchn joined #salt
18:53 erchn hi all, anyone know in orchestration what the ID is for a salt.function requisite?
18:54 murrdoc joined #salt
18:54 erchn for instance, I have "cmd.run:\n  salt.function:\n    - arg: echo hi".  a later state definition should "require" that echo to work, but I don't know the name to specify.
18:55 moogyver salt.<name of the step>
18:55 bhosmer_ joined #salt
18:55 erchn so in the above case, "salt.function"?
18:55 moogyver erchn: https://gist.github.com/sjmh/4328c50a0b3810be039d
18:56 moogyver i do something like that
18:56 moogyver if you don't use the name attribute, it assumes the function is the step name
18:56 erchn ahh, I should name it and use a -name: to specify cmd.run
18:57 erchn moogyver: thanks, will try that
18:57 whytewolf technically currently the ID is currently cmd.run
18:57 jeffpatton1971 @zsoftich2 Ok, so I was under the assumption that the mine was already setup...that is something I'll need to configure then?'
18:57 erchn whytewolf, I agree, just doesn't scale well :-)
18:57 moogyver yeah, but if you do more than 1 cmd.run, you run into issues
18:57 erchn ^^ that
18:57 erchn thanks y'all
18:57 moogyver so just use the 'name' attribute to specify the actual function rather than using it from the step name
18:58 whytewolf jeffpatton1971: yes mine needs some configuration cause just being "setup" would be a huge security risk. since any minion could mine any other minion for information
18:58 erchn it makes sense, I just didn't see "name" as a valid option in any of the docs, I should have assumed
18:58 flou joined #salt
18:59 jeffpatton1971 @whytewolf makes sense, so whatever I want exposed I would define in a mine function that would be pushed out through pillars? correct? and that mine function just lives in a state file, nothing overtly special?
19:01 jeffpatton1971 I'm looking here (https://docs.saltstack.com/en/2015.5/ref/modules/all/salt.modules.mine.html) and they have several examples using network.interfaces, that would have been setup in advance?
19:03 whytewolf jeffpatton1971: https://gist.github.com/whytewolf/eff4a15f0eaa8d5354a3 that might help a little bit
19:03 whytewolf basicly mine_function can be any salt exacution module
19:04 * babilen has a mine function for each of the private network ranges and then one per allocated subnet thereof
19:05 ajw0100 joined #salt
19:05 aron_kexp joined #salt
19:07 TyrfingMjolnir joined #salt
19:09 subsignal 78 finger guitar the fuck
19:11 XqueZme is salt-ssh '*' state.highstate test supposed to modify or just dry-run?
19:11 aphor https://www.youtube.com/watch?v=xFiysMYGD_k <-- like a 78 finger guitar
19:11 baweaver joined #salt
19:11 jeffpatton1971 thanks i'm going to have read more
19:12 aphor salt-cloud is making me so angry :(
19:13 babilen XqueZme: test=True
19:17 toastedpenguin looking into using s3fs as a file server, does salt just pull files from s3 or can files be created on the master and push/pull from s3?
19:19 forrest joined #salt
19:22 TOoSmOotH joined #salt
19:25 DammitJim it normal to get an: Minion did not return. [No response] message when updating salt-minion?
19:25 DammitJim is it*
19:27 aphor DammitJim: if you're waiting for a lot of slow states you may get a timeout.
19:28 aphor DammitJim: do you have a lot of minions crushing your salt master?
19:28 opensource_ninja joined #salt
19:28 DammitJim aphor, I wouldn't say crushing
19:28 DammitJim how do I know that?
19:30 cberndt joined #salt
19:32 kitplumm_ joined #salt
19:33 boargod joined #salt
19:34 baweaver joined #salt
19:34 felskrone joined #salt
19:37 RandyT_ greetings shakers
19:37 RandyT_ question of the day:...
19:37 sfxandy joined #salt
19:38 RandyT_ I am attempting to deploy into ec2 using script_args: tag to deploy from the latest release tag, v2015.8.1
19:38 RandyT_ The process is failing at the end of the deploy with the following: https://gist.github.com/rterbush/a8f0caccc4b9ab1f6d0f
19:38 RandyT_ on the minion, if I attempt to start the minion by hand, it complains that the master is refusing to accept the minion key.
19:39 RandyT_ if I delete the key as instructed from the master, salt-minion starts up fine and appears to work as expected.
19:39 RandyT_ so it seems that somewhere in the process, a key is getting created that blocks the startup of the new minion.
19:40 RandyT_ if I use salt-cloud -d to destroy the working minion, it cleans up the key as expected so I know the key does not exist before kicking off a new deploy.
19:41 aron_kexp joined #salt
19:41 RandyT_ this worked yesterday when deploying using the distro repo for the minion code, but is producing other issues because the distro repos are deploying older minion code that is not playing nicely with 2015.8
19:44 iggy DammitJim: you mean when updating the actual minion package/software (i.e. restarting the minion service)? Yes, that's normal.
19:44 drawsmcgraw toastedpenguin: Last time I used it, it's strictly a file server backend. So Salt just pulls files down from S3.
19:44 kitplummer joined #salt
19:44 iggy DammitJim: there's a note in the docs about a workaround
19:44 dthom91 joined #salt
19:50 RandyT_ Additional detail on the issue I am having, the process of starting the deploy of the minion creates a new minion key. So apparently by the time the minion starts, there is some problem with the key presented by the minon vs the key the master created
19:50 sfxandy hi everybody
19:51 FreeSpencer Do the Ubuntu repos not actually contain the latest updates?
19:51 babilen which repos exactly?
19:51 devopslibrary_ hi @sfxandy
19:52 FreeSpencer deb http://ppa.launchpad.net/saltstack/salt/ubuntu trusty main
19:52 FreeSpencer 2015.5.3 is the latest I get
19:52 zmalone FreeSpencer: repos.saltstack.com
19:52 zmalone sorry, repo
19:52 zmalone https://repo.saltstack.com/apt/ubuntu/ubuntu14/
19:52 babilen FreeSpencer: https://docs.saltstack.com/en/latest/topics/installation/ubuntu.html
19:53 FreeSpencer Interesting thanks guys, I used the bootstrap script
19:53 zmalone that's also out of date
19:53 FreeSpencer Guess I wont be using that anymore :p
19:54 iggy it should be fixed shortly
19:54 DammitJim thanks iggy
19:55 babilen Are the repos actually usable without any problems yet? I'm still a bit hesitant
19:56 zmalone I think it's now been almost a week since I last had a problem with them.
19:56 zmalone Which isn't much of an endorsement
19:57 babilen hehe
19:57 babilen I guess I'll give another month ... not in any rush
19:58 babilen I also want to see the code they use for building the packages before I trust them
19:58 aparsons joined #salt
19:58 SheetiS joined #salt
19:59 zmalone I think basepi said that the PPA packages came from a non-salt person, so I think you are probably gambling either way
20:00 sfxandy hi devopslibrary_
20:00 babilen zmalone: Yeah, but the person who made those packages is a skilled maintainer
20:01 babilen (much like all those people who package 99% of the rest of the software you install on your boxes)
20:02 RandyT_ so after a bit more testing, I am finding that the deploy that is failing is actually creating an accepted key and denied key of the same name.
20:03 RandyT_ iggy: saw you mentioned some breakage in bootstrap. is this by chance related?
20:03 bhosmer joined #salt
20:03 winsalt has anyone had a windows package return "'_comment': 'Registry not updated.'" without any other errors in the logs.  It says the state failed, but it looks like it installs fine.
20:06 felskrone joined #salt
20:06 dthom91 joined #salt
20:22 darthzen joined #salt
20:28 giantlock joined #salt
20:30 Bryson joined #salt
20:31 baweaver joined #salt
20:33 Rumbles joined #salt
20:34 Slimmons joined #salt
20:35 Slimmons if I have a cmd.run in a state, that's something that doesn't really end, such as tail -f......is there a way to make the state return?
20:35 Slimmons like, would tail -f test.txt & help?
20:36 amcorreia joined #salt
20:37 Slimmons The reason i need that is because I want to automate the piping of tail -f into another file
20:37 Slimmons for example    tail -f /var/log/apache2/access.log | ssh 192.168.1.1 'cat >> '/home/user/test.txt'
20:38 Slimmons that never returns
20:38 Mate start a service with that
20:38 Mate (you will have to write a systemd/upstart/initrc config file)
20:39 Sketch never tried it with salt, but you might try ( tail -f /var/log/apache2/access.log | ssh 192.168.1.1 'cat >> '/home/user/test.txt' ) &
20:39 Slimmons thanks, I'll look into both of those.  I guess it may be easier just to have a bash script do it all, and have salt just call the script
20:39 Sketch but i'm not sure why you'd want to start something that never ends from salt.  creating a service sounds like a much better idea if you have something that should run all the time.
20:39 Slimmons thanks
20:42 thefish joined #salt
20:42 fredvd joined #salt
20:44 jhauser joined #salt
20:48 kinetic joined #salt
20:48 otter768 joined #salt
20:53 cornfeedhobo does anyone else like pycharm and want to use if for editing salt files?
20:53 jmreicha_ joined #salt
20:54 babilen no
20:54 babilen You are the only one
20:54 cornfeedhobo heh, i ask because i was told to make a "wish list" request for it, since they declined the one made a few years ago
20:55 fgimian joined #salt
21:02 mapu joined #salt
21:05 kitplumm_ joined #salt
21:07 kitplum__ joined #salt
21:09 s_kunk joined #salt
21:13 kitplummer joined #salt
21:15 cornfeedhobo well, for those of you that also prefer pycharm https://youtrack.jetbrains.com/issue/PY-17334
21:19 alexhayes Is there a programmatic way to namespace all ID's within a state? As in, a top level declaration that goes in a state file that essentially prefixes all states
21:20 nidr0x joined #salt
21:21 kitplummer joined #salt
21:23 kitplumm_ joined #salt
21:23 kinetic joined #salt
21:24 knite joined #salt
21:24 winsalt you can have {{ pillar }}_name  in state files i believe
21:26 zmalone joined #salt
21:29 nidr0x joined #salt
21:31 mohae joined #salt
21:32 bhosmer_ joined #salt
21:39 zsoftich2 joined #salt
21:42 timoguin joined #salt
21:43 bhosmer_ joined #salt
21:45 zmalone joined #salt
21:45 [vaelen] joined #salt
21:45 XqueZme joined #salt
21:45 XqueZme babilen: Thanks, test=True works.
22:00 jalbretsen joined #salt
22:01 zmalone joined #salt
22:03 kinetic joined #salt
22:03 baweaver joined #salt
22:03 Corey What's the best way to call eth0's ip address via grains? I'm trying to pull ip4_interfaces, specifically eth0, but my syntaxes keep breaking.
22:05 Corey grains['ip4_interfaces']['eth0'] isn't it. :-)
22:06 babilen Corey: You do not care about the address on eth0, but about the address within a specific network. You can use https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#salt.modules.network.ip_addrs to obtain it
22:07 babilen (because, after all, what relevance does eth0 have?)
22:07 babilen Just give it the cidr range of the respective network and you should have a much more robust setup
22:07 Corey babilen: Ah, useful!
22:07 Corey babilen: What's the embedded-in-jinja syntax of that?
22:08 babilen salt['network.ip_addrs'](cidr='10.0.0.0/8') for example
22:09 babilen Not entirely sure what it returns, but that shouldn't be too hard to figure out
22:10 babilen https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#calling-salt-functions details how to call functions in execution modules from within jinja
22:11 Rumbles joined #salt
22:13 bodgix joined #salt
22:14 Corey babilen: Close. Now renders as ['10.11.143.46']
22:14 iggy RandyT_: I haven't used salt-bootstrap in months, so I don't know of any current breakage
22:16 babilen Corey: So, [0] at the end
22:19 aidalgol` joined #salt
22:21 aidalgol` joined #salt
22:23 babilen Corey: Does that do what you want it to?
22:25 szhem joined #salt
22:27 boargod joined #salt
22:27 subsignal joined #salt
22:27 ronrib joined #salt
22:31 kitplummer joined #salt
22:33 baweaver joined #salt
22:41 ahammond does salt jinja have an ipaddr filter like ansible's? http://docs.ansible.com/ansible/playbooks_filters_ipaddr.html I'm asking because I have some networks in the format of gateway / netmask and want to add the to ipsets, which require network/netmask.
22:44 babilen https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#salt.modules.network.ip_addrs
22:44 babilen combine with salt mine for extra sexy
22:45 babilen ah, no .. that's not the same thing
22:46 ahammond I have a pillar which has the data in a fugly format. Hmm. Maybe that's the solution: fix the pillar.
22:47 babilen That sounds like a decent approach ;)
22:48 amcorreia joined #salt
22:49 ahammond babilen, looked into the code that generates that pillar and: TODO I am sorry - this is very ugly and needs to be refactored but I do not have time :(
22:49 babilen hahaha
22:50 babilen Priceless :D
22:50 ldelossa joined #salt
22:50 ldelossa Hey guys, I'm doing a pilot of salt stack and so far it's awesome
22:50 ahammond ldelossa glad you like it.
22:51 murrdoc joined #salt
22:51 ldelossa I do have a question though, I basically right now have a state file in /srv/salt/core/ which installs all my default packages, along with compiling python3.4
22:51 ldelossa I place that in my top.sls file for any grains which match kernel linux
22:52 ldelossa now, that's going to run everytime I perform high state which I'm assuming I perform on a cron schedule to keep everything in sync
22:52 ldelossa are there ways to say "this is a base state file, only to be applied to a minion once, if high state is ran and minion has had this ran, don't run again"
22:52 babilen You can use the salt scheduler for that, but pray continue (doesn't make a difference here)
22:52 ldelossa I know I can do use unless statements
22:52 ldelossa in the stanzas
22:52 ldelossa but is there a way to not run that state at all?
22:53 ahammond ldelossa the goal of states is to be idempotent
22:53 ldelossa I feel like using the unless still is going to use my node's cpu
22:53 ahammond ldelossa the idea is that you would design your state to do the heavy lifting once, and then detect it's already done the next time.
22:53 babilen ldelossa: No, there is no such thing. A state has either been achieved or not. Salt uses tests and requisites to determine if a state has been achieved yet, but it isn't straightforward to differentiate between the two cases you want to differentiate
22:53 murrdoc1 joined #salt
22:54 ldelossa Okay so basically stick with using unless
22:54 babilen exactly
22:54 ldelossa in my base state file, just check if the python3.4 folder exists
22:54 ldelossa if it does
22:54 ldelossa so be it
22:54 ldelossa and move on
22:54 babilen Or more semantically meaningful tests
22:54 ahammond ldelossa yup. if you're installing a lot of packages, you'll also want to check out state_aggregate
22:54 ldelossa Okay I'll dig into that
22:54 mohae joined #salt
22:54 ldelossa I'm starting to get the full picture - make states where you want your machines to be at ALL times
22:55 ldelossa avoiding configuration drifts
22:55 ahammond ldelossa exactly
22:55 ldelossa Awesome, hey thanks for the quick replies
22:55 ldelossa Much appreciated.
22:55 ahammond although it's more about healing drifts than avoiding them. :)
22:55 ldelossa understood.
22:55 whytewolf which actualy explains the name state. make sure system is in this state.
22:55 babilen I mean you could, naturally, fire of a "provisioning" state when a minion starts or its key is being accepted that does some "initial" configuration. But, by and large, you want your states to be idempotent and guard them with suitable tests
22:56 ldelossa Perfect
22:56 ldelossa I'll structure my scripts in that way
22:56 babilen It's not about the "how" it's about the "what". Let salt care about the "how" and tell it what you want.
22:56 ldelossa gotta say I love this thing tho, not to have to learn anything but the already relevant jinja, and yaml, good stuff
22:56 ldelossa Perfect
22:56 ldelossa Thanks a lot guys. I'll probably be back haha.
22:56 babilen well, jinja is the worst bit, but glad you enjoy it so far :)
22:57 ldelossa anyyyyything beats puppet ;)
22:57 larsfronius joined #salt
23:01 forrest manfred, You around?
23:02 TaiSHi joined #salt
23:02 breakingmatter joined #salt
23:03 zmalone joined #salt
23:03 gtmanfred yo
23:03 MindDrive Maybe I'm really terrible at finding it, but is there any documentation on using the various Salt methods within a Python application itself?  Nearly all the main documentation lists the methods and what they do, then shows a command line example... which in this case is not what I want. :)
23:03 gtmanfred forrest: wassup?
23:04 forrest manfred, quick question about salt-cloud that I'm either totally failing at, or this is not documented properly. I'm trying to pass some kwargs through to the DO provider, command looks like salt-cloud -f show_keypair my-do keyname=my-key
23:04 forrest Whenever I pass that through I just get 'no machines were found to be destroyed'
23:04 forrest yet if I list_keypairs, I can clearly see the key
23:04 forrest am I referencing the kwarg incorrectly somehow?
23:05 whytewolf MindDrive: I think you are looking for this https://docs.saltstack.com/en/latest/ref/clients/index.html
23:05 gtmanfred uhh, i don't think so, one second
23:05 forrest manfred, Cool thanks.
23:05 murrdoc joined #salt
23:07 gtmanfred forrest: that looks like it should work,is it returning that error that 'A keyname is required'?
23:07 forrest manfred, No that's the problem. I get the 'keyname is required' error when I DON'T pass keyname=my-key through
23:08 gtmanfred you should get that :/
23:08 gtmanfred if 'keyname' not in kwargs:
23:08 gtmanfred log.error('A keyname is required.')
23:08 gtmanfred return False
23:08 forrest yeah exactly, and I did get that before I dumped in the arg
23:08 forrest but I mean the key is there, and I'm setting the value, but no return, which is odd (I should note that I noticed this since I am trying to add some additional functionality)
23:08 forrest not to keypairs
23:08 gtmanfred oh
23:08 forrest those functions are unchanged
23:09 gtmanfred so when you do show_keypair with keyname, you just aren't getting anything back?
23:09 forrest yeah exactly
23:09 gtmanfred ok
23:09 forrest but I can do list_keypair and I get my keys
23:09 kinetic joined #salt
23:09 gtmanfred it should work, and it sounds like kwargs is sending correctly,i would dump a log.debug there and make sure keypairs is returning in the format that it is supposed to and that the parsing should work
23:10 forrest Hmm alright, I'm running with -l debug right now, but I'll add that.
23:11 baweaver joined #salt
23:11 TaiSHi joined #salt
23:12 gtmanfred yar, it certainly looks like it should work,my only guess that the list_keypairs returns a dictionary of a different format, but then that is odd if it didn't return an error when trying to action the keypairs{} dictionary
23:13 forrest yeah I'm very confused.
23:13 otter768 joined #salt
23:13 forrest since it should just take a variable
23:13 MindDrive whytewolf: Yeah, I've come across that before, though as mentioned, it's very light on actual examples.  Though looking at it, I should really, really upgrade to 2015.8 (still on 2015.5) as I see they simplified the Caller setup to have 'cmd()' (currently I have some code using 'sminion.functions' which looks a bit convoluted).
23:15 sfxandy joined #salt
23:16 bougie joined #salt
23:17 forrest manfred, Interesting, so if I add log.debug(kwargs) immediately after the function definition, it doesn't print out anything, just give the 'no machines were found to be destroyed'
23:17 whytewolf MindDrive: see the Salt loader interface. https://docs.saltstack.com/en/latest/ref/clients/index.html#salt-s-loader-interface. that example alone speaks volumes. the example in that goes from nothing to running test.ping on a minion
23:18 forrest manfred, The weird thing I've noticed is this: [DEBUG   ] The 'digital_ocean' cloud driver is unable to be optimized.
23:18 forrest That only shows up when the 'no machines were found to be destroyed' error pops
23:19 whytewolf MindDrive: once you get past the loading. calling the modules is rather like writing the jinja that goes with most of it
23:20 forrest manfred, Hmm, wonder if it is related to this: https://github.com/saltstack/salt/issues/28150#issuecomment-149689643
23:20 saltstackbot [#28150]title: salt-cloud cannot provision to azure | ```...
23:20 gtmanfred forrest: i get this in my debug log
23:20 gtmanfred [DEBUG   ] Trying to execute 'digital_ocean.show_keypair' with the following kwargs: {'keyname': 'saltstack'}
23:20 gtmanfred from develop
23:21 forrest manfred, What does your command look like? This is on develop
23:21 forrest unless someone pushed an update in the last few hours, let me check
23:21 gtmanfred [root@salt salt]# salt-cloud -l debug -f show_keypair my-do keyname=saltstack
23:22 forrest Hmm, I am running this like a local dev environment
23:22 forrest so my command looks like this
23:23 gtmanfred this looks the same as the old code I had on my home box
23:23 forrest so my command looks like this salt-cloud -l debug -c ../ -d -f show_keypair my-do keyname=my_key
23:23 gtmanfred doesn't look like an update happened
23:23 diegows joined #salt
23:23 forrest yeah I don't see anything either
23:24 gtmanfred why do you have a -d?
23:24 gtmanfred you shouldn't need that
23:25 gtmanfred -d, --destroy       Destroy the specified instance(s).
23:26 gtmanfred forrest: ^^
23:26 sunkist joined #salt
23:26 forrest manfred, Yeah you're totally right, realized I didn't modify my command from running some other local commands :|
23:26 gtmanfred <3
23:26 forrest thanks budday
23:26 stomith joined #salt
23:26 gtmanfred no problem :)
23:27 forrest what a waste of time due to my own stupidity, I didn't even notice that since it was right at the line break /facepalm
23:27 MindDrive whytewolf: Yeah, still insufficient information there.  For my example, I want to extract a list of all installed RPMs using 'yumpkg.list_pkgs()', but so far attempts to use salt.client.LocalClient have been unsuccessful.
23:27 gtmanfred heh
23:28 stomith hey, is there a proper way to upgrade salt master to the latest release? the repos aren't updated.
23:28 gtmanfred stomith:you on ubuntu?
23:28 gtmanfred they changed the repos
23:28 stomith centos.
23:29 gtmanfred http://repo.saltstack.com/
23:29 stomith thanks!
23:29 gtmanfred yar, centos/deb/ubuntu/rhel all use that now apparently
23:29 murrdoc THE MOVED THE CHEESE
23:29 * stomith shakes fist.
23:29 murrdoc THEY
23:29 murrdoc HARUMPH
23:29 forrest loll
23:29 * murrdoc hands out picketing signs
23:30 murrdoc wait they made a package for 2015.5.6
23:30 murrdoc I LOVE BASEPI
23:30 * murrdoc hides picketing signs
23:31 murrdoc ok bye
23:31 murrdoc also they should have used aptly for their repo
23:31 murrdoc 2015.5.6 is uninstallable
23:32 murrdoc had to get creative with the mirroring
23:32 murrdoc left #salt
23:32 zmalone joined #salt
23:32 whytewolf MindDrive: https://gist.github.com/whytewolf/ae532b0a772bfec538f1 that gave me a dict of packages that are installed on my minion.
23:33 whytewolf [ran on the minion]
23:33 kinetic joined #salt
23:34 sunkist joined #salt
23:34 MindDrive whytewolf: Good to know, but I have 1000+ systems to check, so would rather run this from the Salt master if possible (to compile all currently used packages).
23:35 whytewolf MindDrive: okay, let me toss something together with LocalClient
23:35 MindDrive whytewolf: Thank you.
23:37 whytewolf MindDrive: updated the gist.
23:38 Corey babilen: That got it, thanks.
23:38 whytewolf MindDrive: ended up with less lines
23:38 whytewolf btw. just as in jinja ... you don't call yumpkg you just call pkg
23:39 whytewolf now I'm running a dev copy of 2015.8.0rc2, but that still should work
23:41 clintberry joined #salt
23:41 MindDrive whytewolf: Thank you, didn't realize pkg.pkg_list would 'do the right thing'.
23:42 MindDrive Works great, thanks for the help.
23:45 kinetic_ joined #salt
23:45 whytewolf MindDrive: yeah it is one of the few gotchas the virtual modules and knowing which ones go to what command. but salt-call sys.doc kind of goees over what the minion knows as it's modules
23:46 MindDrive Gotcha, will need to remember to use that for reference.
23:47 iggy and the doc examples show "the right thing"
23:57 MindDrive Hurm, maybe I should have used 'cmd_batch' in this case... I think I overloaded the master. :)
23:58 whytewolf if you used * as the target on over 1000 minions, to pull the pkg_list. yeah you might have run into memory issues. cause it will want to put that all into one Dict
23:59 whytewolf mine was just a simple example :P

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