Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-02-23

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

All times shown according to UTC.

Time Nick Message
00:00 manfred fridiculous: you could use the salt mine or the salt['publish.publish']
00:01 manfred salt['publish.publish']({{ minion_id }}, 'network.interfaces') and parse that
00:02 manfred or if they are cloud servers, you could use the cloud.query module to query your cloud providers api
00:02 krow joined #salt
00:03 fridiculous they are salt-cloud servers
00:03 fridiculous how would i parse salt-cloud servers?
00:03 fridiculous and thank you manfred for helping
00:04 manfred just use the cloud.query module and parse the dictionary it spits back,
00:04 manfred this is how i use it for setting up my hosts file http://ix.io/aFp
00:06 xDamox joined #salt
00:08 fridiculous interesting
00:08 fridiculous did you make that a pillar file?
00:08 dstufft left #salt
00:09 manfred what?
00:09 manfred that is a state file
00:09 manfred /srv/salt/hosts/init.sls
00:10 fridiculous i see
00:10 manfred it does require you to have apache-libcloud on all of the minions
00:14 bemehow joined #salt
00:16 n8n joined #salt
00:22 fridiculous manfred, yeah salt cloud will probably not be installed on all minions at the current time
00:22 fridiculous although that's a great idea
00:22 fridiculous check this out https://gist.github.com/UtahDave/5217462
00:24 xDamox joined #salt
00:25 manfred yeah, that was my other suggestion :)
00:25 octarine joined #salt
00:26 gamingrobot_ joined #salt
00:37 forrest joined #salt
00:40 sulky joined #salt
01:07 bemehow joined #salt
01:11 bemehow_ joined #salt
01:11 schimmy joined #salt
01:13 snuffeluffegus joined #salt
01:15 Guest72558 joined #salt
01:16 giantlock joined #salt
01:17 krow joined #salt
01:20 psyl0n joined #salt
01:23 favadi joined #salt
01:29 n8n joined #salt
01:30 pviktori joined #salt
01:34 dpac|away joined #salt
01:35 dren_ joined #salt
01:35 Guest84053 joined #salt
01:35 neilf_ joined #salt
01:35 stewpot joined #salt
01:35 gldnspud_ joined #salt
01:35 simonmcc joined #salt
01:35 munhitsu joined #salt
01:35 madduck joined #salt
01:35 z3uS joined #salt
01:35 copelco___ joined #salt
01:35 Guest23692 joined #salt
01:35 d10n joined #salt
01:35 Nazzy joined #salt
01:35 wtorrance joined #salt
01:35 rmnuvg_ joined #salt
01:35 cheus__ joined #salt
01:35 jgelens joined #salt
01:35 [M7] joined #salt
01:35 herzi joined #salt
01:35 Xe joined #salt
01:35 bdf joined #salt
01:35 nobody_314 joined #salt
01:35 cb joined #salt
01:35 joshe joined #salt
01:35 mfournier joined #salt
01:35 abele joined #salt
01:35 Chrisje joined #salt
01:35 erjohnso joined #salt
01:35 trevorj joined #salt
01:35 pnl joined #salt
01:35 godog joined #salt
01:42 gnugnu6 joined #salt
01:46 Guest34503 joined #salt
01:48 acabrera joined #salt
01:49 krow joined #salt
01:53 oc joined #salt
01:57 pviktori joined #salt
01:59 cachedout joined #salt
02:14 schimmy joined #salt
02:17 chrisjones joined #salt
02:24 nextdoorwarren joined #salt
02:27 robawt joined #salt
02:28 cachedout joined #salt
02:29 krow joined #salt
02:32 krow1 joined #salt
02:36 bemehow joined #salt
02:36 mgw joined #salt
02:39 alekibango_ joined #salt
02:39 bhosmer joined #salt
02:39 blast_hardcheese joined #salt
02:51 jeremyBass joined #salt
02:54 ch0pstick joined #salt
02:57 faldridge joined #salt
02:57 schimmy joined #salt
03:04 nn0101 joined #salt
03:05 snuffeluffegus joined #salt
03:10 luminous joined #salt
03:10 bemehow_ joined #salt
03:22 rostam joined #salt
03:22 Kyle joined #salt
03:22 cachedout joined #salt
03:23 vegardx_ Is there a nice way to loop over all minions who has a certain formula specified on it and grab the FQDN from it?
03:23 vegardx_ Lets say I wanted all minions to automatically get configured as hosts on a munin-server.
03:24 helderco joined #salt
03:37 bemehow joined #salt
03:39 dave_den vegardx_: where are you trying  to loop?
03:41 valgrind joined #salt
03:42 krow joined #salt
03:42 vegardx_ Heh, I'm still new to salt, but the equivilent of templates in chef.
03:44 dave_den so are you trying to tell your munin server all of the fqdns that it should monitor?
03:46 mwmnj joined #salt
03:47 vegardx_ yup
03:47 vegardx_ Looping over all servers who has the formula for munin-node on it
03:49 jeff joined #salt
03:54 schimmy joined #salt
03:59 psyl0n joined #salt
04:01 faldridge joined #salt
04:03 mgw joined #salt
04:04 NV joined #salt
04:06 valgrind joined #salt
04:11 helderco joined #salt
04:14 dave_den vegardx_: sorry, back now.  how are you targeting the minions of munin-node?
04:16 liwen joined #salt
04:16 dave_den there's probably a better way to tell your munin server which fqdns to monitor other than trying to enumerate all minions and see which have the munin-node state applied
04:17 dave_den one way is to use the mine. a more efficient way would be to provide the data directly to your munin server via pillar
04:27 bhosmer joined #salt
04:28 xDamox joined #salt
04:29 forrest These friggin ddos'ers man
04:30 dave_den punks
04:31 vegardx_ dave_den: I should get a little better grip of the basics first I think, so I'm trying to replace our more simple chef recipes first. :)
04:32 vegardx_ Like user management and default packages and such.
04:32 dave_den vegardx_: yeah, practice helps sort out some of those issues
04:33 dave_den although your munin issue is still somewhat tricky, there are multiple ways of doing it
04:38 schimmy joined #salt
04:39 dave_den forrest: are you at scale?
04:39 forrest dave_den, I wish, it was a 5 hour drive, and the hotel costs were a bit too much for me with pycon coming up
04:40 dave_den ah
04:40 forrest are you?
04:40 dave_den nah, i'm home
04:40 forrest gotcha
04:43 forrest dave_den, I was considering driving out there this morning till I got called by work about some stuff, decided against it since I am also on-call this weekend.
04:44 dave_den murphys law
04:44 forrest exactly, I'd be in the middle of nowhere somewhere in the desert, and they'd call me about some major issue
04:44 mgw1 joined #salt
04:45 xDamox joined #salt
04:45 dave_den heh, that happened to me in 2003
04:45 dave_den i started a small hosting service and had some servers colo'd in LA
04:46 dave_den i was driving back to denver after setting up some new servers. yes, driving since it saved money
04:46 forrest lol
04:46 dave_den was an hour outside of vegas when a server crashed
04:46 dave_den had to get a hotel room, and this was when wifi was not everywhere
04:47 dave_den hooked up my p900 via infrared to my laptop, dialed up at 9600bps to ssh in and fix shit
04:47 dave_den had to prop my phone up on a phone book to get the IR to work right
04:47 forrest hah
04:47 dave_den good thing was it made me stop a night in vegas, so i spent a few hours gambling before hitting the road again
04:48 dave_den middle of the desert
04:48 dave_den muprhys law
04:48 forrest yep
04:57 favadi_ joined #salt
04:58 alekibango joined #salt
04:59 jmccree joined #salt
04:59 robawt joined #salt
05:00 dcolish_ joined #salt
05:07 dren_ joined #salt
05:07 Guest84053 joined #salt
05:07 neilf_ joined #salt
05:07 stewpot joined #salt
05:07 gldnspud_ joined #salt
05:07 simonmcc joined #salt
05:07 munhitsu joined #salt
05:07 madduck joined #salt
05:07 z3uS joined #salt
05:07 copelco___ joined #salt
05:07 Guest23692 joined #salt
05:07 d10n joined #salt
05:07 Nazzy joined #salt
05:07 wtorrance joined #salt
05:07 rmnuvg_ joined #salt
05:07 cheus__ joined #salt
05:07 jgelens joined #salt
05:07 [M7] joined #salt
05:07 herzi joined #salt
05:07 Xe joined #salt
05:07 bdf joined #salt
05:07 nobody_314 joined #salt
05:07 cb joined #salt
05:07 joshe joined #salt
05:07 mfournier joined #salt
05:07 abele joined #salt
05:07 Chrisje joined #salt
05:07 erjohnso joined #salt
05:07 trevorj joined #salt
05:07 pnl joined #salt
05:07 godog joined #salt
05:09 faldridge joined #salt
05:11 xDamox joined #salt
05:26 luminous_ joined #salt
05:26 giantlock_ joined #salt
05:26 krow1 joined #salt
05:26 jeff_ joined #salt
05:26 dcolish_ joined #salt
05:26 jmccree joined #salt
05:26 alekibango joined #salt
05:26 Kyle joined #salt
05:26 jeremyBass joined #salt
05:26 robawt joined #salt
05:26 pviktori joined #salt
05:26 oc joined #salt
05:26 dpac|away joined #salt
05:26 octarine joined #salt
05:26 jeblair joined #salt
05:26 echos joined #salt
05:26 carmony joined #salt
05:26 horus_plex joined #salt
05:26 hvn joined #salt
05:26 Hefeweizen joined #salt
05:26 BogdanR joined #salt
05:26 Linuturk joined #salt
05:26 vlcn joined #salt
05:26 pexio joined #salt
05:26 zsoftich joined #salt
05:26 brutasse joined #salt
05:26 philipsd6 joined #salt
05:26 sifusam joined #salt
05:26 ecdhe joined #salt
05:26 juice joined #salt
05:26 eculver joined #salt
05:26 jacksontj joined #salt
05:26 funzo joined #salt
05:26 cyrusdavid joined #salt
05:26 Bosch[] joined #salt
05:26 fishpen0 joined #salt
05:26 Guest45286 joined #salt
05:26 cwright joined #salt
05:26 jY joined #salt
05:26 twinshadow joined #salt
05:26 ckao joined #salt
05:26 Corey joined #salt
05:26 mikkn joined #salt
05:26 bretep joined #salt
05:26 scoates joined #salt
05:26 EvaSDK joined #salt
05:26 goodwill joined #salt
05:26 23LAA6LAN joined #salt
05:26 beardo joined #salt
05:26 nliadm joined #salt
05:32 tempspace joined #salt
05:37 ch0psti85 joined #salt
05:39 blast_hardcheese joined #salt
05:40 kermit joined #salt
05:45 xDamox joined #salt
05:47 xDamox Hello, I am play with Salt and I wanted to know if salt://apache/{{ grains['fqdn'] }}.conf can be checked prior to being pulled down
05:47 xDamox ?
05:47 xDamox So for example, if the hostname was example.com, how can I check apache/example.com.conf exists?
05:47 xDamox Or is it OK for it not to exists
05:49 renoirb joined #salt
05:49 ahammond joined #salt
05:49 markizano joined #salt
05:49 codekoala joined #salt
05:49 Jahkeup joined #salt
05:49 [vaelen] joined #salt
05:49 bezaban joined #salt
05:49 crane joined #salt
05:49 codekoala joined #salt
05:52 MTecknology joined #salt
05:52 n8n joined #salt
05:52 jasonrm_ joined #salt
05:52 rhand joined #salt
05:52 twiedenbein joined #salt
05:52 zloidemon joined #salt
05:54 Ryan_Lane joined #salt
05:56 MTecknology joined #salt
06:00 forrest xDamox, You'd be managing the conf file with salt itself, if the file already exists and is accurate, it won't modify it
06:00 xDamox Ahh OK, I just wanted to make sure my logs didn't blow up saying the file didn't exist on the SaltMaster
06:01 forrest the state would fail
06:01 forrest if the source file doesn't exist.
06:01 xDamox is there a way to check the file exists or just let the state constantly fail?
06:02 forrest xDamox, Salt doesn't know about files it doesn't manage
06:02 xDamox So when new systems come online I want it to check to see if it's Apache config is ready
06:03 forrest you'd be managing the apache config with Salt
06:03 xDamox However, it might have to wait a while until it get generated
06:04 SANTI joined #salt
06:06 forrest xDamox, I guess I don't understand, you're saying you build a system with some sort of provisioning tool which installs salt, but the config isn't generated at that time?
06:08 xDamox Sorry forrest, so kickstart installs SaltMinions and they check into the SaltMaster. Once checked it they request the Apache configuration file. However, the Apache configuration file is generated by another tool outside of SaltStack
06:10 forrest xDamox, ahh, that sounds kinda crappy if that system can't create a flat file in the time it takes a system to provision :P
06:10 dave_den xDamox: you can specify multiple sources for a file.managed. this way you can have a default if apache/grains['fqdn'] does not exist.
06:11 forrest dave_den, boooooo
06:11 xDamox Hehe
06:11 xDamox Thanks guys
06:12 dave_den boooooo
06:12 dave_den :D
06:12 forrest hah
06:13 forrest dave_den, it's like you're trying to say we don't live in a perfect world where we can count on people to actually update their scripts to do things in a timely fashion
06:13 xDamox forrest, I wish
06:14 forrest xDamox, we all do!
06:14 dave_den well, once damox integrates the generation of apache/fqdn it will not be a problem. but for now, it's easiest to just set a default to not grind everything to a halt
06:14 forrest xDamox, you should just create a templated apache conf, and be like 'screw your system!'
06:14 xDamox I have no control over the Apache generation, only the config management
06:15 forrest xDamox, is the apache conf that complex?
06:15 xDamox Hehe
06:15 xDamox The develops like total control…. It's difficult to get them to change :(
06:15 bhosmer joined #salt
06:16 dave_den forrest likes this meme:  salt all the things!
06:16 forrest dave_den, hey man, if you can templatize a file, no reason not to :D
06:16 xDamox :)
06:16 forrest 'ok now populate the FQDN here, and the IP here, and some directories here..., and done!'
06:17 dave_den this is why all your base blong to devops
06:17 forrest I wish
06:17 forrest I JUST WANT US TO COMMUNICATE OK, DEVOPS AND SUCH :'(
06:21 dave_den xDamox: also, if you want to skip the states all together if apache/fqnd.con does not exist, then you can use cp.list_master
06:21 dave_den in a jinja conditional
06:21 cast joined #salt
06:22 dave_den http://docs.saltstack.com/ref/modules/all/salt.modules.cp.html#salt.modules.cp.list_master
06:22 dave_den zzz. goodnight.
06:22 forrest later
06:22 forrest yea it is late
06:23 Zuru joined #salt
06:25 xDamox Thank you
06:33 faldridge joined #salt
06:48 hardwire any way to issue event.fire_master without lspci or dmidecode being called?
06:48 hardwire trying to send relatively quick events up to the master from a minion
06:48 hardwire _virtual slows it down substantially
06:49 hardwire ah.. salt-call is just slowing it down.. programatically it's zippy
06:51 krow joined #salt
07:10 methods joined #salt
07:10 methods isn't there a vagrant demo somewhere for quick testing ?
07:11 psyl0n joined #salt
07:12 hardwire well.. maybe I can send it programatically.. from the master to the minion it's fast because the ipc is found
07:12 hardwire but the minion ala SaltEvent can't find the IPC files (it's just plain looking for the wrong socket filename)
07:13 DaveQB joined #salt
07:14 krow joined #salt
07:18 hardwire it's using a zero sized md5sum for the unique id
07:18 hardwire d41d8cd98f00b204e9800998ecf8427e
07:23 psyl0n joined #salt
07:23 bhosmer joined #salt
07:46 astol joined #salt
07:54 EnTeQuAk joined #salt
07:57 ch0pstick joined #salt
08:03 micko joined #salt
08:04 bhosmer joined #salt
08:04 faldridge joined #salt
08:17 Ryan_Lane joined #salt
08:26 BenCoinanke joined #salt
08:28 scalability-junk joined #salt
08:28 sulky joined #salt
08:28 rostam joined #salt
08:28 copelco___ joined #salt
08:28 munhitsu joined #salt
08:28 simonmcc joined #salt
08:28 gldnspud_ joined #salt
08:28 neilf_ joined #salt
08:29 octarine joined #salt
08:29 pviktori joined #salt
08:41 btorch joined #salt
08:41 bigmstone joined #salt
08:41 txmoose joined #salt
08:41 Brew_away joined #salt
08:41 modafinil_ joined #salt
08:41 hillna joined #salt
08:42 rcsheets joined #salt
08:42 goki joined #salt
08:42 jab416171_ joined #salt
08:42 mrchrisadams joined #salt
08:43 harobed_ joined #salt
08:43 codysoyland joined #salt
09:03 jpcw joined #salt
09:06 faldridge joined #salt
09:07 res0nat0r joined #salt
09:29 Furao joined #salt
09:43 psyl0n joined #salt
09:45 krow joined #salt
09:52 bhosmer joined #salt
09:53 ml_1 joined #salt
09:57 homelinen joined #salt
10:07 faldridge joined #salt
10:09 psyl0n joined #salt
10:23 thereturner joined #salt
10:27 kossy joined #salt
10:27 SEJeff_work joined #salt
10:27 andersb joined #salt
10:27 anuvrat joined #salt
10:27 fr0 joined #salt
10:27 nineteeneightd joined #salt
10:27 lude joined #salt
10:27 cofeineSunshine joined #salt
10:38 kossy joined #salt
10:57 luminous joined #salt
11:00 bhosmer joined #salt
11:01 cjbarnes18 joined #salt
11:09 psyl0n joined #salt
11:16 CeBe joined #salt
11:18 joehillen joined #salt
11:33 giantlock__ joined #salt
11:33 eculver_ joined #salt
11:35 pviktori_ joined #salt
11:36 jY- joined #salt
11:37 jeff joined #salt
11:37 jeff joined #salt
11:37 dirjax joined #salt
11:37 cwright_ joined #salt
11:37 pexio_ joined #salt
11:37 Linuturk_ joined #salt
11:37 Hefeweiz1n joined #salt
11:37 zsoftich_ joined #salt
11:37 hvn_ joined #salt
11:37 mikkn_ joined #salt
11:37 EvaSDK_ joined #salt
11:37 EvaSDK_ joined #salt
11:37 Corey_ joined #salt
11:39 twinshadow_ joined #salt
11:40 jacksontj_ joined #salt
11:40 brutasse_ joined #salt
11:40 juice- joined #salt
11:40 _sifusam_ joined #salt
11:40 bhosmer joined #salt
11:40 homelinen_ joined #salt
11:41 goodwill_ joined #salt
11:42 homelinen joined #salt
11:43 codysoyland joined #salt
11:47 beardo joined #salt
11:48 blast_hardcheese joined #salt
11:48 ecdhe joined #salt
11:48 scoates joined #salt
11:49 ckao joined #salt
11:50 fishpen0 joined #salt
11:52 Bosch[] joined #salt
12:03 joehillen joined #salt
12:03 crane joined #salt
12:03 bezaban joined #salt
12:03 [vaelen] joined #salt
12:03 Jahkeup joined #salt
12:03 codekoala joined #salt
12:03 Guest24242 joined #salt
12:03 ahammond joined #salt
12:03 renoirb joined #salt
12:03 alekibango_ joined #salt
12:03 micko__ joined #salt
12:03 BogdanR_ joined #salt
12:03 btorch_ joined #salt
12:03 cyrusdavid joined #salt
12:03 vlcn_ joined #salt
12:03 carmony joined #salt
12:03 bretep` joined #salt
12:03 robawt joined #salt
12:03 astol joined #salt
12:03 MTecknology joined #salt
12:03 Zuru joined #salt
12:03 dcolish joined #salt
12:03 jcockhren joined #salt
12:03 oc_ joined #salt
12:03 luminous_ joined #salt
12:03 cast_ joined #salt
12:03 philipsd7 joined #salt
12:03 yml joined #salt
12:03 tempspace joined #salt
12:03 jeremyBass1 joined #salt
12:03 funzo_ joined #salt
12:03 bigmstone joined #salt
12:03 jasonrm_ joined #salt
12:03 rhand joined #salt
12:03 twiedenbein joined #salt
12:03 zloidemon joined #salt
12:07 scalability-junk joined #salt
12:08 pcarrier_ joined #salt
12:14 Katafalkas joined #salt
12:16 bhosmer joined #salt
12:26 jxqz joined #salt
12:32 jxqz joined #salt
12:38 jxqz joined #salt
12:47 jxqz joined #salt
12:54 jxqz joined #salt
12:57 astol joined #salt
12:59 psyl0n joined #salt
13:01 jxqz joined #salt
13:03 darrend joined #salt
13:08 jxqz joined #salt
13:14 jxqz joined #salt
13:22 sorcix joined #salt
13:24 rojem joined #salt
13:25 dirjax joined #salt
13:29 bhosmer_ joined #salt
13:29 jxqz joined #salt
13:30 honestly joined #salt
13:35 jxqz joined #salt
13:42 jxqz joined #salt
13:42 rojem joined #salt
13:45 elfixit joined #salt
13:48 jxqz joined #salt
13:51 timoguin joined #salt
13:52 Whissi joined #salt
13:54 jxqz joined #salt
14:00 jxqz joined #salt
14:03 cjbarnes18 joined #salt
14:06 sgviking joined #salt
14:07 jph98 joined #salt
14:08 jxqz joined #salt
14:08 jph98 left #salt
14:14 jxqz joined #salt
14:15 linjan joined #salt
14:18 acabrera joined #salt
14:21 jxqz_ joined #salt
14:28 jxqz joined #salt
14:28 sorcix joined #salt
14:29 quickdry21 joined #salt
14:36 akitada joined #salt
14:41 jxqz joined #salt
14:45 markm joined #salt
14:46 taion809 joined #salt
14:47 liwen joined #salt
14:47 jxqz joined #salt
14:49 markm joined #salt
14:50 backjlack joined #salt
14:50 morty3 joined #salt
14:58 timoguin joined #salt
15:00 jxqz joined #salt
15:07 jxqz joined #salt
15:14 jxqz joined #salt
15:17 krow joined #salt
15:17 bhosmer_ joined #salt
15:20 jxqz joined #salt
15:21 n8n joined #salt
15:22 rostam joined #salt
15:25 jxqz joined #salt
15:28 backjlack joined #salt
15:29 Kyle joined #salt
15:29 sgflt joined #salt
15:29 jcockhren https://github.com/saltstack/salt/issues/10678
15:30 jcockhren add comments for any use cases that speak to you.
15:30 jcockhren and I'll include it in dev
15:32 rawtaz :o
15:34 jxqz joined #salt
15:40 jxqz joined #salt
15:45 bhosmer joined #salt
15:49 astol joined #salt
15:50 ahtik joined #salt
15:52 valgrind joined #salt
15:53 timoguin jcockhren, hawt!
15:55 jeblair joined #salt
15:59 Teknix joined #salt
16:00 xmltok joined #salt
16:03 jxqz joined #salt
16:07 zzzirk joined #salt
16:10 jxqz joined #salt
16:11 rojem joined #salt
16:12 jankowiak joined #salt
16:15 zooz joined #salt
16:15 astol joined #salt
16:16 jxqz joined #salt
16:17 krow joined #salt
16:24 astol joined #salt
16:24 jxqz joined #salt
16:27 sorcix left #salt
16:31 jxqz joined #salt
16:31 justBob joined #salt
16:32 ahtik joined #salt
16:35 bhosmer joined #salt
16:56 nliadm joined #salt
16:56 echos joined #salt
16:57 alice|wl joined #salt
16:57 dpac|away joined #salt
16:58 octarine joined #salt
16:58 jmccree joined #salt
16:58 alice|wl https://github.com/saltstack-formulas/openvpn-client-formula doesnt that give access to all keys to all minions? Defeats the purpose of having a pki I think.
16:59 bhosmer joined #salt
17:00 Eugene Yup, sure does.
17:00 Eugene The "proper" way to distribute keys is via embedding into Pillar data or a third mechanism. I'm pretty sure there are plans to make an actual filestore available per-client like would be proper, but I don't keep up with it enough.
17:05 bhosmer joined #salt
17:06 BenCoinanke joined #salt
17:16 liwen joined #salt
17:17 CeBe Hi, I want to configure/setup about 10-20 virtual machines on 2 hardware systems and searching for a configuration management. All machines have shared main config but are different in their task so different software will run on each. is saltstack suiteable for such a situation?
17:17 krow joined #salt
17:18 Eugene Yup.
17:19 CeBe I am currently using my own bunch of scripts to handle that and have defined packages that depend on each other. say web depends on mysql and also mail depends on mysql.
17:19 pkimber joined #salt
17:19 CeBe ist something like this also possible?
17:19 Eugene Yup.
17:19 CeBe cool, any pointer to where I could start digging in? 1000p. docs look a bit scary to me :)
17:20 CeBe quite sure I do not need everything from the whole document
17:21 Eugene Getting Started section on docs.saltstack.com is the best bet
17:23 CeBe yeah, should have scrolled down a bit, thanks Eugene!
17:23 jxqz joined #salt
17:24 Eugene YOu're going to end up storing your data about individual VMs(known as Minions) in the Pillars system. Then have your State definitions be aware of that Pillar data when deciding what to do.
17:30 jxqz joined #salt
17:37 liwen joined #salt
17:43 pkimber joined #salt
17:44 cjbarnes18 joined #salt
17:51 pkimber joined #salt
17:52 samkottler joined #salt
17:57 CeBe thanks Eugene, will check it out.
18:03 jxqz joined #salt
18:06 ahtik joined #salt
18:06 helderco joined #salt
18:08 gamingrobot joined #salt
18:13 linjan joined #salt
18:13 elfixit joined #salt
18:14 ch0pstick joined #salt
18:16 res0nat0r joined #salt
18:17 krow joined #salt
18:21 helderco joined #salt
18:23 xDamox joined #salt
18:23 pkimber joined #salt
18:25 bhosmer joined #salt
18:26 zooz joined #salt
18:27 xDamox Hello, is there a way to push custom grains to minions base on hostname regexes? I created a top.sls in /etc/salt/_grains and synced them out but the minions didn't pick up the grains
18:32 emilisto joined #salt
18:32 xDamox joined #salt
18:34 valgrind joined #salt
18:35 jxqz joined #salt
18:37 Chrisje joined #salt
18:38 ch0psti23 joined #salt
18:41 Ixan joined #salt
18:41 Ixan_ joined #salt
18:41 MTecknology joined #salt
18:42 Ixan_ left #salt
18:43 clearclaw joined #salt
18:44 astol joined #salt
18:44 Chrisje joined #salt
18:45 Ixan joined #salt
18:46 seb` joined #salt
18:47 Ixan joined #salt
18:47 alunduil joined #salt
18:49 darrend joined #salt
18:50 jab416171_ joined #salt
18:54 Katafalkas joined #salt
18:55 arnoldB I have a formula where several SLS files require another SLS file at a certain time (after pkg.installed but before service.running). The specific SLS file isn't included in the top file. unfortunately - require: [{sls: _myslsfile}] deosn't work: Cannot extend ID foo in "foo2". It is not part of the high state.
18:56 arnoldB how do I solve this?
18:56 arnoldB I guess I have to include the specific SLS file in the top file
18:59 fllr joined #salt
19:03 harobed joined #salt
19:12 rawtaz not a lot of questions in here seem to get a reply :<
19:12 cym3try joined #salt
19:12 rawtaz i wish i could help out a bit
19:14 arnoldB well it's Sunday :)
19:14 alice|wl xDamox: did you try pillar for custom (per minion) data
19:14 xDamox would you recommend a pillars over grains?
19:15 arnoldB btw: the problem is caused by a require_in: [{sls: _myslsfile}]
19:15 rawtaz arnoldB: true..
19:15 arnoldB xDamox: what are you doing?
19:15 alice|wl xDamox: totaly diffrent, grains are information collected about the minion and pillar is information you defined about the minion
19:16 alice|wl arnoldB: incude the sls file and require the state thats in it
19:16 xDamox I want to predefine environments, I thought setting a grain to define the environment would be OK
19:16 arnoldB alice|wl: the state itself isn't always defined/ set
19:17 arnoldB xDamox: pillars. http://docs.saltstack.com/topics/tutorials/states_pt4.html
19:18 alice|wl arnoldB: check eg: https://github.com/saltstack-formulas/openssh-formula/blob/master/openssh/auth.sls  it requires openssh.service in line 27
19:18 vipuls joined #salt
19:18 xDamox Thanks arnoldB
19:20 arnoldB alice|wl: that's an arbitary include/ a require on the sls openssh.auth .  I need to let a SLS require on a spefic state.
19:20 bhosmer joined #salt
19:20 arnoldB I'll draw an example
19:21 astol is it possible to require an id declaration, not specific state?
19:21 astol if for example I create both mysql_user and mysql_grant, to not wait for both of them
19:21 astol *to not specify both of them
19:21 astol but wait for both
19:22 arnoldB astol: require: [{"sls": "mysls"}]
19:22 arnoldB astol: http://docs.saltstack.com/ref/states/requisites.html
19:23 astol arnoldB: I was to able to make this work if I move all I need to another .sls and include it, then I can require it
19:23 astol arnoldB: but not single stanza in same .sls
19:25 arnoldB astol: you want to require a SLS itself from itself?
19:26 arnoldB astol: or are you too lazy to define several wait's and require's ?
19:26 alice|wl astol: you could require a state in the id that requires the other states from the same id.
19:26 astol sec I'll show
19:28 arnoldB astol: https://np.adm.sx/view/e637a7e5
19:28 arnoldB astol: the challenge is to require_in a SLS, not a state
19:29 arnoldB ( I guess )
19:31 arnoldB err sorry, wrong user
19:31 arnoldB alice|wl: ^
19:32 astol arnoldB: alice|wl: http://pastebin.com/W4PHN454
19:32 astol notice the bottom two requires, mysql_user, mysql_grants
19:32 astol what am I looking for is to somehow say require:
19:33 astol - some_specific_id: zabbix-db-user
19:33 astol while not moving that id consisting of set of states to other sls
19:34 astol I am wanting something wrong? :)
19:34 arnoldB astol: do you really need the requires? salt should take the right ordering
19:35 arnoldB if you were a puppet user: take a seat, that should work of the box with salt :P
19:35 arnoldB *out
19:38 MrTango joined #salt
19:38 ml_1 joined #salt
19:39 arnoldB well, I require the SLS now everywhere it's needed. quick but dirty
19:41 astol arnoldB: no, went straight to salt :) really, ordering should work? okay, I'll try
19:41 astol I don't quite understand salt ordering (yet)
19:42 astol I guess I should grok it more
19:44 tharkun joined #salt
19:44 dcmorton joined #salt
19:47 bdf_ joined #salt
19:47 Bosch[]_ joined #salt
19:47 rmnuvg joined #salt
19:48 stewpot_ joined #salt
19:48 madduck_ joined #salt
19:48 madduck_ joined #salt
19:48 EvaSDK joined #salt
19:48 EvaSDK joined #salt
19:48 erjohnso_ joined #salt
19:48 jxqz_ joined #salt
19:48 pnl_ joined #salt
19:50 mrchrisadams joined #salt
19:50 hillna joined #salt
19:50 hillna joined #salt
19:51 z3uS| joined #salt
19:51 modafinil_ joined #salt
19:51 nobody_314 joined #salt
19:51 neilf_ joined #salt
19:51 simonmcc_ joined #salt
19:51 herzi joined #salt
19:51 dren_ joined #salt
19:51 gldnspud__ joined #salt
19:51 joshe joined #salt
19:52 Guest43228 joined #salt
19:52 jgelens joined #salt
19:52 [M7] joined #salt
19:53 blast_hardcheese joined #salt
19:54 aleszoulek joined #salt
19:54 n8n joined #salt
19:55 jeff joined #salt
19:55 jeff joined #salt
20:02 mikkn joined #salt
20:08 jaimed joined #salt
20:20 jeremyBass1 hello, I'm trying to get the grains in a jinja template .. something like ` {% if 'serverbase' in grains.item[roles] %} `  anyone know what the correct way to do so would be?
20:21 arnoldB jeremyBass1: what's your problem?
20:21 arnoldB that should work
20:22 gnugnu6 joined #salt
20:22 simonmcc_ joined #salt
20:22 jeremyBass1 @arnoldB that get me this error "SaltRenderError: Jinja variable 'dict' object has no attribute 'item';"
20:22 herzi joined #salt
20:22 neilf_ joined #salt
20:22 jero_ joined #salt
20:22 arnoldB maybe try gains.get
20:22 hillna joined #salt
20:22 jeremyBass1 wil do one min
20:22 arnoldB never used .item
20:24 jeremyBass1 ok so ` {% if 'serverbase' in grains.get[roles] %} `  gets "argument of type 'StrictUndefined' is not iterable"
20:25 arnoldB grains.get('roles')
20:25 markm joined #salt
20:25 arnoldB or salt['grains.get']('roles')
20:25 jeremyBass1 ok one sec, tk
20:25 cym3try joined #salt
20:26 dcmorton joined #salt
20:26 tharkun joined #salt
20:28 zain joined #salt
20:31 jeremyBass1 ` {% if 'serverbase' in salt['grains.get']('roles') %} ` gets "TypeError: list indices must be integers, not str
20:31 jeremyBass1 "  and same with ` grains.get('roles') `  and ` {% if 'serverbase' in salt['mine.get']('*', 'roles').items() %} `
20:33 jeremyBass1 if i do salt-call grains.item roles   this is what i get http://pastebin.com/riL34tjq
20:35 dave_den jeremyBass1: salt-call grains.get roles —out=json
20:35 dave_den it's a string, not a list
20:35 dave_den you need a '-' in front of each role item
20:35 hunter joined #salt
20:35 arnoldB yep
20:36 arnoldB {% if in salt['grains.get']('roles:serverbase', False) == True %}
20:36 arnoldB hack ^
20:36 jeremyBass1 well that was just the cli to ensure there was a list to be had.. i need to call this in a jnija template .. {% if 'serverbase' in salt['grains']('*', 'roles').items() %}
20:36 arnoldB make it a list instead of a dict
20:36 jeremyBass1 oh ok I'll try that
20:36 pnl joined #salt
20:39 jeremyBass1 seems ` {% if salt['grains.get']('roles:serverbase', False) == True %} ` gets " TypeError: list indices must be integers, not str "
20:40 faldridge joined #salt
20:40 dave_den jeremyBass1: make your pillar items look like this: http://yaml-online-parser.appspot.com/?yaml=roles%3A%0A++-+vagrant%0A++-+serverbase%0A++-+security%0A++-+web%0A++-+webcaching%0A&amp;type=json
20:40 hunter joined #salt
20:40 dave_den then just do {% if 'serverbase' in salt['grains.get']('roles') %} ...
20:41 arnoldB hmm my example was garbage
20:41 jeremyBass1 @dave_den well that is what i have.. in my minion file i have http://pastebin.com/YX9vQKb3
20:41 smcquay joined #salt
20:41 faldridge joined #salt
20:41 dave_den jeremyBass1: show the output of salt-call grains.get roles —out=json
20:41 dave_den just to make sure
20:42 jeremyBass1 http://pastebin.com/whpzfzyq
20:42 arnoldB {% if 'serverroles' salt['grains.get']('roles', []) %}
20:42 arnoldB {% if 'serverroles' in salt['grains.get']('roles', []) %}
20:42 dave_den —out not .out
20:42 arnoldB s/serverroles/serverbase/
20:43 dave_den also, you can use grains.get('roles', []) instead of calling it through the salt dict if you don't need to raverse dicts
20:44 jeremyBass1 http://pastebin.com/LE8FcXsq
20:44 jeremyBass1 arnoldD ` {% if 'serverroles' in salt['grains.get']('roles', []) %}`  got the same thing
20:44 jeremyBass1 opps.. it got " TypeError: list indices must be integers, not str "
20:44 dave_den that's not where your error is, then
20:45 dave_den you are trying to access a list by index somehwere else
20:45 dave_den e.g.  grains.get['roles'][0]
20:46 jeremyBass1 ok . I'll look
20:46 dave_den or more precisely you are trying to access a list item by a string, probably mistaking a list for a dict
20:47 cym3try joined #salt
20:48 smcquay joined #salt
20:50 mgw joined #salt
20:52 jeremyBass1 it's odd.. I only have one thing being rendered .. so that is the area.. this is a top file.. it only has http://pastebin.com/wUYBvuP9
20:53 jeremyBass1 yet the same http://pastebin.com/XBJ4WN4T
20:55 dave_den is that your entire top file? if so, you need to target minions
20:55 dave_den e.g http://pastebin.com/uGZkQYAS
20:56 jeremyBass1 that is the test top file.. nothing else in there
20:56 mprymek joined #salt
20:57 jeremyBass1 fudge.. yeah dang it
20:58 dave_den wrokign now?
20:58 jeremyBass1 ok well it got father..but i got http://pastebin.com/NcgXVX47
20:59 dave_den you need to make sure the state files that define php-fpm, memcached, and myswl are included in the same state run when 'serverbase' tried to extend them.
21:01 jeremyBass1 well what is odd is I'm not calling for those in that state thou
21:01 jeremyBass1 this is all that is in there http://pastebin.com/SWNmzx23
21:02 dave_den line 56 through 59.
21:02 jeremyBass1 oh fudge.. ok yes
21:02 jeremyBass1 lol thank you
21:07 cym3try joined #salt
21:08 Damoun joined #salt
21:10 ajw0100 joined #salt
21:11 bt joined #salt
21:13 forrest joined #salt
21:20 cewood joined #salt
21:29 ajw0100 joined #salt
21:38 bhosmer joined #salt
21:42 timoguin joined #salt
21:42 bhosmer joined #salt
21:52 forrest joined #salt
21:54 sontek joined #salt
21:55 harobed_ joined #salt
21:56 harobed_ joined #salt
21:58 seblu joined #salt
21:58 yomilk joined #salt
21:59 krow joined #salt
22:08 xDamox joined #salt
22:12 Gifflen joined #salt
22:13 bhosmer joined #salt
22:13 leon joined #salt
22:13 Guest90333 Hi
22:13 Guest90333 How should I  do to create a simple sls file that would run a test.ping?
22:14 Guest90333 If I do a test: - ping it returns "Name test in sls default is not a dictionary"
22:15 forrest Guest90333, use http://docs.saltstack.com/ref/states/all/salt.states.module.html
22:15 n8n joined #salt
22:17 Guest90333 The state "mine.send" in sls default is not formed as a list
22:19 Guest90333 forrest,    The state "mine.send" in sls default is not formed as a list. Any Idea?
22:19 forrest did you call it using the module state?
22:19 forrest you can't use execution modules directly in a state, you have to call them using the module state.
22:19 Guest90333 running state.highstate from master
22:20 forrest Guest90333, after looking at the link I pasted and formatting things to match that?
22:21 Guest90333 I have a top.sls that calls for base '*' the default .sls. In the default.sls I put the mine.send...
22:21 faldridge joined #salt
22:21 forrest Guest90333, right, but you need to use the module state that I linked if you want to use execution modules in a state
22:21 forrest you can't directly use execution modules in states.
22:23 Guest90333 not sure if I get... All that I'm trying to do is to call a test.ping from a state.highstate call (and have this test.ping inside a sls file)
22:25 forrest Guest90333, test.ping is an execution module, it cannot be called from within a state, unless you use the module state which I linked above. Take a look at those docs.
22:27 Guest90333 worked... I believe I made a typo on my first try
22:27 forrest cool
22:27 Guest90333 I wanted to put it as an example sls here: https://github.com/waldman/salt-dev-environment
22:27 Guest90333 thanks
22:28 Guest90333 :)
22:28 forrest np
22:29 elfixit joined #salt
22:34 brianhicks joined #salt
22:38 Hefeweizen joined #salt
22:39 methods joined #salt
22:39 eliasp is there a way to enforce a domain for a minion? I want to leave 'id:' blank in the minion's config, but the minion's FQDN changes due to DHCP usage… so I'd like to enforce a certain domain (append_domain only appends one, in case getfqdn() contains _only_ the hostname)
22:40 methods left #salt
22:40 psyl0n joined #salt
22:53 markm joined #salt
22:55 sgflt joined #salt
22:59 Networkn3rd joined #salt
23:01 helderco joined #salt
23:02 William joined #salt
23:06 faldridge joined #salt
23:09 helderco joined #salt
23:10 psyl0n joined #salt
23:21 zain joined #salt
23:22 AgentOfEntropy joined #salt
23:29 helderco joined #salt
23:42 mrud joined #salt
23:42 mrud joined #salt
23:43 mrud joined #salt
23:44 snuffeluffegus joined #salt
23:47 mrud left #salt
23:47 ajw0100 joined #salt
23:49 Eugene What you really want to so is disable dhcp-client from screwing with things
23:54 smcquay joined #salt

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