Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-08-25

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

All times shown according to UTC.

Time Nick Message
00:06 subsignal joined #salt
00:16 bbbryson joined #salt
00:17 pravka joined #salt
00:18 whatishappening joined #salt
00:22 dayid joined #salt
00:27 jaybocc2 joined #salt
00:35 onovy joined #salt
00:44 sunkist joined #salt
00:47 whiteinge joined #salt
00:48 mikepea joined #salt
00:48 frankS2 joined #salt
00:49 fersur3 joined #salt
00:50 fersur3 Is there a configuration directive that can be placed in /etc/salt/master so that every salt command is run with test=True ?
00:50 womble fersur3: Yes.  Let me find it.
00:51 womble fersur3: It's actually just test=True in the minion config file.
00:54 catpig joined #salt
00:57 timoguin joined #salt
00:59 bougie joined #salt
01:01 mark_____ hey, i'm having some weird path issues
01:02 mark_____ using salthiera if I run salt-master -l debug i'm able to lookup stuff in hiera
01:06 markm_ joined #salt
01:10 cberndt joined #salt
01:19 CeBe1 joined #salt
01:32 shaggy_surfer joined #salt
01:39 catpigger joined #salt
01:56 zmalone joined #salt
02:05 JoeHazzers is there a simple way to output a pillar item as a pretty-formatted yaml file, via file.managed or otherwise?
02:07 jeadre joined #salt
02:08 jeadre joined #salt
02:10 jeadre joined #salt
02:11 jeadre joined #salt
02:13 jeadre joined #salt
02:13 bhosmer joined #salt
02:14 jeadre joined #salt
02:16 jeadre joined #salt
02:17 jeadre joined #salt
02:19 jeadre joined #salt
02:20 pm90_ joined #salt
02:20 jeadre joined #salt
02:22 jeadre joined #salt
02:23 pm90__ joined #salt
02:45 evle joined #salt
02:59 timoguin joined #salt
03:03 pravka joined #salt
03:09 manfred uhh, maybe
03:09 manfred if there is a yaml filter in jinja
03:09 manfred you could do file.managed with content, and specify {{ pillar.get(thing)|yaml }}
03:10 manfred there is something like that somewhere
03:10 manfred I think I did something similar to that recently
03:12 manfred JoeHazzers: yeah, looks like |yaml should work
03:12 Furao joined #salt
03:12 manfred JoeHazzers: https://github.com/saltstack/salt/blob/develop/salt/utils/jinja.py#L235
03:14 favadi joined #salt
03:15 JoeHazzers manfred: after much fiddling, it turns out i was looking for |yaml(False)
03:15 JoeHazzers thanks ;)
03:18 manfred nice, no problem
03:21 writtenoff joined #salt
03:36 zmalone joined #salt
03:44 favadi joined #salt
03:45 cwyse joined #salt
03:51 JoeHazzers joined #salt
03:51 forrest joined #salt
04:02 spark_ joined #salt
04:11 FOCer joined #salt
04:14 ramteid joined #salt
04:15 FOCer joined #salt
04:20 mapu joined #salt
04:25 sunkist joined #salt
04:26 subsignal joined #salt
04:27 zmalone joined #salt
04:28 kermit joined #salt
04:31 anmol joined #salt
04:34 jaybocc2 joined #salt
04:38 pm90_ joined #salt
04:39 pm90__ joined #salt
04:39 rdas joined #salt
04:43 irctc707 joined #salt
04:43 irctc707 Hi Guys
04:43 irctc707 I would like to know more about the architecture of Saltstack
04:44 irctc707 What happens when it do a sync or execution from minion
04:44 irctc707 What all internal technology it uses etc
04:44 yesimon joined #salt
04:44 irctc707 Can you please point me out the document
04:45 yesimon What's the best way to execute a long running command? Use case is prewarming a large EBS drive on EC2.
04:50 bfoxwell joined #salt
04:52 jaybocc2 joined #salt
04:53 honestly ...prewarming?
04:54 zer0def joined #salt
05:02 darsh_ joined #salt
05:09 forrest joined #salt
05:11 Furao yesimon: you should use non-diesel servers in winter. gasoline EC2 instances don’t need prewarming
05:14 yesimon EBS drives are loaded from amazon S3 lazily. Making the attachment and mount "instant", but accessing blocks results in network fetch which is very slow.
05:29 jeadre joined #salt
05:34 favadi joined #salt
05:44 NV joined #salt
05:49 Lionel_Debroux joined #salt
05:58 colttt joined #salt
06:02 thayne joined #salt
06:02 katyucha joined #salt
06:07 linjan joined #salt
06:13 hillna joined #salt
06:13 jaybocc2 joined #salt
06:14 frankS2 joined #salt
06:15 Edgan joined #salt
06:15 ramishra joined #salt
06:15 Tritlo joined #salt
06:15 zipkid joined #salt
06:15 kutenai joined #salt
06:15 EWDurbin joined #salt
06:16 simonmcc joined #salt
06:16 forrest joined #salt
06:18 katyucha joined #salt
06:18 gchao joined #salt
06:18 basepi joined #salt
06:19 mihait joined #salt
06:20 xenoxaos joined #salt
06:22 AndreasLutro joined #salt
06:23 TyrfingMjolnir joined #salt
06:24 lb1a joined #salt
06:25 linjan joined #salt
06:31 AirOnSkin How can I run a 'test' command on my minions and have salt return a true or false depending on the test? This doesn't work (meaning it returns the same): salt myminion cmd.run "if [ -d /dev/null ] ; then false ; else true ; fi"
06:32 AirOnSkin s/-d /dev/null/-d /etc/
06:32 voileux joined #salt
06:33 AirOnSkin Argh... I just mean forget the /dev/null... I didn't really use that, but a real directory instead...
06:34 jaybocc2 joined #salt
06:37 alexlist joined #salt
06:38 favadi joined #salt
06:40 cyris212 joined #salt
06:41 cyris212 is there something such as reverse syndic? so the master would intiate the connection to it's syndic?
06:45 impi joined #salt
06:49 AndreasLutro AirOnSkin: something like `salt minion cmd.run 'test -d /path/to/dir && echo true'`
06:50 AndreasLutro AirOnSkin: though in this case you can use salt minion file.directory_exists
06:54 viq joined #salt
06:57 xenoxaos joined #salt
06:58 gchao joined #salt
07:02 malinoff joined #salt
07:03 eseyman joined #salt
07:05 duendecat joined #salt
07:09 jaybocc2 joined #salt
07:12 Ztyx joined #salt
07:13 KermitTheFragger joined #salt
07:16 Grokzen joined #salt
07:23 linjan joined #salt
07:26 Ztyx joined #salt
07:34 markm__ joined #salt
07:40 pbrooko joined #salt
07:42 jaybocc2 joined #salt
07:50 Ztyx1 joined #salt
07:52 s_kunk joined #salt
07:54 impi joined #salt
07:56 stanchan joined #salt
07:57 AirOnSkin AndreasLutro: Ups, sorry for the late reply. Thanks for the info, I'll give that a go
07:59 tampakrap joined #salt
08:08 DanyC joined #salt
08:12 DanyC left #salt
08:12 DanyC joined #salt
08:12 favadi joined #salt
08:15 keimlink joined #salt
08:16 bhosmer joined #salt
08:17 duendecat joined #salt
08:32 oravirt joined #salt
08:32 GreatSnoopy joined #salt
08:40 cyris212 I'm new to salt... what would be the easiest way to set certain pillars depending on the network the minion is in?
08:43 ITChap joined #salt
08:45 oravirt joined #salt
08:46 babilen cyris212: Could you elaborate on that?
08:50 cyris212 let's say I've multiple network zones... each zone has a seperate syslog server and I would like to store the address of the syslog server inside a pillar
08:50 cyris212 I guess jinja2's "if" feature does the trick...
08:51 huwenfeng joined #salt
08:53 babilen fwiw, I would use consul for that, Don't you tell a minion to be in a specific network zone? Does it just happen to be in it?
08:53 huwenfeng Is there any way to redirect the output of salt (on salt master) of each minion into the file with the name of the minion_id?  I mean, any easy way to save the output of a minon into the corresponding file with the same name of the minion_id ?
08:54 babilen cyris212: You can target pillars by CIDR, see http://docs.saltstack.com/en/latest/topics/targeting/compound.html → "S@"
08:54 babilen That also requires a "- match: compound"
08:55 babilen cyris212: And given that pillars are merged by default (cf. http://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-source-merging-strategy ) you can easily "infuse" the correct value in existing pillars that way.
08:58 oravirt joined #salt
08:59 jhauser joined #salt
09:00 oravirt joined #salt
09:00 huwenfeng Is there any way to redirect the output of salt (on salt master) of each minion into the file with the name of the minion_id?  I mean, any easy way to save the output of a minon into the corresponding file with the same name of the minion_id ?
09:04 zerthimon joined #salt
09:04 cyris212 babilen: can I use those compound matchers in all .sls files or just in top.sls?
09:05 babilen cyris212: Only in the top.sls
09:05 babilen (where you target SLS files to minion)
09:05 babilen +s
09:12 cyris212 babilen: http://pastebin.com/ZHprb88q
09:12 cyris212 here's is an example on what I would like to do
09:13 babilen Please don't use pastebin.com, but one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … (pastebin.com is a horrible site!)
09:14 babilen cyris212: Yes, and I am telling you to simply target two different logserver SLS files (one for each zone) by CIDR
09:19 cyris212 babilen: I see
09:21 Ztyx joined #salt
09:22 thefish joined #salt
09:23 cyris212 babilen: this safed me definitly from writting a lot of jinja2 templating :-)
09:23 cyris212 babilen: thanks
09:24 monkey66 left #salt
09:26 duendecat joined #salt
09:29 N-Mi joined #salt
09:30 hojgaard Does anyone know how to refresh grains on salt?
09:32 babilen cyris212: You are welcome. I would still recommend to look into consul for things like this (if you have to do it for a bunch of other services too)
09:34 malinoff joined #salt
09:38 fredvd joined #salt
09:43 denys joined #salt
09:43 MadsRC Does anyone have a hint about how to loop over each line in a local file (Local to the salt master) and use that line as an argument in jinja? I'm looping over a text file ocntaining IP's that need to be blocked using ipset
09:43 Guest80 joined #salt
09:49 arcade_ joined #salt
09:53 aristedes1 joined #salt
09:53 jaybocc2 joined #salt
09:56 pontus joined #salt
10:00 bluenemo joined #salt
10:01 MadsRC Never mind, used the python renderer to write raw python instead :D
10:09 jaybocc2 joined #salt
10:22 babilen MadsRC: I'd still keep that information in pillars rather than in a random file on the master
10:34 ramteid joined #salt
10:35 MadsRC babilen: I don't consider the list sensitive information, so I won't go through the hassle of storing it in a pillar until salt supports using the pillar:// URI
10:38 rodio_ua joined #salt
10:38 rodio_ua left #salt
10:40 s_kunk joined #salt
10:51 _mel_ joined #salt
10:53 AndreasLutro what's pillars got to do with sensitive information?
10:53 duendecat joined #salt
10:55 babilen MadsRC: I don't quite get how that is more of a hassle than maintaining code to read a local file
11:03 aqua^c joined #salt
11:13 XenophonF joined #salt
11:15 sen joined #salt
11:15 sen Hi
11:15 XenophonF good morning everybody
11:15 jaybocc2 joined #salt
11:16 sen Wanted to how you guys are syncing the minion with master  everytime
11:17 sen I don't think running high state from the master is not a good idea especially when you have larg number of servers
11:17 sen Running high state from minion using a cron may hit the master at the same time
11:18 sen which will again cause a load of the master
11:18 sen How you guys are doing auto sync
11:22 marcinkuzminski joined #salt
11:22 evle1 joined #salt
11:23 babilen sen: We have up to 1000 minion communicating with a single master and I haven't had problems with them hitting it at the same time, but you can always adjust the batch size to your liking
11:24 sen babilen: So you running highstate from master ? or minion?
11:25 babilen From the master, naturally.
11:25 sen babilen: aprox how long it will take to finish ?
11:26 babilen What exactly?
11:26 sen babilen: And you are running high state manually when you made change ? and running in a cron
11:26 babilen Yes, I run it manually
11:27 sen babilen: For sync how much time it will take normally
11:29 babilen You mean running a highstate that has been achieved earlier on all minions?
11:30 jaybocc2 joined #salt
11:32 pbrooko joined #salt
11:35 babilen Hmm, irgendwo hängt es
11:35 aristedes joined #salt
11:37 cyris212 hmm how do I restart a service when a config file changes?
11:37 cyris212 is "-watch" the right approach?
11:40 denys joined #salt
11:44 AndreasLutro cyris212: yes
11:44 qp joined #salt
11:44 qp Hello
11:47 qp Is there an official method of testing the salt states? For example using Docker/Vagrant? (use a combination of docker and bash scripts)
12:02 XenophonF sen: the salt master only schedules highstate jobs for so many minions at a time (i forget the default - maybe 25 minions per job?)
12:05 pbrooko joined #salt
12:06 ingslovak joined #salt
12:09 rideh joined #salt
12:23 pdayton joined #salt
12:29 pm90_ joined #salt
12:31 orion Hi. In RabbitMQ, if the cookie file changes, I need to stop the server *before* modifying the file, and then start it back up again. How can I express this in my state file?
12:32 orion It's not enough to say, "oh the cookie changed, let's restart rabbitmq", because the cookie is needed to send the stop signal to the process.
12:33 AndreasLutro orion: it may be possible to use file.managed's check_cmd, which will be invoked before the new file is moved from /tmp to the actual config location
12:34 AndreasLutro orion: you could write your own script that checks if there are any changes, and if there are, stop the service
12:37 MadsRC Can anybody help me with this stacktrace? http://pastebin.com/FK67Xnrf
12:37 MadsRC No matter what I do, I ge that error.
12:37 MadsRC 's/ge/get/g'
12:38 subsignal joined #salt
12:38 AndreasLutro MadsRC: looks like the entry arg of ipset.present expects "ip:port", you're missing the port
12:39 MadsRC AndreasLutro: Line 21
12:39 MadsRC ?
12:39 AndreasLutro MadsRC: yeah - which is coming from line 32-34
12:41 MadsRC AndreasLutro: So the lines on 32-34 should contain IP:PORT?
12:41 AndreasLutro yep
12:41 MadsRC Hmm, I'll try that - Though with hash:net it really should only want an CIDR address...
12:42 AndreasLutro it's entirely possible that the salt code is wrong, but that's what the code expects
12:43 MadsRC AndreasLutro: Just replaced 211.10.17.19/32 with 211.10.17.19/32:80 (so goes for the other 2 ip's) and it throws the same error.
12:43 AndreasLutro huh. share the stack trace please?
12:44 duendecat joined #salt
12:44 MadsRC AndreasLutro: Just a second, might have fixed it.
12:44 Furao_ joined #salt
12:45 MadsRC Nope, just complains that it's the wrong syntax :P
12:45 AndreasLutro I was mistaken in any case - the item.split is called on stdout, not the items in your pillar
12:46 MadsRC Ah
12:46 MadsRC So it's not because it suspect a port? Let me just try without the jinja and add the entries by hand in there
12:46 pbrooko_ joined #salt
12:47 AndreasLutro yeah, it's failing when trying to parse the output of ipset list -t $name_of_set
12:48 MadsRC It does that after each entry?
12:48 AndreasLutro not sure how often
12:49 MadsRC Bah, doesn't work if I add the entries manually in the sls file. Same error... But works fine if I add it on the host using ipset :P
12:50 racooper joined #salt
12:50 Furao joined #salt
12:50 AndreasLutro MadsRC: what's the output of `ipset list -t blacklist`?
12:51 rideh joined #salt
12:51 MadsRC AndreasLutro: http://pastebin.com/f1DHM1Dg
12:51 rodio_ua joined #salt
12:51 rodio_ua left #salt
12:52 AndreasLutro mm it's failing because of the line with the ip address, salt expects it to be "Members: <ip>" or something
12:52 AndreasLutro could be a bug in salt or just a ipset version quirk
12:52 ferbla joined #salt
12:52 subsignal joined #salt
12:53 subsignal joined #salt
12:53 MadsRC Ah! That's a bug then. That syntax is only there when you use "ipset list" (Atleast on RHEL)
12:53 AndreasLutro regardless you should probably file an issue on github
12:54 MadsRC Yup, will do
12:54 MadsRC Damn, had really hoped I would have had this done today...
12:56 Twiglet does watch_in imply require_in?
12:57 DammitJim joined #salt
12:57 subsigna_ joined #salt
12:58 bhosmer joined #salt
12:59 amcorreia joined #salt
13:01 lothiraldan joined #salt
13:03 MadsRC AndreasLutro: Thank you for the help. Made a github issue now :)
13:07 _mel_ HI. can i use only pillars to activate states or do i have to use always both?
13:08 bhosmer_ joined #salt
13:09 pbrooko joined #salt
13:09 JDiPierro joined #salt
13:12 lothiraldan joined #salt
13:12 darix any recommendations for a directory layout for salt when we want to use different environments (like testing, production)?
13:17 pdayton joined #salt
13:18 lothiraldan joined #salt
13:27 hasues joined #salt
13:27 Guest80 joined #salt
13:28 hasues left #salt
13:28 jdesilet joined #salt
13:31 cpowell joined #salt
13:33 perfectsine joined #salt
13:34 cpowell_ joined #salt
13:35 Arbusto joined #salt
13:37 rdutch joined #salt
13:42 jaybocc2 joined #salt
13:43 zmalone joined #salt
13:55 DanyC Afternoon/ Morning all - so i have an interesting use case to crack which is: i need to form a ES cluster where i need to fill in the ES seed nodes part of a cluster. Any ideas how i can add the ES nodes within the seed list as the VMS come up?
13:55 twork i was yammring late yesterday afternoon about a group ownership situation on an ftp server that i haven't been able to figure out how to put into salt. we came to the conclusiont that i was going about it the wrong way, but $boss has assured me that, no, the way i'm describing is the way it must be, described as: https://gist.github.com/mjinks/0ee9f8c72f9b325add96
13:56 rodio_ua joined #salt
13:56 rodio_ua left #salt
13:57 andrew_v joined #salt
13:57 jaybocc2 joined #salt
13:57 rdutch DanyC: You might want to read up on Salt Mines to egt dynamic data like ip addresses, http://docs.saltstack.com/en/latest/topics/mine/index.html
13:57 DanyC i do have the reactor event working and highstate is running on every minion start but i miss the last thing the equation. I know maybe i should use the mine funciton in the pillar but then don't know how to update the pillar list as VMs get "online" so i can reference in the state
13:59 sgargan joined #salt
13:59 Akhter joined #salt
14:00 pravka joined #salt
14:00 Akhter joined #salt
14:01 zwi joined #salt
14:02 AndreasLutro twork: file.directory with group: c3po and recurse: [ group ] would make sure that group ownership is correct at the point the highstate is ran
14:02 ipmb joined #salt
14:02 AndreasLutro twork: but for new files created to have the correct permissions you'll have to look outside of salt - chmod +S and umasks probably
14:02 capricorn_1 joined #salt
14:02 DanyC rdutch: thanks, i'm aware of that. If anyone has already a gist i'd appreciate if is shared
14:04 mapu joined #salt
14:05 sgargan joined #salt
14:06 aparsons joined #salt
14:08 XenophonF twork: i'm not sure i understand your problem
14:09 XenophonF twork: why can't you just set the group ownerships on managed folders to be the way you want?
14:09 XenophonF twork: if you're managing existing directories, you can use a file.directory state and recurse through the folder structure, overriding the existing ownerships
14:13 JDiPierro joined #salt
14:15 Furao joined #salt
14:15 twork AndreasLutro: thanks. detail i'm not sure on: in a state like file.directory, i know that elements within the state like dir_mode: can be filled with a template elemant, but what about the name of the state? e.g., "/home/{{ category }}:\n  file.directory:..."?
14:16 twork ...if that makes sense
14:16 AndreasLutro twork: that will work just fine yes
14:17 AndreasLutro you can use templating anywhere in an sls file
14:17 twork thanks. that was my guess but i wasn't finding examples that looked that way. (i'm sure there must be lots, but they never show up when i look.)
14:18 bhosmer joined #salt
14:22 _JZ_ joined #salt
14:24 fgimian joined #salt
14:26 duendecat joined #salt
14:27 illern joined #salt
14:27 sunkist joined #salt
14:28 dopesong joined #salt
14:29 mpanetta joined #salt
14:29 mpanetta joined #salt
14:30 thayne joined #salt
14:30 pm90_ joined #salt
14:31 lothiraldan joined #salt
14:31 pm90__ joined #salt
14:32 Brew joined #salt
14:34 ipmb joined #salt
14:35 ws2k3_ what is the package salt-syndic exacly?
14:38 coval3nce joined #salt
14:40 aqua^c joined #salt
14:41 JDiPierro joined #salt
14:43 Martin____ joined #salt
14:45 Stumbler joined #salt
14:46 rideh^ joined #salt
14:47 jalbretsen joined #salt
14:49 XenophonF ws2k3_: iirc syndic is used for master-master synchronization or something
14:50 e5p3r13 joined #salt
14:52 rideh joined #salt
14:53 esperie joined #salt
14:54 jeadre joined #salt
14:54 Ztyx joined #salt
14:54 spark_ joined #salt
14:57 rideh joined #salt
15:03 chance123 joined #salt
15:04 chance123 ||||| >>>>> WHAT IS YOUR DOMAIN NAME WORTH? Vist >>> www.VALBOT.com <<< FREE DOMAIN VALUATION! or GOOGLE >>> VALBOT.com <<< |||||
15:08 AndreasLutro o_o
15:11 timoguin joined #salt
15:11 sdm24 joined #salt
15:13 Ahlee heh
15:16 evle joined #salt
15:18 zsoftich3 joined #salt
15:19 thayne joined #salt
15:20 quasiben joined #salt
15:20 amcorreia joined #salt
15:21 Fiber^ joined #salt
15:22 bhosmer joined #salt
15:22 rideh joined #salt
15:26 ALLmightySPIFF joined #salt
15:27 scoates joined #salt
15:27 pbrooko_ joined #salt
15:38 sdm24 I got a random error from one of my minions during one of the highstates (runs every 30 minutes on a schedule, never errored before) at 6:05 am. Unfortunately I can't find a job ID for the scheduled highstate, and the error log does not mention which part of the state failed. Any ideas?
15:38 Fiber^ joined #salt
15:39 sdm24 I'll post the gist here, but just a heads up: we use a custom log format to match splunk's format
15:39 sdm24 https://gist.github.com/sdm24/f47d11588767f7fc3122 Thank you for any/all help. Hopefully its just a one-time error
15:41 sdm24 ( and yes, the file in question exists on the minion)
15:41 iggy could it be a case of an apt-get update running at the same time as the highstate?
15:42 jwokaty joined #salt
15:42 iggy (either as some earlier part of the highstate or as part of a cron job/etc?)
15:43 sdm24 could be. I do have multiple pkg.installs for different states in the highstate. Does salt run apt-get update when refresh=True, even if a package is already installed?
15:43 rideh joined #salt
15:44 sdm24 I guess it should to look for updates
15:45 rideh joined #salt
15:45 sdm24 and if state 1  and state 2 have pkg.install's, wouldn't salt wait for state 1 to finish/return, and then state2?
15:48 carlgeorge joined #salt
15:48 lpmulligan joined #salt
15:49 sgargan joined #salt
15:50 rideh joined #salt
15:54 iggy generally, yes
15:55 iggy but there is a apt-get update that gets kicked off by pkgrepo's that I think spins off into the background
15:56 sdm24 ah. Hopefully since the error happened just once, and this minion has been alive for ~ a month, I think its an isolated issue. Nothing seems to be broken, and apt was successfully updated on the next highstate it seems
15:56 stevednd joined #salt
15:56 duendecat joined #salt
15:57 iggy yeah, that's why I like event driven highstates (rather than just randomly throughout the day)
15:58 sdm24 If this error persists, we might have to switch to that
16:01 Bryson joined #salt
16:05 cachedout joined #salt
16:05 iggy anybody know offhand if it's one or two _'s that the salt loader ignores for function names?
16:05 rm_jorge joined #salt
16:05 * geekatcmu suspects "both"
16:06 geekatcmu but doesn 't actually know
16:06 zer0def joined #salt
16:08 iggy yeah, I went with __ because it technically also starts with _
16:12 conan_the_destro joined #salt
16:13 zacdev joined #salt
16:15 zacdev joined #salt
16:15 Akhter joined #salt
16:16 mirko joined #salt
16:16 shaggy_surfer joined #salt
16:20 Ztyx joined #salt
16:21 kitplummer joined #salt
16:22 jeadre joined #salt
16:24 s_kunk joined #salt
16:28 zooz joined #salt
16:30 linjan joined #salt
16:30 aparsons joined #salt
16:31 shaggy_surfer joined #salt
16:31 thayne joined #salt
16:33 andrew_v_ joined #salt
16:36 bhosmer joined #salt
16:38 impi joined #salt
16:42 DanyC joined #salt
16:43 denys joined #salt
16:45 SheetiS joined #salt
16:48 denys joined #salt
16:48 pm90_ joined #salt
16:50 duendecat joined #salt
16:51 wendall911 joined #salt
16:52 capricorn_1 joined #salt
16:52 zmalone joined #salt
16:53 Topic for #salt is now Welcome to #salt | 2015.5.5 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
16:56 theologian joined #salt
16:58 shiriru joined #salt
16:58 jaybocc2 joined #salt
16:58 Arbusto joined #salt
16:59 Corey 2015-08-25 16:58:48,849 [salt.pillar      ][CRITICAL][13894] Rendering SLS 'users' failed, render error:
16:59 Corey 'ascii' codec can't decode byte 0xe2 in position 1669: ordinal not in range(128)
16:59 Corey Well that's novel.
17:00 endlessmason joined #salt
17:01 malinoff joined #salt
17:01 Grokzen joined #salt
17:02 endlessmason what does salt call "/srv/salt" internally? I'm looking for it on my freebsd box and idk where it would be
17:03 aparsons joined #salt
17:06 babilen endlessmason: You might be thinking of "file_roots"
17:07 babilen http://docs.saltstack.com/en/latest/ref/configuration/master.html#file-roots
17:08 sdm24 endlessmason: it is also sometimes called "base", since it is the default location for the base environment in file-roots
17:08 endlessmason I'm trying to figure out where i'm supposed to dump my git repo
17:08 endlessmason so i can make salt configure my thing
17:10 babilen endlessmason: Configure it in your master config's file_roots or set it up as gitfs_remote
17:10 babilen endlessmason: http://docs.saltstack.com/en/latest/ref/configuration/master.html#git-git-remote-file-server-backend + http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
17:11 endlessmason I don't have a git server yet
17:11 endlessmason this machine is called "bootstrap" ...
17:12 KyleG joined #salt
17:12 KyleG joined #salt
17:14 XenophonF left #salt
17:17 rideh joined #salt
17:19 lpmulligan joined #salt
17:19 shaggy_surfer joined #salt
17:21 iggy you can use local git repos in gitfs_remotes too
17:21 iggy although their utility is somewhat questionable at that point
17:22 endlessmason I only need those yaml thingies on the master, right?
17:22 endlessmason sls
17:23 zero_shane joined #salt
17:23 endlessmason does /usr/share/salt seem like decent choice?
17:24 pravka joined #salt
17:24 thayne joined #salt
17:25 jalbretsen joined #salt
17:26 iggy endlessmason: I think the default on bsd is /usr/local/... somewhere
17:26 iggy but really, it's whatever works for you
17:26 iggy hell, you could even just do /srv/salt to keep with the (linux focused) docs
17:26 timoguin joined #salt
17:26 endlessmason the box has been up 9 days, which is the sum-total of my bsd usage
17:27 iggy oh, also, check the issue tracker
17:27 endlessmason issue tracker?
17:27 iggy there are known issues with bsd masters
17:27 endlessmason like, "it segfaults when clients connect" or "it performs poorly"?
17:27 baweaver joined #salt
17:28 forrest joined #salt
17:28 iggy not major things afaik
17:28 sdm24 https://github.com/saltstack/salt/issues
17:28 sdm24 endlessmason: you can look through salt issues there
17:29 endlessmason well, I guess I can contribute some bug reports before I destroy this vps :S
17:30 tanta joined #salt
17:30 endlessmason iggy, i think having a linuxy path on a bsd box is going to lead to me giving some confusing bug reports too
17:31 iggy fair enough
17:31 endlessmason can i get salt to dump its config some how?
17:31 iggy you can ask it to lookup settings for you
17:31 iggy at least for the minion
17:32 iggy salt-call config.get
17:32 endlessmason not so much on the master?
17:32 iggy I can't think of anything, maybe a runner
17:32 dyasny joined #salt
17:33 iggy not a bad idea for a feature request though
17:35 endlessmason iggy: can I quote you on github?
17:35 iggy yeah
17:35 iggy they might downgrade your issue though
17:35 * iggy feels the love
17:36 bhosmer_ joined #salt
17:37 JDiPierro joined #salt
17:38 X67r joined #salt
17:38 sgargan joined #salt
17:39 tkharju joined #salt
17:39 endlessmason I guess i'll change it from "the guy who knows the most about salt" to "some guy from IRC" then
17:40 endlessmason 26639 is a lot of isuses
17:40 baweaver joined #salt
17:43 thayne joined #salt
17:43 duendecat joined #salt
17:49 endlessmason seaky sunnova ... /usr/local/etc/salt/!
17:49 endlessmason maybe that's not it...
17:49 forrest why don't you just locate salt
17:49 forrest or does bsd not have the locate command /troll
17:50 forrest iggy: Your issues only get downgraded because you're so rude, don't lie to people...
17:50 forrest Gotta pay that iggy troll toll.
17:50 endlessmason seems easier to raise a ticket that read through 24 pages ... i'm with the troll on this one
17:51 forrest endlessmason: Use the search
17:51 endlessmason i did.
17:51 forrest eww
17:51 Gareth ahoy hoy
17:51 forrest hey Gareth
17:52 Gareth forrest: hey hey.  hows it going?
17:52 forrest Pretty good, you?
17:52 Gareth Not too bad :)
17:52 forrest Good to hear on a Tuesday
17:53 iggy forrest: I know, but that doesn't mean they won't hold it against anyone trying name drop my name
17:53 jngd joined #salt
17:54 iggy endlessmason: `salt-call config.get file_roots` might tell you what you want to know anyway
17:54 iggy (because the minion technically supports that option, and the default should be the same)
17:55 justin000 joined #salt
17:55 kermit joined #salt
17:56 forrest iggy: I don't think that's true at all
17:56 endlessmason #file_roots: #  base: #    - /usr/local/etc/salt/states
17:56 endlessmason the ones with the blank line are the defaults ...
17:57 endlessmason it seems odd that the package doesn't  create that path ...
18:01 ajw0100 joined #salt
18:04 revjim joined #salt
18:09 SheetiS joined #salt
18:10 kevinquinnyo joined #salt
18:10 intel joined #salt
18:11 Arbusto joined #salt
18:13 Stumbler joined #salt
18:13 baweaver joined #salt
18:13 dthom91 joined #salt
18:18 kevinquinnyo Can anyone spot why my "require" requisite in this snippet is not working?  https://gist.github.com/kevinquinnyo/17136f832bbfeefdba32
18:18 kevinquinnyo self.webroot_base is '/var/www/' if it matters to you
18:18 OliverMT joined #salt
18:19 cro joined #salt
18:21 dthom91 joined #salt
18:27 impi joined #salt
18:27 iggy !salt modules.state.show_low_sls
18:27 saltstackbot http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.show_low_sls
18:27 iggy try that and maybe some of the other show_* functions in that module
18:27 itsamenathan We were looking at using the presence to detect minion connect and disconnect.  But if the minion is behind a firewall this will not work.  I found this issue https://github.com/saltstack/salt/issues/18436 but doesn't really give a good solution to the problem
18:27 saltstackbot [#18436]title: Presence event returns with an empty list | Presence event data does not contain info about connected minion....
18:28 itsamenathan Has anyone does something like this before?
18:28 kunersdorf joined #salt
18:29 kunersdorf I'm getting a Conflicting ID on a string that is only mentioned once
18:29 thayne joined #salt
18:30 kunersdorf it is inside a for loop, so wonder if it's going thru it more than once
18:31 revjim anyone have experience with the "saltify" cloud module?
18:32 iggy kunersdorf: my normal id {{ loop.index }}:
18:32 _pravka_ joined #salt
18:34 kunersdorf @iggy: {% for var in salt['pillar.get']('text') %}
18:35 kunersdorf pillar.get on saltmaster returns fine
18:35 kunersdorf it's multiline
18:35 kunersdorf nothing complex
18:35 justin000 I'm trying to install a package on Ubuntu (which is found through apt-cache search), but fails to install through Salt. Does anyone know a workaround? https://gist.github.com/justin007/641f75470e4ee867ca23
18:35 DanyC joined #salt
18:37 forrest justin000: Is this running from a local minion call?
18:37 iggy kunersdorf: well, do that line I mentioned, and check the rendered output on the minion... that'll tell you if it's looping more than once
18:37 justin000 forrest: yes, using salt-call
18:37 forrest --local?
18:37 iggy kunersdorf: or use {% for var in salt['pillar.get']('text') | first %}
18:37 forrest or just salt-call to the master
18:37 justin000 it's to a master
18:38 kunersdorf rgr, ty
18:38 iggy justin000: you have keyid, keyserver, and key_url
18:38 iggy you don't need all 3
18:38 forrest keyid and keyserver should do it
18:39 forrest good catch iggy, the joys of not having worked on ubuntu in a while ;)
18:39 justin000 This is my first time running salt on ubuntu :)
18:39 iggy I'm not sure that's what the actual problem is, but it's _a_ problem
18:39 justin000 I'm going to try it now. Can I also use key_url by itself?
18:40 forrest iggy: It's a good place to start, justin000 I also assume that this minion is running the same version of salt as the master right?
18:40 justin000 of course
18:41 iggy leave the `- dist` line out too
18:41 forrest justin000: Cool, just had to double check, it comes up a lot.
18:42 hombre joined #salt
18:42 justin000 Removing the key_url line had the same result, going to remove - dist, also
18:42 iggy and take out fromrepo
18:42 DanyC joined #salt
18:43 iggy it doesn't do what I think you think it does
18:43 iggy if you're trying to guarantee ordering, use require_in on the pkgrepo state
18:44 justin000 I had that previously, but tried this after the first failure
18:44 justin000 does 'fromrepo' not work for apt?
18:44 justin000 I use it in centos often
18:44 justin000 granted, there's no "repo" exactly
18:45 iggy it doesn't do what you think it does
18:45 sirex joined #salt
18:45 iggy fromrepo would be stable in this case (deb http://packages.elastic.co/elasticsearch/1.7/debian stable main ... it's the second to last part of that line)
18:45 justin000 Isn't that the same as "dist"?
18:46 justin000 Also, it worked!
18:46 justin000 Removing 'dist' and 'key_url' did it
18:46 cachedout joined #salt
18:46 iggy fromrepo is in pkg.installed... dist is in pkgrepo.managed
18:46 iggy so no, they are different
18:46 justin000 oh, of course
18:47 iggy I really wish the docs said (you almost never need this) next to dist
18:47 justin000 also not to specify all 3 key options
18:47 forrest iggy: Create an issue/PR.
18:48 justin000 I didn't think it'd hurt to be explicit
18:48 forrest justin000: Or you can create an issue/PR if iggy doesn't want to
18:49 iggy feel free... /me busy
18:49 TyrfingMjolnir joined #salt
18:49 justin000 thank you folks much
18:49 forrest justin000: NP, if you can please create an issue.
18:50 justin000 will put it on my to-do list
18:58 rdutch left #salt
19:01 j987 joined #salt
19:01 revjim using salt-cloud, I get this error: Error: There was a profile error: Cannot deploy salt in a VM if the 'ssh_keyfile' setting is not set and there is no password set for the vm. Check your provider for the 'change_password' option.
19:01 revjim but ssh_keyfile is set...??
19:01 manfred where is it set?
19:02 revjim . /etc/salt/cloud.profiles.d/base.conf
19:02 j987 I have an error involving pip. Here is my SLS and highstate output: https://gist.github.com/anonymous/21b9cacc552fa2006a6d
19:02 revjim and I'm calling salt-cloud -p base test.me
19:02 forrest iggy: https://github.com/saltstack/salt/issues/26644 if you want to add anything.
19:02 saltstackbot [#26644]title: pkgrepo should note that for ubuntu/debian all options should not be used | This is just a clarification regarding `keyid`, `keyserver`, and `key_url`. In most situations (I think all) you don't want to use them together, but this isn't noted anywhere. In addition `dist` should be noted that you very rarely need it. The relevant docs: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html#salt.states.pkgrep
19:02 manfred revjim: i think it might need to be in your provider or in /etc/salt/cloud, i don't know that it can eb a profile level thing, but I am not 100% on that
19:03 revjim manfred: ok. let me try that. thank you.
19:03 nameisnick joined #salt
19:03 wendall911 joined #salt
19:04 revjim manfred: same error. it's now defined in /etc/salt/cloud.providers.d/my-saltify.conf
19:04 j987 Hello. I am struggling with an error for pip state. Here is a gist of my SLS and the highstate output. https://gist.github.com/anonymous/21b9cacc552fa2006a6d
19:05 manfred revjim: you have it indented out under the profile/provider right?
19:05 revjim right... lemme show you...
19:05 manfred kk
19:05 ajw0100 joined #salt
19:06 revjim manfred: https://gist.github.com/dlashua/137912cd47803d0128d3
19:07 manfred hrm, that should work, that is how I have done it in the past :/
19:07 manfred sorry
19:07 revjim manfred: ok. thank you. :/
19:08 nameisnick I am learning to set file contents dynamically using jinja and pillars but I have some unexpected results.  is there a tool or process to help debug this?  when i run the state it executes but I would like to see more about what the jinja is doing to help me find where I made a mistake.
19:09 forrest nameisnick: Unfortunately there isn't really an iron clad way to do that, you can check this issue: https://github.com/saltstack/salt/issues/802 someone has been working on a solution recently
19:09 saltstackbot [#802]title: Syntax checking | When a salt state contains YAML syntax errors, it is quite hard to find these errors at the moment. It would be great to have a basic syntax check (validation agains a schema) and/or references check (e.g. do the references given in require-statements really exist).
19:11 nameisnick forrest: dang, thanks! At least I can stop searching for the tool.  I'll keep at it the trial and error way :/
19:11 forrest nameisnick: Sounds good!
19:13 drawsmcgraw Any input from the group on using `requests` in an in-house python app?
19:13 drawsmcgraw I know not to use m2crypto because of my exposure to Salt. Hoping to get similar guidance on this one :)
19:13 scoates is there a reason that eventlisten.py running on my master wouldn't ever see (display) an event tagged `fk/external_ip` with this? `__salt__['event.fire_master']({'external_ip': ip}, 'fk/external_ip')`
19:14 Arbusto joined #salt
19:14 j987 Anyone know how to fix a lazyload problem? 2015-08-25 19:11:05,385 [salt.utils.lazy  ][DEBUG   ][27031] Could not LazyLoad pip.installed
19:15 scoates (and I do see `[DEBUG   ] Sending event - data = {'pretag': None, '_stamp': '2015-08-25T19:09:05.025197', 'tag': 'fk/external_ip', 'data': {'external_ip': '(REDACTED)'}, 'events': None}`, so it does appear that the event is being sent)
19:18 iggy j987: does salt use python27 on your distro?
19:18 hemphill joined #salt
19:19 N-Mi joined #salt
19:19 N-Mi joined #salt
19:19 godlike hm, I asked this yesterday and I dunno if it was a really ugly question or nobody had the time to see it: what would be the best way to apply a state based on the timestamp of a file (e.g. if last modification was done >1d ago)?
19:19 iggy drawsmcgraw: other than version issues on certain "older" distros, it's pretty solid
19:20 iggy godlike: you'll probably have to use jinja conditionals or some of the requisite tests (unless, etc)
19:21 scoates godlike: this might help http://docs.saltstack.com/en/latest/ref/states/requisites.html#onlyif
19:21 godlike scoates: iggy: yes, using conditionals is not a problem. problem is how to retrieve the current timestamp of the file. I cannot use grains since the info might be outdated, and I thought about the mine, but I think I would have to create a special function/state to get the timestamp
19:22 godlike I could use a wrapper script deployed on the minions to control the final execution or not, but wished to know if there was a 'salty' way of doing this
19:22 Ztyx joined #salt
19:22 godlike I am known by my twisted and dark ideas btw
19:23 drawsmcgraw iggy: Word. Thank you sir. I'm reading the quickstart now and... wow.
19:23 Arbusto joined #salt
19:24 hemphill godlike: could you twist the unless clause and use a find command with an age flag?
19:25 rideh joined #salt
19:26 N-Mi joined #salt
19:26 N-Mi joined #salt
19:27 Arbusto joined #salt
19:29 iggy godlike: - unless: test $(find /path/to/file -mtime +1)
19:29 iggy or something
19:31 jngd joined #salt
19:31 j987 iggy: It's Amazon Linux. I think it's 2.6. BTW, what's a good way to confirm that?
19:31 Arbusto joined #salt
19:32 godlike iggy: hemphill I like your twisted and dark way of thinking. some day we shall rule the world
19:32 cberndt joined #salt
19:34 Arbusto joined #salt
19:35 sgargan joined #salt
19:37 giantlock joined #salt
19:38 Arbusto joined #salt
19:38 Ztyx joined #salt
19:39 kevinquinnyo is there any way to target servers for an orchestration (I'm already targeting by role in the orchestration)
19:40 SneakyPhil joined #salt
19:40 SneakyPhil hello all
19:41 timoguin_ joined #salt
19:41 SneakyPhil I'm having an issue trying install vim-nox on a debian 7 box. I can install the package from the servers cli just fine, but when I run my salt state it fails to find the vim-nox package.
19:45 SheetiS Amazon Linux uses python2.7 by default, but salt is installed from epel6 by default as well, so goes against python2.6.  It makes pip.installed states 'interesting'.  Mainly you want to make sure that you have python26-pip installed as well as the pytohn27 one and then specify which one you want the pip.installed state to target.
19:45 iggy j987: you need to install modules that match the version of python that salt runs with (salt --versions)
19:45 j987 iggy: got it. thanks
19:46 iggy j987: see what SheetiS said
19:46 linjan joined #salt
19:47 iggy SneakyPhil: paste the state, and the output to gist
19:47 baweaver joined #salt
19:49 SneakyPhil k
19:51 BradThurber joined #salt
19:53 scoates any idea what I'm doing wrong for events? on the master: `sudo salt-run state.event pretty=True` ; on the minion `sudo salt-call event.send fk/test foo=Foo bar=Bar` ; I don't see any fk/test events on the master.
19:53 SneakyPhil iggy: http://pastebin.com/HvUNaJVJ
19:55 writtenoff joined #salt
19:56 ajw0100_ joined #salt
19:59 stevednd joined #salt
20:00 tanta joined #salt
20:00 iggy SneakyPhil: try running the state locally on the minion `sudo salt-call -l debug state.sls vim`
20:01 godlike iggy: is there something I'm doing wrong here? https://bpaste.net/show/b0260caa1513 I think it has to do with properly parsing the command, but I dunno if I'm doing it the right way
20:01 godlike there is of course an error reported on the minion for that test command, but no output
20:01 iggy scoates: state.event 'fk/test'
20:02 scoates iggy: on the master?
20:03 aparsons joined #salt
20:04 iggy scoates: yes... sudo salt-run state.event 'fk/test' pretty=True
20:04 scoates I still don't see it. master: `sudo salt-run state.event 'fk/test'` ; minion: `sudo salt-call event.send fk/test foo=Foo bar=Bar` ; no output on the master
20:04 scoates do I need to turn on non-core events in the master config or something? I don't see it there either.
20:05 iggy what about event.fire_master?
20:07 scoates on the minion: `sudo salt-call event.fire_master '{test: foo}' fk/test` ; I don't see it on the master
20:07 iggy tried from the master itself?
20:08 andrew_v_ joined #salt
20:08 scoates iggy: similar.
20:08 scoates however…
20:08 scoates salt/job/20150825200728930521/ret/sean.gateway.fkvpn.net        {"tgt_type": "glob", "fun_args": ["{test: foo}", "fk/test"], "jid": "20150825200728930521", "return": true, "retcode": 0, "tgt": "sean.gateway.fkvpn.net", "cmd": "_return", "_stamp": "2015-08-25T20:07:28.931766", "arg": ["{test: foo}", "fk/test"], "fun": "event.fire_master", "id": "sean.gateway.fkvpn.net"}
20:09 scoates so it's getting *an* event… just not tagged properly or something…
20:09 Ztyx joined #salt
20:10 khaije1 joined #salt
20:10 scoates maybe related to event_return somehow?
20:10 iggy if you figure it out, file a bug to update the docs
20:10 * scoates nods
20:10 scoates I've lost weeks to this stuff. )-:
20:14 BeepBopBoop joined #salt
20:17 dthom91 joined #salt
20:17 scoates iggy: https://github.com/saltstack/salt/pull/24607
20:17 saltstackbot [#24607]title: fixes to minion.py  | A fix if you have multiple masters configured and try to fire events to the minion.  Currently they fail silently.  Might be the cause of #24198.
20:17 scoates and I had my minion configured with a single master, but in list markup
20:18 scoates :tableflip:
20:18 pcdummy joined #salt
20:18 khaije1 is it possible to use ssh multiplexing a'la mastercontrol sockets with salt-ssh?
20:18 iggy yeah, I almost wish they'd just drop multi-master support
20:18 iggy it causes constant problems
20:19 SneakyPhil joined #salt
20:19 iggy khaije1: I think there was an issue about that (and I think the answer is no)
20:20 khaije1 iggy: no worries, thats probably for the best
20:22 SneakyPhil looks like I'm missing some dependencies http://pastebin.com/a4e1r6Kr
20:22 SneakyPhil it's strange that it can't find python 2.7 as I'm staring at a python 2.7 prompt
20:22 dthom91 joined #salt
20:23 BeepBopBoop having an issue with a dotnet4 package via the win repo
20:23 BeepBopBoop http://pastebin.com/wT0aMDRj
20:24 pm90__ joined #salt
20:28 iggy SneakyPhil: try to run the command with the same args as salt does
20:29 SneakyPhil vim-nox is specifically yelling at me about a python2.7 issue
20:29 SneakyPhil looks like this server needs to be unfucked.
20:29 SneakyPhil thanks for the debug line though!
20:30 iggy you're welcome... good luck
20:30 SneakyPhil ha..
20:35 lpmulligan joined #salt
20:35 aparsons joined #salt
20:36 TaiSHi godlike: and I are trying to get a cmd.retcode "test $()" but it seems $() is captured before sending it to minion
20:37 tanta joined #salt
20:38 shaggy_surfer joined #salt
20:40 whytewolf TaiSHi: it would be. bash will encode things in double quotes. you would need single quotes.
20:40 TaiSHi That's what I've told him, aint working for some reaosn
20:42 sdm24 TaiSHi: depending on if you are using a state, you can set a variable {% set var = 'test $()' %}, and then cmd.retcode {{ var }}. I've used that to get around problems with quotes
20:42 TaiSHi http://dpaste.com/34KT46A
20:42 TaiSHi sdm24: CC: godlike
20:43 TaiSHi Thanks for the info, we're trying over console
20:43 jackjackdripper joined #salt
20:44 theologian Hello, I'm trying to  set the hostname in salt-cloud on ec2 via command line. Is this possible or do I need to write something myself?
20:44 theologian or with a launch argument.
20:45 godlike sdm24: yeah, talking to TaiSHi, I was 100% sure that in a state this would eventually run as intended. problem is the master's salt command (which gets executed by bash)
20:45 TaiSHi Doesn't salt-cloud use the parameter as hostname ?
20:45 theologian TaiSHi: it's setting the tag, but not the host name. maybe i over looked something.
20:46 TaiSHi theologian: Might be different for ec2 (I'm using DO), let me check th elibrary
20:46 theologian thanks!
20:46 TaiSHi s/ elibrary/e library/
20:47 pm90_ joined #salt
20:48 TaiSHi theologian: do you want to set the hostname (internally) or to be shown with same hostname on aws console ?
20:48 Ryan_Lane theologian: not sure how salt-cloud works, but I personally set the hostname myself
20:48 Ryan_Lane I don't use salt-cloud, though
20:48 theologian internally and also the minion_id. i see the hostname in the console.
20:49 Ryan_Lane I use the boto_* modules
20:49 TaiSHi theologian: oh, that might be easier then
20:49 pm90__ joined #salt
20:49 TaiSHi (emphasis on might)
20:49 theologian i used to use that, but i like that lots of this is already done for me. ; )
20:49 theologian i'll just write a script to pull the tag and set if from there. thanks!
20:50 TaiSHi theologian: have you tried launching a VM already ?
20:50 theologian yes. works great.
20:50 Ryan_Lane you switched from the boto_* modules /to/ salt-cloud?
20:50 TaiSHi There is a 'salt' formula which you could use to set minion name
20:50 Ryan_Lane theologian: I'm talking about the salt boto_* modules: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_asg.html
20:50 DammitJim joined #salt
20:50 TaiSHi (I agree that hostnames are a pain in ec2)
20:50 theologian i used both at the last company around 3 years ago and now i'm starting over.
20:51 Ryan_Lane the boto_* modules in salt are vastly superior to salt-cloud, though they don't have a way to manage individual instances
20:51 DanyC joined #salt
20:51 theologian good to know. thanks!
20:51 Ryan_Lane though why would you ever want anything other than an autoscale group? :)
20:52 TaiSHi theologian: this might help for setting up hostname http://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html
20:52 Ryan_Lane the biggest downside of ASGs is that you can't easily control the hostname and it's harder to connect it to a master
20:52 Ryan_Lane theologian: I inject a script into my cloud-init
20:52 Ryan_Lane it gets the tags from the autoscale group and uses that for the hostname
20:52 opensource_ninja joined #salt
20:53 Ryan_Lane (the name tag specifically)
20:53 Ryan_Lane it takes the autoscale group name tag and appends the instance id, then appends the domain name (which is also injected into the cloud-init)
20:53 Ryan_Lane it sets the hostname before salt is called
20:53 theologian gotcha. i'll try that.
20:54 theologian thanks Ryan_Lane / TaiSHi>
20:54 Ryan_Lane not sure how easy that is in salt-cloud, but I have a feeling it lets you specify the cloud-init
20:54 Ryan_Lane yw
20:54 Ryan_Lane theologian: are you using iam roles?
20:54 theologian i forgot about cloud-init. good call.
20:54 Ryan_Lane if not, you should be :)
20:54 Ryan_Lane theologian: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_iam_role.html
20:55 Ryan_Lane you can control the iam roles via that module
20:55 Ryan_Lane then tell salt-cloud to launch the instance with an instance profile
20:55 Ryan_Lane (which is the iam role)
20:55 sgargan joined #salt
20:56 TaiSHi theologian: been reading this, it's a bit old tho: https://github.com/saltstack/salt-cloud/issues/712
20:56 saltstackbot [#712]title: Incorrect minion name mappings on EC2 | Using maps to create a cloud dev (on Amazon EC2), the hostnames are not set correctly. For eg:...
20:56 Ryan_Lane then you can add the IAM permissions necessary to do things like describe instances and get tags and the instance's metadata will have credentials that allow it to do them
20:57 Ryan_Lane theologian: I have a (not complete) working example of using the boto stuff here: https://github.com/trebuchet-deploy/trebuchet/tree/add-example/example/orchestration
20:59 theologian this is what i needed.
21:00 subsignal joined #salt
21:01 utahcon is pip.installed not in helium?
21:01 iggy yes, but you need the python-pip package installed
21:02 zwi joined #salt
21:03 utahcon python-pip is already the newest version.
21:03 TaiSHi Also, I'm really interested in the solution theologian :P
21:04 utahcon pip module seems there, but not pip state :\
21:04 utahcon weird
21:04 utahcon ok
21:04 theologian i'll let you know what i come up with. ; )
21:05 Ryan_Lane TaiSHi: theologian: also see: http://ryandlane.com/blog/2015/04/02/saltconf15-masterless-saltstack-at-scale-talk-and-slides/ and http://ryandlane.com/blog/2014/08/26/saltstack-masterless-bootstrapping/
21:05 iggy utahcon: make sure pip is new enough that you can import pip.req
21:06 tzero joined #salt
21:06 utahcon pip is failing all over itself :(
21:07 utahcon attempting to fix that now, thanks iggy
21:07 Ryan_Lane pip.installed is a bit evil
21:07 Ryan_Lane if possible you should use virtualenv
21:07 utahcon Ryan, oh I plan to
21:07 Ryan_Lane pip.installed usually installs to the system
21:08 Ryan_Lane I mean the module: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.virtualenv_mod.html
21:08 Ryan_Lane virtualenv.managed
21:08 zmalone joined #salt
21:08 utahcon you still use pip.installed and tell it to use your venv though, right?
21:08 Ryan_Lane nope
21:08 utahcon oh
21:08 Ryan_Lane I give this a requirements file
21:08 Ryan_Lane and it manages the virtualenv completely
21:09 iggy that's great if it works
21:09 Ryan_Lane the requirements can live in the salt repo, too. doesn't even need to be on the filesystem
21:09 Ryan_Lane it does. we use it extensively
21:09 sgargan joined #salt
21:09 Ryan_Lane (we also use pip.installed in a few rare spots)
21:09 utahcon hmm... that is an option
21:09 utahcon thanks!
21:09 Ryan_Lane yw
21:14 kevinquinnyo How do I include another sls when using the py renderer?
21:14 twork i'm screwing something up. gist that describes my puzzlement, with episodes somehwat out of order: https://gist.github.com/mjinks/9df440d5042dd67d4977
21:15 iggy kevinquinnyo: render the include into your top level dict
21:15 twork read bottom to top
21:16 kevinquinnyo iggy: thanks
21:19 twork usually when i post something like this the answer comes to me about a minute after i hit the post button. so far no luck.
21:21 iggy if user.get('chroot'), True
21:21 iggy and on that note... /me out
21:24 kevinquinnyo hm documentation says that salt.modules.grains.delval "Deletes the key too" but that isnt true
21:24 twork i know iggy is out but i don't follow. 'if user.get('chroot'), True' is, indeed, present in my init.sls; it's a conditional, it resolves correctly with 'pillar.get', but comes up wrong in muy state.
21:25 dthom91 joined #salt
21:25 kevinquinnyo ohhh nevermind -- i just can't read
21:26 arthoo joined #salt
21:28 arthoo is rsync.rsync strictly copying files around on the minion, not a from master to minion (like cp.get_dir)?
21:32 DanyC_ joined #salt
21:40 Xopher joined #salt
21:49 perfectsine joined #salt
21:52 conejin joined #salt
21:53 r0cketman joined #salt
21:57 r0cketman Does anyone know the state of salt being able to apply multiple states concurrently?  I.e., applying Apache AND MySQL AND PHP states at the same time?
21:57 conejin joined #salt
21:58 manfred it cannot
21:58 manfred the asyncornous part is running across multiple minions
21:59 eliasp w00t! got the approval to roll out a test environment for SaltStack at my new employer… looks like my SaltStack activity might finally get back to normal levels soon ;)
21:59 r0cketman @manfred: Thanks!
21:59 conejin left #salt
22:00 aristedes joined #salt
22:02 twork ...and now, while thrashing around trying to figure out what i'm doing wrong, i've put an error into my (cribbed) sls. i know about http://yaml-online-parser.appspot.com/ ...but it doesn't seem to like "{%", which i know is legit.
22:02 eliasp twork: {% … %} is Jinja, not YAML
22:02 eliasp twork: the result of rendering your Jinja template will be YAML
22:03 twork ok, thanks...
22:05 twork ha. and then i luck out. no idea how it got there, but sure enough, a missing "{" at the beginning of a line. that i was nowhere near editing at any point in this adventure.
22:05 twork now back to figuring out what my real problem is
22:07 twork is there a way (there must be) to get a copy of the yaml that jinja renders?
22:08 dingo salt-call state.sls show_highstate maybe
22:08 dingo or one of those kinds of calls --output=yaml
22:09 twork thanks
22:09 dingo np
22:12 baweaver joined #salt
22:12 twork hm. the output to the user comes out in yaml, but i want to render the jinja as yaml before it gets put to use by salt. (right? is that what happens?)
22:14 twork rehashing my issue: all the tests i can think of to run tell me that my sls is correct. but when it's applied, one of my conditionals is ignored.
22:15 twork further rehash: https://gist.github.com/mjinks/9df440d5042dd67d4977
22:17 twork iggy pointed out the conditional, "{% if user.get('chroot'), True %}", but i alreay know that's where my problem is, just not what it is
22:28 ajw0100 joined #salt
22:28 twork ...oooooh, i may be on the right track. once again, cargo culting is my nemesis.
22:39 lpmulligan joined #salt
22:46 dthom91 joined #salt
22:58 mosen joined #salt
22:58 drawsmcgraw left #salt
23:06 N-Mi joined #salt
23:07 twork okay... as i understand it... a construct like: - mode: {{ user.get('user_dir_mode', '0570') }} ...means: if user_dir_mode is present in the pillar, use it, and if not, the default is 0570. wrong?
23:10 twork because i have a piller with lots of user accounts with "user_dir_mode: '0770'", and the rest with no entry for that element, but salt seems to think that very user's home directory should still be 770.
23:10 kevinquinnyo if user is a dict, and the key exists it will set it to that, and default to '0570'
23:12 twork kevinquinnyo: ok, then no, i am confused.
23:13 bfoxwell joined #salt
23:14 kevinquinnyo twork: what are you confused about?  basically what you said is correct
23:14 kevinquinnyo .get() is just a python dictionary method
23:15 twork kevinquinnyo: i'm working from the users formula. here's a guide to my woes, including an excerpt from my pillar (which, uh, i guess is a dictionary after all): https://gist.github.com/mjinks/9df440d5042dd67d4977
23:16 twork ...oops sorry, that's out of date, ignore it
23:16 twork making a fresh one
23:17 lumtnman joined #salt
23:18 lumtnman Does anyone know if mysql_database module will work with mariadb?
23:19 mosen lumtnman: I think the modules do, but the formula has no idea
23:19 lumtnman mosen: ahh that makes sense - thank you!
23:19 mosen I should push some lookups for MariaDB to mysql-formula maybe :)
23:20 lumtnman I mean - it would be kinda nice =)
23:25 kevinquinnyo twork: i think without seeing your updated gist, the issue is that you have a pillar variable called users that is a list of dicts of dicts, like users = [{'bob': {'some_other_attr': 'foo', 'uid': 1001}, 'nancy': {'some_other_attr': 'bar', 'uid': 1002}}]
23:25 kevinquinnyo something like that
23:26 twork kevinquinnyo: thanks, and that may indeed have been my trouble for a while, but i think i've moved beyond that point
23:27 twork ...and i may be seeing what my trouble is. or maybe not. so new to this. so very confused most of the time.
23:28 twork learning salt and jinja and yaml all at the same time is no fun.
23:31 aparsons joined #salt
23:32 pm90_ joined #salt
23:32 forrest twork: How do you feel it could be better?
23:33 nebuchad` joined #salt
23:33 twork forrest: i could be smarter
23:33 forrest twork: Well, we have to cater to the lowest common denominator like myself, so that's not always an option ;)
23:34 N-Mi joined #salt
23:34 twork forrest: i feel like i keep learning the same fundamentals over and over, without ever quite grasping the gist of what those fundamentals actually are.
23:35 forrest twork: Really the fundamentals are state structure, jinja/pillar referencing, and file templating, or at least I think so.
23:35 twork or something like that. anyhow i'm getting close to a report on what my current screwup is.
23:36 twork forrest: templating is a big part of what keeps confusing me. there's something simple there that i just don't seem to swallow.
23:36 twork forrest: there's also something i need to unlearn:
23:37 twork eh, i'm not going to attempt to describe that just now. back to deadline.
23:38 ALLmightySPIFF joined #salt
23:38 forrest twork: Alright, let me know and maybe we can help it click for yo
23:38 forrest *you
23:39 packeteer joined #salt
23:40 twork ok, in my efforts to fix my present situation i added a new, obvious problem. fixed that now, and i'm still goofed up somehow. gist coming.
23:42 forrest twork: Oh I meant for the general templating stuff, my brain is shot if you're trying to do something crazy, lol
23:44 twork :)
23:44 twork well for the assembled multitudes then, https://gist.github.com/mjinks/50849e8aac683c0127ef
23:45 twork 'something crazy' is in the eye of the beholder
23:47 jalbretsen joined #salt
23:47 whytewolf twork: ATTFiles [unless that pillar data is off] doesn't have the user_dir_mode.
23:48 whytewolf twork: also is indenting correct here?
23:48 twork whytewolf: that's intended; i want it to be getting the default i have in the pillar. do i misunderstand?
23:48 aqua^c joined #salt
23:49 twork whytewolf: i *think* my intendint is correct, but when i tried to find a syntax parser i got a lesson on how jinja ain't yaml
23:49 twork ...and hit a wall
23:49 twork i'll check again
23:49 whytewolf I meant on the pillar data.
23:50 forrest I'm assuming that's actually inside a for loop twork
23:51 whytewolf netnumber looks like it is indented to the same level as all the other settings and the only level higher is AttFiles
23:51 twork whytewolf: ah, i see what you mean. that's a paste-into-gist error
23:52 twork i'll re-paste just to be sure
23:52 whytewolf okay, was just checking
23:53 zsoftich3 joined #salt
23:53 twork ...re-pasted
23:53 whytewolf twork: okay.
23:55 whytewolf can we see the full loops?
23:56 forrest twork: You're trying to copy some of this from the user formula right?
23:56 twork forrest: copy and sort of cargo-cult, yeah
23:57 twork whytewolf: you mean, a wider hunk of the init.sls file?
23:57 forrest I think that's your problem, this portion: https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L36
23:58 whytewolf twork: yeah. but i think forrest just found your problem
23:58 * twork stares with a blank expression
23:59 forrest twork: it's building a dict of all the items

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