Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-03-28

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

All times shown according to UTC.

Time Nick Message
00:00 RandalSchwartz the official way is with the standard monitor thing
00:01 gregorstocks joined #salt
00:01 RandalSchwartz launchd
00:02 arrose_ ok, so salt-minion doesn't generate it's own launchd on launch
00:02 gregorstocks I just upgraded all my Salt boxes to 2014.1.0 and now only a handful of them seem to be responding to test.ping. the ones I've looked at do appear to all be running at least one instance of salt-minion. any idea what could be wrong?
00:04 googolhash joined #salt
00:05 gregorstocks manually running the new version of salt-minion on a box does make it start responding, but the whole reason I have salt is so I don't have to ssh into dozens of machines individually and run commands
00:05 n8n joined #salt
00:06 gregorstocks sudo salt-run manage.up shows the same thing. i'm guessing i gotta just man up and do it all by hand
00:07 * obimod bashes head on keyboard after realizing there's a tls module
00:13 krow joined #salt
00:14 [diecast] joined #salt
00:17 scalability-junk joined #salt
00:18 seapasulli joined #salt
00:20 n8n joined #salt
00:24 justlooks joined #salt
00:29 srage joined #salt
00:30 meteorfo_ joined #salt
00:31 srage_ joined #salt
00:36 gregorstocks fwiw my solution was creating a file with one server IP address per line and running: for host in `cat servers.txt` ; do echo $host ; ssh -o "StrictHostKeyChecking no" $host 'sudo nohup salt-minion >/tmp/salt-minion-output 2>/tmp/salt-minion-error &' ; done
00:40 n8n joined #salt
00:44 andrej Hmmm ... I think I need to grokk python better :(
00:45 andrej I made a copy of the minions.py file, created a new function that I think should do what I want, tacked a print CkMinions.connected_minion_ip('playpen') at the end and got
00:45 andrej TypeError: unbound method connected_minion_ip() must be called with CkMinions instance as first argument (got str instance instead)
00:46 gregorstocks andrej: sounds like that's a method on CkMinions objects, not a function. so you'd need to have a CkMinions object and then do (assuming it's called x) x.connected_minion_ip('playpen')
00:47 andrej Thanks gregorstocks - I'll investigate :)
00:48 andrej Do you know how I'd "instantiate" a minion object?
00:48 gregorstocks no clue - I don't know anything about Salt's code, I just know a bit about python
00:48 yomilk joined #salt
00:48 andrej Heh - no worries - you know way more than me :}
00:52 whiteinge andrej: you shouldn't need that whole minions file. you should be able to just extract that one function into a runner module
00:52 whiteinge sorry if i led you astray there
00:55 vejdmn joined #salt
00:56 bemehow joined #salt
00:59 andrej No worries whiteinge  -  I have no idea what I'm doing
00:59 andrej :)
00:59 andrej No, that's not true
00:59 taion809 joined #salt
00:59 andrej I know what I want, but I lack an understanding of both python & salts framework
01:00 andrej If I used salt's CLI interface and bash I'd have a working solution in aunder an hour, I'm sure
01:00 andrej But that seems unclean :)
01:00 whiteinge :)
01:00 andrej I'll have a look at what a runner module is, and how to make one :D
01:00 whiteinge salt has more than a few salt-isms
01:01 whiteinge sec...i have a pastebin for you
01:01 yano joined #salt
01:01 andrej cheers mate :)
01:04 hotsnow joined #salt
01:04 whiteinge andrej: http://paste.fedoraproject.org/89386/39596867
01:05 whiteinge edit your master config. defined the "extension_modules" setting to point to some directory
01:05 whiteinge make a "runners" directory inside that directory
01:05 whiteinge put that pastebin inside the "runners" directory named minion_ips.py
01:05 whiteinge restart the salt-master
01:06 whiteinge then run: salt-run minion_ips.connected show_ipv4=Tru
01:06 whiteinge then run: salt-run minion_ips.connected show_ipv4=True
01:06 andrej Wow
01:06 andrej You rule :)
01:07 allanparsons joined #salt
01:07 allanparsons how do i require an sls?
01:07 allanparsons an include + reuire:\n sls: <name> isnt working
01:09 allanparsons require*
01:10 vbabiy joined #salt
01:10 whiteinge allanparsons: that is the right syntax
01:10 allanparsons nm ok
01:10 allanparsons hm*
01:10 whiteinge what version of salt are you on?
01:11 allanparsons Comment: The following requisites were not found:
01:11 allanparsons require:
01:11 allanparsons sls: node
01:12 andrej awesome
01:12 allanparsons 2014.1.0
01:12 andrej This is truly amazing whiteinge
01:13 allanparsons http://pastebin.com/ePvjjtUJ
01:13 andrej My next piece of the puzzle is: in a state, how can I find use the IP of the minion currently acted upon? :)
01:13 andrej find/use
01:15 dave_den joined #salt
01:16 whiteinge allanparsons: do the states in node.sls show up when you run state.show_highstate (or state.show_sls <slsname>)?
01:17 allanparsons 1 sec...
01:18 whiteinge andrej: you can grab the ip from {{ grains.ipv4 }} in a state but that will be a list of all ips again
01:18 yano joined #salt
01:18 andrej Yah ...
01:19 andrej can I use the runner to define a custom grain, e.g., salt_ip for each minion?
01:19 allanparsons whiteinge... the state definitions within the sls.sls show up
01:20 Gifflen joined #salt
01:20 allanparsons http://pastebin.com/mCESyVsZ
01:21 allanparsons and here's my wordpress.sls:  http://pastebin.com/F10kitNx
01:21 Gifflen joined #salt
01:23 whiteinge allanparsons: did you remove the ``include: [node]`` and ``- require: [sls: node]`` from that wordpress.sls pastebin?
01:24 whiteinge andrej: runners execute on the master. i'm not sure offhand how to make that same connected-ip check from the minion
01:24 Networkn3rd joined #salt
01:25 allanparsons whiteinge:  heres my full sls: http://pastebin.com/UGW6XMNT
01:26 andrej fair enough :)
01:28 xzarth joined #salt
01:28 whiteinge allanparsons: if you run ``state.show_sls wordpress`` the states from node.sls should be visible due to the ``include``. so i'm guessing that {% if %} at the top is where the breakage is
01:29 whiteinge are those roles grains set before the state run or durin?
01:29 whiteinge *during?
01:29 allanparsons those grains are sync'd at startup
01:30 allanparsons so the first thing i do when an ec2-instance boots is saltutil.sync_grains
01:30 andrej Can I run runner code during the execution of a state?
01:32 allanparsons whiteinge - i can see the node-dirs and node-install portions present when i run show_sls
01:32 whiteinge andrej: you can if you whitelist it: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.publish.html#salt.modules.publish.runner
01:32 whiteinge http://docs.saltstack.com/en/latest/ref/peer.html#peer
01:33 ipalreadytaken joined #salt
01:34 andrej thanks again - you're a life-saver.
01:34 andrej Hope I'll grokk all this some day
01:34 allanparsons whiteinge - i just removed the {% if %} to test....
01:35 allanparsons same issue - cant find the sls
01:36 whiteinge andrej: np!
01:36 whiteinge allanparsons: hm :(
01:36 whiteinge what is in node/init.sls? is it just includes?
01:36 allanparsons yea
01:37 allanparsons include:   - node.common-deb
01:37 whiteinge i wonder...
01:37 allanparsons also
01:37 allanparsons my full state i posed loops
01:37 allanparsons posted*
01:37 allanparsons do i lose scope in a loop?
01:37 whiteinge yeah
01:38 allanparsons can i have a double include?
01:38 dave_den joined #salt
01:38 whiteinge anything defined in the loop stays in the loop
01:38 allanparsons within an SLS file?
01:38 whiteinge i don't follow
01:39 allanparsons in ( http://pastebin.com/UGW6XMNT ) can i have include:     - apache    and then on L133 have:  include:     - node     - wordpress
01:39 allanparsons in ( http://pastebin.com/UGW6XMNT ) can i have on L1  include:     - apache    and then on L133 have:  include:     - node     - wordpress
01:41 whiteinge what is "L133"?
01:42 allanparsons nope
01:42 allanparsons conflicting id: include
01:42 allanparsons that doesnt work
01:42 allanparsons L133 = Line #133
01:42 whiteinge oh, gotcha. yeah, one include per sls
01:43 whiteinge so i'm fuzzy on how the require statement works with sls files, but i wouldn't be surprised if it's looking at the __sls__ value you see when you run state.show_sls
01:43 allanparsons ugh
01:43 allanparsons then the docs are wrong
01:44 allanparsons and if you include the sls
01:44 whiteinge test it with   ``- require: [sls: node.common-deb]`` to see if the require failure goes away
01:44 allanparsons you'd likely have to reference the file: from_included_sls   or cmd: from_included_sls
01:45 allanparsons in brackets?
01:45 whiteinge sorry, no -- distracting irc shorthand. regular syntax
01:45 meteorfox joined #salt
01:47 whiteinge in other words, ignore "node.sls" and try include/require "node.common-deb" instead
01:55 allanparsons whiteinge... thx! that worked.
01:55 andrej Ah stuff unclean
01:55 andrej salt-run minion_ips.connected show_ipv4=True | awk 'NR%2!=0{gsub(/:/,"");printf "%s\t", $1} NR%2==0{print $1}' | while read host ip; do salt $host grains.append main_ip $ip;done
01:55 whiteinge allanparsons: egad!
01:55 allanparsons i'll update the docs
01:55 allanparsons if i have time ;)
01:56 whiteinge allanparsons: will you please file a ticket either way?
01:56 allanparsons sure
01:56 whiteinge maybe it can be fixed
01:57 whiteinge andrej: yay awk! :D
01:57 andrej Yah
01:57 andrej big fan
01:57 n8n joined #salt
01:58 andrej So I can now reference that grain from my states, right? :)
01:59 dangra joined #salt
02:00 whiteinge haha. i would expect so
02:00 * whiteinge slowly inches away from andrej
02:00 andrej LOL
02:05 stanchan joined #salt
02:06 Thiggy joined #salt
02:07 Linz joined #salt
02:08 sroegner joined #salt
02:13 rushm0r3 joined #salt
02:14 RandalSchwartz in the nick of time, project delivered to $client
02:14 RandalSchwartz now he can bring up an entire local version of his live website from a vagrant base box!
02:14 RandalSchwartz $client is happy
02:15 RandalSchwartz And I've learned a whole lot about salt
02:15 RandalSchwartz next step... salt all of his server machines, so that we can maintain them easier, or spin up a new one
02:19 ipalreadytaken joined #salt
02:21 jnials joined #salt
02:27 mpoole joined #salt
02:35 googolhash joined #salt
02:39 zain joined #salt
02:41 stanchan joined #salt
02:42 TyrfingMjolnir joined #salt
02:45 andrej Hmmm ... that won't work as I imagined.
02:45 robertlai joined #salt
02:45 andrej can a state that is run against minion a have something happen on the maste that will run something else against minion b?
02:45 andrej What I would like to accomplish: install splunk_forwarder on a and have the master tell b (the splunk server) to accept traffic from a.
02:52 vejdmn joined #salt
02:54 vejdmn joined #salt
02:54 tedski andrej: checkout the reactor system
03:00 vejdmn1 joined #salt
03:01 ipalreadytaken joined #salt
03:04 vejdmn joined #salt
03:04 forrest joined #salt
03:08 rushm0r3 joined #salt
03:08 fllr joined #salt
03:11 Luke__ joined #salt
03:16 jeddi joined #salt
03:16 TyrfingMjolnir joined #salt
03:24 garthk salt://filename… hang on. There should be three slashes.
03:25 forrest three slashes?
03:25 forrest you mean two
03:25 lionel joined #salt
03:28 toofer_ joined #salt
03:29 garthk joined #salt
03:30 joehh joined #salt
03:31 toofer_ joined #salt
03:32 jeddi joined #salt
03:32 nn0101 joined #salt
03:35 dangra joined #salt
03:41 yomilk joined #salt
03:42 jeremyfelt joined #salt
03:45 fllr joined #salt
03:53 yomilk joined #salt
03:54 googolhash joined #salt
03:57 Ryan_Lane1 joined #salt
03:57 Ryan_Lane joined #salt
03:59 snuffeluffegus joined #salt
04:01 bhosmer joined #salt
04:08 think-free__ joined #salt
04:09 faldridge joined #salt
04:09 sroegner joined #salt
04:11 n8n_ joined #salt
04:16 ajw0100 joined #salt
04:16 yomilk joined #salt
04:16 ipalreadytaken joined #salt
04:17 arthabaska joined #salt
04:17 ajw0100 joined #salt
04:17 krow joined #salt
04:42 ravibhure joined #salt
04:47 krow joined #salt
04:51 jalbretsen joined #salt
04:51 lionel joined #salt
05:03 cast joined #salt
05:03 Networkn3rd joined #salt
05:09 joehillen joined #salt
05:10 lionel joined #salt
05:21 schimmy joined #salt
05:23 stephanbuys joined #salt
05:25 schimmy1 joined #salt
05:25 garthk If I salt '*' tls.create_ca, won't that create a CA on every minion? http://intothesaltmine.org
05:41 krow joined #salt
05:43 yomilk joined #salt
05:47 krow joined #salt
05:48 krow1 joined #salt
05:50 honestly garthk: going to guess it creates the CA on the master and copies it to all minions.
05:50 honestly but I don't really know.
05:50 lionel joined #salt
05:50 garthk honestly: naah; it creates one on all minions
05:51 garthk honestly: I tried it
05:51 honestly a different one?
05:52 n8n joined #salt
05:54 honestly does it generate a different private key for the CA on all minions?
05:54 garthk honestly: I didn't diff them
05:56 garthk honestly: yep. All different.
05:56 honestly wow
05:56 honestly that's pretty damn useless.
05:56 garthk salt '*' cmd.run 'rm -rf /etc/pki/honestly'
05:56 garthk yep
05:59 Jusstin joined #salt
06:00 JustinC joined #salt
06:07 n8n joined #salt
06:09 Outlander joined #salt
06:10 sroegner joined #salt
06:19 garthk honestly: it gets worse
06:20 garthk honestly: the certificate it makes are invalid; the fussy Java libraries halt with Extensions not allowed in v2 certificate http://www.coderanch.com/t/205547/sockets/java/Extensions-allowed-certificate
06:21 garthk hmmm
06:21 garthk or might be perms somehow
06:21 garthk https://github.com/jruby/jruby/issues/1055
06:22 garthk nope; SSL_CERT_FILE didn't help
06:24 lionel joined #salt
06:32 ndrei joined #salt
06:42 justlooks_ joined #salt
06:44 justlooks_ joined #salt
06:45 NV joined #salt
06:51 fllr joined #salt
06:54 lionel joined #salt
07:06 lionel joined #salt
07:16 fllr joined #salt
07:19 n8n joined #salt
07:25 grosjean hi
07:30 rushmore joined #salt
07:30 rushm0r3 joined #salt
07:31 grosjean i got a prbolem with salt-master and salt-syndic
07:31 grosjean i've resumed my problem here:
07:31 grosjean http://pastebin.com/KQmHYauW
07:32 grosjean if anyone can help me ...
07:37 slav0nic joined #salt
07:37 slav0nic joined #salt
07:38 zain_ joined #salt
07:38 funzo_ joined #salt
07:38 Outlander left #salt
07:40 CeBe joined #salt
07:46 meteorfox joined #salt
07:57 dman777 joined #salt
08:00 Kenzor joined #salt
08:06 balboah joined #salt
08:10 carlos joined #salt
08:11 sroegner joined #salt
08:11 harobed joined #salt
08:12 engblom joined #salt
08:16 engblom I have a quick question before deciding to spend a lot of time learning salt: Is it possible to target offline machines and have them to get to the new state once they are booted, whenever it happens?  Or do all computers need to be online? salt '*' state.sls <file> seem to target only online computers.
08:18 rushmore engblom. you can set a queue on the minion to load the latest config at boot i believe
08:20 TyrfingMjolnir joined #salt
08:21 giantlock joined #salt
08:21 ChaosPsyke joined #salt
08:21 fllr joined #salt
08:28 ndrei joined #salt
08:31 krow joined #salt
08:33 yomilk joined #salt
08:37 gasbakid joined #salt
08:38 n8n joined #salt
08:40 mattmtl joined #salt
08:46 kermit joined #salt
08:51 fllr joined #salt
08:54 swissknife joined #salt
09:02 swissknife left #salt
09:07 rushmore anyone have an idea of how to find all jobs on a minion (finished and running) ?
09:08 babilen rushmore: http://docs.saltstack.com/en/latest/topics/jobs/index.html
09:09 yomilk joined #salt
09:10 rushmore can only find running or unique job id with salt-run.
09:10 rushmore jobs.list_jobs doesn't identify which minions it ran on.
09:11 rushmore i just want to say give me all jobs for minion1
09:11 babilen Right, sorry
09:12 babilen I wasn't aware that you've tried that already and that the specific problem you are trying to solve is to restrict the data to those concerning a single minion. Lets see if something like that exists.
09:15 vbabiy joined #salt
09:16 rushmore it looks like there should be aa way to do it from this line in jobs.py         ret = mminion.returners['{0}.get_jids'.format(returner)]()
09:17 rushmore or at leas tsome way to call it and jam in a minion id
09:17 topochan joined #salt
09:20 PNPPRV joined #salt
09:21 PNPPRV left #salt
09:25 shano joined #salt
09:25 ndrei joined #salt
09:26 bhosmer joined #salt
09:30 babilen rushmore: I can't find a anything that would allow you to do that ... weird, you would think that it is a fairly common requirement. I'd file a feature request.
09:31 rushmore i know right ?! seems like it's totally not an edge case
09:34 bhosmer joined #salt
09:38 TyrfingMjolnir joined #salt
09:44 millz0r joined #salt
09:44 hvn joined #salt
09:46 funzo joined #salt
09:48 ajw0100 joined #salt
09:49 mike25ro joined #salt
09:51 fllr joined #salt
10:04 dangra_ joined #salt
10:04 ndrei_ joined #salt
10:04 yota joined #salt
10:07 bram__ joined #salt
10:08 bram__ hi everyone - quick question: I would like to know if salt-cloud can be somehow also used to set up local development environments a la Vagrant/Virtualbox… I googled but I couldn’t really find what I was looking for…
10:08 bram__ I would really like to be able to set up a local development system that very closely matches the remote one
10:11 sroegner joined #salt
10:17 Dave_Kelliher joined #salt
10:27 johtso joined #salt
10:31 rushm0r3 joined #salt
10:32 hazzadous joined #salt
10:33 gasbakid joined #salt
10:34 funzo joined #salt
10:39 hvn left #salt
10:43 mortis anyone know if there will be something like saltconf in europe?
10:51 fllr joined #salt
10:52 ggoZ joined #salt
10:54 funzo_ joined #salt
10:56 MrTango joined #salt
10:57 dangra joined #salt
10:57 gadams999 joined #salt
10:58 gadams999 left #salt
10:59 che-arne joined #salt
11:00 n8n_ joined #salt
11:02 sm1ly joined #salt
11:03 gadams999 joined #salt
11:04 sm1ly hello all. I got salt master on fedora20, and salt minions on fedora20 too. so the question is: how to manipulate with salt to systemd services? for example - I cannot check does network started? and I dont using NM.
11:08 canci joined #salt
11:09 sm1ly hello all. I got salt master on fedora20, and salt minions on fedora20 too. so the question is: how to manipulate with salt to systemd services? for example - I cannot check does network started? and I dont using NM.
11:10 williamthekid_ joined #salt
11:15 sm1ly hello all. I got salt master on fedora20, and salt minions on fedora20 too. so the question is: how to manipulate with salt to systemd services? for example - I cannot check does network started? and I dont using NM. service.get_all talks that only network.target I have.
11:21 bram__ joined #salt
11:23 younqcass joined #salt
11:25 ekristen joined #salt
11:30 hotsnow joined #salt
11:39 pviktori joined #salt
11:44 diegows joined #salt
11:51 fllr joined #salt
12:01 jcsp joined #salt
12:01 millz0r sm1ly: dont really understand where you going
12:01 millz0r sm1ly: not sure how you want to check if network has started from a REMOTE server
12:02 sm1ly millz0r, I mean I want to check if network.service started or not. I cant do this, cause service.get_all talks that there is no suck service
12:02 millz0r try
12:02 millz0r service.running network
12:03 millz0r http://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html
12:08 sm1ly millz0r, service.running network
12:08 sm1ly I can only service.status network which gives me True. but I dont know how to put it to sls files
12:09 sm1ly nginx2.abboom.world:
12:09 sm1ly "service.running" is not available.
12:09 millz0r ah you're using the CLI?
12:09 millz0r so
12:09 millz0r the reason for that
12:09 millz0r there is  a differenc between salt module and salt state
12:10 sm1ly millz0r, I just testing with cli. and I use sls files
12:10 millz0r you are using CLI so you are using modules
12:10 millz0r states are like wrappers around modules
12:10 millz0r use the state service.running
12:10 sm1ly millz0r, ok. stop. see
12:10 millz0r service.running:
12:10 millz0r - name: network
12:10 millz0r that should work in sls
12:10 Gifflen joined #salt
12:10 bram__ joined #salt
12:11 sm1ly millz0r, hey, I cant service.running
12:11 millz0r show me your .sls file and the commnads you run please
12:12 nineteeneightd joined #salt
12:12 sroegner joined #salt
12:14 sm1ly millz0r, top.sls, nginx1net.sls and log of command http://pastebin.com/PRqCd6yg
12:16 rushmore joined #salt
12:17 balltongu_ joined #salt
12:23 bhosmer_ joined #salt
12:24 oz_akan_ joined #salt
12:24 bhosmer__ joined #salt
12:28 DelPede joined #salt
12:31 elfixit joined #salt
12:33 sm1ly millz0r, so, any ideas?
12:35 jeremyBass joined #salt
12:36 millz0r sm1ly: it seems like there is no service named network
12:37 millz0r at least thaats what salt see
12:37 millz0r s
12:37 millz0r sudo service network status
12:37 millz0r does that work for you?
12:38 sm1ly millz0r, it sending me to systemctl. so the I writing systemctl restart network or network.service
12:42 Shish how do I make "salt-call blah" use the same short-form (one line per state) output as "salt <servername> blah"?
12:42 millz0r maybe systemctl is not supported by service module
12:43 millz0r you can always try running it in cmd.run
12:43 untamo13 joined #salt
12:44 jeremyBass left #salt
12:44 sm1ly millz0r, but how describe it in *.sls ?
12:45 Networkn3rd joined #salt
12:46 napper joined #salt
12:48 millz0r cmd.run:
12:48 millz0r - name: systemctl restart network
12:49 herohero joined #salt
12:51 CeBe joined #salt
12:51 fllr joined #salt
12:52 Gifflen joined #salt
12:56 sm1ly millz0r, oh, okey, understand,thx
12:56 millz0r np
12:57 ndrei joined #salt
12:58 sm1ly millz0r, can u help me some more, look. http://pastebin.com/PDzqwg4F \this is my top.sls and directory listing. how I can do in top.sls that nginx.sls are in nginx folder?
13:00 jslatts joined #salt
13:02 musinsky_ is there a way to add a grain to a minion and have it take effect without having to restart the salt-minion?
13:03 millz0r ys
13:03 millz0r sudo salt-call grains.setval tag blabla
13:03 untamo13 joined #salt
13:04 vejdmn joined #salt
13:04 musinsky_ thanks!
13:05 millz0r sm1ly: yes
13:05 millz0r salt looks for init.sls file in every directory
13:06 millz0r so if you put nginx.sls in as nginx/init.sls
13:06 jaimed joined #salt
13:06 millz0r you can call the state in the same manner, eg. sudo state.sls nginx
13:06 millz0r then if you put some more files in the folder, they are 'substates'
13:06 millz0r so for instance salt state.sls nginx.nginx2net
13:06 millz0r for nginx/nginx2net.sls
13:07 srage joined #salt
13:08 n8n joined #salt
13:09 faldridge joined #salt
13:10 racooper joined #salt
13:12 younqcass joined #salt
13:12 topochan joined #salt
13:16 sm1ly millz0r, can I do double subfolders? like /nginx/nginx_fedora/init.sls ? how I can describe it in top.sls? or I can desc it only in /nginx?
13:17 sm1ly like nginx/init.sls and if grains os fedora than nginx_fedora it link me to nginx/nginx_fedora/init.sls
13:17 millz0r not sure about that
13:17 millz0r you can try it though, ive never done it
13:17 sm1ly millz0r, ok. I think I can try it) thx for ur cooperation
13:17 millz0r np
13:17 * sm1ly going to salt all cluster)
13:18 Linz joined #salt
13:20 sroegner joined #salt
13:22 oz_akan_ joined #salt
13:25 sm1ly its awesome and great)
13:26 xmj sm1ly: the interesting question is, why do you need to double folders?
13:26 xmj such things can better be achieved with grains and templates
13:27 sm1ly xmj, I just learning this tool)
13:27 mpanetta joined #salt
13:27 R_Shackleford joined #salt
13:28 sm1ly xmj, yeah, I start using grains. but it was after my questions)
13:29 mike25ro hey guys.. i am managing /etc/fstab with salt and i am adding mount points using file.append so far so good. I want to know if is possible to check if a record exists before running the state... so i don't end up with duplicates.. or something like that...compare the entire row with something from my state or jinja
13:29 seapasulli joined #salt
13:29 sm1ly mike25ro, Im newbie, but u can compare tail -n1 of ur fstab file with the right line
13:30 sm1ly something like this
13:31 sm1ly ok. cya) have a nice weekend)
13:31 sm1ly thx 2 all
13:31 Linz joined #salt
13:38 mpanetta_ joined #salt
13:38 Gifflen_ joined #salt
13:39 higgs001 joined #salt
13:40 Gifflen__ joined #salt
13:41 millz0r mike25ro: there is a dedicated state for that
13:41 millz0r http://docs.saltstack.com/en/latest/ref/states/all/salt.states.mount.html
13:42 millz0r remember to set persist to True
13:42 vejdmn joined #salt
13:43 ajprog_laptop joined #salt
13:44 quickdry21 joined #salt
13:49 mpanetta joined #salt
13:51 fllr joined #salt
13:53 Linz joined #salt
13:54 ipmb joined #salt
13:58 shiin joined #salt
14:00 Dave_Kelliher joined #salt
14:04 GradysGhost joined #salt
14:05 mike25ro millz0r: thanks a lot
14:06 millz0r np
14:06 srage joined #salt
14:09 lionel joined #salt
14:09 DavidK joined #salt
14:10 kzx joined #salt
14:10 viq Can I set state providers via pillars, or does it need to be done via minion config?
14:12 bram__ joined #salt
14:16 mike25ro does any of you guys have an example of using : states.mount  for a NFS drive ? thanks in advance
14:21 Gifflen joined #salt
14:22 pass_by_value joined #salt
14:32 babilen mike25ro: Yes, didn't I share it with you the other day?
14:34 babilen mike25ro: http://paste.debian.net/90211/
14:35 Gifflen joined #salt
14:38 mgw joined #salt
14:39 TyrfingMjolnir joined #salt
14:39 millz0r viq: nto sure what you mean by that but yes you can specify states root in minion config
14:39 millz0r afaik cant do it in pillars, might be possible in grains tho
14:39 millz0r i dont know
14:39 xunil joined #salt
14:40 millz0r mike25ro: yes
14:41 stanchan joined #salt
14:42 viq millz0r: eg. on freebsd I want to force pkg provider to be pkgng
14:43 millz0r thats in grains configuration AFAIK
14:43 mgw joined #salt
14:43 n8n joined #salt
14:44 xmj why do you think you need to force that?
14:44 xmj pkgng is like the only provider we have (on all modern enough systems :-))
14:44 shiin left #salt
14:44 viq xmj: because on FreeBSD < 10 it wants to use the other one
14:44 xmj ugh
14:44 xmj right
14:45 viq http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pkgng.html
14:45 millz0r #PortageMasterRace
14:46 * viq drops an anvil on millz0r and continues conversation ;)
14:47 viq millz0r: I don't think it's even grains, just minion config the way I saw it described
14:47 viq http://docs.saltstack.com/en/latest/ref/states/providers.html
14:48 millz0r how about using that provider stuff?
14:48 millz0r oh wait you want to have it diffenrt on minions
14:48 millz0r orite
14:48 millz0r what you can do
14:48 millz0r is do something like
14:48 millz0r if grains=freebsd 9 provider = something
14:48 millz0r in the salt states themselves
14:49 viq I was hoping for a more global setting, so eg I would be able to use existing formulas, assuming other bits took into account FreeBSD specific things
14:49 xmj see if viq wants to use that regardless of settings he can just leave out the conditional
14:51 viq Not that it matters much for the conversation, but I'm trying to update salt-formula to take *BSDs into account - https://github.com/viq/salt-formula
14:51 fllr joined #salt
14:51 mike25ro babilen: thanks :) i am blind
14:52 conan_the_destro joined #salt
14:53 bhosmer joined #salt
14:55 babilen mike25ro: Assuming you want nfs4 :)
14:55 mike25ro i have nfs3
14:55 mike25ro i changed the nfs4 to nfs ... but nothing happens.. let me debug a bit
14:56 viq OK, I need to be running for now, cya
14:56 meteorfox joined #salt
14:57 JustinC joined #salt
14:57 babilen mike25ro: You then obviously don't want idmapd (but then you really want nfs4) ;)
14:58 babilen bbl
15:00 mike25ro babilen:  :)
15:00 eliasp does anyone know of a module which allows to set the hostname of windows minions to their minion ID?
15:03 sroegner eliasp: what would be the command to do that with?
15:05 spiette joined #salt
15:06 eliasp sroegner: looks like WMI can be used: wmic computersystem where name="%COMPUTERNAME%" call rename name="NEW-NAME"
15:07 frasergraham joined #salt
15:07 sroegner eliasp:  i wrote/use a formula to do this sort of thing on Linux and was wondering about this being portable
15:09 eliasp sroegner: ah, great… can you share it?
15:09 sroegner eliasp: https://github.com/saltstack-formulas/hostsfile-formula
15:09 fllr joined #salt
15:09 JasonSwindle joined #salt
15:10 eliasp sroegner: fantastic, thanks a lot
15:10 dbanck joined #salt
15:11 eliasp sroegner: ok, the overall idea of this formula is something different, but the hostsfile.hostname function might be very useful here… probably would also nice having it integrated upstream
15:11 eliasp let's see what I can come up with
15:11 sroegner eliasp: exactly that
15:12 sroegner eliasp: and maintaining a hostsfile might end up being just as useful on Windows
15:13 JasonSwi_ joined #salt
15:13 eliasp sroegner: well, right… but the hostsfile on windows (is except of the different path + line-endings) just the same as on POSIX, so this might be the easiest part ;)
15:13 eliasp throw some Augeas at it and it#s done ;)
15:13 sroegner eliasp: :-) I just pulled the augeas part back out
15:13 eliasp ah, didn't look that closely at it yet ;)
15:15 herzi I'm getting “State pkg.installed found in sls sudo is unavailable” in a new debian7 minion (after installing salt via bootstrap.sh)
15:15 herzi do I have to manually configure salt to use aptpkg for that, now?
15:16 eliasp sroegner: a good place upstream might be salt.modules.win_system which already has things like set_computer_desc, set_computer_name etc.
15:17 jeremyfelt joined #salt
15:17 sroegner eliasp: noted ...
15:19 bezaban yay. rewrote my states to utilize pillars more
15:19 meteorfox joined #salt
15:19 rgbkrk joined #salt
15:19 bezaban starting to feel like I'm getting somewhere :)
15:20 eliasp I wish I wouldn't have to manage Windows minions… Win is just a huge PITA to debug… but the upside: I got SaltStack to assist me in managing this hell ;)
15:21 sroegner eliasp: what kind of stuff do you run on Win?
15:21 eliasp sroegner: for now, only package management using a win_repo
15:21 bezaban but my naming isn't quite right.  Keep giving things explicit names so I know what it is, but then they don't make sense when I re-use the pillar-data or state in something else
15:22 rgbkrk_ joined #salt
15:22 eliasp but I'll have to do much more later… automatically join clients a domain, set hostname to minion ID, set global DNS suffix for DHCP DNS-registration, deploy desktop shortcuts, create default Thunderbird/Firefox profiles for new users, etc.
15:24 timoguin joined #salt
15:24 sroegner eliasp: lots of stuff
15:24 tyler-baker joined #salt
15:25 rgbkrk joined #salt
15:25 eliasp oh btw: Joining a domain: any idea why trying to join a domain results in this traceback? http://pastebin.kde.org/piju7nchk
15:27 eliasp hmm, ok… there's "add_ou = 'AccountOU="{4}"'.format(ou)" in this line which will never work, if only 4 arguments are provided
15:31 wendall911 joined #salt
15:31 LinuxBill joined #salt
15:31 JasonSwindle joined #salt
15:31 LinuxBill is it wise to keep your master and minions on the same version of salt?
15:32 eliasp LinuxBill: wise yes, but most stuff should still work with different versions
15:32 mike25ro LinuxBill: yep
15:35 higgs001 joined #salt
15:38 JasonSwindle joined #salt
15:38 LinuxBill cheers. will try to keep it that way
15:40 meteorfox joined #salt
15:40 meteorfox joined #salt
15:42 eliasp sroegner: another thing which will be urgently needed here/I plan to look into: manage windows updates… like: get list of available updates from clients and then approve/whitelist them manually in a SLS
15:43 eliasp sroegner: currently, keeping the clients update is pure hell and I don't want to completely auto-update them due to some updates I know to break some stuff in our environment for some specific applications etc.
15:43 eliasp besides that: I never want neither Silverlight nor Bing Desktop installed :)
15:46 JasonSwindle joined #salt
15:51 smurfy_ joined #salt
15:52 smurfy_ hi all, what are some ways people are securely pre seeding to minions?
15:52 ipalreadytaken joined #salt
15:52 ajprog_laptop joined #salt
15:54 timoguin smurfy_, I'm using salt-cloud on my master, which creates keys and copies them over via ssh
16:01 crane hmm... i would like to run a cmd if a file is not existing... require: - file.append /foo/bar seems to be not the right way?
16:02 timoguin crane, someone in here did that yesterday by using an unless like this: - unless: [ -f file/path ]
16:02 timoguin i think that's how they did it
16:02 crane timoguin, let me try that :)
16:03 transtipper anyone else use salt behind a pfsense firewall?
16:03 crane timoguin, fixed. thanks! :)
16:04 timoguin great. :)
16:05 bhosmer joined #salt
16:08 bemehow joined #salt
16:09 kballou joined #salt
16:10 jalbretsen joined #salt
16:10 schimmy joined #salt
16:10 hunter joined #salt
16:14 schimmy1 joined #salt
16:17 Networkn3rd joined #salt
16:17 JasonSwindle joined #salt
16:23 sijis whiteinge: ping - is this on the right track? (i haven't really tested it) - http://paste.fedoraproject.org/89569/02382713/
16:25 jalbretsen1 joined #salt
16:28 LinuxBill left #salt
16:30 millz0r joined #salt
16:31 danielbachhuber joined #salt
16:37 yomilk joined #salt
16:37 KyleG joined #salt
16:37 KyleG joined #salt
16:37 mgw joined #salt
16:39 bhosmer joined #salt
16:40 meteorfox joined #salt
16:46 wkf joined #salt
16:48 toofer_ joined #salt
16:48 joehillen joined #salt
16:49 carlos joined #salt
16:49 think-free joined #salt
16:49 ajw0100 joined #salt
16:50 Thiggy joined #salt
16:52 chrisjones joined #salt
16:52 conan_the_destro joined #salt
16:53 timoguin joined #salt
16:53 think-free_ joined #salt
16:53 smurfy_ so is salt cloud relying on a user data type injection for the vm[priv_key] to be available to the minion?
16:54 smurfy_ i.e. user data on ec2
16:54 stephanbuys joined #salt
16:55 frasergraham joined #salt
16:56 smcquay joined #salt
16:58 think-free__ joined #salt
16:59 djaime joined #salt
17:00 nlb joined #salt
17:04 napper joined #salt
17:06 timoguin smurfy_, it relies on SSH keys being configured on the cloud service. the user i run salt-cloud as has that default key.
17:07 zain joined #salt
17:07 conan_the_destro joined #salt
17:07 ravibhure joined #salt
17:09 think-free joined #salt
17:12 hunter joined #salt
17:13 all_the_fisch joined #salt
17:20 think-free joined #salt
17:21 JasonSwindle joined #salt
17:23 jaimed joined #salt
17:23 KyleG joined #salt
17:23 KyleG joined #salt
17:24 hazzadous joined #salt
17:25 think-free_ joined #salt
17:26 foxx joined #salt
17:26 foxx joined #salt
17:26 smcquay_ joined #salt
17:27 dave_den joined #salt
17:29 kermit joined #salt
17:31 smcquay joined #salt
17:36 kula I have a vague notion this was fixed at some point: https://gist.github.com/tlk2126/9838351
17:36 krow joined #salt
17:36 kula But it's coming back to haunt me. I've even got a mount.py in my _modules directory which I think I did ages ago to get around this problem, which interestingly this machine doesn't seem to be using.
17:39 fllr joined #salt
17:40 Ryan_Lane joined #salt
17:41 arrose joined #salt
17:42 think-free joined #salt
17:46 spiette joined #salt
17:47 oeuftete How is 'salt-call --retcode-passthrough' supposed to work?  I thought when I ran it with state.highstate that $? would be 0 if all states succeeded, but it's 2.
17:48 oeuftete without --retcode-passthrough I get $? 0 whether the states worked or didn't
17:49 bhosmer_ joined #salt
17:49 think-free_ joined #salt
17:49 helix7 left #salt
17:50 timoguin joined #salt
17:52 n8n joined #salt
17:52 R_Shackleford joined #salt
17:53 smurfy_ joined #salt
17:56 think-free joined #salt
17:59 meteorfox joined #salt
18:00 topochan joined #salt
18:00 think-free_ joined #salt
18:03 higgs001_ joined #salt
18:03 Nexpro1 joined #salt
18:04 arrose joined #salt
18:04 diegows joined #salt
18:04 arthabaska joined #salt
18:04 kvbik joined #salt
18:05 oeuftete ok, I found the chains of PRs and issues associated with this.  I guess I'll work around for now
18:07 think-free joined #salt
18:08 druonysus joined #salt
18:08 druonysus joined #salt
18:09 arthabaska joined #salt
18:11 fllr joined #salt
18:13 mgw I've got an old 11.10 Ubuntu system
18:13 mgw Exception AttributeError: "'SREQ' object has no attribute 'poller'"...
18:13 mgw Is there a ppa I should be grabbing zmq from?
18:13 think-free_ joined #salt
18:14 whiteinge sijis: that paste dissapeared. paste again?
18:15 mgw maybe I should just give up. it seems the latest version of salt packaged for 11.10 is 0.15.1
18:20 think-free joined #salt
18:22 druonysus whiteinge: I installed python-ldap and I am still getting that error in the log when trying to connect
18:23 sijis whiteinge: sure. one sec
18:23 druonysus whiteinge: could it be some setting i have set incorrectly in my master config?
18:25 sijis whiteinge: here ya go. http://paste.fedoraproject.org/89596/96031121/
18:25 n8n joined #salt
18:25 sijis whiteinge: its a little different than what i original pasted but this works.
18:29 sijis whiteinge: i also thought i would pass a 'profile' param.. in case there's a need for 'pepper --profile=dev * test.ping (type thing)
18:29 sijis maybe not needed. who knows
18:29 whiteinge druonysus: did you restart the master after installing that package
18:29 whiteinge ?
18:30 sijis whiteinge: i'm talking about the get_login_details() method i created
18:30 bretep joined #salt
18:31 hunter joined #salt
18:31 whiteinge sijis: ooh, you kept the env vars as overrides. that looks great!
18:31 higgs001 joined #salt
18:32 druonysus whiteinge: yes
18:33 bretep joined #salt
18:33 whiteinge dang. i was sure that was it. will you please try the following: python -c 'import ldap'; python -c 'import ldap.modlist'
18:35 think-free joined #salt
18:38 meteorfox joined #salt
18:38 ndrei joined #salt
18:38 ldlework joined #salt
18:38 ldlework how can I salt-call a specific state in my state tree?
18:38 ldlework I know how to do salt.highstate
18:38 ldlework but how do I execute a specific state?
18:39 druonysus whiteinge: when I run those python import commands I am getting this http://paste.opensuse.org/21993492
18:40 whiteinge ah, good. looking...
18:40 fragamus joined #salt
18:41 think-free joined #salt
18:42 whiteinge ldlework: state.sls <somesls>    (but leave off the .sls extension)
18:42 ldlework thanks
18:44 whiteinge druonysus: how about: python -c 'import ldap; print ldap.__version__
18:44 whiteinge remind me what OS you're running?
18:45 eliasp is there now a better way to install a package from the win_repo than this: http://pastie.org/8976658 - the problem with this approach: some clients connect via WiFi which then takes a really really long time to sync multiple GBs of installer files…
18:45 eliasp I had to resort to this solution, because until 6 months ago or so, packages installed from the win_repo only synced the installer itself to the minion
18:45 eliasp but not any other files which are required for the installation
18:46 think-free_ joined #salt
18:46 eliasp so once a package is installed, I don't want all the files to be kept synced to the minion to save time + space
18:46 bemehow joined #salt
18:48 favadi joined #salt
18:49 kermit joined #salt
18:49 kermit joined #salt
18:49 think-free joined #salt
18:50 whiteinge eliasp: i haven't used winrepo yet, but looking at the paste, could you wrap those states in {% if 'msoffice' in salt['pkg.list_pkgs'] %} kind of thing?
18:51 eliasp whiteinge: actually a good idea/workaround until there's a native win_repo solution to this problem
18:51 eliasp whiteinge: gonna try that, thanks!
18:51 eliasp whiteinge: I could actually use this approach to even clean the cache once the package is installed
18:52 whiteinge that makes sense. nice!
18:53 whiteinge say, if there isn't a winrepo issue to get this sort of thing added natively please file one so it stays on the radar
18:53 eliasp whiteinge: I'll do
18:54 stephanbuys is it possible to add the localhost to the salt-ssh roster without the need to use a local ssh daemon? I want to include some local actions as part of a highstate.
18:55 Employee312 joined #salt
18:57 rglen joined #salt
18:58 seapasulli joined #salt
18:58 think-free joined #salt
19:00 ajw0100 joined #salt
19:02 sieve joined #salt
19:02 pydanny joined #salt
19:02 sieve Hello, I would like to put a grain in a file on my minions.
19:02 think-free_ joined #salt
19:02 ndrei joined #salt
19:03 sieve so I take the source from salt://foo/bar.conf
19:03 sieve and then inject the minions hostname in a couple of places.
19:03 faldridge joined #salt
19:08 think-free joined #salt
19:08 frasergr_ joined #salt
19:09 sijis whiteinge: wow.. you merged that fast. thank you!
19:10 seapasulli joined #salt
19:11 whiteinge thanks for getting it added!
19:12 sijis whiteinge: like anything else... its a selfish reason. i was tired of exporting the env variables :)
19:12 ckao joined #salt
19:12 faldridge joined #salt
19:13 think-free_ joined #salt
19:17 fragamus joined #salt
19:18 brewmaster joined #salt
19:20 think-free joined #salt
19:23 ipalreadytaken joined #salt
19:25 DaveQB joined #salt
19:25 ndrei joined #salt
19:26 krissaxton joined #salt
19:27 krissaxton joined #salt
19:28 zain joined #salt
19:31 hunter joined #salt
19:31 think-free joined #salt
19:32 hunter joined #salt
19:36 rotschopf joined #salt
19:38 Kenzor joined #salt
19:41 rotschopf simonmcc_: hi simon im currently playing around with kitchen-salt. is there a way to set a pillar file? i want to use the pillar.example file of my formula for testing. currently it seams like the pillar data is always generated fram the yaml dict in .kitchen.yml
19:41 think-free joined #salt
19:41 vejdmn joined #salt
19:42 smurfy_ is storing pre seed keys in ldap a bad idea?
19:42 eliasp is it possible to export a state like this http://pastebin.kde.org/pqpmjpjab as "pkg", so I can simply include it in a list of pkgs to be installed with a defined name again?
19:43 dlloyd joined #salt
19:43 dlloyd is it possible to supress True results in highstate output?
19:43 eliasp smurfy_: I'd say that mostly depends on your LDAP ACLs :)
19:43 eliasp smurfy_: besides that I'm a fan of putting as much information as possible into LDAP
19:44 smcquay joined #salt
19:44 jcockhren eliasp++
19:45 younqcass joined #salt
19:45 smurfy_ does that not add complexity to the bootstrapping process, vs say creating the key on the salt master and scp'ing it to the host
19:46 smurfy_ seems like the minion would require pre-salt configuration to speak to ldap, no?
19:47 bemehow joined #salt
19:47 eliasp smurfy_: well, sure… from that point of view it probably doesn't make much sense ;)
19:47 think-free joined #salt
19:48 arrose joined #salt
19:52 think-free_ joined #salt
19:53 frasergraham joined #salt
19:53 mgw joined #salt
20:01 stanchan joined #salt
20:02 vejdmn joined #salt
20:06 [diecast] joined #salt
20:07 zain joined #salt
20:09 frasergraham joined #salt
20:09 vejdmn joined #salt
20:12 ajw0100 joined #salt
20:13 dlloyd left #salt
20:13 fragamus joined #salt
20:13 shoma joined #salt
20:17 ajw0100 joined #salt
20:18 rgbkrk joined #salt
20:19 gadams999 joined #salt
20:19 Nexpro joined #salt
20:20 think-free joined #salt
20:24 philipsd6 If I create a pillar file that uses Jinja to dynamically create a set of similar pillar data structures, is there some way I can individually assign them to various minions in my pillar top file?
20:28 seapasulli_ joined #salt
20:33 pugs1 joined #salt
20:34 pugs1 Good afternoon.  Does anyone here have decent experience with salt-api?  Quick question about syntax for arguments
20:34 whiteinge pugs1: yeah, shoot
20:34 jcockhren pugs1: yah
20:34 think-free_ joined #salt
20:35 pugs1 Great! I'm making standard rest calls in using Guzzle REST client.  Everything works well until I get to the arg portion for certain multi-argument calls
20:36 pugs1 if I pass single string values, it works fine.
20:36 nhubbard_ joined #salt
20:37 whiteinge pugs1: are you sending JSON or urlencoded requests?
20:38 think-free joined #salt
20:38 pugs1 I've tried sending both.  I'm using Accept: application/json in the header
20:40 RandalSchwartz https://plus.google.com/105487854388646525021/posts/Mu2S69sdXvD
20:40 RandalSchwartz (not spam... just mentioned you guys in my post)
20:40 whiteinge RandalSchwartz: nice!
20:41 whiteinge pugs1: you need to set the Content-Type header if you're sending JSON which may be easier
20:42 whiteinge pugs1: can you pastebin an example call? i'll try to help with the syntax even though I'm not familiar with Guzzle
20:44 think-free_ joined #salt
20:44 pugs1 sure, one sec
20:45 jcockhren pugs1: I have a code example that handles most cases of parsing a string when 'arg' needs to be defined with calling salt-api
20:45 jcockhren https://github.com/sophicware/benderbot/blob/master/plugins/salt.py
20:45 jcockhren not perfect
20:46 jcockhren I'm also not familiar with Guzzle.
20:47 pugs1 Awesome, looking at that too.  Guzzle is just a PHP REST client framework the Amazon SDK was based on.
20:47 stanchan joined #salt
20:47 pugs1 I'm not explictly setting my content-type, so that's one item to look at
20:47 srage joined #salt
20:47 whiteinge jcockhren: hey, neat repo :)
20:48 jcockhren thanks
20:48 jcockhren it allows me to control my salt infrastructure through google talk
20:49 jcockhren bender appears as a Google talk user
20:49 whiteinge what does the part after "salt" look like when you issue a command?
20:49 * whiteinge is trying to mentally unpack the regex
20:49 jcockhren for example:
20:50 jcockhren salt * stats.meminfo
20:50 jcockhren like you're on the CLI
20:50 jcockhren or
20:51 think-free joined #salt
20:51 jcockhren salt aux event.fire_master data={"data":"my event data"} tag='test1'
20:53 jcockhren actually that's next relase
20:53 aleszoulek joined #salt
20:53 jcockhren salt someserver deploy example.com
20:53 whiteinge very cool
20:53 jcockhren ^ is the most recent currectness
20:54 jcockhren I plan on unveiling the fiber and dnsimple salt modules at pyOhio
20:54 jcockhren (in July)
20:54 [diecast] joined #salt
20:55 jcockhren fiber is what handling the deploys
20:55 jcockhren is*
20:55 jcockhren so far just shallow cloning.
20:55 jcockhren the next push will support installtions from package repos
20:56 jcockhren like ones made from deb-s3
20:56 jcockhren ;)
20:56 jillr joined #salt
20:57 eliasp whiteinge: regarding your suggested win_repo workaround: http://pastebin.kde.org/pdvhvnorc results in http://pastebin.kde.org/payms6kn6
20:58 eliasp whiteinge: it's the first time I'm doing something with Jinja, so it might be something completely obvious hidden to me in plain sight ;)
20:58 think-free_ joined #salt
20:59 whiteinge eliasp: ah. my original example had the same problem, i think. you need parens after the lookup to actually call the function
20:59 whiteinge salt['pkg.list_pkgs']()
21:01 eliasp whiteinge: ok, judging by the client's HDD activity, this seems to be working :) thanks a lot
21:01 whiteinge np :)
21:01 johtso joined #salt
21:03 bemehow joined #salt
21:04 Ryan_Lane joined #salt
21:06 seapasulli joined #salt
21:08 pugs1 ok, so I can boil this issue down.  I'm trying to use the docker built in execution module for start command.  According to the docs: salt.modules.dockerio.start(container, binds=None, ports=None, port_bindings=None,lxc_conf=None, publish_all_ports=None, links=None, privileged=False, *args, **kwargs)
21:08 jergerber joined #salt
21:08 think-free joined #salt
21:08 bretep joined #salt
21:11 pugs1 Generic web service call to salt-api looks like this - http://pastebin.com/rvxRSSPj
21:11 seapasulli joined #salt
21:11 Ryan_Lane how do I edit http://docs.saltstack.com/en/latest/topics/best_practices.html ?
21:12 Ryan_Lane #4 of general rules should also say not to allow access to sensitive pillars by grains
21:12 pugs1 in this case, $command is 'docker.start' and if $arg was just the container id as a string, it works fine
21:12 Ryan_Lane otherwise there's no point in storing sensitive info in grains
21:12 Ryan_Lane err
21:12 Ryan_Lane in pillars
21:12 Ryan_Lane since any minion could change its grains to access the pillars
21:16 jcockhren pugs1: I understand what you mean now
21:16 jcockhren ok. arg expects an array of items
21:17 jcockhren not array. tuple
21:17 pugs1 ah hah!
21:17 think-free joined #salt
21:17 jcockhren https://github.com/sophicware/benderbot/blob/master/plugins/salt.py#L32
21:19 jcockhren imagine, if there are more, then: data[0]['arg'] = (c, another_arg, some_dict, )
21:19 jcockhren essentially...
21:19 jcockhren you can cheat and put them all in c
21:19 eliasp whiteinge: btw: an issue for my win_repo problem already existed: https://github.com/saltstack/salt/issues/9028 … added my current workaround incl. your suggestion below
21:20 pugs1 it wouldn't let me do that
21:20 JasonSwindle left #salt
21:20 jcockhren really? huh. that's how I do it
21:21 jcockhren maybe I should complete that release then huh
21:21 pugs1 Let me try this again
21:24 bemehow joined #salt
21:24 Ryan_Lane utahcon: https://github.com/saltstack/salt/pull/10815 <— this didn't make it into 2014.1.1 and it's *killing* me
21:25 pugs1 but basically arg is a tuple, not a json structure?
21:26 ndrei joined #salt
21:28 [diecast] joined #salt
21:28 Gareth Ryan_Lane: the docs are in github.  time for a pull request. :)
21:28 Ryan_Lane Gareth: yeah, but where in github?
21:28 Ryan_Lane I'm more than happy to make a pull request, just need to know where :)
21:29 Gareth Ryan_Lane: https://github.com/saltstack/salt/tree/develop/doc probably.
21:29 think-free joined #salt
21:29 Ryan_Lane utahcon: https://github.com/saltstack/salt/issues/9146 <— that made it in, but of the two problems I was having the one I made a pull request for was much more urgent :(
21:29 Ryan_Lane Gareth: I couldn't actually find it there
21:29 Gareth https://github.com/saltstack/salt/blob/develop/doc/topics/best_practices.rst
21:30 Ryan_Lane ah. I was grepping poorly
21:30 simonmcc_ rotschopf: yes there is, it's just not documented yet, you can use "pillars-from-files:" which then expects a list of kv pairs, where the names are the pillar you want and the value is the name of the file on disk
21:30 Ryan_Lane thanks
21:30 simonmcc_ rotschopf: give me a few minutes & I'll try and get it documented properly
21:35 rotschopf simonmcc_: cool thx
21:35 higgs001_ joined #salt
21:37 Ryan_Lane Gareth: https://github.com/saltstack/salt/pull/11635
21:38 Gordonz joined #salt
21:40 krissaxton joined #salt
21:40 think-free_ joined #salt
21:45 rotschopf simonmcc_: gotta go now, im watching your repo
21:45 rotschopf left #salt
21:47 think-free joined #salt
21:48 arthabaska joined #salt
21:53 srage joined #salt
21:55 think-free joined #salt
21:59 smurfy__ joined #salt
22:00 whiteinge pugs1: sorry, was afk. you can pass multiple "arg" params. i don't know if that's valid PHP though
22:01 frasergr_ joined #salt
22:03 whiteinge in curl you do -d arg='binds=val' -d arg='ports=val'. if that can't be done with a PHP array() then you might need to stick with JSON
22:03 Ryan_Lane why did this fail? http://jenkins.saltstack.com/job/salt-pr-build/2866/
22:04 Ryan_Lane it had nothing to do with my change
22:04 Gareth Ryan_Lane: that one has been failing for awhile.
22:04 Gareth on almost every PR.
22:04 Ryan_Lane ah, ok
22:04 Ryan_Lane so maybe it's a new test that doesn't pass?
22:04 Gareth could be
22:04 * Ryan_Lane nods
22:06 googolhash joined #salt
22:06 kermit joined #salt
22:08 frasergraham joined #salt
22:11 whiteinge Ryan_Lane: re: the publish module that didn't make 2014.1.1: any reason you're not overriding the one that ships with salt via /srv/salt/_modules until salt ships with the version you edited?
22:13 Ryan_Lane whiteinge: can I do that?
22:13 Ryan_Lane hm. I guess I could
22:14 Ryan_Lane will my custom module always override what the system has?
22:15 whiteinge yeah
22:16 Ryan_Lane wow. I have no clue why I hadn't thought of that.
22:16 Ryan_Lane thanks!
22:18 think-free joined #salt
22:23 higgs001 joined #salt
22:27 krissaxton joined #salt
22:28 smurfy__ joined #salt
22:31 jeddi joined #salt
22:42 smcquay_ joined #salt
22:48 think-free joined #salt
22:48 travisfischer joined #salt
22:50 dangra joined #salt
22:50 eliasp can I cross-reference states from different gitfs repos and can I have a git repo without a top.sls at all? I'd like to keep my top.sls (used for assigning minions to their environments) in a separate repo and have a dedicated repo containing the environments + states…
22:53 think-free_ joined #salt
22:53 ipalreadytaken joined #salt
22:53 schimmy joined #salt
22:55 jeremyBass1 joined #salt
23:00 ndrei joined #salt
23:03 arrose joined #salt
23:03 toastedpenguin joined #salt
23:03 snuffeluffegus joined #salt
23:03 conan_the_destro joined #salt
23:04 think-free joined #salt
23:05 bemehow joined #salt
23:09 think-free_ joined #salt
23:10 johtso_ joined #salt
23:11 johtso joined #salt
23:15 think-free joined #salt
23:17 frasergr_ joined #salt
23:19 meteorfo_ joined #salt
23:20 ipalreadytaken joined #salt
23:21 untamo13 joined #salt
23:23 n8n joined #salt
23:25 gasbakid joined #salt
23:26 ajprog_laptop joined #salt
23:26 think-free joined #salt
23:27 ggoZ joined #salt
23:29 eliasp ok, looks like it works…
23:31 JasonSwindle joined #salt
23:32 quickdry21 joined #salt
23:32 smcquay joined #salt
23:34 think-free_ joined #salt
23:36 eliasp is there a way to gain some insight what a Job is currently doing on a minion? jobs.lookup_jid doesn't return anything…
23:37 eliasp like "job spawned process $foo on minion, output is 'blah'"
23:39 think-free joined #salt
23:40 pydanny joined #salt
23:44 j4son joined #salt
23:44 ipalreadytaken joined #salt
23:49 think-free_ joined #salt
23:51 sroegner joined #salt
23:52 echos joined #salt
23:55 ndrei joined #salt
23:55 think-free joined #salt

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