Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-08-12

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

All times shown according to UTC.

Time Nick Message
00:29 danielbachhuber joined #salt
00:37 aat joined #salt
00:50 Lue_4911 joined #salt
00:50 jslatts joined #salt
00:52 mgw joined #salt
01:00 whit joined #salt
01:02 jacksontj joined #salt
01:04 luminous L2SHO_: have you seen salt-formula?
01:05 luminous you might get some stuff taken care of ofor you
01:05 luminous question: is something like user.get seen here https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L8 pulling from pillar?
01:05 luminous is this a 0.16.x thing?
01:09 drags1 joined #salt
01:17 mgw joined #salt
01:21 Nexpro joined #salt
01:25 dthom91 joined #salt
01:27 liuyq joined #salt
01:28 dthom91 joined #salt
01:28 liuyq joined #salt
01:38 anil_ joined #salt
01:39 anil_ I'm trying to run minion without the master. So I set up /srv/salt and /srv/pillar, and I created top.sls in both and a specific pillar called example.sls which is not on the master. Then I do sudo salt-call -c minion --local state.highstate. minion is a file that only contains "file_client: local"
01:39 anil_ but I get an error saying
01:40 anil_ Specified SLS example in environment master is not available on the salt master
01:40 anil_ This is odd, since I thought it should be searching locally
01:40 anil_ Any help would be appreciated. thanks
01:49 anil_ How do i create folders in my pillars directory>
01:49 anil_ and register this in my top file?
01:52 w4pm joined #salt
01:54 malinoff joined #salt
01:54 mgw joined #salt
02:06 Gifflen joined #salt
02:14 m_george|away joined #salt
02:16 anil_ joined #salt
02:17 anil_ Hi, how can i register directories inside /srv/pillar directly with top.sls?
02:17 anil_ master:   "*":     - basedir:       - example
02:17 anil_ where example.sls is inside the folder basedir
02:17 anil_ and basedir is inside /srv/pillar
02:17 anil_ is this possible
02:17 anil_ ?
02:18 anil_ or do I have to explicity add this basedir directory to my minion configuration
02:18 anil_ ?
02:18 anil_ Thanks
02:21 syngin anil_: so you have /srv/pillar/basedir/example.sls ?
02:21 anil_ exactly
02:21 syngin anil_: and you want to include that from top.sls in /srv/pillar ?
02:21 anil_ and top.sls inside /srv/pillar
02:21 syngin right
02:21 anil_ yes
02:21 syngin in top.sls: - basedir.example
02:22 syngin the dots will expand to directories (effectively)
02:22 syngin it's the same mechanism used by python for modules.
02:23 anil_ okay thanks let me give it a try
02:27 anil_ wow thanks so much @syngin. i appreciate it. its really hard to find these things through google for some reason
02:28 syngin anil_: no problem. the best bet is the documentation at readthedocs - but feel free to try your luck in here. if someone's awake, they'll try to help :)
02:31 oz_akan_ joined #salt
02:33 m_george left #salt
02:35 oz_akan_ joined #salt
02:38 danielbachhuber joined #salt
03:02 Lue_4911 joined #salt
03:04 dthom91 joined #salt
03:12 pdayton joined #salt
03:33 xl1 joined #salt
03:34 malinoff Hi everyone. Can i pass an extra variable in state call? Something like this: salt \* state.sls mystate env='{myvar: "123"}'
03:46 MTecknology joined #salt
03:54 anil__ joined #salt
03:54 anil__ Hi again. Can I do - require: - user.present: someuser in a salt state, if that salt state doesn't create the user but requires that it exists
03:55 anil__ I get the following requisies weren't found {'user' : 'someuser' }, even though i know that 'someuser' exists
03:57 anil__ I ran awk -F: '{ print $1 }' /etc/passwd, to check that 'someuser' exists
03:57 anil__ Thanks.
04:02 berto- joined #salt
04:02 syngin anil__: That error means that there isn't a state definition for the username
04:03 anil__ is there a way to say, only run this if this user exists on the system?
04:03 syngin anil__: lemme see if i can find an example
04:04 syngin hmm
04:04 anil__ Id like to keep my states as decoupled as possible, so i dont want each one to have to a user create definition
04:04 syngin not that i'm aware of.
04:04 anil__ if that makes sense
04:04 syngin right
04:04 anil__ I just want the state to check if the user exists
04:05 anil__ im not sure if thats the right way to think about things
04:05 anil__ but I think it seems reasonable
04:05 syngin so what a few of us do is use pillar to store all possible system users, then expose only the correct users via a #!py script.
04:05 syngin how many users do you need to manage?
04:06 syngin better still, what kind of state information would you have that relies on the existance of a particular user?
04:06 syngin like, are you using any kind of role-based separation in your state files?
04:06 anil__ making a folder for instance with a fixed user
04:06 anil__ that should fail if the user doesnt exist
04:06 syngin hmm
04:07 anil__ or file.managed with a user
04:07 anil__ this shouldn't work, if the user doesnt exist
04:07 syngin if you really need to do it that way, you should probably use something like a #!py script.
04:07 syngin but even then...
04:07 syngin nup, i don't think that's the right  angle either.
04:08 syngin how would a server get a user created on it for your example?
04:08 anil__ hmmm... I keep thinking it should be simple, but maybe not... i dont want to have scripts include the user create state, since then that ties them to that specific module, so the user cant use their own user create any longer
04:09 anil__ I first run the user create state
04:09 anil__ then i run the other states
04:09 anil__ in sequence
04:09 syngin erp
04:09 syngin why not use highstate (out of curiosity)?
04:09 syngin so how do you know what users to create on what servers?>
04:09 syngin s/servers/minions/
04:10 anil__ well, thats what i will be doing in the end. but i am testing everything locally, each component seperately, and i need to verify that they fail fast if a user configures something wrong in the top files
04:10 anil__ does that make sense
04:11 syngin you're giving users access to salt?
04:11 anil__ yes...
04:11 syngin right.
04:11 anil__ is this an antipattern
04:11 anil__ since many ppl need to manage their machines on it
04:11 syngin are you managing servers with this set up?
04:12 anil__ yes
04:12 syngin are the servers configured to meet a particular role?
04:12 anil__ yes
04:12 syngin i.e., a web server and a logging server, etc
04:12 anil__ yeah
04:12 syngin so would the users be tied to the role?
04:12 anil__ yes
04:13 syngin so tie your directory creation to the role too then.
04:13 anil__ okay, let me think
04:13 anil__ thanks
04:13 syngin i.e., each minion that executes its state modules should know who all the valid users are, right?
04:13 ds_shadof my minion changed his IP , master lost him. is it normal?
04:14 anil__ syngin: so get the users through grains?
04:14 anil__ or am i misunderstanding something
04:14 syngin anil__: nope. pillar.
04:14 syngin anil__: my pattern is that i have all users in pillar.
04:14 anil__ seperated by role right?
04:15 syngin anil__: kinda, i have my users in groups and each server-role has one or more groups of users.
04:15 napperjabber joined #salt
04:15 syngin ds_shadof: yes.
04:15 anil__ syngin: so you have a create user state somewhere right? how do you ensure that runs before anyhting else
04:16 anil__ do you include it in all your other state files
04:16 syngin anil__: i don't need it to.
04:16 syngin anil__: i run users, files, packages, and services in whatever order salt sees fit to.
04:16 anil__ syngin: but you have to create the user before creating directories tied to that user right?
04:17 anil__ syngin: with requisites?
04:17 syngin anil__: if you have a hard requirement for ordering though, there's an option for that.
04:17 syngin anil__: what kind of directories?
04:17 syngin anil__: my users only have homedirs
04:17 anil__ so say you just need to create a single folder and a signle user on a box right
04:17 anil__ the folder should be owned by the user
04:18 ds_shadof syngin, i have to restart master and minion, to bring it back. salt is complete mess
04:18 anil__ now you have two seperate state files, because there is complex logic for user creation and for folder creation (or just seperate for organizational reasons)
04:18 anil__ syngin: how do you ensure that the user creation happens before folder creation
04:18 syngin anil__: in  that case, you could use something like the order option: http://docs.saltstack.com/ref/states/ordering.html
04:19 syngin anil__: i'd just add it to the user's state declaration though
04:19 syngin like: username: - user.present... - file.directory... - file.managed... etc
04:20 anil__ syngin: well it was a simplistic example, say there are 50 states that need to be run all owned by that user, should I have user.present in all of them?
04:20 syngin anil__: again, i'd look at ordering.
04:20 anil__ syngin: okay will take another look. I appreciate your suggestions
04:21 anil__ thanks
04:21 syngin np
04:21 spacedentist joined #salt
04:21 syngin anil__: i think "order: last" might be useful for your user-specific files and dirs.
04:22 auser joined #salt
04:24 ds_shadof how i'm  supposed to control minions if they simply cant reconnect to master if host IP address changed
04:25 syngin ds_shadof: So the IP of your minion changed? or the master?
04:25 malinoff Can i pass an extra variable in state call? Something like this: salt \* state.sls mystate kwargs='{myvar: "123"}'
04:25 syngin minion
04:26 syngin ds_shadof: did you have to re-accept the minion's key on the master?
04:26 ds_shadof no, key is still the same, why should it change?
04:27 syngin ds_shadof: so how come the minion didn't reconnect?
04:29 ds_shadof i changed IP address at minion host
04:29 ds_shadof salt minion-host test.ping return nothing
04:30 syngin ds_shadof: but you could ping it from console fine?
04:30 ds_shadof i can even ssh to it :)
04:31 ds_shadof and ping master host
04:32 syngin ds_shadof: https://github.com/saltstack/salt/issues/2358
04:34 premera joined #salt
04:34 lazyguru joined #salt
04:43 anil__ Is it possible for a pillar to throw an exception if get fails? maybe we'd have to do this in jinja? any recommendations
04:47 ds_shadof syngin, i waited about 10 minutes and minion resopnds form master
04:53 syngin anil__: do you want to fail hard if there's something missing from pillar?
05:01 dthom91 joined #salt
05:28 Katafalkas joined #salt
05:30 ollins joined #salt
05:30 anil__ yes
05:31 Katafalkas joined #salt
05:32 Katafalkas joined #salt
05:34 syngin anil__: so the default is that salt will raise a KeyError (or IndexError) if appropriate.
05:35 anil__ oh gotcha, so pillar["user"] raises the error i assume
05:35 anil__ as opposed to pillar.get("user") which returns none
05:36 syngin correct
05:36 anil__ great wanted to make sure
05:36 anil__ thanks
05:36 syngin np
05:41 az87c joined #salt
05:44 Katafalkas joined #salt
05:53 middleman_ joined #salt
05:57 gildegoma joined #salt
06:03 matanya joined #salt
06:04 Katafalkas joined #salt
06:09 drags joined #salt
06:15 Katafalkas joined #salt
06:25 dthom91 joined #salt
06:27 berto- joined #salt
06:29 liuyq joined #salt
06:30 xl2 joined #salt
06:31 liuyq joined #salt
06:32 kstaken joined #salt
06:34 Katafalkas joined #salt
06:46 mike25ro joined #salt
06:47 rfo joined #salt
06:48 pkruithof joined #salt
06:49 rfo is there a state to manage and unarchive a file from salt:// ?
06:49 mike25ro rfo: i am not sure ... but you can use a cmd.run ... and unzip it after you copy it to the minion
06:50 rfo yes, got that from a ruby install recipe
06:50 rfo I thought there would be a cooler way, but this will work
06:50 mike25ro sometimes... is useless to overengineer .. the obvious
06:51 mechanicalduck joined #salt
07:10 vaxholm joined #salt
07:16 rfo yes, no problems
07:16 rfo easy
07:16 wahahajun joined #salt
07:16 rfo but if it's there and I can not find it, I am going to ask
07:17 wahahajun hello. May i ask a quesion?
07:18 wahahajun now i use a salt-minion in windows. When i start the minion in cmd 'salt-minion -l debug -cc:'
07:18 wahahajun it run well. but when i start up the minion in the windows service manage. it can not run my scritp very well
07:20 wahahajun i use slat-script to call a python script  to start up an exe file.
07:23 mel joined #salt
07:23 wahahajun when i start the up the minion in cmd and run the exe file it always success. but when in windows service it fails
07:23 carlos joined #salt
07:24 it_dude joined #salt
07:25 balboah joined #salt
07:36 wahahajun anyone met the same problem?
07:42 koolhead11 joined #salt
07:44 fab0109 joined #salt
07:44 Ryan_Lane joined #salt
07:47 fab0109 left #salt
07:49 mike25ro wahahajun: i wasn't aware that salt also supports windows os ... is there any documentation?
07:50 wahahajun YES. http://docs.saltstack.com/topics/installation/windows.html
07:50 wahahajun just salt-minion support the windows. salt-master has not sopport
07:52 gamingrobot one reason is this http://docs.python.org/2/library/resource.html
07:52 nonuby joined #salt
07:53 nonuby whats the idiomatic way for deploying custom states (i mean on py files that do the 'changes' heavy lifting on the minion)? can salt self bootstrap so to speak?
07:54 emocakes joined #salt
07:54 mmilano joined #salt
07:54 emocakes left #salt
07:55 mmilano left #salt
07:58 LucasCozy joined #salt
07:59 Katafalkas joined #salt
08:00 mike25ro wahahajun: what did you manage to .. manage on windows hosts? did you find any ... states that are not working on windows minions?
08:06 Xeago joined #salt
08:08 felixhummel joined #salt
08:10 wahahajun @mike25ro  YES. The py file can't execute right in salt-minion if we start the salt-minion in Service mange
08:12 wahahajun it's hard to see the function of Py. to be easy you can think py can just start an exe file
08:12 zooz joined #salt
08:13 wahahajun @nonuby  i use salt cmd.run python a.py
08:15 Katafalkas joined #salt
08:18 vaxholm joined #salt
08:22 felixhummel hi there
08:24 mike25ro hey
08:25 scott_w joined #salt
08:32 aleszoulek joined #salt
08:35 gamingrobot hi
08:35 mike25ro hey
08:40 vaxholm joined #salt
08:43 backjlack joined #salt
08:43 harleytaz joined #salt
08:48 jdelic joined #salt
08:49 ninkotech joined #salt
08:54 Katafalkas joined #salt
09:02 qba73 joined #salt
09:08 lemao joined #salt
09:13 jdelic hi everyone. I'm struggling with the broken pkg state in 0.16.2, specifically salt appending ":all" or ":amd64" to package names installed through "sources" and then either erroring out because it can't find that package in the package index (because it appended :all) or erroring out because the package name with :all appended doesn't actually match the package name
09:13 jdelic did anyone here develop a working work-around?
09:14 jdelic not to mention that https://github.com/saltstack/salt/blob/0.16/salt/modules/pkg_resource.py#L100 and https://github.com/saltstack/salt/blob/develop/salt/modules/pkg_resource.py#L100 still look very much broken to me
09:19 ml_1 joined #salt
09:34 abele joined #salt
09:36 Ramesh joined #salt
09:37 Ramesh Hi, i am trying to use git as my primary fileserver, but i am getting some error
09:38 Ramesh [DEBUG   ] Skipping /var/cache/salt/master/extmods/fileserver, it is not a directory [ERROR   ] Failed to read the virtual function for fileserver: gitfs Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 699, in gen_functions     virtual = mod.__virtual__()   File "/usr/lib/python2.7/dist-packages/salt/fileserver/gitfs.py", line 47, in __virtual__     gitver = distutils.version.LooseVersi
09:40 Ramesh Can someone please help me ?
09:45 defunctzombie_zz joined #salt
09:47 Kamal_ joined #salt
09:55 Ivo joined #salt
09:55 multani joined #salt
09:59 Kamal___ joined #salt
10:02 multani joehh: it seems when upgrading the salt-minion package, it stops the minion before doing the actual code upgrade but never restarts it
10:03 multani joehh: (I'm speaking about the Debian package, btw, using those from debian.saltstack.com on squeeze & wheezy)
10:04 multani joehh: which means that upgrading every minion to a newer version is a bit cumbersome at the moment. Is this a bug in the packaging or is this something wanted?
10:09 whiskybar joined #salt
10:22 carlos_ joined #salt
10:32 ecolitan joined #salt
10:33 ecolitan how to I obtain the fingerprint of the key generated on the minion, on order to check on master before accepting?
10:33 multani joehh: it seems I have the problem only on Squeeze though
10:33 Katafalkas joined #salt
10:41 oz_akan_ joined #salt
10:45 Teknix joined #salt
10:46 [vaelen] joined #salt
10:46 gamingrobot ecolitan: http://docs.saltstack.com/topics/tutorials/walkthrough.html#using-salt-key ?
10:47 mike25ro1 joined #salt
10:47 matanya joined #salt
10:56 pkruithof joined #salt
10:58 ecolitan gamingrobot: have read that, thing is that salt-key is only installed on the master
10:59 ecolitan on the master i can print the key fingerprint
10:59 gamingrobot cat /etc/salt/pki/minion/minion.pub
10:59 ecolitan ok
11:02 ecolitan do you know what hash the fingerprint of the key is?
11:09 tomeff joined #salt
11:09 scalability-junk joined #salt
11:11 carlos joined #salt
11:23 pdayton joined #salt
11:24 mechanicalduck joined #salt
11:27 Ryan_Lane joined #salt
11:28 giantlock joined #salt
11:31 baniir joined #salt
11:35 gamingrobot normally ssh-keygen -lf somekey.pub works for printing the fingerprint
11:36 gamingrobot but I tried it on the minion.pub and got this "/etc/salt/pki/minion/minion.pub is not a public key file."
11:43 ecolitan pgp doesn't give the fingerprint either
11:52 bhosmer joined #salt
11:53 santagada joined #salt
11:54 Katafalkas joined #salt
11:55 baniir joined #salt
12:05 mechanicalduck joined #salt
12:06 ecolitan well I found how to get the fingerprint, its not pretty
12:07 ecolitan why does salt use md5 as a cryptographic hash function for checking the key?
12:08 y0j joined #salt
12:09 alxbse joined #salt
12:11 matanya joined #salt
12:12 blee joined #salt
12:14 gamingrobot what do you have to do to get the figerprint?
12:16 ecolitan I have to verify the fingerprints match before I trust the key on the master
12:16 middleman_ joined #salt
12:16 ecolitan sorry, read your q wrong
12:17 ecolitan just throwaway first and last line of .pub file and md5 hash
12:19 nielsbusch joined #salt
12:25 hazzadous joined #salt
12:26 xl2 left #salt
12:36 mike25ro1 hey guys...  i was wondering...  this code: {% for keys, args in pillar['dev-keys'].iteritems() %}     i couldn't find in the documentation anything about iteritems.
12:37 mike25ro1 in other places.. the looping is done by  {% for username, user in pillar.get('users', {}).items() %}
12:37 mike25ro1 why are there 2 ways of looping and which one is the reccommended way?
12:38 gamingrobot iteritems is a generator
12:38 gamingrobot http://stackoverflow.com/questions/10458437/python-what-is-the-difference-between-dict-items-and-dict-iteritems
12:38 mike25ro1 ah.. i didn't read about that ...
12:38 felixhummel pillar does not refresh. i tried saltutil.refresh_pillar and pillar.get, but to no avail. key is nested 3 levels deep. any ideas?
12:39 y0j joined #salt
12:39 mike25ro1 felixhummel: .... for me pillar refresh works.
12:39 felixhummel mike25ro1: did so for me too, but not this time
12:40 felixhummel i double checked my configs (correct pillar sls, correct targeting in pillar's top.sls)... i'm at a loss here
12:40 mike25ro1 did you restart salt-master?
12:44 felixhummel just did. restarted minion too. still nothing.
12:45 santagada joined #salt
12:45 jpcw joined #salt
12:45 felixhummel when i add a new key-value-pair on the root level, then it appears. i suspect it has to do with the nesting level...
12:47 oz_akan_ joined #salt
12:48 gamingrobot it doesnt show up in pillar.items?
12:49 felixhummel got it. in top.sls i have "*-prod": foo.sls followed by "bar-prod": bar.sls, where bar overrides my dict in foo. works initially, but cannot handle updates to bar.sls...
12:50 SmellyCat joined #salt
12:51 cowyn joined #salt
12:52 jeffasinger joined #salt
12:54 cowyn hello, quick question, is it possible to define pillar with pillar?
12:56 mike25ro1 cowyn: why do you need that? :)
12:56 mike25ro1 what do you mean ?
12:57 mike25ro1 pillar is just a set of ... data
12:57 brianhicks joined #salt
13:00 anil_ joined #salt
13:00 cowyn eh, i have some key-value pairs set in pillar, and i need a new pillar key-value pair, with some of the former pillar data as the new value.
13:01 anil_ If I include a number of sls files, is it possible to impose ordering on when they get run, or have requires declarations somehow?
13:01 cowyn anil_: try http://docs.saltstack.com/ref/states/ordering.html
13:02 anil_ It has to do with ordering on includes, not inside a package
13:02 jdelic Sorry for the repost, but perhaps one of the newcomers can help: I'm struggling with the broken pkg state in 0.16.2, specifically salt appending ":all" or ":amd64" to package names installed through "sources" and then either erroring out because it can't find that package in the package index (because it appended :all) or erroring out because the package name with :all appended doesn't actually match the package name
13:02 anil_ so if i include ten packages, I need some to run before others
13:02 anil_ if that makes sense
13:03 jdelic I also think that https://github.com/saltstack/salt/blob/0.16/salt/modules/pkg_resource.py#L100 and https://github.com/saltstack/salt/blob/develop/salt/modules/pkg_resource.py#L100 still look very much broken to me in that regard, any one here working on salt source?
13:03 jdelic *anybody, whoops
13:05 cowyn anil_: have you tried `order' option
13:05 baniir joined #salt
13:06 Gifflen joined #salt
13:08 anil_ @cowyn http://codepaste.net/fqsrqy, would using order look like:http://codepaste.net/nt1aog ?
13:10 jslatts joined #salt
13:13 matanya joined #salt
13:13 oz_akan_ joined #salt
13:17 cowyn anil_: which version? should work in 0.16.0+
13:17 cowyn anil_: read this: https://github.com/saltstack/salt/issues/5255
13:18 anteaya joined #salt
13:18 anil_ im running 15.0 sadly....
13:18 anil_ thanks though
13:19 cowyn anil_: np.
13:20 kenbolton joined #salt
13:21 cowyn so, answer my own question according to my test, it seens that in pillar state file, pillar function will fail.
13:22 jdelic1 joined #salt
13:23 juicer2 joined #salt
13:30 y0j joined #salt
13:31 toastedpenguin joined #salt
13:31 whiskybar joined #salt
13:32 jefferai joined #salt
13:40 L2SHO joined #salt
13:43 ramesh joined #salt
13:44 ramesh Hello all, is there any good tutorial for gitfs ?
13:45 ramesh I am trying to use git with salt, but its throwing out some error
13:49 renoirb Hey people, anybody used with salty-vagrant here?
13:50 bhosmer joined #salt
13:50 ml_1 joined #salt
13:50 luminous question: is something like user.get seen here https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L8 pulling from pillar? is this a 0.16.x thing?
13:51 mike25ro1 luminous: {% for name, user in pillar.get('users', {}).items() %}
13:51 jkleckner joined #salt
13:51 mike25ro1 it is pulling data from pillar
13:52 luminous so then user.get() is available because it has been pulled from pillar?
13:52 luminous so if you pulled foobar from pillar, where foobar were some dictionary, you could then use foobar.get()?
13:53 mike25ro1 erm...
13:53 luminous :)
13:53 luminous see, not so clear
13:54 mike25ro1 i think you dan
13:54 mike25ro1 can*
13:54 jalbretsen joined #salt
13:55 luminous I think so too, but I haven't been able to locate teh relevant doc on this detail and would like to be more sure of what I am doingo
13:55 mike25ro1 ah yeah... i have the same problem... with DOC...
13:55 mike25ro1 a lot of things .... are found ... in the examples from github... but not on the docs
13:55 luminous my guess is this is a 0.16.x thing, and docs are lacking
13:55 mike25ro1 https://github.com/saltstack-formulas/users-formula/blob/master/pillar.example
13:56 mike25ro1 here is a pillar... that ... is used here.
13:56 mike25ro1 https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L8
13:56 mike25ro1 as you can see at line 8 in state
13:56 mike25ro1 {% set home = user.get('home', "/home/%s" % name) %}
13:56 luminous hah, so it's assumed how that works, but so not clear
13:57 mike25ro1 also    {% for group in user.get('groups', []) %}
13:57 luminous at least groups is in the pillar.EXAMPLE
13:57 luminous :)
13:57 mike25ro1 yeah
13:57 * luminous looks at 0.16.x release notes
13:58 jslatts joined #salt
13:58 renoirb Regarding salty-vagrant, anybody has suggestion to read more about seed_master key in vagrant file?  Only one  I found that seems to give more info on to how to use is the pull-request: https://github.com/saltstack/salty-vagrant/pull/73
13:59 luminous http://docs.saltstack.com/topics/releases/0.16.2.html?highlight=release%20notes#pillar no note of this
13:59 * luminous will stab in the dark
14:00 [diecast] joined #salt
14:02 mgw joined #salt
14:03 jalbretsen1 joined #salt
14:05 jdelic joined #salt
14:05 ipmb joined #salt
14:06 lemao joined #salt
14:07 isomorphic joined #salt
14:07 loz_hurst joined #salt
14:08 L2SHO are there any salt recepies for compiling software that I can look at?
14:09 ollins_ joined #salt
14:10 dizzyd joined #salt
14:10 luminous L2SHO: https://github.com/saltstack-formulas
14:10 nliadm joined #salt
14:10 jeffasinger joined #salt
14:10 ollins joined #salt
14:10 luminous L2SHO: actually, your question is ambiguous.. do you mean salt states for how to compile source? or prepackaged states like salt-formulas?
14:11 L2SHO I mean a salt state for how to compile source
14:11 Katafalkas joined #salt
14:11 luminous ah
14:11 luminous you are usually using cmd.run
14:11 cowyn joined #salt
14:11 luminous with require and unless
14:12 echos joined #salt
14:12 luminous I can't think of any examples on github off the top of my head, but you can poke around github and likely find something
14:12 luminous I can give you one I've done
14:13 L2SHO ok, let me see if I can figure it out
14:13 alunduil joined #salt
14:14 luminous https://dpaste.de/p8Lpv/
14:14 luminous L2SHO: ^^ this is for opensmtpd
14:15 luminous which, by the way, should replace all smtpd's everywhere :P
14:16 L2SHO wow, thats kinda long
14:17 luminous well, it's the full state, so it's not just compiling, it's setting up the daemon and all the other details opensmtpd needs
14:17 luminous the compiling bit could be separated out to 3 or so chunks, eg: get the source, unpack, compile/install
14:18 L2SHO I like postfix personally, but I've never used opensmtpd
14:18 luminous if you like simple configs, you will like opensmtpd
14:18 luminous they use a parser inspired by openbsd's pf
14:18 luminous it's sweet and simple, puts all other smtpd configs to shame
14:19 luminous listen on lo; accept from local for any relay   <<< here's the entire config needed for a secure localhost relay
14:20 vuja-de joined #salt
14:20 luminous if not knowing the syntax, you can make really good guesses as to what that means, and you would likely be correct
14:21 L2SHO it doesn't look very featureful
14:22 luminous what do you need that you think it would not be able to do?
14:23 L2SHO does it support LMTP?
14:23 luminous probably not. what is LMTP?
14:23 Corey Picture SMTP that doesn't build a queue.
14:23 Corey You're pretty close. :-)
14:23 L2SHO http://en.wikipedia.org/wiki/Local_Mail_Transfer_Protocol
14:24 luminous huh?
14:24 whit joined #salt
14:24 robertkeizer joined #salt
14:24 luminous oh, yea, it'll do local mail just fine
14:24 L2SHO I like using LMTP to hand off mail to dovecot, and letting dovecot handle all the mailboxes and auth
14:24 aat joined #salt
14:24 L2SHO so I can manage all my users and mailboxes in one place
14:24 m_george|away joined #salt
14:24 Corey Right, SMTP is often unfit for purpose because if you break things in weird places, it'll build queues where you don't expect them to be, which is... bad.
14:24 m_george left #salt
14:25 luminous you check in on #opensmtpd to be sure
14:25 luminous *yopu could
14:26 luminous bah
14:26 ronc joined #salt
14:27 L2SHO it does looks simple which could be good in some situations, but I don't think I would run a serious large scale mail server using opensmtpd
14:27 luminous Corey: do you know about this user.gedt() business? https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L8
14:27 Corey Let's see.
14:27 mike25ro1 i am still looking at the same thing luminous
14:27 luminous L2SHO: you would trust seriously complicated and insecure code?
14:28 Corey luminous: What about that line is troubling?
14:28 luminous :P
14:28 luminous user.get() is coming from where?
14:29 mike25ro1 luminous:  Corey related to  https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L8 at line 10 ...... i had to change it to  {% for group in args['groups'] %}     for me to work
14:29 mike25ro1 the error i got was UndefinedError: 'str object' has no attribute 'get'
14:30 mike25ro1 GET attribute... is not present.....  salt 0.16.0 ... or so it seems
14:36 isomorphic joined #salt
14:37 mike25ro1 left #salt
14:37 luminous mike25ro1: what version of salt?
14:42 teskew joined #salt
14:44 conan_the_destro joined #salt
14:47 kaptk2 joined #salt
14:47 evilNirvana joined #salt
14:47 carmony joined #salt
14:48 efixit joined #salt
14:49 evilNirvana pacman seems to be playing up on one of my archlinux servers, http://puu.sh/40ax9.txt , not really sure why/how
14:51 kermit joined #salt
14:51 kmrhb joined #salt
14:53 scalability-junk why does ansible seem so much more cleaned up in the form of documentation, structure and features... :( but I really love salt :D
14:53 mannyt joined #salt
14:54 JasonSwindle joined #salt
14:58 mgw joined #salt
14:59 StDiluted joined #salt
14:59 faldridge joined #salt
15:03 cnelsonsic joined #salt
15:03 ezraw joined #salt
15:05 mmilano joined #salt
15:05 __Jahkeup__ joined #salt
15:05 teskew joined #salt
15:06 racooper joined #salt
15:08 bhosmer joined #salt
15:08 carmony joined #salt
15:08 forrest joined #salt
15:09 teskew joined #salt
15:09 chrisgilmerproj joined #salt
15:10 mrpull joined #salt
15:11 UtahDave joined #salt
15:14 mattt left #salt
15:16 StDiluted morning all
15:22 __Jahkeu_ joined #salt
15:22 jschadlick joined #salt
15:23 aat joined #salt
15:24 jslatts joined #salt
15:25 * scalability-junk loves the magic ansible has built in, but I wanna use salt :( help me :D
15:26 UtahDave what are you trying to do, scalability-junk?
15:28 scalability-junk UtahDave: the chunked rolling updates approach in ansible sounds great for not overloading my git server for example and the multitier support within ansible seems to provide a lot of things I would have to configure with salt. Aka removing servers from load balancers or prodiving mysql ips etc. pp
15:29 carmony joined #salt
15:30 lazyguru joined #salt
15:33 UtahDave scalability-junk: have you tried the "batch" feature?
15:33 forrest scalability-junk, regarding the LB rotation, you can easily use the API to handle that depending on how you rotate machines in/out
15:34 scalability-junk UtahDave: could I do that from state files too? Or wouldn't I want that...
15:35 UtahDave scalability-junk:    salt \* state.highstate  --batch 10%
15:35 scalability-junk UtahDave: alright perfect sounds like one thing I'm happy with :) Thanks
15:36 UtahDave back in a second.
15:36 scalability-junk now to the multitier stuff. forrest via api... any docs I can dig into so I can make a more specific question to you?
15:36 forrest http://docs.saltstack.com/ref/python-api.html
15:36 forrest check out the docs, if you can write python you can basically do anything
15:37 L2SHO luminous, in your smtpd script you have "the unless here sucks redo"  maybe you want to try unless: "[[ -d {{ smtpd_src }} ]]"
15:37 forrest the only thing I haven't been able to figure out how to do in an 'easy' way yet, is staggered restarts in a specific order
15:37 forrest so like, web1, then web2, web3, etc.
15:37 scalability-junk forrest batch size 1 ?
15:37 scalability-junk for all the web tiers?
15:37 scalability-junk or you mean via api?
15:37 forrest either way
15:37 forrest api I could do
15:38 forrest but it would still take a bit of work
15:38 forrest batch won't work for this scenario
15:38 quantumsummers|c joined #salt
15:38 quantumsummers|c joined #salt
15:38 forrest in the event I have a master server, then a bunch of slaves, the master HAS to restart first
15:38 forrest so the slaves can connect
15:39 scalability-junk forrest: stupid idea perhaps, but couldn't you have a filechange trigger restarts of the slaves?
15:40 scalability-junk say master restarts cause of the config change -> with that trigger it edits a pillar say slaves: restart
15:40 forrest scalability-junk, yea you could, I'd be a bit concerned about doing it that way, but it is possible.
15:40 scalability-junk the slaves have a watch on this pillar and then restart and reedit the pillar.
15:41 scalability-junk forrest: why the concern? seems actually quite awesome, as you can simple restart all slaves manually with a pillar change in the cvs...
15:41 forrest because that still doesn't ensure an ordered restart
15:41 scalability-junk forrest: it would wouldn't it?
15:42 forrest scalability-junk, how so? If all the slaves are watching for a file change, I'd have to write logic to manually connect to each machine and modify the file in some way
15:42 forrest Keep in mind this is for something like 300 servers of this type
15:43 matanya joined #salt
15:43 pkimber joined #salt
15:43 scalability-junk nope the file change is triggered by the master
15:43 carmony joined #salt
15:43 scalability-junk state which triggers master restart and file/pillar change
15:43 forrest hmm, yea that could work
15:43 scalability-junk on next state run the slaves see the file/pillar change and restart, perhaps even in batch
15:44 luminous L2SHO: you're probably right, this state is old and I haven't taken a look in a while. thanks for the follow up there :)
15:45 scalability-junk forrest: back to the multitier stuff. so how do you manage different mysql servers for example? via pillars and when a mysql server comes up it changes the pillar automaticly? sounds semiperfect
15:45 luminous scalability-junk: you could use peer.publish or events system too, I imagine
15:46 luminous there are usually a few ways to do something in salt, particularly the more advanced auto-scaling stuff
15:46 kmrhb joined #salt
15:47 scalability-junk luminous: how would you do it?
15:48 luminous me? I'd start with the docs and figure out how these pieces work, then apply that to the specifics of what I wanted to have happen
15:48 tomeff joined #salt
15:48 luminous I don't touch mysql anymore so I can't really speak to specifics, sorry
15:48 __Jahkeup__ joined #salt
15:49 scalability-junk luminous: it could be loadbalancers or anything else...
15:50 luminous it depends on what needs to be updated though.. if we're talking configs need to be updated, rather than running some command..
15:50 luminous I'd probably use events to trigger a salt state update
15:51 luminous but peer.publish would make sense there too
15:51 luminous ..so would the salt mine
15:51 scalability-junk forrest: take a look at the peer stuff that could be useful.
15:52 forrest scalability-junk, yea I've looked at that a bit before
15:52 scalability-junk forrest: the master could be allowed to trigger server.* on all slaves.*
15:52 luminous scalability-junk: but, in the end, you still need to cuddle up with the docs, make some attempts/hacks, and then come back here or to the mailing list
15:52 luminous that is the salt way :)
15:52 mgw joined #salt
15:52 forrest that's the key thing, it CAN'T trigger on all slaves, I need an ordered restart, followed by a confirmation that a service is back up and running, so it's a bit more work
15:53 Ryan_Lane joined #salt
15:53 luminous you can have modules and custom states do most anything you want
15:53 scalability-junk in ordered you mean batch sized stuff?
15:53 scalability-junk damn I hate things were you have 10k various ways to do things :D
15:53 forrest I don't want any batches
15:53 scalability-junk haha ok
15:53 forrest batches take a %
15:53 forrest I need an ordered %
15:54 forrest so restart web1, then restart web2, and so on
15:54 forrest if I run batch, it could restart web2, then web1, then web3
15:54 luminous overstate?
15:54 scalability-junk yeah batch 1
15:54 scalability-junk oh yeah true forrest now I get it
15:54 forrest yea overstate is an option luminous
15:54 scalability-junk not sure why web1 needs to be done first so
15:54 forrest I'm just using it as an example
15:54 scalability-junk ok
15:54 forrest lets just say that Oracle is involved.
15:55 forrest so clearly, it can't be easy or make sense :P
15:55 scalability-junk ohh I'm out :D
15:55 luminous hah
15:56 scalability-junk mhh multitier... I autoscaling would need some place to store the config... but that would change my pillars (when I use pillars for that) on the other end of my process...
15:57 forrest I guess what I could do is use overstate to group all the masters as a group
15:57 forrest then batch process from there.
15:57 luminous put pillars in db or mongo?
15:57 luminous forrest: yea, overstate can be nice for ordered stuff across daemons/hsots
15:57 luminous *hosts
15:58 forrest yea I was thinking about the clusters in the wrong fashion.
15:58 scalability-junk luminous: mhh probably dividing static data (manual checkins) and dynamic data (automaticly checked in) seems reasonable
15:59 scalability-junk so I could start with not cvs tracked dynamic pillars to manage these ip/hostname dependecies... mhhh when I think about it. wouldn't it be possible to use grains?
15:59 luminous use grains for stuff that won't change
15:59 scalability-junk ip of all webserver grains and then loop trough them in the load balancer config?
15:59 luminous grains are set once per service start
15:59 luminous grains are also available to all minions, in some way (I forget details there)
16:00 luminous pillar gets stuff you want private and/or that is dynamic
16:00 luminous I put everything in pillar at this point
16:00 whit joined #salt
16:00 scalability-junk luminous: me too.
16:00 luminous and using git for pillar can be sensible
16:00 luminous or whatever vcs
16:00 scalability-junk yeah all my "static" data is tracked with git.
16:00 luminous I am moving more towards web uis with stuff like pillar in db
16:01 scalability-junk but tracking these dynamic ip/dns changes within git would spam it ...
16:01 luminous yea, if it is changing too often, it doesn't make sense
16:01 luminous vcs for pillar makes sense when a human is changing the details
16:01 scalability-junk luminous: db no vcs :(
16:01 luminous redis >> file?
16:01 kstaken joined #salt
16:01 scalability-junk luminous: ^^
16:01 luminous ?
16:02 forrest no vcs??
16:02 luminous not sure I follow
16:02 scalability-junk luminous: how do you store the pillars in redis?
16:02 scalability-junk one value being a whole pillar.sls or more chunked?
16:03 luminous scalability-junk: I don't, just tossing out thoughts
16:03 luminous you said db no vcs, which I didn't understand
16:03 luminous one key per minion maybe?
16:03 luminous if stored in redis
16:03 luminous or you could do one key per pillar key, and have some way to track what keys apply to a minion
16:04 luminous I don't know of a salt pillar backend for redis
16:04 scalability-junk luminous: mhh I would probably go for webui -> db <-> pillar files ...
16:04 luminous yea
16:04 luminous check out halite
16:04 scalability-junk how does halite :D
16:04 scalability-junk do it ^^
16:04 luminous or wait another month or so and I'll have something to share
16:05 scalability-junk luminous: why not build upon halite?
16:05 luminous I don't know/think halite does
16:05 carmony joined #salt
16:05 luminous scalability-junk: I designed something based on django, to do a lot more than halite, and halite was announced when we finished the majority of our project
16:06 luminous our stuff is mostly backend stuff anyway, we will likely put something like halite on top
16:06 luminous right now we're using django admin for minion control
16:06 scalability-junk hehe alright
16:06 scalability-junk but you have the data in files still?
16:06 luminous I wanted to tie together salt + salt-cloud + roles and other tsutff
16:06 luminous states are in git, pillar all in db
16:07 luminous but this was our first pass
16:07 luminous it'll be updated, but we needed to have something workable in weeks not years
16:07 scalability-junk ok django is able to change states via file changes I assume and db yeah selfexplanarory
16:07 scalability-junk *self explanatory
16:07 troyready joined #salt
16:07 luminous well, states are mapped to hosts through roles, which are all in pillar
16:08 scalability-junk ok so states are prebuilt sort of and only the mapping + data is done via django
16:08 luminous yep
16:09 luminous and then all the salt-cloud config is in django
16:09 luminous and requesting new minions
16:09 scalability-junk cool I love to see it some time.
16:09 scalability-junk even libvirt support?
16:09 luminous it'll be available as opensource sometime soon
16:09 KyleG joined #salt
16:09 KyleG joined #salt
16:09 luminous it uses salt-cloud
16:09 stevetodd joined #salt
16:10 baniir joined #salt
16:10 luminous so nothing directly, only through salt-cloud
16:10 scalability-junk ok
16:10 luminous we'll take pull requests ;)
16:10 scalability-junk we'll see how it compares to halite ^^
16:10 luminous oh salt-api is in there too
16:10 luminous halite is <just> a front end to salt-api
16:10 scalability-junk luminous: sometimes I do PR ;) --> http://sprint.saltstack.com/scoreboard/
16:11 mgw joined #salt
16:11 luminous this is not really a frontend so much as a bridge between salt, salt-cloud, salt-api, and some other needs of ours
16:11 scalability-junk luminous: yeah which is a minimal version of the features you have ;)
16:11 scalability-junk luminous: kk
16:11 luminous it needs a frontend, actually
16:11 mephx joined #salt
16:12 forrest if you can use twitter bootstrap luminous
16:12 forrest really extensible
16:12 forrest been using it for a few internal items here and it's been great.
16:12 scalability-junk forrest there is something better ;)
16:12 JasonSwindle joined #salt
16:12 forrest oh?
16:12 scalability-junk http://todc.github.io/todc-bootstrap/
16:12 scalability-junk funny when your internal tools look like the internal google dashboards :D
16:13 scalability-junk or at least similar
16:13 rfgarcia joined #salt
16:13 forrest so twitter bootstrap but it phones home to google? :P
16:13 luminous haha
16:13 luminous yay, more surviedllance! just what everyone needs
16:13 scalability-junk forrest: nope it was just modified to include the new google style ;)
16:14 forrest Are there details on that style?
16:14 forrest the examples look identical
16:14 luminous I also don't think of google as a lover of green..
16:14 luminous maybe red or blue..
16:15 scalability-junk forrest it's mostly minimal tweaks to look like google buttons and so on
16:15 forrest ahh
16:15 luminous not sure how that is better then
16:15 luminous other than being an alternative style/theme
16:15 scalability-junk we have some internal hackerspace tools using it, cause one of our members is a googlefanboy
16:16 scalability-junk more fun than usefullness :)
16:16 scalability-junk luminous: it's not better just an alternative style, you got that right :D
16:16 mikedawson joined #salt
16:18 luminous forrest: but yea, we are using bootstrap. I don't think that helps in the way that halite would/could though, as there is a lot to do in terms of managing minion/returner data
16:19 forrest I agree, halite is still pretty new
16:19 forrest lots of work to be done on it
16:19 carmony joined #salt
16:19 luminous the devs that hacked out this app are more of backend folks, we left the UI to be done later
16:19 scalability-junk anyway gotta restart studying now, great talking to you two.
16:19 forrest but I'd love to have a nice front end I could hand off to enable people
16:19 forrest later
16:19 * luminous will have an option to share early fall
16:20 rfgarcia_ joined #salt
16:20 * scalability-junk just realized that pillar data doesn't have to be split into "private" git repo and "public" git repo... I could just use git gcrypt and one pillar repo per project o/
16:21 scalability-junk anyway ... studying :(
16:21 luminous oooo, I'll have to look at that, but yea, would you still trust github?
16:22 luminous or are you using private git repos internally?
16:22 scalability-junk gitlab ;)
16:22 luminous forrest: the initial concept for this app was to have a Command & Control host for managing multiple salt'd, holonic networks
16:22 luminous nice :)
16:22 forrest luminous, ahh ok
16:23 aat joined #salt
16:23 scalability-junk luminous: we even mirror dependecies into your gitlab instance to don't rely on external git hosting.
16:24 luminous but, because we're talking holonics, it can be used for simpler salt masters down the tree
16:24 scalability-junk wordpress and plugins for example are mirrored from svn into gitlabdomain.tld/external/*
16:24 luminous nice
16:24 fxhp https://github.com/mitchellh/vagrant/issues/2047
16:24 scalability-junk and so are libs and so forth
16:24 luminous yea, we have a similar setup for git, pip, dpkg, etc
16:24 fxhp lucid base box has invalid record in /etc/hosts which causes states to function wrong
16:24 luminous NICE
16:25 scalability-junk luminous: I have to admit pip, dpkg is not yet mirrored. but we are looking into that. dpkg is mirrored in the datacenter so that is mostly alright.
16:25 scalability-junk pip another thing to look at.
16:26 scalability-junk but I do trust pip reliability more than I do trust different git and svn providers being up all at the same time :)
16:26 ksalman how would I watch a directory created via svn checkout?
16:26 luminous scalability-junk: we're putting everything on the salt master, rsync'd from a central location on master deploy/bootstrap
16:26 ksalman I tried this but it didn't work  https://gist.github.com/anonymous/6212499#file-gistfile1-txt
16:26 luminous pip is rather terrible wrt uptime too, as I've seen
16:26 ksalman i was hoping it'd restart the service if a file in the directory were to change
16:27 scalability-junk luminous: it was yeah, but it is now behind a cdn, which holds packages till the backend is up again ;)
16:27 scalability-junk therefore you mostly would have old packages, but no real downtimes anymore.
16:28 scalability-junk luminous: do you then copy packages etc. via packagemanagers to the minions or from the master with file.recursive or such?
16:28 UtahDave ksalman: That looks like it should work.  Can you test watching a simpler example? Such as without the extend?
16:31 luminous scalability-junk: i forget with dpkg, but I believe masters are included in apt
16:32 luminous just like pip/etc
16:32 luminous we need to do things like maven and gems still
16:32 scalability-junk ah ok so the master is pip, apt provider, which is seeded via a central location...
16:32 scalability-junk seems to be alright.
16:33 carmony joined #salt
16:33 luminous yep, and the 'central location' isn't 'central'
16:33 luminous but a set of rsync mirrors
16:33 luminous :)
16:34 scalability-junk which get feeded by pip... itself?
16:34 luminous yea
16:34 luminous based on what we want/need
16:34 scalability-junk nice
16:34 luminous so we don't grab everything
16:34 luminous only what matters
16:34 luminous I'm not sure about updating "what matters"
16:34 whit joined #salt
16:35 scalability-junk yeah wouldn't be horrible to mirror the whole wordpress plugin directory for example 27k plugins... with history ohhh same with pip and so on
16:35 Lue_4911 joined #salt
16:35 luminous depends on what you have for bandwidth and what you want to spend it on
16:35 KennethWilke joined #salt
16:37 SEJeff_work luminous, You know that squid will cache those things and work about equally as well, right?
16:37 SEJeff_work with a bit less setup
16:38 scalability-junk SEJeff_work: yeah I will probably go with varnish in each dc for caching not changed stuff or providing fallbacks...
16:39 scalability-junk SEJeff_work: still looking into the ability to cache git requests for libs etc. seems not really doable with ssh keys etc.
16:39 luminous SEJeff_work: in terms of replacing the 'central' rsync archives? or for each of the salt'd networks pulling from master/source/etc
16:40 luminous random question: are there any simple/noop templates/recipes we should look to when writing custom modules/states/etc?
16:40 * luminous is using states/file.py at the moment..
16:41 carmony joined #salt
16:45 druonysus joined #salt
16:45 SEJeff_work scalability-junk, You can't "cache" ssh connections
16:45 SEJeff_work doesn't work that way at all
16:45 SEJeff_work However you could change the git checkouts to use http/https
16:45 SEJeff_work then you could cache using squid
16:46 SEJeff_work or varnish if thats what you prefer
16:47 danielbachhuber joined #salt
16:47 UtahDave joined #salt
16:48 scalability-junk SEJeff_work: yeah that's the issue I'm having, cause ssh enables better access control control. but http/https would be easier to cache
16:48 SEJeff_work scalability-junk, You can use gitolite with both fyi
16:49 SEJeff_work You can do per-branch level access
16:49 __Jahkeup__ joined #salt
16:49 scalability-junk I'm using gitlab the issue is more that gitlab http is user/pw enabled, which I don't want.
16:49 SEJeff_work Ah gotcha
16:49 scalability-junk I like the read only deploy keys.
16:49 SEJeff_work sure
16:50 scalability-junk http would mostly be writable too
16:50 abe_music joined #salt
16:52 carmony joined #salt
16:53 jkleckner joined #salt
16:54 berto- joined #salt
16:54 it_dude joined #salt
16:57 luminous scalability-junk: what about putting git on the masters, and pulling from time to time, then using rsync on your local salt'd networks?
16:58 luminous so you have one/two hosts per dc/network that syncs git, then the minions sync to the master
16:59 KennethWilke joined #salt
17:00 scalability-junk luminous: mhh that would disallow salt runs without master and would mirror git repos in total to the master...
17:01 scalability-junk but that's something I will consider when my git instance dies due to load :)
17:02 scalability-junk the fast fix would be varnish/squid and http cloning.
17:02 jacksontj joined #salt
17:05 carmony joined #salt
17:11 L2SHO does salt have any way to manage a named pipe?
17:16 ezraw I'm trying out salt for the first time today after seeing a presentation this weekend at FOSSCON. When I run salt '*' state.highstate , no error is returned, but it's also not doing what I expect (updating a config file). I tried adding "-l debug" but salt says "no such option." How do I debug the issue?
17:16 scalability-junk SEJeff_work: additionally when using http for git it's a less efficient method in terms of bandwidth... but that is probably the less annoying part when your git server is overloaded :D
17:17 carmony joined #salt
17:20 defunctzombie joined #salt
17:24 KennethWilke joined #salt
17:26 druonysuse joined #salt
17:28 Katafalkas joined #salt
17:30 ml_1 joined #salt
17:30 alekibango joined #salt
17:32 UtahDave ezraw: can you pastebin your top.sls and the sls file you're testing?
17:32 carmony joined #salt
17:33 ksalman is it possible to group multiple  file.symlink instances and have one require? instead of individual file.symlink and have the same require for all of them?
17:34 Katafalkas joined #salt
17:34 bhosmer joined #salt
17:35 jheise anyone have experience in dealing with require requisites for custom states
17:35 zonk1024 joined #salt
17:36 auser joined #salt
17:36 auser hey all
17:36 StDiluted hey auser
17:36 auser how goes StDiluted
17:36 StDiluted goes ok!
17:38 carmony joined #salt
17:38 StDiluted about to order a wiring harness for my old jeep
17:40 UtahDave ksalman: yes, can you pastebin what you have so far?
17:41 matthewt1 joined #salt
17:42 auser oh fancy
17:42 matthewt1 I'm new to salt and have an SLS file that I'm trying to use to run a bash script, but I keep getting a weird error when applying it to a minion:  Failed to set supplemental groups to [80, 29, 1, 2, 5, 9, 8, 20, 3, 4, 1, 2, 3, 4, 5, 8, 9, 20, 29, 80]. Error: [Errno 22] Invalid argument
17:42 matthewt1 Anyone got an idea on how to fix it?
17:43 ksalman UtahDave: this is what i have https://gist.github.com/anonymous/6213197. I was wondering if i can have one require for all those symlinks
17:44 JasonSwindle joined #salt
17:45 matthewt1 This is the debug for the minion: http://pastebin.com/92RQFtkb
17:46 matthewt1 For the master when I run state.highstate: http://pastebin.com/hS6TbDng
17:49 carmony joined #salt
17:50 nineteeneightd joined #salt
17:54 L2SHO matthewt1, I don't think cmd.run can take a source
17:54 L2SHO I think you want cmd.script
17:54 hwang251 joined #salt
17:54 carmony joined #salt
17:54 hwang251 Hi, I was wondering if templates can be used in top.sls?
17:55 nineteeneightd joined #salt
17:55 UtahDave ksalman: Hm. I don't think that's possible, actually, since you have to have a target as well.
17:56 UtahDave ksalman: I was thinking you could use the  - names:  option, but that doesn't allow for the target
17:56 alexandrel joined #salt
17:56 ksalman oh i see, okay
17:57 matthewt1 L2SH0: I'm getting the same error doing cmd.script
17:57 alexandrel I'm looking for an example of a "pure python" file.managed template.
17:57 alexandrel also: salt is fucking awesome. (it had to be said)
17:58 L2SHO matthewt1, can you pastebin it again?  Previously your sls was execuring 'munki':   [INFO    ] Executing command 'munki' as user 'root' in directory '/var/root'
17:58 oz_akan_ joined #salt
17:59 matthewt1 Yeah, this is the sls file: http://pastebin.com/W0Ega8g0
18:00 matthewt1 Right now munkiInstall.sh is literally echo "test"
18:00 L2SHO and can you paste that debug output again?
18:01 Gifflen_ joined #salt
18:01 matthewt1 Sure, 1 sec
18:02 jacksontj joined #salt
18:02 matthewt1 debug is http://pastebin.com/emmrQc08
18:03 matthewt1 I thought the issue was the unless line, so I commeneted that out
18:03 carmony joined #salt
18:04 flepied joined #salt
18:04 L2SHO matthewt1, look at lines 21-22, it appears to be downloading and running the script
18:05 Kraln joined #salt
18:05 Kraln Hi salt guys and gals; I was curious; is there a limit to using salt without a support license?
18:06 jheise whats the correct way to handle multiple requires from the same module, like if i need both a file and symlink to exist before another state can be resolved
18:06 L2SHO matthewt1, did you still get that group message?
18:06 matthewt1 It looks like that, but its not actually running it
18:06 racooper Kraln,  https://github.com/saltstack/salt/blob/develop/LICENSE
18:07 Kraln racooper: yeah, that tells me that it's APL2; doesn't tell me if there are limits or anything
18:07 racooper did you read the APL2?
18:07 matthewt1 http://pastebin.com/i4TiXrYL is what I'm getting when running highstate
18:08 Kraln I am familiar with the concept of the apache license.
18:08 alexandrel Kraln: essentially, I think racooper is saying: no, there isn't a limit.
18:09 Kraln thanks; certainly makes it easier to grasp than puppet/chef/crapware
18:09 alexandrel Kraln: yeah!
18:10 Kraln the 'contact sales' button for enterprise support pricing  is a bit concerning though
18:10 alexandrel Kraln: and it's not written in fucking ruby.
18:10 Kraln doesn't fit into my decision matrix :)
18:10 Kraln oh man, fucking ruby.
18:10 Kraln could be worse; could be perl
18:10 alexandrel naw, perl would be better than ruby imho.
18:11 Kraln perl written by the same people that are instead writing ruby? or ideomatic perl?
18:11 L2SHO matthewt1, I dunno, I'm stumped
18:11 racooper yeh the saltstack.com site doesn't really do a good job clarifying that the github is also the install source.
18:11 Kraln well, I mean, I have a budget. I am evaluating options
18:12 Kraln 'contact us' doesn't really help me, and neither does 'standard/premium' when talking about expertise and support
18:12 matthewt1 L2SHO: its cool, I'll keep playing around! Not sure what it could be, the weird "failed to set supplemtnal grous" issue is really confusing me
18:12 scalability-junk racooper: the saltstack.com homepage is actually too much marketing stuff and not really explaining any concepts...
18:12 racooper yes...even the community page is lacking
18:12 racooper and I really think saltstack.org should have its own site
18:13 L2SHO matthewt1, I saw something similar to that once when my yaml was messed up, but it doesn't look like yours is.
18:13 scalability-junk racooper: I think it needs more actual content even if it's a subpage of .com
18:13 matthewt1 L2SH0: Yeah, I spent a while fixing the tabs and stuff to see if that was the issue
18:13 Kraln to whom do I write the "I want to give your project time and money, but you make it so, so hard" email to?
18:13 racooper granted.  but maybe .org should point to github
18:14 L2SHO matthewt1, you shouldn't be using tabs at all.  http://docs.saltstack.com/topics/troubleshooting/yaml_idiosyncrasies.html
18:15 matthewt1 I made sublime use 2 spaces instead of tab when I use tab in .sls files
18:15 matthewt1 FIGURED IT OUT - had to change the user to an admin account
18:15 matthewt1 apparantly using root doesn't work on OSX
18:16 L2SHO nice
18:17 MK_FG joined #salt
18:18 matthewt1 Thanks for the help! Weird that root didn't work, but whatevs
18:19 alexandrel Does anyone has an example of a pure python file.managed template? I can't seem to access the pillars from my code. :/
18:20 alexandrel just 2-3 lines, I willing to paypal tip 1-2 pizzas, to anyone with information.
18:21 dthom91 joined #salt
18:22 abe_music joined #salt
18:25 dthom91 joined #salt
18:25 Ahlee pure python as in not jinja?
18:26 Ahlee scrolling back to see if i can help
18:27 jheise anyone know how to handle creating a state that will use multiple declarations of the same type
18:27 carmony joined #salt
18:27 alexandrel yup, I need pure python code in the template, and jinja dosen't allow that.
18:28 Ahlee i'm lazy, so i'd do file.managed and then a sed against the managed file
18:35 Nick__ joined #salt
18:37 Nick__ Hi All! Can anyone tell me when salt 0.16.3 is going to make it to the Ubuntu PPA?
18:38 zooz joined #salt
18:43 qba73 joined #salt
18:43 matthewt1 Okay, so I was wrong. I can change it to an admin, but the commands my script run aren't actually running as root then - but when I tell the init.sls to use the root account I get the weird errors again
18:44 kmrhb joined #salt
18:45 Xeago joined #salt
18:45 whit joined #salt
18:47 matthewt1 http://pastebin.com/xVCZP3pH works but any comand in munkiInstall.sh that needs to be run as root doesn't work, but when I try http://pastebin.com/ddNuJXrV I get these errors: http://pastebin.com/XwLr7Bzj
18:48 ezraw UtahDave: thanks I figured it out. Turned on debugging on the minion
18:49 austin987 joined #salt
18:49 kmrhb joined #salt
18:51 jslatts joined #salt
18:53 jacksontj joined #salt
18:55 mechanicalduck joined #salt
18:56 UtahDave Kraln: Hey, I'm a SaltStack employee. I can help you
18:56 Kraln Okay. Do I first need a support contract ;)
18:56 Corey Good lord no. They're not Oracle. :-D
18:57 Kraln I asked if I need a support contract, not a per-socket license :P
18:58 Kraln UtahDave: shall I assault you via private message, email, or <other>?
18:58 luminous how do you access pillar data from within a custom state?  __salt__['pillar.get'](key) ?
18:58 UtahDave luminous: yes.
18:58 luminous woot
18:59 UtahDave Kraln: A support contract is not necessary to use Salt. All our code is on github under an Apache 2.0 license.
18:59 jesusaurus Kraln: what are the hurdles in your way to contributing?
18:59 jesusaurus what would you like to see changed to make it easier?
19:00 Kraln jesusaurus: I am putting together a decision matrix with regards to which config management/automation tool to use
19:00 * jesusaurus is NOT a saltstack employee
19:00 qba73 left #salt
19:00 Kraln 'contact sales' doesnt fit nicely in a box
19:00 Kraln and the usage without a support contract wasn't really explicitly stated anywhere
19:00 luminous second question: where's the user.get() come from in: https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L8
19:01 luminous Kraln: opensource implies what you can use
19:01 luminous no?
19:01 Kraln luminous: open source does not mean free to use.
19:02 luminous for what is open sourced, how not?
19:02 hazzadous joined #salt
19:02 luminous sure, if you have an 'enterprise' release or version with extra dodads, that's different
19:02 luminous but that is not open source
19:02 jesusaurus Kraln: salt is apache2 licensed, so it is free to use
19:03 Kraln yeah, sometimes that's the case, sometimes there's pieces or major functionality tied behind other licenses, etc.
19:03 scalability-junk yeah but mostly production ready doesn't equal free
19:04 Kraln sometimes there's "open source but put in this key or we'll monitor you and put ads everywhere" etc
19:04 luminous Kraln: you have the license in github, so that question should be cleari
19:04 luminous Kraln: sounds like you use windows
19:04 Gifflen joined #salt
19:04 Kraln one sentence on the website would prevent me having to dig through the github repo
19:04 scalability-junk but that said Kraln salt is not opencore, or similar, but truely opensource. But I would assume for larger deploys or specific implementations (custom stuff) support contracts should be purchased...
19:04 UtahDave Kraln: We do provide Enterprise Licenses. We backport bug and security fixes to our enterprise releases for 12 to 18 months
19:04 Kraln luminous: wow, really? really?
19:04 luminous Kraln: you would be correct RE the website
19:04 Kraln nevermind what you think, I'm just some windows luser.
19:05 Kraln UtahDave: can I inquire as to pricing for those?
19:05 UtahDave Kraln: yeah, can I PM you?
19:05 scalability-junk Kraln: don't be offended. not the whole community is unfriendly like luminous :D
19:05 luminous Kraln: not at all implied
19:05 matthewt1 IS there a way to manage a single line in a file w/ saltstack?
19:05 luminous Kraln: it's cool, no need to get upset :)
19:05 __Jahkeup__ joined #salt
19:05 Kraln UtahDave: absolutely
19:05 matthewt1 I want to make sure that one user is in the sudoers file
19:06 UtahDave matthewt1: look at file.sed
19:06 renoirb Just a headsup about Multiple machine example, I created this gist: https://gist.github.com/renoirb/6213834
19:06 matthewt1 thanks!
19:06 luminous scalability-junk: not unfriendly, simply pointing out open source isn't full of ads
19:06 renoirb Might be useful for the complete example sample.
19:06 dthom91 joined #salt
19:06 luminous but apologies if taken as unfriendly, certainly not my intention
19:06 UtahDave renoirb: That's awesome!  thanks!
19:06 renoirb StDiluted: I finished my workspace to use multiple machine: https://gist.github.com/renoirb/6213834
19:06 scalability-junk luminous: but you have to admit, that due to puppet, chef and ansible the idea of opensource is mostly directed into opencore...
19:07 Ahlee KeyError: 'pkg.list_pkgs'
19:07 scalability-junk and a lot of others... owncloud, soon gitlab etc.
19:07 luminous scalability-junk: I haven't seen a figure on the number of open source projects, but I would imagine this topic is more dependent on what one is exposed to
19:08 baniir joined #salt
19:09 dthom91 joined #salt
19:09 StDiluted renoirb: awesome! I'll check it out!
19:09 renoirb :)
19:10 bhosmer joined #salt
19:11 baniir joined #salt
19:15 __Jahkeup__ is it practical to have a specific pillar for each host?
19:15 scalability-junk luminous: true
19:17 StDiluted jahkeup: I use an external pillar to return specific values for certain hosts based on their grains
19:17 jMyles joined #salt
19:17 carmony joined #salt
19:17 jMyles If I want to use cmd.run (or cmd.call) to run a python script (or invoke a python function), can it run in the background?
19:18 __Jahkeup__ StDiluted: so based off of either statically set grains or the builtin ones you return that via a curl(post)+REST service?
19:18 StDiluted jahkeup: I wrote a custom grain that returns tags from Amazon, and it decides based on those.
19:19 __Jahkeup__ StDiluted: gotcha. So in reality the flat file structure for a per-host configuration isn't gonna be that manageable
19:19 UtahDave __Jahkeup__: it depends on how many hosts you have!  :)   If it gets unwieldy, you might consider using an external pillar to get the info from a database or something
19:20 __Jahkeup__ UtahDave: I had a feeling that it would be dependent on the amount.
19:20 StDiluted jahkeup: seems like it might get kinda large eventually but I am using roles + environment to decide on things, so I don't have to do per-host
19:20 StDiluted but if you;re only looking at 20 or so it wouldnt be too bad
19:20 StDiluted I want the ability to have a machine come up and highstate and be configured without needing to add anything to the configs
19:20 __Jahkeup__ StDiluted: unfortunately things for me aren't as homogenous as I would like for my setup, but its starting small :)
19:21 __Jahkeup__ StDiluted: that makes sense. I was curious as I was pondering the power of salt ;)
19:21 StDiluted so i can launch an instance that is role: webserver and environment: production, and it will come up and cofigure itself
19:21 StDiluted and set off a script to add it to the load balancer
19:22 __Jahkeup__ that's a pretty sweet setup!
19:22 StDiluted almost there
19:22 StDiluted left #salt
19:23 StDiluted joined #salt
19:23 __Jahkeup__ I'll have to look into external pillars as my number of hosts grows :)
19:24 StDiluted it's pretty simple, all you do is return your key: value pairs out of a function
19:24 StDiluted it can be as simple or difficult as you want
19:27 scalability-junk StDiluted: why write a custom script? couldn't you use default pillars which use grains to determine their values? (out of curiosity?)
19:28 oz_akan_ joined #salt
19:28 StDiluted well, I had a couple choices. I could have used the pydsl and done it in templates, but I decided to do it externally.
19:29 StDiluted The jinja 'if' mechanism is not sufficient, because I have 2 or 3 conditions
19:29 scalability-junk StDiluted: so you have no pillar files at all? just the external script + database?
19:29 StDiluted just an external script, actually. It's not in a DB right now. Not enough stuff to want to do that.
19:30 kamal_ Is there a way to list all connected minions?
19:30 StDiluted but I do have pillar files that call the external pillar
19:30 UtahDave scalability-junk: creating an external pillar is pretty awesome and very powerful.
19:30 UtahDave kamal_: salt \* test.ping
19:30 kamal_ Other than that :p
19:31 matanya joined #salt
19:31 UtahDave :)
19:31 kamal_ It takes a relatively long time if some of the minions are not connected
19:31 StDiluted so like… maildomain: ext_pillar['external_pillar_name']['maildomain']
19:31 UtahDave salt-run manage.up
19:31 scalability-junk not sure if I need the external pillar except for service discovery, which in turn could also be done via dns...
19:31 StDiluted and that makes sure that the maildomain value is set for whatever external_pillar_name.py decides
19:31 StDiluted for each minion
19:32 StDiluted and each minion could have a different value
19:32 kamal_ sweet
19:32 kamal_ thanks UtahDave
19:32 UtahDave you're welcome, kamal_!
19:32 scalability-junk StDiluted: sounds indead powerful. so I could easily start with pillar files and maybe use a custom pillar later.
19:34 StDiluted sure, but a custom pillar is so simple to write
19:34 carmony joined #salt
19:34 scalability-junk StDiluted: but I wouldn't know what to use it for actually. most of the stuff can be set in per project pillars and checked into cvs
19:35 StDiluted just dump values in via  pillar['whatever'] = 'thing1' and return pillar
19:35 StDiluted sure, you can do it that way too
19:35 jacksontj joined #salt
19:35 StDiluted in my case, the external pillar is not in git, because it has sensitive info in it
19:35 scalability-junk StDiluted: mine will too that's were git gcrypt or private repos come in
19:36 StDiluted yep
19:36 scalability-junk but the external pillar stuff sounds good for my autodiscovery issue
19:38 ksalman is it possible to copy a file from salt master but not manage it?
19:38 ksalman something like file.unmanaged? :P
19:38 Ahlee Issues with pkg, rhel6 system, collectl installs fine on host with yum install collectl, yet after removing it and trying to do same with salt: http://pastebin.com/Wjd5C8iH
19:39 UtahDave ksalman: in a state, you can just use file.managed, or file.recurse for a directory.
19:39 UtahDave ksalman: if it's a one-off copy from the master cli, you can use the cp module
19:39 luminous do you need to sync custom states like with modules?
19:39 ksalman UtahDave: thanks, i guess i am looking for a cp module then
19:39 UtahDave luminous: yes.
19:39 ksalman actually no
19:40 ksalman it's in a state
19:40 cbier joined #salt
19:40 alexandrel Anyone knows how can I access pillar data from a file.managed py template file?
19:40 alexandrel (if it's even possible?)
19:40 UtahDave aleszoulek: {{ salt['pillar.get']('myvalue', 'default-value') }}
19:41 UtahDave oops, that was for alexandrel
19:41 luminous UtahDave: ty!
19:41 ksalman I'd like to source a file from the master in a state. But I don't want the master change the file contents on consecutive runs
19:41 ksalman so a user can mange it himself, for example
19:42 cbier hi all :)
19:42 cbier I am trying to install firefox with yum using saltstack, but when it prompts for user input i get this:
19:42 cbier Is this ok [y/N]: Exiting on user Command
19:43 cbier and the install fails
19:43 UtahDave ksalman: in your file.managed use the - replace: False    option
19:43 ksalman ahhh!
19:43 ksalman UtahDave: thanks
19:43 UtahDave ksalman: you're welcome!
19:43 UtahDave cbier: how are you doing the install?
19:44 cbier UtahDave: Hi Dave,installfirefox:
19:44 cbier cmd.run:
19:44 cbier - name: yum install firefox
19:44 UtahDave cbier: Ah.  try this:
19:44 alexandrel UtahDave: nice! it worked. Thanks :)
19:44 UtahDave firefox:
19:44 UtahDave pkg.installed
19:44 UtahDave alexandrel: great!
19:45 UtahDave just a sec. I have to reboot
19:45 UtahDave joined #salt
19:45 [diecast] joined #salt
19:46 luminous where did saltstack pick up the convention of using /srv/ for hosting states/pillar/etc?
19:46 cbier UtahDave: Thanks man, trying that now :)
19:46 luminous is this a thing from one of the specific linux distros?
19:47 scalability-junk luminous: perhaps from srv records in dns?
19:47 UtahDave luminous: uh, yeah, I think so.  It's been that way from the very start.  You can change the location if you wish.
19:47 Ahlee I'd wager from http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/srv.html
19:48 jcristau luminous: http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM
19:49 luminous UtahDave: yea, actually overriding that was one of the very first things I did with salt :) I put configs in /etc and hosted stuff in /var, but I'm from the BSD world so we're weird.. I was more curious how that was chosent
19:49 luminous does apache now put stuff in /srv too?
19:49 Ahlee shouldn't that have gone in /usr/local/etc then? ;)
19:50 luminous Ahlee: that's freebsd, they're really weird
19:50 luminous :P
19:50 Ahlee hehe
19:50 Ahlee no argument there.
19:50 UtahDave :)
19:50 UtahDave Yeah, I think Ahlee is correct.
19:51 luminous that makes sense
19:51 luminous have I missed ubuntu/debian using /srv by default for this stuff then?
19:52 luminous to my knowledge, apache/nginx (for example) still go to /var/www and /var/nginx respectively
19:52 UtahDave luminous: I don't think you've missed anything.
19:52 luminous ok :P
19:53 UtahDave luminous: Since Salt has to work with so many different operating systems using /srv/salt  makes it somewhat easy to standardize on.
19:53 luminous oh, I have one I think I did miss!
19:53 luminous sure, that makes sense
19:53 luminous where's the user.get() come from in: https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L8
19:53 logix812 joined #salt
19:54 Ahlee luminous: nah, most distros ignore srv
19:54 UtahDave luminous: I think user is a python dictionary there.   using   .get() on a python dictionary returns None if the key doesn't exist, instead of giving a stacktrace
19:55 luminous Ahlee: so that is part of why I don't understand why it's seen as more portable or a better choice.. but this is getting nitpicky :P
19:55 Ahlee *shrug* the great debate rages on
19:55 baniir joined #salt
19:55 jacksontj joined #salt
19:55 luminous hah
19:56 luminous UtahDave: ok, so if you retrieve a dictionary from pillar, you can then issue a dict.get() for keys in that dictionary?
19:56 luminous if using jinja, I guess?
19:56 UtahDave luminous: Yes
19:56 david_a joined #salt
19:57 luminous sweet, formulas are going to get newbs asking a lot of questions, as a lot of these examples are way outside the docs
19:57 Ahlee UtahDave: thoughts? http://pastebin.com/3rjGVP7z
19:58 scalability-junk luminous: and no best practices are there ;)
19:59 luminous where?
19:59 luminous salt-formulas?
19:59 UtahDave Ahlee: does  'pkg.list_pkgs' work on that minion?
20:00 UtahDave Ahlee: also, you might need to put single quotes around  versions_as_list=True
20:00 Ahlee UtahDave: no
20:01 Ahlee UtahDave:     "pkg.list_pkgs" is not available.
20:01 Ahlee running salt minion pkg.list_pkgs
20:01 UtahDave Ahlee: what OS?
20:01 Ahlee cent6
20:02 UtahDave Ahlee: Hm.  has the pkg provider worked in the past on this machine?
20:02 luminous scalability-junk: how do you mean, I'm not sure I follow..
20:02 Ahlee UtahDave: I don't know, we're just getting into states
20:02 cbier joined #salt
20:02 Ahlee been using salt entirely as an RPC method
20:02 UtahDave gotcha.
20:03 UtahDave OK, how did you install Salt on that server?
20:03 scalability-junk that there are no real best practices to create the states yet and therefore various ways are used within these public states
20:03 luminous oh, yea.
20:03 Ahlee UtahDave: local mirror off pypi
20:03 UtahDave scalability-junk: that will get sorted out. This is all very new.
20:03 UtahDave Ahlee: what version of Salt?
20:04 Ahlee virtual environment of python 2.7.3, salt versions
20:04 luminous scalability-junk: as long those modules remain operable together.. we'll be better off than pupppet
20:04 matthewt1 Does salt.states.user work on OSX ?
20:04 [diecast] joined #salt
20:04 Ahlee this minion is 0.15.3, apparently
20:05 Ahlee guess we go up to 0.16 after this meeting and try again (master is 0.16.0)
20:05 UtahDave matthewt1: yeah, it should work.
20:05 UtahDave Ahlee: Yeah, we need to figure out why Salt doesn't know what package provider to use.
20:06 matthewt1 UtahDave: I'm getting http://pastebin.com/BUiD0gqA from the example code @ http://docs.saltstack.com/ref/states/all/salt.states.user.html
20:06 UtahDave if you run the salt-minion in the foreground in debug mode it might tell you what's going on.
20:06 UtahDave matthewt1: what version of Salt?
20:07 UtahDave matthewt1: and can you pastebin your sls file?
20:07 matthewt1 The minion is 0.16.3
20:07 matthewt1 http://docs.saltstack.com/ref/states/all/salt.states.user.html is literally my sls, I just copied it from there
20:07 saurabhs joined #salt
20:08 aat joined #salt
20:09 UtahDave matthewt1: Hm. do those groups exist on your system?
20:09 scalability-junk luminous: if ;)
20:09 matthewt1 The games and storage groups don't, but removing them from the SLS doesn't matter - the error still persists
20:09 matthewt1 http://pastebin.com/VCDKGmxh is what we want ideally, but it gets that same python error
20:10 jslatts joined #salt
20:10 UtahDave matthewt1: OK, that sounds like a bug.  Would you mind opening an issue on github for that?
20:10 luminous scalability-junk: :p
20:11 matthewt1 In saltstack/salt ?
20:11 UtahDave yep!
20:12 pdayton joined #salt
20:13 giantlock joined #salt
20:14 zloidemon joined #salt
20:14 zloidemon Hello
20:14 JasonSwindle UtahDave:  Is there release notes for 0.16.3? :)
20:15 zloidemon UtahDave: hi, how can add path with my libs for external pillar?
20:15 JasonSwindle Yep, found it http://docs.saltstack.com/topics/releases/0.16.3.html
20:16 UtahDave zloidemon: are they on your system path?
20:16 ksalman so i am trying to use templates, and the master copies the /etc/motd file as it is without substituting {{ message }} for 'Foo'. https://gist.github.com/anonymous/6214705
20:16 ksalman what am i doing wrong here?
20:16 zloidemon UtahDave: Yes.
20:17 UtahDave ls
20:17 zloidemon UtahDave: Oops, No. Its in custom path
20:17 UtahDave ok, probably put them in the system path
20:17 luminous https://dpaste.de/MEkRJ/ <<< yaml errors out trying to parse my multiline pillar :(
20:17 dthom91 joined #salt
20:18 zloidemon For example. I have path with exteranla pillar /var/ext/pillar but I'm having a libs in /var/ext/libs how can I get libs in module?
20:18 kamal_ Does e.g. salt.states.file.absent run when state.highstate is run?
20:18 luminous trying to use these pillar keys in a state definition with a custom state modules
20:18 zloidemon UtahDave: Does system path not configure in configs?
20:19 UtahDave kamal_: only if they're part of a state that matches your minion in your top file.
20:19 UtahDave zloidemon: no, that's part of your operating system
20:20 matthewt1 UtahDave: Its at https://github.com/saltstack/salt/issues/6653
20:20 matthewt1 thanks
20:20 cbier joined #salt
20:20 zloidemon UtahDave: Ok. I'll add exteranal path in configuration of pillar and then will try add it in system path
20:21 UtahDave thank you, matthewt1!  that helps a lot
20:22 luminous https://github.com/saltstack/salt-jenkins/commits/master <<<< totally awesome to see!
20:24 UtahDave luminous: :)  we haven't officially announced that yet, but it's really awesome
20:25 * luminous is secretly hoping that means saltstack will be improving their testing process before releases?
20:26 luminous UtahDave: is that something that would be used to test salt states or modules or both?
20:26 luminous or, rather, what ever you create tests for
20:27 UtahDave both!  It's going to allow us to test Salt and modules and everything on all the operating systems we support
20:27 luminous that's GREAT! some of those last bugs in 0.16.x really ought not have snuck past, I think we can all agree
20:28 UtahDave Travis only tests on Ubuntu and we don't have much control over the process.
20:28 luminous yea, travis kinda sucks
20:28 luminous it's great for, um... getting projects to use testing
20:28 luminous there's another player on the scene that I've been meaning to checkout.. stridercd
20:28 ksalman so i am trying to use templates, and the master pushes the /etc/motd file as it is without substituting {{ message }} for 'Foo'. https://gist.github.com/anonymous/6214705. What am i doing wrong?
20:29 UtahDave ksalman: probably add  - template: jinja
20:30 ksalman UtahDave: thanks, that worked
20:30 luminous UtahDave: are you at all skilled with multi-line yaml? I seem to be pissing off py-yaml to no end and unable to figure out what I'm doing wrong.
20:30 luminous https://dpaste.de/MEkRJ/
20:30 UtahDave luminous: Yes, that is a pain.
20:31 UtahDave luminous: have you seen whiteinge's multi-line yaml examples?
20:31 luminous I have not
20:31 luminous where might I find them?
20:31 UtahDave lemme find it.
20:31 luminous his blog?
20:33 whit joined #salt
20:35 ezraw am I missing something or should salt be providing some kind of confirmation/error messaging when I run salt.highstate
20:36 [diecast] ezraw it should
20:36 ezraw all I get is the minion name
20:36 jesusaurus is the minion being matched in your top file?
20:36 jesusaurus it may not have any states being applied to it
20:36 [diecast] check salt '*name*' test.ping
20:37 [diecast] ^^ exactly
20:37 [diecast] if you see the host reply to a ping, and key is accepted
20:37 [diecast] then you are probably not applying anything to it
20:37 ezraw yeah, it returns true
20:37 ezraw I am running salt '*' state.highstate
20:37 [diecast] increase the log_level in /etc/salt/master
20:37 ezraw so I assume that would get it?
20:37 ezraw ok
20:37 [diecast] and you can see the logs info
20:38 UtahDave ezraw: if you're running a highstate you have to have  a match in your top.sls
20:39 ezraw I have base: '*'
20:39 [ilin] joined #salt
20:39 [diecast] ezraw then nothing is being done
20:40 [diecast] you should have another line below that has a state added like "- net"
20:40 [diecast] or something
20:40 jesusaurus ezraw: can you create a gist (gist.github.com) of your top file?
20:41 ezraw thanks.. 1 sec
20:42 chrisgilmerproj1 joined #salt
20:42 ezraw https://gist.github.com/ezraw/6214976
20:42 jschadlick1 joined #salt
20:44 luminous UtahDave: I couldn't find anything on whiteinge's blog, would this be somewhere else?
20:45 UtahDave luminous: sorry, I got called into a meeting.  I think it's in the docs somewhere, but I think he linked to it in the mailing list too.
20:45 luminous no worries I'll dig it up
20:45 luminous you've got better things to do than look up links for us :)
20:47 alunduil joined #salt
20:55 luminous whiteinge: I hear you have examples of multi-line yaml?
20:55 ronc joined #salt
20:56 luminous ah, docs. I missed that now
20:56 luminous *note
20:56 * luminous trolls through rtd
20:56 UtahDave luminous: I'm pretty sure this is in the docs somewhere, but I found the original conversation here: https://github.com/saltstack/salt/issues/5480#issuecomment-21202724
20:58 luminous https://salt.readthedocs.org/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html <<, are you referring to this?
20:59 luminous yea, I'm using | and indenting
20:59 UtahDave Yeah, I saw that, but I didn't see a section on multi-line yaml
21:00 luminous yaml seems to be trying to interpret the value rather than just leave it as is
21:01 berto- joined #salt
21:03 chrisgilmerproj joined #salt
21:03 faldridge joined #salt
21:03 chrisgilmerproj joined #salt
21:04 whit joined #salt
21:06 multani joined #salt
21:08 Katafalkas joined #salt
21:10 jslatts joined #salt
21:11 auser joined #salt
21:15 squelch joined #salt
21:16 squelch hey, what do i use to generate my user password for user states
21:17 cbier_ joined #salt
21:18 UtahDave squelch: there's an example in the shadow module documentation: http://docs.saltstack.com/ref/modules/all/salt.modules.shadow.html#salt.modules.shadow.set_password
21:18 squelch UtahDave: Ah thanks
21:19 UtahDave you're welcome!
21:19 luminous I'm banging my head on this one.. what does this translate to? "Name tab.deploy in sls tab is not a dictionary"
21:20 luminous tab.deploy should be my deploy() in _states/tab.py
21:20 luminous then I have tab.sls trying to use this custom state, but failing when I try to apply
21:20 UtahDave luminous: can you pastebine your sls?
21:21 aat joined #salt
21:21 jacksontj joined #salt
21:22 luminous UtahDave: https://dpaste.de/5oZ8n/
21:22 djn joined #salt
21:24 UtahDave luminous: you need an ID declaration above your tab.deploy
21:24 luminous UtahDave: right now tab.deploy() is doing nothing more than putting the args passed to it >> ret['comment']
21:24 luminous BAH!
21:24 UtahDave luminous: same for your git.latest
21:25 luminous you would be correct ><
21:25 kmrhb joined #salt
21:25 luminous it's sometimes the simple stuff
21:26 luminous I've ignored the multi-line yaml/pillar issue for now with comments :)
21:26 UtahDave :)
21:27 luminous grrr, almost there
21:27 luminous Comment:   State tab.deploy found in sls tab is unavailable
21:28 luminous this suggests states sync has not been done?
21:28 djn joined #salt
21:30 dthom91 joined #salt
21:33 UtahDave luminous: that's the first thing I would look for.
21:35 subway joined #salt
21:37 ezraw can I use salt to execute arbitrary bash scripts to install applications that don't have packages?
21:38 UtahDave ezraw: yep!  use cmd.run  or cmd.script
21:39 ezraw UtahDave: thanks
21:40 kermit joined #salt
21:41 __Jahkeup__ I'm having a ordering conflict where a package creates a user and I try to file.manage -user <username> but the state says the user doesn't exist :/
21:41 __Jahkeup__ anyway to work around that?
21:41 auser joined #salt
21:42 UtahDave __Jahkeup__: if a package is creating a user, then have your file.managed require the package.
21:42 __Jahkeup__ UtahDave: so the package can watch the files and the files can require the package?
21:43 luminous UtahDave: the first time I ran it the custom state was sync'd, the second time, nothing (good, nothing changed), then I changed the custom state and resync'd seeing the sync propogate, but still errors all the way through
21:43 UtahDave stuff:
21:43 UtahDave file.managed:
21:43 UtahDave - source: salt://path/to/file.txt
21:43 UtahDave - require:
21:43 UtahDave - pkg: thepackage
21:43 __Jahkeup__ UtahDave: thanks I'll try right now!
21:44 UtahDave luminous: could there be an error in the custom state that is erroring out when the minion syncs or starts up?  You might try running the minion in the foreground in debug mode to see any tracebacs
21:44 luminous I will check
21:46 luminous you would be correct!
21:48 UtahDave bam!  :)
21:48 VertigoRay joined #salt
21:49 luminous ;)
21:50 __Jahkeup__ UtahDave: thanks, that 'require' was just the thing!
21:50 luminous SWEET! my first custom state/module pair, initial test complete :)
21:51 subway Hmmm... I'm sure this is a common question, but I haven't been able to come up with the right search string to get Google to return anything useful.... How do I go about implementing something similar to Puppet's exported resources with saltstack?
21:51 UtahDave __Jahkeup__: you're welcome!  glad you got it working!
21:51 UtahDave luminous: nice!
21:51 subway For instance, automatically having all minion's host key added to /etc/ssh/known_hosts on every other minion.
21:52 jacksontj joined #salt
21:52 forrest subway, how about: http://docs.saltstack.com/ref/peer.html
21:52 forrest or maybe you could treat that information as grain data?
21:53 VertigoRay What's the command to run an sls from the minion.  I'm working on my test environment and want to debug w/o having to work from the master.
21:53 lyddonb_ joined #salt
21:53 UtahDave subway:  http://docs.saltstack.com/ref/states/all/salt.states.ssh_known_hosts.html#module-salt.states.ssh_known_hosts
21:53 subway forrest: That is exactly what I was looking for.
21:53 subway UtahDave: That isn't terribly useful, unless combined with forrest's link
21:53 UtahDave subway: Yes, you would need both.
21:53 subway known hosts was an arbitrary example of data I'd like to collect
21:53 forrest ahh ok, cool
21:53 subway but thanks a ton
21:53 UtahDave VertigoRay:   use  salt-call instead of salt
21:54 VertigoRay UtahDave: Thanks!
21:54 forrest if you write up something cool for that subway, you should put it in the formulas
21:54 UtahDave subway: Just FYI, the peer system pulls live data from your infrastructure. If your use case can deal with slightly stale data, then you might look at the Salt Mine for that info, too
21:55 UtahDave VertigoRay: you're welcome!
21:55 forrest UtahDave, good point I haven't read up as much on the salt mine as I should since it was released.
21:56 forrest Are there plans to expand http://docs.saltstack.com/topics/mine/index.html ?
21:56 subway UtahDave: Thanks, that looks quite useful.
21:57 UtahDave forrest: Yeah, I think it could use some more info.  What info do you think is missing?  more examples?
21:57 forrest Yea just more examples really
21:58 forrest There isn't a great example of HOW to use the mine
21:59 UtahDave forrest: would you mind opening an issue on that?
21:59 forrest Maybe just an example showing how your master is configured, information on the minion, and then what gets returned to the master based on the interval would be cool. There's no example really as to where the mine functions live past saying in the minion's pillar data.
21:59 forrest yea sure
22:00 UtahDave forrest: Thanks!  that will help make sure we track that.
22:02 forrest UtahDave, https://github.com/saltstack/salt/issues/6655
22:04 kermit joined #salt
22:04 UtahDave thanks, forrest!
22:05 jrpurdy_ joined #salt
22:05 forrest np, salt should have the best docs out there! I know I'd have happily thrown puppet away simply for a system with some great documentation :D
22:06 z3uS joined #salt
22:06 terminalmage joined #salt
22:07 whit_ joined #salt
22:07 dcolish joined #salt
22:08 racooper joined #salt
22:09 UtahDave forrest: :)   Yeah, we're really trying to polish the docs as we go along.  community members pointing out deficiencies and helping write new docs has been a huge help
22:10 forrest Yea I think I'm gonna be setting up a 5 node rhel cluster here that I want to experiment on, so I'll make sure to write some docs regarding that as I go through.
22:11 jacksontj joined #salt
22:13 pdayton joined #salt
22:15 jpeach joined #salt
22:16 Gifflen joined #salt
22:17 jpeach I could not find an explanation of how package versions work … could anyone give me an example of how I could specify that any version of vim-enhanced-7.2.x is ok?
22:17 jpeach eg. >= 7.2 and < 7.3
22:18 jpeach FWIW I'm using the yum backend, salt 0.16.0 from EPEL
22:20 UtahDave cool, thanks, forrest!
22:20 forrest jpeach, I'm not sure how you use stuff like that when it just needs to be greater than or less than
22:21 forrest have you tried just - version: > 7.2 ?
22:21 UtahDave jpeach: You can specify a specific version. I'm not sure if you can specify a range of acceptable versions.  terminalmage, do you know if that's possible?
22:21 forrest I don't know if yaml will interpret that correctly..
22:21 mikedawson joined #salt
22:21 scotticus UtahDave: i see there is a pecl module, is there one for pear?
22:22 jpeach forrest, UtahDave; yep I can specify a very specific version, like vim-enhanced-7.2.411-1.8.el6, or a >=
22:22 forrest yea but not just a > or <
22:22 jpeach what I'm really trying to do (™) is take the latest salt minor version
22:23 jpeach ie. I'm happy to take the latest 0.16.x RPM, but I don't want to accidentally upgrade to 0.17
22:23 UtahDave scotticus: I don't think there is one for pear
22:23 scotticus drat.
22:23 scotticus im' just using cmd.run
22:23 UtahDave scotticus: yeah, that's your best bet until someone writes a module/state for pear
22:23 scotticus and it returns an error-ish state since stuff is already installed.
22:24 UtahDave scotticus: Ah, I see.
22:24 scotticus btw, love salt, thanks :)
22:24 UtahDave scotticus: Do you know your way around pear very well?  It probably wouldn't be very hard to create a pear module and state
22:24 scotticus perhaps, i'm short on time right now, but i could once i finish this.
22:25 scotticus probably go off the pecl one.
22:25 __Jahkeup__ joined #salt
22:25 UtahDave scotticus: Yeah, I imagine it's fairly similar.
22:25 UtahDave scotticus: when you want to start, let me know and I'll help you out.
22:26 scotticus k thx
22:28 jpeach does pkg.latest: -version '<7.3' do what I think it does?
22:28 jpeach ie. take the latest package as long as it's version is < 7.3?
22:28 auser joined #salt
22:32 cloq joined #salt
22:34 L2SHO joined #salt
22:37 terminalmage joined #salt
22:38 dthom91 joined #salt
22:39 lyddonb_ joined #salt
22:42 kstaken joined #salt
22:43 forrest I don't know jpeach
22:43 forrest I know that the single quotes work for file perms
22:43 forrest when you want to pass in '0755'
22:43 forrest or whatever
22:46 msheiny joined #salt
22:47 kiorky joined #salt
22:50 jpeach well, I'll just stick to pinning the explicit version for now, that seems safest :)
22:50 UtahDave jpeach: you might want to ask on the mailing list. I'll point some people to that.
22:51 jpeach ok, lemme go subscribe :)
22:51 jpeach I probably should have done that a long time ago any way
22:51 UtahDave :)
22:53 forrest jpeach, if you find an answer, or the '< 0.75' thing works, can you put in a pull request to update the docs, or create an issue to do so?
22:53 jpeach forrest: the '< 0.75' syntax doesn't fail :) but I don't have the right set of packages to test whether it does what I'd like it to do
22:55 forrest ahh ok cool
22:55 forrest thanks for the heads up
23:02 Linz joined #salt
23:15 vimalloc joined #salt
23:15 intchanter joined #salt
23:15 __Jahkeup__ joined #salt
23:17 __Jahkeup__ joined #salt
23:20 __Jahkeu_ joined #salt
23:21 alunduil joined #salt
23:27 dthom91 joined #salt
23:28 sinh joined #salt
23:28 z3uS joined #salt
23:33 cewood joined #salt
23:39 baniir joined #salt
23:39 jacksontj joined #salt
23:50 dthom91 joined #salt
23:59 jslatts joined #salt
23:59 jschadlick1 left #salt

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