Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-01-19

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

All times shown according to UTC.

Time Nick Message
00:01 bhosmer_ joined #salt
00:04 JDiPierro joined #salt
00:09 twellspring joined #salt
00:12 jerematic joined #salt
00:13 jonbrefe joined #salt
00:13 hvn joined #salt
00:13 hvn joined #salt
00:16 yomilk joined #salt
00:21 Linuturk using the git.latest state, how do I provide an ssh private key for the pull ?
00:32 Linuturk found it
00:32 Linuturk nvm
00:46 cberndt joined #salt
00:53 otter768 joined #salt
00:56 MugginsM joined #salt
00:58 aparsons joined #salt
00:59 aqua^mac joined #salt
01:03 twellspring joined #salt
01:06 Ryan_Lane joined #salt
01:20 TheThing_ joined #salt
01:30 jeddi joined #salt
01:43 tkharju joined #salt
01:43 foulou joined #salt
01:44 cberndt joined #salt
01:45 d0xb joined #salt
01:47 higgs001 joined #salt
01:48 JDiPierro joined #salt
01:49 auser left #salt
01:52 TyrfingMjolnir joined #salt
01:52 jonatas_oliveira joined #salt
01:54 gladiatr joined #salt
01:54 gladiatr joined #salt
02:00 hvn joined #salt
02:00 tracphil joined #salt
02:02 tracphil I have eth0 with an IP and eth0:0 with an aliased IP. How can I get the IP of both interfaces seperately? I am looking the grains on the host and both IP's show up under ip_intefaces for eth0
02:04 bill_haydon joined #salt
02:04 bill_haydon left #salt
02:08 lamasnik joined #salt
02:08 cberndt joined #salt
02:10 vincehu joined #salt
02:15 JDiPierro joined #salt
02:16 aqua^mac joined #salt
02:17 gladiatr tracphil: that's actually the way it works.  The "primary" is always the first in the array, though.
02:20 tracphil gotcha, that is what I was hoping
02:21 randomuser joined #salt
02:22 favadi joined #salt
02:22 Furao joined #salt
02:39 otter768 joined #salt
02:40 [1]foulou joined #salt
02:42 markm_ joined #salt
02:46 ilbot3 joined #salt
02:46 Topic for #salt is now Welcome to #salt | SaltConf 2015 Call for Speakers is open! http://saltconf.com/call-for-speakers/ | 2014.7.0 is the latest | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
02:51 yomilk_ joined #salt
03:03 MugginsM joined #salt
03:18 gotwf joined #salt
03:20 Mso150 joined #salt
03:29 genediazjr joined #salt
03:33 CeBe1 joined #salt
03:36 jerematic joined #salt
03:41 jonatas_oliveira joined #salt
03:43 MidnightCommande joined #salt
03:48 cberndt joined #salt
03:50 JDiPierro joined #salt
03:55 jeddi I'm getting a traceback when running salt (dry-run) ... seems to be a problem with one character in one of my files, but can't work out which .sls file it's choking on - can anyone advise where to look based on this traceback?  http://rn0.me/show/TwQhWKdjtWqhThfiKtTx/
03:55 yomilk joined #salt
03:56 MidnightCommande left #salt
03:58 MidnightCommande joined #salt
04:02 MidnightCommande joined #salt
04:06 MugginsM joined #salt
04:07 MugginsO joined #salt
04:07 higgs001 joined #salt
04:08 MugginsO joined #salt
04:10 gladiatr joined #salt
04:10 gladiatr joined #salt
04:10 rm_jorge joined #salt
04:38 nmadhok joined #salt
04:39 MidnightCommande left #salt
04:45 nethershaw joined #salt
04:51 JDiPierro joined #salt
04:52 yomilk_ joined #salt
04:53 auser joined #salt
04:59 monkey66 joined #salt
05:04 _X_C_V_B_ joined #salt
05:14 Andre-B joined #salt
05:15 kermit joined #salt
05:21 monkey661 joined #salt
05:22 mrjk joined #salt
05:23 genediazjr joined #salt
05:23 yomilk joined #salt
05:25 jerematic joined #salt
05:30 jonatas_oliveira joined #salt
05:32 bhosmer__ joined #salt
05:43 felskrone joined #salt
05:49 genediazjr joined #salt
05:49 ramteid joined #salt
05:52 JDiPierro joined #salt
05:55 dvestal joined #salt
05:59 gladiatr joined #salt
05:59 gladiatr joined #salt
06:02 nmadhok joined #salt
06:04 tuxracer joined #salt
06:06 hvn joined #salt
06:06 hvn joined #salt
06:10 catpigger joined #salt
06:13 iamtew joined #salt
06:18 genediazjr joined #salt
06:30 calvinh joined #salt
06:31 mohae_ joined #salt
06:31 linjan joined #salt
06:32 hvn joined #salt
06:36 calvinh joined #salt
06:36 ndrei joined #salt
06:39 testtt joined #salt
06:53 JDiPierro joined #salt
06:53 favadi joined #salt
06:54 calvinh_ joined #salt
06:56 mikkn joined #salt
06:57 Grokzen joined #salt
07:01 cberndt joined #salt
07:06 nullptr`` joined #salt
07:07 colttt joined #salt
07:14 echtish joined #salt
07:14 jerematic joined #salt
07:14 Andre-B joined #salt
07:19 jonatas_oliveira joined #salt
07:20 AndreasLutro joined #salt
07:24 yomilk_ joined #salt
07:32 jtang joined #salt
07:33 Grokzen joined #salt
07:41 cotton joined #salt
07:41 KermitTheFragger joined #salt
07:45 slafs joined #salt
07:45 slafs left #salt
07:48 gladiatr joined #salt
07:54 akafred joined #salt
07:55 JDiPierro joined #salt
07:56 trikke joined #salt
07:58 elco__ joined #salt
07:59 SheetiS joined #salt
08:00 garphy`aw joined #salt
08:00 flyboy joined #salt
08:01 hebz0rl joined #salt
08:05 Auroch joined #salt
08:06 gotwf left #salt
08:17 elco_ joined #salt
08:21 Flusher joined #salt
08:21 booly-yam-5635 joined #salt
08:24 yomilk joined #salt
08:25 JlRd joined #salt
08:26 mage__ joined #salt
08:26 genediazjr joined #salt
08:27 lb1a joined #salt
08:32 wnkz_ joined #salt
08:43 Grokzen joined #salt
08:43 aqua^mac joined #salt
08:45 chiui joined #salt
08:46 Hybrid joined #salt
08:47 kawa2014 joined #salt
08:49 nighter joined #salt
08:52 forrest joined #salt
08:53 monkey661 left #salt
08:56 jhauser joined #salt
08:57 dkrae joined #salt
09:00 bluenemo joined #salt
09:00 bluenemo joined #salt
09:00 dexter91x joined #salt
09:00 dexter91x hello all  , how i can contribute in saltstack-formulas ?
09:00 dexter91x can i*
09:01 bluenemo joined #salt
09:01 bluenemo joined #salt
09:01 bluenemo joined #salt
09:01 bluenemo joined #salt
09:02 dexter91x because i don't know what mail should i contact
09:02 ughloru joined #salt
09:03 jerematic joined #salt
09:04 N-Mi joined #salt
09:04 N-Mi joined #salt
09:06 udomsak joined #salt
09:06 udomsak Hi all
09:08 jonatas_oliveira joined #salt
09:11 echtish joined #salt
09:12 jtang joined #salt
09:14 Mindfart joined #salt
09:18 babilen dexter91x: You typically write a formula first and then drop a mail to salt-users@googlegroups.com. Alternatively you can ping the usual suspects (i.e. salt staff) in here. If you only want to contribute patches you would simply submit pull requests on GH
09:19 dexter91x thanks
09:20 Mso150 joined #salt
09:21 bluenemo There is now a german speaking saltstack channel on freenode called #salt-de. You are very welcome to join :)
09:21 Andre-B_ joined #salt
09:22 saltuser joined #salt
09:23 SVQTQ joined #salt
09:26 zadock joined #salt
09:28 saltuser Hi! Is it possible to pass variables to included sls files?
09:29 bluenemo saltuser, not sure about that. merge might be worth looking at for you
09:31 saltuser extend is almost what i need, but since i create states with jinja for loops, it does not work
09:32 Inver joined #salt
09:32 nkuttler maybe you want to put your vars in pillars..
09:33 saltuser using jinja "form map.jinja import" statement imports only where the original sls lives, not where "include" is called
09:34 tomspur joined #salt
09:35 ndrei joined #salt
09:36 saltuser I have grouped admins in pillar - OS-admins, db-admins, app-admins, etc and depending on the role(s) relevant admin accounts should be created. I want to reuse code but that requires passing rolename to the make_users.sls
09:36 gladiatr joined #salt
09:37 saltuser Any other god ideas are also welcome :)
09:37 saltuser god -> good
09:39 yomilk joined #salt
09:44 favadi left #salt
09:45 babilen saltuser: I would generally recommend to keep all "moving parts" in a pillar (and, in particular, not keep roles (or anything that triggers availability of sensitive data/states) in grains). And, I'd argue, that you simply want to target os-admins, db-admins, .. pillar data to those minions that should have them. Otherwise you could also consider writing a salt state (in, if necessary Python/pyobject, ...) that pulls data from pillars and generates ..
09:45 babilen ... the appropriate states
09:47 ganes joined #salt
09:47 ganes hi
09:48 ganes i try to run python.sls file like
09:48 ganes #!py   def run():      config = {}       if __grains__['os'] == 'Ubuntu':          user = 'ubuntu'          group = 'ubuntu'          home = '/home/{0}'.format(user)      else:          user = 'root'          group = 'root'          home = '/root/'       config['apache2'] = {          'pkg': [              'installed',              {'name': 'apache2'},          ],      }   return config
09:48 DolourousEdd1 left #salt
09:49 ganes but error occurs like
09:49 ganes def render():     ^ IndentationError: unexpected indent
09:49 ganes anyone can help??
09:50 saltuser babilen: this targeting still requres manual configuration on master side. In my vision i just add appropriate roles to minion at creation and just highstate it.
09:52 saltuser Although you do have a point that a typo at minion side would mess it up
09:52 Inver ganes: could you use a code pasting service please, it's hard to tell where your indentation error occurs when you paste it into chat
09:54 intellix joined #salt
09:55 yomilk joined #salt
09:57 JDiPierro joined #salt
09:58 babilen saltuser: The point is not really about typos (although that would be a problem too), but the fact that the minion shouldn't decided *itself* what kind of sensitive data it has access to. Lets assume you target sensitive certificates or keys to your minions based on grains then a minion could, maliciously, request all your sensitive data by setting the appropriate grains.
09:59 babilen saltuser: That's why I strongly suggest to keep all information on which you base your targeting not *on* the minions, but in a datastore that is closely linked to the master (e.g. pillars or an appropriate external pillar (a database in which you write roles when you create a minion))
09:59 yomilk joined #salt
10:00 babilen And yes, you would, naturally, have to maintain that information somewhere. Be it in an (external) pillar, a suitable top.sls file or both.
10:01 saltuser babilen: so i should keep the "minion <> roles" list on master not directly on minion?
10:01 babilen Inver: that is almost a classic! (please help me with my indentation problem in CODEBLOCK_WITHOUT_INDENTATION)
10:01 phx btw, are pillars rendered by minion? that is, is it possible to render a pillar differently for every minion?
10:01 mage_ joined #salt
10:02 babilen saltuser: I simply wanted to make you aware of a potential massive security risk if you rely on data from a minion to decide which sensitive data you make available *to the same minion*
10:03 babilen phx: pillars are renderered on the master, but you can (and would in most cases) present different data to each minion. You would simply write that logic in your pillars and have it rendered on the master.
10:03 babilen phx: Pillars *can not* be rendered on the minions as that would make it necessary to make the pillar data in their entirety available to the minions which is exactly what you don't want to do
10:05 phx babilen, i know it's rendered on the master. it's just that it's rendered individually for each minion, using a different set of variables (like grain['id'] for the minion's ID is available)?
10:06 phx this wasn't so clear for me from the docs
10:06 calvinh joined #salt
10:06 babilen phx: Sure, it is rendered in the context of each minion and you do have, for example, different grains.
10:07 babilen The master essentially asks the question "How should I render the pillar for this particular minion?"
10:07 mage__ joined #salt
10:07 calvinh_ joined #salt
10:08 Inver babilen: haha, it really is
10:08 genediazjr joined #salt
10:09 phx babilen, splendid, thanks. and if i have a #!py renderrer, it's available in the respective grains dict, right?
10:10 phx babilen, also this means, if i issue a refresh_pillar to like a gazillion of minions, it will hammer the master pretty much, right? (since it has to render the pillars for each)
10:10 genediazjr joined #salt
10:11 favadi joined #salt
10:12 iwishiwerearobot joined #salt
10:14 * buxy is again looking for a saltstack-formulas owner
10:15 buxy I have two supplementaries formulas that I would like to contribute: https://github.com/rhertzog/schroot-formula and https://github.com/rhertzog/sbuild-formula
10:15 giantlock joined #salt
10:15 buxy they are extensions built on top of debootstrap-formula that has been recently added to the official set of formulas by whiteinge
10:16 veselin joined #salt
10:19 saltuser babilen: I see your point. Indeed you are right and I have not looked at it in this way
10:20 wnkz joined #salt
10:20 * saltuser goes back to paper and pencil :)
10:23 ajw0100 joined #salt
10:24 veselin left #salt
10:25 xsteadfastx joined #salt
10:27 bhosmer_ joined #salt
10:28 kbyrne joined #salt
10:31 fredvd joined #salt
10:32 aqua^mac joined #salt
10:35 yomilk joined #salt
10:43 _ether_ joined #salt
10:43 jonatas_oliveira joined #salt
10:44 ikanobori joined #salt
10:45 jonatas__ joined #salt
10:51 jerematic joined #salt
10:59 che-arne joined #salt
11:00 babilen phx: (sorry, was afk) -- yes, you do have access to grains in all renderers
11:01 babilen buxy: saltstack staff are sleeping still, salt-users@googlegroups.com would be my recommendation
11:03 calvinh joined #salt
11:04 phx babilen, thanks. in the time being i've added a test pillar to my config to play with such things. actually it does seem very useful
11:05 phx babilen, what I would like to do is to generate a per-minion configuration per my inventory database, and use that from my states to configure the minion. things like what dns server to use on what machine (multiple sites), what mail smarthost to use, auth server, so on
11:07 nmadhok joined #salt
11:07 babilen That sounds like a perfect match. What I do is to typically have some minion id parser (that splits it into semantically meaningful parts if we use a consistent naming scheme for that customer) and to then lookup respective values in suitable dictionaries that are indexed by tuples of minion id parts
11:08 phx except it's all an internal infrastructure here, running internal products and such
11:12 lb1a joined #salt
11:13 lb joined #salt
11:14 TyrfingMjolnir joined #salt
11:18 ughloru Does anybody know of a successful workaround to the issue of pip.installed not working on Windows? https://github.com/saltstack/salt/issues/8405
11:19 fredvd joined #salt
11:19 giantlock joined #salt
11:22 TyrfingMjolnir joined #salt
11:22 saltuser That seems to be common theme here - when one runs highstate for a minion, master pulls relevant information from cmdb and configures the minion accordingly.
11:25 gladiatr joined #salt
11:25 gladiatr joined #salt
11:26 istram joined #salt
11:28 TyrfingMjolnir joined #salt
11:30 arno joined #salt
11:32 tracphil left #salt
11:46 bhosmer_ joined #salt
11:51 ganes how to split or print seprately the return vales??
11:52 ganes its like  ID: apache2     Function: pkg.installed       Result: True      Comment: Package apache2 is already installed.      Started: 11:47:15.290874     Duration: 214.302 ms      Changes:
11:52 jonatas_oliveira joined #salt
11:52 jerematic joined #salt
11:52 ganes just i need to print wht i need like id or result??
11:52 ganes any one can help me
11:56 ecdhe joined #salt
11:56 calvinh_ joined #salt
11:57 calvinh_ joined #salt
11:59 JDiPierro joined #salt
12:00 calvinh joined #salt
12:08 veselin joined #salt
12:08 lamasnik joined #salt
12:09 veselin hi guys, is a 'base' pillar supposed to be authoritative when versions of the same pillar exist in other environments?
12:10 yomilk joined #salt
12:11 bhosmer joined #salt
12:12 arno joined #salt
12:13 arno__ joined #salt
12:16 intellix joined #salt
12:18 CeBe joined #salt
12:20 jonatas_oliveira joined #salt
12:21 aqua^mac joined #salt
12:23 jonatas__ joined #salt
12:26 gladiatr joined #salt
12:27 yomilk joined #salt
12:28 bluenemo veselin, the base environment is the default environment, so if you dont give saltenv=development or sth it will use the states and pillars in the base env. does this answer your question?
12:28 bluenemo you always choose one environment to run the current action in. it will not bother about whats up in other environments during that (except maybe for syntax errors - not 100% sure about that)
12:30 veselin bluenemo: I have a 'base', 'demo' and 'nft' environments with top.sls in each where base targets '*'  and the envs target the respective env nodes such as '*.demo' , '*.nft'  I believe that will force salt to always use the env specific states/pillars and fallback to 'base' if none found?
12:31 veselin bluenemo: to clarify, the minion_id ends with the env name , e.g. 'my-web-node.demo'
12:31 veselin bluenemo: so far I've been able to use the same pillar but with different values for a given key in each env and it gets applied correctly for the 'nft' env but not 'demo
12:32 bluenemo hm. not sure if I totally get you atm. an example: salt 'foob*' state.sls foobar saltenv=nft will use states in /srv/salt/nft/foobar/init.sls and pillars in /srv/pillar/nft/foobar.sls. If you do not give any environemtn, it defaults to the base environment.
12:33 bluenemo to me it sounds a bit like you should split up your nodes in the top file, not with environments (might be wrong what I say now)
12:33 bluenemo I have similar setups and target only in the top file basically
12:33 veselin bluenemo: I have a top file for each env which should be the same as having one large top file
12:34 bluenemo more or less, yes
12:34 veselin bluenemo: each top file controls its own env by having a section such as 'base:' or 'demo:'
12:34 hvn joined #salt
12:34 hvn joined #salt
12:35 bluenemo hm. back to your original question; when you give a specific environment, and there is a pillar called foobar.sls in base and in nft, and you say saltenv=nft, it will never use the one in base, even if it has the same name (or its a bug ; or I heavily missunderstood sth)
12:35 nyx_ joined #salt
12:37 veselin bluenemo: that sounds correct, what about merging however, where you don't specify 'saltenv', I thought that salt will apply any 'base' pillars/states then overwrite these with any more specific matches such as the specific environment , e.g. pillars/states from the 'demo:'  env top file
12:37 bluenemo so basically no, there is no such thing as an authorative pillar when it comes to environments. envs dont mix up imho
12:38 bluenemo I think you only give the saltevn on the command line, not in state code. so when you say merge a defaults.yaml or map.jinja with pilars, it will always merge it with the pillar in the environment given (if none is given it defaults to base)
12:39 veselin bluenemo: exactly, so if the same pillar existed both in 'base' and 'demo', then the 'demo' one will take precedence on a 'demo' minion
12:39 bluenemo ah ok now I get you. No. merging is for merging 'defaults' with pillar data. you use defaults for stuff you dont want the user to configure because it takes to much time or is to complex or sth
12:39 veselin bluenemo: or so I thought..
12:40 bluenemo hm. if you say salt 'foo*' state.highstate saltenv=demo, and in the env demo there is a topfile where the demo minion is listed, it will take the according files. if there is no demo minion in the top file of demo env but in base env and you execute with saltenv=demo, salt 'should' complain
12:40 bluenemo and do nothing
12:41 bluenemo as there should be no states for a highstate defined in the top file of that particular env given
12:42 bluenemo as far as I know saltenvs have nothing at all to do with each other. there is no athorative or presedence. the base or demo or foobar env will behave as if it is the only env at all times you execute in this env, it will execute the same way if you delete all other envs
12:42 veselin bluenemo: ok, and if you don't specify a saltenv, but you still have demo minion present in both envs, the 'demo' env should win?
12:42 bluenemo as far as i know its also not possible to get any data from an env you are not currently executing in
12:43 bluenemo if I get you correctly the demo minion just has 'demo' in its fqdn - salt shouldnt associate that with envs. if you dont specify an env, salt should default to base at all times
12:43 bluenemo if there is config present in your top file for a client called 'foobar.demo.example.com' in the base env, it will execute for it
12:43 mrjk joined #salt
12:44 bluenemo if not, then not :) also if there is sth in the base or whatever env
12:44 bluenemo can you follow me ? :)
12:44 veselin bluenemo: I think I see the difference in what you are saying, I target the minions by the ID not by actually setting a 'saltenv'
12:45 bluenemo envs were a bit confusing to me at the beginning too. I kinda switched to git branches for 'development, qa and production' but idk if thats wise
12:45 veselin bluenemo: so there is a base:top.sls  which say targets 'webserver.*' and there is also a demo:top.sls which targets more specifically 'webserver.demo'
12:45 bluenemo veselin, yeah absolutely. targeting has nothing to do with envs. imho envs are for developing code and stuff, just having a cleaner folder stucture. but i might have missundestood that
12:45 bluenemo you can do that, yes
12:45 veselin bluenemo: so when I run a highstate, I expect the 'demo' targeting to take precedence
12:46 bluenemo thats kinda the way to go i think
12:46 bluenemo when you now just execute salt '*' state.highstate, it will do whatever is defined in your base env. it wont care about the other envs
12:46 veselin bluenemo: and then i have  pillar_roots and file_roots which have separate folders for 'demo' and 'base' envs
12:46 bluenemo yes. you need both with the same env name for each env (pillar and file roots)
12:47 veselin bluenemo: so that 'demo' targeting will use the assets found under the 'demo' roots
12:47 bluenemo if you execute salt '*' state.highstate saltenv=demo, yes
12:48 veselin bluenemo: well even if you don't, all top files are compiled into a single one, according to http://docs.saltstack.com/en/latest/ref/states/top.html#environments
12:48 gustavobgama joined #salt
12:49 veselin bluenemo: so any specific targeting such as '*.demo' will/should take precedence to '*'
12:49 veselin bluenemo: that is what I get from the docs at least
12:51 bluenemo ah crazy. i just notice i missunderstood some stuff i think
12:51 gustavobgama joined #salt
12:52 veselin bluenemo: so as you rightly say, you could target specific env with 'saltenv', but you could also not do so and it will still be considered (in a different way)
12:52 bluenemo do I get this right that you can target for different envs in the top file of the base env?
12:52 bluenemo if so, i really didnt know that :D
12:53 bluenemo anyhow, it should always pull the pillars from the env it is listed under (i think)
12:53 veselin bluenemo: yes or keep multiple top files, one for each env
12:54 bluenemo veselin, salt doesnt break for you if you have only one top file in base and no top files at all for the others, but those defined in the top file for base?
12:54 veselin bluenemo: yes, you could just have one long top file with various 'env:' sections
12:55 bluenemo ah ok. that I didnt know.
12:55 bluenemo thx for the hint :D
12:55 veselin bluenemo: there is also a known bug however associated with env handling, as highlighted in the doc
12:56 veselin bluenemo: ref: http://docs.saltstack.com/en/latest/ref/states/top.html#how-top-files-are-compiled
12:56 nmadhok joined #salt
12:56 bluenemo 4 real. cool
12:56 Inver left #salt
12:57 bluenemo ah ok. wow. had no idea about that :D
12:59 JDiPierro joined #salt
13:06 nyx_ joined #salt
13:08 bhosmer joined #salt
13:10 jerematic joined #salt
13:16 higgs001 joined #salt
13:19 piquadrat left #salt
13:26 fredvd joined #salt
13:29 moos3 we you write a state in python code, how do you test it ?
13:32 Whissi joined #salt
13:35 hvn joined #salt
13:37 karimb joined #salt
13:43 jenkins_ joined #salt
13:43 jenkins_ is there any way to downgrade a windows minion?
13:44 jenkins_ without doing it manually?
13:44 bluenemo moos3, as far as I know the (only?) way to test state files is to execute them. Idk about #!py written state files though. If you find anything cooler, pls tell me :)
13:44 moos3 yeah i'm trying to figure that out
13:45 moos3 because I have a bit of code that works on newer python but not 2.6 and i'm not sure why
13:45 moos3 i'm not doing anything super special
13:47 stoogenmeyer joined #salt
13:53 bhosmer joined #salt
13:55 drico joined #salt
13:55 drico Hi
13:55 drico is that possible to make the link between minion and pillar using some variables ?
13:55 _JZ_ joined #salt
13:56 drico like base: '*' : - server.{{minion_id}}.env ?
13:57 nkuttler you have access to grains in pillars fwiw
13:59 schlueter1 joined #salt
13:59 diegows joined #salt
14:00 bluenemo drico, yes, the doc is quite elaborate on that. google for 'saltstack targeting'
14:03 drico thanks! gonna have a look
14:05 Birabijan joined #salt
14:05 bluenemo drico, yw
14:05 moos3 anyone have a good solution for controlling root ssh public and private keys
14:06 mrjk joined #salt
14:06 bluenemo moos3, bechtolds formula is a very nice way to handle that. I did a bit of work on it, but I really like it much more over the regular formula
14:06 bluenemo you can manage any users authorized keys as well as creating ssh keypairs
14:06 bluenemo just google for 'bechtoldt salt ssh'
14:07 E1NS joined #salt
14:08 moos3 interesting, i have a user state written in #!py that controls my users but not my root keys
14:09 bluenemo I had those thoughts too. in the end I seperated user creation into each specific formula and kept the ssh key stuff to its own formula
14:09 perfectsine joined #salt
14:10 bluenemo its always a question weather to put one topic into one formula or manage it with each formula.. like with databases.. create them in the 'gitlab' formula or in the postgres? i prefer postgres..
14:10 aqua^mac joined #salt
14:10 bluenemo but it is kinda philosophical..
14:11 moos3 yeah true, the issue is we mount home dirs across x node which is controlled by kb and ldap
14:12 Mindfart joined #salt
14:15 gladiatr joined #salt
14:15 JDiPierro joined #salt
14:15 favadi joined #salt
14:16 nitti joined #salt
14:20 jeddi joined #salt
14:23 aquinas joined #salt
14:25 bluenemo I'm trying to roll out the git formula, however my changing install_from_source to false is not recognised by the pillars, it always stays true: http://paste.debian.net/141225/
14:25 bluenemo I can add more pillar data like foo: bar and so on, which works, but I cant seem to change install_from_source to false :( any ideas?
14:26 SpX joined #salt
14:26 penguin_dan joined #salt
14:26 bluenemo its even persistent if I put it one level deeper and just is viewed even if its not there: http://paste.debian.net/141226/
14:27 bluenemo I already restarted salt-{minion,master} and did a rm -r on /var/cache/salt/master (evil, I know, but I have no idea why this is happening)
14:30 veselin left #salt
14:30 elfixit joined #salt
14:32 Birabijan Hey. I have salt-master running on the host which sometimes goes out of swap. It has 8gb of RAM and 4gb of swap. Any ideas which place to look first for issues?
14:33 rogst joined #salt
14:33 arno joined #salt
14:34 viq joined #salt
14:35 xf10e joined #salt
14:36 elfixit joined #salt
14:36 dergrunepunkt joined #salt
14:36 vbabiy joined #salt
14:37 dergrunepunkt hi guys, I'm having this dumb problem but I cant figure out what is
14:37 irctc575 joined #salt
14:37 dergrunepunkt Pillar failed to render with the following messages: Specified SLS 'pkgs' in environment 'base' is not available on the salt master
14:38 irctc575 hello
14:38 dergrunepunkt I already verified /etc/salt/master.d/file.conf and pillar.conf
14:39 signull joined #salt
14:39 irctc575 salt '*' state.highstate  is going to install 60+ RPMS and will take more than hours .  Does that mean command prompt will not return for an hour ?
14:40 irctc575 also my system will auto logout me after 5 mins of in-activity . How do I run above command then ?
14:40 bhosmer joined #salt
14:42 gladiatr joined #salt
14:42 jenkins_ irctc575: use nohup and &
14:43 irctc575 hmm thanks , but does not seems like salt way of executing long running commands .
14:45 xf10e dergrunepunkt: so do you actually have a pkgs.sls or pkgs/init.sls in your fileroot for the base-env?
14:45 signull irctc575: salt is a command line tool. it posts back info to your standard out. it would seem strange if it didnt follow the norm.
14:46 moos3 irctc575 what kind of packages are you installing that is going to take hours ?
14:46 signull sadly that norm is being a process that runs in the forground and thusly would be terminated if you get kicked
14:46 moos3 I suggest if your on your own infra you make your own repo to pull from
14:46 irctc575 moos3 , in house developed RPMs
14:46 oldmantaiter joined #salt
14:47 moos3 i have one in house package that pulls in 100+ deps and it installs in less when 20 minutes, buy new hw :)
14:47 dergrunepunkt xf10e: yes, I do
14:47 dergrunepunkt xf10e: I been using that a lot in many places :P
14:49 irctc575 I guess , I have to check the concept of scheduling then in salt. Don't know if it exists or not ?
14:50 xf10e dergrunepunkt: hmmmm... master.d/file.conf? maybe a change in /etc/salt/master, that overwrote you master.d/file.conf?
14:50 favadi joined #salt
14:52 genediazjr joined #salt
14:52 dergrunepunkt xf10e: I have saltstack/master.d/pillar_roots.conf
14:53 giantlock joined #salt
14:53 dergrunepunkt odd is that I have the very same in other master
14:54 bhosmer_ joined #salt
14:56 stoogenmeyer_ joined #salt
14:56 xf10e dergrunepunkt: `grep -R file_roots /etc/salt/`? just to make sure you don't have it specified... wait, you can't have two of those, it's turned into one dictionary... hmmm... switch the masters logging to debug and read the log very carefully? ^^"
14:57 andrew_v joined #salt
14:57 xf10e maybe something like git for file_roots is interfering
14:57 dergrunepunkt nono, I have two masters for two differents deployments
14:58 yomilk joined #salt
14:58 xf10e same versions?
14:59 dergrunepunkt lastest stable
14:59 dergrunepunkt v2014.07
15:00 xf10e ..no idea... restarted the master after changing the config?
15:00 nitti_ joined #salt
15:00 markizano joined #salt
15:01 jonbrefe joined #salt
15:01 dergrunepunkt gee
15:01 dergrunepunkt found it
15:01 dergrunepunkt broken link
15:02 xf10e LOL... yeah, sometimes it's just something simple in the filesystem... ^^
15:03 ndrei joined #salt
15:04 xf10e "what do you mean, MySQL can't write its logfile?? this state here clearly state the logdir should be chown'ed to... oh. to root."
15:05 jonbrefe1 joined #salt
15:06 vbabiy joined #salt
15:07 workingcats joined #salt
15:08 housl joined #salt
15:10 genediazjr joined #salt
15:11 hobakill joined #salt
15:12 JDog Could someone have a look at my mysql pillar and tell me why I can't login to the server in Ubuntu after install please?
15:13 JDog https://gist.github.com/jontyneedham/5b0dbf087df28fa8f92e
15:13 JDog That gist -- sorry forgot to add it!
15:16 xf10e JDog: you're missing 2 spaces of indention on line 19
15:16 dude051 joined #salt
15:16 xf10e and on lines 30-32, too
15:17 iggy http://yaml-online-parser.appspot.com/
15:18 jalbretsen joined #salt
15:19 xf10e JDog: `salt $MINION pillar.items mysql` would show you that everything below line 19 would be missing
15:21 xf10e (from the "mysql" key in pillar that is)
15:21 spiette joined #salt
15:22 vbabiy joined #salt
15:23 twellspring joined #salt
15:26 JDog Ah. I got an entry in "_errors" which stated that mysql_pillar.sls couldn't be rendered and to check the master log.
15:27 xf10e oh yeah, right, asking for the "_errors" key in addition to the data you're working on is always helpful
15:28 trikke joined #salt
15:31 vbabiy_ joined #salt
15:31 Brew joined #salt
15:31 nitti joined #salt
15:32 dooshtuRabbit joined #salt
15:33 FRANK_T Is anyway that I can target OS by version?
15:34 Barbaros1a Have a look at grains
15:34 FRANK_T I did
15:35 Barbaros1a You might want to run "salt-call grains.items" on a minion in question an look for the items identifying your distribution
15:35 FRANK_T I cant target by OS
15:35 FRANK_T but I want to target for eg. Centos 6.5  and 7.0
15:36 xf10e FRANK_T: os_finger will give you something like "Ubuntu-14.04" so you can use `salt -G os_finger:Ubuntu-14.04 ...`
15:36 xf10e (might be osfinger...)
15:36 linjan joined #salt
15:36 quickdry21 joined #salt
15:37 Ozack joined #salt
15:37 FRANK_T let me check
15:40 ndrei joined #salt
15:40 iggy for debian/ubuntu distros, I usually look at oscodename... don't know about rhel based stuff
15:40 vbabiy joined #salt
15:40 FRANK_T mm..
15:41 xf10e most OS' don't use codenames for releases, iggy ;)
15:41 * xf10e wonders if the OS X minion sets the oscodename...
15:42 giannello joined #salt
15:42 slatnoob joined #salt
15:42 felskrone joined #salt
15:42 iggy debian/ubuntu does... so if that's all you have in your infrastructure, then you're golden
15:42 xf10e of course ^^
15:42 xf10e I'm off, see ya folks
15:43 JDog xf10e: thanks
15:47 trikke joined #salt
15:48 slatnoob I am running salt master in debug mode, just ran one of my forst sls(states) but there seem to be little in the way of a confirmation that this is working. In light of the fact i have no error codes....
15:48 slatnoob Is this by design?
15:49 slatnoob Should mention my minion is also running in debug and i dont really see anything in the way of errors there.
15:49 slatnoob i am in learning mode, just need some help...
15:49 moos3 anyone ever seen this with #!py states ?   File "/usr/lib/python2.6/site-packages/salt/utils/templates.py", line 386, in py
15:49 moos3 data = mod.run()
15:50 bluenemo joined #salt
15:50 bluenemo joined #salt
15:51 FRANK_T slantnoob are you running Salt -v ?
15:52 slatnoob @FRANK_t -no, until now i have just run it in the forground with -l debug
15:52 FRANK_T ok
15:52 FRANK_T try -v
15:53 slatnoob OK appreciate that.
15:54 JDiPierro joined #salt
15:54 akas joined #salt
15:54 nitti joined #salt
15:55 moos3 does anyone know how to make #!py log out in -l debug ?
15:56 higgs001 joined #salt
15:58 hvn joined #salt
15:58 hvn joined #salt
15:58 nitti_ joined #salt
15:59 aqua^mac joined #salt
15:59 nyx_ joined #salt
16:04 teogop joined #salt
16:05 vbabiy joined #salt
16:06 schristensen joined #salt
16:07 SheetiS joined #salt
16:09 vbabiy joined #salt
16:10 nitti joined #salt
16:10 teskew1 joined #salt
16:12 twellspring joined #salt
16:17 jngd joined #salt
16:23 MKFG joined #salt
16:23 MKFG joined #salt
16:23 conan_the_destro joined #salt
16:26 vbabiy joined #salt
16:27 jonatas_oliveira joined #salt
16:29 lb1a joined #salt
16:32 favadi left #salt
16:38 Grokzen joined #salt
16:38 Heartsbane joined #salt
16:38 Heartsbane joined #salt
16:45 twellspring joined #salt
16:47 yomilk joined #salt
16:49 elfixit joined #salt
16:49 twellspring joined #salt
16:51 SpX joined #salt
16:53 elco_ joined #salt
16:53 murrdoc joined #salt
16:53 booly-yam-5635 joined #salt
16:54 StDiluted joined #salt
16:54 johanek joined #salt
16:57 spookah joined #salt
17:01 bhosmer_ joined #salt
17:06 TyrfingMjolnir joined #salt
17:07 dimeshake hmm - Ebs.VolumeSize seems to have stopped working for me with salt-cloud. Anyone else seeing this?
17:12 gladiatr joined #salt
17:12 gladiatr joined #salt
17:15 arno joined #salt
17:15 moos3 anyoe use the salt api ?
17:17 arno joined #salt
17:19 spookah joined #salt
17:19 pdayton joined #salt
17:20 twellspring joined #salt
17:21 wnkz moos3: mostly for webhooks ; but what's your problem ?
17:21 moos3 tyring to figure out how to pull diskusage our of minions
17:22 moos3 so when i do /login , how do i use the token returned in my curl to access minions
17:22 bluenemo_ joined #salt
17:23 bluenemo_ joined #salt
17:23 linjan joined #salt
17:24 giannello joined #salt
17:24 meteorfox joined #salt
17:24 rjhintz joined #salt
17:25 twellspring joined #salt
17:25 Grokzen joined #salt
17:25 JDiPierro joined #salt
17:25 wnkz moos3: well, according to the doc ; you have to supply the token in a 'X-Auth-Token' header
17:26 rjhintz joined #salt
17:27 wnkz moos3: https://salt-api.readthedocs.org/en/latest/ref/netapis/all/saltapi.netapi.rest_cherrypy.html
17:27 KyleG joined #salt
17:27 KyleG joined #salt
17:27 forrest joined #salt
17:27 schlueter joined #salt
17:28 aparsons joined #salt
17:29 murrdoc use pepper
17:30 murrdoc https://github.com/saltstack/pepper sorta abstracts away using the api
17:30 moos3 murrdoc intersting,
17:32 murrdoc its from whiteinge and if u upgrade stuff in it, he ll appreicate pull requests
17:32 murrdoc hes the man
17:34 teskew1 joined #salt
17:36 gustavobgama joined #salt
17:37 jngd joined #salt
17:39 hasues joined #salt
17:39 hasues left #salt
17:40 hebz0rl joined #salt
17:44 tomspur joined #salt
17:44 Gareth morning morning
17:46 gustavobgama joined #salt
17:47 ndrei joined #salt
17:47 aqua^mac joined #salt
17:50 teogop joined #salt
17:51 shaggy_surfer joined #salt
17:54 desposo joined #salt
17:58 jonatas_oliveira joined #salt
18:01 jonatas_oliveira joined #salt
18:02 smcquay joined #salt
18:02 mrjk joined #salt
18:04 madduck joined #salt
18:06 druonysuse joined #salt
18:06 druonysuse joined #salt
18:06 JDiPierro joined #salt
18:12 theologian joined #salt
18:13 arno joined #salt
18:18 shaggy_surfer joined #salt
18:19 JDiPierro joined #salt
18:22 spookah joined #salt
18:24 overyander joined #salt
18:24 higgs001 joined #salt
18:25 StDiluted I’m using the users formula here: https://github.com/saltstack-formulas/users-formula
18:25 StDiluted oh wait, never mind, answered my own question
18:28 twellspring joined #salt
18:30 felskrone joined #salt
18:31 hvn joined #salt
18:31 hvn joined #salt
18:36 yomilk joined #salt
18:36 echtish joined #salt
18:36 TheThing joined #salt
18:37 monokrome joined #salt
18:41 higgs001 joined #salt
18:41 pcdummy Can i have a "base" os_family here which all the others include: http://pastebin.com/5v8eRCQB http://pastebin.com/vKdT6KRM ?
18:42 workingcats joined #salt
18:45 smcquay joined #salt
18:47 iggy I think you can only have a default in grains.filter_by
18:48 theologian joined #salt
18:48 echtish joined #salt
18:50 pcdummy so i need to set the default in the .sls , right?
18:50 geekatcmu joined #salt
18:50 twellspring joined #salt
18:51 pcdummy the other default.yaml way would give me and others an easy overview without having to write and maintain a pillar.example.sls
18:51 17SABJZB0 joined #salt
18:56 LeProvokateur joined #salt
18:57 ndrei joined #salt
18:57 frayser joined #salt
19:00 twellspring joined #salt
19:01 vbabiy joined #salt
19:04 JDiPierro joined #salt
19:04 gngsk joined #salt
19:05 hasues joined #salt
19:05 hasues left #salt
19:08 gngsk Greetings all, I'm trying to ensure that an included sls is run last. I'm trying to use the order: last syntax specified in https://github.com/saltstack/salt/issues/5255; however, I'm receiving a yaml rendering error. Both master and minion are running 2014.7.0 from epel on CentOS 6.5.
19:11 repl1can1 joined #salt
19:11 jonatas_oliveira joined #salt
19:15 gladiatr joined #salt
19:15 gladiatr joined #salt
19:16 twellspring joined #salt
19:16 gngsk Oh my, I just realized the syntax in that ticket is from the reporter... I suppose I shouldn't expect it to work.
19:20 gladiatr joined #salt
19:20 gladiatr joined #salt
19:21 Mso150 joined #salt
19:22 rypeck joined #salt
19:22 iggy gngsk: I would avoid specifying order, and just use the other requisites (require, watch, listen, etc)
19:22 gngsk can you use those with include?
19:23 iggy yes
19:23 gngsk ok, i'll give that a shot, thanks
19:24 Mso150_y joined #salt
19:24 iggy sometimes it's easier to use the _in variants (watch_in, listen_in) etc.
19:24 iggy but try posting some code you are working with and maybe someone will have better suggestions
19:26 bhosmer joined #salt
19:27 murrdoc iggy:  do you know what __context__ is in the python code
19:27 murrdoc nvm i googled
19:27 iggy not off the top of my head... where?
19:27 murrdoc http://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html
19:29 freelock joined #salt
19:30 murrdoc i was trying to write a _state that wrapped teh pkg.installed state, so i could pass it a pillar and install a whole bunch of packages, there is way to 'extend' states so to speak
19:32 vbabiy joined #salt
19:32 jespada joined #salt
19:33 felskrone joined #salt
19:34 nitti_ joined #salt
19:34 hasues joined #salt
19:34 hasues left #salt
19:35 gngsk I just ended up moving the include out and putting it in top
19:36 gngsk I think I was trying to do too much with that state...
19:36 aqua^mac joined #salt
19:39 aparsons joined #salt
19:41 BrendanGilmore joined #salt
19:41 linjan joined #salt
19:42 CryptoMer joined #salt
19:42 CryptoMer Hey Everyone, I've run into a problem with a freshly-installed salt (2014.7.0), that I've not seen before.
19:43 CryptoMer http://pastebin.com/nbCrCjk6
19:43 CryptoMer any thoughts?
19:43 iggy CryptoMer: you need to install the markupsafe python module
19:43 CryptoMer It mentions no module named markupsafe, but none of my other instances have required this module to be explicitely installed...
19:44 murrdoc its a part of jinja
19:44 iggy it's installed separately on my masters
19:45 CryptoMer I don't have python-markupsafe (or any markupsafe) installed on any of my salt instances. Masters, syndics, or minions.
19:45 CryptoMer @murrdoc: it's part of jinja?
19:45 murrdoc centos?
19:45 CryptoMer ya, 6.2 and 6.5 instances.
19:45 murrdoc do u have access to pip ?
19:45 murrdoc on these servers
19:45 murrdoc and how did u install salt master
19:45 CryptoMer the particular one where this is failing is 6.2
19:45 CryptoMer via yum
19:46 CryptoMer grabbed the packages from epel and threw them onto my private repo
19:46 CryptoMer I've installed salt on ~500 servers without incident. This one is a new one for me. hah
19:46 aparsons joined #salt
19:46 CryptoMer I wonder if this machine has a diff verson of jinja...
19:46 murrdoc pip install markupsafe should work
19:47 CryptoMer k. Any idea why that would be required on this one-off instance? I realize it's not a very great question to ask. hah
19:48 CryptoMer I'm doing package verification between several hosts. It's probably a different version of something, somewhere. ;)
19:48 SheetiS I'm thinking it has to do with the jinja version 2.7.1
19:49 SheetiS most of my centos6 boxen actually installed a REALLY old version of jinja
19:49 SheetiS like 2.2.1
19:49 CryptoMer ./nods. That's what I've got...
19:49 CryptoMer python-jinja2-2.2.1-1.el6.x86_64 (sigh)
19:49 CryptoMer ohh, but this one is seeing 2.7.1! Nice catch!
19:50 SheetiS yeah /usr/lib/python2.6/site-packages/Jinja2-2.7.1-py2.6.egg/jinja2/utils.py
19:50 Brew1 joined #salt
19:51 druonysuse joined #salt
19:51 druonysuse joined #salt
19:51 CryptoMer ok ya. Someone installed jinja 2.7.1 via pip.
19:51 CryptoMer ok, I've got something to work with! Thanks!
19:51 murrdoc calledit
19:51 CryptoMer lol
19:55 Brew joined #salt
19:58 amustafa joined #salt
19:59 nitti joined #salt
19:59 signull_ joined #salt
20:00 amustafa hey guys, I'm seeing a pretty weird issue. I have a state that uses blockreplace to add commands to rc.local and .profile. I have two identical machines. It only works on one of the machines.
20:00 amustafa On the other, it displays this error "State file.blockreplace found in sls deb.jackd is unavailable"
20:02 signull__ joined #salt
20:03 amustafa They are both at the same version, with the same master
20:03 amustafa Both minions are at the same version*
20:03 amustafa of salt
20:04 MK_FG joined #salt
20:04 MK_FG joined #salt
20:04 aparsons joined #salt
20:05 amustafa and both files have the same permissions and owners
20:08 ndrei joined #salt
20:08 iggy try pasting the code somewhere
20:10 amustafa http://pastebin.com/UvSqEYgg
20:12 amustafa Interesting, I just ran the command locally on the minion like this: salt '*610' cmd.run "salt-call -l debug state.sls deb.jackd"
20:12 amustafa and it worked
20:14 Auroch joined #salt
20:14 amustafa Running it from the master still fails (salt '*610' state.sls deb.jackd)
20:15 CryptoMer amustafa: you could try restarting the minion, and see if that will pick it up. It could be a caching problem.
20:15 iggy I've seen something like that before, can't remember what I did to fix it
20:16 SheetiS joined #salt
20:19 simmel joined #salt
20:19 hintss joined #salt
20:19 hvn joined #salt
20:19 hvn joined #salt
20:22 ajw0100 joined #salt
20:23 mrjk joined #salt
20:24 amustafa rebooting did not solve the problem
20:25 yomilk joined #salt
20:25 ecdhe_ joined #salt
20:25 bhosmer_ joined #salt
20:28 murrdoc whiteinge:  u around, i wanted to understand whats the recommendation for this https://github.com/saltstack/salt/issues/8878
20:33 jerematic joined #salt
20:34 SheetiS joined #salt
20:36 druonysus joined #salt
20:36 druonysus joined #salt
20:37 booly-yam-4014 joined #salt
20:37 schristensen joined #salt
20:37 vectra joined #salt
20:38 thedodd joined #salt
20:38 gladiatr joined #salt
20:40 gustavobgama left #salt
20:43 aparsons joined #salt
20:47 ksalman while using 'grains_cache: True' is there no way to refresh grains from the master? --refresh-grains-cache only works with salt-call, on the minion
20:48 ksalman while saltutil.sync_grains will "Sync the grains from the _grains directory on the salt master file server"
20:48 dfinn joined #salt
20:57 giantlock joined #salt
20:57 signull joined #salt
20:58 signull joined #salt
20:58 perfectsine joined #salt
21:03 Mso150_y_i joined #salt
21:03 ksj_ joined #salt
21:03 vbabiy joined #salt
21:11 REdOG joined #salt
21:11 vbabiy joined #salt
21:21 signull_ joined #salt
21:25 iggy so you want to over-ride the grains_cache setting?
21:25 aqua^mac joined #salt
21:30 higgs001 joined #salt
21:31 signull joined #salt
21:32 plariv joined #salt
21:33 xliiv joined #salt
21:35 plariv left #salt
21:37 E1NS left #salt
21:39 pcdummy Asking my question again: Can i have a "base" os_family here which all the others include: http://pastebin.com/5v8eRCQB http://pastebin.com/vKdT6KRM ?
21:40 yomilk joined #salt
21:40 jonbrefe joined #salt
21:41 diegows joined #salt
21:41 Singularo joined #salt
21:41 diegows hi
21:41 diegows simple question
21:41 diegows when you run salt-call state.higstate from a minion
21:42 diegows does it pull the latest recipes from the master?
21:42 SneakyPhil pcdummy: I think you want to use a pillar
21:42 SneakyPhil right, you are. disregard me
21:42 jonbrefe1 joined #salt
21:43 aurynn diegows, I think so, yes
21:47 iggy diegows: highstate always causes a sync (no matter if it was initiated from the master or the minion)
21:47 elco_ joined #salt
21:49 diegows aurynn, iggy good to know..thanks!
21:49 ksalman while using 'grains_cache: True' is there no way to refresh grains from the master? --refresh-grains-cache only works with salt-call, on the minion
21:49 ksalman while saltutil.sync_grains will "Sync the grains from the _grains directory on the salt master file server"
21:51 druonysus joined #salt
21:51 druonysus joined #salt
21:53 iggy ksalman: wait for the cache expiration
21:53 ksalman =(
21:53 ksalman I was hoping i could force it
21:53 murrdoc sync_modules wipes it
21:53 murrdoc no ?
21:54 FRANK_T joined #salt
21:55 Nazzy joined #salt
21:55 Nazzy joined #salt
21:56 casey|sfe joined #salt
21:56 iggy doubt it
21:57 pviktori joined #salt
21:57 iggy sync_modules syncs /srv/salt/_modules to the minions... I don't think it's going to do anything with grains
21:58 iggy I don't think sync_grains (or sync_all) would either
21:58 ksalman nope
21:58 ksalman according to doc that just syncs _grains from master
21:59 iggy ksalman: try sync_all refresh=True
21:59 yomilk joined #salt
21:59 iggy still don't think it will, but it might
21:59 ksalman okay
22:00 ksalman no, that did not work either
22:01 bhosmer_ joined #salt
22:02 casey|sfe i am getting some confusing behavior with the pillar
22:02 iggy Just set the cache expiration to a suitable setting that won't hit your api too much, but still updates in timely manner
22:02 casey|sfe should i PM someone or just ask in here?
22:02 ksalman iggy: yea, I doo that for now
22:03 aurynn casey|sfe, just askj
22:03 aurynn -j
22:03 casey|sfe when i try to run any individual state i get this error: Pillar failed to render with the following messages: Jinja variable 'dict object' has no attribute 'environment'
22:03 murrdoc ksalman:  what grain are u trying to refresh
22:04 aurynn casey|sfe, okay, that's a pretty straightforward error
22:04 casey|sfe however if i run state.highstate everything works fine
22:04 aurynn what are you trying to do?
22:04 ksalman murrdoc: i upgraded salt-minion and the master is still seeing old value for saltversion grain
22:04 casey|sfe in pillar/top.sls this is the line it is complaining about:     - creds.postgres.{{ salt['grains.get']('environment') }}    - creds.postgres.{{ salt['grains.get']('environment') }}
22:04 casey|sfe oops sorry double paste
22:05 murrdoc and u restarted the minion
22:05 ksalman murrdoc: i did
22:05 casey|sfe anyway i can get that grain from the command line, and state.highstate seems to read it fine
22:05 murrdoc nuked the cache on disk
22:05 ksalman murrdoc: i am also using grains_cache: True with 1 day for expiration
22:05 casey|sfe but it is missing when i try to run an indiviual state
22:05 ksalman murrdoc: i did not. I guess I could try deleteing that file in /var/cache/
22:06 murrdoc for an upgrade i think it makes sense
22:06 casey|sfe for reference i am storing those creds in a gitignored sls inside pillar
22:06 jonbrefe joined #salt
22:06 ksalman true
22:08 hvn joined #salt
22:08 hvn joined #salt
22:08 ksalman murrdoc: that worked, thaks
22:08 ksalman i deleted /var/cache/salt/minion/grains.cache.p
22:08 shaggy_surfer joined #salt
22:09 iggy ksalman: you might file a bug... that seems like a legitimate use case
22:09 ksalman iggy: alrighty
22:09 lamasnik joined #salt
22:10 murrdoc yes
22:10 murrdoc upgrade should have cleaned up local cache
22:10 murrdoc or at least invalidated it
22:10 jonatas_oliveira joined #salt
22:11 iggy casey|sfe: are you sure that's the actual offending line? the error message would lead me to believe you were doing a dict lookup, but grains.get isn't a dict lookup
22:12 casey|sfe hmm, well it's the only place 'environment' is referenced in the top file
22:12 mosen joined #salt
22:14 casey|sfe here's the whole section: https://gist.github.com/caseydentinger/5b87ec6ee26afc66370a
22:14 iggy put a default in there maybe
22:14 murrdoc - creds.postgres.{{ grains.environment|default('lolpass') }}
22:15 murrdoc or something like that
22:15 murrdoc #nocontextanswersarethebest
22:15 casey|sfe ok lemme try that
22:16 casey|sfe same thing
22:17 casey|sfe here is the full error, maybe i'm reading something wrong: https://gist.github.com/caseydentinger/890f156e98eeeeac7242
22:17 genediazjr joined #salt
22:17 nitti casey|sfe: what are you trying to get here
22:17 casey|sfe but it definitely runs everything without error on state.highstate
22:17 nitti what data are you trying to get from grains
22:18 casey|sfe the "environment" i.e. dev/live/qa
22:18 casey|sfe i have a bootstrap script that sets them in /etc/salt/grains on the minion
22:18 iggy what is filling in that grain?
22:18 casey|sfe it's a long story but i'm replacing a huge broken chef install
22:18 mosen hi saltines
22:18 casey|sfe so i don't have the luxury of starting from scratch
22:19 iggy we specifically don't use jinja in our top files because we had various problems with it... don't remember if that was one
22:20 nitti the salt environment?
22:20 casey|sfe does this imply that the processing is different between saying state.sls and state.highstate?
22:20 portablejim joined #salt
22:21 casey|sfe nitti: there will be different sls files with credentials in there for live db, test db, etc
22:21 iggy it's not the salt env, it's a grain being set in the config file
22:22 casey|sfe yeah -- i wanted to adopt the salt env approach but i have to make it play well with our current infrastructure
22:22 iggy we don't use salt env's either
22:23 casey|sfe we do more of a CI thing than having a development platform
22:23 MK_FG joined #salt
22:23 MK_FG joined #salt
22:23 ksj_ just wondering, with all the work going into salt-ssh, wouldn't it be simpler if salt just did an ssh -R and forwarded ports 4505 and 4506 back to the master?
22:23 ksj_ or is there something I'm missing?
22:23 nitti i thought there was a jinja variable to get at the en
22:23 nitti *environment
22:23 nitti {{ env }}
22:24 nitti i can try it on my deploy here, one sec...
22:24 casey|sfe haha ok i am definitely not reading the error right
22:25 casey|sfe cause i just deleted the entire section from top.sls and still getting it
22:25 iggy the pillar doesn't update until you do a highstate again
22:26 schristensen joined #salt
22:26 casey|sfe oh shoot well let me try again
22:29 nitti yeah the jinja variable is 'env'
22:29 MugginsM joined #salt
22:29 iggy but that's for the salt_env (which is not what we're talking about)
22:31 stevednd is there any way to query a minion from inside a runner on the master?
22:31 casey|sfe welp...that was the problem the whole time
22:31 casey|sfe sigh
22:32 iggy stevednd: for what?
22:33 shel3over joined #salt
22:33 stevednd iggy: to get grains values of a minion while templating
22:33 stevednd mostly for orchestration purposes, but also inside reactors if it's possible
22:33 stevednd I have to imagine it is, but I'm unable to get it working.
22:33 simmel_ joined #salt
22:35 stevednd salt['mine.get'] doesn't return anything
22:35 wincyj hello
22:36 iggy stevednd: you need to set mine_functions for the mine to do anything useful
22:36 stevednd iggy: I don't think it has to do with that
22:36 iggy but I'm not sure any of that works in the context of things running in the master
22:36 stevednd mine.get works just fine when running states on minions
22:37 stevednd right, that's what I think I'm running into
22:37 wincyj http://pastebin.com/Jt7GC6Yr
22:37 wincyj is it correct to cp file?
22:37 stevednd I looked into what the mine runner does, and it loads up something from salt.utils
22:37 stevednd but I can't get at that from a jinja template that I know of
22:38 iggy but reactors, scheduled jobs, runners, etc. shouldn't really be relying on grain data, you should target the jobs and then do any of your grain handling on the minion
22:38 smcquay joined #salt
22:39 nitti_ joined #salt
22:39 nitti_ joined #salt
22:39 kermit joined #salt
22:39 iggy wincyj: I'd use archive.extracted personally
22:40 nitti_ joined #salt
22:41 pcdummy Published some more saltstack resources - https://github.com/pcdummy/saltstack-resources/
22:42 wincyj iggy: http://pastebin.com/01EsVw2p
22:43 wincyj i wrote sth like this
22:43 wincyj is it fine?
22:44 iggy I'm pretty sure require doesn't work like that
22:44 wincyj iggy: what do you mean?
22:46 babilen wincyj: You require other states, but don't write the states in the require block directly
22:46 babilen (you can refer by either ID or name)
22:47 wincyj damn
22:47 wincyj so require: id_of_sls_file?
22:47 iggy not file
22:48 otter768 joined #salt
22:48 wincyj id of salt state?
22:48 wincyj so in this case salt id is glpi right?
22:48 iggy well, you can do a whole file if you want, but not necessary
22:49 wincyj http://pastebin.com/eBmHmUx1
22:49 iggy you'd probably have a state higher in that file called prereq_pkgs or something... in that state you'd have the list of packages to install, then the require would be pkg: prereq_pkgs
22:49 wincyj ok lets assume require is fine
22:49 wincyj are the rest lines ok?
22:49 wincyj iggy: ok i understand
22:50 stevednd iggy: there are some deficiencies with targeting. Primarily the fact that you can only wildcard at the end of a path
22:54 MugginsM w00t, my first salt PR :)
22:54 murrdoc rejeced!
22:54 * MugginsM grins
22:55 mosen hah
22:56 mosen MugginsM: what's it for?
22:56 MugginsM docker login wasn't working
22:57 mosen MugginsM: cool. very worthwhile then
22:57 anotherZero joined #salt
22:58 jonbrefe joined #salt
22:58 MugginsM was a blocker for me
22:59 mosen I wonder if i PRd a module would they consider it
22:59 murrdoc https://github.com/raphaelcohn/swaddle
22:59 murrdoc unrelated but cool
22:59 murrdoc mosen:  answer is always yes
23:00 murrdoc the salt dev is the nicest , mergiest crew there is
23:00 mosen cool, I will give it a try at least
23:00 teogop joined #salt
23:00 mosen I started a mac_shadow module because theres no password management at the moment
23:02 teogop joined #salt
23:03 teogop joined #salt
23:05 teogop joined #salt
23:06 Gareth mosen: that's awesome.  fairly certain that would be merged in.
23:07 mosen Gareth: cool I'll give it a try, hopefully not rejected on grounds of horrible code :)
23:07 Gareth It won't be rejected, worst that will happen is that someone will give you pointers on how to get it merged.
23:07 alairock joined #salt
23:08 alairock I keep getting `State 'npm.installed' found in SLS 'node' is unavailable`. Not sure why, anyone else run into this issue, or know how to resolve it??
23:08 ckao joined #salt
23:09 iggy alairock: usually you don't have some dependency installed (on the minion)
23:09 wincyj ok how to copy from local machine to remote assuming i use salt-ssh
23:09 wincyj im confused
23:09 wincyj ;/
23:11 kbyrne joined #salt
23:13 hal58th1 wincyj exactly the same as a regular copy from a master to minon
23:13 wincyj cp: ?
23:14 hal58th1 file.managed I would try to get a local minion working first, for ease of testing
23:14 wincyj well it doesnt work
23:14 aqua^mac joined #salt
23:14 hal58th1 wincyj, we need a lot more info for anyone to get to help you.
23:17 wincyj hal58th1: http://pastebin.com/cjn0AjN8
23:18 teogop joined #salt
23:19 hal58th1 - name: '/tmp/glpi-massocsimport-1.6.1.tar.gz'   You have to specify the whole name and not just the destination
23:19 portablejim joined #salt
23:19 portablejim joined #salt
23:20 wincyj hal58th1: ah thx
23:20 wincyj will try
23:21 wincyj Comment: Source file salt://tars/glpi-massocsimport-1.6.1.tar.gz not found
23:21 wincyj well
23:21 wincyj what does salt:// mean?
23:21 wincyj root dir of running salt-ssh?
23:22 hal58th1 salt:// usually transfers to the directory /srv/salt/ on the server that salt-master is installed on
23:23 wincyj what if i want to use ~/salt/tars?
23:23 wincyj via salt-ssh?
23:24 aparsons joined #salt
23:24 hal58th1 You have to tell the master to use that directory as your main salt folder. It will be in the /etc/salt/master file
23:25 hal58th1 restart salt-master after making your change
23:26 hal58th1 wincyj in case you are wondering, you can't just specify a file to use on the master, you have to start with salt://
23:26 wincyj damn it
23:26 wincyj maybe i can specify absolute path?
23:27 murrdoc shit iggy do u remember the guy who was in here yesterday asking about defines
23:27 murrdoc i feel like i have mislead him
23:28 signull_ joined #salt
23:29 wincyj hal58th1: nope absolute path is not correct :D
23:30 hal58th1 wincyj, nope. no absolute or relative paths. All from salt:// :P
23:32 aparsons joined #salt
23:32 iggy I wasn't in here yesterday
23:32 murrdoc sorry, yester'workday'
23:33 aparsons joined #salt
23:34 wincyj hal58th1: so how do i do that?
23:34 wincyj i got all my salt files in ~/salt
23:34 wincyj and theres also master file
23:34 iggy my scrollback doesn't go back that far
23:34 aparsons joined #salt
23:35 murrdoc its ok
23:35 murrdoc basically the equivalent of puppet defines are jinja macros, moreyouknow.jpg
23:36 hal58th1 wincyj master file has to be in /etc/salt/master
23:37 wincyj mhm
23:37 hal58th1 not sure what your question is
23:37 tomh- joined #salt
23:39 rypeck Is the timeout value for the command line salt in seconds or minutes/
23:39 rypeck Doesn't say.
23:40 hal58th1 rypeck1 seconds
23:40 aparsons joined #salt
23:42 badon joined #salt
23:44 rypeck hal58th1: thanks
23:51 cberndt joined #salt
23:51 hal58th joined #salt
23:57 hvn joined #salt
23:57 hvn joined #salt
23:58 lamphiear joined #salt
23:58 furball365 joined #salt
23:59 aparsons joined #salt
23:59 aquinas joined #salt

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