Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-06-09

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

All times shown according to UTC.

Time Nick Message
00:00 flowstate joined #salt
00:02 paydro joined #salt
00:07 edrocks joined #salt
00:08 mikecmpbll joined #salt
00:13 DEger joined #salt
00:16 SheetiS joined #salt
00:17 woodtablet left #salt
00:35 Nahual joined #salt
00:38 barmaley joined #salt
00:42 mosen joined #salt
00:46 bltmiller joined #salt
00:47 shoemonkey joined #salt
01:00 flowstate joined #salt
01:04 catpigger joined #salt
01:05 KyleG1 joined #salt
01:06 thenut joined #salt
01:09 edrocks_ joined #salt
01:10 iggy aharvey: there's a mine runner... use that
01:10 iggy err, mis-tab
01:11 iggy ahammond: there's a mine runner... use that
01:11 DanSlimmon joined #salt
01:11 nmadhok joined #salt
01:12 iggy aharvey: {{ pillar['splunk-config'][grains['pod_role']['ecache']] }}
01:14 aharvey iggy:  if the pod_role:ecache is a pillar value, can that be passed and parsed?  I feel like I’m hitting a chicken vs egg situation here.  splunk’s pillar.sls states splunk-config:ecache:redis.  My minion sets pod_role:ecache.  Trying to reconcile the two so that when code calls it, it inserts Redis instead of ecache into the config file
01:16 iggy aharvey: {{ salt['pillar.get']('splunk-config:' ~ grains['pod_role']) }} ?
01:16 iggy I may not fully understand what you're trying to do... can you gist an example of what you're trying and how it's failing?
01:17 SheetiS joined #salt
01:17 SheetiS1 joined #salt
01:18 aharvey Sure - Instead of using grains, that’s how it is currently set up so please scratch that.  What I would rather see is how to parse {{ pillar[‘splunk-config’]pillar[‘pod_role’] }}  In which splunk-config has an ecache:redis K/V pair and pod_role is another K/V for the minion (Using pillarstack) that i’d like to be parsed and have the value return into the config file as redis, not ecache
01:18 subsignal joined #salt
01:20 iggy aharvey: {{ salt['pillar.get']('splunk-config:' ~ pillar['pod_role']) }} ?
01:21 SheetiS2 joined #salt
01:21 aharvey I’ll give it a shot
01:21 iggy if pillar.pod_role is ecache, that's the same as pillar.get splunk-config:ecache
01:25 edrocks joined #salt
01:27 tristianc joined #salt
01:28 aharvey I’m setting up three code pastes so you can see how I’m trying to pull this off.  sec iggy
01:32 aharvey http://www.heypasteit.com/clip/2PJY
01:32 aharvey http://www.heypasteit.com/clip/2PJZ
01:32 aharvey http://www.heypasteit.com/clip/2PK0
01:32 aharvey http://www.heypasteit.com/clip/2PK1
01:32 aharvey Here’s four clippings, one of the minion’s configuration file, the K/V pairs for splunkforwarder, the code snippet where I am trying to set ecache : redis, and the pillar stack cfg
01:34 subsignal joined #salt
01:35 aharvey When ran as you recommended, here is the output
01:35 aharvey ubuntu@u14updatedtest:~$ cat /opt/splunkforwarder/etc/system/local/deploymentclient.conf
01:35 aharvey [deployment-client]
01:35 aharvey clientName = e:v_test;r:;
01:43 brotatochip joined #salt
01:48 debian112 joined #salt
01:49 gotwf joined #salt
01:50 hasues joined #salt
01:58 flowstate joined #salt
01:59 DEger joined #salt
02:05 gngsk joined #salt
02:06 anotherZero joined #salt
02:15 subsignal joined #salt
02:16 tomasfejfar1 joined #salt
02:22 justanotheruser joined #salt
02:26 Nahual left #salt
02:29 tomasfejfar2 joined #salt
02:43 racooper joined #salt
02:44 evle joined #salt
02:46 brotatochip joined #salt
02:52 stooj joined #salt
02:59 flowstate joined #salt
03:02 Ayo joined #salt
03:11 mosen joined #salt
03:11 mosen joined #salt
03:12 dfinn joined #salt
03:17 zmalone joined #salt
03:22 zmalone joined #salt
03:38 iceyao joined #salt
03:40 mohae joined #salt
03:49 writtenoff joined #salt
03:54 deniszh joined #salt
03:54 josuebrunel joined #salt
03:57 zmalone joined #salt
03:58 deniszh1 joined #salt
03:59 flowstate joined #salt
04:22 lompik joined #salt
04:31 nmadhok joined #salt
04:34 guardianJ joined #salt
04:43 DEger joined #salt
04:53 hrumph hi i just made a new pull request
04:53 hrumph https://github.com/saltstack/salt/pull/33889
04:53 saltstackbot [#33889]title: 3010 exit codes Remembered for boot session | ### What does this PR do?...
04:58 flowstate joined #salt
05:05 RealMurphy joined #salt
05:06 zmalone joined #salt
05:08 RealMurphy Hi all, possibly a stupid question, but if I test a single sls via "salt host state.apply test.mytest" to call test/mytest/init.sls it seems the include present within the init.sls is never performed. As there is no error message, it seems to be just ignored. Is this a wanted behaviour? (version 2015.8.8)
05:08 kshlm joined #salt
05:12 iggy aharvey: what's the output you're expecting
05:13 aharvey clientName = e:v_test;r:redis;
05:13 aharvey key/value being ecache:redis
05:14 rdas joined #salt
05:14 iggy aharvey: on the minion, run `salt-call pillar.get splunk-config`
05:15 aharvey kk
05:16 impi joined #salt
05:16 iggy and `salt-call pillar.get pod_role
05:16 bastiandg joined #salt
05:17 aharvey pod_role returns ecache as the value, splunk-config isn’t returning
05:17 aharvey looking into that
05:19 iggy that's probably the issue, get that working and see if what you have works (because it looks right)
05:19 aharvey sure thing.  and already - mega thanks
05:21 iggy np, sorry I dropped off earlier in the middle of helping you, but I have to be home before dark (lol)
05:22 aharvey no worries haha i’m up late working on sprint priorities as it is.
05:22 aharvey and……Boom.  done.  You nailed it completely
05:22 aharvey Thank you so much
05:25 lorengordon joined #salt
05:26 gazarsgo joined #salt
05:27 Awesomecase joined #salt
05:27 iggy np, glad you got it working
05:27 twodayslate joined #salt
05:28 moy joined #salt
05:29 hacks joined #salt
05:29 sauvin joined #salt
05:29 kutenai joined #salt
05:29 OliverMT joined #salt
05:30 lkannan joined #salt
05:30 clouddale joined #salt
05:30 simonmcc joined #salt
05:31 imanc joined #salt
05:31 m0nky joined #salt
05:31 RealMurphy addendum: just upgraded the master to 2015.8.10, same behaviour, i.e. include file seems to be ignored in single sls file testing
05:31 trave joined #salt
05:31 shawnbutts joined #salt
05:32 JamieH joined #salt
05:32 iggy RealMurphy: gist files?
05:32 sauvin joined #salt
05:32 iggy (protip: gist supports multiple files per paste)
05:32 RealMurphy in a moment :P
05:32 ToeSnacks joined #salt
05:32 supermike_ joined #salt
05:32 johtso joined #salt
05:33 WKNiGHT joined #salt
05:33 czchen joined #salt
05:33 liviudm joined #salt
05:33 mihait joined #salt
05:33 smakar joined #salt
05:33 hillna joined #salt
05:33 nahkiss joined #salt
05:33 tcolvin joined #salt
05:33 linovia joined #salt
05:33 munhitsu_ joined #salt
05:33 mattl joined #salt
05:33 aljosa joined #salt
05:34 serverascode joined #salt
05:34 RealMurphy https://gist.github.com/carsten-AEI/c34d4059bb91b2e758ccb8d8c0322e98
05:34 akoumjian joined #salt
05:34 antonw joined #salt
05:34 RealMurphy call: salt host state.apply atlas.autofs
05:34 doriftoshoes joined #salt
05:35 bmcorser joined #salt
05:35 ramblinpeck joined #salt
05:35 akitada joined #salt
05:35 RealMurphy output: https://gist.github.com/carsten-AEI/0e50aa556274b273c47fef7873258d56
05:35 abele joined #salt
05:36 Ryan_Lane joined #salt
05:36 bVector joined #salt
05:36 bbhoss joined #salt
05:36 bstaz joined #salt
05:36 moy joined #salt
05:37 tomasfejfar2 joined #salt
05:37 mikepea joined #salt
05:37 Freek joined #salt
05:37 goki_ joined #salt
05:37 manji joined #salt
05:40 _JZ_ joined #salt
05:43 anmol joined #salt
05:46 iggy RealMurphy: are you sure home_autofs is getting set to anything?
05:46 hasues left #salt
05:47 RealMurphy iggy: hmmm, let me check
05:48 iggy you have 2 states with the ID of autofs
05:48 iggy so I can pretty much guarantee it's not
05:48 iggy otherwise salt would be throwing a shit fit about that
05:48 * babilen chuckles
05:49 RealMurphy iggy: darn, you are spot on, this new host is not configured in this version of the DB (pillar) - hooray for dedicated test set-ups which go out of sync with production
05:50 * RealMurphy starts to dig a hole to vanish from sight
05:50 iggy sometimes it just takes a second set of eyes ;)
05:50 aharvey joined #salt
05:50 RealMurphy iggy: Yes, sometimes I wish I had those myself ;) Thanks a ton!
05:58 flowstate joined #salt
06:04 myii joined #salt
06:04 colttt joined #salt
06:06 Sylvain31 joined #salt
06:07 bstaz joined #salt
06:07 myii How do you simply check if a package is installed or not?  Don't want to perform the installation or remove/purge the package if it exists.  State passes if exists or fails if doesn't, so can be checked from other states.
06:08 manji joined #salt
06:08 Sylvain31 myii: what is the purpose not to install the missing package?
06:09 myii Found a problem with `git.config` failing if Git isn't already installed when using users-formula.
06:09 babilen myii: You could use pkg.version for this, but why don't you install it if you want it installed?
06:09 myii Have an issue started up for this.
06:09 babilen A pkg.installed for git should solve that, shouldn't it?
06:09 babilen (or use the git-formula)
06:10 Sylvain31 myii: which issue?
06:10 myii Trying to fix users-formula without introducing a dependency on git-formula.
06:10 myii I'll pull up the issue... one sec.
06:10 myii https://github.com/saltstack-formulas/users-formula/issues/115
06:10 saltstackbot [#115]title: Resolve `git.config` error where minion does not have Git installed | Was running this formula on a fresh installation without Git installed.  Got the following error:...
06:10 babilen So use the first approach: Introduce a pkg.installed state for git
06:10 bVector joined #salt
06:10 goki_ joined #salt
06:10 myii Please see the issue for the discussion that was had there.
06:10 babilen You would, however, essentially replicate the git-formula in users-formula then.
06:11 moy joined #salt
06:11 myii Exactly, but gravyboat mentioned that they didn't want to introduce dependencies, which I fully understand.
06:11 mikepea joined #salt
06:11 myii Is there no way just to check if Git is installed?
06:12 ramblinpeck joined #salt
06:12 Sylvain31 myii: with an cmd.run: also I guess?
06:12 bmcorser joined #salt
06:12 myii OK, `cmd.run` but think of all the package managers out there.
06:14 pfallenop joined #salt
06:15 RealMurphy myii: Well, with hipefully sensible$PATH just see what 'which git' returns
06:15 Sylvain31 babilen: pkg.version, you mean the parameter of salt.states.pkg.installed ?
06:16 myii I tried pkg.version but then ran into another bug @ saltstack/salt#28589.
06:17 myii `which git` is interesting... I've been thinking about that sort of thing but I'm not sure how widely used `users-formula` is -- will it definitely work 100% of the time?
06:18 RealMurphy myii: Well, which git will tell you in 100% of the time if there was an executable with the given name available in the current environment
06:18 Sylvain31 myii: does the user formula has salt-kitchen or somewhat unittest configured tests?
06:19 myii Sylviain31: Sorry, I don't know much about the internals -- just familiar with using the formula.
06:19 Sylvain31 myii: opensource way is, provide a pullrequest, and we will see, if bug raises ticket will be opened, right? ;)
06:20 myii RealMurphy: Perhaps that's the right way to go and simple enough.
06:20 johje349 joined #salt
06:20 abele joined #salt
06:20 Sylvain31 myii: me neighter… :/ I would like to setup some reproducable test for mysql-formula… too.
06:22 RealMurphy myii: it highly depends on what you need it for and what kind of target systems you have, but which is pretty much available in all shells (at least those I have access to at the moment)
06:23 myii I'll put the state together and then suggest it in the issue -- not sure if they will like a solution based upon `cmd.run` but no harm in trying.
06:23 iggy myii: maybe a test.fail state with an `unless: which git`
06:23 iggy at least get a helpful error message out of it
06:23 myii iggy: That seems much better all round.
06:23 slav0nic joined #salt
06:24 babilen In a way this is a tricky case and one that is hard to solve. If one decides against cross-formula dependencies you are bound to replicate these formulas in all other formulas and if you decide in favour of it without also implementing a way to easily deploy those dependencies you force users into multiple "add another formula" iterations.
06:24 iggy ^
06:24 iggy it's a problem that hasn't been solved yet, but probably should at some point
06:25 iggy until then, I like the test or just jinja the whole thing out with something
06:25 babilen My personaly approach here is to use the salt-formula for setting up GitFS repositories and then I simply work with pillar merging for its salt:master:gitfs_remotes pillar
06:25 myii Do you know if it's in the pipeline?  I've had a great time doing quite complicated things in Salt and then I was surprised to trip up when simply checking if a package is installed!
06:26 babilen There's https://docs.saltstack.com/en/latest/topics/spm/
06:26 myii babilen: Then we're back at the problem of introducing a dependency on `salt-formula`.  Nice idea for one's personal setup, though.
06:27 iggy {% if salt['cmd.has_exec']('git') %} ... do git stuff... {% endif %}
06:27 babilen myii: I don't mind that dependency in my setup (as I use it anyway)
06:28 babilen Hmm .. in fact I introduced a cross-formula dependency in influxdb-formula for pip. I might want to clean that up until we have a sane way to do this.
06:28 myii babilen: I've got multiple dependencies in my own setups so that's definitely another one I'll be looking at -- thanks.
06:28 iggy and maybe a {% else %} test.succeed "we skipped the git config stuff because you don't have git
06:28 Sylvain31 myii: may be an enhancement should be proposed? salt.states.pkg.installed(only_check=True) ?
06:28 myii iggy: You're doing all the work for me!
06:29 myii Sylvain31: That would be exactly what I was looking for.
06:30 babilen That would essentially be https://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html#salt.states.test.fail_without_changes wrapped in {% if not salt['cmd.has_exec']('git') %} … {% endif %}
06:31 Sylvain31 aslo pkg.info_installed https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.info_installed
06:31 babilen That's a module
06:31 Sylvain31 module.run so?
06:31 babilen (and requires a package name which isn't stable across distributions/platforms)
06:32 babilen Is "git" called "git" on Windows?
06:32 iggy does the users formula work on Windows?
06:32 babilen Doesn't really matter in this case as the users-formula doesn't support Windows anyway, but as a general approach we have to keep that in mind also
06:32 myii No users formula for Windows.
06:32 babilen ^^^^
06:32 Sylvain31 iggy: +1 ?
06:33 KermitTheFragger joined #salt
06:37 Ayo joined #salt
06:37 myii Thanks all, I'll put it together and then give you guys the props.
06:38 babilen no, thank you for working on this!
06:40 babilen Do you know if it is possible (by now) to disable service restarts (for a subset of services?) during a highstate run?
06:40 myii Least I could do after all of what Salt has done for me.
06:40 myii How corny.
06:41 babilen It's annoying to restart a db server just because there was a cosmetic change to its configuration file
06:41 dmaiocchi joined #salt
06:42 Sylvain31 like misspell check in comment! ;)
06:42 babilen for example
06:47 dgk joined #salt
06:48 fracklen joined #salt
06:48 Sylvain31 babilen: https://github.com/saltstack/salt/blob/develop/salt/states/service.py#L120 is there some param that could helps here?
06:49 toanju joined #salt
06:49 dmaiocchi joined #salt
06:50 babilen It would have to change the way the watch/listen requirement works in that mod_watch is not being executed for those services. I don't want to change the way the service is configured at all.
06:51 Sylvain31 can you reach this return statement? https://github.com/saltstack/salt/blob/develop/salt/states/service.py#L129
06:51 cyborg-one joined #salt
06:51 fracklen_ joined #salt
06:54 Sylvain31 or detecting cosmetic change by what magic? filtering out comment?, commparing checksum?
06:56 Sylvain31 You could touch an file, sate/db/config/DONT_RELOAD_DB_SERVER and test its presence with a requisite, and warn, like suggested for git with a state.test?
06:56 babilen Automatically detecting if a change is "cosmetic" or not is beyond the scope of this question .. I essentially just want to alter the way state.{apply,sls,sls_id,highstate,...} work in regard to mod_watch in that I can say "Don't" or "Not for these: [... ... ...]"
06:57 babilen I don't think it is possible, but it might be and I thought I'd ask
06:58 Sylvain31 "change is "cosmetic" is beyond the scope" I agree, so you have to find a way to tell salt that it is, so my suggestion of a "guardian" file
06:59 flowstate joined #salt
07:00 RealMurphy hmm, another question just crept up: I have a file with O(10) lines (autofs map file) and need to create one symlink per line from one canonical place to another. For now I would like to keep this file as a file in my config space andnot resort to pillar or an explicit array in my state file. Is it possible to iterate over lines of a local file within a statefile with jinja?
07:02 Sylvain31 RealMurphy: could this file converted to yaml?
07:03 iggy cmd.script?
07:03 Sylvain31 imporl_yaml in jinja could do that easily
07:03 RealMurphy hmm, as autofs does not speak yaml, only by on the fly I fear
07:04 RealMurphy autofs files a simple white space delimted lines with at least three columns
07:05 Sylvain31 could you paste a link about autofs?
07:05 RealMurphy hmm, cmd.script does indeed look interesting
07:06 deniszh joined #salt
07:06 RealMurphy https://gist.github.com/carsten-AEI/edbde976cdd50ce9b109fc0a57e66a79
07:09 linjan joined #salt
07:09 RealMurphy obviously, for the second part I would like to use file.symlink from a loop in the statefile
07:09 RealMurphy (otherwise I could simply fire cmd.run on the minion side)
07:10 AndreasLutro if the autofs file lives on the minion, I'd write a custom salt module/state to do what you need
07:10 Sylvain31 RealMurphy: oh, OK. is the autos fs source file in autofs format style? I mean you dont generate it, it is the source, that what you told with: "For now I would like to keep this file as a file in my config space"
07:11 RealMurphy Sylvain31: Yes, if possible I would like to keep that file as a autofs "source" file without generating it on the fly - though if it made the state file simplerI could also do that
07:12 Sylvain31 because, you could have an simle yaml, matching your autfs wants, and generate as a file.managed the autofs output + with the same yaml, generate symlinks, right?
07:12 RealMurphy Sylvain31: I.e. put all synamic data in a pillar or explicitely into the sls file
07:13 Sylvain31 RealMurphy: the yaml, can be on the state config file not in pillar…
07:14 Sylvain31 I made a Proof of concept using that… but I mixup pillar and state ;)
07:14 RealMurphy Sylvain31: OK, may also work. Still scratching my head which way is the best way as we have a few other plain text files to move over and it may surprise the other admins if only this special file is autogenerated
07:16 om joined #salt
07:18 Sylvain31 yes, I posted a prototype: https://gist.github.com/carsten-AEI/edbde976cdd50ce9b109fc0a57e66a79#gistcomment-1797479
07:19 Sylvain31 RealMurphy: of course always add Big header in generated files! for admins, including yourself ;)
07:22 RealMurphy Sylvain31: BIG HEADER is better then ;)
07:22 Sylvain31 RealMurphy: even for a flat file.managed (not generated) file add this silly anoying warning header. ;)
07:24 RealMurphy Sylvain31: ok, I guess I will try that - thanks!
07:25 felskrone joined #salt
07:26 kawa2014 joined #salt
07:27 yuhlw joined #salt
07:27 Sylvain31 github doesn't work on this I posted the proof of concept here: dhttps://github.com/opensource-expert/pillarstack/blob/use-case/use_case/pillar/auto/mysql_users.sls
07:28 Sylvain31 its a pillar, but should work on state side, very simple.
07:29 Sylvain31 RealMurphy: it works ok. https://github.com/opensource-expert/pillarstack/blob/use-case/use_case/pillar/auto/mysql_users.sls#L5
07:29 Sylvain31 the import you were looking for… (somewhat) ;)
07:33 RealMurphy yeah, looks do-able, thanks!
07:36 duncanmv joined #salt
07:36 Sylvain31 give it a try, but dont spend too much time if you don't have. ;) cmd.script seems quite good too! with a perl oneliner it will do it :-P
07:37 yuhlw joined #salt
07:43 atmosx Hello, I have some pillars which are added by "- include: \n collection1.sls" in "all.sls". I can use them but are not displayed in "salt-call pillar.items". How can I get access to those pillars via salt-call ?
07:43 Sylvain31 atmosx: did you refresh?
07:44 atmosx Sylvain31 how do I do that?
07:44 Sylvain31 salt '*' saltutil.refresh_pillar
07:44 Sylvain31 on the master
07:45 josuebrunel joined #salt
07:45 manji joined #salt
07:49 Sylvain31 salt-call config.get pillarkey:subkey:subsubkey should work after that… See also master pillar merge startegy…
07:49 Sylvain31 atmosx: pillar_source_merging_strategy: smart (for example)
07:50 atmosx Sylvain31 nice ty
07:54 Guest20916 joined #salt
07:58 hoonetorg joined #salt
07:59 flowstate joined #salt
08:03 toanju joined #salt
08:08 rim-k joined #salt
08:09 krymzon joined #salt
08:14 s_kunk joined #salt
08:20 manji joined #salt
08:21 permalac joined #salt
08:22 GreatSnoopy joined #salt
08:25 CeBe1 joined #salt
08:25 duncanmv joined #salt
08:26 lero joined #salt
08:28 Guest20916 joined #salt
08:29 punkoivan joined #salt
08:30 punkoivan joined #salt
08:33 mavhq joined #salt
08:34 punkoivan left #salt
08:39 tomasfejfar2 joined #salt
08:42 VSpike Turns out my bug introduced in 2015.8.9 has been reported and will be fixed in 2016.3.1. Makes me think it would be lovely if breaking changes like this could also be backported to a bugfix 2015.8.x release
08:42 VSpike I completely understand why not - it's extra work for someone. Seems like the sort of thing you'd want a paid support contract to buy you - a stabilised branch with backports of crtical fixes and security fixes
08:43 AndreasLutro the salt maintainers are pretty good at backporting fixes
08:46 VSpike Is there any precedent for a further release on an old version track after a new major stable version is release?
08:46 Sylvain31 VSpike: a paid backport? If you want it, and it is a benefit for your activity, ask for the backport as a paid service. A good way to keep opensource running for the benefice of all! ;)
08:47 dmaiocchi joined #salt
08:48 VSpike Sylvain31: yeah, agreed. we pay for support with Proxmox for example (which gives access to stable repos). Also pfSense support. It's a good way to give something back.
08:50 Sylvain31 I remember a previous compagny hired an opensource dev, for adding an OR pattern search in sphinx fulltext search engine, for 500 or 900 € it a week or 2 days…
08:53 AndreasLutro VSpike: at least 1 version back, 2014.7.9 was released in march for example
08:56 babilen VSpike: Shouldn't this bug have been fixed in the 2015.8 branch and then merged forward into 2016.3 and develop? That is at least my understanding of the contribution process ..
08:56 stanchan joined #salt
08:58 flowstate joined #salt
08:58 Sylvain31 VSpike: could post the issue link?
08:58 cyborg-one joined #salt
08:59 mavhq joined #salt
09:02 smcquay joined #salt
09:02 rdas joined #salt
09:08 dmaiocchi joined #salt
09:10 smcquay joined #salt
09:10 om joined #salt
09:11 om2 joined #salt
09:11 om3 joined #salt
09:12 svksaha91 joined #salt
09:13 svksaha91 hi
09:14 svksaha91 i'm confused with pillar.get behaviour
09:14 svksaha91 salt['pillar.get']('mongodb', default=defaults.mongodb, merge=True)
09:14 svksaha91 so what happens here? default overwrites pillar or the other way around?
09:14 ninkotech joined #salt
09:16 sjorge joined #salt
09:18 Miouge joined #salt
09:19 dgk hi everyone! can i use in one virtual pkg module functions from other virtual pkg module (assume its  __virtual__() returns False)?
09:23 sjorge joined #salt
09:23 VSpike svksaha91: no, pillar won't get written to. If the pillar doesn't exist, the call will return the default
09:23 VSpike Oh wait.. merge... missed that part. Not sure. Ignore me
09:24 VSpike Hm, still true except that any values that exist in the pillar will be merged with the default
09:26 VSpike So for a simple value like an integer, if the pillar doesn't exist your call gets the default instead of an error. The merge seems most useful where the pillar item you're getting is itself a dict, say DB settings - host, port, user, pass, schema
09:27 VSpike Did I miss the real intention of the question - if a value exists in both, which gets priority?
09:27 svksaha91 no i mean if a same key exists in both pillar and default? which one will be used in the result?
09:27 svksaha91 ya exactly
09:27 VSpike Now I really want to know that oo
09:27 VSpike too
09:27 svksaha91 haha
09:29 VSpike Sylvain31 / babilen : here's my issue https://github.com/saltstack/salt/issues/33853 and here's the already existing PR with the fix https://github.com/saltstack/salt/pull/33558
09:29 saltstackbot [#33558]title: Fix win servermanager | ### What does this PR do?...
09:32 ezi0_ joined #salt
09:34 fredvd joined #salt
09:37 shiriru joined #salt
09:41 dgk joined #salt
09:42 om3 joined #salt
09:45 DEger joined #salt
09:46 Guest79 joined #salt
09:52 duncanmv joined #salt
09:54 invalidexception joined #salt
09:56 AndreasLutro VSpike: that PR got merged into 2015.8 so it will be available in the next 2015.8 point release
09:56 Guest79 left #salt
09:59 flowstate joined #salt
10:02 Ayo joined #salt
10:07 Electron^- joined #salt
10:07 Electron^- joined #salt
10:08 Electron^- joined #salt
10:09 VSpike AndreasLutro: ah, good to know. thanks!
10:14 electron- joined #salt
10:15 Electron^- left #salt
10:15 electron- joined #salt
10:16 Electron^- joined #salt
10:17 Electron^- joined #salt
10:17 Electron^- joined #salt
10:28 keimlink joined #salt
10:47 duncanmv joined #salt
10:47 johnsonp joined #salt
10:50 johnsonp hi there - having some trouble running Windows salt-minion on Windows 7 64-bit.  Used the installer, the service is running, but if I run salt-minion from the command line I get this error: [ERROR   ] An un-handled exception was caught by salt's global exception handler: AttributeError: 'module' object has no attribute 'getppid' Traceback (most recent call last):   File "C:\salt\bin\Scripts\salt-minion", line 26, in <module>     salt_
10:51 iceyao joined #salt
10:51 johnsonp Version is 2016.3
10:55 johnsonp It's ok - I see there is a fix already
11:00 Miouge joined #salt
11:02 abednarik joined #salt
11:07 om joined #salt
11:07 briansteffens joined #salt
11:08 om2 joined #salt
11:09 rubenb joined #salt
11:23 amcorreia joined #salt
11:49 mpanetta joined #salt
11:55 Xenophon1 joined #salt
11:59 tomasfejfar2 joined #salt
12:02 om joined #salt
12:14 numkem joined #salt
12:15 TooLmaN joined #salt
12:19 west575 joined #salt
12:23 shoemonkey joined #salt
12:35 Aidin_ joined #salt
12:35 aidin joined #salt
12:43 aidin left #salt
12:43 JohnnyRun joined #salt
12:48 gh34 joined #salt
12:51 darvon joined #salt
12:51 subsignal joined #salt
12:57 zmalone joined #salt
13:00 catpig joined #salt
13:03 feld joined #salt
13:04 subsigna_ joined #salt
13:06 komputes joined #salt
13:06 pid1_ joined #salt
13:09 pid1 joined #salt
13:15 Miouge joined #salt
13:26 dfinn joined #salt
13:27 TooLmaN joined #salt
13:32 protoz joined #salt
13:33 racooper joined #salt
13:36 aidin joined #salt
13:36 perfectsine joined #salt
13:36 menglish joined #salt
13:38 flowstate joined #salt
13:39 tapoxi joined #salt
13:41 Miouge joined #salt
13:45 rsanting joined #salt
13:46 DEger joined #salt
13:46 zmalone joined #salt
13:47 rsanting I wan't salt to clone a git repo on a minion but if the repo already exists salt shouldn't update it to the lastest rev. How can I get it to do that because I already tried a lot of things (like adding a unless in the state).
13:48 nyx joined #salt
13:49 Sylvain31 rsanting: git.latest: ?
13:49 rsanting git latest always checks out the latest commit no matter what I do :(
13:50 Sylvain31 tag or branch?
13:51 rsanting branch
13:51 flowstate joined #salt
13:52 Sylvain31 you branch your code and checkout this one
13:52 edrocks joined #salt
13:52 Sylvain31 you merge your code into when it is ready
13:52 Sylvain31 https://docs.saltstack.com/en/latest/ref/states/all/salt.states.git.html#salt.states.git.latest
13:52 Tanta joined #salt
13:52 rsanting yes but salt shouldn't auto update the code even though I merged it
13:53 rsanting I need that to be a manual action
13:53 Sylvain31 your manual action is the merge
13:53 Muchoz joined #salt
13:53 kedgar joined #salt
13:54 renaissancedev joined #salt
13:54 rsanting No because this repo is on 2 minions and we want to update the minions one by one as a manual action (I know I could use a grain to tell salt which rev should be checked out on which minion but that's not really our use case)
13:54 rsanting It shouldn't be that hard to prevent salt from updating a repo should it
13:56 om joined #salt
13:56 Sylvain31 I see…
13:56 west575 joined #salt
13:57 om2 joined #salt
13:57 Sylvain31 onlyif?
13:58 Sylvain31 or two branch one for each minion… Not so good… though.
13:58 rsanting I tried using unless to check if the directory already existed but that didn't seem to do anything
13:58 rsanting let me try again
13:59 Sylvain31 oh, you can have a param that you can pass to salt to force the one minion to fetch another branch
14:00 linjan joined #salt
14:00 Sylvain31 say new_release branch, could be something: salt 'test1' state.apply gitstuff branchname=new_release
14:01 Sylvain31 I'm not sure the syntaxe…
14:01 rsanting thx I'll look into it
14:02 Sylvain31 then one fully tested update your pillar with the new_release branch and apply to all minion which match the state, right?
14:04 mpanetta joined #salt
14:05 rhodgin joined #salt
14:07 flowstate joined #salt
14:07 kedgar joined #salt
14:07 teryx510 joined #salt
14:09 andrew_v joined #salt
14:10 _JZ_ joined #salt
14:10 kedgar Morning, new to salt... want to understand if Salt is able to control multi-tiered applications.  For instance, orchestrating the up/down status of them in proper order.  As an example, I have a multi-tiered oracle weblogic stack with oracle database; I might want to bring down one weblogic app prior to another, then the database... and reverse that to start back up.
14:10 flowstate joined #salt
14:10 kedgar Or is something like Jenkins more suited to this type of workflow?
14:11 mapu joined #salt
14:11 cyborg-one joined #salt
14:12 Sylvain31 kedgar: is not Jenkins more for testing and continuous integration? salt could certainly do that… I don't know how. I suppose you are speaking about multiple server?
14:12 kedgar yes, in most instances this would be multiple servers
14:13 tharkun joined #salt
14:13 flowstate joined #salt
14:15 Sylvain31 ttps://docs.saltstack.com/en/latest/topics/orchestrate/orchestrate_runner.html#orchestrate-runner
14:15 Sylvain31 https://docs.saltstack.com/en/latest/topics/orchestrate/orchestrate_runner.html#orchestrate-runner
14:16 Sylvain31 with the h ;)
14:16 tapoxi joined #salt
14:16 deniszh joined #salt
14:17 Sylvain31 in salt terminology server are called minion
14:17 flowstate joined #salt
14:18 kedgar This looks promising, perhaps the last time I read this I was tired and thought this was only orchestrating the provisioning of new things... although it does appear it can be used for that as well.
14:18 kedgar Thank you
14:20 Sylvain31 I didn't go that deep, in salt, but it seems to extends orcherstration over many minions… state (salt terminology too) are used to order stuff including provisionning inside one minion…
14:20 Patch joined #salt
14:23 nyx joined #salt
14:27 Electron^- hi guys... is possible to setup exclude_pat as global to exclude all file that match "*~"?
14:27 Sylvain31 Electron^-: which state?
14:27 ixeous joined #salt
14:28 DanSlimmon joined #salt
14:28 Electron^- for file.recurse
14:29 Electron^- so I don't need to specify this every time I use a file.recurse
14:30 Sylvain31 Do you use it in the same state?
14:31 Electron^- no, I use it on various states... and various sls... but this exclude path is needed for every time that I use file.recurse because are the temp files from vim
14:32 Sylvain31 file_ignore_regex: in /etc/salt/master ?
14:37 FroMaster joined #salt
14:38 Electron^- thank you Sylvain31 ... it's exactly what I'm searching for :)
14:39 Sylvain31 cool! the alternative would have been to write a jinja macro, which cool, but may be less. ;)
14:39 Tyrm joined #salt
14:41 abednarik joined #salt
14:42 om joined #salt
14:44 Electron^- <<Simplicity is the ultimate sophistication>>
14:44 Electron^- :)
14:44 hasues joined #salt
14:44 corichar joined #salt
14:48 anmol joined #salt
14:50 spuder joined #salt
14:50 Electron^- is possibile in a sls to launch a module on another host?
14:51 Sylvain31 I'm pretty sure the state.sls is run on the minion
14:52 Electron^- I know, but i'm preparing a sls for zabbix to install the agent, and I would like to launch the zabbix module on the server to check if the new host is already present and if not add it
14:53 inad922 joined #salt
14:56 Sylvain31 you can ssh + key on the minion?
14:57 ecdhe joined #salt
14:57 Sylvain31 or as discussed above it may fall to anothe role: orchestration, do you see the history above?
14:58 tmclaugh[work] joined #salt
14:59 mikecmpbll joined #salt
14:59 mikecmpbll anybody got an example of a state for the application server 'passenger' with saltstack? :D
15:00 kawa2014 joined #salt
15:00 Electron^- Sylvain31, I'll see the story above
15:00 nmadhok joined #salt
15:02 fannet joined #salt
15:03 komputes_ joined #salt
15:06 shoemonkey joined #salt
15:07 om2 joined #salt
15:07 west575_ joined #salt
15:07 nmadhok joined #salt
15:10 Electron^- how can I see the que element on a zabbix proxy?
15:10 Electron^- queue*
15:11 flowstate joined #salt
15:11 Sylvain31 Electron^-: the topic is salt, ;) I don't know.
15:12 Electron^- sorry, I posted on the wrong channel -_-'
15:12 kaptk2 joined #salt
15:15 mohae joined #salt
15:16 inad923 joined #salt
15:18 kedgar joined #salt
15:20 noraatepernos joined #salt
15:20 duncanmv joined #salt
15:21 jenastar joined #salt
15:21 om2 joined #salt
15:22 lionel joined #salt
15:31 gngsk joined #salt
15:33 spuder joined #salt
15:35 renaissancedev joined #salt
15:37 losh joined #salt
15:38 tapoxi joined #salt
15:39 hasues left #salt
15:39 flowstate joined #salt
15:40 onlyanegg joined #salt
15:40 komputes_ joined #salt
15:40 ageorgop joined #salt
15:42 wangofett joined #salt
15:46 abednarik joined #salt
15:48 UtahDave joined #salt
15:59 kedgar joined #salt
15:59 tomasfejfar2 joined #salt
16:01 mikecmpbll is there any functional difference in these three states?: https://gist.github.com/mikecmpbll/6429b7135a42efe888706df42f4c1dfc
16:01 sauvin_ joined #salt
16:01 mikecmpbll still new to salt and just trying to get my head around how to structure states in the best way
16:02 aharvey joined #salt
16:03 flowstate joined #salt
16:03 flowstate joined #salt
16:04 JohnnyRun joined #salt
16:05 Miouge joined #salt
16:06 Sylvain31 mikecmpbll: two.sls will fail, because it doesn't know about - pkg: newrelic-sysmond
16:06 Sylvain31 requisites must refer to a state names!
16:06 mikecmpbll Sylvain31 : ah, oops. i'm sure i saw an example like that :D my bad.
16:07 mikecmpbll but two and three?
16:07 Sylvain31 https://docs.saltstack.com/en/latest/ref/states/ordering.html
16:07 mikecmpbll one and three*
16:08 gngsk joined #salt
16:08 mikecmpbll ah, requisites require that the state suceeds
16:08 mikecmpbll i guess that's the fundamental difference to ordering?
16:08 Sylvain31 mikecmpbll: even if newrelic-sysmond is effectively the package's name it wont work, because it refer to a state name which often overlap… confusing.
16:09 brotatochip joined #salt
16:10 fannet joined #salt
16:11 Sylvain31 I leave, see example I posted as comment on your gits + https://docs.saltstack.com/en/latest/ref/states/requisites.html
16:13 Sylvain31 welcome to salt brain damage training ;) bye…
16:13 west575_ joined #salt
16:16 mikecmpbll haha wow
16:18 shoemonkey joined #salt
16:22 om2 joined #salt
16:26 bltmiller joined #salt
16:30 tharkun joined #salt
16:31 wangofet1 joined #salt
16:32 writtenoff joined #salt
16:32 Miouge joined #salt
16:44 brotatochip joined #salt
16:44 om joined #salt
16:49 Ayo joined #salt
16:49 abednarik joined #salt
16:50 paydro joined #salt
16:53 edrocks joined #salt
16:53 mikecmpbll joined #salt
16:53 menglish joined #salt
16:56 Lionel_Debroux joined #salt
17:00 west575 joined #salt
17:03 evle1 joined #salt
17:05 flowstat_ joined #salt
17:06 ageorgop joined #salt
17:06 belak I've been having issues with the salt docker module... it seems to have some serious issues with linking containers... "Failed to start new container 'drone': Error 500: Cannot link to a non running container: /postgres AS /drone/postgres"
17:06 belak It keeps erroring with that when the postgres container is definitely running
17:07 belak "79c0dfc24081        postgres:9.3                 "/docker-entrypoint.s"   18 hours ago         Up 18 hours         127.0.0.1:5432->5432/tcp                   postgres"
17:07 pavan joined #salt
17:08 belak I don't know if it's salt or python-docker
17:08 pavan How can I expose files that are on salt:// (local FIle systems) to only targetted minions ?
17:09 belak I'm running salt 2016.3.0 and python-docker 1.7.2 (from debian backports)
17:10 fracklen joined #salt
17:10 Miouge joined #salt
17:11 DammitJim joined #salt
17:12 iggy pavan: you can't
17:13 manji joined #salt
17:13 iggy that would be pillar's job, but it doesn't handle file targetting
17:16 UtahDave belak: You might try asking your docker question on the salt-users mailing list if nobody here knows the answer.
17:16 TyrfingMjolnir joined #salt
17:16 belak Fair enough
17:18 pavan from the security perspective, i dont want one minion to see all files on salt:// or through pillar://.. any help on how i can solve it ? or is there no support yet to do something like this ?
17:18 pavan @iggy
17:19 UtahDave pavan: by design all minions can see all files that are in Salt's file_roots or salt://
17:19 pavan ok thanks
17:19 shoemonkey joined #salt
17:19 UtahDave pavan: minions only have access to pillar data that you specifically assign them
17:20 s_kunk joined #salt
17:21 amcorreia joined #salt
17:22 darthzen joined #salt
17:22 pavan basically what i am trying to acheive is copying some certificates to my minions. and if i put all the certs on salt://, then all minions can see those certs. so if one of the minions get hacked, they would be able to see all certs under salt://.. Please correct me if I am wrong..
17:22 UtahDave pavan: that's correct.
17:23 pavan is there a workaround for this ?
17:23 darthzen joined #salt
17:23 pavan or i should use the some secure file transfer commands of the OS
17:24 UtahDave what I do in those situations is put the certifcate data in pillar and then have a salt state that uses file.managed to lay down a file whose contents is    pillar_contents: certs:example.com
17:24 darthzen left #salt
17:24 UtahDave that way any minion can see the state, but not the data that goes in the state, unless they've explicitly been assigned the cert information in their own pillar data.
17:28 dfinn joined #salt
17:31 bltmiller joined #salt
17:32 Miouge joined #salt
17:34 KajiMaster joined #salt
17:34 cliluw joined #salt
17:42 mikecmpbll joined #salt
17:45 patrek joined #salt
17:47 sanika joined #salt
17:48 pavan thanks. i think that works. appreciate the help
17:49 mekhami left #salt
17:52 punkoivan joined #salt
17:52 tapoxi joined #salt
17:52 noraatepernos joined #salt
17:53 nidr0x joined #salt
17:53 rburkholder joined #salt
17:54 west575_ joined #salt
17:54 punkoivan joined #salt
17:57 ajw0100 joined #salt
17:58 LostSoul joined #salt
17:59 west575 joined #salt
17:59 alinuxninja joined #salt
17:59 bltmiller would be nice to be able to compound match against node groups (e.g. `salt -C 'N@elasticsearch and G@datacenter:x' test.ping`). doesn't seem like that is possible today, is it?
17:59 phtes joined #salt
17:59 serverascode joined #salt
18:00 SteamWells joined #salt
18:00 aljosa joined #salt
18:01 MindDrive joined #salt
18:02 gtmanfred joined #salt
18:03 antonw joined #salt
18:03 Eureka703 joined #salt
18:03 fannet joined #salt
18:03 colegatron joined #salt
18:04 west575_ joined #salt
18:04 CeBe joined #salt
18:05 munhitsu_ joined #salt
18:07 mpanetta joined #salt
18:07 shoemonkey joined #salt
18:07 Score_Under joined #salt
18:07 west575 joined #salt
18:08 aljosa joined #salt
18:09 Sylvain31 joined #salt
18:09 kaptk2 joined #salt
18:10 felskrone joined #salt
18:10 ToeSnacks joined #salt
18:10 gtmanfred joined #salt
18:11 RealMurphy joined #salt
18:12 nmadhok joined #salt
18:12 UtahDave bltmiller: It used to not be possible, but I'm not sure if that's been added
18:12 stanchan joined #salt
18:12 aharvey joined #salt
18:14 Hipikat joined #salt
18:16 mpanetta joined #salt
18:16 tristianc joined #salt
18:17 paydro joined #salt
18:17 ToeSnacks joined #salt
18:18 Sylvain31 do you have some example of test for something? I would like to test if my configuration for a webserver is actually providing php over: apache + fastcgi + php-fpm.
18:21 punkoivan joined #salt
18:21 noraatepernos joined #salt
18:22 mpanetta joined #salt
18:23 punkoivan joined #salt
18:23 teryx510 joined #salt
18:24 menglish joined #salt
18:24 punkoivan joined #salt
18:26 asoc joined #salt
18:26 punkoivan joined #salt
18:28 punkoivan joined #salt
18:29 punkoivan joined #salt
18:30 bltmiller @UtahDave: doesn't seem to be the case :( what's the best way to request that?
18:30 punkoivan joined #salt
18:31 brotatochip joined #salt
18:31 UtahDave open an issue on github requesting that feature.  I think there may already be an issue open for that. Search for that first.
18:35 Muchoz joined #salt
18:35 flowstate joined #salt
18:41 \ask joined #salt
18:49 amcorreia joined #salt
18:50 oeuftete joined #salt
18:52 supermike_ joined #salt
18:53 cwyse joined #salt
18:53 CaptTofu joined #salt
18:54 whaity joined #salt
18:55 czchen joined #salt
18:56 ktosiek joined #salt
19:01 Muchoz joined #salt
19:02 punkoivan joined #salt
19:03 punkoivan joined #salt
19:03 supertom joined #salt
19:04 supertom feeding the search engines here, following up on an issue from 06/01 in IRC.  User said: Seems to be some issue with Tornado. Minion failed with "ImportError: cannot import name parse_response_start_line"
19:04 supertom I saw the same thing on Debian 8, upgraded Tornado via pip resolved it.
19:05 supertom the 06/01 IRC chat was the only result I found for it. -)
19:05 punkoivan joined #salt
19:07 punkoivan joined #salt
19:09 punkoivan joined #salt
19:10 bmcorser joined #salt
19:11 punkoivan joined #salt
19:11 twork_ is there a recommended tool in salt for locking a (*nix) user account?  i find modules.shadow.del_password but that seems sloppy somehow.
19:12 punkoivan joined #salt
19:12 sjorge joined #salt
19:12 sjorge joined #salt
19:15 Sylvain31 twork_: cmd.run?
19:15 dendazen joined #salt
19:15 Sylvain31 grep -r lock path/to/salt/modules ?
19:16 iggy pavan: there are also a couple tickets open to address files in pillar... none seem to have gotten any traction in a while
19:16 Sylvain31 twork_: if the user is managed, you can remove it, you could recreate it, right?
19:18 ktosiek joined #salt
19:19 manji joined #salt
19:19 bltmiller joined #salt
19:20 twork_ Sylvain31: the user is managed. use case here (yet to occur) is for a customer account that gets switched off but might need to be switched back on.  i've been instructed to leave as much in place as possible in case the account might need to be turned back up again.
19:21 rhodgin joined #salt
19:21 Sylvain31 twork_: cmd.run: usermod -L {{ user }} ?
19:21 twork_ so, locking seemed ideal, that would work but i was hoping for a plain ol' "locked or not" switch, thought there might be one but haven't found one.
19:24 bltmiller UtahDave: lo and behold! turns out, was already there: https://github.com/saltstack/salt/issues/6602
19:24 saltstackbot [#6602]title: Add ability to match on nodegroups to the compound matcher | As discussed in #4600 it is currently not possible to have a compound match on nodegroups.  ...
19:24 twork_ if there isn't, that's fine, i just have a track reinventing wheels.  any of those will do, thanks.
19:25 Sylvain31 twork_: sorry I don't know. As the grep returned something?
19:26 UtahDave twork_: I don't think we have a lock or unlock function in the user module yet     https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.useradd.html#module-salt.modules.useradd
19:26 UtahDave twork_: sounds like a nice addition and shouldn't be too hard to add
19:27 twork_ Sylvan31: other greps haven't (doc site), haven't tried that one yet, but this isn't urgent or anything.  i just didn't want to be clumsy, applying any of the methods i've found and then find out later, duh, twork, there's a button for that right here ->
19:29 Sylvain31 twork_: computer science, and especially in free software, it is common to throw away code improved by something new not yet know. ;)
19:29 TooLmaN joined #salt
19:29 teryx510 joined #salt
19:29 Sylvain31 https://github.com/saltstack/salt/blob/develop/salt/modules/useradd.py
19:30 Tyrm_ joined #salt
19:31 Sylvain31 twork_: https://github.com/saltstack/salt/blob/develop/salt/modules/useradd.py#L626 rename may be?
19:32 teryx5101 joined #salt
19:33 impi joined #salt
19:34 twork_ Sylvain31: har: 'rename' is a glorious example of a case where i recently threw away a whole task because hunting around trying to rename accounts on different hosts was just going to take too much time.
19:34 Miouge joined #salt
19:35 flowstate joined #salt
19:42 west575 joined #salt
19:42 noraatepernos joined #salt
19:42 twork_ Sylvain31: ...an yep, thanks, my question isn't answered off the shelf but a simple extension to that module, looks like, is all i need.
19:44 Sylvain31 twork_: it was a good question ;)
19:46 mapu joined #salt
19:49 manji joined #salt
19:49 mekhami joined #salt
19:49 aharvey joined #salt
19:51 saltbrain joined #salt
19:51 fannet joined #salt
19:53 flowstate joined #salt
19:56 nmadhok joined #salt
20:03 fannet joined #salt
20:04 mohae joined #salt
20:05 shoemonkey joined #salt
20:06 Tyrm joined #salt
20:06 Tyrm joined #salt
20:09 brotatochip joined #salt
20:10 Tyrm joined #salt
20:10 Tyrm_ joined #salt
20:12 Tyrm__ joined #salt
20:26 aharvey_ joined #salt
20:29 colegatron_origi joined #salt
20:32 mohae joined #salt
20:35 flowstate joined #salt
20:37 edrocks joined #salt
20:41 irctc938 joined #salt
20:41 Guest28376 file.managed documentation states that "It is also possible to use the py renderer as a templating option." - how can I use this?
20:41 woodtablet joined #salt
20:42 Sylvain31 Guest28376: I guess you set template: py and your source: salt://path/to/somepython.py look at:
20:42 sjorge template: py, source: salt://sonething/file.py
20:42 sjorge IIRC
20:42 subsignal joined #salt
20:43 sjorge I got it working a while ago but memory hazy
20:43 Sylvain31 https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.py.html
20:43 bltmiller I think it's template: py and source the file
20:43 mekhami left #salt
20:43 bltmiller ;)
20:43 sjorge The makes 3 vots, it has been decided! :p
20:43 Guest28376 Ok, I was confused since I'm using contents_pillar right now but I guess I just pull the pillar data from the python script
20:43 ktosiek joined #salt
20:44 irctc938 is it possible to read json in a jinja template? i'm guessing i need to use an external pillar and something like cmd_json. is it possible to include an external pillar in top.sls and not have to configure it for the master?
20:44 ktosiek joined #salt
20:45 sjorge there a macro for that I think, let me check my states real quick
20:45 DammitJim when doing user.present
20:45 DammitJim do I need to specify a group?
20:45 DammitJim I don't know why salt was giving me a group []
20:45 sjorge {%- import_json "common/package.sls" as base_package %}
20:46 sjorge something like that ^
20:46 DammitJim and supposedly removed the user from its own group
20:46 DammitJim weird
20:46 Sylvain31 irctc938: import_yaml exists
20:46 tapoxi joined #salt
20:47 irctc938 ah yeah {% import_json "defaults.json" as defaults %}
20:47 irctc938 cool
20:47 Sylvain31 irctc938: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#include-and-import
20:48 XenophonF joined #salt
20:50 colegatron joined #salt
20:55 iceyao joined #salt
20:56 abednarik joined #salt
21:04 ajw0100 joined #salt
21:07 _JZ_ joined #salt
21:08 inad923 joined #salt
21:08 Tyrm joined #salt
21:11 gotwf left #salt
21:12 aharvey joined #salt
21:14 nmadhok joined #salt
21:19 teryx510 joined #salt
21:27 cableninja_ joined #salt
21:34 s_kunk joined #salt
21:34 s_kunk joined #salt
21:34 Tyrm joined #salt
21:37 gngsk_ joined #salt
21:40 Tyrm joined #salt
21:40 hamstah joined #salt
21:42 hamstah hey, I'm trying to use https://github.com/saltstack-formulas/logstash-formula but I'm not sure how to do it. I've installed the formula with gitfs (debug output shows it's loaded) and added a pillar file similar to the example, included from a pillar top.sls matching my state top.sls, but I'm not sure if that's enough. logstash config/package doesn't get installed
21:42 hamstah I can see my pillar loaded with salt-call pillar.items
21:42 hamstah I'm using a masterless minion. I think I'm just not including it properly
21:43 hamstah any idea? thanks
21:45 Sylvain31 I dont know about masterless, but salt-call -ldebug state.apply logstash
21:46 babilen hamstah: Is it part of your highstate? Could you paste your top.sls and the state.highstate output?
21:46 bltmiller is this a mistake in documentation? says `tar_options` is required if used with `archive_format: tar`, but I can totally extract a tarball without that argument https://docs.saltstack.com/en/latest/ref/states/all/salt.states.archive.html
21:47 west575 joined #salt
21:48 hamstah Sylvain31:     No matching sls found for 'logstash' in env 'base'
21:48 babilen good night!
21:50 hamstah getting the debug output of the highstate now
21:51 fannet joined #salt
21:53 hamstah Sylvain31: is that useful?
21:55 Sylvain31 hamstah: it seems it cant find the formula right?
21:57 flowstate joined #salt
21:57 hamstah yeah
21:59 Sylvain31 hamstah: Do you use other formula?
21:59 hamstah no
21:59 hamstah sec I have the debug log
21:59 Sylvain31 I put them in my /etc/salt/master file_roots:
22:00 ceedon joined #salt
22:00 hamstah http://pastebin.com/raw/tQNQdV5u
22:00 Sylvain31 midnight in France…
22:00 hamstah actually there as well
22:02 hamstah http://pastebin.com/raw/yjhVVuFe
22:02 ceedon Can someone sanity check me, please? If I’m using s3fs, all of the files are going to come through a master to arrive at the minions, yes?
22:02 hamstah ^ my minion config
22:02 fannet joined #salt
22:03 ceedon Or any external fileserver backend, I suppose...
22:04 Sylvain31 hamstah: you need to debug the gitfs_remotes stuff, you can bypass it by cloning the formula by hand in a dir add to file_roots:
22:04 aasirc joined #salt
22:04 cableninja_ joined #salt
22:05 hamstah ok I will dig more tomorrow, but from your POV there is nothing to do to "include" or "enable" the formula?
22:05 Sylvain31 hamstah: it works on my master. I didn't tested gitfs_remotes:
22:06 Sylvain31 hamstah: for enabling a formula i go to my formula/ folder git clone, edit master config file_roots: and it works…
22:07 hamstah but no need to add it to your top.sls right?
22:07 Sylvain31 hamstah: I can call it directly with state.apply right
22:08 UtahDave left #salt
22:08 hamstah ok
22:08 hamstah the weird thing in my log is
22:08 hamstah [DEBUG   ] Fetching gitfs remote 'https://github.com/saltstack-formulas/logstash-formula'
22:08 hamstah [DEBUG   ] gitfs remote 'https://github.com/saltstack-formulas/logstash-formula' is up-to-date
22:08 hamstah but it seem to do it multiple times
22:08 Sylvain31 top.sls is only for management of the highstate as far I as I understand… pillar must be copied + edit and refreshed of course…
22:09 Sylvain31 where did it fetchit? is it available for the minion after that?
22:10 hamstah well I actually looked at the cache folder
22:10 hamstah it seems to have checked it out
22:10 hamstah there is a .git folder in it
22:13 hamstah ok I will try tomorrow with a manual checkout, thanks for the help
22:15 jenastar ls
22:16 jenastar and THAT is how empires crumble.
22:16 ceedon ^^
22:16 Sylvain31 hamstah: yeah, gitfs debug I guess.
22:17 Sylvain31 https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#tutorial-gitfs
22:20 cableninja is there a way to perform a command on the salt master server during a state application for another server? I want to generate an SSH key on the master so that it and its key can be distributed to the appropriate servers
22:22 woodtablet @hamstah - awesome name btw
22:26 abednarik joined #salt
22:27 paydro_ joined #salt
22:29 woodtablet does Forrest aka gravyboat work for Salt ?
22:40 ceedon cableninja: look at orchestration
22:41 gngsk_ woodtablet: https://hungryadmin.com/pages/Resume.html
22:44 cableninja ceedon, I'm not sure I understand how to use orchestration in this case
22:45 cableninja or would I just specify the target as the salt server?
22:45 ceedon you would create an orchestration job that created the keys on the server and then run a state to push to minions
22:45 ceedon then ran =/
22:46 cableninja I was kind of looking for a way to do it along side the state application
22:46 cableninja without a second command
22:47 ceedon can’t help ya there. orch exists to coordinate jobs across multiple hosts
22:49 brotatochip joined #salt
22:52 Sylvain31 cableninja: you may be able to pregenerate all keys before runing minion state, so they will be available to them…
22:55 woodtablet gngsk_: not sure how you found that, but i see, wow, i like him, even more now, he is pretty cool
22:56 woodtablet gngsk_: unless you are him, then btw, hi! and thanks =D
22:59 paydro joined #salt
23:00 gngsk_ not him
23:00 gngsk_ big fan too though
23:00 gngsk_ not like a stalker though
23:00 gngsk_ ;0
23:01 ewd84 joined #salt
23:03 woodtablet o_O
23:05 keimlink joined #salt
23:05 woodtablet left #salt
23:06 gngsk_ his github.com profile has a link to his website which has his resume
23:06 gngsk_ not exactly private eye level snooping :)
23:08 smcquay hullo fello salt people. Is it normal to define a .service file in a file.managed, and have a service state that requires it? I'm not seeing anything for specifying unit/service files directly in the service.running; I haven't missed anything, have I?
23:08 ewd84 Hello, quick question: While creating a Linux group, can you specify that only this user can be a member of it? Catch is that the user will be created after the group's creation.
23:12 om joined #salt
23:14 abednarik joined #salt
23:18 zmalone joined #salt
23:18 gngsk joined #salt
23:42 keimlink_ joined #salt
23:50 fannet joined #salt
23:58 cableninja_ joined #salt
23:59 mosen joined #salt

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