Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-01-08

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

All times shown according to UTC.

Time Nick Message
00:00 lorengordon heh, it's a long way from python, or even bash, but it's a huge step over cmd scripts
00:00 lorengordon the param() block is one of my favorite things about it over bash
00:01 RandyT this is true. pretty powerful actually, but yet another curve to climb... :-)
00:01 pppingme joined #salt
00:04 lompik joined #salt
00:05 amcorreia joined #salt
00:07 sandor joined #salt
00:08 lorengordon i'm not sure what the issue is with `$zipfile.copyhere()` not waiting
00:08 lorengordon if you want, you can compress the logic to a single line
00:08 lorengordon `powershell new-object -com shell.application | $_.NameSpace($zipFile).CopyHere($file.FullName)`
00:09 lorengordon oops, shouldn't need `powershell` there
00:09 lorengordon `$null = new-object -com shell.application | $_.NameSpace($zipFile).CopyHere($file.FullName)`
00:10 Theo joined #salt
00:10 lorengordon RandyT: ^^^
00:10 RandyT lorengordon: nice, thank you.
00:11 hasues joined #salt
00:11 RandyT will give that a go
00:12 lorengordon dunno if it'll help, but it's easier to invoke different ways when it's all one line
00:12 baweaver joined #salt
00:13 PeterO joined #salt
00:13 clemensb joined #salt
00:13 RandyT yeah, still not clear if a try/catch is right there for error handling. try/catch did not seem to fit in the following case where I need to handle error.
00:14 lorengordon probably the most reliable will be something like `$null = start-process powershell.exe -argumentlist "<command>" -wait`
00:15 baweaver joined #salt
00:15 lorengordon oh, `-ErrorAction Stop` is your friend on try/catch blocks
00:15 yomilk joined #salt
00:15 zmalone joined #salt
00:16 lorengordon powershell has this annoying 'feature' called non-terminating errors
00:16 lorengordon try/catch won't catch them
00:16 zmalone basepi: I agree with you on https://github.com/saltstack/salt/issues/30182#issuecomment-169847014 , in which case there should probably be some sanity checking on minion names (currently the only check is that they don't start with a special character)
00:16 saltstackbot [#30182]title: Minions can have *s in the minion-id, but salt-key doesn't handle *s for targetting | It's possible to create minions with special characters, like "*" or "\" in the minion-id, as long as the minion-id does not start with a special character.  After you've done that, it is difficult to target those minions using salt-key, for example:...
00:16 lorengordon add `ErrorAction Stop` to the critical command and it should then catch them
00:17 basepi zmalone: not a bad idea. adding a series of simple checks would be fairly straightforward, at minion generation time. just strip out bad characters, maybe.
00:18 zmalone whether that's something anyone feels like adding at this point in time is another matter, but I suspect it's possible to bork matching by giving a master some bad characters, or by kicking in unprintable terminal code characters
00:19 arif-ali joined #salt
00:20 RandyT lorengordon: a lot of things to digest there. as I dig into this more, all attempts seem to have created a blocking python process
00:20 devtea joined #salt
00:20 RandyT lorengordon: I suspect the popup dialog box is creating some part of this problem... will need to investigate how to prevent that
00:21 lorengordon RandyT: if you go the `start-process` route, i frequently add these params to the call: `-NoNewWindow -PassThru -Wait`
00:21 RobertChen117 joined #salt
00:21 lorengordon that *should* prevent new windows
00:22 RandyT lorengordon: ok, thanks will give that a try
00:23 lorengordon i'll be glad to review it again later if you like
00:23 cpowell joined #salt
00:24 abednarik joined #salt
00:33 zmalone joined #salt
00:33 zmalone left #salt
00:35 rem5 joined #salt
00:37 otter768 joined #salt
00:44 Vaelatern WHat python command does Salt run to find an operating system?
00:44 ryau_ joined #salt
00:44 Vaelatern Specifically the name
00:45 colegatron joined #salt
00:48 baweaver joined #salt
00:55 frew ok so I'm trying to define an external pillar
00:55 frew I wrote a file called rolex.py and put it in my states/pillar directory
00:56 frew (there is a _grains directory in states, so I think it's the right place)
00:56 frew I have ext_pillar: { rolex: ~ } in my config
00:56 frew I did sync_all witht he hopes that that would push out the pillar
00:56 frew but it does not
00:56 ryau joined #salt
00:57 frew and I get [CRITICAL] Specified ext_pillar interface rolex is unavailable
00:57 frew where should I be placing it?
00:57 whytewolf https://docs.saltstack.com/en/latest/topics/development/external_pillars.html#location
00:58 frew oh so it's not looking where it looks for _grains
00:58 frew I'll add an extension modules setting
00:58 frew thanks
00:58 frew I read that like 5 times
00:58 frew but didn't understand
01:00 frew ok so I defined extension_modules to be /vol/saltstack/ext_modules and I placed rolex.py in that directory
01:00 frew I have def __virtual__(): return 'rolex'
01:00 frew but I still get [CRITICAL] Specified ext_pillar interface rolex is unavailable
01:00 * frew puts in a subdirectory
01:01 whytewolf restarted your master?
01:01 frew I don't have a master; currently running directly with salt-call --local
01:01 frew ok got it
01:01 whytewolf oh, humm. idk then. not sure how ext_pillar modules work with masterless
01:02 frew you can't just put it in ext_modules
01:02 frew it has to be in ext_modules/pillar
01:02 frew ok cool though
01:02 frew now it's working! :)
01:04 packeteer joined #salt
01:10 MindDrive joined #salt
01:17 ryau_ joined #salt
01:20 murrdoc unrelated
01:20 ryau__ joined #salt
01:20 murrdoc "Paid support available for open source Salt!http://www.saltstack.com/support"
01:20 murrdoc we gonna get a piece of that pie , base pie
01:23 RobertChen117 joined #salt
01:24 cpowell joined #salt
01:24 ryau joined #salt
01:27 dancat joined #salt
01:28 ryau_ joined #salt
01:28 Lionel_Debroux joined #salt
01:28 larsfronius joined #salt
01:33 murrdoc i ll be happy with swag
01:33 murrdoc :)
01:34 murrdoc saltstack irc ops
01:34 murrdoc or corps
01:36 yomilk joined #salt
01:38 baweaver joined #salt
01:40 digitalhero joined #salt
01:44 CheKoLyN joined #salt
01:48 MindDrive joined #salt
01:48 neogenix joined #salt
02:00 ecdhe I don't like the give-us-your-email-before-you-can-access-the-repo anti-pattern.
02:09 undefinednull joined #salt
02:12 rem5 joined #salt
02:19 catpiggest joined #salt
02:24 RobertChen117 joined #salt
02:31 otter768 joined #salt
02:34 dayid joined #salt
02:34 colegatron joined #salt
02:37 yomilk joined #salt
02:40 subsignal joined #salt
02:40 Laogeodritt joined #salt
02:41 synical joined #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.3 | Paid support available for open source Salt! www.saltstack.com/support | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | Ask with patience as we are volunteers and may not have immediate answers
02:51 ipmb joined #salt
02:53 yomilk joined #salt
02:54 ageorgop joined #salt
02:56 quasiben joined #salt
03:09 cyborg-one joined #salt
03:11 murrdoc ?
03:18 Shirkdog joined #salt
03:25 cpowell joined #salt
03:30 ryau joined #salt
03:30 larsfronius joined #salt
03:32 racooper joined #salt
03:33 ryau__ joined #salt
03:33 favadi joined #salt
03:34 aphor joined #salt
03:47 devtea joined #salt
03:47 ipmb joined #salt
03:55 writtenoff joined #salt
03:59 brianfeister joined #salt
04:03 antpa joined #salt
04:06 malinoff joined #salt
04:23 mosen joined #salt
04:27 antpa joined #salt
04:28 rihannon joined #salt
04:28 colegatron joined #salt
04:29 kshlm joined #salt
04:29 digitalhero joined #salt
04:31 digitalh_ joined #salt
04:44 yomilk joined #salt
04:48 anmol joined #salt
04:49 hasues left #salt
05:04 colegatron joined #salt
05:05 jaybocc2 joined #salt
05:07 rdas joined #salt
05:19 rem5 joined #salt
05:20 yomilk joined #salt
05:21 armguy joined #salt
05:25 GrueMaster joined #salt
05:26 antpa joined #salt
05:27 cpowell joined #salt
05:27 ageorgop joined #salt
05:30 favadi joined #salt
05:31 digitalhero joined #salt
05:32 larsfronius joined #salt
05:33 yomilk joined #salt
05:38 ryau joined #salt
05:42 MTecknology Rendering SLS 'base:sys.files.kibana' failed: could not found expected ':'; line 14
05:42 MTecknology ^ I feel like that should be "find"
05:44 antpa joined #salt
05:47 rotbeard joined #salt
05:48 tzero joined #salt
05:52 rem5 joined #salt
05:58 calvinh joined #salt
06:02 yomilk joined #salt
06:06 ryau joined #salt
06:07 iggy quiet down birthday boy
06:07 PeterO joined #salt
06:08 toddnni_ joined #salt
06:09 ryau_ joined #salt
06:09 mrtrosen joined #salt
06:10 jY joined #salt
06:11 sybix joined #salt
06:12 penguinp1wernz joined #salt
06:13 bhosmer joined #salt
06:17 spaceSub joined #salt
06:18 colegatron joined #salt
06:18 w1gz joined #salt
06:19 antpa joined #salt
06:21 brianfeister joined #salt
06:28 jhauser joined #salt
06:40 darvon joined #salt
06:41 Bryson joined #salt
06:42 felskrone joined #salt
06:44 MTecknology iggy: Thanks! :)
06:45 antpa joined #salt
06:45 MTecknology iggy: How would you handle something like kibana that's generally distributed as just a tarball?
06:47 eichiro joined #salt
06:48 blckbit10 joined #salt
06:48 calvinh joined #salt
06:55 otter768 joined #salt
06:56 antpa joined #salt
06:58 colegatron joined #salt
06:59 MTecknology iggy: I was thinking about cloning their repo automatically to my git server and then having a state that pulled the git repo .. then I could also maintain a config file ... actually... I think I'm gonna do that :)
07:04 antpa joined #salt
07:10 iggy I've just generally archive.extracted it
07:10 iggy but if I was going to go back and do it now, I'd fpm it and install it via pkg manager
07:10 cyborg-one joined #salt
07:11 neilf__ joined #salt
07:14 hvn joined #salt
07:20 MTecknology hm...
07:27 antpa joined #salt
07:28 cpowell joined #salt
07:36 AndreasLutro WTF
07:36 AndreasLutro why is salt merging top.sls from every single git branch?!
07:39 hamsham joined #salt
07:53 dgutu joined #salt
07:53 Magdalena joined #salt
07:54 Magdalena Good morning I'am really new to saltstack so i have a quastion is there a way to easy install salt offline
07:55 TyrfingMjolnir joined #salt
08:00 otter768 joined #salt
08:02 elsmo joined #salt
08:02 antpa joined #salt
08:02 otter768_ joined #salt
08:04 otter768 joined #salt
08:05 TyrfingMjolnir joined #salt
08:06 otter76__ joined #salt
08:08 otter768_ joined #salt
08:10 otter768 joined #salt
08:10 brianfeister joined #salt
08:12 otter768_ joined #salt
08:13 otter768 joined #salt
08:15 VSpike Magdalena: can you explain a bit more what you mean?
08:15 otter768_ joined #salt
08:16 impi joined #salt
08:17 otter768 joined #salt
08:17 Magdalena i have tryed ti install salt on a offline server (without internet conecction) but der was so many dependencies so it was really hard to go throuh them and install all necessary packeges for exampel python packeges
08:19 slav0nic joined #salt
08:19 otter76__ joined #salt
08:21 otter768_ joined #salt
08:23 otter768 joined #salt
08:24 evle joined #salt
08:25 otter768_ joined #salt
08:26 hoangdv joined #salt
08:26 * hoangdv slaps B1nny around a bit with a large fishbot
08:27 B1nny lolwut
08:27 B1nny thanks?
08:27 otter768 joined #salt
08:28 KermitTheFragger joined #salt
08:28 RobertChen117 joined #salt
08:28 auzty joined #salt
08:29 otter768_ joined #salt
08:29 cpowell joined #salt
08:31 otter768_ joined #salt
08:31 linjan joined #salt
08:32 dheeraj joined #salt
08:33 otter768 joined #salt
08:33 brianfeister joined #salt
08:34 larsfronius joined #salt
08:34 otter768 joined #salt
08:36 otter768_ joined #salt
08:37 Magdalena ?
08:38 Magdalena so i am searching for a packages who has everything in it what salt need
08:38 otter76__ joined #salt
08:38 Magdalena so i can install it offline any ideas or link would be very helpfull
08:40 otter768 joined #salt
08:41 antpa joined #salt
08:42 otter768_ joined #salt
08:44 otter768 joined #salt
08:46 otter768 joined #salt
08:48 otter768_ joined #salt
08:48 Rumbles joined #salt
08:50 otter76__ joined #salt
08:51 fredvd joined #salt
08:52 otter768 joined #salt
08:54 otter768_ joined #salt
08:56 otter76__ joined #salt
08:57 otter768 joined #salt
08:59 otter768 joined #salt
09:00 s_kunk joined #salt
09:01 s_kunk joined #salt
09:01 s_kunk joined #salt
09:02 otter768 joined #salt
09:03 otter768_ joined #salt
09:04 kshlm joined #salt
09:05 otter768 joined #salt
09:07 otter768_ joined #salt
09:07 yomilk joined #salt
09:08 antpa joined #salt
09:09 keimlink joined #salt
09:09 otter768 joined #salt
09:09 GreatSnoopy joined #salt
09:12 joshin1 joined #salt
09:15 sfxandy joined #salt
09:15 artemz joined #salt
09:22 AndreasLutro I'm trying to write a custom returner but cannot figure out how to get a config value from the minion config
09:23 patchedmonkey joined #salt
09:24 ingslovak joined #salt
09:28 Xevian joined #salt
09:28 mortis AndreasLutro: config.get?
09:28 dijit Magdalena: check out the omnibus installer
09:29 jbax joined #salt
09:29 dijit Magdalena: or, do a pip offline download.
09:34 antpa joined #salt
09:37 kshlm joined #salt
09:44 antpa joined #salt
09:48 LondonAppDev joined #salt
09:53 elsmo joined #salt
09:58 kawa2014 joined #salt
10:03 rdas joined #salt
10:05 Magdalena thanks for response i will try it
10:05 Lionel_Debroux joined #salt
10:22 larsfronius joined #salt
10:24 larsfron_ joined #salt
10:25 antpa joined #salt
10:29 wnkz joined #salt
10:30 denys joined #salt
10:31 cpowell joined #salt
10:41 av_ joined #salt
10:46 TyrfingMjolnir joined #salt
10:49 LondonAppDev joined #salt
10:54 TyrfingMjolnir joined #salt
10:54 Jimlad joined #salt
11:07 cyteen joined #salt
11:08 yomilk joined #salt
11:10 otter768 joined #salt
11:10 duncanmv joined #salt
11:12 TyrfingMjolnir joined #salt
11:14 yomilk joined #salt
11:15 TyrfingMjolnir joined #salt
11:33 linjan joined #salt
11:33 TyrfingMjolnir joined #salt
11:33 Rumbles I know you can run a command in the format "salt -E 'hostname(something|else)rest' some.command" if you want to select a number of hosts, but can I use the same syntax to get hosts with different hostnames in the top file?
11:33 Rumbles i.e. the 'hostname(something|else)rest' part
11:34 chitown joined #salt
11:35 penguinp1wernz joined #salt
11:45 TyrfingMjolnir joined #salt
11:48 TyrfingMjolnir joined #salt
11:50 johnkeates joined #salt
11:57 elsmo Rumbles: yes, if you specify the matching in the top file too
11:57 TyrfingMjolnir joined #salt
11:58 elsmo see https://docs.saltstack.com/en/develop/topics/targeting/globbing.html#regular-expressions
12:02 elsmo Is there a way to ask a salt minion how much data it has Rx/Tx of the network, or a bandwidth measure etc?
12:09 yidhra joined #salt
12:15 bhosmer joined #salt
12:16 yomilk joined #salt
12:22 antpa joined #salt
12:30 LondonAppDev joined #salt
12:32 cpowell joined #salt
12:33 Xevian joined #salt
12:41 linjan joined #salt
12:46 morissette joined #salt
13:02 colegatron joined #salt
13:10 TyrfingMjolnir joined #salt
13:11 otter768 joined #salt
13:12 XenophonF and we're back
13:12 XenophonF greetz yo
13:13 KennethWilke joined #salt
13:15 kwilke joined #salt
13:21 dgutu joined #salt
13:24 Fabbe_ joined #salt
13:27 CeBe joined #salt
13:28 akhter joined #salt
13:28 TooLmaN joined #salt
13:35 wnkz joined #salt
13:37 akhter joined #salt
13:40 linjan joined #salt
13:41 cpowell joined #salt
13:42 malinoff joined #salt
13:42 gh34 joined #salt
13:45 kawa2014 joined #salt
13:54 bhosmer joined #salt
13:57 larsfronius joined #salt
13:59 subsignal joined #salt
13:59 dyasny joined #salt
14:00 lompik joined #salt
14:04 slav0nic joined #salt
14:07 JDiPierro joined #salt
14:09 larsfron_ joined #salt
14:19 quasiben joined #salt
14:20 ryau joined #salt
14:22 numkem joined #salt
14:22 Rumbles thanks elsmo, gonna test it shortly :)
14:23 ryau_ joined #salt
14:26 rem5 joined #salt
14:29 viq joined #salt
14:30 kawa2014 joined #salt
14:30 teryx510 joined #salt
14:35 cpowell joined #salt
14:37 mpanetta joined #salt
14:37 spiette joined #salt
14:38 gmoro joined #salt
14:40 cpowell joined #salt
14:45 drawsmcgraw joined #salt
14:45 JDiPierro joined #salt
14:52 Theo joined #salt
14:52 mapu joined #salt
14:53 winsalt joined #salt
14:55 rawzone joined #salt
15:02 ipmb joined #salt
15:04 DammitJim joined #salt
15:06 tkharju joined #salt
15:07 tkharju joined #salt
15:12 otter768 joined #salt
15:14 XqueZme joined #salt
15:14 XqueZme Hi everyone, I'm trying to format a filesystem and have found blockdev.formatted to do the trick. However it does not support filesystem labels. What's the best practice to attach a label on a filesystem, after it has been formatted?
15:14 XqueZme I'm trying to avoid using cmd.run since it's not idempotent
15:15 nZac joined #salt
15:15 sjorge joined #salt
15:15 sjorge joined #salt
15:16 nZac joined #salt
15:18 CheKoLyN joined #salt
15:22 pcn You can make it idempotent by adding an "unless" that checks for a label
15:23 digitalhero joined #salt
15:24 infrastructure joined #salt
15:24 XqueZme pcn: OK, I was just reading about module.run, but sounds like cmd.run is simpler.
15:25 Brew joined #salt
15:26 Rumbles Sometimes when I run highstate my master returns: Salt request timed out. The master is not responding. If this error persists after verifying the master is up, worker_threads may need to be increased.
15:26 winsalt there is also a 'stateful' option that implies that your cmd will return something that will let salt determine idempotency
15:26 Rumbles I know I can check jobs.active to see whether there is a job running
15:26 Rumbles is it possible to then attach to the output of the higstate if it did run?
15:27 digitalhero joined #salt
15:28 edrocks joined #salt
15:28 anotherZero joined #salt
15:30 penguinp1wernz joined #salt
15:30 infrastructure joined #salt
15:33 lumtnman joined #salt
15:33 Theo joined #salt
15:35 quasiben joined #salt
15:44 rory Rumbles: salt-call jobs.list_jobs
15:45 rory Rumbles: salt-call jobs.lookup_jid 1234567890
15:45 andrew_v joined #salt
15:45 rory Rumbles: Changed my life too. You're welcome.
15:50 spuder joined #salt
15:52 ageorgop joined #salt
15:52 kshlm joined #salt
15:53 quasiben joined #salt
15:56 amcorreia joined #salt
15:58 AndreasLutro list_jobs takes a bunch of useful arguments for searching as well https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.jobs.html#salt.runners.jobs.list_jobs
16:01 pcn I'll add that doing this via redis or one of the other master job caches is even more life-changing
16:05 jrklein joined #salt
16:06 kshlm joined #salt
16:07 AdamSewell joined #salt
16:08 RedundancyD joined #salt
16:10 sdm24 joined #salt
16:15 badgerops joined #salt
16:18 relidy joined #salt
16:19 aw110f joined #salt
16:21 hasues joined #salt
16:25 hasues left #salt
16:28 aw110f_ joined #salt
16:34 tawm04 joined #salt
16:41 PeterO_ joined #salt
16:44 DammitJim joined #salt
16:59 tehsu Is there a way to have one schedule that rolls against many servers?
17:02 onlyanegg joined #salt
17:02 babilen tehsu: Just target the pillar in which you define it to more than one box?
17:03 quasiben joined #salt
17:04 tehsu define it in the top.sls or in the pillar?
17:06 frew is there a way that I can verify that ext_pillar_first was set?
17:06 frew it looks to me like my ext_pillar is not providing data to pillars
17:07 Bryson joined #salt
17:08 babilen tehsu: You'd target the respective pillar in the pillar's top.sls -- https://docs.saltstack.com/en/latest/topics/jobs/#scheduling-jobs
17:09 tehsu right, which I have, so I have 4 servers that I want the job to run at 4:15AM so I put that pillar towards those 4 servers and the other two servers I had to create individual files for each server and assign the pillar to each of those servers
17:09 tehsu I'm assuming that's the only way to do it as the jobs run directly on each server not on the master
17:11 frew ok yeah for sure
17:11 ksj joined #salt
17:11 frew so if ext_pillar_first is set, I should be able to access the pillardata from the external pillar when my other pillars are being built, right?
17:12 writtenoff joined #salt
17:12 ksj hi, how do I use salt-run if I'm using salt-ssh for everything?
17:12 babilen tehsu: You could target the same SLS file to all minions and put logic in there or compose multiple SLS files/pillars
17:13 otter768 joined #salt
17:13 tehsu ok, thanks
17:13 ksj I'm going through the cloud controller docs, but when I run salt-run virt.hyper-info I get 'Unable to connect to the salt master publisher at /tmp/var/run/salt/master
17:13 Crazy67 joined #salt
17:14 ksj oh wait....
17:14 ksj I think I'm being dumb
17:14 ksj nope, I thought maybe the dir didn't exist, but that's not it
17:17 frew ok so I think I verified something
17:17 frew using an ext pillar with ext_pillar_first lets you put 'foo:bar': -match: pillar in your topfile
17:18 frew but pillar.get('foo', '') is still always empty
17:18 colegatron joined #salt
17:20 Andrew_ joined #salt
17:20 Andrew_ Is there a trick to adding wget repo's for ubuntu?
17:21 Andrew_ please bear with me i'm a salt n00b
17:24 keimlink_ joined #salt
17:24 mohae_ joined #salt
17:26 babilen Andrew_: wget should be available from the normal Ubuntu repositories
17:27 pfallenop joined #salt
17:27 stanchan joined #salt
17:28 _JZ_ joined #salt
17:30 aw110f joined #salt
17:33 linjan joined #salt
17:33 nZac joined #salt
17:33 lumtnman joined #salt
17:35 tehsu btw ty babilen, logic worked
17:37 s0undt3ch joined #salt
17:42 keimlink joined #salt
17:46 aw110f_ joined #salt
17:47 frew j/7
17:47 frew woops
17:50 lumtnman joined #salt
17:50 subsigna_ joined #salt
17:51 asyncsrc joined #salt
17:51 neogenix joined #salt
17:51 schone joined #salt
17:52 sfxandy joined #salt
17:52 schone hello
17:52 schone using salt 2014.1.13 and im wondering if there’s a way to limit a state only to minions who contains a regex in one of their grains ie grains X=“a=1 b=2” and i only want the state to be set on minions where the X grains contains a=1
17:57 drawsmcgraw schone: {% if '1' in grains['x'] %}  or something similar?
17:58 schone drawsmcgraw: ya that will work :) is that possible in jinja2?
17:58 drawsmcgraw Something *like* that will, yes. That is Jinja, as far as I understand.
17:58 drawsmcgraw I'm not certain on your grains setup or exactly what you're looking for but I use syntax like that pretty frequently.
18:02 lempa joined #salt
18:02 Eureka70_ joined #salt
18:03 foundatron_ joined #salt
18:04 leev joined #salt
18:04 davromaniak joined #salt
18:04 davromaniak joined #salt
18:06 renoirb joined #salt
18:06 JDiPierro joined #salt
18:07 snarfy joined #salt
18:07 jcockhren joined #salt
18:07 kidneb joined #salt
18:09 writtenoff joined #salt
18:09 nZac joined #salt
18:14 schone another newbie question
18:14 schone how do I list all the modules available ?
18:14 schone available == installed on my master and minions
18:14 baweaver joined #salt
18:15 sdm24 like only custom ones?
18:15 drawsmcgraw ...that's a good question. I usually just hit the docs and ctrl-f in my browser
18:16 sdm24 https://docs.saltstack.com/en/latest/ref/modules/ that lists all modules included in salt
18:16 sdm24 err https://docs.saltstack.com/en/latest/ref/modules/all/index.html#all-salt-modules
18:17 Pixionus joined #salt
18:17 Pixionus joined #salt
18:18 KennethWilke joined #salt
18:20 drawsmcgraw If you're stuck on the command line, you can either 1) man 7 salt  -or- 2) salt-call sys.doc some_module
18:20 drawsmcgraw The first gets you all of docs.saltstack.com in a man page
18:20 drawsmcgraw The second will dump the docs just for a single module.
18:20 tkharju joined #salt
18:22 sdm24 ooh I didn't know about sys.doc. thats handy
18:24 ageorgop joined #salt
18:25 murrdoc joined #salt
18:31 schone no no what i mean is
18:31 Snicers joined #salt
18:31 schone i would like to know what modules are installed currently in my system
18:32 nZac joined #salt
18:32 drawsmcgraw good question. I don't have an answer, but can I ask why?
18:32 nZac joined #salt
18:32 whytewolf installed? technically they are all installed. however sys.list_modules will list the ones that can run
18:33 Snicers I have an ssh public/private keypair that I would like on my master salt server. I have Salt in version control and do not want the private key on VC. Is there a good way to get the private key to the salt master server securely or will I need to use another piece of software to do this for me?
18:34 GreatSnoopy joined #salt
18:34 RandyT_ joined #salt
18:35 whytewolf schone: sys.list_* is also avalible so that you can get a list of all the other types of modules that are avalible.
18:36 schone whytewolf: thank u
18:36 schone that works!
18:40 drawsmcgraw whytewolf, neat! I learned something today.
18:41 whytewolf yay for learning!
18:42 stanchan joined #salt
18:48 dalibro has anyone successfully sent args to runner via netapi ? and how ?
18:51 frew if anyone is interested, this is why I was confused re ext_pillar earlier: https://github.com/saltstack/salt/issues/30239
18:51 saltstackbot [#30239]title: pillar.get and pillar.items have different sematics | TL;DR: pillar.items and pillar.get return different data.  Check this out:...
18:52 whytewolf frew: was that pillar.get AFTER saltutil.pillar_refresh? cause pillar.get uses a cache, however pillar.items does not
18:52 winsalt pillar.get is using pythons dictionary method, if you want to get nested data you have to use salt['pillar.get']
18:52 frew huh
18:53 frew I geuss I could refresh
18:53 frew whytewolf: running pillar_refresh first does not effect the output
18:55 edrocks joined #salt
18:55 whytewolf okay, just making sure. cause everyone seems to forget that step and it is an important step.
18:56 frew I don't think it applies to me (running masterless with no daemons)
18:56 whytewolf it does
18:56 frew ok
18:56 sdm24 seems to work for me, frew...
18:56 hasues joined #salt
18:56 frew sdm24: is your setup the same?  it's sorta complicated
18:58 sdm24 I just did "pillar.get sqldb-dbs --out json" (to list the databases assigned via pillar, which also has subdicts and lists for users, hosts, etc) and "pillar.item sqldb-dbs --out json" and they return the same info
18:58 sdm24 except item had the "sqldb-dbs:" parent
18:58 frew sdm24: is sqldb-dbs a python pillar that uses data from an ext_pillar?
18:59 sdm24 nope
18:59 frew ok
18:59 sdm24 gotcha haha
18:59 frew read the issue
18:59 frew :)
18:59 sdm24 I thought it was just general problems with pillar.get vs pillar.item
18:59 TyrfingMjolnir joined #salt
19:00 frew nah
19:00 sdm24 never mind haha
19:00 lompik joined #salt
19:02 onlyanegg joined #salt
19:04 quasiben joined #salt
19:05 ryau joined #salt
19:05 rem5 joined #salt
19:05 hasues left #salt
19:09 ryau_ joined #salt
19:13 otter768 joined #salt
19:15 TyrfingMjolnir joined #salt
19:18 MindDrive joined #salt
19:23 cyborg-one joined #salt
19:23 frew jfindlay: I'm curious, what is that a duplicate of?
19:24 frew jfindlay: I tried to look through the issues but there are so many
19:26 aw110f joined #salt
19:27 jfindlay frew: did you see my comment?
19:27 frew yeah commenting
19:27 jfindlay does it look like a duplicate to you?
19:27 frew I don't think so, but I could be wrong
19:28 frew I am certainly the odd man out because I am running masterless
19:28 jfindlay hmmm
19:28 jfindlay well, if you want, I can reopen your issue
19:28 frew it's your call
19:28 frew I don't really care, I just want to do my part to report the issue
19:29 jfindlay let's keep it the way it is until we can find some more definitive information
19:29 frew I am happy to try the fix for the other issue and see if it fixes mine when it comes to that
19:29 frew no prob.
19:29 aw110f_ joined #salt
19:29 frew but yeah, the fact that the subject of the other issue mentions pillar.item working makes me think this is different
19:32 Fiber^ joined #salt
19:34 jfindlay that's true, also if you're running masterless, I assume that means you don't have a minion daemon running
19:34 chadhs joined #salt
19:34 jfindlay so there would be nothing to restart
19:35 denys joined #salt
19:35 chadhs how would you run a module in a state file to achieve the same result as running it like this
19:35 chadhs `salt-call partition.mkpart /dev/xvdf primary start=1MB end=100%`
19:36 quasiben joined #salt
19:36 whytewolf chadhs: using module.run ... you might want to use something in an unless statment with it so that it doesn't nuke the parition everytime
19:37 chadhs good call on unless
19:37 chadhs whytewolf is there a way to mix positional args with kwargs?
19:37 chadhs like primary is unadorned with a keyword
19:37 chadhs where start and end are keyword args
19:38 digitalhero joined #salt
19:39 whytewolf chadhs: technically module.run passes everything through directly. but look at the last example here https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html for passing seperate kwargs and args
19:40 Rumbles joined #salt
19:41 chadhs ok i'll play around with it
19:41 chadhs some of it seems odd / redundant
19:41 chadhs like cloud.create:
19:41 chadhs and then - func: cloud.create
19:42 whytewolf well - func is being passed to cloud.create
19:43 whytewolf not sure what is up with that.
19:43 Theo joined #salt
19:43 whytewolf would have to ask who ever wrote the docs i guess
19:43 chadhs could it be as simple as this
19:43 chadhs https://gist.github.com/chadhs/5859372cd3dded2c6ac1
19:44 HankScorpio joined #salt
19:45 whytewolf is parition a custom module? anyway. I would supply the arg names with it. just to be sure you know what is getting passed where
19:45 murrdoc joined #salt
19:46 baweaver joined #salt
19:46 chadhs it's parted module
19:46 HankScorpio Hi, I am quite fed up of puppet and the shitties documentation ever, any shoulder to cry on?
19:46 chadhs it's included
19:46 duncanmv joined #salt
19:46 chadhs whytewolf there' no names for some args
19:46 whytewolf ahhh, hate when they do that to me :P
19:47 whytewolf there is. parition.mklabel device=/dev/xvdf label_type=gpt
19:48 chadhs oh i spoke too soon
19:48 frew jfindlay: right, no daemon at all
19:49 chadhs essentially my tinkering gave me this great working formula whytewolf https://gist.github.com/chadhs/771ad33c65b59f2d9b16
19:49 chadhs so im going to now convert it to work in a state file :-)
19:49 whytewolf oh that shouldn't be too hard. you might want to check if some of this already has states
19:50 subsignal joined #salt
19:50 whytewolf i know parted doesn't though
19:51 whytewolf lvm does
19:51 chadhs right i think just parted doesnt
19:57 whytewolf chadhs: not sure if this is 100% but it is a start https://gist.github.com/whytewolf/242b1714d1cc62775a39
19:57 whytewolf s/100%/100% right
19:58 whytewolf kind of off the top of my head
19:58 murrdoc u dont need the watch
19:58 murrdoc its in order
19:58 whytewolf murrdoc: it is module.wait
19:58 whytewolf :P
19:58 chadhs oh nice thank you
19:59 whytewolf it needs watch to make sure it doesn't run if the one above it doesn't run
19:59 chadhs this is the last piece of my puzzle for having salt fully provision AWS stuff with external ebs volumes attached
19:59 chadhs configing drives before running other states and such
19:59 chadhs thnx
20:00 whytewolf no problem
20:00 TyrfingMjolnir joined #salt
20:03 DammitJim joined #salt
20:04 duncanmv joined #salt
20:07 larsfronius joined #salt
20:11 edrocks joined #salt
20:11 drawsmcgraw Going out on a limb.... is anyone using Salt to build physical machines?
20:11 TTimo do you mean 'bare metal' ?
20:11 drawsmcgraw I mean.... is Kickstart about all we have, still?
20:11 drawsmcgraw TTimo: yes
20:11 TTimo I'm sure some people do
20:12 pcdummy joined #salt
20:12 pcdummy joined #salt
20:12 whytewolf drawsmcgraw: https://github.com/saltstack/salt-genesis doens't look like it really has has much work
20:13 drawsmcgraw I vaguely remember that.... I remember seeing it years ago, and it was old then :/
20:13 murrdoc joined #salt
20:14 whytewolf not exatly a high priority. although a nice to have eventually
20:14 rem5 joined #salt
20:15 drawsmcgraw I can understand that
20:15 drawsmcgraw I'm just tired of waiting on these other guys on another team for help/access to their Foreman install
20:15 drawsmcgraw What are people using these days to provision bare metal?
20:16 Crazy67 joined #salt
20:17 whytewolf I was using cobbler.
20:17 schone joined #salt
20:17 drawsmcgraw The guys using Foreman said they were moving *from* Cobbler to Foreman. Would you say Cobbler was working for you?
20:17 whytewolf well. I only had 4 machines to deal with so yeah
20:18 whytewolf :P
20:18 drawsmcgraw heh. Fair enough :)
20:18 whytewolf currently because of a compleate hardware refresh and more complex hardware I'm actually looking for something new and trying to figure out how to boot redhat with a driver disk through netboot
20:19 drawsmcgraw Maybe all I need is a Kickstart server. Maybe I don't actually need all this extra..... stuff
20:20 Theo joined #salt
20:20 whytewolf thats pretty much all salt-genesis was was a salt front end to kickstart
20:21 duncanmv joined #salt
20:22 nZac joined #salt
20:23 whytewolf if foreman was python not ruby i would look at it :/ [nothing wrong with ruby, just hate having so many frigging language stacks]
20:24 nZac joined #salt
20:25 baweaver joined #salt
20:26 duncanmv joined #salt
20:27 drawsmcgraw I understand :)
20:30 DanyC joined #salt
20:30 DanyC hi, any developer around who is familiar with the salt-cloud code base?
20:32 quasiben joined #salt
20:35 justanotheruser joined #salt
20:42 tempo joined #salt
20:42 schone joined #salt
20:50 edrocks joined #salt
20:51 nZac joined #salt
20:52 pcdummy joined #salt
20:52 pcdummy joined #salt
20:55 edrocks joined #salt
20:56 ageorgop joined #salt
20:56 mray_home joined #salt
20:58 twork i waste a lot of time going back and forth trying to figure out the right syntax for a state that's only documented in either command line or for state files.
20:58 twork is there a hint page somewhere?
20:58 ryau joined #salt
20:58 milkyray joined #salt
21:00 milkyray Hello, I've written a formula I'd like to contribute to saltstack-formulas
21:00 jfindlay twork: what kind of hints are you looking for?  The general formatting of sls data is documented at https://docs.saltstack.com/en/latest/ref/states/highstate.html and the reference documentation included in each state file can be found at https://docs.saltstack.com/en/latest/ref/states/all/index.html
21:01 jfindlay milkyray: where is your repo?
21:02 nZac joined #salt
21:02 milkyray https://github.com/mraymond77/chrony-formula
21:02 milkyray jfindlay^
21:02 twork jfindlay: present example: i need to wipe and recreate a user group across a batch of minions, but the group state doc assumes i'll only do that in a state file
21:03 twork 'suodo salt 'foo*' group.absent blah' is wrong...
21:03 jfindlay milkyray: cool
21:03 twork ...as is suodo, pay no attention to the guitar player...
21:05 twork my understanding has been, "if you can put it in a state file you can call it at the command line and vise versa," but the docs sometimes only describe one or the other, and i don't seem to have a grasp of how to translate back or forth
21:05 ajw0100 joined #salt
21:06 whytewolf twork that is not the case
21:06 jfindlay I'm confused by what you mean by in a state file vs on the command line
21:06 twork the things you learn!
21:06 whytewolf state files are done with state modules. cli is done with exacution modules
21:06 jfindlay right
21:06 baweaver joined #salt
21:07 winsalt bookmark these if you use salt:  https://docs.saltstack.com/en/latest/ref/states/all/, https://docs.saltstack.com/en/latest/ref/modules/all/
21:07 twork i live on those pages.
21:08 whytewolf then why are you going to state documentation for cli commands?
21:08 twork they only do so much good if you're an idiot.
21:08 jfindlay often execution modules (command line) and state modules (sls files) share similar or identical names, but their purposes are different.  Generally state modules call into execution modules so that the platform-specific and low level logic are handled in exec modules, which frees the state module to concern itself with ensuring the minions are in the correct state
21:08 whytewolf I would sugest sys.doc and sys.doc_state
21:09 whytewolf err sys.state_doc
21:09 jfindlay milkyray: I've pinged one of the saltstack engineers as I'm not sure what the process is for adding a formula yet
21:10 murrdoc jfindlay:  just add a repo in saltstack-formulas
21:10 murrdoc and have the requestor send a pull
21:10 murrdoc the community reviews and merges
21:11 dalibro jfindlay: are you familiar with saltapi maybe? I'm banging my head for two days now with passing args to cloud runner and just can't figure it out :-(
21:11 twork ok, i read that distinction early on, it didn't make sense/sink in
21:11 twork thanks
21:11 milkyray jfindlay, murrdoc - Thanks
21:12 dalibro can't find any examples.. everything without args works just fine, passing kwargs works, just methods with args won't pass...
21:12 jfindlay dalibro: I am not that familiar, unfortunately.  You may want to try the salt-users mailing list if you don't find help here
21:13 murrdoc dalibro what u tryna do
21:13 jfindlay murrdoc: do you fork the repo into saltstack-formulas using github?
21:13 murrdoc nah forrest normally starts a blank repo
21:13 jfindlay oh, wait
21:13 murrdoc or iggy
21:14 murrdoc forking direct is le scary
21:14 jfindlay right :)
21:14 murrdoc code review everything
21:14 dalibro murrdoc: https://gist.github.com/daliborkrejic/b408baef463ae08812ff
21:14 dalibro this
21:14 otter768 joined #salt
21:14 akhter joined #salt
21:15 dalibro https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.cloud.html | salt.runners.cloud.create(provider, instances, **kwargs)
21:15 dalibro don't know how to passs provider & instances :-(
21:17 dalibro File "/usr/lib/python2.6/site-packages/salt/utils/__init__.py", line 989, in format_call used_args_count
21:17 dalibro SaltInvocationError: create takes at least 2 arguments (0 given)
21:17 dalibro this is what i get
21:18 dalibro everything without args works just fine
21:21 jab416171 joined #salt
21:32 gimpy2938 joined #salt
21:34 dalibro haha
21:34 dalibro got it :D
21:34 murrdoc :)
21:35 dalibro - tornado + cherrypy :-)
21:38 gumpX joined #salt
21:41 sgargan joined #salt
21:45 DammitJim man, the comments for a state result aren't very good when there is a problem
21:45 DammitJim what does: One or more requisite failed: tomcat6.tomcat6 for a file managed?
21:46 iggy murrdoc: I can't create repos
21:46 iggy which seems odd, but whatevs
21:47 murrdoc me either
21:47 murrdoc also odd
21:48 iggy and I don't think forrest is IRC'ing for a while
21:48 rem5 joined #salt
21:49 murrdoc what u do
21:52 L2SHO joined #salt
21:53 babilen iggy: How so?
21:53 L2SHO Any idea when a new version of salt is going to be released?  I really want to be able to use network.ip_addrs6(cdir="")
21:59 iggy babilen: rephrase the question?
22:00 iggy L2SHO: you can copy the network module from devel and it'll probably work
22:01 L2SHO iggy, Would I only need to do that on the master, or on every minion too?
22:01 whytewolf deploy it as a custom module _modules
22:02 iggy ^ which gets sync out to the minions (either by a saltutil.sync_all or a highstate)
22:05 Theo joined #salt
22:05 L2SHO Hmm, I guess I'll have to read about that.  I've never  used any custom modules before.
22:08 ajw0100 joined #salt
22:11 HardWall joined #salt
22:16 edrocks joined #salt
22:24 ajw0100 joined #salt
22:24 sfxandy joined #salt
22:30 quasiben joined #salt
22:33 digitalhero joined #salt
22:33 baweaver joined #salt
22:35 rem5 joined #salt
22:35 subsignal joined #salt
22:39 mpanetta joined #salt
22:41 rem5_ joined #salt
22:45 zenlot1 joined #salt
22:50 andrew_v joined #salt
22:52 Rumbles joined #salt
22:55 wangofett joined #salt
23:03 quasiben joined #salt
23:05 digitalhero joined #salt
23:10 subsignal joined #salt
23:11 viq how do I concatenate a jinja variable with text in a {{ }} block? see the env statement at the end of https://pbot.rmdir.de/3PoPmIRo4eALoOl1Sjx3vg
23:14 wangofett viq: ~ is the jinja text concat operator
23:14 wangofett does that not work?
23:15 wangofett {{ some_var ~ 'This is my text' }} should work
23:15 viq wangofett: seems + worked
23:15 otter768 joined #salt
23:15 viq https://pbot.rmdir.de/HYJIQc-6p3t0vvXLBhPLgg like so
23:16 nZac joined #salt
23:17 viq Getting real close now to what I want to do :D
23:20 nZac joined #salt
23:24 colegatron joined #salt
23:25 murrdoc u go viq
23:28 viq WIP of putting plumbing in place to have duplicity do backups to hubic https://pbot.rmdir.de/7BwPBCYz4YEw9otvH_ItKg
23:30 Snicers I am trying to figure out how to use formulas. Do I need to put it in my pillar folder?
23:31 viq Snicers: https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
23:32 Snicers I have read that viq . I have a top file in my pillars folder and my salt folder
23:32 Snicers so I am unsure what goes where.
23:32 baweaver joined #salt
23:32 Snicers I already have GitFS all set up.
23:33 iggy you add it to your file_roots/gitfs_root/etc and then you create the pillar data that should look similar to pillar.example from the formula
23:33 * viq lets iggy take over and goes offline
23:34 amcorreia joined #salt
23:34 Snicers iggy: so lets say I have done that. I have my pillars/top.sls, inside of it I have my base with '*' and - mysql
23:35 Snicers This is installing mysql and says it updated root password but the my.cnf isn't updating and the password doesn't work when I try to mysql into the server.
23:35 iggy "says it updated the root password?
23:36 iggy a console output paste is worth 20 words
23:36 Snicers yea, getting you a gist now.
23:37 Snicers https://gist.github.com/anonymous/1b816683fa7506f42da9
23:37 Snicers But the my.cnf file doesn't ever update.
23:37 whytewolf also, whidebconf != my.cnf
23:37 whytewolf debconf != my.cnf
23:38 Snicers I know. I have made changes to the forumla's pillar and would expect an updated change on highstate yea?
23:38 whytewolf is that the only thing that shows in the state run?
23:38 iggy I don't generally suggest people use the formulas on their first pass through salt land
23:39 iggy and some formulas I don't suggest people ever use
23:39 whytewolf ^
23:39 Snicers https://gist.github.com/anonymous/3042388aa7887692aab3#file-gistfile1-txt-L8
23:39 Rumbles joined #salt
23:40 RobertChen117 joined #salt
23:40 Snicers whytewolf: no there is a lot that shows in the state run, but that is the only change.
23:43 whytewolf Snicers: where are you looking for the my.cnf file? cause reading this server.sls file from mysql-formula kind of makes me go wtf
23:44 whytewolf https://github.com/saltstack-formulas/mysql-formula/blob/8a59137dc42281c20fb848616f3efcc3543a5001/mysql/server.sls#L97-L103
23:48 Snicers https://github.com/saltstack-formulas/mysql-formula/blob/8a59137dc42281c20fb848616f3efcc3543a5001/pillar.example#L27-L33
23:48 Snicers Can I not just update this in the pillar?
23:48 coval3nce joined #salt
23:48 whytewolf the pillar.example is just an example you need to recreate it in your pillar which is a compleatly seperate system
23:49 Snicers So does a pillar only execute once? Sorry I am new to Salt.
23:50 whytewolf pillar doens't "execute" it is a data structure
23:50 whytewolf https://docs.saltstack.com/en/latest/topics/pillar/
23:51 Snicers I get that.
23:51 Snicers https://gist.github.com/anonymous/d4541652ba2d1e1feb04
23:51 Snicers That is my pillar setup right now.
23:52 whytewolf does it show up like that when you do a pillar.get mysql
23:52 Snicers If I update things in mysql.sls I would expect them the be read on a highstate call, is this not correct?
23:53 whytewolf also, even though highstate should do a pillar_refresh at the start. it generally is best to make sure it gets done before hand with a salt '*' saltutil.pillar_refresh
23:53 Snicers nothing shows up
23:54 Snicers I did the refresh, still nothing under pillar.get mysql
23:54 Snicers pillar.get users works as expected...
23:54 whytewolf check your salt master log and look for a rendering error
23:55 murrdoc or run show_sls
23:55 iggy salt-key -L shows a key called "Minion-Salt" ?
23:56 digitalhero joined #salt
23:56 Snicers iggy: yes
23:57 iggy k, I'm just to seeing a bunch of stuff after that (i.e. a fqdn)

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