Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-03-09

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

All times shown according to UTC.

Time Nick Message
00:00 tweakism where did you set them, limits.conf?
00:00 fracklen joined #salt
00:02 tweakism cmd.run does not go through the normal user-login process/path that would setup some parts of the environment
00:03 tweakism and it also does not run a login shell so doesn't source bashrc/profile that would setup most of the rest.
00:05 Mate joined #salt
00:06 patrickbrown is there an alternative to cmd.run that would go through the normal user-login path to pick all of that up? I would rather not config all the settings within the command
00:06 Muchoz joined #salt
00:07 hal58th joined #salt
00:07 jimklo_ joined #salt
00:09 nyx_ joined #salt
00:11 teryx5101 joined #salt
00:12 fracklen joined #salt
00:15 akhter joined #salt
00:15 flowstate joined #salt
00:17 tweakism joined #salt
00:17 tweakism like /lib/systemd/system/salt-minion.service if you are using systemd
00:17 nethershaw joined #salt
00:18 tweakism jfindlay: if you could weigh in on this, I've been contemplating it for days.
00:19 tweakism jfindlay: specifically, what's the right/best way to use cmd.run and 1) have user's environment available, or 2) have things like limits/nofiles set.
00:19 tweakism seems to come up once or twice a day :)
00:19 hemebond :-)
00:19 berserk joined #salt
00:20 patrickbrown yeah, I found the salt-minion.service actually, we are trying to start Cassandra and there are a lot of things to set I would rather not have to set specifically there, on each server we add
00:20 zmalone joined #salt
00:21 patrickbrown I think we could conceivably also cmd.run a string of commands, setting nofile etc but again, seems clunky
00:21 tweakism usually if you're starting a service via the init system, it will not inherient limits/environment from the logged-in user that executes the command
00:21 berserk joined #salt
00:21 tweakism depends on the init systemt hough
00:22 patrickbrown alright, that makes sense and sounds like the way to go
00:22 patrickbrown thanks for the help
00:23 tweakism there are lot of different decently clean ways you could do it
00:23 tweakism which one is easiest/cleanest depends on more details of your project/env than I have :)
00:24 tweakism but wrt "would rather not have to set ... on each server", luckily you use salt so this is a non-issue.
00:24 abednarik joined #salt
00:26 bhosmer_ joined #salt
00:27 fracklen joined #salt
00:31 foundatron joined #salt
00:32 patrickbrown Ha ha, yeah but using salt to update salt-minion.service seems, circular to me. Plus it would set those limits for all commands salt runs, rather than just those i want to have high limits.
00:33 hemebond if you just want the high limits for those command then they should probably be specified with those commands, no?
00:33 flowstate joined #salt
00:33 tweakism patrickbrown: another option is a wrapper script, or perhaps a service definition if it's something appropriate to start that way.
00:34 tweakism TMTOWTDI.
00:34 flowstate joined #salt
00:35 Eugene Tim Toady? I hardly know 'er!
00:36 foundatron Is there a way to test if a minion does or does not have a grain?  some of my instances have a grain called "ec2" some do not. I want to basically have logic in a pillar that says if minion has grains['ec2'], then foo = bar. else if minion does not have grains['ec2'], then  foo = notbar"
00:36 Eugene 'if ec2 in grains'
00:36 foundatron super easy thanks
00:37 Eugene Indeed. Jinja is awesome like that
00:37 patrickbrown Yeah no, the service script is the way to do it for us now that you said it. TBH I was just being lazy it would be good to have anyway
00:41 t0m0 joined #salt
00:43 fracklen joined #salt
00:56 fracklen_ joined #salt
00:57 tapoxi joined #salt
00:57 tapoxi hi all, as a noob interested in the 0mq vs raet debate, is there a downside to choosing raet?
00:58 hemebond It's new and made for Salt so there aren't other things using it... I guess.
00:58 hal58th tapoxi: raet is still in beta and can be buggy and not secure (as advertised on main page)
00:59 tapoxi is there a node limit on 0mq?
00:59 drawsmcgraw If there is, I'm not aware. I've heard of deployments with 3,000 minions.
01:00 hal58th depends on the hardware. People haven't gotten up to 20,000 minions. But thats with just modules and beefy, optimized hardware
01:00 hal58th If you are under 5,000, you'd probably be fine
01:02 zmalone tapoxi: raet doesn't seem to be seeing active development any more
01:03 quasiben joined #salt
01:07 abednarik joined #salt
01:11 nethershaw joined #salt
01:23 Azid joined #salt
01:27 euidzero joined #salt
01:27 abednarik joined #salt
01:29 iceyao joined #salt
01:35 iceyao_ joined #salt
01:36 berserk joined #salt
01:49 LostSoul_ Hi
01:49 LostSoul_ Is it normal that salt doesn't start network links?
01:54 kermit joined #salt
01:55 noob joined #salt
01:56 subsignal joined #salt
02:00 iggy rephrase the question
02:13 brianfeister joined #salt
02:15 bhosmer joined #salt
02:19 berserk joined #salt
02:25 t0m0 joined #salt
02:29 snc joined #salt
02:38 LostSoul_ I configured eth0 and eth1 in Salt, everything is good beside the fact I need to manually restart network
02:38 LostSoul_ ifdown eth0 && ifup eth0
02:38 LostSoul_ Is there another way?
02:44 tweakism you only have to do that once, after configuring the ifaces?
02:47 tweakism no, there's probably not a better way.  the other option is a full reboot.
02:47 hemebond Couldn't you have a cmd.run that watches the config files and restarts the interfaces?
02:47 tweakism usually 'service network restart' or whatever at least kind-of fails, because the existing addrs on interfaces are no longer configured so don't get removed.
02:47 tweakism oh, I mean, I'm assuming you're using salt to ifdown/ifup.  are you having to do it manually?
02:47 tweakism you can use the at trick:  'echo "ifdown -a ; ifup -a" | at now'
02:49 ilbot3 joined #salt
02:49 Topic for #salt is now Welcome to #salt! | Latest Version: 2015.8.7 | Register for SaltConf16: http://saltconf.com/register/ | Paid support available for open source Salt! https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | Ask with patience as we are volunteers and may not have immediate answers
02:53 mdasilva joined #salt
02:59 ageorgop joined #salt
03:01 malinoff joined #salt
03:02 baweaver joined #salt
03:03 Aleks3Y joined #salt
03:03 PeterO joined #salt
03:03 lemur joined #salt
03:08 dyasny joined #salt
03:11 brianfeister joined #salt
03:13 LostSoul_ tweakism, hemebond: Thanks ;)
03:14 trent joined #salt
03:15 LostSoul_ tweakism: Where would be the best place to place it?
03:25 brianfeister joined #salt
03:26 tweakism cmd.run
03:34 euidzero joined #salt
03:36 anmol joined #salt
03:39 devtea joined #salt
03:39 mowntan joined #salt
03:42 kshlm joined #salt
03:46 andrew_v joined #salt
03:47 LostSoul_ thx
03:54 writtenoff joined #salt
03:57 favadi joined #salt
03:58 tristianc joined #salt
04:04 bhosmer joined #salt
04:12 iggy what version of salt? reconfiguring eth1 works for me without intervention
04:14 malinoff joined #salt
04:26 baweaver joined #salt
04:27 brianfeister joined #salt
04:28 hasues joined #salt
04:35 anmol joined #salt
04:41 beardedeagle joined #salt
04:44 racooper joined #salt
04:51 karlthane joined #salt
04:52 pcdummy joined #salt
04:52 pcdummy joined #salt
05:02 hal58th_ joined #salt
05:09 euidzero joined #salt
05:17 euidzero joined #salt
05:18 beardedeagle joined #salt
05:25 anmol joined #salt
05:31 kbaikov joined #salt
05:34 rdas joined #salt
05:45 oida joined #salt
05:47 favadi joined #salt
05:50 jfindlay tweakism: that is a good question.  cmd.run uses python's subprocess.Popen which on posix systems either opens a shell or goes directly to excve
05:52 bhosmer_ joined #salt
05:53 jfindlay none of that seems to be careful about system-specific shell setups.  All by themselves, for example, bash and zsh are somewhat complex in how the environment is ultimately created
05:55 jfindlay I guess we could work on that more for cmd.run.  At this point, cmd.run's environment is basically going to be the same as subprocess.Popen's environment
05:55 tweakism people would probably love if there was a way to make it launch a login shell
05:56 tweakism as you say, shell startup is kinda convoluted and a lot of people barely know enough to make stuff work when they ssh
05:56 tweakism and get totally lost if they've got neither a login shell nor /bin/login setting anything up :)
05:56 tweakism I assume you can't do shell='/bin/bash -' but I haven't tried.
05:57 tweakism if python lets you set argv[0] though you can keep shell= and launch it as a login shell the same way login does.
05:57 ramteid joined #salt
05:58 jfindlay do you have to authenticate to get a login shell?
05:59 tweakism no.
05:59 tweakism it just tells the shell to behave like one instead of not.
06:00 jfindlay I think it would be definitely nice to have a login=True option for cmd.run
06:00 jfindlay I'm not sure how hard it would be to get that
06:01 tweakism it might be stupid-easy, I'll have to check
06:02 jfindlay shell='/bin/bash -l' seems like the natural place to start, but that is bash specific
06:04 jfindlay I wonder if there is a way to ask the system in a generic way for a login shell rather than a non login shell.  It might be profitable to read the source of subprocess.Popen to see how it obtains a shell
06:04 catpig joined #salt
06:06 iggy the situation used to be a little better, but went to shit right around the same time as the cmd.run -> cmd.shell fiasco
06:06 iggy so you might also go back and look at how things were done before
06:08 tweakism jfindlay: "The executable argument specifies a replacement program to execute. It is very seldom needed. When shell=False, executable replaces the program to execute specified by args. However, the original args is still passed to the program. Most programs treat the program specified by args as the command name, which can then be different from the program actually executed."
06:08 tweakism ^^ this is how login communicates it wants a login shell without knowing shell-specific flags
06:09 tweakism when a shell is executed with argv[0] = e.g. "-bash" (or "bash-", I can't remember)
06:09 jfindlay I think it's -bash
06:10 tweakism so yeah it sounds like it'd be easy.  I assume now the shell= param to cmd.run is basically getting passed through to subprocess.popen, so the change to launching the shell manually with be a little bit of difference, but doesn't seem difficult/complicated.
06:11 tweakism jfindlay: that quote was from subprocess.popen btw if not obvious :)
06:12 jfindlay I'm still not sure how that is going to work for all shells without knowing what the shell is
06:12 tweakism jfindlay: oh, you do absolutely have to know what the shell is
06:13 tweakism jfindlay: so it could use the same logic, 1) whatever the cmd.run user specifies, or 2) fallback to /bin/sh.  It could also do a pwent lookup to get the user's default shell, if that'd be useful or if it already does.
06:13 jfindlay so there may be no convenient way to abstract it into a login=True option
06:13 tweakism I don't follow you
06:13 tweakism if you pass login=True and the shell defaults to say /bin/sh, then it executes /bin/sh and sets executable="-sh"
06:14 tweakism and passes in your command.  hrm.
06:14 jfindlay those seem like good ideas.  I'm saying that you can't ask for a login shell from the system without knowing what the shell is going to be, so we'll either have to build guessing code into salt, or expect the user to know what shell they are using and tell them to rewrite argv[0] manually
06:14 tweakism I may have found a mild snag here.
06:15 tweakism jfindlay: they don't have to do it, it's done inside cmd.run
06:15 t0m0 joined #salt
06:16 tweakism jfindlay: as it is now, if the user doesn't specify a shell, we're relying on the subprocess.popen default shell=/bin/sh
06:16 jfindlay cmd.run has a shell argument
06:16 sauvin joined #salt
06:16 tweakism right
06:17 tweakism that's what I'm talking about when I say the user specifies a shell
06:17 tweakism so ok, maybe that also defaults to /bin/sh
06:17 tweakism but either way, all that logic already exists
06:19 tweakism jfindlay: I'll make a stab at implementing it, and we can see what you think.
06:19 jfindlay sure, but I should warn you that I'm not all that wise :)
06:21 brianfeister joined #salt
06:22 jfindlay it looks like subprocess hardcodes `/bin/sh -c` as the default shell
06:23 tweakism yeah that's what its docs said more or less
06:23 jfindlay so no shell-agnostic magic
06:24 tweakism well, it also doesn't get you a login shell
06:24 tweakism perhaps -c is something you can universally depend on
06:24 tweakism I will research and find out
06:24 tweakism this is the snag I mentioned earlier.
06:25 jfindlay the `-c`?
06:25 tweakism but, worst-case scenario is, that salt continues to make the same assumption that it always has, except explicitly in cmd.run instead of implicitly inside subprocess.popen
06:27 jfindlay I am interested in what you find out
06:27 jfindlay thanks, tweakism
06:28 tweakism oh ok, actually cmd.run already has a bunch of shell-choosing logic
06:28 tweakism for different unix OS's
06:28 tweakism kk, I'll let you know
06:29 flowstate joined #salt
06:29 jfindlay there doesn't seem to be a feature request for this already, which surprises me, https://github.com/saltstack/salt/issues?utf8=%E2%9C%93&q=is%3Aissue+cmd.run+login+shell+
06:30 tweakism possibly because the times when you actually need this are way less frequent than the times people think they need this
06:31 tweakism imo it's better to specify whatever environment you need explicitly from the master via env
06:31 tweakism rather than rely on per-user shell init files being setup correctly for your CM to work
06:31 tweakism however, a lot of people seem to want it to work that way and are surprised and befuddled when it doesn't.
06:32 jfindlay it can seem to be a subtle difference if you don't know what a login shell is, but I agree
06:32 tweakism perhaps they've just all been convinced to use absolute paths or the "su -l user -c 'command'" workaround
06:32 tweakism rather than getting as far as a feature request :)
06:33 jfindlay good point :)
06:44 Guest14932 joined #salt
06:45 hasues left #salt
06:46 cyborg-one joined #salt
06:47 Guest14932 left #salt
06:49 totte joined #salt
06:50 josuebrunel joined #salt
06:53 jhauser joined #salt
07:07 favadi joined #salt
07:11 akhter joined #salt
07:17 evle joined #salt
07:30 fooma joined #salt
07:31 flowstate joined #salt
07:40 av_ joined #salt
07:41 bhosmer_ joined #salt
07:45 josue joined #salt
07:45 felskrone joined #salt
07:52 yelin joined #salt
08:04 root_ joined #salt
08:06 ITChap joined #salt
08:08 mavhq joined #salt
08:09 Rumbles joined #salt
08:10 brianfeister joined #salt
08:13 k_sze[work] joined #salt
08:21 mdasilva joined #salt
08:22 linjan joined #salt
08:23 XenophonF joined #salt
08:28 Trauma joined #salt
08:31 antpa joined #salt
08:33 brianfeister joined #salt
08:34 fracklen joined #salt
08:35 flowstate joined #salt
08:35 malinoff joined #salt
08:45 ronnix joined #salt
08:49 cztanu joined #salt
08:58 atmosx joined #salt
09:01 ramteid joined #salt
09:06 evle1 joined #salt
09:07 geomacy joined #salt
09:08 ITChap joined #salt
09:08 toanju joined #salt
09:16 ronnix_ joined #salt
09:17 dmaiocchi joined #salt
09:20 GreatSnoopy joined #salt
09:26 truescot joined #salt
09:29 flowstate joined #salt
09:33 colegatron there is anyway to make this call to work? sudo salt saltmaster state.sls teststate pillar='{"config": pillar.get("saltmaster:config-prod"}'
09:34 colegatron sorry, let me change it to do not confuse
09:34 colegatron sudo salt minion1 state.sls teststate pillar='{"config": pillar.get("saltmaster:config-prod"}'
09:35 colegatron the idea is to send a config variable through pillar with the value of a pillar on saltmaster.
09:35 smkelly joined #salt
09:36 root_ Hi there
09:36 capricorn_one joined #salt
09:37 maxence joined #salt
09:45 capricorn_one joined #salt
09:48 malinoff joined #salt
09:50 mavhq joined #salt
09:52 s_kunk joined #salt
09:54 s_kunk joined #salt
09:58 mavhq joined #salt
10:04 impi joined #salt
10:06 ronnix joined #salt
10:10 hajhatten joined #salt
10:10 hajhatten is there a way to use result of a aws cli (json output) in my states?
10:10 hajhatten i wanna use the get-checker-ip-ranges to update a boto_secgroup from ip:s
10:18 dgutu joined #salt
10:19 phila joined #salt
10:21 mdasilva joined #salt
10:22 slav0nic joined #salt
10:27 phila joined #salt
10:30 flowstate joined #salt
10:32 drico joined #salt
10:32 drico hello
10:32 drico I have this mine function :
10:32 drico host_name:
10:32 drico - mine_function: grains.get
10:32 drico - host
10:32 drico anyone could tell me why it's not working ?
10:33 euidzero joined #salt
10:39 drico ok found it sorry for the noise
10:47 hemebond joined #salt
10:53 rubenb joined #salt
10:55 krymzon joined #salt
11:02 ronnix joined #salt
11:08 CustosLimen joined #salt
11:10 mavhq joined #salt
11:14 euidzero joined #salt
11:18 RandyT joined #salt
11:19 Trauma joined #salt
11:19 bhosmer joined #salt
11:29 flowstate joined #salt
11:35 fracklen joined #salt
11:35 fracklen joined #salt
11:36 Nazca__ joined #salt
11:39 XenophonF colegatron: you can't call the pillar.get function on the command line like that
11:40 XenophonF colegatron: the value of that pillar= argument is a literal
11:40 XenophonF colegatron: no interpolation's happening
11:40 _Cyclone_ joined #salt
11:41 XenophonF hajhatten: you probably have to write your own module/state, which would call the boto library or something itself
11:42 XenophonF drico: glad you figured it out - maybe post a one-liner about the solution for the next person/google? it's not noise :)
11:43 drico it's working good in fact, I had excluded the mine functions from the pillar of that minion, stupid me :)
11:44 t0m0 joined #salt
11:47 dendazen joined #salt
11:47 RandyT joined #salt
11:47 colegatron XenophonF I see. thx.
11:50 XenophonF colegatron: https://docs.saltstack.com/en/latest/ref/cli/index.html#calling-the-function
11:50 XenophonF in case you want chapter and verse
11:51 colegatron tnx for the point. now I've to go, talk later
11:56 geomacy joined #salt
12:00 malinoff joined #salt
12:08 t0m0 joined #salt
12:09 evle joined #salt
12:10 euidzero joined #salt
12:10 mdasilva joined #salt
12:18 hemebond joined #salt
12:19 ronnix joined #salt
12:21 martoss joined #salt
12:23 fracklen joined #salt
12:23 fracklen joined #salt
12:23 VR-Jack2 joined #salt
12:24 toddnni_ joined #salt
12:24 help joined #salt
12:26 tmkerr_ joined #salt
12:26 `chris_ joined #salt
12:26 logandg_ joined #salt
12:26 FreeSpencer_ joined #salt
12:27 toanju joined #salt
12:27 adelcast joined #salt
12:27 Puckel_ joined #salt
12:27 akhter joined #salt
12:27 Ludo- joined #salt
12:27 rmnuvg joined #salt
12:28 mitsuhiko joined #salt
12:28 Pie_Mage joined #salt
12:28 rodr1c joined #salt
12:29 StolenToast joined #salt
12:30 Trauma joined #salt
12:31 flowstate joined #salt
12:32 ThomasJ joined #salt
12:32 Gareth joined #salt
12:33 ze- joined #salt
12:41 dmaiocchi joined #salt
12:42 ggoZ joined #salt
12:44 mdasilva joined #salt
12:49 abednarik joined #salt
12:57 Nazzy joined #salt
13:03 farah joined #salt
13:08 bhosmer joined #salt
13:10 DHAD joined #salt
13:12 flowstate joined #salt
13:13 flowstate joined #salt
13:14 geomacy joined #salt
13:16 west575 joined #salt
13:20 DammitJim joined #salt
13:20 rdxc joined #salt
13:21 rdxc left #salt
13:25 Trauma joined #salt
13:30 Chris___ joined #salt
13:30 Chris___ Hi
13:30 Chris___ Can you help me with saltStack?
13:30 babilen Depends
13:31 Chris___ I need to install the plugin of foreman
13:31 babilen Oh, is that working now?
13:31 Chris___ http://theforeman.org/plugins/foreman_salt/5.0/index.html
13:32 Chris___ When I invoke the command: foreman-installer --enable-foreman-plugin-salt --enable-foreman-proxy-plugin-salt
13:32 Chris___ I`m getting this error
13:32 Chris___ ERROR: Unrecognised option '--enable-foreman-plugin-salt'
13:33 Chris___ Someone ?
13:35 euidzero joined #salt
13:36 babilen That looks rather like a foreman issue, did you try asking in #theforeman ? It would also be interesting to know about the foreman version you use and similar things.
13:38 Chris___ Yes it is a powerful software
13:38 Chris___ Thank you
13:38 Chris___ BTY, I need to decide if I want to use puppet or Salt
13:38 Chris___ Why salt?
13:39 Chris___ Why salt is better?
13:39 gh34 joined #salt
13:39 rofl____ https://www.isostech.com/blogs/development-process/saltstack-puppet-persons-perspective/
13:39 amcorreia joined #salt
13:39 cyborg-one joined #salt
13:41 numkem joined #salt
13:41 Rkp does it have to be better? it just has to be suited to what you need to do
13:46 averell joined #salt
13:53 geomacy joined #salt
13:54 chris___ joined #salt
13:55 chris___ hi
13:55 chris___ My computer disconnect
13:55 chris___ sorry
13:55 chris___ Did you answer me?
13:55 fracklen joined #salt
13:55 fracklen joined #salt
13:55 anmol joined #salt
13:55 drico <rofl____> https://www.isostech.com/blogs/development-process/saltstack-puppet-persons-perspective/
13:56 chris___ yhank you
13:56 chris___ thank
13:56 chris___ Do you have another article?
13:58 babilen chris___: Just search for "puppet salt comparison" or "puppet vs salt" or similar queries
13:58 Trauma_ joined #salt
13:58 subsignal joined #salt
13:58 chris___ thank you
13:59 chris___ I searched aleady and found some article
13:59 chris___ Almost all compare between puppet and ansible not salt
14:00 chris___ I need good justification why to use salt and not puppet, but I think the best
14:00 chris___ is to ask someone who's know the two tools very well
14:01 mdasilva joined #salt
14:02 chris___ drico
14:02 chris___ Did you integrated salt with foreman?
14:03 drico no i just discovered foreman
14:03 pwalsh joined #salt
14:06 rofl____ im using foreman with salt
14:06 rofl____ works excellent
14:07 quix joined #salt
14:07 chris___ Thank you
14:08 chris___ What did you do?
14:09 truescot to be honest theres not a lot in it between puppet and saltstack, they both have their pro's and con's, both tools do the job, some things are marginally better in one or the other but there is nothing to really make the decision which to choose for you
14:10 chris___ what is the pros and cons about salt and puppet?
14:10 dariusjs joined #salt
14:11 chris___ I have found in the net, but I think the author doesn't familiar with the two tools
14:11 chris___ in order to compare two tools you need to familiar them very well
14:11 AndreasLutro my impression: salt is more event-driven, easier to automate and customise. puppet is more stable/reliable
14:12 antpa joined #salt
14:12 mdasilva joined #salt
14:13 mavhq joined #salt
14:13 truescot i would go with that, the main plus of salt i would say is the zero-mq bus
14:13 AndreasLutro why would you say that is a plus?
14:14 truescot but it's still quite an immature product, a lot of development is going into it so with each release new functionality is making its way into it but that means quite a bit upgrading which is not ideal in a production environment
14:15 truescot zeromq tens to be a lot faster with a lot less overhead than other approaches
14:16 truescot which also means you can serve a lot more clients per server
14:16 truescot which also means you can serve a lot more clients per master
14:16 FreeSpencer joined #salt
14:16 FreeSpencer joined #salt
14:18 chris___ thank you
14:18 chris___ What do you mean lot more clients?
14:19 misconfig joined #salt
14:19 chris___ rofl? What did you do in order to install the integration with foreman?
14:19 rofl____ chris___: check the docs
14:22 _JZ_ joined #salt
14:22 chris___ foreman-installer --enable-foreman-plugin-salt --enable-foreman-proxy-plugin-salt
14:22 chris___ but when I am using this command I get
14:23 deus_ex joined #salt
14:23 stbenjam as others mentioned you'd get more help on #theforeman
14:23 stbenjam but the installer options should be there on any recent version of foreman, it was added back in 1.9 or so
14:23 chris___ ERROR: Unrecognised option '--enable-foreman-plugin-salt'
14:24 chris___ how can I connect to the #foreman?
14:25 stbenjam how did you get here?
14:25 stbenjam it's just #theforeman istead of #salt
14:25 stbenjam probably /join #theforeman
14:28 spiette joined #salt
14:28 iceyao joined #salt
14:31 sroegner joined #salt
14:31 chris___ I using Salt irc link
14:31 chris___ I`m
14:32 chris___ maybe I need to copy the link address above and change the channel name?
14:32 nZac joined #salt
14:33 dyasny joined #salt
14:34 dendazen joined #salt
14:37 chris___ I join to the channel
14:37 chris___ there are 5 people
14:37 fracklen joined #salt
14:39 evle3 joined #salt
14:40 XenophonF can someone recommend an elasticsearch formula for salt?
14:44 flowstate joined #salt
14:48 scoates joined #salt
14:51 edrocks joined #salt
14:52 mdasilva joined #salt
14:54 StolenToast I'm having trouble targeting packages on centos6
14:54 zmalone joined #salt
14:55 StolenToast I run something like "sudo salt-call pkg.latest_version openmpi" but I get no output from salt
14:55 racooper joined #salt
14:55 StolenToast the package is installed and the repoquery string finds it but can't seem to give me the information I want
14:56 StolenToast I checked and the full name of the package is "openmpi", there's no other bits
14:56 bhosmer joined #salt
15:01 mdasilva_ joined #salt
15:02 flowstate joined #salt
15:05 iceyao joined #salt
15:05 CeBe joined #salt
15:07 mpanetta joined #salt
15:07 kaptk2 joined #salt
15:08 tkharju joined #salt
15:13 CeBe joined #salt
15:26 jnials joined #salt
15:27 johnkeates joined #salt
15:28 abednarik joined #salt
15:30 dboyer joined #salt
15:31 chris___ mabye the new visitors, anyone know how integrated salt with foreman?
15:31 rubendv joined #salt
15:32 kawa2014 joined #salt
15:33 Brew joined #salt
15:34 bmac2 joined #salt
15:34 XenophonF StolenToast: are you trying to run a state or a module function?
15:34 StolenToast a state function, ultimately pkg.installed
15:35 StolenToast I found that pkg.version gave me more useful information, and I solved my issue
15:35 XenophonF ok
15:35 dboyer Hi all, quick question about the Salt API. I've got it working great where I can target nodes to run salt commands. Is there a way I can target using minion's grains on the API rather than by just the minion_id/glob?
15:35 teryx5101 joined #salt
15:36 StolenToast use the -G flag
15:37 XenophonF dboyer: https://docs.saltstack.com/en/latest/ref/cli/index.html#more-powerful-targets
15:38 XenophonF dboyer: i have some targets that combine pillar and grains
15:38 dboyer Sorry, guess I should've been more specific about "API" - I meant the REST web API aka rest_cherrpy. I know I can do that on the command line
15:40 dboyer Right now on the REST API I target nodes with data in my POST call "tgt=minion_id" but I was wondering if I could target by grain/pillar/something else instead
15:40 winsalt joined #salt
15:44 XenophonF dboyer: I think you have to set tgt_type in addition to tgt
15:45 XenophonF hang on RTFMing
15:46 quasiben joined #salt
15:48 abednarik joined #salt
15:48 chris___ general question
15:48 chris___ How can I download a module from the salt git repostitory and use it?
15:49 XenophonF dboyer: then again, might be expr_form
15:49 XenophonF dboyer: http://stackoverflow.com/questions/28064098/salt-api-use-other-matching-method-other-then-glob
15:50 XenophonF chris___: https://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html
15:50 kawa2014 joined #salt
15:51 dboyer XenophonF: We found it at the same time! Did some digging when you suggested tgt_type and figured it out based mostly on this: https://docs.saltstack.com/en/2015.5/ref/clients/index.html#localclient
15:51 dboyer Thanks for your help
15:51 chris___ thank you XenophonF I will read
15:51 XenophonF chris___: be mindful of dependencies
15:53 chris___ I thought I need just to run a command from salt
15:53 XenophonF dboyer: glad you found that!
15:53 teryx510 joined #salt
15:53 XenophonF chris___: what _precisely_ are you trying to accomplish?
15:53 chris___ I need to download two packages of foreman
15:54 chris___ I understand why I can't integrated it
15:54 chris___ because I don't have these package
15:54 chris___ I need to download https://github.com/theforeman/smart_proxy_salt
15:55 XenophonF chris___: that looks like something that needs to be installed in or by theforeman
15:55 chris___ Yes, but I don't know how I can download it, with command
15:56 mpanetta joined #salt
15:56 XenophonF chris___: there's a download link on that repo page
15:56 sathya joined #salt
15:56 sathya Hi all
15:56 sathya Any info on salt -S options
15:56 XenophonF chris___: or you can use the "git clone" command
15:57 sathya it seems salt is no more supporting tragetting minions based on the IP's
15:57 sathya targetting *
15:57 viq sathya: https://docs.saltstack.com/en/latest/topics/targeting/ipcidr.html#targeting-ipcidr   ?
15:58 sathya @viq: its not working
15:58 sathya salt -S <ip addr> test.ping
15:58 sathya No minions matched the target. No command was sent, no jid was assigned. ERROR: No return received
15:58 chris___ thank you xenophon I will try it
15:58 sathya but the same works with hostname
15:58 sathya salt master version salt 2015.8.7 (Beryllium)
15:59 viq sathya: what happens if you do salt -G ipv4:<ip addr> test.ping ?
16:00 sathya viq : you are the man
16:01 chris___ I download with git clone
16:01 chris___ What's next?
16:01 sathya it works great thanks
16:02 viq chris___: http://theforeman.org/plugins/foreman_salt/5.0/index.html
16:02 chris___ thank viq
16:02 chris___ but I don't know what to do next?
16:03 chris___ I have a working forman
16:03 chris___ foreman
16:03 chris___ but I don't know how to install the plugin
16:03 viq chris___: did you read what I just linked?
16:03 chris___ yes
16:03 chris___ When I am using foreman-installer --enable-foreman-plugin-salt --enable-foreman-proxy-plugin-salt
16:04 chris___ this command
16:04 chris___ I got
16:04 chris___ ERROR: Unrecognised option '--enable-foreman-plugin-salt'  See: 'foreman-installer --help'
16:05 viq chris___: I believe those questions have a better chance of being answered on #theforeman
16:05 chris___ Yes, but no one answer there
16:05 chris___ there are 5 people
16:06 viq You may be in a wrong place, as I see 331 people there
16:06 johnkeates well, the error message is clear: that argument does not exist
16:06 johnkeates See: 'foreman-installer --help' to find the correct argument
16:06 viq and you're not one of them, and I don't see this question posted there
16:06 bmac2 joined #salt
16:07 viq chris___: you want #theforeman and not #foreman
16:08 chris___ oh
16:08 chris___ thank you
16:09 chris___ I access to #foreman :)
16:09 babilen chris___: I mentined that channel a couple of hours ago
16:09 babilen :)
16:10 chris___ I read something else :(
16:12 chris___ sorry
16:12 chris___ How can I insert the name of the person to the chat (the name of which I want to refer to)
16:12 chris___ ?
16:12 XenophonF IP address matching isn't working for me, either
16:12 XenophonF salt 2015.8.7 on freebsd 10.2
16:13 XenophonF or at least, i can't match individual hosts
16:13 XenophonF like, `salt -S 192.0.2.1 test.ping` doesn't work
16:13 chris___ <viq> How did you know there are 300 people?
16:13 XenophonF neither does `salt -S 192.0.2.1/32 test.ping`
16:14 XenophonF but `salt -S 192.0.2.0/24 test.ping` works fine
16:14 Eugene left #salt
16:14 Eugene joined #salt
16:14 viq chris___: because my IRC client shows me
16:14 PeterO joined #salt
16:15 XenophonF chris___: what IRC client are you using?
16:15 viq XenophonF: he's on the freenode's web irc
16:15 XenophonF oh
16:15 chris___ I am using the web client from the site
16:15 XenophonF chris___: are you PC or Mac user?
16:15 chris___ PC
16:16 viq XenophonF: hexchat is for everything ;)
16:16 XenophonF heh
16:16 XenophonF i was going to point him toward mirc even though i don't like it
16:16 XenophonF irssi ftw ;)
16:17 mpanetta MIRC stll exists?
16:17 XenophonF yeah! and still shareware
16:17 mpanetta wow
16:17 mpanetta I used BitchX in the good ole days
16:17 XenophonF ok so chris___, you want to change to a non-crappy irc client
16:18 XenophonF hexchat, pidgin, miranda ng, trillian, mirc - those all have decent irc support
16:18 XenophonF i like miranda ng the best on windows
16:18 johnkeates i like putty+irssi on windows the best :p
16:18 johnkeates and then use ssh to get to a linux box and run it there of course
16:19 viq Why put windows in the mix at all? ;)
16:19 johnkeates maybe at some point powershell will grow a pair and a port of the normal linux packages get over there
16:19 johnkeates yeah :p best sudo delete C: etc
16:21 XenophonF johnkeates: i vaguely remember irssi and bitchx being included by cygwin
16:22 johnkeates i hope cygwin now includes a remove-windows-install-linux.exe :p
16:22 XenophonF god i hope not
16:23 XenophonF it needs to include remove-windows-install-freebsd.exe ;)
16:23 mpanetta haha
16:23 antpa joined #salt
16:23 XenophonF and now we're waaaaaay off topic
16:23 XenophonF i blame chris___
16:23 viq remove-windows-or-linux-or-freebsd-install-openbsd.asm
16:23 XenophonF .asm ftw
16:24 babilen #salt-offtopic-blame-chris
16:24 shaggy_surfer joined #salt
16:25 viq Or taking that a step further, https://xkcd.com/378/
16:25 elsmo joined #salt
16:26 johnkeates i can't find the butterfly key
16:26 babilen Clearly emacs with evil-mode-butterfly
16:29 chris___ blame for what? :(
16:31 johnkeates remove-windows-or-linux-or-freebsd-or-openbsd-install-cp/m.ucode
16:31 johnkeates an installer implemented in intel microcode
16:31 johnkeates what more could you ever want
16:31 johnkeates and you get cp/m at the end!
16:31 johnkeates wheee
16:32 anthpa joined #salt
16:33 amcorreia joined #salt
16:39 XenophonF replace-dos-with-turbodos.com ;)
16:39 XenophonF i still have turbodos on 5-inch floppies in my closet!
16:40 XenophonF wish i had something that could read 'em
16:41 chris___ You have a MAC :)
16:41 XenophonF the best this rubbish mac can do is take pictures of the floppies :-/
16:41 dboyer joined #salt
16:42 johnkeates left #salt
16:42 XenophonF that's what salt needs - a simh state formula
16:43 XenophonF i'm gonna get right on that
16:44 flowstate joined #salt
16:45 bhosmer joined #salt
16:45 bmac2 joined #salt
16:52 chris___ left #salt
16:53 geomacy joined #salt
16:59 chris___ joined #salt
17:07 onlyanegg joined #salt
17:07 flowstate joined #salt
17:10 pirulo joined #salt
17:11 writtenoff joined #salt
17:15 pirulo I'm trying to update a package and I having a hard time to use the command: salt minion pkg.upgrade nfs-*  does any one knows how to use this command
17:15 kahiru joined #salt
17:17 ronnix joined #salt
17:17 sjmh joined #salt
17:17 XenophonF pirulo: what OS is your minion running?
17:18 XenophonF pirulo: what error are you getting?
17:18 pirulo all my minions are redhat from 5 to 7
17:19 XenophonF pirulo: i thought the pkg.upgrade function does a full system upgrade akin to 'yum update' or 'apt-get upgrade'
17:19 XenophonF pirulo: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.yumpkg.html#salt.modules.yumpkg.upgrade
17:19 XenophonF gonna need some kind of error output
17:20 tweakism if you want to update 1 package, just use pkg.latest
17:20 pirulo sure I'm re-running
17:26 flowstate joined #salt
17:26 pirulo XenophonF: I'm not getting any error output, but this: ------------
17:29 brianfeister joined #salt
17:29 codewaffle joined #salt
17:30 pirulo if I use this command: salt minion pkg.latest_version firefox  I only get the latest version of the package
17:31 baweaver joined #salt
17:31 Brew1 joined #salt
17:33 tweakism oh I thought you were making state files, pkg.latest is a state
17:35 pirulo If I run: salt minion pkg.upgrade firefox. I still getting ------------ as an out put
17:36 bmac2 joined #salt
17:42 riftman joined #salt
17:42 Fiber^ joined #salt
17:43 ronnix joined #salt
17:45 andrew_v joined #salt
17:47 flowstate joined #salt
17:52 linjan joined #salt
17:54 quasiben joined #salt
17:55 dboyer joined #salt
17:58 quix joined #salt
18:00 subsignal joined #salt
18:01 antpa joined #salt
18:04 dgutu joined #salt
18:05 quasiben joined #salt
18:06 ageorgop joined #salt
18:06 fracklen joined #salt
18:06 subsignal joined #salt
18:10 johnanonx joined #salt
18:10 cberndt joined #salt
18:11 aaaadfdg joined #salt
18:12 aaaadfdg Hey, whats usally the discustions on this channel about?
18:12 tweakism saltstack
18:13 nidr0x joined #salt
18:16 pwalsh joined #salt
18:18 subsignal joined #salt
18:19 phila joined #salt
18:22 nZac joined #salt
18:26 chris__ joined #salt
18:26 subsignal joined #salt
18:29 flowstate joined #salt
18:31 XenophonF hm, either sudoers-formula or users-formula hard-codes the path to visudo
18:34 bhosmer joined #salt
18:35 fracklen joined #salt
18:36 baweaver joined #salt
18:39 onlyanegg joined #salt
18:40 tkharju joined #salt
18:42 digitalhero joined #salt
18:50 flowstate joined #salt
18:55 akhter joined #salt
19:00 digitalhero joined #salt
19:01 onlyanegg joined #salt
19:10 baweaver joined #salt
19:12 fracklen joined #salt
19:16 hemebond joined #salt
19:16 onlyanegg joined #salt
19:16 digitalh_ joined #salt
19:20 marcinkuzminski joined #salt
19:28 misconfig joined #salt
19:28 GreatSnoopy joined #salt
19:30 bhosmer joined #salt
19:32 whytewolf XenophonF: looks like Sudoers kind of hard codes the path. to /etc/sudoers in linux and /usr/local/etc/sudoers in Freebsd.
19:34 cliluw joined #salt
19:36 onlyanegg joined #salt
19:38 fracklen joined #salt
19:40 mdasilva joined #salt
19:40 XenophonF whytewolf: yeah, it's sudoers-formula
19:40 XenophonF the path to visudo is hard-coded to /usr/bin/visudo
19:52 tercenya joined #salt
19:52 grumm_servire joined #salt
19:53 jorr-el joined #salt
19:56 brianfeister joined #salt
19:56 onlyanegg joined #salt
19:57 flowstate joined #salt
19:59 akhter joined #salt
19:59 geomacy joined #salt
20:01 metalseargolid joined #salt
20:01 liskl joined #salt
20:04 quix joined #salt
20:08 abednarik joined #salt
20:09 linjan joined #salt
20:09 digitalhero joined #salt
20:15 XenophonF would someone with commit access to sudoers-formula please review https://github.com/saltstack-formulas/sudoers-formula/pull/29?
20:15 saltstackbot [#29]title: Use correct pathname of visudo on FreeBSD | Without these changes the `file.managed` states in the `sudoers` and `sudoers.included` SLSes fail to run on FreeBSD with errors similar to the following:...
20:18 beardedeagle joined #salt
20:20 ancients joined #salt
20:20 ancients Is there some way to add more items to a pillar array without completely replacing it?
20:22 XenophonF ancients: in what context?
20:22 beardedeagle So...salt-pepper is cool, but for giggles I wrote a clone using requests/requests-futures and during so I came accross the /key endpoint. What is the advantage of this endpoint over just hitting LowDataAdapter with the SALT.WHEEL.KEY module?
20:24 elsmo joined #salt
20:25 ancients so I have fooGroup : -base
20:25 XenophonF ancients: https://github.com/irtnog/salt-states/blob/development/apache/map.jinja#L65
20:26 XenophonF ancients: https://github.com/irtnog/salt-states/blob/development/_modules/irtnog.py#L8
20:26 beardedeagle Ah, after looking in the code
20:26 baweaver joined #salt
20:26 beardedeagle The Key class does exactly that I guess, though not wrapping all possible salt.wheel.key commands.
20:27 XenophonF ancients: https://github.com/saltstack/salt/blob/develop/salt/utils/dictupdate.py#L20
20:27 XenophonF ancients: i try to avoid cases where i need to merge dictionaries, but the one place i need to do it, that's how
20:27 ancients XenophonF: Thanks.
20:28 XenophonF ancients: if you need different semantics, i'm afraid you'll have to write your own dictionary merge function
20:29 XenophonF ancients: fortunately for me, salt.utils.dictupdate did what i wanted
20:32 dboyer joined #salt
20:32 freeaks joined #salt
20:33 impi joined #salt
20:33 tkharju joined #salt
20:43 sadfadfa joined #salt
20:45 tpaul Is there something I can do to flush the minion cache? In particular for the windows repo, pkg.refresh_db  is not seeing a new package that I added
20:45 wmp joined #salt
20:45 wmp hello
20:46 wmp I took over the former admin server, and I trying to configure minion with salt
20:47 wmp minion send key to minion_pre, what i should doing with this key?
20:47 wmp i should move to minions?
20:47 kahiru_ joined #salt
20:48 fracklen joined #salt
20:48 mdasilva joined #salt
20:48 baweaver joined #salt
20:50 digitalhero joined #salt
20:52 XenophonF tpaul: did you remember to run `salt-run winrepo.genrepo` on your master first?
20:52 tpaul XenophonF: Yep
20:52 tpaul multiple times
20:53 XenophonF tpaul: are you using git repos? if so did you remember to run `salt-run winrepo.update_git_repos` before running winrepo.genrepo?
20:53 checkbook joined #salt
20:53 tpaul XenophonF: ahh that I did not do
20:53 mdasilva joined #salt
20:53 checkbook Yes you did
20:54 XenophonF wmp: you shouldn't be mucking with minion keys directly
20:54 tpaul Actually I have it completely backwards, I was ONLY running  `salt-run winrepo.update_git_repos` not the genrepo
20:54 tpaul Thanks XenophonF
20:55 XenophonF wmp: use the salt-key command to check the key's fingerprint and then again to accept the key
20:55 XenophonF tpaul: you're welcome
20:56 checkbook http://i3.kym-cdn.com/entries/icons/original/000/013/974/clap.gif
20:56 wmp XenophonF: ok, keys is good, now i accept key with "-a", what now?
20:59 jhauser joined #salt
21:05 ajw0100 joined #salt
21:06 onlyaneg1 joined #salt
21:08 huddy joined #salt
21:09 XenophonF wmp: once you've accepted the key on the master, you can run `salt-call state.highstate` on the minion to configure it
21:09 codewaffle can I use ldap3 instead of ldapmod with the built in pillar_ldap ext_pillar to get around the hardcoded ldap:// in ldapmod?
21:09 wmp XenophonF: ok, now i understand ;)
21:10 jdwilly2001 joined #salt
21:11 codewaffle nm, just going to pull ldapmod into _modules and go from there.
21:13 codewaffle which leads me to the undocumented uri parameter.. sorry for all the noise
21:15 colegatron joined #salt
21:19 jdwilly2001 I do not see any contrib for win_archive or win_unzip archive module is Non-Windows... any elegant solution before I contribute one?
21:19 jdwilly2001 elegant solution for unzip zip format in windows
21:21 Heartsbane Can you attach a returner to a salt-reactor state?
21:21 my50c #!/usr/bin/perl -w
21:21 my50c oops
21:21 my50c wromg window
21:22 teryx510 joined #salt
21:22 teryx510 joined #salt
21:23 cyborg-one joined #salt
21:23 linjan joined #salt
21:23 baweaver joined #salt
21:23 mrwboilers joined #salt
21:24 mrwboilers Is there a good way to store the results of a salt module as either a grain or a pillar?
21:25 mrwboilers For example, if mysql.db_exists 'dbname' returns 'True', store that as either a grain or pillar 'dbname: True'
21:25 mrwboilers Something along those lines
21:25 hemebond mrwboilers: Can you not just created a dependency in the other states?
21:26 hemebond If they need the database to exist, then that is a dependency.
21:26 mrwboilers Is there a way to apply a SQL query in a state?
21:26 mrwboilers I know there is mysql.query which can be run on the command line, but can that be applied in a state?
21:26 hemebond Well you can just do a query or cmd.run.
21:27 mrwboilers I basically want to be able to run something like "salt -G 'dbname:true' mysql.query "ALTER TABLE..."
21:27 baweaver joined #salt
21:28 hemebond https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_database.html
21:28 mrwboilers so that the SQL gets applied on every server where that particular database exists.
21:28 hemebond Hmm
21:29 hemebond https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_query.html
21:29 mrwboilers hemebond: I don't want to create the database, I just want to apply arbitrary sql where ever that db already exists.
21:29 jdwilly2001 grains.set module lets you set grains... not sure if they are persisted after reboot
21:29 hemebond Looks like you can store the output in a grain.
21:29 my50c joined #salt
21:29 hemebond Yes, I noticed that it can't just test for the existence of a database.
21:30 jdwilly2001 {% set isDb = salt['mysql.db_exists'] %}
21:30 mrwboilers hemebond: Thanks, that 2nd link could be helpful. My googling failed to find that one.
21:34 ParadoxG joined #salt
21:35 grumm_servire joined #salt
21:36 Heartsbane jfindlay: is there way to attach a returner to the salt-reactor states?
21:36 jeffspeff joined #salt
21:36 ParadoxG I'm having trouble specifying multiple env entries for the Uwsgi formula:  https://gist.github.com/lgunsch/48c5ad3e6656e93fbf53
21:36 ParadoxG I get this error:  Unable to manage file: Jinja variable 'list object' has no attribute 'items'
21:37 geomacy joined #salt
21:39 jfindlay Heartsbane: I'm not sure
21:40 jfindlay returners can be configured in the master.  I'm not sure if/how this can be overridden in a reactor
21:42 Heartsbane jfindlay: actually you can configure them on the minion too. Just trying to figure out how to do a returner on the reactor.
21:43 s_kunk joined #salt
21:44 nikogonzo assuming one has many states that require a http proxy, is there an easy way to set that proxy across all states  that call git.latest for example? or do we have to specify proxies each time for each state
21:45 nikogonzo thanks in advance!
21:45 brianfeister joined #salt
21:45 XenophonF mrwboilers: custom grain? custom pillar? salt mine?
21:45 XenophonF mrwboilers: i'd probably start with mine
21:46 debian112 left #salt
21:46 mrwboilers Never even heard of salt mine. Is that new? I need to keep up better!
21:47 XenophonF i think it was added late 2014
21:47 XenophonF https://docs.saltstack.com/en/latest/topics/mine/
21:48 jhauser joined #salt
21:49 XenophonF too bad you can't use mine data for targeting
21:51 digitalhero joined #salt
21:51 quix joined #salt
21:52 mrwboilers XenophonF: That sucks. It might be great for my purposes if it could be used in targeting.
21:52 XenophonF i dunno might be able to set a pillar key based on the results of a mine function
21:53 mrwboilers If it can't be used for targeting, what exactly is the mine for then?
21:54 mrwboilers looks like it can be used to set a pillar value
21:54 mrwboilers then that could be used for targeting, right?
21:54 tweakism collecting information from minions to be used on other minions, for example.
21:54 hemebond mrwboilers: It's like a dynamic grains.
21:54 hemebond You can fill it with any data which can then be used by other minions.
21:55 tweakism probably has more uses, but I think it's mainly aimed at providing capability similar to puppet's exported resources.
21:55 mrwboilers hemebond: but targeting is the most common use for grains (at least in my limited salt experience)
21:55 hemebond Sure, that's not really what Mine is for.
21:55 hemebond Service discovery.
21:56 hemebond Monitoring.
21:56 hemebond Inventory.
21:56 hemebond Custom application information.
21:57 aalber joined #salt
22:03 toastedpenguin joined #salt
22:08 brianfeister joined #salt
22:09 kevinquinnyo joined #salt
22:13 PeterO_ joined #salt
22:14 flowstate joined #salt
22:18 mdasilva joined #salt
22:22 kevinquinnyo hey all, i have something like this https://gist.github.com/kevinquinnyo/d1c4ef59a53c89d608cf that i use in several states
22:22 kevinquinnyo can it be turned into a mine function or something so my code can be "DRY"er ?
22:23 kevinquinnyo ignore the duplicate variable definition there...
22:24 rmnuvg joined #salt
22:24 hemebond kevinquinnyo: You could probably write a Mine function that just returned the eth1 interface details.
22:25 cyborg-one joined #salt
22:25 kevinquinnyo hemebond: i've had a lot of trouble making mine functions work for anything more complicated than a simple netwrok.interfaces
22:25 kevinquinnyo is there any chance you could show me an example of something that's capable of passing arguments / something more complicated
22:25 mdasilva_ joined #salt
22:25 hemebond I'm afraid I haven't used Mine that much.
22:26 nethershaw joined #salt
22:26 hemebond I personally prefer to control things via Pillars, rather than have the minions tell me things.
22:27 kevinquinnyo i dont like things being statically written in pillars though
22:27 kevinquinnyo harder to autoscale and such
22:28 kevinquinnyo if you put ip addresses hard-coded there, then how do you automagically scale out instances, without having to edit that file again
22:28 hemebond Well, my configuration builds the servers.
22:28 kevinquinnyo well yeah..
22:29 hemebond From the ground-up I mean. Hardware configuration included.
22:29 hemebond So I'm specifying memory, HDD, network interfaces, etc.
22:30 hemebond One Puppet config I'm currently working with has exported resources. I can't say I've enjoyed it.
22:30 flowstate joined #salt
22:30 tweakism I did enjoy exported resources, and while I haven't started w/ mine yet, I feel like it's going to be a lot less enjoyable.
22:31 west575 joined #salt
22:31 tweakism I really miss being able to define a service and the monitoring for that service side-by-side.
22:31 tweakism or a web vhost and the DNS entries for it.
22:31 tweakism so many useful things you can make automatic that way.
22:32 feld joined #salt
22:36 lumtnman joined #salt
22:36 baweaver joined #salt
22:40 kevinquinnyo can i ask my question another way... How can i just create a global way of retreiving the eth1 ip from all the webservers, no matter which minion i'm on, and what state is being run
22:41 kevinquinnyo its unnaceptable to me to repeat the same code in every state that needs it
22:41 tweakism pretty sure the best answer for that is salt mine.
22:41 zenlot6 joined #salt
22:41 kevinquinnyo i must be dumb but i just can not figure out how to turn my mine.get code sample above into a mine_function and how to use it
22:41 tweakism I don't think you want to be querying them at run-time
22:41 kevinquinnyo this https://docs.saltstack.com/en/latest/topics/mine/ i've read several times
22:42 kevinquinnyo agree
22:42 kevinquinnyo my problem is in implementation, ie i dont know how to use it
22:43 djgerm joined #salt
22:44 Nazca__ joined #salt
22:44 abednarik joined #salt
22:46 tweakism it looks like you just put
22:46 tweakism mine_functions:
22:46 tweakism network.ip_addrs: [eth0]
22:46 kevinquinnyo well
22:46 my50c joined #salt
22:46 tweakism into your pillar, enable mining, and then use mine.get in your states that want at the data
22:47 kevinquinnyo https://gist.github.com/kevinquinnyo/914051de93b205da1807 that's what i tried
22:47 kevinquinnyo i'm not sure whether in my code 'private_ips' will be the name of the mine_function
22:47 kevinquinnyo docs don't seem to say
22:47 kevinquinnyo as usual
22:48 flowstate joined #salt
22:48 tweakism I think that's how it works.
22:49 tweakism perhaps because you have a list instead of a dict like shown in the docs
22:49 tweakism (-'s in front of mine_function and eth1)
22:49 digitalhero joined #salt
22:50 kevinquinnyo i think i have it the same as they do
22:50 kevinquinnyo for a named mine function under the mine_functions key
22:50 kevinquinnyo "MINE FUNCTIONS ALIASES"
22:51 djgerm1 joined #salt
22:51 tweakism hrm yes I mis-read it
22:52 kevinquinnyo i just cant get it to work though
22:52 kevinquinnyo no idea
22:52 tweakism I guess that's the mentioned 'different syntax for positional and named arguments'.
22:53 kevinquinnyo im going to try #!py for this
22:53 kevinquinnyo i can't stand yaml
22:56 kevinquinnyo hey so you know how there are some matching you can do like {'cidr: '10..10.0.0/8'}
22:57 kevinquinnyo what is the official name for the default matching of the minion id?
22:57 kevinquinnyo as in what would the key be called
22:57 west575 joined #salt
22:59 kahiru joined #salt
22:59 iamtew joined #salt
23:00 subsignal joined #salt
23:00 tweakism where are you using that syntax at, I'm not familar with it
23:00 lorengordon joined #salt
23:01 tweakism it's not the syntax from the command-line or top-file targeting.
23:01 kevinquinnyo https://docs.saltstack.com/en/latest/topics/mine/
23:01 kevinquinnyo same page..
23:01 kevinquinnyo mine function aliases
23:02 kevinquinnyo i kind of wish you could just write some code there and have it store that
23:02 mariusv_ joined #salt
23:02 Heartsbane joined #salt
23:02 tweakism I don't think that's what that means there
23:02 kevinquinnyo oh well
23:03 tweakism I think that means call the function like this:  network.ip_addrs(cidr="192.168.0.0/16")
23:03 kevinquinnyo yeah i guess it could be an argument to the network ip_addrs function
23:03 kevinquinnyo hm
23:03 kevinquinnyo yeah probably so
23:03 alvinstarr joined #salt
23:03 kevinquinnyo well i got a mine function to work, a simple one
23:03 tweakism and the ip_list example shows how to call one like this:  grains.get(ip_interfaces)
23:03 kevinquinnyo deleted it, and it's still present
23:03 kevinquinnyo i also ran salt \* mine.update
23:04 tweakism I beleive that's expected behavior.
23:04 kevinquinnyo is there like a "Nuke all cache on everything"
23:04 rideh joined #salt
23:04 tweakism I wish I had actually used it, I would probably be a lot more useful :/
23:05 atmosx joined #salt
23:05 iamtew joined #salt
23:05 tweakism https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mine.html
23:05 tweakism there is mine.flush
23:06 kaptk2 joined #salt
23:06 kevinquinnyo ah
23:06 kevinquinnyo thanks
23:06 tweakism also it says update takes a clear=True/False param
23:06 tweakism doesn't say what it does, but I could hazard a guess.
23:07 Nazzy joined #salt
23:07 baweaver joined #salt
23:07 west575 joined #salt
23:08 i90rr joined #salt
23:09 twiedenbein joined #salt
23:10 renoirb joined #salt
23:11 digitalhero joined #salt
23:11 kevinquinnyo does anyone see why fqdn mine_function works, but private_ips mine_function returns nothing https://gist.github.com/kevinquinnyo/c16ce320f38a50ed6383
23:12 kevinquinnyo salt web* network.ip_addrs eth1
23:12 kevinquinnyo works fine
23:12 djgerm1 left #salt
23:12 catpig joined #salt
23:12 west575_ joined #salt
23:13 my50c does anyone know how to esacpe the char # in file.comment ? I have a nasty # somewhere at the end of the line.. and \ or \\ neither works ; thanks
23:14 jhauser joined #salt
23:14 kevinquinnyo have you tried something like 'some text here and then a pund here: {0} and more text'.format('#')
23:16 zenlot6 joined #salt
23:16 my50c let me try :never knew yiu can do that in salt!
23:16 atmosx joined #salt
23:18 my50c no go
23:19 my50c my regex now look loke this: - regex: 'session    optional     pam_motd.so {0} [1]'.format('#')
23:19 tweakism kevinquinnyo: shouldn't they both have the -'s ?
23:19 my50c it errored
23:20 my50c hmm i might need to escape # and [] ....
23:21 tweakism kevinquinnyo: like this https://gist.github.com/pprince/4cf2df367d61d8f42334 ?
23:21 edeefelt joined #salt
23:21 JohnnyRun joined #salt
23:25 edeefelt just looking for general advice on what to do here. I am (fairly) successfully getting salt-minion installed on several linux servers with salt-ssh. The trouble I am running in to is having packagekit (every once in a while) block the "yum install salt-minion" because of the yum lock. Any advice on getting around this (short of logging in each time I see an update hand and killing packagekit)?
23:26 nZac joined #salt
23:26 bhosmer joined #salt
23:29 _Cyclone_ joined #salt
23:34 Eugene I uninstall packagekit
23:34 Eugene YMMV
23:35 ParadoxG left #salt
23:35 edeefelt joined #salt
23:35 scoates joined #salt
23:38 edeefelt is there a way to tell salt to kill other processes blocking it from doing a package update (in this case yum)?
23:39 tweakism I doubt it.
23:39 tweakism anyway if it's in the middle of the transaction you really, really don't want that.
23:39 tweakism easiest thing would probably be to disable automatic updates/makecaches, and just do your automatic updating via salt, no?
23:39 Eugene The default `yum` behaviour is to wait for a lock. I don't know if it's desirable for the salt module to emulate that or just fail-out
23:40 edeefelt it's an issue with something like packagekit blocking it so the job hangs on the master, it never seems to finish, unless I get on the minion and kill packagekit
23:40 my50c you could create a shell/python script that kill it ?
23:40 tweakism edeefelt: the problem I'm assuming is that something is holding the yum lock
23:40 edeefelt yes, and that's proper behavior for yum
23:40 tweakism i.e. a scheduled job for automatic updates
23:41 edeefelt just would love to automate killing the process holding the yum lock (in this case specifically packagekit)
23:41 tweakism edeefelt: I think the correct behaviors for salt are to block, or fail.  but killing the other yum is a terrible idea.
23:41 edeefelt I suppose I could try having salt remove packagekit, but I may still get a yum lock
23:41 tweakism edeefelt: just disable packagekit.  or uninstall it.
23:43 djgerm joined #salt
23:43 edeefelt it only sees to be about 1 in 20. I'll just run a salt job to find anyone with packagekit and try to remove through a salt job, then manually those that fail
23:45 edeefelt thanks, and I agree, bad idea to kill it - I'm just getting impatient with salt-ssh will be nice when I finally have salt-minions everywhere
23:47 edeefelt joined #salt
23:50 edeefelt joined #salt
23:51 mdasilva joined #salt
23:52 edeefelt joined #salt
23:54 thallera1 joined #salt
23:56 tampakrap joined #salt
23:56 digitalhero joined #salt
23:56 clevodearia joined #salt
23:59 conan_the_destro joined #salt

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