Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-07-11

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

All times shown according to UTC.

Time Nick Message
00:07 cron0 joined #salt
00:14 kermit joined #salt
00:20 Ryan_Lane1 joined #salt
00:21 Ryan_Lane joined #salt
00:21 bfrog so suppose there's a migration function that only needs to be run one time among all available app servers
00:22 bfrog how do people do that now with salt?
00:22 bfrog or do you guys have like a utility instance that does that
00:22 teskew1 joined #salt
00:23 oz_akan_ joined #salt
00:27 mgw bfrog: A custom runner perhaps?
00:31 auser bfrog: you can do that with a custom runner or with a command? salt '*' cmd.run "COMMAND"
00:32 Ryan_Lane joined #salt
00:43 Gifflen joined #salt
00:44 Nazca joined #salt
00:44 Nazca joined #salt
00:47 jbunting1 joined #salt
00:47 ydavid joined #salt
00:55 druonysus joined #salt
00:57 teskew1 joined #salt
00:58 copec left #salt
01:01 Gwayne joined #salt
01:01 Gwayne joined #salt
01:03 akoumjian Is anyone aware of a way to add a folder to the file_roots without modifying the original config file? I know you can add custom configs in /etc/salt/minion.d/*.conf, but setting file_roots here will of course override the previous value
01:06 bluemoon joined #salt
01:07 oz_akan_ joined #salt
01:08 syngin joined #salt
01:09 bfrog I get Data failed to compile when adding in some pillar data, I removed it, still get the error?
01:09 bfrog not sure whats up
01:10 aat_ joined #salt
01:10 bfrog how would I sync the pillar data right
01:11 Jahkeup_ joined #salt
01:11 bfrog salt '*' pillar.raw shows some old pillar data
01:11 bfrog salt '*' pillar.data shows the latest
01:11 mgw bfrog: salt '*' saltutil.refresh_pillar
01:12 alazylearner left #salt
01:13 bfrog why wouldn't it just pick up on that
01:13 bfrog the states don't need refreshing do they?
01:13 bfrog thats weird
01:13 syngin is there some way to apply state without packages being updated/installed? or do i need to rejig my state definitions to separate packaging?
01:14 jalbretsen joined #salt
01:16 Ryan_Lane joined #salt
01:16 darrend joined #salt
01:23 kleinishere joined #salt
01:27 liuyq joined #salt
01:28 liuyq joined #salt
01:37 aat_ joined #salt
01:38 Nexpro joined #salt
01:39 cron0 joined #salt
01:43 bfrog so if something fails... before cmd.wait
01:43 bfrog the cmd.wait never happens
01:43 bfrog then I fix it, but the cmd.wait still never happens
01:45 jacksontj joined #salt
01:48 [diecast] joined #salt
01:48 kleinishere joined #salt
01:52 jacksontj joined #salt
01:56 whoopsy joined #salt
02:00 kleinishere hi all - salt starter here. got a working web server provisioner, but now trying to pull in/watch a github repository. any advice on using the salt.states.git or salt.modules.git for this purpose? would be great to provision this task
02:01 napperjabber joined #salt
02:02 Jahkeup_ joined #salt
02:04 jacksontj joined #salt
02:07 syngin kleinishere: so what's the problem with what's in the doco? i.e., where is the doco falling short for you?
02:09 kleinishere docs are great, i'm just wondering about normal approach for this likely typical challenge. been scouring some example github repos from saltstarters.org . looks like salt.states.git.latest is the best way to go (http://docs.saltstack.com/ref/states/all/salt.states.git.html#salt.states.git.latest). hoping someone could just point to the recommended way
02:12 aat_ joined #salt
02:12 syngin the first example on that page (states.git) should cover basic use cases.
02:13 syngin just add it in to your states and take it for a spin. there's no real downside to checking a repo out to a managed node - just target it into /tmp or somesuch.
02:13 syngin in face, you could just copy the example as is.
02:13 syngin s/face/fact/
02:14 kleinishere for sure, will go about doing that now. thanks for the confirmatory nod toward states.git, syngin
02:15 syngin np
02:18 oz_akan_ joined #salt
02:20 kermit joined #salt
02:30 joehh eightyeight: I think someone here had a mirror of 0.15.3 for ubuntu because they were complaining about the ppa deleting old packages
02:34 redondos_ joined #salt
02:34 joehh eightyeight: http://saltinwound.org/ubuntu/0.15.3/
02:34 joehh eightyeight: it was furao that mentiod this - I presume he set it up
02:35 link0_ joined #salt
02:35 chuffpdx_ joined #salt
02:36 faulkner- joined #salt
02:36 clone1018_ joined #salt
02:36 _diecast_ joined #salt
02:37 eculver_ joined #salt
02:37 kallek_ joined #salt
02:37 evax_ joined #salt
02:37 Kamal joined #salt
02:38 StDiluted joined #salt
02:38 carxwol joined #salt
02:38 laprice_ joined #salt
02:38 viq_ joined #salt
02:38 viq_ joined #salt
02:38 kiorky_ joined #salt
02:39 rlb is a managed file a "oneshot", i.e. does it only get updated whenever a relevant "salt ... state.sls foo" occurs, or can managed files be monitored so that changes automatically propagate?
02:41 LarsN_ joined #salt
02:44 kevinbrolly joined #salt
02:45 joonas joined #salt
02:46 djinni` joined #salt
02:52 jbunting joined #salt
02:54 jbunting joined #salt
02:57 Furao joined #salt
02:57 bluemoon joined #salt
02:58 rlb I'm seeing the "data failed to compile" (known?) problem -- possibly because I'm calling salt while  something else is still running -- if so, is that really not allowed?  Doesn't that make it difficult to use salt from say multiple cron tasks to enforce various things?
02:58 rlb i.e. seems like I might rather salt just queue up the work.
02:58 rlb (if it's already busy)
02:59 rlb ...or (likely) maybe I misunderstand the situation.
02:59 mattbillenstein joined #salt
03:00 syngin rlb: what flavour is the error exactly?
03:00 jbunting1 joined #salt
03:00 mattbillenstein o hai
03:01 mattbillenstein anybody watching tom fight the projector right now?
03:04 rlb syngin: I was invoking "salt '*' state.sls update-a-managed-file" from an event that can fire at random, and I see 'data failed to compile --- The function "state.sls" is running as PID N and was started at  with jid req".
03:04 rlb isnt' there supposed to be a job id there somewhere?  (Though it's possible that output was lost somehow since this is being logged from a cronjob.)
03:05 rlb The cronjob runs frequently and might decide to update a file in /srv/salt/, and then needs to push it out to all the minions.
03:06 syngin i've never seen cron "lose output" before...
03:07 syngin and yeah, there should be a job ID.
03:09 jgelens joined #salt
03:09 chutzpah joined #salt
03:10 rlb me neither, it's running from a script that should be redirecting stdout/stderr to the file I'm reading via an "exec > >(tee -a foo.log) 2>&1" at the top.
03:11 rlb syngin: so in general, what are the restrictions on simultaneous salt runs?  i.e. is it OK to be running  them from arbitrary cron jobs -- I guess I would have imagined that a "competing" call would just block until the previous one finishes...
03:11 rlb (or timeout)
03:16 mattbillenstein joined #salt
03:28 mgw joined #salt
03:30 mattbillenstein joined #salt
03:33 syngin rlb: my understanding (based solely on my experience with zeromq) is that should be the case (queueing).
03:33 syngin rlb: I haven't checked the job code though.
03:43 KyleG joined #salt
03:45 bluemoon joined #salt
03:46 ronc joined #salt
03:52 napperjabber joined #salt
03:54 auser joined #salt
03:54 UtahDave joined #salt
04:02 sciyoshi joined #salt
04:02 Ryan_Lane joined #salt
04:06 druonysus joined #salt
04:06 druonysus joined #salt
04:10 Katafalkas joined #salt
04:18 bluemoon joined #salt
04:22 brianhicks joined #salt
04:39 cxz joined #salt
04:46 kleinishere joined #salt
04:54 brianhicks anyone around to answer a YAML question?
04:56 StDiluted i can try
04:56 Ryan_Lane joined #salt
04:56 StDiluted i have one also
04:58 brianhicks so I've got the following pillar sls
04:58 brianhicks https://gist.github.com/BrianHicks/3f51e615febd65edc716
04:58 ydavid joined #salt
04:58 brianhicks it loads fine from pyyaml, but salt doesn't like it. ideas for debugging?
04:59 Furao the \# ?
04:59 Furao just # ?
04:59 Furao oh yes I know
04:59 Furao line 4 and 5
04:59 Furao add 2 more spaces
05:00 Furao (in indentation)
05:00 brianhicks no joy :\
05:00 Furao if 6 spaces don't work put 8
05:00 StDiluted that one's beyond me, sorry
05:00 brianhicks why would the spaces make a difference?
05:00 Furao I had that before and regular 2 step indentation isn't enough when : |
05:00 brianhicks neither 6 nor 8 work for me :\
05:01 brianhicks the perverse part is I have something extremely similar working in another pillar…
05:01 Furao check http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.managed
05:01 Furao but "contents"
05:01 Furao # Note the above example is indented by 8 spaces.
05:02 brianhicks oh dang! I forgot the indent in the state!
05:02 brianhicks that's gotta be it
05:02 brianhicks yep, that was it
05:02 brianhicks thanks so much… maybe I should go to bed. ;)
05:03 Furao this is so frustrating, I had that a few times before… like before this was ever documented
05:04 brianhicks ugh yeah, that's twice it's gotten me now
05:08 beardo__ joined #salt
05:09 brianhicks StDiluted: what was your YAML issue?
05:09 StDiluted i resolved it actually
05:09 StDiluted i added a grain to match on instead
05:10 StDiluted I have VPCs in both east and west regions on Amazon, and they both have the same hostnames
05:10 StDiluted I wanted to edit the bashrc on all of the instances to add WEST or EAST in the beginning of the prompt
05:10 StDiluted so I'm pushing out a .bashrc
05:10 StDiluted but I wanted to make sure it got the right one depending which region I was in
05:11 StDiluted so I just added a grain to my ec2_tag_roles.py grain
05:11 StDiluted for ec2_region
05:11 brianhicks using https://github.com/saltstack/salt-contrib/blob/master/grains/ec2_info.py ?
05:11 StDiluted and matched on that
05:11 StDiluted no
05:11 brianhicks ah, got it! :)
05:11 StDiluted that doesn't have the right onformation
05:11 StDiluted information
05:11 StDiluted one sec
05:11 brianhicks huh… interesting.
05:12 StDiluted https://github.com/dginther/ec2-tags-salt-grain
05:12 StDiluted there you go
05:12 bwghughes joined #salt
05:12 StDiluted it's in salt-contrib as of today as well
05:12 brianhicks I'm doing a similar config, and it has some reason
05:12 brianhicks way to be
05:12 ronc joined #salt
05:12 StDiluted that version has  the extra region grain
05:13 brianhicks right
05:13 StDiluted so essentially
05:13 brianhicks looks like I've got… availabilityZone. Has east/west in it
05:13 StDiluted I'm just doing
05:13 StDiluted yeah, I'm using that from the meta-data
05:13 StDiluted but in order to get tags
05:13 brianhicks … yes you are.
05:14 brianhicks oh brother, I really do need to get some sleep ;)
05:14 StDiluted you have to connect to the API
05:14 brianhicks ah, that makes sense
05:15 StDiluted we have been using ec2 tags to manage capistrano deploys
05:15 StDiluted for roles
05:16 StDiluted so I wanted to use that in salt
05:16 StDiluted because we are taking over 90% of the capistrano stuff in salt
05:16 StDiluted only the app and unicorn will deploy in cap
05:16 StDiluted so rather than arbitrarily setting a grain on each minion, I wanted to do it automatically based on the roles we already defined
05:20 auser hey all
05:20 oz_akan_ joined #salt
05:21 StDiluted hey auser
05:22 auser hey StDiluted
05:27 StDiluted what's new, auser?
05:28 auser not much, starting a new post for saltstat.es
05:28 auser and finishing one on angularJS
05:28 StDiluted cool
05:29 auser you?
05:29 StDiluted I just finished setting up custom bashrc prompts based on what AWS region the instance is in
05:29 StDiluted we have instances with the same hostname in VPCs in both regions
05:29 StDiluted easy to get confused
05:31 kleinishere For salt.states.git.latest, is this only run on the initial high state call or can someone comment on how (often) salt will know to check the github repository after the initial clone?
05:31 kleinishere https://salt.readthedocs.org/en/latest/ref/states/all/salt.states.git.html
05:31 auser I'm not sure I understand kleinishere
05:31 auser it'll only "check" github on highstates
05:31 auser when the state runs
05:32 StDiluted you can schedule the highstate call
05:32 carmony joined #salt
05:32 auser yeah, absolutely
05:32 StDiluted I think that's what he's asking
05:32 kleinishere ah, that's interesting StDiluted. is that done through a crontab or some inherent salt function?
05:32 kleinishere (yeah, that's what i was trying to get at)
05:33 bluemoon joined #salt
05:33 StDiluted http://docs.saltstack.com/topics/jobs/schedule.html
05:34 StDiluted I think that's what you're looking for
05:34 StDiluted my battery is almost dead, I'm gonna head off
05:34 StDiluted gnight all
05:35 auser night StDiluted
05:42 koolhead17 joined #salt
05:42 koolhead17 joined #salt
06:00 fragamus joined #salt
06:00 Newt[cz] joined #salt
06:06 knightsamar joined #salt
06:12 druonysus joined #salt
06:17 Ryan_Lane joined #salt
06:18 felixhummel joined #salt
06:24 morganfainberg joined #salt
06:24 linjan_ joined #salt
06:24 bluemoon joined #salt
06:25 druonysus joined #salt
06:25 gadams joined #salt
06:25 druonysus joined #salt
06:25 gadams joined #salt
06:26 ahammond joined #salt
06:27 carmony joined #salt
06:33 azbarcea joined #salt
06:34 az87c joined #salt
06:35 agend joined #salt
06:39 cron0 joined #salt
06:39 eculver joined #salt
06:49 emocakes joined #salt
06:54 Ivo joined #salt
07:02 carlos joined #salt
07:07 kermit joined #salt
07:15 Timitos1 joined #salt
07:19 ollins joined #salt
07:21 kadel joined #salt
07:26 Ryan_Lane joined #salt
07:29 balboah joined #salt
07:38 scott_w joined #salt
07:49 goodwill joined #salt
07:51 efixit joined #salt
07:54 bemehow joined #salt
07:59 backjlack joined #salt
08:03 omame left #salt
08:13 kstaken joined #salt
08:14 felixhummel joined #salt
08:23 Ryan_Lane joined #salt
08:23 Ryan_Lane joined #salt
08:29 nickray joined #salt
08:45 Newt[cz] joined #salt
08:55 yota joined #salt
09:11 whiskybar joined #salt
09:12 zooz joined #salt
09:18 knightsamar how do i handle a collection of template files ?
09:18 * knightsamar is a very newbie to salt
09:24 mprymek joined #salt
09:29 scott_w joined #salt
09:32 oliv_mc left #salt
09:42 LucasCozy Hello, is it possible to call a state file.managed on /etc/...
09:42 LucasCozy I 'm using proxmox and want add a /etc/pve/storage.
09:43 LucasCozy But the call of my state drive me to an error on python os_chmod
09:45 oliv_mc joined #salt
09:46 Furao "error on os_chmod" isn't helpfull
09:49 p3rror joined #salt
09:50 whiskybar joined #salt
09:54 nkuttler knightsamar: what do you mean?
09:54 nkuttler knightsamar: i like to have a file hierarchy that reflects the os, e.g. packages/foo/bar.conf
09:57 john__ joined #salt
09:58 knightsamar nkuttler: say i have a collection of jinja templates in /srv/salt/templates/jinja/a which are spread over subdirectories like .../jinja/a/type1 .../jinja/b/type2
09:58 knightsamar and i want this whole collection to be parsed and put on the minion
09:58 nkuttler knightsamar: oh, i see.. no idea about that
09:58 knightsamar how to do this ?
09:58 knightsamar ok
09:59 john__ hello. I need to make salt reboot the instance while running state.highstate on a minion in masterless mode. How can I add to my state file "If /tmp/rebooted doesn't exist, create the file then reboot the instance"?
09:59 nkuttler knightsamar: doesn't file.directory support a template attribute?
09:59 knightsamar does it ? will check the docs
10:00 nkuttler knightsamar: er, file.recurse, and yes it does
10:02 crazysim joined #salt
10:02 bemehow joined #salt
10:05 knightsamar john__: i don't how to what u said...but if u are going to use /tmp really, i hope you know that it flushes out on reboots
10:07 felixhummel joined #salt
10:08 john__ ok well wherever. but can you add arbitrary python code to jinja2 'if' clauses?
10:09 john__ or can you make salt somehow only run a command once?
10:10 MrTango joined #salt
10:10 knightsamar john__, to run a command only once, you can use salt.cmd.run
10:10 john__ in the state file
10:10 knightsamar where u explicitly state what command to ru
10:11 knightsamar no idea...
10:11 john__ i need to upgrade boto. then make salt restart so it uses the new version of boto
10:11 john__ so i can then use it in my custom state module.
10:11 knightsamar u want salt to restart the machine or itself ?
10:12 john__ well, strictly speaking i only need salt to stop so I can restart it again (unless it can restart itself). but so that security updates are applied i also want to be able to restart the machine, so i thought i'd kill 2 birds with one stone
10:13 whiskybar joined #salt
10:13 john__ but if rebooting part way through will be difficult, restarting salt would be enough
10:13 john__ and i'll just reboot the machine after salt finishes
10:14 john__ at a push i could split my top file into 2 parts: run apt-get update, apt-get upgrade & upgrade boto then reboot, then a second top.sls file to run the rest of the stuff post-reboot
10:14 knightsamar ok...
10:14 knightsamar does this help ? https://salt.readthedocs.org/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.call
10:14 john__ is there anyway of calling 'salt-call state.highstate --local' with a different top file?
10:15 knightsamar my expertise ends here :)
10:15 john__ ah that could work...
10:16 john__ thanks
10:17 john__ do you know how i could split my top file in 2 though? that'd be nicer because salt would exit with a 0 after running the reboot step instead of bombing out with a -1 if it terminates unexpectedly because of a reboot
10:21 knightsamar no idea
10:21 john__ ok thanks anyway. i'll dig through the docs
10:22 knightsamar yep...they are easy and good
10:24 Xeago joined #salt
10:45 david_a joined #salt
10:47 Xeago_ joined #salt
10:56 oliv_mc joined #salt
10:59 john__ i'm trying to download a file from s3. I've found salt/utils/s3.py. How do I actually use it?
11:01 giantlock joined #salt
11:03 [diecast] joined #salt
11:03 [diecast] joined #salt
11:03 jeddi joined #salt
11:03 oz_akan_ joined #salt
11:05 cron0 joined #salt
11:12 jbunting joined #salt
11:18 gmoro_ joined #salt
11:19 tgecho joined #salt
11:32 lemao joined #salt
11:35 flurick Can I check if the minion is acctually sending its key to the master? I dont know what happend but when I pinged the minion from the master, the minion said that the master had cached the key.
11:48 cron0 joined #salt
11:55 felixhummel flurick: on master: salt-key -L
11:55 felixhummel should list the minion
12:04 flurick yeah I tried that, didnt show any keys but I didnt know if it was the minion not sending or the master not receiving
12:08 Xeago_ joined #salt
12:13 tonthon Hi, I'm trying to figure out how to use the watch requisites with custom state modules
12:14 tonthon Let's say state2 is watching state1, state2 should be executed only if state1's returned changes dict is void
12:14 tonthon is that right ?
12:29 jbunting joined #salt
12:30 Newt[cz] joined #salt
12:33 Jahkeup_ joined #salt
12:33 aat_ joined #salt
12:36 KennethWilke joined #salt
12:39 mikedawson joined #salt
12:42 bemehow joined #salt
12:45 kermit joined #salt
12:45 blee joined #salt
12:46 timoguin_work joined #salt
12:46 tempspace How do we grab the hostname of a server a state is running on to use via jinja?
12:47 knightsamar tempspace: grains['hostname'] ?
12:54 napperjabber joined #salt
12:55 mikedawson_ joined #salt
12:59 Newt[cz] joined #salt
12:59 juicer2 joined #salt
13:01 Valdo joined #salt
13:04 brianhicks joined #salt
13:04 robinsmidsrod joined #salt
13:05 oli joined #salt
13:11 stephen__ joined #salt
13:12 toastedpenguin joined #salt
13:16 oz_akan_ joined #salt
13:17 timl0101 joined #salt
13:18 bejer Where can I find information on how to properly format a debconf file, when not setting the questions/answers directly in the state?
13:18 Kholloway joined #salt
13:19 zloidemon joined #salt
13:19 ClausA joined #salt
13:20 anteaya joined #salt
13:20 whiskybar joined #salt
13:21 LyndsySimon joined #salt
13:22 aat_ joined #salt
13:24 Xeago joined #salt
13:25 racooper joined #salt
13:28 Gifflen joined #salt
13:32 mgw joined #salt
13:36 oz_akan_ joined #salt
13:42 justThisGuy hi...
13:42 justThisGuy I've used the salt-users maling list but...
13:42 justThisGuy can someone help me with this?
13:42 justThisGuy https://groups.google.com/forum/#!topic/salt-users/fiTe-o86rmY
13:42 TheRealBill joined #salt
13:42 justThisGuy I may be trying to do something I shouldn't, but it seems handy...
13:44 teskew1 joined #salt
13:48 kaptk2 joined #salt
13:50 oliv_mc joined #salt
13:52 hazzadous joined #salt
13:53 cron0 joined #salt
13:54 Jahkeup__ joined #salt
13:58 fredvd joined #salt
14:00 oz_akan__ joined #salt
14:01 glenbot joined #salt
14:04 jbunting joined #salt
14:06 LucasCozy joined #salt
14:10 aberant joined #salt
14:12 ronc joined #salt
14:12 justThisGuy or... in any case, any firewall examples?
14:17 oz_akan_ joined #salt
14:24 timl0101 joined #salt
14:26 jslatts joined #salt
14:26 kho joined #salt
14:30 thingles joined #salt
14:30 [diecast] joined #salt
14:30 [diecast] joined #salt
14:31 mgw joined #salt
14:32 tonthon Is there a way to manage minions update from the master ?
14:38 teskew joined #salt
14:40 koolhead17 joined #salt
14:52 Bastion2202 joined #salt
14:52 UtahDave joined #salt
14:56 StDiluted joined #salt
14:59 napperjabber joined #salt
14:59 toastedpenguin so far I have been creating states files for the services/files that need to be on all servers aka the base, adding these differen states to the top.sls file, if I want to target some states files for specific hosts or groups of hosts (now that I defined nodegroups) how do I do that?
15:02 efixit joined #salt
15:02 UtahDave toastedpenguin: match on those groups in your top.sls
15:02 jalbretsen joined #salt
15:03 JasonSwindle joined #salt
15:04 blee_ joined #salt
15:04 aberant joined #salt
15:04 toastedpenguin so in top.sls with existing base: '*' -xyz add the location: 'nodegroup' ?
15:05 Nexpro joined #salt
15:07 jslatts joined #salt
15:09 toastedpenguin UtahDave: that would probably work for a static states file, not sure if it works for what I  am trying to do, maybe it will but as a noob I am not sure
15:10 toastedpenguin I am attempting to setup management of a script that would reside in cron.daily for a backups using a tool call tarsnap, every host I want to backup would use this script but the files,/dir being backed up arew different based on the minions purpose
15:11 nrub joined #salt
15:11 UtahDave toastedpenguin: let me put together a quick example
15:12 toastedpenguin I was thinking I could either have a different version for each minion tyoe or use a template to modify the target file/dir within the script
15:13 cwarner_ joined #salt
15:13 Ivo joined #salt
15:13 UtahDave http://pastebin.com/7wWjJw5d
15:15 toastedpenguin ah ok, so that takes care of the top.sls config, I could have several different cronstuff{1,2,3...} states and specify them using group{1,2,3...} or figure out some sort of template
15:16 toastedpenguin which sounds like I would need to use pillar to create the different minion attributes I need to use to call for the template
15:17 Jahkeup_ joined #salt
15:17 Jahkeup__ joined #salt
15:18 m_georgez|away joined #salt
15:18 toastedpenguin UtahDave: thanks for the example btw
15:18 m_george left #salt
15:19 Gifflen Strange question. Does anyone know of any projects to generate a requirement diagram from .sls files in salt?
15:20 pascal joined #salt
15:20 UtahDave toastedpenguin: you're welcome.  Yes, there are several ways to do what you want
15:20 toastedpenguin is my assumption of using pillar for this correct?
15:20 UtahDave Gifflen: We've got plans for that in the Salt UI, eventually, but it hasn't been started yet.  I haven't heard of one in the community yet
15:21 UtahDave toastedpenguin: you could use pillar, or grains, or whatever works for you to classify your minions.
15:21 Guest6175 Hi, could someone please tell me if it's possible to disable some module from the salt-master? (ie: i want to disable cmd.run)
15:21 Gifflen gotcha. Cool thanks! We're trying to start documenting the relationships and hopefully simply everything. Good to know though. Thanks!
15:21 chrisgilmerproj joined #salt
15:22 emilisto joined #salt
15:23 UtahDave you're welcome, Gifflen. I'd love to hear if you come up with anything for that.
15:24 JasonSwindle Gifflen: I badly need that as well.
15:24 UtahDave Guest6175: yes, you can.
15:25 UtahDave Guest6175: look at the client_acl_blacklist option in the master config
15:25 Guest6175 @UtahDave Thanks a lot!
15:25 KennethWilke JasonSwindle: is that all you need, sir...
15:25 anteaya joined #salt
15:26 JasonSwindle KennethWilke: Ha!  I need so much more :)
15:26 KennethWilke JasonSwindle: how did i know!
15:27 UtahDave JasonSwindle and KennethWilke: I'll be down there next Tuesday and Wednesday! flights booked already
15:27 JasonSwindle UtahDave: AWESOME!
15:27 KennethWilke UtahDave: I am excited about this, I shall be in one of your meetings
15:28 JasonSwindle Ditto
15:28 UtahDave sweet!  Apparently Wednesday is going to be super busy.  :)
15:28 devinus_ joined #salt
15:29 KennethWilke i'd like to see salt all over this place!
15:29 KennethWilke so thank you for helping make that happen
15:29 KennethWilke :p
15:30 UtahDave We're stoked about it, too!
15:30 UtahDave We'll be bringing down a bunch of Salt shirts and stickers.  Just got some new stickers in.
15:30 TheRealBill UtahDave: woot!
15:31 UtahDave Are we going to see you there, too, TheRealBill?
15:31 TheRealBill UtahDave: You bet.
15:32 UtahDave cool!  I'm looking forward to meeting you all
15:32 toastedpenguin UtahDave: since I have different dir to backup based on the minion type I thought pillar was how I would define this?
15:33 loolglool joined #salt
15:33 UtahDave toastedpenguin: Yeah, that's a great place for that.
15:34 bemehow joined #salt
15:34 swa what's the best approach to deploying apache virtualhosts ?
15:35 jschadlick joined #salt
15:36 Timitos1 left #salt
15:36 swa I wanted to have some kind of pillar with all the informations, and in top.sls i would apply "vhost: example" to a server.. example would pull data from the pillar.. not sure if it's possible.
15:37 UtahDave swa: yeah, that's totally possible.  You can set up a generic config and then define the per virtualhost unique items in pillar
15:38 kleinishere joined #salt
15:39 swa UtahDave: right, I'll give it a shot. By any change, someone already published that kind of states on github to your knowledge ? Didn't find anything relevant
15:39 UtahDave swa: yeah, I think so. Give me a second to find something
15:40 jkleckner joined #salt
15:41 UtahDave swa: look at this config file here: https://github.com/saltstack/formulae/blob/develop/openstack/nova/nova.conf
15:42 UtahDave see how each config item looks for a pillar value?  And if there isn't one, then it will use a default
15:44 swa i'm not entirely sure if I can make that work with multiple virtualhosts in my case, but i'll give it a shot. Thanks !
15:45 TheRealBill I am building out a module, grains, pillar, and state set for Redis deployments. It would be nice if that could go all in one directory instead of needign to put some in _grains, some in _modules, some in /path/to/pillar/. :/
15:45 oliv_mc joined #salt
15:45 TheRealBill s/some/files/
15:46 UtahDave TheRealBill: Yeah, I agree. Then it becomes a self contained package for deployment
15:46 raydeo joined #salt
15:47 UtahDave it probably wouldn't be too hard to add support for that for module, grains and state. Pillar might be a little more complicated.
15:47 TheRealBill UtahDave: even if we could combine all but pillar that would be a big help.
15:48 TheRealBill on a related note ... with gitfs as the backend, is there a way to specify a subdirectory in a repo, or would the pillar and salt trees need to be in separate repos?
15:49 jslatts joined #salt
15:52 UtahDave they'd have to be in separate repos.  You can't specify a subdirectory inside the repo.
15:52 TheRealBill :(
15:57 sw_ joined #salt
15:58 mgw joined #salt
15:58 lemao joined #salt
16:09 jpadilla joined #salt
16:09 lemao joined #salt
16:13 elasticdog joined #salt
16:13 dzen Hi
16:14 jschadlick I am a little confused about the syntax for the source of states.file. If you want the source to be a file on the master is it just <master_host_name>://path/to/file.conf  ?
16:14 dzen I'm using salt to configure new incomming minions. A machine boot up, install a debian from the lan, and associate itself to the master
16:15 dzen so, in a first step, I would like to reconfigure it's hostname and salt id.
16:15 dzen is that a good use case ?
16:16 dzen because I will have to re associate the minion to the master, and i'll have to remove the old pkis on both minion and master
16:16 cedwards jschadlick: sourcing a file on the master is salt://path/to/file.conf, where path is relative to your file_roots.
16:16 elasticdog joined #salt
16:16 jschadlick cedwards: gotchya, thanks
16:17 rlb dzen: note that on debian you may be able to drop files into the /etc/*.d/ directories instead of trying to auto-edit the main config file, depending on what you need to change.  Not sure if the .d dirs are debian-specific...
16:18 dzen oh
16:18 dzen good point
16:18 dzen okay
16:21 KyleG joined #salt
16:24 aberant joined #salt
16:28 devinus_ joined #salt
16:32 jdenning joined #salt
16:35 pentabular joined #salt
16:37 rlb so what's the right way to keep a file that you might be changing programatically, in sync across all minions?  Just make the change and then run "sls '*' state.highstate"?
16:37 rlb (a managed file)
16:37 ydavid joined #salt
16:38 mgw rlb: it would be "salt '*' state.hightstate", but you might also want to apply just the relevant sls
16:38 mgw rlb: "salt '*' state.sls some_sls"
16:42 rlb mgw: ok -- and what might cause the state.sls to fail?  Or rather, I've been doing that, and it seems like it fails on some nodes at times.  It might be that the nodes in question are still working on highstate (for the first time) -- could that cause it to fail?
16:42 rlb (cause the competing state.sls to fail?)
16:42 bluemoon joined #salt
16:42 mgw rlb: not sure, what error do you get?
16:42 oz_akan_ joined #salt
16:43 jbunting joined #salt
16:44 dahunter3 joined #salt
16:44 rlb mgw: [repost from yesterday] - I was invoking "salt '*' state.sls update-a-managed-file" from an event that can fire at random, and I see 'data failed to compile --- The function "state.sls" is running as PID N and was started at X with jid req Y".
16:44 rlb I see that error for some nodes, but if I keep repeating the salt call, it eventually succeeds.
16:44 rlb (for everyone)
16:45 rlb But in order to automate this, I need to be able to either avoid that error, or know that I need to repeat.  I suppose I could just grep the salt output for some bit of that error message and retry if I find it, but that seems fairly ugly.
16:46 kstaken joined #salt
16:46 rlb ..and fragile, unless that error *only* means that a retry is OK, and will eventually work.
16:47 mgw rlb: yeah, I think that's because it was already running
16:47 UtahDave yep
16:48 rlb so how should I handle that?
16:48 rlb i.e. how do I either avoid the problem, or know that the right thing to do is just "try again"
16:48 rlb (from my cronjob)
16:50 rlb And when is it that there's a conflict -- just when the two states that have a similar node are trying to fire at the same time (because these two states aren't related at all dependency-wise).
16:51 bfrog hi, I have a grain that looks like environment: staging
16:51 bfrog in my top.sls file I match on that doing... 'environment:staging': - match: grain
16:51 bfrog it never matches?
16:51 bfrog state.show_highstate doesn't show it matched
16:51 bfrog confused
16:53 UtahDave have you synced your grains?
16:53 ksalman_ joined #salt
16:53 bfrog this is all local
16:53 bfrog its not using a salt master
16:54 bfrog salt-call --grains show it
16:54 UtahDave does your grain show up in    salt-call grains.items?
16:54 UtahDave ah, ok.
16:54 rlb Oh, and for whatever it's worth, from a new user's perspective, one bit of documentation that I haven't found, but would really like, is a careful overview of how states work, that, for example, makes some of the above issues clear -- is it OK to run the same state twice in parallel (for two different calls), and if so, what happens -- does one block, do they run in parallel, etc.
16:54 UtahDave can you pastebin your top.sls?
16:55 bfrog UtahDave: blah, it appears to work... I missed the prin out...
16:55 bfrog sorry
16:55 bfrog :(
16:56 bfrog this thing is growing by the minute
16:56 bfrog UtahDave: another question I had though was... is there a way to resume or force cmd.wait states to run
16:56 dahunter3 I'm trying to set up unix users users to be able to access salt. What's the right one to use, client_acl or external_auth: pam: ?
16:56 bfrog like if I have an error somewhere where cmd.wait should run after I've fixed it but never runs because it errors before it was run the first time
16:57 bfrog like I have a build: cmd.wait after a source: git.latest
16:57 UtahDave bfrog: I think in that instance I would create a second sls file that does what you want with just those ID declarations.
16:58 UtahDave dahunter3: client_acl is for local system users
16:58 rlb mgw, UtahDave: so am I just off in somewhat uncharted territory or something, with respect to trying to automate things that might interfere with each other if run at the same time? i.e. does salt just not account for that right now? (which is fine -- I just need to know what's intended)
16:58 bfrog UtahDave: well it was at first a require: issue, missed one
16:58 bfrog like I do basically every time I write a state
16:58 rlb i.e. does salt currently only expect serialized calls to "salt ..."?
16:58 bfrog so then I go fix it, but the cmd.wait never runs still
16:58 bfrog if I do it from scratch after fixing the require situation things work fine
16:59 bfrog the watch causes the cmd.wait to run, and the whole deploy works
17:00 dahunter3 UtahDave: Ahah, I see, I needed to restart the master. I thought perhaps I didn't because when I first edited the master file it complained that I had made a syntax error when I ran salt, which made me think a reload wasn't needed.
17:01 bfrog or if I just rm -rf the git repo things work fine, because then the git repo changes
17:01 bfrog salt doesn't seem to know that it should run the watchers after error corrections, which kind of makes things difficult to develop
17:01 bfrog I basically have to start close to scratch every time
17:01 bfrog to ensure it actually really works
17:02 bfrog been driving me crazy
17:04 bfrog UtahDave: does that make sense? not sure how a seperate sls would fix this?
17:04 dahunter3 UtahDave: So is there a way to allow people to run salt commands from their workstations? Right now I'm using a shell script that uses SSH to connect to the master and run salt.
17:04 dahunter3 But perhaps that's not best way to do it?
17:04 UtahDave bfrog: When you're watching another state, it action is only executed if the other state returns a change.  If the other state doesn't return a change, then salt doesn't execute the action
17:04 bfrog right, so if salt errors out between...
17:04 bfrog how do I resume?
17:05 UtahDave dahunter3: just a sec.
17:05 bfrog like I'm developing a new state file right, it errors in the middle because I forgot one of the bajillion - require lines to ensure the DAG is good, I add that back in, the world is happy, but the state doesn't really do what I want it to do then
17:05 [diecast] joined #salt
17:06 bfrog I'm forced to basically start from scratch again, from a fresh VM, like vagrant destroy && vagrant up
17:06 UtahDave bfrog: it's doing exactly what you're telling it.  The watch will only trigger the event if the "watched" event indicates a change.
17:06 bfrog UtahDave: right, but like... what happens when there's a network error, or just an error in general
17:07 bfrog suddenly the state is all good supposedly
17:07 bfrog but it hasn't actually deployed my app
17:07 bfrog its just got the source, and the source hasn't changed
17:07 bfrog I get that its doing what I'm telling it to do
17:07 bfrog I guess I'm asking if there's a better way to do this
17:07 UtahDave bfrog: OK, then you probably need to set up your states to run everything every time the state is run
17:08 bfrog well then the 10 min build process will always run, and always rebuild my app on every call to state.highstate
17:08 bfrog which is a scheduled task
17:08 bfrog so every X mins my app goes down?
17:08 bfrog and gets restarted?
17:08 kevino joined #salt
17:09 UtahDave dahunter3: yeah, for now they'll have to ssh into the master.  There's been some work done on Salt Pepper that will allow what you're talking about, but I'm not sure it's working yet
17:09 bfrog I guess I'd have to write some complex thing to determine if the deployed version is the same as the git version
17:09 UtahDave bfrog: OK, so that's why I was saying maybe you could create another state that will execute just the portions you want.
17:09 dahunter3 UtahDave: Okay, great. Thanks!
17:09 TheRealBill dahunter3: you might also look at salt-api as well, depending on what you need.
17:09 jschadlick Is there a way to restart minion daemons remotely from the master?
17:09 pentabular joined #salt
17:10 bfrog UtahDave: not sure what you mean by that, I want it to deploy my app when the source changes or if it hasn't been deployed yet
17:10 bfrog or more realistically, if the deployment doesn't match the git repo
17:10 TheRealBill jschadlick: cmd.run perhaps?
17:10 bfrog thats the condition I want to meet
17:11 bluemoon joined #salt
17:11 jschadlick TheRealBill: ah, didn't think about that
17:11 loolglool Hello! Is there a way to prevent the minion from generating a key upon startup?
17:11 TheRealBill jschadlick: though you obviousl ytwon't get the response from the command since the minion will be down for that part. ;)
17:12 jschadlick TheRealBill: I can live with that
17:13 StDiluted Actually you do get a response
17:13 StDiluted I did that a bunch yesterday
17:14 StDiluted cmd.run 'service salt-minion restart' gives you back a stop and start
17:14 UtahDave loolglool: I don't think there is.
17:14 logix812 joined #salt
17:14 UtahDave bfrog: OK, so it sounds like once you've got your state all sorted out, then you're fine. It's just during development that you're having a problem.
17:15 loolglool UtahDave: Hmm, ok. Thanks.
17:15 UtahDave loolglool: you can delete the keys, replace them with ones you've pregenerated and then restart the minion.
17:19 jkleckner joined #salt
17:19 bfrog UtahDave: well I wish development was less "it must be perfect or start from scratch" kind of too
17:19 aberant joined #salt
17:20 bfrog would make it a lot faster, like with ansible it was pretty easy because there's no - require stuff going on, just "step 1, step 2, step 3, etc"
17:20 bfrog though it is slower
17:21 UtahDave bfrog: well, if you're triggering off git.latest,  then just modify that repo real quick before re-running
17:24 JasonSwindle joined #salt
17:25 devinus_ joined #salt
17:26 TheRealBill StDiluted: interesting and pretty cool
17:26 loolglool UtahDave: I'm trying to figure out an automated way of doing this via vagrant-salt. I've been able to preseed the keys to master/minions with a seed- prefix and seemingly accepts the key according to the master's log file, but then I get: "Authentication failed from host ops, the key is in pending and needs to be accepted with salt-key -a ops" and the minion keeps retrying after 10 seconds.
17:27 TheRealBill loolglool: pregenerate the key onteh master and via some mechanism get it to the minion before starting salt-minion should do it.
17:27 jacksontj joined #salt
17:28 bluemoon joined #salt
17:28 oz_akan_ joined #salt
17:30 tonthon Is there a good way to test events subscription
17:30 UtahDave loolglool: yeah, so when you pregenerate the keys, you're responsible for putting the minion's pub key in the "pki/minions" directory on the master and placing the pub and priv keys in the appropriate places on the minions
17:30 druonysus joined #salt
17:31 UtahDave tonthon: there's a script in the salt repo in the test directory named  eventlisten.py  (or something close to that)
17:31 tonthon UtahDave: I've used it, the event fires well
17:32 jslatts joined #salt
17:32 tonthon it's the subscription part that doesn't work as I expect
17:32 UtahDave tonthon: in the reactor?
17:33 druonysus joined #salt
17:33 druonysus joined #salt
17:33 tonthon UtahDave: if I've got my reactor entry in the /etc/salt/master conf file and I've got the corresponding state in /srv/reactor, it should be ok ?
17:33 tonthon or am I missing a step ?
17:33 UtahDave yep! just make sure to restart the master after modifying the master config
17:33 tonthon mmmh ...
17:34 tonthon maybe I missed that one, I'll give it a try
17:38 tonthon another question about reactor
17:38 tonthon how does it behave with salt-syndic
17:38 tonthon ?
17:39 tonthon are the events transmitted to the upper point ?
17:39 aat_ joined #salt
17:39 UtahDave tonthon: I believe that the events travel up, but I haven't used it in that scenario yet.
17:39 tonthon ok, maybe I'll give some feedback
17:40 oz_akan_ joined #salt
17:40 stevetodd joined #salt
17:42 jbunting joined #salt
17:42 UtahDave that would be great!  thanks, tonthon
17:44 tonthon I can't get it work
17:44 tonthon Here is my sample : http://pastealacon.com/32704
17:44 brianhicks joined #salt
17:45 tonthon with eventlisten.py I can see the event is fired
17:45 tonthon but the touch isn't performed
17:45 tonthon any idea would be welcome
17:48 kstaken joined #salt
17:49 jpadilla_ joined #salt
17:49 jaequery joined #salt
17:51 UtahDave tonthon: reading your paste and some docs
17:53 UtahDave tonthon: that looks pretty good.   Just to be safe, could you make sure in your reactor config that you're using 2 spaces for each indent level, and change the doublequotes to single quotes?
17:54 tonthon UtahDave: I'll give it a try
17:56 loolglool UtahDave: thanks, I think I understand now. According to the code, it only ever uploads to /tmp/ . I'll move it out of there by some process.
17:58 tonthon UtahDave: ok, I've got it, I had some troubles in my connection between minions and master
17:58 tonthon now it seems to be all right
17:58 tonthon I think I can call it a day :))
17:59 tonthon UtahDave: thx a lot for sustaining me, I felt a bit lonely :)
18:02 tonthon UtahDave: as a feedback I can say the events travel up the syndic hierarchy
18:02 dahunter3 Is there a way to log all of the salt commands? I want an audit trail of what my guys are doing with it.
18:02 tonthon dahunter3: you can specify returners
18:03 tonthon (I don't know if you can set one globally)
18:08 jpadilla joined #salt
18:13 dahunter3 Seems like the master should support just logging all commands run to a log file by default?
18:17 rlb what do you do if you need multiple files managed as part of a state, i.e. http: ... file.manged: /etc/http/foo .. file.managed /etc/http/bar.  Do you just have to break that up into multiple top-level states?
18:17 rlb ...salt doesn't appear to allow multiple modules of the same type in a state, i.e. file.managed and file.sed, etc.
18:18 UtahDave tonthon: cool, thanks for letting me know!
18:18 UtahDave dahunter3: all the commands are kept in the job cache for 24 hours by default.
18:19 dahunter3 UtahDave: Gotcha. I had just found https://github.com/saltstack/salt/issues/4301
18:19 UtahDave dahunter3: you can also specify an external jobs cache where you can keep all that in a database
18:19 Eugene I break it up into, eg http-conf, http-conf-ssl, http-conf-siteA....
18:19 UtahDave rlb: you are correct. You have to break it up under multiple ID declarations.
18:20 UtahDave remember that it gets compiled into a python dict and file.managed is the key.  You can't duplicate key names.
18:20 ace_ joined #salt
18:21 rlb UtahDave: ok, so I'm just trying to figure out the least awkward way to install a package, then stop the service, edit two config files (one via file.sed and one via file.managed) and then restart the service.  Any suggestions for the best structure there?
18:22 rlb (best rough structure)
18:22 rlb and I'd rather not have to stop/start the service twice
18:23 rlb though I can if that works best with what salt currently allows
18:23 oldhack joined #salt
18:23 StDiluted Why does the service need to be stopped to edit the files?
18:23 StDiluted (just curious)
18:23 rlb because that's the way they wrote it -- no idea -- if you edit at least one of those files while its running, it gets wedged
18:24 Eugene I think you could put that together with depends:
18:25 loolglool left #salt
18:25 StDiluted I guess that you could handle that with some sort of flag file, where you touch a /tmp/OK_TO_START_SERVICE  file and then you could check that with some depends: or watch: statements
18:26 auser joined #salt
18:26 StDiluted joined #salt
18:26 StDiluted sorry client freaked out
18:27 auser hey all
18:27 rlb Can a state just list other state ids, i.e. do-x:\n  do-y:\n  do-z\n"?
18:27 UtahDave rlb: well, a simple way would be to have an ordered list of steps.  pkg.install, service.stop, file.sed, file.managed, service.start  all tied together with requires.
18:28 UtahDave rlb: yes, by using includes.
18:30 jpadilla joined #salt
18:30 StDiluted so, a require:  - pkg:  - packagename doesn't check the system to see if the package is installed, it checks to see if that step has been done in the state already, yes?
18:30 lemao joined #salt
18:30 rlb UtahDave: ok, so service.start would require file.sed and file.manage, and they would both require service.stop?
18:31 UtahDave StDiluted: yes, it looks at the return of pkg.installed to see if it returns success or a change or failure.
18:31 rlb or maybe they would require pkg.install and service.stop
18:31 UtahDave rlb: yep!
18:31 rlb ok, I also wasn't thinking clearly about the fact that I can list multiple requires/watches.
18:31 rlb thanks
18:31 rlb (per state)
18:32 UtahDave sure
18:34 jpadilla joined #salt
18:35 rlb Oh, and are state names scoped within .sls files, i.e. is it OK to have a state named foo in two different .sls files without conflicts/shadowing?
18:36 Ryan_Lane joined #salt
18:37 jschadlick joined #salt
18:37 UtahDave rlb: no, they'll conflict. All included sls files get compiled into one big python dictionary.
18:37 UtahDave That's why you can give an arbitrary name for the ID declaration and then use the - name  option to change the name to what you want.
18:39 rlb ok, so the state ID is global -- so if you need to both manage a file, and touch it, you just can't use the filename for the ID?
18:39 nage joined #salt
18:39 nage joined #salt
18:39 rlb (even if you do that from different .sls files?)
18:41 rlb I suppose that surprises me a bit -- since who knows what IDs someone might choose across all the .sls files I might be adding (esp "library" files)...
18:41 rlb UtahDave: hopefully it's an error at startup when there are ID conflicts?
18:42 rlb I suppose (if you were being pedantic), you could always just prefix your state names with the sls file name. i.e. all states in foo.sls are foo_*.  That should reduce the potential for conflict.
18:44 UtahDave rlb: you can also just give your id declaration any arbitrary descriptive name    and then put the filename in the - name:    option         - name: /etc/manage/me.txt
18:45 jacksontj joined #salt
18:48 ronc joined #salt
18:49 jslatts joined #salt
18:51 oz_akan_ joined #salt
18:52 rlb UtahDave: ok, thanks -- seems like it might be worth suggesting that up front in the docs, since I would imagine that as an installation grows, it will be more and more likely that state names will conflict, esp if you don't use IDs much at all (which is what the docs generally do when they can).
18:53 UtahDave rlb: good idea
18:55 hazzadous joined #salt
18:55 rlb ...and longer term, if you really can't interact with internal .sls states from outside, then it might make sense to just scope them internally -- have salt fix that problem for us.
18:55 rlb ...perhaps by automatically adding a prefix to the dictionary key, or by using a tree of dictionaries or...
18:59 oz_akan_ joined #salt
19:00 zooz joined #salt
19:06 thingles joined #salt
19:11 Kingino joined #salt
19:11 Kingino How do I specify that I want python 2.7.5 installed?
19:12 fredvd joined #salt
19:12 UtahDave Kingino:  - ver: 2.7.5
19:13 ronc joined #salt
19:13 Kingino UtahDave: Thanks I will give that a try… the docs say - version:
19:15 UtahDave Kingino: oops, sorry.  Yeah, follow the docs.  I just spouted that from off the top of my head.  :)
19:15 Kingino UtahDave: Neither seems to work
19:15 Kingino Let me get a gist of what I am doing...
19:15 UtahDave Kingino: can you pastebin your sls file?
19:15 Kingino :)
19:17 Kingino UtahDave: https://gist.github.com/nZac/078956e20c51cd006dc6
19:17 e7_kevin joined #salt
19:17 diegows_ joined #salt
19:17 Kingino UtahDave: This is on a vagrant ubuntu 12.04 box
19:18 Gifflen_ joined #salt
19:19 UtahDave Kingino: did you try  - version: 2.7.5   ?
19:19 alekibango joined #salt
19:19 Kingino UtahDave: Ill try it again. One sec
19:20 Kingino The first line is the package name that apt will try and install right?
19:20 Kingino so maybe that needs to be something else? I am not sure.  I wish salt had a way for me to see some sort of output
19:21 Gifflen_ joined #salt
19:21 drogoh_ joined #salt
19:21 UtahDave Kingino: also, is   python 2.7.5 available in apt on ubuntu 12.04?  I'm only seeing 2.7.3
19:21 auser StDiluted: hey man
19:21 SirScott_ joined #salt
19:21 whit joined #salt
19:21 StDiluted hey
19:21 nliadm When do external pillars get called?
19:21 lemao joined #salt
19:21 nliadm is it after the file-based one?
19:22 bejer_ joined #salt
19:23 nliadm docs make it sound like that's the case. is it possible to make it run first?
19:23 Koma_ joined #salt
19:24 UtahDave nliadm: Hm. I'm not sure.  Let me poke around
19:25 jacksontj joined #salt
19:25 keith_ joined #salt
19:25 nliadm because if so, I can stop having all my minions find their 'roles' and have an external pillar that pre-seeds it
19:25 mzito____ joined #salt
19:26 Viaken_ joined #salt
19:26 ronc joined #salt
19:28 Kingino UtahDave: That might be a good point, I am looking and it seems like it isn't...
19:29 njoyce` joined #salt
19:29 StDiluted I would think setting a role via grain would be wiser
19:29 StDiluted since it runs when the minion starts
19:30 EWDurbin_ joined #salt
19:31 jacksontj joined #salt
19:31 jefferai joined #salt
19:31 StDiluted whee netsplit
19:31 StDiluted nliadm, why don't you set a grain to define a role?
19:33 crazysim joined #salt
19:33 nliadm StDiluted: I do that now, but that has all minions hitting my ldap server themselves
19:33 jesusaurus joined #salt
19:34 StDiluted ah
19:34 nliadm and means keeping credentials on every minion
19:34 StDiluted right
19:34 StDiluted I ran into the same with AWS tags setting roles, and just dealt with it
19:34 nliadm right. but if you could arbitrarily order pillars............
19:34 StDiluted sure
19:36 setient joined #salt
19:36 cedwards are there any docs (assuming it's possible) to get Salt running on Cent 4.x?
19:36 mephx joined #salt
19:37 racooper CentOS 4 is EOL. quite EOL.
19:38 cedwards I'm aware of that. We've got legacy boxes..
19:38 racooper if you're stuck with 'em, I'll throw some holy water your way.   What's your cardinal direction from Texas?
19:39 nliadm cedwards: I'd guess using esky and building it on one of those boxes
19:39 nliadm esky takes some wrangling, though
19:39 cedwards we're considering salt and ansible, and either needs to be able to support our legacy 4.x machines.
19:40 cedwards if i can't get 4.x to work, that puts a point in the ansible column for sure :(
19:40 racooper I believe you're going to be out of luck Salt runs on Python 2.6 and 2.7.  C4 comes with Python 2.3.
19:40 StDiluted needs newer python so if that's not easily available...
19:41 marcinkuzminski joined #salt
19:41 jalbretsen joined #salt
19:42 ipmb joined #salt
19:43 ronc joined #salt
19:44 BRYANT__ joined #salt
19:44 jdenning_ joined #salt
19:45 devinus_ joined #salt
19:45 juicer21 joined #salt
19:46 esrax_ joined #salt
19:46 Nexpro2 joined #salt
19:46 joehh1 joined #salt
19:46 tempspace_ joined #salt
19:46 chrism joined #salt
19:47 emilisto_ joined #salt
19:48 loz_hurs1 joined #salt
19:48 jetblack_ joined #salt
19:48 Odd_Blok1 joined #salt
19:48 martineg_ joined #salt
19:48 jhujhiti_ joined #salt
19:48 sashka_u1 joined #salt
19:48 axisys_ joined #salt
19:49 bfrog is there a way to do file.managed if a directory exists like cmd.run?
19:49 bfrog like cmd.run has unless: stat ... or onlyif: stat /etc/someconfig
19:49 raydeo_ joined #salt
19:49 jschadlick joined #salt
19:50 jacksontj joined #salt
19:50 herlo_ joined #salt
19:50 imil_ joined #salt
19:50 LyndsySimon_ joined #salt
19:51 dcolish_ joined #salt
19:52 fxhp joined #salt
19:52 ronc joined #salt
19:53 scooby2 joined #salt
19:53 wyrd1 joined #salt
19:53 monokrome joined #salt
19:54 iMil joined #salt
19:55 UtahDave cedwards: a buy from IBM told us they got Salt working on Cent4.x, so it's must be possible.  But we haven't had the community demand for cent4 support
19:56 robbyt joined #salt
19:56 Gifflen tell that to my last companay. They still had a few sco boxes laying around. sent4 would have been a godsend
19:56 Gifflen cent*
19:57 UtahDave Yeah, we've had a few queries about it
19:58 UtahDave I think that at this point a company would have to sponsor cent4 development. (NOT A BINDING SALTSTACK, INC STATEMENT)     :)
19:58 elfar joined #salt
19:59 mlister2006 joined #salt
20:00 kevino_ joined #salt
20:01 LyndsySimon If a company is still using Cent4, it's probably a good indication that they aren't serious about investing in their IT infrastructure. Hence, they're probably not going to be the entity most likely to sponsor development of an Open Source tool :)
20:02 Gifflen joined #salt
20:02 SEJeff_work Or, they are stuck due to business processes on legacy vendor applications :)
20:02 ClausA joined #salt
20:02 UtahDave :)  True. Hence still no cent4 support.
20:04 baijum joined #salt
20:05 baijum left #salt
20:09 devinus_ what are the canonical salt docs?
20:10 devinus_ salt.readthedocs.org or docs.saltstack.org ?
20:10 devinus_ it seems salt.readthedocs.org has way more
20:11 UtahDave devinus_: what more does it have?
20:11 UtahDave docs.saltstack.com is what we host.
20:12 devinus_ UtahDave: maybe it's the way it's presented? it just seems wayyyyyy easier to find info on the readthedocs site
20:12 bfrog can I just - require a whole state name
20:12 devinus_ maybe that's why i think it has more
20:12 bfrog or do I really need to specify - require: - pkg: xyz
20:12 bfrog instead of just - require: xyz
20:13 UtahDave bfrog: you can require a whole sls file.
20:14 bfrog so - require: statename is totally fine?
20:14 herlo joined #salt
20:14 bfrog docs don't really say that
20:14 bfrog but cool :-)
20:15 TheRealBill UtahDave: so what woudl the functional difference be between requiring an SLS file and including it? >:D
20:15 TheRealBill would*
20:16 bfrog I get Requisite declaration nginx in SLS api is not formed as a single key dictionary
20:16 bfrog ?
20:16 bfrog have - require: - nginx
20:16 bfrog the nginx state has a few things, it installs a package, a config, and creates some directories
20:17 TheRealBill bfrog: I had the same scenario, went with include instead and resovled the issue.
20:18 UtahDave TheRealBill: the difference is that including an sls file will cause it to be evaluated. Requiring an sls file causes an ID declaration to require that every id declaration in the sls file return successfully before executing
20:18 ronc joined #salt
20:19 bfrog UtahDave: so how would I require that whole set of things happens before this thing
20:25 devinus_ UtahDave: it was the table of contents
20:25 devinus_ http://docs.saltstack.com/contents.html
20:25 devinus_ i mean it was the general layout
20:26 devinus_ confused me, it seems to mirror readthedocs
20:27 UtahDave devinus_: they're both built from the docs directory from the salt git repo
20:27 devinus_ UtahDave: yeah, that makes sense
20:27 UtahDave bfrog: you can have as many requires as you need.
20:29 bfrog I guess, but then if I suddenly add another step to that nginx state...
20:30 kstaken joined #salt
20:30 bfrog now I have to go back, and change the 50 references to it
20:30 bfrog seriously wish I could just order this stuff in like a shell script style top to bottom fashion
20:31 bfrog anyways, I need a break
20:31 bfrog clearly
20:31 bfrog left #salt
20:36 Gifflen_ joined #salt
20:37 Gifflen joined #salt
20:42 andrew__ joined #salt
20:50 cdn joined #salt
20:51 cdn Hi all, is anyone having trouble with latest develop code for File > Managed?
20:51 cdn I get the following error : NameError: global name '_binary_replace' is not defined
20:51 chrisgilmerproj joined #salt
20:54 cdn sample SLS and ERROR in http://pastebin.com/REDLpwAR
20:54 cdn Master is Ubuntu and Minion is Windows2008R2 with todays salt-develop code
20:54 cron0 joined #salt
20:55 juanlittledevil joined #salt
20:56 StDiluted can what version of salt?
20:56 StDiluted cdn*
20:58 druonysus joined #salt
20:58 druonysus joined #salt
20:59 cdn I pulled it down maybe 1-2 hours ago so I think it's  #6115
20:59 jacksontj joined #salt
21:04 ipmb joined #salt
21:07 Bastion2202 joined #salt
21:07 Bastion2202 quick question, inside a cmd.run is the unless is run before the require ?
21:08 jschadlick joined #salt
21:11 devinus_ joined #salt
21:11 azbarcea joined #salt
21:12 azbarcea joined #salt
21:15 kermit joined #salt
21:16 az87c joined #salt
21:18 ipmb joined #salt
21:19 neilf joined #salt
21:21 jbunting joined #salt
21:21 devinus_ what syntax is this?
21:21 devinus_ {% for file in salt['cmd.run'](ls /opt/to_remove) %}
21:21 devinus_ specifically the (ls /opt/to_remove)
21:21 devinus_ that doesn't look like python
21:22 jschadlick joined #salt
21:25 zooz joined #salt
21:26 Gifflen hmm thats trange
21:26 Gifflen I've used jinja in django stuff before
21:26 Gifflen and I haven't seen anything quite like that
21:26 StDiluted that's just shell commands
21:26 Gifflen but thats just me
21:26 Gifflen Its pass that as a parameter to the cmd.run command
21:26 auser joined #salt
21:28 dahunter3 joined #salt
21:29 Gifflen looks like there is an example of the syntax here
21:29 Gifflen http://docs.saltstack.com/topics/tutorials/states_pt3.html salt['network.hwaddr']('eth0')
21:30 Gifflen the () looks like its just containing anything that would be an appropriate parameter
21:33 Gifflen If I wanted to install a number of SSH keys in a directory
21:33 Gifflen is there a way to iterate across all of the files instead of hard coding them?
21:34 Gifflen I'm assuming it would with with a standard for look
21:34 Gifflen but I wasn't sure what to use as the iterator
21:35 juanlittledevil joined #salt
21:40 LyndsySimon joined #salt
21:41 iben joined #salt
21:42 devinus_ anybody have an example of some salt states using environments?
21:43 iben hello salters!  i have a newbie question I didn't see a clear answer on… from the docs  it seems that saltstack integrates with ldap - but has anyone gotten it to work with ms active directory for authentication of the users?
21:44 iben this is intended to allow various team members to share admin and operational roles on the system using their main corp id and password.  we have all our other systems using AD/LDAP this way.
21:44 juanlittledevil joined #salt
21:47 napperjabber joined #salt
21:47 cybermiron joined #salt
21:48 chrisgilmerproj left #salt
21:52 UtahDave iben: I have to run to a meeting, so I can't help you right now, but we have several users that use the ldap integration with AD
21:53 druonysus joined #salt
21:53 iben Hey Dave - no rush - it was a general question as we're trying to compare salt with chef and puppet - (I know - no comparison, right?)
21:53 iben ha ha - anyways - we can catch up later/
21:53 druonysus joined #salt
21:54 UtahDave :)  cool, thanks for your patience, iben!
21:59 LyndsySimon joined #salt
22:00 dahunter3 joined #salt
22:04 will_c joined #salt
22:05 will_c Can the salt master actively mirror file changes to all minions?
22:05 Jahkeup_ joined #salt
22:05 will_c (Instead of just calling highstate and mirroring files one time)
22:08 whiteinge will_c: not actively. you can schedule a highstate run to happen as often as you like. salt will compare hashes and only transfer files that change
22:12 timl0101 joined #salt
22:13 will_c whiteinge: Thanks! We'll keep that in mind.
22:17 ronc joined #salt
22:20 ronc joined #salt
22:23 oz_akan__ joined #salt
22:31 s0undt3ch any mock guru out there?
22:32 cybermiron joined #salt
22:35 dahunter3 Is status.loadavg supposed to return something? Mine just shows dashes? www4.someserver.com:
22:35 dahunter3 ----------
22:37 jschadlick dahunter3: yeah     1-min:
22:37 jschadlick 0.01
22:37 jschadlick 15-min:
22:37 jschadlick 0.05
22:37 jschadlick 5-min:
22:37 jschadlick 0.03
22:38 jacksontj joined #salt
22:39 socks__ joined #salt
22:41 david_a_ joined #salt
22:43 socks__ hi!  i am writing a state to manage nfs mounts and am using pillar, but am getting a rendering error.  does anything stick out as obvious?  http://pastebin.com/gKn4TzjK
22:43 socks__ the parsing error i get is here http://pastebin.com/B9ra1gGS
22:44 socks__ i've plugged it into yamllint.com and am getting 'valid yaml!'
22:45 dahunter3 Huh, weird. It just shows dashes for it on all my servers. Maybe some bug in the FreeBSD version?
22:45 dahunter3 How would I go about debugging that to see where it is breaking down?
22:49 KyleG dahunter3: I see the same behavior on FreeBSD here as well
22:49 KyleG Version 0.15.3
22:49 KyleG Output ----------
22:50 KyleG Looking at the code, it tries to access /proc/loadavg instead of using uptime
22:50 KyleG Which is obviously where the issue is happening, FreeBSD does not use /proc/loadavg
22:51 KyleG Maybe it should be switched to os.getloadavg()
22:54 dahunter3 KyleG: I would think… but I'm never new to this. Where is it in the code, I'm curious.
22:54 dahunter3 s/never/very/
22:54 jY having a strange issue with salt.. if I restart minions on a different subnet a salt "*" cmd.run "hostname" works.. but if i leave the minion running say overnight.. the next morning the only reporting minions are the ones on the same subnet as the server
22:54 KyleG /usr/local/lib/python2.7/site-packages/salt/modules/status.py
22:55 KyleG def loadavg():
22:55 dahunter3 same thing with status.meminfo btw
22:55 socks__ ah crap, i figured it out.  was missing a colon at the end of the mount point
22:55 KyleG Also checking /proc
22:55 KyleG for that one lol
22:57 pentabular1 joined #salt
22:59 KyleG dahunter3: I figured out a fix
22:59 KyleG I'll submit a patch to the repo
22:59 dahunter3 KyleG: Ah, you beat me by a few minutes. I can only blame the fact that someone came to my door and bothered me LOL.
23:00 KyleG This seems to work: https://gist.github.com/kylegato/72b54366dfc5557e5d68
23:00 KyleG simpler, tested it on BSD and CentOS and it seems to be working fine
23:01 dahunter3 KyleG: I'm wondering if proc is faster and that's why they are trying to use it by default? It's more complex but maybe we should try proc by default and then fail back to the more portable os.getloadavg()? I don't know enough to know about the design decision yet. But surely os.getloadavg is way more portable.
23:02 bluemoon joined #salt
23:03 KyleG dahunter3: I think I know what I'm going to be contributing during the Great Salt Stack Sprint this month. :P
23:04 dahunter3 KyleG: Nice!
23:04 jacksontj joined #salt
23:06 brianhicks joined #salt
23:06 KyleG dahunter3: Is this more along the lines of what you think is better: https://gist.github.com/kylegato/aee8f1f93887d226474a
23:07 KyleG Just tested it and it seems to work fine as well. :)
23:07 dahunter3 KyleG: Yah, awesome!
23:08 dahunter3 dahunter3: Oh wow, you're in LA? That's awesome, I'm in Temecula.
23:08 ronc joined #salt
23:08 druonysuse joined #salt
23:08 druonysuse joined #salt
23:08 dahunter3 we're practically neighbors lol
23:09 KyleG Nice! :)
23:09 KyleG Not LA proper, I live+work in Marina Del Rey
23:10 KyleG cedwards: Give my pull request some love? Merge me maybe? :-P https://github.com/saltstack/salt/pull/6121
23:11 dbcooper left #salt
23:18 cxz joined #salt
23:23 jacksontj joined #salt
23:25 cedwards can't merge, but I'll give it a +1
23:25 auser hey all
23:25 auser ah KyleG :)
23:25 druonysuse joined #salt
23:26 druonysus joined #salt
23:30 KyleG hallo
23:30 KyleG :)
23:34 jaequery joined #salt
23:35 UtahDave joined #salt
23:37 Xeago joined #salt
23:40 pentabular joined #salt
23:40 napperjabber joined #salt
23:56 monokrome :D
23:59 auser oh man

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