Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-04-11

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

All times shown according to UTC.

Time Nick Message
00:03 whatever_sd_ joined #salt
00:11 jnials_ joined #salt
00:34 quix joined #salt
00:41 antpa joined #salt
00:41 kevinquinnyo joined #salt
00:57 antpa joined #salt
01:01 cberndt joined #salt
01:05 whatever_sd_ joined #salt
01:07 amcorreia joined #salt
01:10 edrocks joined #salt
01:17 catpiggest joined #salt
01:29 mavhq joined #salt
01:29 michelangelo joined #salt
01:36 source47 joined #salt
01:38 berserk joined #salt
01:42 west575 joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.8.8, 2016.3.0rc2 | SaltConf16: http://saltconf.com/register/ | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:51 favadi joined #salt
01:57 quique joined #salt
02:21 antpa joined #salt
02:23 racooper joined #salt
02:25 scoates joined #salt
02:27 jasonrm joined #salt
02:38 source47 joined #salt
02:51 favadi joined #salt
02:51 cberndt joined #salt
02:54 quasiben joined #salt
02:57 ramteid joined #salt
02:57 brianfeister joined #salt
03:02 quasiben joined #salt
03:05 beardedeagle joined #salt
03:19 jerredbell joined #salt
03:20 evle joined #salt
03:23 antpa joined #salt
03:29 kevinquinnyo joined #salt
03:39 source47 joined #salt
03:45 ITChap joined #salt
03:48 msn joined #salt
03:56 source47 joined #salt
03:57 armguy joined #salt
03:59 treaki_ joined #salt
04:05 hasues joined #salt
04:05 hasues left #salt
04:28 jerredbell joined #salt
04:40 jerredbell joined #salt
04:43 ITChap joined #salt
04:48 brianfeister joined #salt
04:52 absolute joined #salt
04:53 dyasny joined #salt
04:57 source47 joined #salt
05:00 antpa joined #salt
05:05 kshlm joined #salt
05:06 APLU joined #salt
05:16 jeffspeff joined #salt
05:21 antpa joined #salt
05:31 favadi joined #salt
05:32 jhauser joined #salt
05:34 mavhq joined #salt
05:38 dmaiocchi joined #salt
05:48 ribx joined #salt
05:51 msn2 joined #salt
05:55 NightMonkey joined #salt
05:59 source47 joined #salt
06:02 felskrone joined #salt
06:02 kevinquinnyo joined #salt
06:08 colttt joined #salt
06:09 CeBe joined #salt
06:10 mavhq joined #salt
06:23 Sammichmaker joined #salt
06:25 slav0nic joined #salt
06:28 ravenx joined #salt
06:30 ravenx while running my salt-minion as root, with 'salt-minion -l debug' i keep getting stuck in a restart loop
06:30 ravenx https://paste.debian.net/432097/
06:30 ravenx this is my log.  and it just keeps generating these.
06:31 source47 joined #salt
06:31 source47 hi guys, i am getting 'configured provider <my minion name> is not reachable' from salt-cloud
06:31 source47 any ideas what i can do here?
06:32 slav0nic joined #salt
06:33 AndreasLutro try logging into the host manually, check that your ssh keys or whatever your cloud provider needs are correct etc
06:37 brianfeister joined #salt
06:40 yuhlw joined #salt
06:42 dyasny joined #salt
06:45 yuhlw joined #salt
06:48 mavhq joined #salt
06:55 elsmo joined #salt
07:00 brianfeister joined #salt
07:10 ravenx any one
07:10 ravenx i have been having this problemf or close to a week now.
07:11 AirOnSkin joined #salt
07:13 iggy I think I suggested burning it to the ground
07:15 RDc joined #salt
07:20 Vaelatern joined #salt
07:20 ronnix joined #salt
07:21 antpa joined #salt
07:21 lero joined #salt
07:22 bdrung_work joined #salt
07:26 kawa2014 joined #salt
07:29 punkoivan joined #salt
07:30 ronnix joined #salt
07:32 atmosx Hello, will both of them work? https://gist.github.com/atmosx/db6974684fca3d95b149984c081b0031 I want to run a state only in a specific FQDN
07:34 KermitTheFragger joined #salt
07:34 hemebond atmosx: Yes, though you might get an error with the second if it results in nothing under - include
07:35 slav0nic joined #salt
07:36 atmosx The first case makes more sense. But is the identation correct?
07:36 atmosx vim doesn't display an error
07:36 hemebond Indentation looks fine to me.
07:36 hemebond Actually..
07:36 hemebond Shouldn't it be ^include: instead of ^- include: ?
07:37 atmosx hm
07:37 hemebond I'm not sure I've used includes.
07:38 JohnnyRun joined #salt
07:38 atmosx like https://gist.github.com/atmosx/db6974684fca3d95b149984c081b0031
07:38 hemebond That's it.
07:39 dgutu joined #salt
07:41 babilen atmosx: I'd simply target that state by fqdn in your top.sls
07:41 atmosx babilen can you show me a sample?
07:42 babilen https://docs.saltstack.com/en/latest/topics/targeting/compound.html → G@os:fqdn -- https://docs.saltstack.com/en/latest/ref/states/top.html
07:42 hemebond My minion IDs are FQDN-like for that reason.
07:42 babilen err
07:42 babilen G@fqdn:.... -- Oh, your minion id would be head1.dc21.scrapinghub.com already?
07:43 hemebond Yeah, just to make sure I'm targeting the right minions.
07:43 atmosx babilen yeah
07:43 hemebond Since I currently have several different environments and projects in the one master.
07:43 atmosx the fqdn is not dynamic in my case
07:43 babilen Well, then it is as easy as: base: 'head1.dc21.scrapinghub.com': - zabbix.mesos-resources
07:43 hemebond Though it's FQDN-like, not an actual FQDN.
07:44 hemebond atmosx's requirements are different though :-)
07:44 babilen How do you know?
07:44 hemebond I guess I don't really.
07:45 hemebond But if atmosx is targeting the grain I just assumed it was because the minion ID couldn't be used to differentiate.
07:45 babilen A state such as test.sls doesn't make sense as all it achieves is targeting "zabbix.mesos-resources" to the minion with the fqdn "head1.dc21.scrapinghub.com" -- That can be done easier and more explicitly in the top.sls
07:45 atmosx babilen I'm working on a init.sls will that work?
07:46 babilen atmosx: Let's start differently: What do you want to achieve?
07:47 atmosx babilen ok, I want run a state (add as script and a line to a file) to this host. But there's already an init.sls to handle zabbix installation on a big number of hosts. I want to avoid running this state in any other host except the one with the fqdn
07:47 babilen Generally speaking I wouldn't perform targeting in the state SLS (or include logic that does that), but to simply target the states where I want them ..
07:47 antpa joined #salt
07:47 babilen atmosx: Is that the entire state?
07:47 babilen (the test.sls)
07:48 atmosx babilen no
07:49 atmosx that was just a snippet for me to understand how jinja works
07:49 atmosx reading this https://docs.saltstack.com/en/latest/topics/tutorials/states_pt3.html and some online resources.
07:50 babilen atmosx: One moment please
07:51 dgutu joined #salt
07:52 babilen atmosx: https://www.refheap.com/117328 -- Those two are equivalent (and the second is a *lot* easier to read)
07:54 atmosx babilen yes, let me check a few things
07:56 babilen There might be genuine reasons to do something like the things you showed, but for me it boils down to: "If I don't want a state on a minion I do not target it there" and, conversely, "If I want a state on a minion I target that minion"
07:56 Miouge joined #salt
07:57 atmosx babilen yes that might work actually and it's cleaner yes. I'll test it on vagrant, ty.
07:59 babilen atmosx: Salt's targeting system is incredibly powerful and you can express an almost infinite number of combinations with it. Take advantage of it!
08:00 babilen If you want to define larger groups you can also target data by pillars and then target states by that data. Or make use of grains and target only specific distributions or minions in an IP range or combinations of all of these things
08:00 atmosx babilen I need some training tbh on salt. btw will salt understand that this is a host (fqdn) on the fly?
08:00 atmosx You don't define anything here: https://www.refheap.com/117328#L-17
08:01 source47_ joined #salt
08:01 babilen atmosx: You said that it is also its ID
08:01 atmosx So we're targeting by ID here
08:01 babilen Yes
08:02 babilen You *can* target by fqdn or, rather, by the fqdn grain with: 'G@fqdn:head1.dc21.scrapinghub.com': - matcher: compound
08:03 atmosx the link you posted, hm. Let me make sure thats the id, using the 'id' makes more sense and it's easier to read for others too IMHO
08:03 babilen Or, even: 'fqdn:head1.dc21.scrapinghub.com': - matcher: grain -- https://docs.saltstack.com/en/latest/topics/targeting/grains.html
08:04 babilen It really depends on your needs and wishes, but targeting by id is the default
08:06 atmosx yeah the fqdn is the id, awesome, thanks a lot babilen ... tbh you work for saltstack?
08:06 babilen I don't
08:06 atmosx err: tbh I need some training.
08:09 ronnix_ joined #salt
08:14 cliluw joined #salt
08:14 ronnix joined #salt
08:15 source47 hi guys, my salt-cloud doesnt seem to be able to find the host salt-minion, but i can access it directly and through master
08:16 source47 any ideas how i can troubleshoot this?
08:16 babilen AndreasLutro addressed that earlier, did you see that?
08:17 kbaikov joined #salt
08:18 mavhq joined #salt
08:22 kevinquinnyo joined #salt
08:22 s_kunk joined #salt
08:22 s_kunk joined #salt
08:23 kbaikov joined #salt
08:29 Hetman joined #salt
08:30 mavhq joined #salt
08:30 ivanjaros joined #salt
08:31 Hetman Hello, guys can I generate pillar from my SLS ? I mean I've got 2 external formulas that I'm syncing through git hooks (mysql and apache) . 1 generating vhost, 1 generating mysql and user ... so for example in my pillar I want to say : myproduct: - environment1 and this will generate for me database environment1, user environment1 and vhost ... currently I need to specify it 3 times in this formulas -
08:31 Hetman looking for way to generate this pillar structure for me without copy paste from existing recipes (external ones)
08:33 losh joined #salt
08:39 keimlink joined #salt
08:39 elsmo joined #salt
08:42 auzty joined #salt
08:44 antpa joined #salt
08:45 MadHatter42 joined #salt
08:46 liviudm joined #salt
08:51 babilen Hetman: You could easily write that in Python (or even using some jinja loops and logic)
08:52 babilen One easy way is to simply use "{% set myproduct = 'foo' %}" which allows you to reference {{ myproduct }} later
08:59 Hetman yeah trying it now with some jinja logic - just don't want to specify 3 times same thing in pillar and also don't want to touch this external formulas as will broke source control
09:01 babilen Self-refrential pillars / dynamic pillars would be nice, but that would require evaluating non-terminals/terminals
09:01 babilen Oooh ..
09:01 babilen Soon we could have a "Pillars in Chomsky Normal Form" :)
09:02 mavhq joined #salt
09:04 mavhq joined #salt
09:15 hemebond I created a shared-vars YAML file that I then load_yaml
09:15 dunz0r I'm trying to publish radius-secrets via the pillar, but I can't figure out how to just publish the secret to whichever host it corresponds to...
09:15 dunz0r Can't you match in a pillar-file that isn't top? Or am I missing something
09:26 Hetman hemebond: great idea thanks
09:27 dunz0r As in just publishing the data to certain minions based on hostname
09:30 hemebond dunz0r: Yes, you can do tests in Jinja against grains (FQDN, hostname, OS, etc) and the minion ID.
09:31 dunz0r hemebond: Ah, figured as much. Thanks man
09:31 mavhq joined #salt
09:31 hemebond dunz0r: In fact atmosx was talking about just that. Here's an example from babilen I think https://www.refheap.com/117328
09:32 atmosx \o/
09:49 geomacy joined #salt
09:51 babilen dunz0r: It should be pointed out that the minion id is the *only* information you can trust. Minions can easily lie about their grains, so I wouldn't target sensitive information based on that if you have reason to not trust your minions.
10:00 VSpike In https://github.com/saltstack-formulas/users-formula/blob/master/pillar.example can anyone tell me the difference between ssh_auth and ssh_auth_file?
10:02 source47_ joined #salt
10:03 VSpike That's actually quite odd
10:04 kbaikov joined #salt
10:08 VSpike ssh_auth_file and ssh_auth_pillar call file.managed on the authorized keys file in $HOME/.ssh and create the file from the pillar data. ssh_auth and ssh_auth_sources causes ssh_auth.present to be used.
10:09 VSpike Does that seem totally wrong to anyone else, or am I missing something important?
10:10 kbaikov joined #salt
10:11 AndreasLutro file.managed would be more strict, not allowing any non-salt managed public keys to be added
10:12 VSpike Yeah
10:13 eternal_void joined #salt
10:19 hwa joined #salt
10:30 dezet does anybody has experience with salt-cloud on production evn?
10:30 dezet env*
10:36 Edgan joined #salt
10:58 kbaikov joined #salt
11:02 impi joined #salt
11:03 catpig joined #salt
11:03 rem5 joined #salt
11:04 source47 joined #salt
11:05 scoates joined #salt
11:06 kbaikov joined #salt
11:08 Rumbles joined #salt
11:11 amcorreia joined #salt
11:13 ronnix_ joined #salt
11:14 Guest79 joined #salt
11:18 hwa ok so i've managed to add a service into firewalld (permanent)  via a stet filebut now I need to reload firewalld to have the rule in effect? how to do that in a state file?
11:18 hwa *state
11:25 ingslovak joined #salt
11:32 ronnix joined #salt
11:42 Guest79 do i need a specific level of ubuntu? not having much joy installing
11:45 jdjdjd joined #salt
11:46 hemebond _Dave_: What version of Ubuntu are you trying to install on?
11:46 _Dave_ 14.04 LTS
11:46 mowntan joined #salt
11:46 hemebond And are you using the Saltstack repos?
11:47 hemebond https://docs.saltstack.com/en/latest/topics/installation/ubuntu.html
11:47 _Dave_ OK, using updater to sort out package problems
11:47 _Dave_ please hold
11:49 fredvd joined #salt
11:50 colttt joined #salt
11:50 _Dave_ salt-common : Depends: python-msgpack but it is not installable
11:50 _Dave_ Depends: python-requests (>= 1.0.0) but 0.8.2-1 is to be installed
11:57 geomacy joined #salt
12:02 ronnix joined #salt
12:04 blarghmatey joined #salt
12:05 Rumbles joined #salt
12:06 clayman joined #salt
12:09 _Dave_ hemebond++ # once I added the repos to my sources.list
12:18 sjorge joined #salt
12:18 ronnix joined #salt
12:19 antpa joined #salt
12:22 kbaikov joined #salt
12:24 hemebond uh
12:24 hemebond Not fixed?
12:25 hemebond Not sure what to tell you. I have "deb http://repo.saltstack.com/apt/ubuntu/ubuntu14/latest trusty main" and it all installed fine.
12:28 dmaiocchi joined #salt
12:30 kbaikov joined #salt
12:32 Rumbles joined #salt
12:35 antpa joined #salt
12:40 dmaiocchi_ joined #salt
12:43 numkem joined #salt
12:45 edrocks joined #salt
12:45 ThierryR joined #salt
12:46 dmaiocchi joined #salt
12:48 evle1 joined #salt
12:53 jeddi joined #salt
12:55 toastedpenguin joined #salt
12:56 quasiben joined #salt
12:58 akhter joined #salt
12:58 _Dave_ hemebond I had to add  3 things, and manually install a couple of bits. But it appears to be fine now.
12:59 quasiben when using the `client_acl` functionality is it possible to limit the functionality for certain states ?
12:59 quasiben for examples limit state.sls just for state foo and not bar
12:59 mavhq joined #salt
13:00 ThierryR joined #salt
13:01 racooper joined #salt
13:02 MadHatter42 joined #salt
13:03 gh34 joined #salt
13:04 mavhq joined #salt
13:04 sab3r http://pastebin.com/raw/4nrKkYxf do you have any suggestions for this sort of error? update-rc command not found or something.. It's from this line in my elasticsearch-formula: http://pastebin.com/raw/Q8dagJyz. On the minion i can start elasticsearch service normally with "sudo service elasticsearch start"
13:05 scoates joined #salt
13:10 mavhq joined #salt
13:11 ronnix_ joined #salt
13:12 source47 joined #salt
13:13 huddy joined #salt
13:16 mavhq joined #salt
13:17 mavhq joined #salt
13:21 mavhq joined #salt
13:22 Rumbles joined #salt
13:23 sroegner joined #salt
13:27 Rumbles joined #salt
13:30 mavhq joined #salt
13:33 Rckt56 joined #salt
13:35 mapu joined #salt
13:39 mavhq joined #salt
13:39 ronnix joined #salt
13:44 Tanta joined #salt
13:56 mavhq joined #salt
13:58 mavhq joined #salt
14:00 jerredbell joined #salt
14:02 TomJepp joined #salt
14:03 andrew_v joined #salt
14:04 thehaven joined #salt
14:06 jerredbell joined #salt
14:08 hasues joined #salt
14:08 hasues left #salt
14:09 ivanjaros joined #salt
14:09 patarr joined #salt
14:10 _JZ_ joined #salt
14:10 TomJepp joined #salt
14:13 josuebrunel joined #salt
14:13 Faris joined #salt
14:14 toastedpenguin joined #salt
14:15 jerredbell joined #salt
14:17 Faris Hello, does 0mq really present a significant performance gain over the ssh method, on say, 200 nodes?
14:18 tharkun joined #salt
14:18 toastedpenguin joined #salt
14:19 jerredbell joined #salt
14:20 akhter joined #salt
14:20 nZac joined #salt
14:22 ronnix joined #salt
14:24 cyborg-one joined #salt
14:24 Faris joined #salt
14:25 scooby2 Faris: yes
14:26 linjan joined #salt
14:28 mapu joined #salt
14:31 cliluw joined #salt
14:34 irctc007 joined #salt
14:34 babilen Faris: It does, but I can't quantify it. Shouldn't be too hard to measure a "salt '*' some.foo bar" against a "salt-ssh '*' some.foo bar" though.
14:36 irctc007 good morning y'all. Quick question: how do I change properties in WAR file and have salt-master copy the file to minion? I got the second part down, how to copy to the webapp folder, question is how to change specific file and recreate the WAR in-context of SaltStack
14:38 akhter joined #salt
14:42 rm_jorge joined #salt
14:42 AndreasLutro irctc007: I would look for alternate approaches - like using /etc/default/myapp to set environment variables that your java app then uses
14:45 josuebrunel joined #salt
14:46 hajhatten joined #salt
14:51 akhter_1 joined #salt
14:57 whitenoise joined #salt
14:58 ronnix joined #salt
14:59 quique joined #salt
15:01 snc joined #salt
15:04 ecdhe joined #salt
15:05 saltnkotb joined #salt
15:06 saltnkotb hey, so I'm working with trying to set up a salt local run, but it's blowing out with a key error of 'minionfs_env' missing.  I've not really had the best of luck tracking down what this implies I'm missing in my configs.  Ideas?
15:06 irctc007 @andreasLutro: thanks for the suggestion. How would I echo the IP address of the minion ?
15:07 berserk joined #salt
15:07 AndreasLutro irctc007: `salt 'name-of-minion' grains.items` to list all the grains, then you can {{ grains.whatever }} the one you need
15:08 irctc007 @andreasLutro: awesome.
15:08 berserk joined #salt
15:12 edrocks_ joined #salt
15:12 heaje joined #salt
15:12 edrocks_ joined #salt
15:13 Brew joined #salt
15:14 source47 joined #salt
15:14 noway_ joined #salt
15:14 punkoivan joined #salt
15:15 punkoivan left #salt
15:16 tharkun joined #salt
15:16 mpower joined #salt
15:16 mpower Good morning, I have a question regarding calling a state from the minion. When I call a state with the pillar argument on the master I call "salt hypervisorname state.sls createvm.cleanhyperv pillar='{"stagedvm":{"name":"%computername%"}}'" and the execution state works as planned.
15:16 mpower The state executes as planned, but when I try to call the same state with the following syntax: "salt-call publish.publish hypervisorname state.sls arg="[createvm.cleanhyperv,pillar='{"stagedvm":{"name":"%computername%"}}']"", I get an exception "ValueError: Invalid IPv6 URL" hopefully it is a simple syntax mistake, any assistance is appreciated.
15:18 _Dave_ what ipv6 address is it?
15:19 RandyT joined #salt
15:19 mpower i have ipv6 disabled on the master as well
15:19 _Dave_ check /etc/hosts
15:21 teatime mpower: you're using "'s inside ""; isn't that a problem?
15:22 xmj escape them
15:22 mpower let me try that
15:22 _Dave_ "" is bad voodoo
15:24 snc Hi all. Is enabling use of salt-api really just adding the netapi config block to the master?
15:26 brotatochip joined #salt
15:26 akhter joined #salt
15:29 akhter joined #salt
15:29 mpower alright, i pulled the outer double quotes from the minion call, and I get the same exception, only the ipv6 multicast address is in the host file on the master
15:30 _Dave_ I just have:
15:30 _Dave_ ::1             localhost
15:30 _Dave_ fe80::1%lo0localhost
15:30 _Dave_ in my /etc/hsots
15:30 _Dave_ host
15:30 _Dave_ s
15:30 teatime why the hell do you have that 2nd localhost line
15:35 akhter joined #salt
15:36 _Dave_ it's what ubuntu gave me
15:36 teatime weird.
15:36 mavhq joined #salt
15:37 _Dave_ we'll see if it buggers salt for me :)
15:37 teatime I don't expect it will but I find it really strange
15:37 teatime I don't see the point of adding a link-local addr to lo to begin with, much less adding it to /etc/hosts
15:37 teatime but I'm sure there's some reason they'd do that
15:38 teatime (probably some bad reason, knowing ubuntu :)
15:38 mpower I simplified the host file, just in case, and i still get the same exeption, does my syntax look accurate? minus the double quotes around the brackets in arg= ?
15:42 drawsmcgraw joined #salt
15:43 morissette joined #salt
15:47 akhter joined #salt
15:49 saltnkotb Can salt have multiple minion configuration files?  It seems to still want to suck in the values from /etc/salt/minion even if I specify --local on my salt call
15:49 cro you can use --config to point to a separate directory for config
15:50 irctc007 @andreasLutro: I got the IP of the minion by doing salt 'minion-name' grain.item ipv4. It lists both IP (localadress and external IP). How do I get only the external IP?
15:50 saltnkotb cro: cool, thanks.
15:51 AndreasLutro mpower: your arg= thingy isn't valid json
15:51 spuder joined #salt
15:52 AndreasLutro or yaml, rather. try arg='[createvm.cleanhyperv, {pillar: {stagedvm: {name: %computername}}}]'
15:52 AndreasLutro irctc007: salt can't really know which is the public IP so you'll have to write that logic yourself or use a different grain
15:53 AndreasLutro mpower: oh wait nevermind, it uses a different syntax than everything else, ignore me
15:54 mpower thanks for looking at it though!
15:57 AndreasLutro without looking at your sls it's hard to say, maybe the publish module changes how pillars are rendered
15:58 AndreasLutro seems unlikely though
15:58 mpower I will simplify my sls to rule that out
15:58 akhter joined #salt
15:59 brianfeister joined #salt
16:03 ronnix joined #salt
16:04 mpower alright, i put a simple command in a test.sls, which fails all the same. when I pull the second argument "pillar=" it works, the issue is definitely the pillar argument, I am just not sure why
16:05 AndreasLutro hm. you could try moving the ' to before pillar= I guess
16:05 AndreasLutro also I don't know if passing pillars passed as an arg like that are merged recursively or shallow
16:06 toastedpenguin joined #salt
16:06 rm_jorge joined #salt
16:08 berserk joined #salt
16:09 grumm_servire joined #salt
16:09 mpower moving the ' causes the argument to not be formatted as a dictionary
16:09 JohnnyRun joined #salt
16:11 wendall911 joined #salt
16:12 AndreasLutro peculiar
16:12 AndreasLutro can I ask though
16:12 AndreasLutro is there a reason you use publish instead of reactors?
16:16 mpower I was looking into reactors as a solution as well, I am creating a proof of concept for my organization. Calling provision from the endpoint was a bit faster, and then I wanted to call the host of the endpoint to remove any additional data
16:16 mpower so in a nutshell, not particularily, I can look back into reactors
16:17 UtahDave joined #salt
16:17 AndreasLutro it's a bit more static but I know it's far easier to define args to whatever functions you want to call
16:18 mpower the static aspect I believe was the feature that led me away from reactors
16:19 beardedeagle joined #salt
16:19 snc joined #salt
16:20 alemeno22 joined #salt
16:21 iggy you can pass data via reactors just as easy
16:21 brotatochip joined #salt
16:23 mpower alright I will look into that as a solution, thanks for all the assistance in troubleshooting
16:23 Seanie joined #salt
16:24 Seanie Hello folks its been a while. I have a question around archive.extract. Is it possible to extract to a folder that exists already? All I get back is folder already exists. I've tried different tar_options no luck. There is already files in the target dir
16:26 akhter joined #salt
16:27 writtenoff joined #salt
16:27 iggy just use cmd.run
16:27 iggy archive.extraced is great in theory... in practice, well...
16:30 akhter joined #salt
16:32 akhter_1 joined #salt
16:35 XenophonF joined #salt
16:36 ob3lisk joined #salt
16:37 Tanta_G joined #salt
16:38 sfz- joined #salt
16:38 Fiber^ joined #salt
16:39 berserk joined #salt
16:41 Shirkdog joined #salt
16:43 Grokzen joined #salt
16:43 hightekvagabond joined #salt
16:45 ageorgop joined #salt
16:47 akhter joined #salt
16:48 runner7532 joined #salt
16:49 onlyanegg joined #salt
16:49 runner7532 Hello all
16:50 cheus joined #salt
16:50 runner7532 I have been looking over the salt docs but am wondering if someone here might be able to answer my question faster then I can read. I am looking for a command that I can run to a Windows computer to see who the current logged in user is, or even last logged in user if possible. Anyone aware of anything like that?
16:51 qwertzhz joined #salt
16:52 ekristen joined #salt
16:53 qwertzhz left #salt
16:55 Seanie Yeah true thanks iggy.
16:56 antpa joined #salt
16:57 aw110f joined #salt
16:57 nZac joined #salt
16:57 mavhq joined #salt
16:57 Grokzen anyone know if the old salt-api project was directly managed by the salt team? it just vanished from pypi
16:58 AndreasLutro Grokzen: it's part of salt now, pip install salt should install it as well
16:58 Grokzen ye i know that but i am running a old installation 2014.1.1 and it was not included there
16:59 iggy ouch
16:59 UtahDave Grokzen: Yeah, it was managed by saltstack
16:59 iggy if you already have it installed, you shouldn't need to worry
16:59 iggy (I mean it's not like it was getting updates)
17:00 teatime why would you remove it?
17:00 Grokzen haha, ye that is true :D
17:01 iggy I can't speak for the devs, but if I was removing something, it'd probably be because I didn't want someone to install it and use it thinking it was actual supported software
17:01 amcorreia joined #salt
17:01 UtahDave I can check, but I think it was because there was an old security vuln and we're not maintaining that separate code base any more
17:02 Grokzen i just noticed it and also a seperate issue that my local devpi server was not caching packages O.o
17:02 Grokzen when it tried to download it from pypi
17:02 irctc007 @andreasLutro: one more question, I need to do some string manipulations (which I think I have it down with sed commands). How do I tell salt-master to run a local (on the master) shell script ?
17:02 Grokzen if it would have cached it properly then i would not even have noticed :D
17:03 UtahDave runner7532: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_useradd.html    There are some functions to list users, but not sure if there's anything about current logged in users. I think you can get last log in times.
17:03 iggy I'm sure you're aware, but you should really consider upgrading salt
17:03 Grokzen we have, but you know, log deployment times and all that fun stuff
17:03 Grokzen crazy old legacy stuff noone want to touch
17:03 runner7532 Thanks @UtahDave
17:04 iggy but they want to add api support to it?
17:04 AndreasLutro irctc007: erm, sounds like a bad idea... can you be more specific about what you want to do?
17:04 Grokzen no, we have it in place already sinc very long time ago
17:04 Grokzen just noticed the error when i tried to download that dependency to my local machine through our devpi server that should cache all downloads
17:04 UtahDave Grokzen: Just heard back from the main salt-api dev. They removed it because people kept trying to install it over new salt installs, not because of sec vuln.
17:05 UtahDave Grokzen: you can still find the tarball here:  https://github.com/saltstack/salt-api/releases/tag/v0.8.4.1
17:05 irctc007 @andreasLutro: lol. Basically I need to get the IP address from the minion, put in client. properties file and deploy it back to the minion WAR file. That is my overall objective.
17:05 Grokzen UtahDave, ahh, i will try that one
17:06 iggy that makes sense, seen a few people do that
17:06 AndreasLutro riiight... yeah I don't know
17:06 irctc007 that said, you have helped me with grain.item ip4, which I can awk to get the external IP address, now I need to put in local file and push it out.
17:06 iggy irctc007: salt mine?
17:06 irctc007 iggy: let me look up salt mine, brb
17:07 iggy that's how we handled properties files (for activemq/etc)
17:07 UtahDave Grokzen: Use the `salt-api.*tar.gz` not the "Source Code" links.
17:07 Grokzen UtahDave, will do
17:07 onlyanegg joined #salt
17:10 om joined #salt
17:10 irctc007 @iggy: this might be a good lead, have to read up on it. Not something that frankly I am able to grasp immediately.
17:11 mavhq joined #salt
17:14 adelcast left #salt
17:15 source47 joined #salt
17:16 iggy irctc007: it can take some thinking to get up to speed on it, but it's a fairly useful feature once you get it up and going
17:17 irctc007 @iggy: looks like that, working on it.
17:17 irctc007 thanks for the pointer.
17:19 adelcast joined #salt
17:22 hasues joined #salt
17:22 hasues left #salt
17:24 Lionel_Debroux_ joined #salt
17:26 edrocks joined #salt
17:28 nZac joined #salt
17:29 berserk joined #salt
17:30 ajw0100 joined #salt
17:31 mavhq joined #salt
17:35 baweaver joined #salt
17:37 slav0nic joined #salt
17:46 baweaver joined #salt
17:46 cberndt joined #salt
17:50 mavhq joined #salt
17:50 akhter joined #salt
17:53 teryx510 joined #salt
17:55 lero joined #salt
17:55 akhter joined #salt
17:58 akhter joined #salt
18:01 dmaiocchi joined #salt
18:01 akhter_1 joined #salt
18:02 nZac joined #salt
18:05 akhter joined #salt
18:05 josue joined #salt
18:07 akhter joined #salt
18:08 tkharju joined #salt
18:10 baweaver joined #salt
18:14 mavhq joined #salt
18:16 irctc007 @iggy: completely lost on salt.mine
18:16 irctc007 any pointers helpers?
18:16 source47 joined #salt
18:18 irctc007 @iggy: rather than salt.mine, I am able to use salt.grain item ipv4 to get the IP address. Question, how do I manipulate the local file ? I know i can use file.managed to push it out.
18:20 josue joined #salt
18:20 kevinquinnyo joined #salt
18:22 iggy mine does that for you without the intermediate files/etc
18:22 iggy so you have all your minions send their IP to the salt mine, then you can make the mine calls in your states/templates
18:23 irctc007 don't mean to confuse the issue, can I do file.replace
18:23 irctc007 ?
18:23 iggy I wish I had some examples to show, but where I've used it before is private repos
18:23 hrumph_ joined #salt
18:23 hrumph_ hi
18:23 forrest joined #salt
18:23 hrumph_ acn someone please help me to understand the windows repo a bit better
18:23 irctc007 @iggy - thanks.
18:23 hrumph_ i'm on salt 2015.5.9
18:24 iggy irctc007: I can't help with that route, as I've never done that
18:25 irctc007 @iggy: I am going through these - https://docs.saltstack.com/en/latest/topics/mine/, should I do  a pastebin to see if if you can glance at it?
18:25 hrumph_ ok so in my repo definition i've got salt-minion and salt-minion_x86. If I leave salt-minion_x86.sls in the repo that's what salt sees when I do a pkg.list_pkgs eeven though I've actually got tythe 64 bit one installed. What am I supposed to do about this?
18:25 hasues joined #salt
18:26 hasues left #salt
18:26 hrumph_ the next problem is that trying to update salt from the salt master isn't working.  salt '011000' pkg.install 'salt-minion' version=2015.5.9 just reesults in the minion disconnecting
18:26 hrumph_ (this is after takinging salt-minion_x86 out of the repo)
18:27 irctc007 @iggy: based on the docs, is this something you had to do  "To enable the Salt Mine the mine_functions option needs to be applied to a Minion. "?
18:28 hrumph_ sorr yi meant when i try to update a windows minion from the salt master the minion simply disconnects
18:29 onlyanegg joined #salt
18:32 skinnejo joined #salt
18:33 skinnejo is it possible using jinja to put an if statement to check the output of salt cmd.run in an SLS file
18:34 skinnejo like {% if salt['cmd.run']('file.contains')('myfile')('server {{ my variable }}') == false %}
18:35 impi joined #salt
18:36 iggy irctc007: yes and yes
18:37 iggy skinnejo: it's possible, but that's not how
18:37 impi joined #salt
18:38 skinnejo lol ok thats what i was thinking, because if it was possible, i am definitely doing it wrong because it fails fantastically
18:38 iggy skinnejo: cmd.run runs a command that exists on the minion (file.contains is a module)
18:38 skinnejo ugh duuh
18:38 iggy so, one or the other
18:38 skinnejo i am stupid
18:38 skinnejo i totally knew that
18:39 skinnejo guess I just needed a second pair of eyes lol
18:39 iggy {% if salt['file.containse']('/path/to/file', 'sometexttolookfor') %}
18:39 skinnejo yep! thank you!
18:39 irctc007 @iggy, where do I "turn-on" mine on the minion? I am looking at /etc/salt/minion, don't see a reference ?
18:39 iggy irctc007: pillar or minion config
18:40 irctc007 @iggy: not sure, according to the docs, "Mine" has be be enabled.
18:41 teryx510 hey guys, just upgraded to v2015.8.8 and I'm wondering what is meant by 'the master should be stopped and all Salt caches should be cleared' in relation to changing the hash_type in the master config. Does anyone have some insight?
18:41 iggy irctc007: I usually ended up using the minion config for various reasons
18:41 irctc007 OK -lets go with that.
18:42 iggy there's not a "enable_mine: True" config, it's enabled by specifying mine_functions
18:43 irctc007 and how do I specify mine_functions? Do I have a block that has something like this http://pastebin.com/mXL7s458?
18:43 brianfeister joined #salt
18:43 iggy I mean test.ping isn't exactly useful, but yeah
18:44 iggy just throw that in /etc/salt/minion.d/50-mine.conf
18:44 iggy or wherever
18:44 iggy restart minion
18:44 iggy bam
18:44 josue joined #salt
18:46 irctc007 @iggy: so this file is supposed to be in minion.d/blah-mine.conf?
18:46 irctc007 and what would be the command from master ?
18:46 irctc007 maybe that is why I was lost, sort of starting to make sense... bare with me.
18:47 iggy I manage my minion configs with salt, so it was easy enough
18:47 iggy if you are trying not to do that, throw that same stanza into a pillar file targeted at the minion
18:48 cliluw joined #salt
18:48 irctc007 I will go with the proven way that worked for you, not re-invent the wheel.
18:50 Faris joined #salt
18:51 teatime ^^ yeah, you can also put them in pillar
18:51 teatime saves you having to restart minions
18:52 jken joined #salt
18:52 elsmo joined #salt
18:52 hightekvagabond joined #salt
18:55 akhter_1 joined #salt
18:55 Tanta joined #salt
18:56 Guest79 joined #salt
18:57 onlyanegg joined #salt
18:57 tiadobatima joined #salt
19:01 akhter joined #salt
19:03 edrocks joined #salt
19:05 akhter_1 joined #salt
19:06 mavhq joined #salt
19:09 akhter joined #salt
19:10 Brew joined #salt
19:17 babilen ^^^^^ seconded -- Pillar all the way, irctc007 !
19:21 source47 joined #salt
19:23 edrocks joined #salt
19:23 josuebrunel joined #salt
19:26 qwebirc308293 joined #salt
19:27 irctc007 @babilen: just getting started with Pillar. Literally made the /srv/pillar directory and following the examples.
19:27 qwebirc308293 Newb to salt here and I am trying to build my first jinja template using a grain lookup. Is there a way to look up the interface that is on the same network?
19:27 irctc007 this seemed like a simple task, have spent more than a day and now completely brain fried
19:30 KChloride I am trying with grains.filter_by but I don't know how to select the interface if the ip address matches 10.1.64 or something similar
19:31 Tanta {%- if '10.1.64' in salt['grains.get']('ip4_interfaces:eth0')[0]  %}
19:33 KChloride Thanks @Tanta, what if I don't know the interface though? What if the interface is p6p1 or p7p1 or eth0 or p17p12?
19:33 baweaver joined #salt
19:34 KChloride 's/,/./'
19:34 KChloride Can I specify a wildcard or regex in ip4_interfaces: to try and pull the one matching 10.X.X ?
19:35 KChloride when I try I am getting a 'can not follow' error
19:35 KChloride but i'm new to all of this
19:35 Tanta {%- for interface in salt['grains.get']('ip4_interfaces', {}).iteritems() %} {%- if '10.1.64' in interface[0] %}
19:36 Tanta that should abstract away the unique interface names
19:36 KChloride I guess I need to experiment more. New to programing and salt.
19:36 hrumph_ ok i ran salt-minion-debug.bat and it works when I'm running salt-minion-debug.bat. However if I'm just running the service it does not work.
19:36 UtahDave KChloride: Hm. Someone else asked recently about a function that gives you the interface that is bound to a specific IP.  I don't think we have one at the moment, but it shouldn't be very hard to add. Would you mind opening up an issue on github requesting that feature?
19:36 Tanta run salt-call -g
19:37 Tanta look at the structure of ip4_interfaces, it is a dictionary of lists
19:37 Tanta or maybe a list of lists, I dunno, it's been a while
19:37 hrumph_ so when i  run salt '011000' pkg.install 'salt-minion' version=2015.5.9 it does not work when I'm simply running the service
19:37 keimlink joined #salt
19:38 Tanta I'm inclined to go with dictionary though since each key has a unique name
19:38 KChloride yup I'm new to it all though. I was trying filter_by '{ip4_interfaces: [*][10.64.1.*] but obviously that makes no sense
19:38 KChloride hahaha
19:38 KChloride Thank you so much Tanta! and @UtahDave I will do !
19:39 Tanta python data structures still confuse me
19:40 KChloride I really need to read up on this more. I somewhat get the if 'X' in interface[] list
19:40 blade93 joined #salt
19:40 KChloride ah I see a bit now...
19:40 baweaver joined #salt
19:40 blade93 hi guys
19:40 Tanta ip4_interfaces is the key to an associative array of lists, where 'eth0
19:41 Tanta ' is a list and 'lo' is a list
19:41 blade93 been looking for a way to add a requirement for a source file to exist in order for a state to run at all, but cant seem to find a way to do it...
19:41 blade93 any and all help will be greatly appreciated
19:43 irctc007 @iggy @babilen: need some help here. All I need is to put the IP address of a minion on a local file. I am not getting any where?
19:43 KChloride @blade93 I think you could do something like "onlyif: 'test -e path/to/file'"
19:43 irctc007 @iggy @babilen: any ideas / suggestions. I have spent the last few hours one mine_functions and pillars, and am brain-dead.
19:46 akhter joined #salt
19:48 akhter joined #salt
19:49 Guest79 joined #salt
19:52 jhauser joined #salt
19:52 dmaiocchi joined #salt
19:54 edrocks joined #salt
19:54 Guest79 joined #salt
19:55 jab416171 can you require something arbitrary (like a file existing) even if that "something" isn't managed by salt?
19:56 jab416171 like, let's say I want this state to only run if /tmp/foo exists. So I log in to the box, create /tmp/foo, and then the state runs successfully.
19:59 blade93 @KChloride thanks for the suggestion... the command runs, but returns as FALSE... i need for the State to run only if (ONLYIF outcome is TRUE)
20:00 Guest79 joined #salt
20:02 UtahDave jab416171: no, you can only require another Salt State, not just an arbitrary file on the filesystem
20:02 akhter joined #salt
20:02 UtahDave you can you the onlyif or unless require to run a command to check for a file, though
20:05 Guest79 joined #salt
20:06 iggy KChloride: {% if salt['network.in_subnet']('10.1.64') %}
20:06 iggy KChloride: {% if salt['network.in_subnet']('10.1.64.0/24') %}
20:07 akhter joined #salt
20:07 iggy irctc007: hardcode and come back to it another day when you aren't fried
20:08 irctc007 @iggy: so tempted to do that, only thing is did that for the last sprint... this time want to use salt for this specific function.
20:09 irctc007 so I am trying jinja template
20:09 teatime when you say local file, do you mean a local file on each minion that contains that minion's IP?
20:09 linjan joined #salt
20:09 teatime you would not need/want mine for that
20:10 irctc007 @iggy: isn't this the exact same thing ? http://stackoverflow.com/questions/27317501/saltstack-template-with-grains-bad-replacement
20:10 blade93nyc joined #salt
20:10 akhter joined #salt
20:11 irctc007 @akter: where in DC area ?
20:11 irctc007 @akhter: where in DC area ?
20:11 rmnuvg joined #salt
20:11 akhter irctc007: Around McLean
20:11 blade93nyc joined #salt
20:11 nZac joined #salt
20:11 irctc007 in columbia, MD
20:12 Tanta I'm in Bethesda
20:12 mavhq joined #salt
20:12 akhter Nice, my company used to be in Bathesda.
20:12 KChloride @iggy @Tanta, sorry I am really new to salt and programming in general. How could I test the '{% if salt['network.in_subnet']('10.1.64') %}' prior to putting it in a salt state? I tried salt a state?
20:13 iggy from the docs `salt '*' network.in_subnet 10.0.0.0/16
20:13 Tanta do a cmd.run echo "evaluated true" or something like that
20:13 KChloride oh dumb. I was trying grains.filterby
20:13 KChloride @iggy @Tanta. Thankyou thank you!!!
20:13 blade93nyc joined #salt
20:13 iggy https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#salt.modules.network.in_subnet
20:13 akhter_1 joined #salt
20:13 iggy that and lots of other stuff in there
20:13 akhter_1 Weird.
20:13 akhter_1 KChloride: I didn't get your answer.
20:14 KChloride @iggy derp. Thanks!
20:14 teatime irctc007: ?
20:14 iggy I like network.ip_addrs with the cidr arg "will return only the addresses which are within that subnet."
20:15 KChloride akhter_1: I don't think I answered any of your questions :-( I'm super new so I doubt I culd.
20:15 irctc007 @teatime: trying to get this simple thing to work, replace a line with minion ip.
20:15 akhter_1 KChloride: was iggy able to answer your question"
20:15 akhter_1 ?*
20:15 iggy irctc007: just with the local minion IP?
20:15 KChloride I am not sure yet ^_^ Trying now.
20:16 akhter_1 KChloride: I can't see what he suggested, got disconnected, let us know if it worked.
20:16 irctc007 @iggy - yes have a file and on line 33 it says localhost, need to replace that with minion's IP address, then I know how to push it out.
20:16 KChloride @akhter_1:
20:16 mavhq joined #salt
20:16 elsmo joined #salt
20:16 baweaver joined #salt
20:16 KChloride [15:06] <iggy> KChloride: {% if salt['network.in_subnet']('10.1.64') %}
20:16 KChloride [15:06] <iggy> KChloride: {% if salt['network.in_subnet']('10.1.64.0/24') %}
20:17 irctc007 @teatime: isn't this the exact same thing ? http://stackoverflow.com/questions/27317501/saltstack-template-with-grains-bad-replacement
20:17 irctc007 someone knows how to do it - so help :)
20:17 Tanta could also do onlyif: grep -q "10.1.64" < <( ifconfig eth0 | grep "inet" | head -n 1 | awk '{ print $2 }')
20:18 Tanta that's the dirty way
20:18 KChloride @iggy damn. That didn't work. That just gave me the hostname. I need the interface
20:18 teatime and totally unnecessary?
20:18 akhter_1 KChloride: What exactly are you trying to do?  Are you trying to see if the target host belongs in that subnet?
20:18 KChloride oooh @Tanta that is a good idea actually but that would only work with eth0
20:19 teatime irctc007: I don't know if it's exactly what you want, or what, you haven't made what you want super clear.
20:19 KChloride I need to find the interface name that is joined to the 10.X.X.X network as all of the hosts are joined to 2-3 network and have different hardware
20:19 teatime irctc007: that doesn't necessarily give you an IP that's configured on the machine, it gives you whatever the fqdn resolves to, I assume.
20:20 Rumbles joined #salt
20:20 irctc007 @teamtime: I was using that  as an example.
20:20 teatime KChloride: use the loops luke
20:20 teatime irctc007: you don't have to type @, and if you type part of a name and hit tab it will complete it for you
20:20 Tanta grep -q "search string" < <( ifconfig -a | grep "init " )
20:20 Tanta where init = inet
20:21 teatime Tanta: that doesn't even work and there's no need to shell out for this
20:21 teatime by not work I mean you get extra crap in addition to the IP
20:21 irctc007 teatime: learned something about how to address. This is the problem, I have a local file and need to replace part of a string serviceURL=http://localhost/blah where localhost is changed to IP of minion.
20:22 irctc007 teatime: how do I do that ?
20:22 teatime irctc007: loop through ipv4 grain, take the first value that isn't 127.0.0.1 and {% set myip = %} with it
20:22 akhter_1 KChloride: {% if salt['network.in_subnet']('10.1.64.0/24') %}  -- What returned here?
20:23 teatime or you might prefer to just use fqdn_ipv4 if you trust your DNS to not be messed up more than you trust not having multiple IPs/interfaces
20:23 teatime irctc007: there's file.line and file.replace
20:23 Guest79 joined #salt
20:24 teatime or you can use sed (but with the grain value, rather than grepping ifconfig output)
20:24 hasues joined #salt
20:24 irctc007 teatime: I got several salt commands that gets me the IP (which is what I need). I am trying to see how to work with it. salt 'chm*' network.ip_addrs
20:24 KChloride akhter_1: the hostnames of all of the hosts that have a network in 10.1.64.0/24
20:25 irctc007 teatime: how do use the result as a variable ?
20:25 teatime irctc007: if the rest of the file is always static, it'd be better to put that file on the master and use something very much exactly like the example you linked to
20:25 Tanta use a managed template
20:25 irctc007 teatime: Exactly, that is what I am trying to do.
20:25 akhter_1 KChloride: Are you trying to find hostnames that do not belong to that subnet?
20:25 Tanta pass in the value using {% set val = salt['whatever']('whatever') %}
20:25 akhter_1 KChloride: Or you're trying to see the interface name?
20:26 KChloride @akhter_1:  no. I am trying to find the interface name
20:26 teatime irctc007: {{ salt['network.ip_addrs'] }}  but you can also do {{ grain.fqdn_ip4 }}
20:26 akhter_1 KChloride: Do you have multiple interfaces?
20:26 teatime irctc007: the former will not do exactly what you want, you need to loop.  you can read about jinja template logic at http://jinja.pocoo.org/docs/dev/templates/
20:26 KChloride akhter_1: yes some hosts have up to 5-6 interfaces
20:27 mavhq joined #salt
20:27 KChloride 's/5-6/6/'
20:27 Tanta use DNS
20:27 akhter_1 KChloride: Are you running masterless or with a master?
20:27 KChloride with a master
20:27 KChloride akhter_1: with a master
20:28 irctc007 teatime: can you glance at this - http://pastebin.com/Mdcp6jvP
20:28 irctc007 teatime: what am I doing wrong ?
20:28 ZiLi0n joined #salt
20:28 teatime KChloride: loop through grain.ip_interfaces, and then loop through each testing against your subnet.  when you've found it, set a var to the value of the current interface name and break out of the loops
20:28 Tanta you need to add the name: /path/to/file to your file.managed arguments
20:29 teatime ^^ yup
20:29 irctc007 Tanta: are you addressing my question ?
20:29 Tanta or use the absolute path as the state ID
20:29 teatime irctc007: he is
20:29 irctc007 aye
20:30 akhter_1 KChloride: One sec.
20:30 teatime irctc007: also mode: 0644 probably won't do what you want, use mode: '0644' instead
20:30 teatime irctc007: YAML sees 644 as base 10, but 0644 as base 8.  but strings are accepted there.
20:30 irctc007 yikes - that was mistake of copy and paste,.... just trying to get somehting to turn
20:30 ZiLi0n hello everyone! I have started to use salt-call for a masterless minion. I was wondering if it is possible to run salt-call without creating a top file. I see that one of the params of salt-call can be --local, --pillar-root and --saltfile, but looks like top.file is still required... Any suggestions to run salt-call without top file? Basically I am trying to configure master config using salt-call
20:31 Tanta top.sls still defines which states and pillars are targeted to a minion, whether there is --local or not
20:31 akhter_1 KChloride: do multiple subnets start with 10.1.64?
20:31 ageorgop1 joined #salt
20:32 brianfeister joined #salt
20:32 KChloride no its all 10.1.64.0/18
20:32 KChloride akhter_1: ^^
20:32 UtahDave ZiLi0n: you only need a top file if you're running a highstate.   If you use   state.sls you don't need a top file
20:32 KChloride I really need to read more on how this is done
20:34 akhter_1 KChloride: Do they have the same number of interfaces?  eth0, 1, 2, etc...?
20:34 Netwizard joined #salt
20:34 ZiLi0n UtahDave thanks for your help. So salt-call --local state.sls file.sls should be the way to go
20:35 teatime KChloride: didn't like my idea?
20:35 KChloride akhter_1: nope, different hardware across the boxes so some have 2-3 or some have more
20:35 irctc007 teatime: getting this - Unable to manage file: Jinja variable 'list' object has no element 0?
20:35 KChloride teatime: nope I am a fan. I am trying to figure it out now with your link to the jinja template docs
20:35 s_kunk joined #salt
20:35 s_kunk joined #salt
20:35 teatime kk
20:35 KChloride teatime: I am too new to know any better
20:35 antpa joined #salt
20:37 teatime irctc007: that's odd..
20:37 irctc007 teatime: I have come up with every odd situation you can not think off :)
20:38 irctc007 teatime: should I do another pastebin of the whole thing, maybe you can spot something.
20:38 teatime yeah
20:38 ZiLi0n UtahDave, you are right. doing state.sls instead of state.apply and also adding --file-root=. so that the minion does not look for a master makes the masterless minion work. thanks!
20:38 jab416171 is changing the shell for root a bad idea?
20:40 teatime jab416171: nah not necessarily.  rarely necessary though.  how come you want to?
20:41 DammitJim joined #salt
20:42 irctc007 teatime: help !!! - http://pastebin.com/xg7n6z4a
20:44 ageorgop joined #salt
20:44 baweaver joined #salt
20:46 forresta joined #salt
20:46 UtahDave irctc007: what's the output of   salt 'chm-test01' grains.items --out json
20:47 UtahDave wait, let me modify that
20:47 akhter_1 KChloride: {% for data, value in salt['grains.get']('ip_interfaces') %} {% if value.startswith('10.1.64') %} {{ data }} {% endif %} {% endfor %}
20:47 UtahDave salt 'chm-test01' grains.item 'fqdn_ip4' --out json
20:47 akhter_1 KChloride: That's very similar to what teatime suggested.
20:47 KChloride That's very similar to what Tanta suggested I think
20:47 irctc007 UtahDave: It is empty []
20:48 akhter_1 That could be as well, too much chat to keep up in my head.
20:48 UtahDave irctc007: that's why you're getting that error, there's no values in that list.
20:48 KChloride hahaha indeed. Thanks akhter_1 I am going to try that too as that seems easier to ingest to me for some reason
20:48 akhter_1 But to troubleshoot and diagnose, I recommend doing some reading for jinja here.  http://jinja.pocoo.org/docs/dev/templates/
20:48 forrest__ joined #salt
20:48 irctc007 ok , let me change it , brb
20:48 KChloride akhter_1: yup! teatime linked to that which I am trying to look over now ^_^
20:48 akhter_1 Cool, good luck.
20:49 teatime irctc007 / UtahDave : ah ok; yeah that's what I was getting at w/ that grain depending upon your hostname/dns not being configured wrong.
20:49 KChloride Thanks for all your help everyone! Hopefully sometime I can repay you guys with a decent state or something on github
20:50 jab416171 oh, wrong channel
20:50 teatime irctc007: in that case you can do something similar to what KChloride is doing except looking in grains['ipv4'] for an addr that isn't 127.0.0.1
20:51 teatime (you may wish to filter out the RFC1918 ranges as well, if you use them anywhere)
20:51 irctc007 teatime: what KChloride and akhter_1 were talking about seems similar, but way too lost.
20:51 irctc007 let me see if I can scroll back and follow.
20:51 teatime irctc007: start from akhter_1's for loop example.
20:52 irctc007 teatime: where am I putting his loop
20:52 irctc007 ?
20:53 akhter_1 irctc007: This would be in a state file.
20:54 teatime something like {%- for ip in grains['ipv4'] -%}  {%- if not ip.startswith('127.') -%}  {{ ip }}  {%- break -%}  {%- endif -%}  {%- endfor -%}
20:54 irctc007 akhter_1: so something like the init.sls file
20:54 teatime there may be a module function that does that easier
20:54 akhter_1 irctc007: That's correct.
20:54 irctc007 trying it right now.
20:54 teatime it can also go in place of your {{ }} statement in the template file
20:55 akhter_1 teatime: irctc007: What are you guys trying to accomplish?
20:55 brianfeister joined #salt
20:55 akhter_1 Sorry I don't keep up with the entire chat :)
20:55 teatime there's actually a better way I would really do this but it's pretty much the same thing just a little more complicated but cleaner/clearer.
20:55 teatime so I won't complicate it by suggesting it.
20:55 akhter_1 http://pastebin.com/xg7n6z4a
20:56 teatime akhter_1: he wants to substitute his IP addr into a jinja template
20:56 akhter_1 You need to set the template as jinja on that state file.
20:56 akhter_1 Add - template: jinja
20:56 akhter_1 On the sls.
20:56 hasues left #salt
20:56 teatime he has that
20:56 teatime UtahDave pointed out that the grain he was trying to use was empty
20:56 teatime so he has to use a different one.
20:56 akhter_1 Ahh.
20:57 irctc007 akhter_1: teatime : I corrected the grain, but to no avail.
20:57 akhter_1 So what's the grain with the correct value?
20:57 teatime akhter_1: well ipv4 has all the host's ipv4 addrs
20:57 teatime akhter_1: but he needs to exclude at least 127.0.0.1
20:57 irctc007 exactly
20:58 akhter_1 irctc007: And you're not sure which ethernet is not 127?
20:58 teatime oh true, if they all only have 1 interface, then you could do
20:58 irctc007 akhter_1: I don't follow the question.
20:59 edrocks joined #salt
20:59 teatime grains['ip_interfaces']['eth0'][0]
20:59 akhter_1 For example, if you know all eth0 isn't 127
20:59 akhter_1 Then just use the grain teatime just suggested.
20:59 teatime lol that is so much simpler
20:59 teatime sorry irctc007 / thank you akhter_1
20:59 irctc007 teatime: thanks a lot sir,
21:02 irctc007 akhter_1: one more time... sorry to drag this on, but have been all over the place, from file.replace to mine_functions / pillars.
21:02 akhter_1 Hahaha, it's all good.
21:02 irctc007 so - can you walk me through ,
21:02 cberndt joined #salt
21:02 akhter_1 irctc007: Sure.
21:02 teatime irctc007: just use {{ grains['ip4_interfaces']['eth0'][0] }}  where previous you tried  {{ grains['fqdn_ip4'][0] }}
21:03 akhter_1 Yup.
21:03 akhter_1 Do you want it to be conditional and check if it starts with 127?
21:03 teatime nah shouldn't be any need
21:03 akhter_1 True.
21:03 teatime 127. should only sanely exist on lo
21:03 lookcrabs joined #salt
21:03 akhter_1 That's correct, so it shouldn't be an issue.
21:04 akhter_1 irctc007: Does that make sense?
21:04 ageorgop1 joined #salt
21:04 irctc007 akhter_1: I put that line in the file where I want it the IP address plugged.
21:04 teatime Sooo, I have a question:  I have a file util.jinja http://paste.debian.net/432253/  is there any way to auto-include this in all my sls files?  I don't think including it in top.sls will do what I want, perhaps I should try it though.  No biggie if not, it's not hard to manually include, and maybe I should always do it manually anyway?
21:04 akhter_1 That's correct.
21:04 irctc007 now going back to http://pastebin.com/xg7n6z4a, how do setup the rest
21:04 akhter_1 irctc007: That will get the first IP from eth0, which is always the IPV4 address.
21:05 akhter_1 irctc007: The sls file is fine.
21:05 akhter_1 Just be sure to add the - template: jinja  - as it's already been suggested.
21:06 irctc007 akhter_1: please keep in mind, I am trying to GSUB / search and replace in a HTML file.
21:06 irctc007 yikes
21:06 irctc007 doing it now.
21:06 akhter_1 irctc007: Are you running a salt master?
21:07 irctc007 akhter_1: yes
21:07 teatime irctc007: you're not really search-and-replacing, you're generating from a template (which is superior)  (ignore the fact that templates are implemented via search-and-replace)
21:07 akhter_1 irctc007: You're just plugging in the hosts eth0 IP in the template, not search and replace.
21:07 teatime irctc007: you're about to overwrite index.html on the minion, jsyk
21:08 source47 joined #salt
21:08 akhter_1 irctc007: If you run sudo --- salt '(target minions)' grains.get 'ip_interfaces:eth0:0' --- You will see the values that will be plugged into that file for that variable.
21:08 irctc007 quick question gents : given that I am trying plugin the minions IP address in a file called index.jina , what is the source supposed to be ?
21:09 akhter_1 irctc007: The source is the source file you're copying from.
21:09 kbaikov joined #salt
21:09 teatime irctc007: it should probably be in a file called index.sls.  and it's the source: attribute from your state
21:09 teatime irctc007: relative to your file_roots
21:09 akhter_1 It should be in your environment stated in file_roots.
21:10 irctc007 I didn't the ask the question the right way.
21:10 akhter_1 You have a source stated "    - source: salt://experiment/test.template"
21:10 irctc007 akhter_1:  exactly, what is the that meant to be / meant to do ?
21:11 teatime irctc007: if your file_roots in master config says e.g. /srv/salt, it will be /srv/salt/test.template
21:11 akhter_1 Ahh.  Okay, there's a knowledge gap here.
21:11 teatime irctc007: on the master
21:11 irctc007 akhter_1: definte knowledge LACK here
21:11 akhter_1 irctc007: check out your master config.  /etc/salt/master or a file in /etc/salt/master.d/*roots
21:12 akhter_1 You'll see a dictionary list called file_roots.
21:12 akhter_1 Let us know when you see that.
21:12 teatime irctc007: I would def. suggest you read through the salt docs (at least the intro parts / tutorial) and jinja template docs, before trying to go much further
21:12 teatime experimentation is a great way to learn, but it does help to RTFM first and continually
21:12 akhter_1 irctc007: I highly suggest reading through https://docs.saltstack.com/en/latest/topics/tutorials/states_pt4.html
21:13 skinnejo joined #salt
21:13 irctc007 dudes, I got the file copy and tomcat installed by hacking my way through. I really do appreciate the help offered.
21:14 akhter_1 Cool.  Make sure you have consistency across your servers.
21:14 irctc007 I am sure configuration changes on multimachines is a common theme in salt, so question is how do I get IP address from minion and plug into a existing file on master. I got the file.managed down to push it back to minion.
21:15 akhter_1 irctc007: You don't plug them in the master.  Not how it works.
21:15 irctc007 yikes
21:15 akhter_1 irctc007: What you do is, when pushing to the minion, you set a variable for the minion to plug the IP for you when deploying.
21:15 teatime irctc007: to do that you probably *do* want mine
21:15 teatime irctc007: read more docs before moving on to salt mine to save your own sanity
21:16 akhter_1 If you want to get the IP for another reason, then I suggest you look at salt.mine
21:16 akhter_1 It's a part of the tutorial.
21:16 irctc007 teatime: ha ha.... true
21:16 irctc007 yikes , back to salt.mine
21:16 akhter_1 Salt mine is simple yet not so simple.  You can easily cause yourself a headache.
21:17 irctc007 that was someone suggested about 6 hours back, no kidding.
21:17 irctc007 so for the sanity, I can run something like network.ip_addrs, do a GSUB and push it back into /opt/tomcat/webapp1/conf
21:17 irctc007 ?
21:18 Guest79 joined #salt
21:18 akhter_1 Yes but that's doing more work than needed.
21:18 irctc007 last question before I stab myself with a this sharpie.... this might seem cludgy
21:19 akhter_1 Before that run something like: sudo salt '*' grains.get 'ip_interfaces:eth0:0'  --  Do you see the ip address it returns?
21:19 irctc007 I have shell script that does on master, but when I call it through init.sls, it complains can't find "command salt"
21:19 teatime man I think you're just doing it really weirdly
21:19 teatime please read the tutorial
21:20 irctc007 akhter_1: I see result coming back
21:20 onlyanegg joined #salt
21:20 akhter_1 Awesome.
21:20 irctc007 teatime: I agree that it is weird, but desperate bro !
21:20 teatime I have not yet had the need or desire to call a salt command from a script from a salt state.  the fact that you do on day 1 suggests: read the docs.
21:20 akhter_1 That is a script that was called from the master, that runs on the minion, and the minion returns the data.
21:21 irctc007 teatime: you might be right.... i do have to confess.
21:21 irctc007 akhter_1: yes that was called from master
21:21 akhter_1 So when calling variables like {{ grains['ip_interfaces']['eth0'][0] }}  the minion plugs then in when pushing the file to the minion.
21:21 akhter_1 The master doesn't plug in variables, it doesn't know of the variables inside the minion, it can get them, but it doesn't know or keep them.
21:22 akhter_1 That's why you don't to "get" and "plug" the variables on the template.
21:22 irctc007 akhter_1: maybe the that is why I was struggling.
21:22 akhter_1 So you can just provide {{ grains['ip_interfaces']['eth0'][0] }} and the minion takes care of the rest.
21:23 akhter_1 You don't see the ip address but after the state is applied, you can ssh into the server and cat the file and see for yourself.
21:23 akhter_1 These are known as jinja/python variables.
21:23 UtahDave yeah, the minion pulls down the template, runs it through jinja and lays down the templated file on the file system
21:24 irctc007 akhter_1: where would I plug that line in this ? http://pastebin.com/YBsvFJsj
21:24 akhter_1 If you do a "salt 'target a host' grains.items "  You can see all the grain variables.
21:24 akhter_1 irctc007: Look at your source file.  salt://experiment/index.html
21:24 Guest79 joined #salt
21:25 akhter_1 Wherever that index.html is, you want to make sure wherever the IP is supposed to be, put in {{ grains['ip_interfaces']['eth0'][0] }}
21:25 akhter_1 And the minion will plugin the hosts IP for you.
21:25 irctc007 let me give that a whirle
21:25 irctc007 brb
21:25 akhter_1 On your sls file, make sure you add " - template: jinja" underneath user: tomcat
21:26 akhter_1 irctc007: I must get going home now, I suggest you start reading https://docs.saltstack.com/en/latest/topics/tutorials/states_pt1.html
21:26 irctc007 thanks for the help...
21:26 akhter_1 You're welcome.
21:26 irctc007 appreciate it.... really do
21:26 irctc007 trying it now.
21:27 irctc007 akhter_1: b/4 you go, it put the literal string in that file.
21:28 irctc007 not the IP replaced.
21:28 irctc007 but I will keep hacking....
21:28 akhter_1 Yeah, the literal {{ }} string.
21:28 irctc007 yeap
21:28 akhter_1 Have a good night everyone.
21:29 irctc007 now it is boiled down to simple ... one index.html with grains[.... and init.sls with file.changed.
21:29 teatime irctc007: that probably means you do not have template: jinja in your state
21:29 source47 joined #salt
21:31 irctc007 teatime: IT WORKED .... wish akter_1 was here.
21:31 irctc007 it was so simepll
21:31 irctc007 teatime: IT WORKED dude, I spent the whole day on this...
21:32 irctc007 teatime: I can't thank you enough....
21:32 teatime no worries.
21:32 irctc007 it was as simple as file.changed and then push it out.
21:32 irctc007 teatime: Thanks sir.... I need a break, have been hacking at this from around 9
21:32 orion Can I write something like, {%- from foo import bar, baz with context %-} ?
21:33 spuder_ joined #salt
21:33 teatime orion: http://jinja.pocoo.org/docs/dev/templates/#import
21:33 orion thanks
21:34 akhter joined #salt
21:34 Sammichmaker hey all.. I know this is biased (and I understand why, salt seems solid), but I have never used salt.   I'm starting work for a company next week who has a very strange environment(s). There dev/staging env is in AWS (yay good!), BUT their production environment is in verizon terremark (BAD! I've used before.. very bad).  They have no DevOps and want to hire me.
21:35 josuebrunel joined #salt
21:36 Sammichmaker Anyway, my dillema is what configuration management to use at least initially to manage both envs.  Is salt capable of this?  Also, I was going to try to bridge the two networks if I can.
21:36 Sammichmaker I just want to know whether  I  hsould stick with chef or move to salt.  First, I am a python guy and always have been.  Second, I don't like all the ruby writing involved in chef.
21:37 Sammichmaker I can do it, for stuff like TDD/infrastructure tests, it just takes me a while to get past the damn syntax errors so I have to google constantly.
21:38 Sammichmaker im not very strong in ruby and I wish everything was writenn in python instead.. arg...
21:38 mavhq joined #salt
21:44 teatime you're going to get biased answers here, obviously :)
21:45 teatime yes I think salt would work for you.  you should probably setup a test env (which can be VMs on your machine or cloud or whatever) and do a lot of experimentation etc. before throwing it into production at your new job :)
21:45 orion What's the current best practice regarding serving large sensitive files from pillar?
21:45 teatime you should also probably learn as much as you can about their existing processes, even if they suck, before suggesting massive changes.
21:46 teatime orion: how large?
21:46 teatime pillar is the best way to serve sensitive files, which is why it's an issue for them to be large.
21:46 teatime I'm not sure what the state-of-the-art solution for this is.
21:47 orion 3KB
21:50 teatime I'd probably just throw it into file_tree.  but, I do not really know the point where something becomes problematically large in pillar
21:52 Netwizard joined #salt
21:53 irctc007 teatime: is there a sleep kind of function between commands ?
21:53 teatime warning: if you want that, you're probably doing something wrong.
21:54 irctc007 teatime: here we go again - lol.
21:55 irctc007 teatime: so I have a command that will deploy a webapp, but don't i have to wait till is fully deployed before chaning the IP (the famous prolbem that you spent 34 mins on)
21:56 onlyanegg joined #salt
21:57 teatime you make a state to deploy, and a state to deploy your file w/ the ip, and you make the second state require the first.
21:57 teatime so they will always be executed in order.
21:57 irctc007 ok -
21:58 UtahDave orion: I doubt 3KB would be a problem for pillars, unless you have a lot of those as well.
22:01 source47 joined #salt
22:01 baweaver joined #salt
22:01 Rumbles joined #salt
22:04 irctc007 teatime: I am trying to copy a WAR file to a directory. I am using file.managned  and have - source: /tmp/eureka.war and - name: /opt/tomcat/webapps/. Complains Specified target /opt/tomcat/webapps/
22:07 bhosmer_ joined #salt
22:07 ingslovak joined #salt
22:08 baweaver joined #salt
22:10 irctc007 teatime: I used file.copy , but says directory there, so won't make any changes
22:10 irctc007 what i am trying to do is copy /tmp/eureka.war to /opt/tomcat/webapps
22:13 UtahDave irctc007: I don't think you can use a local source for file.managed
22:13 irctc007 UtahDave: so how do I copy a /tmp/sample.WAR to a specific location on the minion ?
22:14 UtahDave There's another state that can do that. It's name has slipped my mind and I'm looking through the states right now
22:14 irctc007 UtahDave: thanks - I am reading / searching as well.
22:15 UtahDave the cp execution module can do it
22:16 babilen cmd.run shouldn't have too many problems with it either (with suitable unless requisite)
22:16 UtahDave yep
22:16 kingscott joined #salt
22:17 babilen Sounds wrong though .. why not manage the entire file or place settings in a configuration file?
22:17 irctc007 UtahDave: got it... can be done with file.managed as long as you complete teh path
22:17 babilen complete?
22:17 irctc007 thanks for looking up it up
22:18 kingscott When running <salt -G 'os:Ubuntu' cmd.run 'apt-get update && apt-get upgrade -y'> What is the best way to get a report of what was upgraded, if anything failed, etc.
22:21 babilen kingscott: I'd rather use "salt -G 'os:Ubuntu' pkg.list_upgrades" and "salt -G 'os:Ubuntu' pkg.upgrade"
22:21 babilen or just leave ...
22:22 UtahDave lol, he waited almost 2 MINUTES, babilen
22:23 babilen :)
22:24 onlyanegg joined #salt
22:25 UtahDave hey, babilen, did you see my comment on your static pillar feature request on github?
22:25 babilen I saw that there was some discussion, but I missed your comment
22:25 babilen Let me check again
22:26 babilen Ah, did you see mine?
22:26 babilen ;)
22:26 UtahDave ha, probably not, lol.  let me check this time
22:27 akhter joined #salt
22:27 babilen This would probably merit some proper discussion and clear goals though. In a way "static pillars" are, essentially a special case of pillarstack support in salt with different syntax. As soon as you allow for self-referential pillars we are soon in formal language territory
22:28 babilen (in that you don't want to expand endlessly and want, for example, enforce something like CNF or LR(1) and whatnot)
22:28 teatime can one of you link to the issue for my convenience
22:28 UtahDave I see.  Yeah, that makes sense
22:28 UtahDave https://github.com/saltstack/salt/issues/23910
22:28 saltstackbot [#23910]title: Please implement static pillars | Hi,...
22:28 teatime ty
22:29 babilen The basic idea is to simply have a terminal symbol only pillar that is minion specific and rendered first so that it can be referenced by the "normal" pillars (and only those values)
22:29 teatime UtahDave/ babilen: I've been curious, about how hard it would be, to make the default pillar handling basically an ext pillar, so instead of a list of pillar_roots and a list of a ext_pillars, you could just interleave them.
22:29 UtahDave gotcha
22:30 teatime babilen: you can already reference an earlier pillar (from an earlier pillar root) from a later one
22:30 babilen teatime: Well, that is essentially the solution of "use an external pillar first"
22:30 * teatime didn't know mine data wasn't available in pillars.
22:30 babilen They are
22:31 babilen https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.mine.html#salt.modules.mine.get
22:31 teatime I'm confused
22:31 teatime what is 21403 about then?
22:32 babilen UtahDave: This started as "minion-specific, master-controlled grains" (aka "static pillars" / "pre-pillars"), but it would probably make sense to think about this again now that we have a variety of approaches to pillars.
22:33 babilen teatime: Look at the date, that one can probably be closed by now
22:33 babilen (or once it makes it into an actual release)
22:33 teatime ah
22:34 babilen Just closed it
22:35 babilen Anyway, nighty night .. :D
22:35 teatime can you wait a sec
22:35 teatime ?
22:35 babilen Sure
22:36 teatime are there use cases you envision that aren't covered by 'configure a second, earlier pillar_root and put this data there' ?
22:37 teatime I don't know if you can do targeting in the later pillar's top.sls based on earlier pillar data.  so that could be one?
22:37 teryx510 Hey guys, can anyone tell me if I can call python from reactor instead of an sls?
22:37 babilen Well, this whole malarky started with the grain-for-role abuse that was quite prevalent in some setups. In my opinion roles shouldn't be managed on the minions themselves, but centrally and under the control of the master.
22:38 teatime I agree with you.
22:38 babilen So, in order to make use of $some_data in the normal pillars you need them to be available everywhere (much like grains), with the difference that they are under the control of the master
22:38 babilen Hence "static pillars" or "pre-pillars"
22:39 zenlot6 joined #salt
22:39 teatime and an earlier pillar doesn't fulfill that for you?
22:39 iggy doesn't work like that
22:39 iggy pillar isn't loaded in pillar
22:40 iggy so you'd have no way to reference them
22:40 teatime iggy: it is, I've tested it
22:40 babilen But sorry, it really is too late for that discussion for me now
22:40 teatime I haven't tested targeting though, I don't know if that works, depends on how they get processed.
22:40 teatime babilen: kk.
22:40 teatime iggy: but you can definite interpolate values from an earlier pillar in a later one
22:40 iggy it's one of those things that you get to keep the pieces
22:41 teatime iggy: I'm referring specifically to either multiple pillar_roots or ext_pillar_first
22:41 iggy you can't guarantee ordering of pillar_roots
22:41 teatime iggy: I recognize the issue of it working within the same pillar_root, and don't expect that to work / be reliable
22:41 iggy it's a list
22:41 iggy list's aren't ordered
22:41 teatime lists are ordered
22:41 teatime you're describing sets
22:42 iggy you're right, I was thinking of something else
22:42 teatime well, multi-sets anyway
22:42 iggy but it's still unsupported
22:42 teatime I did not realize it was not supported.
22:43 teatime it seemed to work without issue for me.
22:43 iggy it works fine for some people sometimes and goes to hell other times
22:43 teatime damn :(
22:43 teatime I have been planning to rely on this quite extensively
22:43 iggy so nobody suggests doing it
22:44 teatime it would be so nice, if you could just list your pillar_sources, interleaving root dirs and ext pillars, and have them be processed in order such that data from earlier is available later.
22:44 iggy I wouldn't hold my breath
22:45 cberndt joined #salt
22:45 akhter joined #salt
22:45 teatime I can't buy that it's fundamentally hard.  at worst, it would be hard because of existing code structure.
22:46 iggy it's fundamentally hard to make everyone happy
22:47 Sammichmaker arg went afk
22:47 LotR teatime: maybe look into pillarstack?
22:47 Sammichmaker thanks for the response teatime
22:48 Sammichmaker I was planning on assessing the environment when I start
22:48 LotR this https://github.com/bbinet/pillarstack
22:49 jnials joined #salt
22:51 riceandbeans joined #salt
22:54 riceandbeans what is salt master running in on the backend?
22:54 riceandbeans I mean, for instance, puppet was a rack app, now it's a java app
22:54 riceandbeans is salt a plack app?
22:55 hemebond Is Plack for web applications?
22:55 hemebond Salt isn't a web application.
22:55 hemebond I don't know if it's built on anything in particular.
22:56 riceandbeans err, sorry, plack is perl
22:56 teatime LotR: yeah... I'd looked at that before, but thanks for having me revisit it, it is probably what I want.
22:57 riceandbeans I don't know python web servers...
22:57 riceandbeans I'm not a python guy
22:57 teatime it's still not a web server / web app
22:57 teatime it's just a python app, I don't think it's based on any framework.
22:57 riceandbeans so it's not doing https connections
22:58 LotR doesn't it use some message queue protocol?
22:58 teatime iggy: if pillars aren't processed in order then wouldn't pillar data be non-deterministic any time you take advantage of merging?
22:58 teatime ZeroMQ is the default one, yeah.
22:58 iggy I'm pretty sure the docs say just that
22:59 iggy hence... non-supported
22:59 riceandbeans the server is a message queue that clients pull information from?
22:59 teatime iggy: I can't beleive anyone would go to the trouble of coding in the merging then, since that makes it useless.
22:59 teatime iggy: would love a link to the docs discussing it
23:00 teatime riceandbeans: I don't understand the exact architecture.  I think it's more like, there is a message bus that masters and minions push messages to and receive messages from?
23:01 iggy https://docs.saltstack.com/en/develop/topics/pillar/index.html#pillar-namespace-merges used to say non-deterministic, now it says "last one wins"
23:03 UtahDave teatime and riceandbeans:  Salt uses a pubsub infrastructure.  The minions listen on a zeromq pub port for commands, execute the commands and then return the results to a different return port on the master
23:05 teatime bah I am trying to use show_full_context() and dump it's return out to a file
23:05 teatime but I cannot for the life of me get it indented/pretty-printed
23:06 edrocks joined #salt
23:06 teatime |yaml and |json also fail on it; |json says it's not json serializable, |yaml tries to call .sort() on what claim to be dicts
23:07 teatime |pprint outputs a single line, which looks the same as just stringifying it plain
23:08 Muchoz joined #salt
23:09 iggy use a jinja templated output file
23:20 LeProvokateur joined #salt
23:22 cberndt joined #salt
23:22 lero joined #salt
23:23 riceandbeans do you support salt master running on freebsd?
23:24 Muchoz joined #salt
23:25 hemebond Is there any problem with an empty top.sls apart from the warning you get?
23:25 hemebond I was thinking of wrapping the top.sls in a particular environment in a Jinja check.....
23:26 hemebond aaaaand I just remembered that Jinja can't do blob or regex matching of minion IDs. Nevermind.
23:28 baweaver joined #salt
23:32 iggy riceandbeans: I think people do it... "supported" is a different story
23:34 freelock joined #salt
23:35 jjasinski_ joined #salt
23:36 mosen joined #salt
23:37 rem5 joined #salt
23:41 zenlot joined #salt
23:50 mr_chris joined #salt
23:51 hightekvagabond joined #salt
23:56 rem5 joined #salt
23:57 cpowell joined #salt
23:59 brianfeister joined #salt

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