Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-06-24

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

All times shown according to UTC.

Time Nick Message
00:00 geekatcmu If it matters, I'm running 2015.5.0+ds-1trusty1
00:01 whytewolf geekatcmu: I don't think that should matter the loop code in jinja2 hasn't changed that much other the past couple of years
00:01 geekatcmu Jinja variable 'list object' has no attribute 'items'
00:04 whytewolf geekatcmu: sorry. been a long day forgot the .items.
00:04 geekatcmu don't sweat it.
00:04 geekatcmu If it helps, I've been writing python code for about 2 decades, and yet I've been pounding my head against this for the last 4 hours.
00:05 aw110f joined #salt
00:05 whytewolf thats alright. part of the problem is jinja isn't true python. it is kinda pythonish.
00:06 geekatcmu except for the bits that aren't.
00:06 geekatcmu yeah
00:06 geekatcmu The really, really stupid thing is that I've got a similar for loop in a different file that's expanded just *fine*.  It's a different variable, but still.
00:07 whytewolf yeah it should expand fine. but for some reason isn't.
00:08 whytewolf geekatcmu: all of my examples i tend to use have more then a single item in them.
00:08 geekatcmu Check out the comment I just added to https://gist.github.com/BrianGallew/bb5dfcdc4ff1dab0e6ce
00:11 whytewolf I have no idea.
00:12 geekatcmu Clearly, jinja wants me to pick some other renderer.
00:12 whytewolf i hear the python renderer is nice
00:16 hasues joined #salt
00:16 Bryson joined #salt
00:18 edrocks joined #salt
00:19 napsterX joined #salt
00:19 hasues left #salt
00:25 markm joined #salt
00:25 Bryson i am getting the error "No hosts found with target * of type glob" when trying any salt-ssh command. google is no help...any ideas?
00:33 otter768 joined #salt
00:33 aea joined #salt
00:34 aqua^c joined #salt
00:38 markm_ joined #salt
00:40 ITChap joined #salt
00:43 pcn What do you have in your what are they called... roster?
00:44 Bryson___ joined #salt
00:47 harkx joined #salt
00:47 aw110f_ joined #salt
00:50 julez joined #salt
00:59 kusams joined #salt
01:08 tkharju joined #salt
01:11 dendazen joined #salt
01:20 napsterX joined #salt
01:23 Bryson joined #salt
01:32 Furao joined #salt
01:32 david_an111 joined #salt
01:38 aqua^c joined #salt
01:38 beauby joined #salt
01:39 aCodinMa_ joined #salt
01:45 Bryson joined #salt
01:47 FredFoo RickCH: Was thinking about your problem. Maybe this helps: In your state, start with exists -> onfail: create -> onchange create set immutable flag
01:47 aw110f joined #salt
01:47 FredFoo RickCH: so you end up having the file created if it does not exist and in the future it will not be touched again
01:48 FredFoo RickCH: immutable is just insurance :D
01:50 husanu joined #salt
01:52 ekristen joined #salt
01:54 lala joined #salt
01:56 nitenq left #salt
01:58 venu0336 joined #salt
02:01 ITChap Hi
02:01 ITChap I was reading about http://mig.mozilla.org/ recently
02:02 snarfy joined #salt
02:02 ITChap and it looks like something similar could be done with Salt
02:02 ITChap did someone try ?
02:04 Bryson joined #salt
02:09 beauby joined #salt
02:13 aqua^c joined #salt
02:18 timoguin joined #salt
02:20 napsterX joined #salt
02:24 iggy ITChap: that's one of the beacons use cases that was mentioned at saltconf
02:24 iggy I don't know that anyone has done anything along those lines yet
02:25 Bryson_ joined #salt
02:28 beauby joined #salt
02:31 ITChap iggy: pretty much the whole agent/controller system is already in place. the only things missing are the module to search files from a signature for example
02:33 iggy That's where the beacon tie in is, basically every time a non-excluded file changes, a reactor event gets fired which kicks off some custom module that checks the file(s) in question
02:35 iggy or something
02:35 iggy that's not really my area of expertise
02:37 aqua^c joined #salt
02:39 julez joined #salt
02:40 Aidin joined #salt
02:44 otter768 joined #salt
02:44 ITChap iggy: do you have any doc or slides on this ?
02:45 iggy Doubt there is anything, it was mentioned in one of the devs' tech talks (which I don't think there were videos of as they were kind of off the cuff type thinking)
02:45 iggy i.e. there was a bunch of stuff that may or may not ever see the light of day
02:46 Bryson_ joined #salt
02:46 ITChap iggy: oh ok
02:47 favadi joined #salt
02:47 napsterX joined #salt
02:47 kusams joined #salt
02:52 michelangelo joined #salt
02:52 napsterX_ joined #salt
02:53 GabLeRoux joined #salt
02:53 darless joined #salt
02:54 darless can someone add a new formula on github that I can fork. The repo should be called: nsd-formula
02:55 darless once done tell me and I'll fork it, once done I'll initiate a pull request
02:56 geekatcmu excellent
02:56 * geekatcmu sighs
02:57 darless excellent and a sigh?
03:01 Aidin joined #salt
03:02 ITChap joined #salt
03:06 Bryson_ joined #salt
03:06 andrej joined #salt
03:07 icosa joined #salt
03:11 beauby joined #salt
03:22 favadi joined #salt
03:27 Bryson_ joined #salt
03:34 aparsons joined #salt
03:37 iggy darless: you'll probably want to hit up one of the ops tomorrow (earlier in the day if possible)
03:40 darless iggy: will do
03:42 aparsons joined #salt
03:44 alexanderilyin joined #salt
03:45 Bryson joined #salt
03:51 stoogenmeyer joined #salt
03:54 husanu joined #salt
03:56 skullone joined #salt
04:00 writtenoff joined #salt
04:02 husanu joined #salt
04:09 stoogenmeyer joined #salt
04:11 ranomore joined #salt
04:16 Garo___ what do I need to do to make sure that grains shows correct data? I changed my fqdn on one of my hosts but the fqdn grain shows still the old host
04:17 torchinz joined #salt
04:22 dyasny joined #salt
04:26 baweaver_ joined #salt
04:28 stoogenmeyer joined #salt
04:28 julez joined #salt
04:32 llua` joined #salt
04:33 ip` joined #salt
04:33 GabLeRoux joined #salt
04:37 murrdoc joined #salt
04:45 otter768 joined #salt
04:45 ramteid joined #salt
04:46 joeto joined #salt
04:52 ranomore joined #salt
04:54 evle1 joined #salt
04:56 theologian joined #salt
04:56 onorua joined #salt
04:59 scoates joined #salt
05:02 markm__ joined #salt
05:04 hrumph joined #salt
05:04 hrumph hi still learning salt
05:05 hrumph tonight my minion is just returning false on a test.ping and i have no idea why
05:06 ranomore joined #salt
05:07 catpiggest joined #salt
05:09 hrumph it may never haver worked...i don't know
05:09 hrumph i can still run some salt modules on it though
05:09 hrumph like status.procs works
05:10 napsterX joined #salt
05:10 hrumph i'm confused it just started working...
05:13 hrumph my bad i was calling using non-existant commands and the result threw me
05:14 hrumph my fault i was on a wild goose chase
05:14 hrumph i put in ping.test instead of test.ping
05:14 hrumph and also buggered up another command
05:14 darless good job for figuring it out then :-)
05:14 hrumph the  'saltutils' __virtual__ returned False result made me think something was wrong with salt
05:15 hrumph maybe if i become more familiar with salt i'll agree with the error reporting...
05:16 hrumph anyway i hope other errors are more newby friendly
05:18 ndrei joined #salt
05:18 GabLeRoux joined #salt
05:19 hrumph ok i dropped a hello world module in /srv/salt_modules and ran saltutil.sync_all
05:19 hrumph i'm not getting the desired result
05:19 hrumph i don't see my module showing up in the output under modules
05:21 hrumph sorry /srv/_salt/modules
05:22 ajw0100 joined #salt
05:23 hrumph i meant /srv/salt/_modules
05:28 darless haven't played with custom modules - good luck though
05:30 husanu joined #salt
05:35 a7p joined #salt
05:41 stoogenmeyer joined #salt
05:43 hrumph darless my bad again another clerical error
05:46 ramteid_ joined #salt
05:49 monkey66 joined #salt
05:57 desposo joined #salt
05:58 desposo1 joined #salt
06:01 dopesong joined #salt
06:01 markm__ joined #salt
06:01 AndreasLutro joined #salt
06:02 dopesong_ joined #salt
06:04 rdas joined #salt
06:07 snarfy joined #salt
06:09 colttt joined #salt
06:15 Guest89 joined #salt
06:16 spookah joined #salt
06:17 julez joined #salt
06:17 jhauser joined #salt
06:17 malinoff joined #salt
06:19 viq joined #salt
06:21 donmichelangelo joined #salt
06:21 KermitTheFragger joined #salt
06:24 a7p joined #salt
06:26 rdas joined #salt
06:34 ndrei joined #salt
06:35 ITChap I am looking for some advices from the people using gitfs with multiple environments
06:35 ITChap Do you have any specific git workflow ?
06:38 a7p joined #salt
06:39 slav0nic joined #salt
06:46 otter768 joined #salt
06:47 stoogenmeyer hey guys, how would I go about renaming a minion so there's no connection issues?
06:51 ndrei joined #salt
06:54 a7p joined #salt
06:54 soren joined #salt
06:56 tfield joined #salt
06:56 katyucha2 joined #salt
06:57 stoogenmeyer_ joined #salt
06:57 katyucha2 Is someone use new VMware provider pyVmomi ?
06:58 katyucha2 No way to connect...
06:58 katyucha2 I use same url and credentials, without succes
07:00 ALLmightySPIFF joined #salt
07:00 undefinednull joined #salt
07:03 katyucha2 Always same thing, I ask ans the next try , it work ttttttt
07:07 kawa2014 joined #salt
07:07 eseyman joined #salt
07:10 Berty joined #salt
07:13 a7p joined #salt
07:13 Guest89 joined #salt
07:16 iggy ITChap: check out the open bugs about gitfs and environments
07:16 Romlok joined #salt
07:21 lb1a joined #salt
07:21 lothiraldan joined #salt
07:24 hrumph can i make a module that only installs to certain grains or do i have to do tests with __grains__ in the module code and distribute the module to all minions?
07:29 stoogenmeyer__ joined #salt
07:30 AndreasLutro hrumph: pretty sure you have to do it in the code. __virtual__ is the standard way to do it
07:31 hrumph AndreasLutro, ty i'm reading about it now
07:35 forrest joined #salt
07:42 stoogenmeyer__ hey anybody know how to set the machine disk size when creating an ec2 machine with salt-cloud ?
07:42 onorua joined #salt
07:44 AndreasLutro stoogenmeyer__: maybe the stuff under "volumes" in this example? https://docs.saltstack.com/en/develop/topics/cloud/aws.html#cloud-profiles
07:48 al joined #salt
07:49 stoogenmeyer__ hmm, relying on the example in this issue seems to work
07:49 stoogenmeyer__ https://github.com/saltstack/salt/issues/22501
07:53 ghoz joined #salt
07:59 chiui joined #salt
08:02 s_kunk joined #salt
08:02 s_kunk joined #salt
08:03 ITChap is there an equivalent to gitfs_root or the ext_pillar ?
08:04 FRANK_I joined #salt
08:06 ingslovak joined #salt
08:08 denys joined #salt
08:08 jcristau joined #salt
08:13 Antiarc joined #salt
08:20 PI-Lloyd ITChap: you can add root= to the end of the ext_pillar entry
08:20 PI-Lloyd http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#using-git-as-an-external-pillar-source
08:21 undefinednull joined #salt
08:22 supersheep joined #salt
08:23 ITChap PI-Lloyd: thanks I just found it in the doc.
08:23 ITChap I would like to keep the states and pillar in the same repository do you think that it's a good idea ?
08:27 ramteid joined #salt
08:29 PI-Lloyd It's how we do it at present, purely from a CI perspective
08:31 tracphil joined #salt
08:35 ZombieTwiglet Yeah, we find it much easier for code reviews and CI to only have one repo to push to, it does mean that anyone with access to the repo knows your secrets so you have to wheigh that up with simplicity, from a salt point of view it's just as secure
08:38 Guest89 joined #salt
08:45 Antiarc joined #salt
08:46 otter768 joined #salt
08:47 julez joined #salt
08:50 ntropy is there a way to get a list of states that minion would run on highstate?
08:50 ntropy there is state.show_top, but that just shows what minion matches from top.sls
08:50 phx test=True
08:50 ntropy phx: that is one option, but well too verbose, a simple list would be nicer
08:51 phx it's exactly what you've asked
08:51 ntropy there's also state.show_highstate, but also very verbose
08:51 phx if you want it less verbose, define less states
08:51 phx or call it from the python API, and filter out the info you don't need
08:57 ntropy yes calling it from python API might be good, thanks for the suggestion
08:58 ntropy alternatively i can arrive at the list with this ugly thing:
08:58 ntropy sudo salt someminion state.show_highstate | grep -A 1  __sls__ | grep -vE "__sls__|^--"  | sort | uniq
08:59 devops joined #salt
09:03 keimlink joined #salt
09:05 favadi joined #salt
09:06 llua` joined #salt
09:06 snarfy joined #salt
09:08 aqua^c joined #salt
09:10 cberndt joined #salt
09:12 losh joined #salt
09:16 Romlok joined #salt
09:18 phx ntropy, screw that, use the python API, it's extremely easy
09:19 phx ntropy, https://docs.saltstack.com/en/2014.7/ref/clients/index.html#salt-s-client-interfaces
09:19 phx ntropy, import salt.client; local = salt.client.LocalClient(); result = local.cmd(targets, 'state.highstate', test=True)
09:19 phx ntropy, and you iterate on the result object, it's basically a list of dicts, piece of cake
09:20 ndrei joined #salt
09:22 phx that's [test=True], sorry. it has to be a list
09:23 phx uhm, the first one was correct, reading on the docs. it's a kwarg passed to the called function
09:39 robothands joined #salt
09:41 cruatta joined #salt
09:47 pbrooko joined #salt
09:48 matthew-parlette joined #salt
09:54 c10 joined #salt
09:56 supersheep joined #salt
09:58 froztbyte does anyone here have some suggestions for CI/unit testing salt stuff?
09:59 froztbyte I've seen Kitchen being used in the influx formula (https://github.com/saltstack-formulas/influxdb-formula/blob/master/test/integration/default/serverspec/influxdb_spec.rb for example) but I'm open to suggestions that involve less convolution than kitchen seems to require
10:00 froztbyte (specifically, that one appears to involve firing up some vagrant)
10:01 ede joined #salt
10:12 kevlar0404 joined #salt
10:18 aqua^c joined #salt
10:25 AndreasLutro a Vagrantfile, vagrant up && vagrant provision with salt provisioner set up should have you covered
10:28 AndreasLutro I don't think you can get around using a vm, and vagrant is the easiest way to achieve that
10:28 ZombieTwiglet We do roughly that with Jenkins + Docker
10:29 sgate1 joined #salt
10:29 ZombieTwiglet Jenkins as Docker and Vagrant plugins so it's just a case of working out how you want to trigger them
10:30 ZombieTwiglet has*
10:34 linjan joined #salt
10:39 denys joined #salt
10:45 rakan joined #salt
10:45 rakan Hello all
10:46 rakan How can i reference a require: package_name in this package has been installed along with other pages using pkg.installed: pkgs: - ... etc
10:46 rakan i currently get The following requisites were not found: require: pkg: kafka
10:47 PI-Lloyd you need to specify the stanza name
10:47 rakan stanza?
10:47 CeBe joined #salt
10:47 otter768 joined #salt
10:48 ndrei joined #salt
10:48 PI-Lloyd so if your stanza is called "install-kafka" you would call "pkg: install-kafka" in your require
10:48 AndreasLutro they're called states
10:48 AndreasLutro but yeah use the state ID instead of the package name
10:49 rakan http://pastebin.com/4zRYUr9J
10:50 rakan Here's the .sls file... since service.running is inside install_kafka... would it make it sense in this case?
10:51 AndreasLutro yeah
10:52 rakan Am not sure... but if saltstack executes things in order, then it's just redundant as the service.running won't execute unless pkg.installed section is done and succeeded?
10:53 AndreasLutro rakan: if you have another state before install_kafka that does watch_in: - service: kafka, that might trigger the service to restart before it's installed
10:53 AndreasLutro edge case though
10:53 AndreasLutro and I say might, because it might be fine, I'm not sure
10:54 rakan Fair enough
10:54 rakan Many Thanks!
10:54 jbub joined #salt
10:56 Romlk joined #salt
10:57 giantlock joined #salt
11:08 supersheep joined #salt
11:10 sgargan joined #salt
11:10 ndrei joined #salt
11:12 jhauser joined #salt
11:13 supersheep joined #salt
11:30 stephanbuys joined #salt
11:33 husanu joined #salt
11:41 aqua^c joined #salt
11:47 yudao joined #salt
11:51 amcorreia joined #salt
11:53 onorua joined #salt
11:53 froztbyte AndreasLutro: provisioning what?
11:53 froztbyte doing a highstate run?
11:54 mage_ can I have multiple function in a state file for the same id ? for ex: foo_id: file.managed: ... file.managed: ... file.managed: ... ?
11:54 froztbyte from what I've seen so far, I don't belieev so
11:54 froztbyte believe*
11:55 mage_ ok :(
11:56 froztbyte it is a thing I've wanted as well, but not yet exactly sure what'd be needed for it
11:56 froztbyte if it's not there, I suspect a change to the state system might be needed; haven't had time to go through the code
11:56 ndrei joined #salt
12:02 dgk joined #salt
12:07 katyucha_ joined #salt
12:07 AndreasLutro froztbyte: yeah, vagrant has a salt provisioner that installs salt on the system and optionally runs a highstate through salt-call
12:08 froztbyte okay, but that doesn't give me any way to assert that things are correct
12:08 froztbyte which is what I'm after
12:09 froztbyte the serverspec/kitchen stuff that I linked there does, however, give that ability
12:09 froztbyte then there's also stuff like linting and syntax checks
12:09 froztbyte is this a thing anyone does?
12:10 AndreasLutro I'd just rely on the highstate to error if something was wrong tbh
12:10 AndreasLutro set up custom top.sls files for the test run to test as much as possible
12:12 markm__ joined #salt
12:15 nobrak joined #salt
12:15 nobrak joined #salt
12:20 keimlink joined #salt
12:21 kusams joined #salt
12:26 linjan joined #salt
12:26 OliverMT how do I onchanges: on a directory (file.recurse) file: ?
12:28 OliverMT nvm, it worked, the error was another plce :P
12:32 sgate1 joined #salt
12:34 OliverMT how do I run a state.sls thats in a folder?
12:34 AndreasLutro state.sls dir.file
12:34 OliverMT salt 'server' folder.state is not right
12:35 OliverMT ahh
12:35 OliverMT state.sls
12:35 OliverMT its outside top.sls btw
12:35 OliverMT so not in base or anything
12:35 OliverMT so that failed, it complains its not in the base
12:35 sgargan joined #salt
12:36 AndreasLutro top.sls only affects highstates, could you paste your command + the exact error?
12:36 Aidin joined #salt
12:36 OliverMT https://gist.github.com/olivermt/49e49c1a03bec05dd8ca
12:37 AndreasLutro that means the sls file wasn't found in your file_roots
12:37 OliverMT oh I see now
12:37 OliverMT brainfart
12:37 OliverMT proper pebkac :P the file name is not the same as the redeploy
12:39 OliverMT worked like a charm, thanks a lot
12:40 dendazen joined #salt
12:41 impi joined #salt
12:42 aqua^c joined #salt
12:48 otter768 joined #salt
12:50 IanV0rn joined #salt
12:51 pbrooko joined #salt
12:53 sgargan joined #salt
12:55 ndrei joined #salt
12:55 Aidin joined #salt
12:57 sgargan joined #salt
13:02 murrdoc joined #salt
13:03 racooper joined #salt
13:06 Erik-P joined #salt
13:06 Erik-P hi all
13:06 Erik-P How can i watch a reg in windows to restart service if changed?
13:08 s_kunk joined #salt
13:08 s_kunk joined #salt
13:10 kaptk2 joined #salt
13:11 FeatherKing joined #salt
13:11 aidin_ joined #salt
13:11 Tecnico1931 joined #salt
13:11 bhosmer joined #salt
13:14 jdesilet joined #salt
13:16 viq joined #salt
13:16 subsignal joined #salt
13:17 impi joined #salt
13:18 scoates joined #salt
13:20 onorua joined #salt
13:22 ndrei joined #salt
13:22 primechuck joined #salt
13:23 Erik-P ok i found it -reg thenks
13:23 sgargan joined #salt
13:24 napsterX joined #salt
13:25 evle1 joined #salt
13:28 drawsmcgraw left #salt
13:33 TooLmaN joined #salt
13:34 mou joined #salt
13:34 husanu joined #salt
13:36 sgargan joined #salt
13:41 cpowell joined #salt
13:42 drawsmcgraw joined #salt
13:43 leszq joined #salt
13:43 drawsmcgraw joined #salt
13:43 ek6 joined #salt
13:45 mpanetta joined #salt
13:47 toastedpenguin joined #salt
13:47 linjan joined #salt
13:51 _JZ_ joined #salt
13:51 Aidin joined #salt
13:56 ndrei joined #salt
13:56 7JTAAD3HD joined #salt
13:57 Aidin joined #salt
14:00 dyasny joined #salt
14:00 ericof joined #salt
14:01 timoguin joined #salt
14:01 giantlock joined #salt
14:02 blackhelmet joined #salt
14:02 peters-tx joined #salt
14:02 blackhelmet left #salt
14:03 jdesilet joined #salt
14:06 Ahrotahntee can I write the top files in python?
14:06 Ahrotahntee do I just return an object like the state files?
14:06 husanu joined #salt
14:07 blackhelmet joined #salt
14:09 murrdoc only one way to find out
14:12 leszq joined #salt
14:13 blackhelmet left #salt
14:13 theologian joined #salt
14:14 husanu1 joined #salt
14:17 andrew_v joined #salt
14:18 Aidin joined #salt
14:18 leszq joined #salt
14:19 IanV0rn joined #salt
14:22 chiui joined #salt
14:23 kusams joined #salt
14:27 bhosmer joined #salt
14:28 IanV0rn joined #salt
14:29 anotherZero joined #salt
14:30 ekristen joined #salt
14:31 aqua^c joined #salt
14:32 Brew joined #salt
14:33 hasues joined #salt
14:34 emaninpa joined #salt
14:34 hasues left #salt
14:34 venu0336 joined #salt
14:36 fyb3r joined #salt
14:37 venu0336 left #salt
14:37 scoates joined #salt
14:40 clintberry joined #salt
14:43 robothands is there a way in file.managed to set +x flag (executeable) ?
14:44 apergos joined #salt
14:44 pguinardco set the mode as something that is odd such as 755?
14:45 robothands well..that would give execute permissions to user/group/world, but it doesn't set the +x flag on the file itself
14:45 pelzi_ wat
14:45 robothands so the file would still not be executeable unless I manually "chmod +x file"
14:47 pguinardco rwx is how the filepermissions are handled so as long as it's odd (r=4,w=2,x=1) so it's getting set with an odd number (such as 7 or 5).
14:48 robothands ok, I must be being stupid
14:49 robothands yes I am...thanks
14:49 pguinardco It's the other bits other than r w and x that are a bit more tricky to set such as i
14:49 otter768 joined #salt
14:50 robothands yeah I was just being a moron basically, I'd set it to 755, but then I was checking the wrong file on the minion side
14:51 Pixer joined #salt
14:56 perfectsine joined #salt
15:01 wnkz joined #salt
15:04 markm joined #salt
15:04 thedodd joined #salt
15:05 soren joined #salt
15:06 sdm24 joined #salt
15:10 c10 joined #salt
15:11 Pixer__ joined #salt
15:12 ALLmightySPIFF joined #salt
15:25 theologian joined #salt
15:32 jalbretsen joined #salt
15:35 mou joined #salt
15:36 leszq joined #salt
15:37 ajw0100 joined #salt
15:38 ndrei joined #salt
15:42 r1 joined #salt
15:42 sgargan joined #salt
15:43 DammitJim joined #salt
15:43 aparsons joined #salt
15:43 Pixer__ left #salt
15:44 julez joined #salt
15:52 desposo joined #salt
15:55 cruatta joined #salt
15:55 tmclaugh[work] joined #salt
15:57 PI-Lloyd someone buy stephen spencer a godamn beer.... just found a random doc string that made us chuckle :)
15:58 snarfy joined #salt
15:59 murrdoc ?
16:00 denys joined #salt
16:02 c10 joined #salt
16:04 writtenoff joined #salt
16:07 quique joined #salt
16:08 leszq joined #salt
16:09 MTecknology PI-Lloyd: link or gtfo!
16:10 * MTecknology is rather curious
16:12 trikke joined #salt
16:12 jonlangemak joined #salt
16:15 maxskew joined #salt
16:18 debian112 joined #salt
16:19 GabLeRoux joined #salt
16:19 aqua^c joined #salt
16:21 FeatherKing why would i be getting __virtual__ returned False when running salt orchestrator?
16:22 aparsons joined #salt
16:23 sgargan joined #salt
16:23 bhosmer joined #salt
16:24 FeatherKing nm i was passing a hostname into the runner
16:24 FeatherKing forgot what i was doing
16:25 spookah joined #salt
16:26 dopesong joined #salt
16:26 detach- left #salt
16:27 linjan joined #salt
16:28 mapu joined #salt
16:30 quique I have a sls file (test.webserverconfig) that install apache and puts a bunch of stuff in place for the apache webserver, then an apache.sls that requires it.  When apache is installed it starts running, I'd like it to be restarted from the apache.sls, what's the best way to do that?
16:30 KyleG joined #salt
16:30 KyleG joined #salt
16:30 quique currently I have this: http://fpaste.org/236220/
16:30 dopesong_ joined #salt
16:31 Fiber^ joined #salt
16:31 bhosmer joined #salt
16:38 amcorreia joined #salt
16:39 hal58th joined #salt
16:40 hal58th_ joined #salt
16:41 IanV0rn joined #salt
16:41 dfinn joined #salt
16:42 IanV0rn joined #salt
16:43 dfinn just rolled out salt-minion to most of our environment and I'm seeing a strange issue with the ubuntu hosts.  they are all 14.04 running 0.17.5.  I haven't checked all of them yet but so far all the ones i've seen are setting minion_id to "ubuntu" for the first run.  if I delete minion_id and the pki dir and restart salt-minion then it picks up the hostname correctly so it seems to only be an issue for the first run.  anyone know what might
16:44 bhosmer joined #salt
16:45 tzero joined #salt
16:45 pguinardco quique: look at watch (such as ntp here http://docs.saltstack.com/en/latest/ref/states/requisites.html )
16:46 pguinardco It also works with * if you have an includes directory
16:46 theologian joined #salt
16:50 otter768 joined #salt
16:53 nate_c joined #salt
16:56 enarciso joined #salt
16:57 sgargan joined #salt
16:57 aCodinMan joined #salt
17:02 aparsons_ joined #salt
17:04 whytewolf dfinn: 0.17.5 is pretty old and not really supported anymore. please use the salt repo and not the salt-minion/salt-master from the ubuntu repo as they have not updated yet. http://docs.saltstack.com/en/latest/topics/installation/ubuntu.html
17:04 dfinn ok, was actually just looking into that
17:05 spark_ joined #salt
17:05 murrdoc another ahlee version sighting
17:05 murrdoc thats two this week
17:06 whytewolf yeap. ubuntu needs to update their damn repo
17:06 dfinn that's got to be about a year and a half old?
17:06 dfinn at least a year?
17:06 whytewolf dfinn: closer to 2 or 3
17:06 geekatcmu Let's say I'm writing a state using pyobjects, and I have to import a Jinja map file.  Should I be calling salt.renderers.jinja.render or salt.utils.templates.JINJA or something else entirely?
17:07 timoguin joined #salt
17:07 geekatcmu (the map is from another state, which is written entirely in jinja_yaml)
17:07 pix91 joined #salt
17:08 pix91 I have one doubt regarding pillar.
17:08 leszq joined #salt
17:09 pix91 suppose I create pillar and add user information in that pillar, then how do I get my minions to create those users locally?
17:09 whytewolf pix91: you have a state that reads the pillar data and adds the user
17:09 pix91 hmm ok
17:10 pix91 thanks whytewolf , I will read more about state. looks like I am going in correct direction so far. :D
17:11 whytewolf geekatcmu: I would think [I'm not apython dev so not 100% sure] that you would use the renderers version of jinja.
17:11 geekatcmu OK, that's what I thought.
17:11 geekatcmu Thanks.
17:11 geekatcmu Now to puzzle out the correct set of bits for the call.
17:14 geekatcmu Oh, or I guess I could just do the really simple thing: #!jinja|pyobjects
17:14 ryand- joined #salt
17:14 * geekatcmu sighs
17:14 whytewolf wow... really? that works?
17:15 ryand- out of curiosity here, anyone attempted to use salt-ssh for basica config on cisco devices?
17:16 soren joined #salt
17:16 whytewolf ryand-: not sure if it would work. salt-ssh needs python.
17:16 Guest89 joined #salt
17:16 ryand- whytewolf well you can connect to the device over ssh
17:17 ryand- and execute single commands, thats not problem
17:17 ryand- the issue is executing sequentical commands, like conf t\r int vlan xxx\r
17:17 whytewolf ryand-: salt-ssh runs python on the recieving end.
17:17 ryand- not with raaw
17:17 ryand- -r
17:18 forrest joined #salt
17:18 ryand- trying to figure out how to string multiple raw comands together in a single ssh connection with raw
17:21 dfinn left #salt
17:21 whytewolf ryand-: ahh so -r is just like cmd.run. is there a command seperator in cisco?
17:21 ryand- there isn't :(
17:21 bhosmer joined #salt
17:22 whytewolf could try a heredoc into the command and see if the returns make it
17:25 tmclaugh[work] joined #salt
17:25 kawa2014 joined #salt
17:26 kevinquinnyo joined #salt
17:28 kevinquinnyo Hello!  I need to run a series of remote commands on a cisco switch which runs an ios shell.  I can run single commands just fine with salt-ssh --raw, but I can't figure out how to run multiple commands?  My options seem to be to roll my own pexpect or expect/tcl/ssh script, or to build my own custom "proxytype" class.
17:28 kevinquinnyo do i have that right?
17:28 ryand- terrible idea kevinquinnyo
17:28 DammitJim joined #salt
17:29 cruatta_ joined #salt
17:30 jimklo joined #salt
17:33 julez joined #salt
17:33 whytewolf damn it. I forgot the order of my own developing orchenstrate files. i really should put documentation for this beast somewhere.
17:34 chiui joined #salt
17:34 tmclaugh[work] joined #salt
17:37 whytewolf humm. might not even matter now that i look at them.
17:38 pix91 congrats whytewolf :D
17:39 whytewolf lol pix91 if you only knew how ugly this thing is. trying to orchenstrate an openstack install and in the end auto configure salt to salt-cloud the beast as well
17:40 Deevolution Anyone have any experience getting custom renderers working?
17:40 pix91 cool :O
17:40 iggy I've been looking at writing a sphinx plugin to handle sls files (so you could do ReST/etc in jinja comments) and have nice generated documentation
17:41 pix91 I would love to do such crazy things, :D
17:41 Linuturk joined #salt
17:41 Ahlee_ iggy: neat idea
17:41 whytewolf iggy: oh that would be nice
17:41 iggy I didn't expect that
17:41 pix91 I wish I could do stuffs with salt all the day.
17:42 pix91 recently I've started writing stuff
17:42 pix91 soon I will be adding my expirence about salt stack on my blog :D
17:42 Linuturk I've got a simple apache state defined, and I want it to watch a couple of directories for changes and restart apache when changes are made. This syntax doesn't seem to be working properly https://github.com/rackspace-orchestration-templates/salt-states/blob/master/apache/init.sls#L8  Logs of run
17:42 Linuturk https://circle-artifacts.com/gh/rackspace-orchestration-templates/php-app-single/385/artifacts/1/tmp/circle-artifacts.ufpDd3c/23.253.230.186/cloud-init-output.log   <<< The following requisites were not found
17:43 aw110f joined #salt
17:43 Linuturk is my syntax off that bad?
17:45 dalexander joined #salt
17:46 tmclaugh[work] joined #salt
17:46 baweaver joined #salt
17:47 iggy Linuturk: salt will only watch files for which you have other states, and you should use the state id not the path
17:48 Tecnico1931 joined #salt
17:49 murrdoc host.present doesnt preserve order
17:49 murrdoc sigh
17:50 Linuturk ok
17:50 Linuturk guess that makes sense
17:50 Linuturk thanks iggy
17:51 Linuturk I should probably do watch_in from the file states then
17:54 Linuturk iggy: should that be watch_in: - sls: state_id ?? or watch_in: - service: apache2  ??
17:56 iggy service: install-apache
17:57 Linuturk hot
17:57 Linuturk thanks
17:57 tomh- joined #salt
17:57 iggy the unindented part is the state id
17:57 Linuturk yeah, but referencing by state-id always confuses me
17:58 Linuturk I guess you always reference using module: state-id ?
17:58 leszq joined #salt
17:58 Tecnico1931 joined #salt
17:58 Linuturk not sure where I'm getting the sls: state-id bit from
17:59 iggy sometimes you can use `sls: path.to.sls` to refer to an entire sls file (for require, etc... but not for watch afaik)
18:00 andrew_v joined #salt
18:04 baweaver joined #salt
18:05 JoeJulian joined #salt
18:07 pix91 can some one tell me what is diffrence between data written in sls of pillar and data written in sls of stat?
18:07 denys joined #salt
18:08 aqua^c joined #salt
18:11 Katyucha I use salt-cloud for deply from template. How to put variables informations in the cloud-profile ? I will create a profile with IP on variables
18:11 c10 joined #salt
18:12 husanu joined #salt
18:18 wendall911 joined #salt
18:18 wendall911 joined #salt
18:19 sporkd2 Can someone help me correct my syntax salt['mine.get'](pillar['env']*, something) trying to use that pillar to target the environment so I can use one template for many envs
18:20 andrew_v joined #salt
18:21 druonysus joined #salt
18:21 druonysus joined #salt
18:21 primechuck joined #salt
18:26 Ryan_Lane forrest: hahaha
18:26 Ryan_Lane yeah
18:26 bones050 joined #salt
18:26 Ryan_Lane forrest: that said, I'm not sure why salt wasn't there :)
18:27 ALLmightySPIFF joined #salt
18:29 forrest Ryan_Lane: They weren't?
18:29 forrest basepi: What the hell! No dockercon presence? YOU SLACKERS!
18:29 IanV0rn joined #salt
18:30 forrest Ryan_Lane: I visited San Fran a few weeks ago, was going to hit you up but every day was packed with activities :(
18:30 drawsmcgraw So how *was* Dockercon?
18:30 Ryan_Lane well, next time hit me up
18:31 forrest Will do
18:31 Ryan_Lane drawsmcgraw: was ok. a lot of the talks were marketing thinly veiled as tech talks
18:31 drawsmcgraw Tragic. I hear Openstack is like that too.
18:32 forrest but 4% of the openstack community isn't PAID to work on openstack man!
18:32 Ryan_Lane from my experience openstack isn't like that
18:32 drawsmcgraw oh okay, good. I had heard someone say it was getting a little commercial-y
18:32 Ryan_Lane since the talks are picked by community vote
18:32 drawsmcgraw maybe they're just cynical
18:32 drawsmcgraw Ah, true
18:32 Ryan_Lane yeah, they are quite cynical
18:33 forrest was there anything really cool though at dockercon?
18:33 Ryan_Lane and some of the earlier openstack founders lost their voice in the community and so they're bitter
18:33 thedodd joined #salt
18:33 Ryan_Lane forrest: there was a demo where they had quake clients in containers on their laptops and a quake server in a container in a datacenter
18:34 Ryan_Lane and they live-migrated the server container across datacenters around the world
18:34 forrest that's pretty cool!
18:34 Ryan_Lane each time they did there was a pause for a few seconds and it just reconnected
18:34 Ryan_Lane was really cool
18:34 drawsmcgraw !
18:34 Ryan_Lane https://github.com/saltstack/salt/issues/24940 <-- I know I wish for a lot
18:35 forrest lol, you do ask for a lot
18:35 drawsmcgraw yes. yes you do
18:35 Ryan_Lane I just fought m2crypto and swig
18:35 Ryan_Lane and for what?
18:35 drawsmcgraw lol
18:35 KyleG What do you guys use if you're having minion problems and need to reset like 30+ minions? Just a basic shell command and a loop + SSH keys?
18:35 Ryan_Lane so that I can make orchestration calls?
18:36 Ryan_Lane KyleG: we have a cron that runs once a minute that handles deployments
18:36 subsignal joined #salt
18:36 IanV0rn joined #salt
18:36 Ryan_Lane assuming we haven't totally fucked our deployment system we can always recover within a minute
18:36 drawsmcgraw KyleG: If the minions are offline, I use pssh (or parallel-ssh on Debian distros)
18:36 KyleG What does your cron do?
18:36 Ryan_Lane we run salt on every deployment
18:37 KyleG We do as well
18:37 Ryan_Lane it checks to see if there's a base or service deployment
18:37 KyleG But sometimes hanging minions can cause deploys to fail
18:37 Ryan_Lane we don't run minions :)
18:37 Ryan_Lane our deployments are pull based
18:37 Ryan_Lane which is the only reliable way to handle deploys :)
18:37 Ryan_Lane push/pull is also a great model
18:37 Ryan_Lane push to speed up pulls
18:38 Ryan_Lane we may eventually use transport and have minion/master, but not for deployments
18:38 KyleG well yeah, we do pull based as well, we use salt to tell the minions to pull the latest build from an HTTP build server, then salt extracts the build, runs some sanity tests/checks, and then swaps the symlink to the new build #
18:38 Ryan_Lane heh. that's basically what we do
18:38 KyleG we wrote a custom salt python modules for that
18:39 KyleG so it's like wiredrive.deploy wiredrive.build_config env=env pkg=pkgname build_num=12-24 etc
18:39 impi joined #salt
18:39 Ryan_Lane we have python code that does this
18:39 Ryan_Lane but it uses the salt python api
18:39 Ryan_Lane so we can use custom modules and such
18:40 KyleG yeah
18:40 KyleG we sorta mix and match, we have a uWSGI app that runs on the salt master that does various salt python API calls
18:40 KyleG so Bamboo -> curl request to thje uWSGI app on the master to start deploy -> bamboo curl request to check status of the salt job
18:40 spookah joined #salt
18:41 KyleG We're constantly improving it, but it's not too bad
18:42 KyleG Takes 2-3 minutes to deploy our largest build to all of production
18:42 KyleG from start to finish
18:42 KyleG Trying to get that faster though :)
18:42 KyleG Switching my Bamboo CI server to all SSD made life pretty good.
18:43 pix91 I am reading salt's pdf guide version 2015.5.0
18:44 pix91 I tried understanding about pillars and states.
18:44 pix91 some what understood little bit about pillars
18:44 pix91 it is the data passed to minions, but not able to under stand.
18:45 pix91 and how these two thing work with each other.
18:45 pix91 here simply I am trying to create a user using  data from pillar.
18:46 sdm24 in a very general sense, states perform actions on minions, while pillars give data to a minion
18:46 drawsmcgraw pix91: Are you able to post any files/configs you have so far?
18:46 pix91 ok I will pastebin what I've done so far.
18:47 Ryan_Lane KyleG: heh. that's pretty good
18:48 KyleG Ryan_Lane: It'll do…it'll do. lol
18:48 IanV0rn joined #salt
18:50 pix91 http://pastebin.com/TnTK0Hti
18:51 pix91 I think I am missing some thing here about states.
18:51 Ryan_Lane pix91: pillars are just data
18:51 otter768 joined #salt
18:51 Ryan_Lane states can use pillars to be generic
18:51 pix91 ok
18:51 KyleG Where does pillar data come from
18:51 pix91 that is understood.
18:51 KyleG Been using salt for almost 3 years now and still have yet to even touch that stuff
18:52 Ryan_Lane so you'd make a state to create a user and you'd use jinja to reference the pillar
18:52 pix91 hmm
18:52 drawsmcgraw pix91: Have you used any of the pillar commands on the command line?
18:52 drawsmcgraw For instance -> salt '*' pillar.get users
18:52 Ryan_Lane let me give an example
18:52 pix91 yes I've use some
18:52 drawsmcgraw Should return what you have in users/init.sls
18:53 drawsmcgraw ok. I'd just listen to Ryan_Lane in that case. he's a lot better at this stuff :)
18:53 Ryan_Lane pix91: https://gist.github.com/ryan-lane/a6d1786bf54b32541ab2
18:54 pix91 thanks guys
18:54 Ryan_Lane when you run the state, it'll iterate through the dict defined in my pillars
18:54 pix91 I am reading ryan_lane's link
18:54 Ryan_Lane specifically the users key
18:54 pix91 yes
18:55 pix91 that part is understood logically.
18:55 Ryan_Lane let me give an example of the pillar
18:55 pix91 how do I put my state to action?
18:55 Bryson joined #salt
18:55 pix91 how to make data available via pillar is simple.
18:56 Ryan_Lane updated with a pillar file
18:56 Ryan_Lane do you already have the state?
18:56 pix91 you mean add that state thing in pillar sls  file.
18:56 Ryan_Lane if so, you either need to include it in your state tops
18:56 sdm24 salt '<target(s)>' state.sls (path.to.state), where the path starts in /srv/salt
18:56 Ryan_Lane states and pillars are managed separately
18:56 pix91 ok
18:56 Ryan_Lane it's basically data (pillars) and code (states)
18:57 pix91 do I have some thing like /srv/salt/states/
18:57 pix91 ok cool
18:57 Ryan_Lane yeah
18:57 pix91 pillar == data structure, state == logic to deploy pillar.
18:57 pix91 now I need to figureout how to deploy state.
18:57 Ryan_Lane state = 'here is the state my machine should be in"
18:58 Ryan_Lane pillars are just freeform data that you can use in your logic
18:58 pix91 yes
18:58 pix91 now this is clear.
18:58 pix91 only remaining part is how to.
18:59 pix91 this is getting cooler :D
18:59 Ryan_Lane pix91: https://gist.github.com/ryan-lane/a6d1786bf54b32541ab2#file-state_with_no_pillar
18:59 Ryan_Lane that's an example of using a state without pillars
18:59 Ryan_Lane states are the main concept. pillars let you make the states generic
19:00 pix91 yes
19:00 mbrgm joined #salt
19:00 pix91 I need this kind of stuff
19:00 Ryan_Lane pillars are fun because you can make a data structure that's used by all kinds of states
19:00 pix91 yes
19:00 Ryan_Lane for instance, we manage users on the systems, their groups on the systems, their user accounts in AWS IAM, their groups in AWS IAM, their accounts in external services, etc.
19:00 pix91 where do I keep these state files
19:01 Ryan_Lane but they're all defined in the pilalrs
19:01 mbrgm is it possible to get a list of minions, which have a specific pillar, in a state?
19:01 Ryan_Lane usually it's /srv/salt/pillar for pillars and /srv/salt/states for states
19:01 pix91 ok cool
19:01 Ryan_Lane you'll need a top.sls file for states just like you do for pillars
19:01 pix91 /srv/salt/states is what i needed
19:02 pix91 I read  flipping pages few times
19:02 mbrgm e.g. every minion has a list 'roles' defined in its pillar. now I want to get a list of hosts which have a specific role defined, so I can e.g. add them to a load balancer etc.
19:02 pix91 but was not able to get  how to and where too :D
19:02 pcn I've added grains to /etc/salt/minion but salt-call grains.items doesn't seem to show those grains
19:02 pcn Is there somethign special I should be aware of to enable those custom grains?
19:02 pix91 thanks a lot ryan.
19:03 mbrgm pcn: did you restart the minion daemon?
19:03 pcn Yep
19:03 pix91 took 1 more step towards understanding salt.
19:03 pix91 hurray :D
19:04 mbrgm pcn: what do the logs say? turn up the log level to get additional info. maybe it's a parsing/access rights error?
19:04 Ryan_Lane yw
19:04 Ryan_Lane we really need a better quickstart guide :)
19:04 Ryan_Lane the current one is a bit verbose and in a strange order
19:04 pix91 I might adde it on my next blog post aswell :D
19:04 drawsmcgraw mbrgm: Have you tried the -L switch for targeting?
19:05 pix91 I can see the author is more into getting the reader to understand things.
19:05 drawsmcgraw I was trying to put roles into Pillar and ran into a similar problem. I wound up putting them in Pillar, then using a script to set Grains.
19:05 forrest Ryan_Lane: Are you talking about the new one?
19:05 Ryan_Lane forrest: ah. I haven't seen the new one
19:05 pix91 but dumb heads like me learn by experience of action.
19:06 pix91 I would like to contribute :D
19:06 forrest Ryan_Lane: http://docs.saltstack.com/en/getstarted/
19:06 KyleG Ryan_Lane: You use pillars in place of LDAP? O_o
19:06 quique joined #salt
19:06 Ryan_Lane KyleG: fuck ldap
19:06 Ryan_Lane :)
19:06 pix91 thoe I am not good.
19:06 KyleG dayum homie
19:06 pix91 yes this is somewhat like ldap.
19:06 pix91 remind me old days of ldapsearch :D
19:07 Ryan_Lane we alert if any node fails a deployment run or doesn't deploy
19:07 mbrgm drawsmcgraw: I don't think this would do what I want. I do not want to target a list of minions but rather get a list of minions so I can insert them into a template.
19:07 Ryan_Lane and we have a shared repo that manages users.
19:07 rogst joined #salt
19:07 Ryan_Lane no worries about some centralized system dying and causing a cascading failure
19:07 sdm24 I tried (and unintentionally succeeded) to setup and connect openldap to our ldap server. But we don't use posixAccounts :(
19:07 pcn mbrgm: running the minion in the foreground and logging at debug, I don't see any issues with the run
19:07 soren joined #salt
19:07 pcn In case something is weird, can I delete the grains cache somehow?
19:08 Ryan_Lane sdm24: that's not an issue
19:08 Ryan_Lane sdm24: you can use a bunch of schemas from the client
19:08 sdm24 I just wanted to tell my ldap horror story
19:08 Ryan_Lane I have way too much ldap experience
19:08 Slimmons It doesn't matter how many times I run state.highstate, it always thinks it's already running.
19:08 Slimmons I'm back with a different problem trying to do the same thing as yesterday.  I created a state with the minion and the master on the same server.  The gist is here https://gist.github.com/johnsimmons/e951cad20b4720d3f167
19:08 Ryan_Lane https://www.mediawiki.org/wiki/Extension:LDAP_Authentication <-- I wrote that ages ago :D
19:09 sdm24 Thanks Ryan_Lane, I'll check it out
19:09 pix91 :O HOLY you wrote that :O COOL *AMAZED*
19:11 mbrgm pcn: `salt-run cache.clear_grains`
19:12 drawsmcgraw mbrgm: I'm not sure you could do that without either 1) listing all of your minions in Pillar beforehand or 2) something involving Salt Mine
19:12 c10 joined #salt
19:12 drawsmcgraw I have a fairly static deployment so I have all my machines listed out in Pillar. Roles and other details with them.
19:12 ryand- Ryan_Lane seen anyone using salt-ssh raw to manage network devices?
19:13 ryand- trying to find a way, with minimal effort, to quickly spew configs into cisco devices
19:13 ryand- salt-ssh raw can of course connect and issue single commands
19:13 ryand- but that doesn't help for dropping in a multi-line config statement
19:14 mbrgm drawsmcgraw: I just found out that I can match by pillar in mine.get, so this should solve my problem. thank you!
19:14 XenophonF joined #salt
19:14 drawsmcgraw nice! I wasn't aware you could do that.
19:15 sgargan joined #salt
19:15 XenophonF isn't there a jinja filter that's just "|yaml"?
19:15 XenophonF http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html only lists yaml_encode et seq
19:18 pix91 do I need to create top.sls for states?
19:18 mbrgm is grains data always collected live, while mine data is cached on the master?
19:19 pix91 to define hierarchy to fetch diffrent state files?
19:20 pcn mbrgm: thanks.  I still don't see the custom grains.  This is very puzzling.  Do you have any other suggestions?
19:21 napsterX joined #salt
19:22 julez joined #salt
19:25 drawsmcgraw pix91: The topfile (top.sls) is optional unless you're running a Highstate.
19:25 pix91 hmm
19:26 drawsmcgraw That was worded poorly.... The topfile is for highstates. So if you want to run highstates, yes.
19:26 pix91 drawsmcgraw: how do we organize our state files then?
19:27 drawsmcgraw pix91: States can include each other. So, say you need to install packages from a specific repo.
19:27 drawsmcgraw You have a state file to configure that repo. And you have another state file that installs packages from that repo.
19:27 Slimmons Anybody know how to fix a constant state of "The function "state.highstate" is running as PID x aand was started at date with jid y"   Every time I run state.highstate, no matter how long I wait, it always says it's already running.  https://gist.github.com/johnsimmons/e951cad20b4720d3f167
19:27 drawsmcgraw The "install these packages" state file can include the "configure this repo" file.
19:28 ALLmightySPIFF joined #salt
19:28 drawsmcgraw Slimmons: I got nothing, I'm sorry. I've seen it before but not in a long while. Tried bouncing the master/minion/whole machine ?
19:28 drawsmcgraw pix91: Also, you can run individual state files with 'state.sls'.
19:28 pix91 hmm
19:29 sdm24 Slimmons: maybe its an issue that localmaster is set as the top.sls file_root, but that isn't defined
19:29 sdm24 i dunno thats just like something I see that could be wrong
19:30 Slimmons drawsmcgraw:  Yeah, I've tried that.  That does remind me though.  I need to add another error it's having after a reboot....it eventually switches back to the other error, but that may fix my problem.
19:32 IanV0rn joined #salt
19:32 mbrgm pcn: sorry, none so far. maybe create a paste of your config and post it here?
19:34 pcn mbrgm: I'm using an include in /etc/salt/minion.d.  Literally just this https://gist.github.com/pcn/c16db71388970cfea03c
19:35 quique joined #salt
19:35 pcn called custom_grains.conf
19:36 mbrgm pcn: is the `include: minion.d/*.conf` in your minion config?
19:37 Slimmons changing in the top.sls file localmaster to mastersminion: fixed it.  I thought it should have worked that way, but it didn't.
19:38 pcn mbrgm: there's a default_include: minion.d/*.conf in the minion file
19:38 pcdummy joined #salt
19:38 pcdummy joined #salt
19:38 writtenoff joined #salt
19:39 mbrgm pcn: phew... can the user running the salt minion daemon from both the minion config and the custom_grains.conf?
19:39 mbrgm pcn: +read*
19:41 pcn it's 0644 on the file, and the root user on both sides
19:42 pcn Got to run an errand, brb
19:43 mbrgm pcn: sorry, but I don't know what you could check next...
19:43 soren joined #salt
19:44 pcn I'll be back and trying to bang at this a bit more in a few minutes.  Thanks for the time so far.
19:48 s_kunk joined #salt
19:50 forrest joined #salt
19:50 ndrei joined #salt
19:51 JDiPierro joined #salt
19:56 pix91 I've defined users in pillr and trying to create same on minion using state file
19:56 pix91 here is details http://pastebin.com/uzrBiRmg
19:56 pix91 tried restarting master etc
19:56 linjan joined #salt
19:57 aqua^c joined #salt
19:57 pix91 not able to get how to run state file.
19:59 jdesilet Hopefully this is an easy answer. I am pretty sure salt has a feature where it will do a dry run of a state to see if certain conditions will be met before actually executing it. A use case would be say pushing out updated HTML file and the dry run sees that the files will change so it stops apache first, pushes the files and then starts the service back up.
20:00 pix91 hmm
20:00 whytewolf pix91: using that we will need to see your /etc/salt/master file cause /srv/states is not a default place to put state files. but, once you get the state file created and in a place that salt can see it. run salt 'minion_id' state.sls state
20:01 darless left #salt
20:01 bhosmer_ joined #salt
20:01 pix91 how can I check if master has read salt state file?
20:01 whytewolf pix91: put the state file in /src/salt/
20:01 whytewolf err /srv/salt
20:02 pix91 ok
20:03 bitwise_ joined #salt
20:04 forrest joined #salt
20:04 kevin-wk pix91: does your pillar render?  you don't mention if you have /srv/pillar/data.sls or /srv/pillar/data/init.sls
20:04 pix91 hmm
20:04 whytewolf kevin-wk: he does have a users/init.sls
20:04 whytewolf although data should error
20:05 kevin-wk right - if he's missing that it could just cause pillar rendering to bomb out
20:05 whytewolf pix91: to check if your pillars are rendering salt 'minion_id' pillar.items
20:06 pix91 ok
20:06 pix91 it is giving list of users.
20:06 rap424 joined #salt
20:06 sdm24 jdesilet: do you mean adding "test=True" at the end of a salt call?
20:06 whytewolf okay, they it is rendering
20:07 kevin-wk great
20:07 bitwise__ joined #salt
20:07 baweaver joined #salt
20:07 kevin-wk just need to find out how file_roots is configured, if it can find state.sls
20:07 kevin-wk also, i'd recommend a less confusing name for your state file
20:08 whytewolf pix91: salt 'minion' cp.list_states
20:08 pix91 how do I know if state file is known to salt?
20:08 pcdummy joined #salt
20:08 pcdummy joined #salt
20:08 pix91 ok got some output
20:08 pix91 salt '*' cp.list_states
20:08 pix91 salt-minion-188:
20:08 pix91 - state
20:08 pix91 salt-minion-146:
20:08 pix91 - state
20:09 whytewolf okay, your state is listed there
20:09 pix91 hmm
20:09 whytewolf [with it's very confusing name]
20:09 pix91 lol
20:09 pcn mbrgm: maybe I'm mis-understanding how the static grains work?  Should I be able to see them with grains.items ?
20:09 whytewolf salt 'minion_id' state.sls state
20:09 pix91 simply created state.sls
20:10 pix91 cool
20:10 pix91 it worked
20:10 pix91 I would like to write some document for salt stack.
20:11 whytewolf pcn: yes, you should see static grains with grains.items
20:11 pix91 been banging my head for more than 2 -3 weeks to get this start up lol.
20:11 pix91 thanks to you guys. :D
20:12 pcn whytewolf: have you used static grains?
20:12 pix91 it worked whytewolf.
20:13 pix91 now I can peacefully sleep :)
20:13 pix91 see you guys tommorrow.
20:13 whytewolf pcn: I set my roles based on them. but i typically use /etc/salt/grains to set them
20:14 sgargan joined #salt
20:14 pix91 OFFTOPIC: --   http://pix09.blogspot.in
20:14 pix91 something I've written ^^
20:15 pcn whytewolf: yeah, that works.  Looks to me like including them in the minion config doesn't work in 2015.05.0
20:16 whytewolf pcn: wouldn't know. i typically avoid minion config as much as possable.
20:17 pix91 ohh before I leave, I would like to share what worked for me.
20:17 pix91 [root@salt-master salt]# pwd
20:17 pix91 /srv/salt
20:17 pix91 [root@salt-master salt]# ls state.sls
20:17 pix91 state.sls
20:17 pcn whytewolf: that seems like the way to go
20:18 pix91 thank you everyone once again.
20:18 pix91 good night.
20:18 whytewolf np pix91 glad to be of help
20:19 quique pguinardco: with watch I would have to list every resource in the sls file correct?
20:20 pix91 left #salt
20:22 napsterX joined #salt
20:26 snarfy joined #salt
20:27 spookah joined #salt
20:28 pguinardco You can do a blob such as file: /usr/local/etc/nginx/*/*.conf
20:29 ALLmightySPIFF joined #salt
20:30 Slimmons I'm using git.latest, and I set the identity: /root/.ssh/id_rsa.pub , but it seems to still be trying to use the non root ssh public key.  I'm getting a publickey error, but I can clone with normal git clone commands using su
20:31 Slimmons any ideas why it wouldn't be using the key specified in identity
20:31 Slimmons i'm running salt as root also, so I thought that would be default anyway
20:31 sgargan joined #salt
20:31 pguinardco don't use the .pub extension
20:32 Slimmons thanks
20:32 Slimmons all it needed
20:32 quique pguinardco: actually thinking about it, I don't think that is what I want, because I don't want a reload if that stuff changes
20:32 quique i just want apache to be restarted once after all that is in place
20:33 vexati0n how would i run a local Bash script on the master in response to a reactor event?
20:33 ingslovak joined #salt
20:33 yaryarrr joined #salt
20:34 Garyx joined #salt
20:35 cpowell joined #salt
20:36 pguinardco It'll recycle after the all of the watches at the end :)
20:36 Garyx Anyone have a good way to grap the active interface name, just added servers with em interfaces and wanted to automate between eth and em named interfaces.
20:37 yaryarrr hey hey, i have set of pillars that looks like this: https://gist.github.com/yaryarrr/cb054bd7644d2a147539 and I want to make databases and dbusers named app1db and app1user, etc.....i thought i could do this: but it doesn't seem to be creating any databases: https://gist.github.com/yaryarrr/8a2e3fbf9f61e5092192
20:37 yaryarrr any thoughts would be greatly appreciated!
20:39 cruatta joined #salt
20:41 lichtamberg_ joined #salt
20:41 lichtamberg_ hi
20:41 lichtamberg_ anyone using azure via salt-cloud?
20:42 pguinardco Garyx: look at grains
20:42 Guest89 joined #salt
20:47 ranomore joined #salt
20:52 otter768 joined #salt
20:53 murrdoc1 joined #salt
20:54 murrdoc1 joined #salt
20:58 c10 joined #salt
20:58 ahammond for gitfs, how do I inspect the git repo it uses?
20:59 murrdoc joined #salt
20:59 snarfy joined #salt
21:02 Garyx Thats what I was doing, just hitting a wall since I have several interfaces (0 through 3)
21:06 ahammond I have gitfs working, but when I do salt-call state.show_top, it shows me an ancient version. This is on a fresh VM, so no weird legacy stuff, I don't think... But it does look like gitfs is looking at the very first commit ever made to our salt repo.
21:10 kevinquinnyo hey all I had to create an expect script to run commands on a cisco server, but I'm wondering if there's some way for me to invoke this local script via salt?
21:11 julez joined #salt
21:11 kevinquinnyo cisco switch rather *
21:15 furball365 joined #salt
21:16 lichtamberg_ left #salt
21:17 vexati0n i'm pretty sure this is safe, but if i want to use a state to keep certain config files in order by using file.recurse on an entire directory, Salt isn't going to delete or modify any files that /aren't/ in the source on the Master, right?
21:19 LtLefse vexati0n: not unless you set clean=true
21:19 vexati0n ok cool. thanks
21:19 vexati0n no plans to make that the default, i hope.
21:21 LtLefse I would hope not. might want to set clean: false explicitly anyways
21:22 cberndt joined #salt
21:23 napsterX joined #salt
21:23 cberndt joined #salt
21:24 keimlink joined #salt
21:27 keimlink joined #salt
21:28 ckng joined #salt
21:30 ALLmightySPIFF joined #salt
21:37 IanV0rn joined #salt
21:37 pcn Has anyone used the mdadm state on ec2 to create a node that can reboot and have its raid filesystem mount at boot?
21:46 aqua^c joined #salt
21:52 FeatherKing joined #salt
21:57 spookah joined #salt
22:05 sfoger joined #salt
22:05 sfoger Hello, I have an issue trying to import a grain which uses OpenSSL, via the pyOpenSSL python package
22:06 sfoger I am able to 'import OpenSSL' on the minion in a python interactive prompt just fine
22:07 sfoger But when I sync the grain, i get "salt/loader.py, line 928 in load_modules .... ImportError: No module named OpenSSL"
22:07 sfoger Why isn't the salt-minion able to import OpenSSL, when python locally can just fine?
22:13 c10 joined #salt
22:17 pcn check sys.path
22:21 sfoger I see Python27\lib\site-packages in sys.path, and OpenSSL.__file__ = Python27\lib\site-packages\OpenSSL\__init__.pyc
22:21 sfoger So it looks like OpenSSL is  in the sys.path
22:22 sfoger Or do I need to specifically add ..\site-packages\OpenSSL... to sys.path?
22:23 napsterX joined #salt
22:25 fllr joined #salt
22:28 ndrei joined #salt
22:31 ALLmightySPIFF joined #salt
22:31 hrumph joined #salt
22:31 hrumph hi
22:31 hrumph my boss 90% greenlit salt deployment!
22:32 hrumph stil have concerns about secury. the users have admin rights on their machines (its just inertia because that's the way things were done years ago) but what damage could a user potentially do with the private keys in the /salt directory?
22:32 hrumph that is on a minion
22:35 hrumph or just the ability to maliciously replace modules
22:36 whytewolf hrumph: well, they could setup another minion that is exactly like the one they currently have [would have to have the same name]. and can pull all the data that the salt server has for that minion. if they can get a copy of someone elses keys they could mimic that minion and gets it's info as well. or they could setup their own salt-master and ignore the one you control. ect.
22:37 whytewolf full admin rights = full control of what the box does
22:37 JDiPierro joined #salt
22:38 hrumph whytewolf, yes
22:38 hrumph whytewolf, but can they screw up the salt server somehow by placing malicious modules in?
22:39 hrumph forgetting about the private keys
22:39 hrumph a user with admin rights can just overwrite salt modules with whatever
22:40 whytewolf i wouldn't recomend mine, reactors or pulling grain data. but no, unless you turn on cp.push they shouldn't be able to change the master
22:40 hrumph hopefully as time progresses we can strengthen security at my org
22:41 hrumph and for what it's worth i can't see why active directory membership doesn't come with similar issues
22:41 hrumph and they're all joined to active directory
22:41 hrumph they could replace the active directory libs with conceiably malicious ones or transplant active directory keys
22:41 whytewolf they could. the question is. would they
22:42 hrumph whytewolf, i hope they don't want to....i'm just saying that the situation isn't any worse than it was, or shouldn't be
22:42 codenuke left #salt
22:44 hrumph specifically why would pulling grain data be an issue?
22:44 hrumph that's something i plan on doing
22:45 hrumph i mean why is that specifically an issue
22:45 scoates joined #salt
22:45 whytewolf hrumph: it is less of an issue then the others. and more in line with mine. but targeting can be thrown off
22:45 hrumph ok
22:46 whytewolf if you are targeting on a grain and the user changes the grain to look like another server. they might be able to get access to the other server
22:46 aea joined #salt
22:46 hrumph ok i'll keep that in mind
22:46 Darkalia joined #salt
22:47 hrumph it's a good point
22:47 hrumph i'll just try to be cautious
22:48 whytewolf about the only thing you can trust with targeting is minion_id since that is what is tied to the key. so to mimic that you need the keys
22:52 linjan joined #salt
22:53 otter768 joined #salt
22:58 jonlangemak joined #salt
23:02 ALLmightySPIFF joined #salt
23:03 is_null joined #salt
23:05 wedgie joined #salt
23:07 keimlink_ joined #salt
23:10 mosen joined #salt
23:11 kzrl joined #salt
23:14 leszq joined #salt
23:14 Aidin joined #salt
23:24 napsterX joined #salt
23:25 otter768 joined #salt
23:28 bhosmer_ joined #salt
23:32 aCodinMa_ joined #salt
23:32 sieve joined #salt
23:33 ingslovak joined #salt
23:34 aqua^c joined #salt
23:36 baweaver joined #salt
23:43 aqua^c joined #salt
23:44 badon joined #salt
23:48 otter768 joined #salt
23:49 is_null hi all, do you think this way of doing TDD to develop states would be useful to refactor a lot of jinja code ? https://gist.github.com/jpic/51e1545aff67d5f451e3 the example is a bit trivial i recon
23:52 ajw0100 joined #salt
23:53 is_null here i added the jinja code this would potentially replace: https://gist.github.com/jpic/51e1545aff67d5f451e3
23:57 hasues joined #salt
23:57 hasues left #salt
23:58 baweaver joined #salt
23:59 bfoxwell joined #salt

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