Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-03-04

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

All times shown according to UTC.

Time Nick Message
00:00 digitalhero joined #salt
00:02 digitalhero joined #salt
00:03 SmokeBeast79 Doooh!.. Firewalld was running on master!  Fixed it!
00:03 PredatorVI nice
00:05 shaggy_surfer joined #salt
00:15 morissette joined #salt
00:21 mavhq joined #salt
00:30 zzzirk joined #salt
00:33 flowstate joined #salt
00:34 coval3nce joined #salt
00:34 coval3nce anyone seen AttributeError: 'module' object has no attribute 'BASE_THORIUM_ROOTS_DIR' before?
00:36 brianfeister joined #salt
00:44 morissette joined #salt
00:45 bhosmer_ joined #salt
01:05 morissette joined #salt
01:08 mavhq joined #salt
01:08 MindDrive joined #salt
01:09 cro coval3nce: I've seen that when working on Salt in a git checkout and switching branches without deleting all my .pyc files.
01:11 aw110f joined #salt
01:11 tweakism cro: are you sure you were using git
01:12 tweakism that should never happen unless you go out of your way to make git mess with mtimes.
01:12 cro it's rare, but it does happen
01:12 tkharju joined #salt
01:12 tweakism it shouldn't.
01:13 tweakism excluding weirdnesses like having your clock off for days the last time you ran python.
01:13 lemur joined #salt
01:21 iceyao joined #salt
01:22 aanriot joined #salt
01:22 tim_s007 joined #salt
01:25 iceyao_ joined #salt
01:31 _JZ_ joined #salt
01:34 flowstate joined #salt
01:40 bhosmer_ joined #salt
01:44 morissette joined #salt
02:01 tkharju joined #salt
02:02 iceyao joined #salt
02:05 jimklo_ joined #salt
02:06 morissette joined #salt
02:08 zzzirk joined #salt
02:09 iceyao_ joined #salt
02:09 racooper joined #salt
02:11 justanotheruser joined #salt
02:17 kevops joined #salt
02:20 akhter joined #salt
02:20 tkharju joined #salt
02:21 ajw0100 joined #salt
02:22 zengine joined #salt
02:27 shaggy_surfer joined #salt
02:28 donmichelangelo joined #salt
02:34 bhosmer_ joined #salt
02:35 flowstate joined #salt
02:43 k_sze[work] joined #salt
02:46 malinoff joined #salt
02:46 iceyao joined #salt
02:46 cpattonj_ joined #salt
02:46 cpattonj_ Just curious, is there a way to squelch all the "[INFO ]" output when I run ```salt-call ... test=True``` in headless mode?
02:48 ilbot3 joined #salt
02:48 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:48 sjmh joined #salt
02:49 west575 joined #salt
02:51 aharvey joined #salt
02:53 mdasilva joined #salt
02:59 cyborg-one joined #salt
03:12 digitalhero joined #salt
03:17 tkharju joined #salt
03:28 bhosmer joined #salt
03:30 anmol joined #salt
03:33 favadi joined #salt
03:33 flowstate joined #salt
03:34 fracklen joined #salt
04:11 brianfeister joined #salt
04:12 [vaelen] joined #salt
04:18 zzzirk_ joined #salt
04:22 bhosmer_ joined #salt
04:27 Icefoz joined #salt
04:28 deus_ex joined #salt
04:28 daemonkeeper joined #salt
04:29 ajw0100 joined #salt
04:29 nkuttler joined #salt
04:30 dork joined #salt
04:31 lynxman joined #salt
04:31 iggy_ joined #salt
04:31 iamtew joined #salt
04:33 GreatSnoopy joined #salt
04:33 mr_chris joined #salt
04:34 InAnimaTe joined #salt
04:34 flowstate joined #salt
04:35 jfred joined #salt
04:36 lynxman joined #salt
04:37 zzzirk joined #salt
04:40 fracklen joined #salt
04:44 fracklen_ joined #salt
04:45 phx joined #salt
04:45 zzzirk joined #salt
04:46 bdrung_work joined #salt
04:48 SunPowered joined #salt
04:50 malinoff joined #salt
04:53 flowstate joined #salt
04:54 mariusv joined #salt
04:56 zenlot6 joined #salt
04:57 davisj joined #salt
04:58 fracklen joined #salt
05:08 josue joined #salt
05:12 zzzirk joined #salt
05:15 CeBe joined #salt
05:16 bhosmer joined #salt
05:22 zzzirk_ joined #salt
05:22 garphy joined #salt
05:29 anmol joined #salt
05:32 ronrib joined #salt
05:33 flowstate joined #salt
05:36 kshlm joined #salt
05:38 rdas joined #salt
05:41 impi joined #salt
05:43 saywhat joined #salt
05:46 zzzirk joined #salt
05:55 zzzirk joined #salt
05:55 flowstate joined #salt
06:00 brianfeister joined #salt
06:09 anmol joined #salt
06:10 bhosmer_ joined #salt
06:11 hasues joined #salt
06:12 hasues left #salt
06:15 bhosmer_ joined #salt
06:19 sauvin joined #salt
06:22 zzzirk joined #salt
06:23 brianfeister joined #salt
06:31 sybix joined #salt
06:31 justanotheruser joined #salt
06:31 kshlm joined #salt
06:33 flowstate joined #salt
06:33 rominf joined #salt
06:42 iceyao_ joined #salt
06:43 slav0nic joined #salt
06:45 nlb joined #salt
06:45 colegatron joined #salt
06:52 eyckelboom joined #salt
06:54 kshlm joined #salt
07:05 felskrone joined #salt
07:20 Alex__ joined #salt
07:22 subsignal joined #salt
07:26 jhauser joined #salt
07:32 malinoff joined #salt
07:34 flowstate joined #salt
07:35 impi joined #salt
07:36 capricorn_one joined #salt
07:37 Alex__ Hello! We are using Saltstack with external pillars, but due to some problems, sometimes Salt minions recieve blank pillar data and therefore some configs became corrupted. We have already tried to add additional state with test.fail_without_changes, based on what we get from pillar, but it is not always catch blank pillars. Is there way to stop execution of highstate if external pillar system doesn't return proper data?
07:37 FreeSpencer joined #salt
07:37 FreeSpencer joined #salt
07:38 antpa joined #salt
07:38 alvinstarr joined #salt
07:39 Gabemo joined #salt
07:40 jbrnds joined #salt
07:41 unicoletti joined #salt
07:41 AndreasLutro Alex__: making the external pillar throw an exception instead of returning blank data *may* work (I haven't tested)
07:42 AndreasLutro other than that, just do stuff like {{ pillar.foo.bar }} which will hard crash when the pillar "foo" is undefined
07:46 unicoletti joined #salt
07:47 Alex__ AndreasLutro: can you tell more about first option: "throw an exception instead of returning blank data", is there such option in salt?
07:48 tweakism I don't think it works, I tried it.
07:48 honestly_ AndreasLutro: can you tell me where the code is that executes custom execution modules in salt-ssh?
07:48 tweakism but you should try it too in case I'm mis-remembering.
07:49 iggy honestly_: salt uses the normal modules
07:49 tweakism Alex__: it would be from inside the code of your ext_pillar(), assuming it's a custom one.
07:49 iggy honestly_: so... /srv/salt/_modules or thereabouts
07:51 honestly_ iggy: I mean the code that runs the modules.
07:52 fracklen joined #salt
07:53 fracklen joined #salt
07:53 AndreasLutro honestly_: no clue
07:53 iggy honestly_: the loader? the part that collects everything and ships it over? the caller?
07:54 jakwas joined #salt
07:55 Alex__ Ok, not such simple as I thought, but i will try, thanks.
07:56 Aleks3Y joined #salt
07:56 honestly_ I'm looking for the pipeline that parses the execution module arguments
07:57 honestly_ since there's a bug in it that I need fixed (https://github.com/saltstack/salt/issues/31542)
07:57 saltstackbot [#31542]title: jinja stringifies dict before passing it to execution module (maybe salt-ssh specific?) | ### Expected Behavior...
07:57 fracklen joined #salt
07:59 mdasilva joined #salt
08:00 ajmath_ joined #salt
08:04 bhosmer joined #salt
08:06 cyborglone joined #salt
08:06 babilen Alex__: The problem is that for salt an empty dictionary is valid data (and why wouldn't it?), whereas you consider that an error. You have to make that explicit by throwing an exception in your external pillar (assuming you wrote it yourself) or communicate it "in band" and check for that. Weren't you doing some REST API calls in there? Just fail if they don't work.
08:10 honestly_ AndreasLutro: you talked about the serialization in the bug thread, you don't know where that actually happens?
08:14 tweakism babilen: it sucks, throwing an exception in ext_pillar() doesn't stop anything
08:14 tweakism babilen: and a failing ext_pillar() really should be an error
08:15 tweakism or I dunno, maybe not, but it's really easy to cause some nasty re-mis-configurations, and most people probably don't see it coming.
08:18 babilen tweakism: It should be, absolutely .. but then you probably have to be explicit about the data you expect to be present and fail if it is not.
08:18 GuiS joined #salt
08:19 babilen I'd be curious why the test.fail_without_changes solution we discussed earlier doesn't work for Alex__ -- It seems to do exactly that the way it was designed, didn't it?
08:20 tweakism I must have missed this convo.
08:22 babilen tweakism: Idea was essentially a "{% if foo not in bar %} FAIL_HORRIBLY: test.fail_without_changes: .... {% endif %}
08:22 Alex__ babilen: I think that troubles with ext pillar may be not such permanent, and when one state get the correct data, the next state will get some problems...
08:23 subsignal joined #salt
08:23 tweakism it should only call ext_pillar once per minion per highstate, right?
08:24 Alex__ babilen: And we can't use verification, based on expected data due to constructions like merge. I think the best way is ti raise an exception if ext_pillar don't answer
08:25 babilen So, wait .. is the problem that the pillar data is changing halfway through the highstate?
08:25 NaCl_ joined #salt
08:26 babilen Alex__: But even then, the data would still not be there and the highstate would continue working with "no data" and thereby removing previous configuration.
08:26 tweakism maybe he is expecting ext pillar to overrride defaults from elsewhere and it's making it difficult to tell just from the merged pillar data whether ext pillar returned any data or not
08:26 Alex__ babilen: I think so, based on tests, when test.fail_without_changes work not always.
08:27 babilen That should be investigated in more detail (probably in a bug report) if that is the case
08:27 tweakism Alex__: is it that even though that state fails, it continues on to apply other states?
08:28 babilen I mean the "What will this do if the user doesn't supply pillar data?"-problem is a common one and the soltution typically is either: 1. Provide sane defaults or 2. Don't run the state
08:28 babilen Alex__: And, once that state fails it should fail *hard* to stop the highstate run.
08:30 babilen Setting that globally isn't something I like. Curious that the test states don't take that as an argument or, even, why failhard can't be used to alter every state
08:30 awerh joined #salt
08:31 tweakism yeah I was expecting it to be an option on fail_without_changes but nup
08:31 dgutu joined #salt
08:31 tweakism anyway I guess I agree that states should validate their data before doing anything dangerous
08:31 tweakism but I would still like at least the option to abort processing if an ext_pillar() raises an exception
08:33 flowstate joined #salt
08:33 Rumbles joined #salt
08:34 awerh God morning, I have some strange errormessages when using salt-ssh
08:34 awerh https://gist.github.com/anonymous/08262171067ae8589de1
08:35 babilen awerh: Is msgpack-python installed on the minion you connect to?
08:35 babilen (which distribution is that?)
08:36 awerh I dont know actually, I run salt-ssh on several thousands of servers and they are all pretty much the same. Debian 7 and a few of them is debian 8
08:36 babilen OSX box?
08:36 awerh None
08:37 babilen What is your box?
08:37 awerh Ubuntu 15.04
08:37 babilen There's a python-backports.ssl-match-hostname package that might be missing
08:37 babilen (it's a 3.2 library that has been backported)
08:37 awerh Well, some minions does answer correctly actually
08:37 awerh about 15-20%
08:38 babilen awerh: Could you try installing python-backports.ssl-match-hostname on one of them and checking if that solves the problem?
08:38 Alex__ babilen: Here is some test state, that i was using to determine if pillar data aviable from ext pillar - http://pastebin.com/ANNS59mC, and it works from time to time. Should Salt get pillar data once per highstate run or not?
08:38 babilen http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, …
08:39 babilen Why do you set the order there?
08:39 babilen (and wouldn't you want that to be 1 ?)
08:40 babilen That is: As early as possible
08:40 Alex__ I think that such test must run first, there no states with lower order
08:41 babilen awerh: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=805071
08:41 babilen https://github.com/saltstack/salt/issues/27355 (very annoying)
08:41 saltstackbot [#27355]title: salt ssh error with debian 7 on target | salt-ssh and 2 targets ( debian 7 and debian 8 )...
08:41 babilen I am facing that on some boxes
08:42 babilen Alex__: How do you know? Salt modifies the order to accomodate requisites.
08:42 babilen Are you explicitly setting the order numerically for *all* your states or, even, just a subset of them?
08:43 awerh babilen: thanks, Ill try to install python-backports
08:43 babilen awerh: Well, it is not available everywhere
08:43 Alex__ babilen: Just for subset
08:44 awerh Seems like it's not aviable in the repo for debian 7
08:44 felskrone joined #salt
08:45 babilen Alex__: Apart from "order: 1" or "order: last" I consider setting that to be a huge no-no. You should use requisites so that salt can sort states for you based on their dependencies.
08:45 babilen awerh: Yes, exactly (see the referenced bug report -- it is neither in wheezy nor squeeze)
08:46 awerh That's explains alot, because it seems to work on every debian 8 boxes
08:46 Alex__ babilen: But i think it doesn't matter right now, this state must run every time the pillar data is blank, but it doesn't...
08:46 atmc joined #salt
08:47 atmc a little dumb question, when do the minions pull changes from the master?
08:47 atmc or do i have to invoke that from the server
08:48 babilen Alex__: I have no idea why that would be the case and I would strongly recommend to open an issue about it. The "order: 3" strikes me as highly unusual and *might* be related, but that is hard to say
08:49 awerh Yep, it seems to be fixed on debian 8, but that's np because we are upgrading every debian to jessie very soon
08:49 awerh Have a gr8 day babilen, thanks
08:49 babilen awerh: Exactly .. this bug is quite annoying and I'd rather see it fixed soon. Unfortunately it doesn't seem to get much attention.
08:49 atmc or do i have to setup a cronjob which executes salt-call sate.highstate?
08:50 fracklen joined #salt
08:50 anmol joined #salt
08:50 Alex__ babilen: ok, thanks, I'll test it some more and then open an issue
08:52 babilen atmc: Highstates runs have to be explicit, but you can easily schedule that on the master if you want to. I wouldn't use minion-local cron jobs for that. Take a look at https://docs.saltstack.com/en/latest/topics/jobs/#scheduling-jobs
08:53 evle1 joined #salt
08:53 atmc babilen: the "problem" is actually that my minions are not always online
08:54 JohnnyRun joined #salt
08:55 atmc babilen: ok, i could push my initial configuration and then use the scheduled one
08:56 denys joined #salt
08:56 josuebrunel joined #salt
08:57 _JZ_ joined #salt
08:57 babilen atmc: You could also use startup_states or reactors (with enabled presence events) to run it when a minion comes online or its presence status changes
08:57 atmc wow, thats even better (i'm a refugee from puppet java vm garbage)
08:57 babilen Question is: Do you simply want to make sure that a highstate is run once a minion comes back online after some time or do you want it to run periodicall
08:57 babilen y
08:57 atmc both at best
08:58 bhosmer joined #salt
08:59 babilen https://docs.saltstack.com/en/latest/ref/states/startup.html for startup states, https://docs.saltstack.com/en/develop/topics/reactor/index.html and https://docs.saltstack.com/en/latest/topics/event/master_events.html#presence-events + https://docs.saltstack.com/en/latest/ref/configuration/master.html#presence-events
08:59 atmc sweet, thank you sir.
08:59 geomacy joined #salt
09:01 babilen You can easily watch the event bus with "salt-run state.event pretty=True" -- I'd enable presence events, watch it and bring minions up and down. You'll get a good feeling for the kind of events you can react to. Reactors can fire any execution function (and thereby state) you want, so you really have quite a powerful tool to react to changes in your infrastructure
09:02 babilen (and for extra happy: https://docs.saltstack.com/en/latest/topics/beacons/ which allow you to feed *any* minion data stream into the salt event bus)
09:04 bhosmer joined #salt
09:05 permalac joined #salt
09:07 babilen atmc: With the schedule .. you really just have to set them in the minion pillar data. There is no need for anything on top of that.
09:07 Rumbles joined #salt
09:07 kawa2014 joined #salt
09:08 atmc eh ok
09:08 atmc i have to get a hang of the nomenclature
09:15 babilen atmc: Sure, it is probably a lot to take in at once. Pillars are minion specific data and frequently used for parametrisation in states or making private data available to minions.
09:15 linjan_ joined #salt
09:16 atmc babilen: i cannot put schedules in a state right?
09:17 babilen atmc: You can, but why would you want to? If you keep them in pillars they are *very* flexible (as you can change that data anytime) with the same outcome.
09:17 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.schedule.html
09:17 babilen I'd set them in pillars though.
09:18 atmc hm ok
09:19 sjorge joined #salt
09:19 sjorge joined #salt
09:19 GreatSnoopy joined #salt
09:20 atmc babilen: testing now. installed a package and it should sync every minute to check if its deinstalled
09:22 atmc babilen: somehow i get ERROR: Minions returned with non-zero exit code
09:22 atmc with just one pkg requirement
09:23 atmc and Failed:    0
09:29 sfxandy joined #salt
09:29 dmaiocchi joined #salt
09:29 awerh babilen: just wanted to tell you that installing python-backports.ssl-match-hostname_3.4.0.2-1_all did'nt solve the problem in debian 7, but it sure did tear the php installation on my server apart :P
09:33 evle joined #salt
09:33 mavhq joined #salt
09:34 flowstate joined #salt
09:35 s_kunk joined #salt
09:37 ronnix joined #salt
09:42 catpig joined #salt
09:42 marno /quit
09:42 molen3 joined #salt
09:45 kawa2014 joined #salt
09:46 mavhq joined #salt
09:47 LostSoul_ Hi
09:48 LostSoul_ Question, is it normal that after adding additional repo for pillars salt-master doesn't see minions that are not in both top.sls?
09:51 s_kunk joined #salt
09:51 s_kunk joined #salt
09:57 fracklen joined #salt
09:59 fracklen joined #salt
10:01 mdasilva joined #salt
10:03 aqua^c joined #salt
10:06 mavhq joined #salt
10:15 babilen awerh: *sigh* -- Where did you get that from?
10:16 babilen awerh: I mean that's probably a package from sid, stretch or jessie that was never meant to be installed on wheezy
10:18 babilen LostSoul_: You should only have one top.sls and you might want to keep it in its own repo.
10:20 jbrnds2 joined #salt
10:24 mavhq joined #salt
10:25 LostSoul_ I have 2 repos one for salt config, second for pillar
10:26 subsignal joined #salt
10:26 mavhq joined #salt
10:27 jesusaur joined #salt
10:28 RandyT joined #salt
10:30 malinoff joined #salt
10:32 permalac joined #salt
10:35 flowstate joined #salt
10:38 ronnix joined #salt
10:43 malinoff joined #salt
10:43 ujjain- joined #salt
10:44 colegatron I am very curious with a git.latest -branch that is not being checkout to the fs
10:44 colegatron http://pastebin.com/pvFU2vCv
10:45 colegatron it is the same exact state I use for other projects and it works checking out the right tag for them, but does not work here
10:48 babilen LostSoul_: Ah, that shouldn't be a problem at all. Could you elaborate on your issue and, if applicable, provide paste on one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
10:50 garphy joined #salt
10:53 bhosmer joined #salt
10:53 MadHatter42 joined #salt
10:58 mavhq joined #salt
11:02 amcorreia joined #salt
11:03 cyborg-one joined #salt
11:03 t0m0 joined #salt
11:08 v12aml joined #salt
11:08 snowwolf joined #salt
11:12 sjorge joined #salt
11:12 sjorge joined #salt
11:13 rory joined #salt
11:27 subsignal joined #salt
11:34 mavhq joined #salt
11:34 fracklen joined #salt
11:35 flowstate joined #salt
11:44 quix joined #salt
11:47 bhosmer joined #salt
11:47 hoonetorg hi
11:48 hoonetorg i'm currently writing  _modules and  _states and a formula for managing pacemaker/corosync clusters
11:48 mavhq joined #salt
11:48 hoonetorg see here: https://github.com/hoonetorg/salt-pcs-formula
11:49 hoonetorg i'm mainly writing _modules/pcs.py and _states/pcs.py currently
11:50 hoonetorg i'd like to see this included in upstream salt
11:50 losh joined #salt
11:50 quasiben joined #salt
11:50 hoonetorg can some of the devs here have a look, if the code meets the requirements for inclusion???
11:51 hoonetorg currently a the module and the state can be used to authenticate cluster nodes to each other
11:52 aqua^c joined #salt
11:54 t0m0 joined #salt
11:55 ronnix joined #salt
11:56 fracklen joined #salt
11:56 fracklen joined #salt
12:02 LostSoul_ babilen: Thanks, will do
12:02 mdasilva joined #salt
12:02 abednarik joined #salt
12:14 mavhq joined #salt
12:16 t0m0 joined #salt
12:17 hoonetorg ^^^ I thought asking early is always better as when a lot of work is done (wrong). :)
12:18 AndreasLutro hoonetorg: you're much more likely to get feedback with a pull request on github
12:18 malinoff joined #salt
12:18 thraxil joined #salt
12:22 LondonAppDev joined #salt
12:25 hoonetorg AndreasLutro: thx
12:27 hoonetorg AndreasLutro: fork salt, create a branch, copy states and modules files in it and create a PR???
12:27 hoonetorg is that about the right way?
12:28 subsignal joined #salt
12:31 catpig joined #salt
12:34 quasiben joined #salt
12:34 fredvd joined #salt
12:39 av_ joined #salt
12:40 jbrnds joined #salt
12:41 bhosmer joined #salt
12:44 DammitJim joined #salt
12:44 atmosx joined #salt
12:48 geomacy joined #salt
12:49 ggoZ joined #salt
12:53 zengine joined #salt
12:58 traph joined #salt
13:01 kevops joined #salt
13:22 akhter_1 joined #salt
13:26 mrtn_ joined #salt
13:26 Miouge joined #salt
13:26 mrtnT_ joined #salt
13:27 meomrtn joined #salt
13:29 subsignal joined #salt
13:30 mdasilva joined #salt
13:32 zengine_ joined #salt
13:35 meomrtn Hello. Can somebody point me in the dircection of a tutorial/doc/the right_google_terminology/best_practice of how to assign a newly with salt-cloud created server a "role" ?
13:35 bhosmer joined #salt
13:37 AndreasLutro hoonetorg: yeah sure
13:37 gh34 joined #salt
13:38 AndreasLutro meomrtn: so many ways to do that, so it depends on your setup - but if you're only just starting I recommend putting the role in the hostname somehow and then matchin on that in your top.sls files
13:44 meomrtn AndreasLutro:  thanks, makes sense. But would i then not first have to call "salt-cloud blabla && salt new_name state.highstate " Or am i doing this more complicated than nesecary?
13:50 AndreasLutro meomrtn: there are various ways to get new minions to automatically run a highstate when they are brought up
13:50 _JZ_ joined #salt
13:50 AndreasLutro reactors, a minion config value that I can't remember, probably a salt cloud config value as well
13:51 meomrtn ok, but knowing that there are allot of possible ways is a help, then i will stop searching for "the right way" and just take anything that works :)
13:51 fredvd joined #salt
13:51 meomrtn AndreasLutro: Thanks allot!
13:54 fracklen joined #salt
13:54 SoKate joined #salt
13:55 spiette joined #salt
13:58 numkem joined #salt
13:58 fcj joined #salt
13:59 subsignal joined #salt
14:03 subsigna_ joined #salt
14:09 bowhunter joined #salt
14:12 tellendil left #salt
14:12 tellendil joined #salt
14:12 tellendil left #salt
14:14 DanyC joined #salt
14:22 ronnix joined #salt
14:23 ronnix joined #salt
14:25 malinoff joined #salt
14:26 Laserwhit joined #salt
14:28 dyasny joined #salt
14:29 bhosmer joined #salt
14:31 jbrnds joined #salt
14:32 spiette joined #salt
14:34 jbrnds2 joined #salt
14:36 mavhq joined #salt
14:39 ronnix joined #salt
14:42 iceyao joined #salt
14:43 toastedpenguin joined #salt
14:46 cpowell joined #salt
14:49 zzzirk joined #salt
14:51 racooper joined #salt
14:53 DanyC anyone around with some Jinja experience? if so any idea how i can get s'thing like this working https://www.refheap.com/115499 ?
14:53 DanyC i gess path not defined
14:54 quix joined #salt
14:55 bhosmer joined #salt
14:57 hasues joined #salt
14:57 kawa2014 joined #salt
14:59 scoates joined #salt
15:00 coval3nce joined #salt
15:00 Brew joined #salt
15:01 ronnix joined #salt
15:01 RabidCicada joined #salt
15:01 zmalone joined #salt
15:02 hasues left #salt
15:05 aanriot left #salt
15:08 zzzirk joined #salt
15:11 zsoftich4 joined #salt
15:15 zzzirk joined #salt
15:16 iceyao joined #salt
15:17 renoirb joined #salt
15:19 flowstate joined #salt
15:29 drawsmcgraw He left.... he had two h's in 'path'... :(
15:29 iceyao joined #salt
15:31 babilen Errors you'll never spot yourself ...
15:32 digitalhero joined #salt
15:32 linjan_ joined #salt
15:35 edrocks joined #salt
15:36 freeaks joined #salt
15:37 zzzirk joined #salt
15:38 RabidCicada lol...extra pair of eyes is always good
15:43 ronnix joined #salt
15:44 dopey joined #salt
15:45 dopey Is there anywhere I can find rpms for 2015.9 version for centos? i'd rather install without bootstrap.sh
15:45 dopey only repos i can find are 2015.8 unfortunately
15:45 zmalone 2015.9 isn't a release
15:45 dopey oj misread their mail.. 2015.5.9
15:45 zmalone 2015.8 is the most recent stable release, unless 2016.3 was announced today
15:45 dopey which i guess is older than 2015.8 :)
15:45 dopey Sorry, doing deps for a vendor and just misread :)
15:46 dopey i'll go back to my corner, thank you tho
15:46 zmalone No problem, 2015.5 is a current release, it's just older then .8.
15:46 mavhq joined #salt
15:48 dopey yep makes sense, just missed the extra . in his mail :)
15:48 dopey we are actually an ansible shop but this vendor using salt.. so installing salt with ansible
15:48 dopey devops circle of life complete..
15:48 babilen hehe
15:48 dopey that plus network hell, the bootstrap idea made me cringe
15:48 babilen Now .. use the salt reactor to start ansible jobs whenever a minion comes online
15:49 dopey <3 :) We looked at salt hard, but we have allot of 3rd party systems so minimal deps on remote host was a biggie
15:51 mavhq joined #salt
15:52 APLU joined #salt
15:53 RabidCicada dopey: have you looked at salt ssh support (I'm not a salt developer so no agenda...)  just curious if you checked it out.  I'm assuming you are doing ansible due to masterless/ssh
15:56 kim0 joined #salt
15:56 babilen There are also plenty of people who run masterless
15:56 RabidCicada Masterless salt-call is what I'm using now to setup devenv, testing env, or runtime env for our product
15:57 babilen Sure ... you wouldn't necessarily want to miss out on features such as the salt mine, reactors or beacons
15:57 babilen Does ansible support something like that?
15:57 babilen (by now?)
15:58 babilen No idea how they'd do it though
15:58 RabidCicada No clue.  I use full fledged salt at home on my network and fake cloud.  But for this work project salt-call is good enough...don
15:58 RabidCicada 't need continuous state monitoring...just setup
15:59 gasbakid joined #salt
15:59 Aleks3Y joined #salt
16:00 tongpu joined #salt
16:01 ronnix joined #salt
16:03 mdasilva joined #salt
16:04 mdupont joined #salt
16:05 mavhq joined #salt
16:08 dopey yeah a little RabidCicada basically it seemed default mode was minion for salt and default for ansible was mastelress
16:08 tkeith joined #salt
16:09 dopey end of the day both would of worked, i think they all have their pros/cons
16:09 tkeith Is there any risk in accepting a key from an untrusted minion? Is there anything the minion can do to sabatoge the master?
16:10 onlyanegg joined #salt
16:10 flowstate joined #salt
16:11 flowstate joined #salt
16:11 AndreasLutro tkeith: it could be sent sensitive pillar data
16:11 tkeith AndreasLutro: From the master perspective, I'm only assigning states & pillars that it should have
16:12 AndreasLutro how do you define "it should have" though
16:12 tkeith AndreasLutro: They won't contain senstive information
16:13 tkeith AndreasLutro: A minion can't change it's name right?
16:13 AndreasLutro when you say "accept an untrusted minion", it heavily implies that you accept it whatever its hostname is
16:13 RabidCicada tkeith: The problem is a minion can change it's grain data without being re-authed
16:13 AndreasLutro and the hostname could mean it gets pillars assigned to it
16:13 RabidCicada auth is based on key and ID...if minion changes ID then it has to re-auth
16:14 tkeith AndreasLutro: I phrased the question wrong. I am setting up a fresh server as a minion and then giving SSH access to a potentially untrusted source (less trusted than the rest of the network)
16:15 AndreasLutro ssh access to and from where?
16:15 tkeith RabidCicada: Changing grain data shouldn't typically result in sensitive information being sent through right?
16:15 AndreasLutro it's not that uncommon to match grains in pillar top.sls
16:15 tkeith AndreasLutro: SSH access to the fresh minion
16:15 tkeith AndreasLutro: Hmm ok, I'm not doing that now though
16:16 AndreasLutro I wrote this about the topic recently https://www.lutro.me/posts/dangers-of-targetting-grains-in-salt
16:16 AndreasLutro tkeith: give me a more detailed picture. how are you setting up the new minion server? what role does it serve?
16:17 tkeith AndreasLutro: I'm setting up a server with salt-cloud for a 3rd party to set up their software on (they will be setting it up manually, not via salt. I just want to use salt to manage updates, monitoring, etc)
16:19 AndreasLutro okay so worst case scenario - when the server gets set up, a malicious server connects to your master with the same minion ID. it gets accepted instead of the authentic server, and suddenly the malicious sevrer now has all the pillar data the real server was supposed to get
16:19 AndreasLutro that's pretty far-fetched though, and can be prevented by pre-generating the keys on the master
16:22 kevinquinnyo joined #salt
16:22 aqua^c joined #salt
16:22 AndreasLutro oh and obviously you should also consider what sort of damage could be done if the server gets compromised after it's been accepted
16:23 fracklen joined #salt
16:23 kevinquinnyo I'm building an execution module that wraps cmd.run (kinda like the git module) and i'ld like to setup a default option to be passed with every command, but allow it to be overridable via __opts__ .  What's the best way to handle this in my module
16:23 mavhq joined #salt
16:24 kevinquinnyo should i just set it in __opts__ up top checking first that the option is None?
16:24 kevinquinnyo or is there a better way
16:24 illern joined #salt
16:25 AndreasLutro my_var = __opts__.get('my_var', 'default_value') ?
16:25 kevinquinnyo i was planning on doing something just like that
16:25 kevinquinnyo just wondering if that's the 'right way'
16:26 AndreasLutro can't think of a better way
16:26 kevinquinnyo ok thanks
16:27 RabidCicada Alright...so I knoew everyone's different and needs are different...but: Is there a typical idiomatic use for Env's?  I see the example of dev/qa/prod.  But I feel like the entire state tree including a single "Env" could be kept in git/VCS and checked out onto a different machine pool for testing.  The example seems to imply keeping master pinned and only migrating the state tree through
16:27 RabidCicada environments.  What does everyone here use environments for?
16:27 tkeith AndreasLutro: Ok thanks!
16:27 mavhq joined #salt
16:28 RabidCicada I was going to use environments to decide what gets installed on a machine for a piece of software we are using (dev env would install dev packages, run would install only runtime dependencies, test would install texting package dependencies)
16:29 RabidCicada I'm a little annoyed that I'll have to create a separate env for a very minor top.sls retarget (include one additional state file for dev that itself includes the run state file)
16:30 w1gz left #salt
16:30 winsalt joined #salt
16:30 mavhq joined #salt
16:31 AndreasLutro you might be able to do that without salt environments
16:31 AndreasLutro you'd have to complicate your states with some {% if pillar.install_test_pkgs %} or something
16:32 LondonAppDev__ joined #salt
16:32 RabidCicada Ultimately I feel my problem is I'm deciding between using environments to stage code maturity through a pipeline (check into dev, then test, then run) vs using environments to set desired end state (The target machine will be set to dev, or test, or run because it's role is to be a dev machine or test machine or run machine).  Two different primary uses of environments and I'm wondering if anyone
16:32 RabidCicada has lessons learned or stylistic idioms
16:32 atmosx joined #salt
16:33 AndreasLutro my personal lesson from trying to use environments is... don't use environments, they're too messy
16:33 RabidCicada Yeah...I kindof felt that way....don't really like it.  And I also don't think I can feed multiple environments through a salt-call with --file-root
16:34 RabidCicada I odn't know how to set a grain through salt-call highstate either.  I'm guessing I'd have to make two salt-calls...one with grains.set and one with my highstate call
16:34 RabidCicada Yeah...I guess I'll do pillar
16:34 AndreasLutro why do you have to set a grain? they aren't meant to be changed
16:35 RabidCicada then play off of --pillar= in salt-call state.highstate
16:35 RabidCicada I am trying to target the dev/ruyn/test  and thought there would be a way to set grain on the fly...
16:36 RabidCicada AndreasLutro: I think the pillar approach is what I should use...thanks for brain kick
16:39 amcorreia joined #salt
16:39 jimklo joined #salt
16:43 antpa joined #salt
16:47 noraatepernos joined #salt
16:50 mavhq joined #salt
16:53 digitalhero joined #salt
16:55 onlyanegg joined #salt
16:56 berserk joined #salt
16:59 abednarik joined #salt
17:00 vpm joined #salt
17:00 flowstate joined #salt
17:00 digitalhero joined #salt
17:01 digitalhero joined #salt
17:01 flowstate joined #salt
17:01 dabb joined #salt
17:01 kevinquinnyo NameError: name '__opts__' is not defined   -- I'm getting that error inside a state module
17:01 kevinquinnyo shouldnt it be defined?
17:02 jhauser joined #salt
17:03 wych joined #salt
17:04 kevinquinnyo Correction:  Execution module
17:04 zengine joined #salt
17:06 zengine_ joined #salt
17:06 babilen kevinquinnyo: https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html might be helpful
17:07 writtenoff joined #salt
17:07 kevinquinnyo thanks babilen
17:07 gimpy2938 How can I create a nodegroup that matches multipleminion name ranges?  e.g. 'cn1-cn35 and sn1-sn4'
17:08 alinuxninja joined #salt
17:08 flowstate joined #salt
17:11 slav0nic joined #salt
17:11 babilen gimpy2938: Write regular expression for those or work with globs
17:12 losh joined #salt
17:12 babilen gimpy2938: Read up on compound matchers
17:13 gimpy2938 babilen: I have the docs open, they aren't really clear.  For example, can I just use a range?  Docs say "R@%foo.bar" but I have no idea what that is trying to say, it looks nothing like a "range" to me
17:14 rm_jorge joined #salt
17:15 yidhra_ joined #salt
17:15 mavhq joined #salt
17:19 noraatepernos joined #salt
17:20 kevinquinnyo allow_root = __salt__['config.get']['wp_cli.allow_root', True]
17:20 kevinquinnyo TypeError: 'function' object has no attribute '__getitem__'
17:20 babilen gimpy2938: No, you can't use a range. Well, you could do something like "foo[1-9]" which would result in foo1, foo2, ..., foo9, but foo[1-35] is not possible.
17:20 rubenb joined #salt
17:20 kevinquinnyo oh shoot
17:20 babilen kevinquinnyo: That would be "__salt__['config.get']('wp_cli.allow_root', True)
17:20 kevinquinnyo i see my typo once i pasted it
17:20 kevinquinnyo yeah
17:21 * kevinquinnyo hides
17:21 babilen I can see you!
17:24 babilen gimpy2938: I believe that refers to https://docs.saltstack.com/en/latest/topics/targeting/range.html rather than the "range" you (and everyone else) would assume
17:24 babilen gimpy2938: Something like 'foo[1,2][0-9] or foo3[0-5]" should work for globbing
17:24 NeckBeardPrince joined #salt
17:25 mdasilva_ joined #salt
17:25 aw110f joined #salt
17:25 babilen well, s/foo/cn/ in your case + sn[1-4
17:26 babilen ]
17:26 zzzirk joined #salt
17:27 flowstate joined #salt
17:28 digitalhero joined #salt
17:33 lunarlamp joined #salt
17:38 dabb joined #salt
17:42 grumm_servire joined #salt
17:42 gimpy2938 babilen: I went with regex because if I'm forced to make it kinda ugly, why not go whole hog and make it unreadable while I'm at it
17:43 abednarik joined #salt
17:44 dabb joined #salt
17:45 winsalt im trying to upgrade windows salt-minion to 8.7, using the win repo, but pkg.install returns an Attribute error https://bpaste.net/show/eb121f685ffe.  I assume there is a mixup reading the repo init.sls, anybody know whats going on?
17:46 babilen gimpy2938: That's the spirit!
17:47 92AAAHN1H joined #salt
17:49 dlam joined #salt
17:52 antpa joined #salt
17:53 digitalhero joined #salt
17:56 digitalhero joined #salt
17:56 digitalhero joined #salt
17:59 dlam hey im using salt masterless:  i wanna be able to let different users  'git pull' and update my /srv/salt ...instead of 'sudoing' into root to do it,  anyone got any ideas?
18:00 hal58th joined #salt
18:00 antpa joined #salt
18:00 dlam (maybe you can do it with basic bash script, i am super noob sorry sorry)
18:08 digitalhero joined #salt
18:12 mavhq joined #salt
18:13 akhter joined #salt
18:14 dunz0r dlam: Make sure groups are set correctly for who owns the repo.
18:18 babilen Also 02775 mode :)
18:20 RabidCicada Someone help me...I'm trying to get a multiline yaml string in  "- contents: | <the multiline string>" but I can't get it to work
18:21 akhter joined #salt
18:21 Fiber^ joined #salt
18:24 RabidCicada Please help: https://gist.github.com/RabidCicada/2608b2a554e925fc741f
18:25 Reilly joined #salt
18:26 akhter joined #salt
18:28 dunz0r RabidCicada: But that's not a multiline string...
18:29 akhter joined #salt
18:29 antpa joined #salt
18:29 dunz0r RabidCicada: If you're doing a .bashrc for yourself via salt, I suggest using file.managed instead
18:30 mavhq joined #salt
18:30 dunz0r RabidCicada: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html
18:30 dlam ooo ya ya me do 'chown -R "ubuntu:adm" .git'  i think it worked
18:30 RabidCicada dunz0r: you are correct but I get the same problem even with real multiline https://gist.github.com/RabidCicada/d3a837219423e371afc0
18:31 RabidCicada I have tried like a trillion variations
18:31 dunz0r Hmm... I need to test this
18:31 RabidCicada I feel like it's something simple I'm missing
18:31 dunz0r RabidCicada: I don't think you have to escape stuff or put it in qoutes, that's what the | does, isn't it?
18:32 relidy joined #salt
18:33 RabidCicada dunz0r: https://gist.github.com/RabidCicada/3e1ae445bc0ed81b5062
18:35 akhter joined #salt
18:36 dyasny joined #salt
18:36 RabidCicada oh WTF.....the exact number of spaces of indentation matter
18:36 RabidCicada it MUST be 4 spaces in from "- contents: |"
18:36 RabidCicada All of my offsets are 2 spaces
18:36 RabidCicada and it's all legal yaml
18:36 RabidCicada but this ONE PARTICULAR ONE has to be 4 spaces indented
18:36 RabidCicada any idea why anyone?
18:37 dunz0r Oh. Wtf
18:37 RabidCicada https://gist.github.com/RabidCicada/5824643be0edd7cf7e62
18:38 RabidCicada You can see my normal indents are 2 spaces...but with contents string at 4 spaces offset it works
18:38 ageorgop joined #salt
18:40 RabidCicada after reading https://docs.saltstack.com/en/latest/topics/yaml/ for a 10th time my only intuition is that yaml treats | as a level indenting operator...so technically the following line is two levels in
18:41 AndreasLutro the P in PATH is clearly 2 spaces to the right of the c in content
18:42 jimklo joined #salt
18:43 RabidCicada AndreasLutro: don't know if sarcasm...but...you may have just given me clarity.  I thought the offset was from the first character on the line in the enclosing scope.  For my first two indents that was a character from nodebinpath and file.managed.  I assumed the same for '- contents: |'...but it seems you have to be 2 characters offset from the first WORD on the line instead of the '-'?
18:43 denys joined #salt
18:43 RabidCicada Very serious question above....
18:43 RabidCicada do dashes not count as "the first character on the line"?
18:43 RabidCicada for yaml parsing?
18:45 akhter joined #salt
18:45 AndreasLutro it's best to think of "- " as another indentation level
18:45 AndreasLutro that just happens to convert your map into a list
18:46 RabidCicada ok...had no clue
18:46 dcs_ joined #salt
18:46 shaggy_surfer joined #salt
18:47 shaggy_surfer1 joined #salt
18:47 kahiru joined #salt
18:51 akhter joined #salt
18:51 i90rr joined #salt
18:52 babilen RabidCicada: That's an idiosyncrasy of the python yaml parser implementation and not part of the YAML specification
18:54 RabidCicada Yeah...I'll say..it doesn't conform to the canonical parser linked to by saltdocs: http://yaml-online-parser.appspot.com/
18:54 RabidCicada I just tried it
18:54 RabidCicada booo!
18:54 babilen http://pyyaml.org/ ← complain there
18:54 RabidCicada hehe:)
18:54 amcorreia joined #salt
18:55 babilen As if YAML hadn't enough idiosyncrasies already ;)
18:55 AndreasLutro erm
18:55 akhter_1 joined #salt
18:56 AndreasLutro the online yaml parser uses pyyaml
18:57 AndreasLutro also... trying a ruby and js parser, they both error out if there isn't an extra intdentation after |\n
18:57 akhter joined #salt
19:00 KyleG joined #salt
19:00 KyleG joined #salt
19:01 noraatepernos joined #salt
19:03 babilen http://yaml.org/spec/1.2/spec.html has examples with two spaces .. anyway, it needs 4 in salt
19:03 akhter joined #salt
19:03 AndreasLutro not if you look at Example 2.28. Log File
19:04 babilen I see an example with two spaces in there ..
19:04 babilen In fact it is one of the examples I referred to
19:05 AndreasLutro okay, how is https://gist.github.com/RabidCicada/5824643be0edd7cf7e62 4 spaces in that case?
19:05 Eugene It's counting from the same level as the -
19:05 AndreasLutro in the yaml spec example there's also 4 spaces from the - to the multi-line string
19:06 AndreasLutro in the yaml spec example there's just more than 1 element in the mapping list element
19:06 Eugene IMO multiline strings are not ready for primetime. I use a salt:// source for my file.managed states, always.
19:07 Eugene Every single time I've interacted with them(or seen somebody else do so) it's been a variant of 'wtf this is dumb'
19:07 AndreasLutro haha
19:07 dmaiocchi joined #salt
19:08 AndreasLutro oh well, I've never had issues with them since I first learned them
19:08 RabidCicada So...actually the http://yaml-online-parser.appspot.com/ parser does the exact same...I just wasn't using it the same.  So yeah...| adds another indentation level
19:09 RabidCicada It's as simple as that I think --- | = another level of indentation
19:10 Eugene What was wrong with good ol' \
19:12 flowstate joined #salt
19:13 fracklen joined #salt
19:13 AndreasLutro gets annoying to remember to add it every time you want to add a line
19:14 fracklen_ joined #salt
19:15 akhter joined #salt
19:16 MindDrive_ joined #salt
19:17 tmkerr joined #salt
19:17 pppingme joined #salt
19:20 akhter joined #salt
19:24 ggoZ joined #salt
19:25 digitalhero joined #salt
19:26 baweaver joined #salt
19:27 akhter joined #salt
19:30 akhter joined #salt
19:31 forrest joined #salt
19:32 FreeSpencer Is there any way to see if a file needs changed? I have a bin being managed by file.managed and I want to see if I need to stop the service from the bin before its replaced
19:32 akhter joined #salt
19:33 Eugene You can use test=True when running a state
19:33 AndreasLutro FreeSpencer: you can use prereq to stop a service before making a change
19:34 Eugene Or do you mean "I want the service to restart automatically when the file is changed in a state"? That would be watch / prereq
19:34 FreeSpencer How did I never see prereq before, thanks!
19:36 oida joined #salt
19:36 winsalt joined #salt
19:36 fracklen joined #salt
19:36 adelcast joined #salt
19:41 bharper https://twitter.com/notGTmanfred LOL
19:41 digitalhero joined #salt
19:42 akhter joined #salt
19:43 akhter_1 joined #salt
19:46 Fingerbox joined #salt
19:46 Fingerbox Hello
19:49 zmalone joined #salt
19:49 shiriru joined #salt
19:54 digitalhero joined #salt
19:58 aqua^c joined #salt
19:59 baweaver joined #salt
20:01 losh joined #salt
20:03 racooper joined #salt
20:03 racooper joined #salt
20:07 oida joined #salt
20:09 digitalhero joined #salt
20:09 GreatSnoopy joined #salt
20:13 shaggy_surfer joined #salt
20:17 fracklen joined #salt
20:26 chmod666org joined #salt
20:27 mavhq joined #salt
20:27 cyborg-one joined #salt
20:28 baweaver joined #salt
20:29 mavhq joined #salt
20:30 fracklen joined #salt
20:30 jimklo joined #salt
20:33 ajw0100 joined #salt
20:35 mavhq joined #salt
20:36 ffredrikk joined #salt
20:37 akhter joined #salt
20:40 abednarik joined #salt
20:41 Eureka703 joined #salt
20:48 flowstate joined #salt
20:48 ffredrikk joined #salt
20:50 toastedpenguin joined #salt
20:50 shaggy_surfer joined #salt
20:51 fracklen joined #salt
20:51 toastedpenguin is there a way to check what salt-cloud is sending to AWS when running: salt-cloud --list-locations <provider>
20:52 toastedpenguin I keep getting an autherror from AWS but I have checked my creds and they are legit
20:53 jimklo joined #salt
20:56 drawsmcgraw toastedpenguin: I'd try '-l debug' at the end of the salt-cloud command, but that probably wouldn't work
20:56 drawsmcgraw My thought it some tcpdump incantation or a glance at the source :/
20:58 akhter joined #salt
20:58 flowstate joined #salt
20:58 mavhq joined #salt
21:01 drawsmcgraw toastedpenguin: If you feel like looking through the source, it looks like it begins around here: https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/ec2.py#L1822
21:02 abednarik joined #salt
21:07 ffredrikk joined #salt
21:09 mavhq joined #salt
21:13 mavhq joined #salt
21:13 fracklen joined #salt
21:17 mavhq joined #salt
21:18 dayid joined #salt
21:18 dayid joined #salt
21:19 mavhq joined #salt
21:24 flowstate joined #salt
21:26 baweaver joined #salt
21:27 kickerdog joined #salt
21:32 Razi_ joined #salt
21:34 jimklo joined #salt
21:39 upb_ joined #salt
21:41 baweaver joined #salt
21:43 jimklo joined #salt
21:48 ajw0100 joined #salt
21:49 geomacy joined #salt
21:49 mavhq joined #salt
21:49 PredatorVI joined #salt
21:50 kickerdog left #salt
21:57 quasiben joined #salt
21:59 jtylers joined #salt
22:01 mavhq joined #salt
22:06 rhand joined #salt
22:07 Razi_ Hi, Im working on making a Cassandra formula and wanted to get some advice
22:08 Razi_ Cassandra has many different versions and configuration files tend to change a little in every version
22:08 Razi_ I would prefer not to hand convert configuration files into jinja templates
22:10 quasiben1 joined #salt
22:10 Razi_ rather I would like to programmatically parse the vanilla configuration file and generate a jinja template storing the vanilla configuration in say pillar_defaults
22:11 ablemann joined #salt
22:11 akhter joined #salt
22:11 Razi_ Is there some recommended way to accomplish what I've described?
22:13 Rumbles joined #salt
22:13 baweaver joined #salt
22:15 t0m0 joined #salt
22:15 gtmanfred what format are the deafult config files in?
22:17 quasiben joined #salt
22:19 Razi_ The main config file is cassandra.yaml it is in yaml
22:19 Razi_ but there is also logback.xml
22:19 Razi_ cassandra-env.sh (which is a config file)
22:20 Razi_ and cassandra-topology.properties
22:20 gtmanfred is that .ini?
22:21 Razi_ the .properties file is a java .properties file
22:21 baweaver joined #salt
22:23 akhter joined #salt
22:24 subsignal joined #salt
22:24 gtmanfred that is going to be rough
22:25 Razi_ I was able to accomplish this task previously using Ansible, not writing any bash/perl/python scripts
22:25 gtmanfred yeah, i bet you can do it
22:25 gtmanfred do you have those published somewhere? i would like to see how you did it there
22:25 gtmanfred if it was me
22:25 gtmanfred what I would do
22:26 gtmanfred you can use straight python for your .sls files
22:26 gtmanfred and since the states are rendered on the minion
22:26 gtmanfred that is how I would do the discovery of file information
22:26 gtmanfred you aren't really going to be able to lookup data on the minion and put it in pillars
22:26 gtmanfred cause pillars are rendered on the master
22:26 gtmanfred you could write an external pillar that queries the cassandra version
22:27 gtmanfred and then passes something down
22:27 gtmanfred since external pillars get the minion_id, you could target that one minion
22:27 gtmanfred otherwise
22:27 gtmanfred i would say... maybe an custom grain is the best way?
22:27 gtmanfred you can do it without i think, but it is going to be more difficult IMO
22:28 gtmanfred if you wanted to pass the data around in a dictionary object, you could use the dump_yaml function to put the yaml down in the file
22:29 Razi_ ok ... listening/reading what your saying.
22:29 gtmanfred i think it is yaml_dump
22:29 Razi_ I can post an example of my simplest ansible role if you would like?
22:29 Razi_ here
22:30 Razi_ ^paste
22:30 gtmanfred {{ settings.get('thing', {})|yaml(False)|indent(4, False) }}
22:30 quix joined #salt
22:30 Razi_ --- - name: Copy logback.xml file to templates directory to make Jinja2 template   copy:     src: "{{ cassandra_role_dir }}/files/apache-cassandra-{{ cassandra_version }}/conf/logback.xml"     dest: "{{ cassandra_role_dir }}/templates/apache-cassandra-{{ cassandra_version }}/conf/logback.xml.j2"  - name: Make Jinga2 template for logback.xml    lineinfile:     dest: "{{ cassandra_role_dir }}/templates/apache-cassandra-{{ cassandra_versio
22:30 quasiben joined #salt
22:30 gtmanfred can ou use gist?
22:32 Razi_ https://gist.github.com/rkhaja/f58ade17d54d7cec5276
22:33 gtmanfred oh, are you good with just doing regex states?
22:33 abednarik joined #salt
22:33 gtmanfred https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.replace
22:34 Razi_ I tried regex using salt, but I couldnt figure out how to do regexp memoization
22:35 gtmanfred like \1 and stuff?
22:35 gtmanfred it should just be using the python re module
22:35 Razi_ yes
22:35 gtmanfred yeah, if it didn't work like with \1 and stuff, then unfortunately i do not know
22:36 Razi_ So I think python might be the best option
22:36 Razi_ meaning not using a python renderer
22:36 gtmanfred probably, i gotta go though, good luck! i look forward to seeing it :)
22:37 Razi_ but to create a python script that will parse a vanilla config file
22:37 Razi_ thans
22:37 Razi_ thanks
22:37 KingJ joined #salt
22:37 Razi_ ... your advice has actually steered me in the right direction
22:37 gtmanfred there has to be a better way to do it that I am not thinking about, but i am exhausted, and waiting for my last day party to start :)
22:37 gtmanfred o/
22:38 Razi_ i dont think there is ..... in Ansible, what i did was sorta hackerish
22:39 Razi_ and i suspect that it will be hackerish, if I use file.replace in salt
22:39 PredatorVI Seeing an exception (TypeError: can't serialize set([''])) when running a salt orchestration on a clean 2015.8.7 minion (master at same version).  The stack trace is very generic.  Anyone recognize this and know if it is a known issue? https://gist.github.com/PredatorVI/64fa2bb90caafd845cd6
22:40 flowstate joined #salt
22:41 aqua^c joined #salt
22:41 zenlot6 joined #salt
22:45 quasiben joined #salt
22:45 berserk joined #salt
22:48 abednarik joined #salt
22:56 jnials joined #salt
22:56 digitalhero joined #salt
22:59 ageorgop joined #salt
23:03 amcorreia joined #salt
23:04 khorben joined #salt
23:05 cberndt joined #salt
23:06 berserk joined #salt
23:08 cberndt joined #salt
23:11 cberndt joined #salt
23:14 Muchoz joined #salt
23:15 justanotheruser joined #salt
23:16 lungaro joined #salt
23:16 Pixionus joined #salt
23:19 ageorgop joined #salt
23:22 Reilly joined #salt
23:23 baweaver joined #salt
23:27 vaelen joined #salt
23:29 digitalhero joined #salt
23:32 oida joined #salt
23:37 jnials joined #salt
23:40 berserk joined #salt
23:43 Tgrv joined #salt
23:44 jnials joined #salt
23:46 josuebrunel joined #salt
23:48 berserk joined #salt
23:49 josue joined #salt
23:57 cberndt joined #salt
23:57 ageorgop joined #salt
23:59 aqua^c joined #salt

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