Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-10-05

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

All times shown according to UTC.

Time Nick Message
00:00 theblazehen joined #salt
00:15 woodtablet left #salt
00:20 pipps joined #salt
00:21 jas02 joined #salt
00:29 subsignal joined #salt
00:30 TSP_ joined #salt
00:31 mpanetta joined #salt
00:34 infrmnt joined #salt
00:34 sqwishy joined #salt
00:41 edrocks joined #salt
00:43 edrocks is it no longer recommended to install via pip?
00:45 doug1 Hello, I'm having a problem installing the bind package using pkg.installed on Ubuntu 14.  I'm tracing both the master and the minion and it hangs at this particular packages apt-get every time.  The other packages install fine and this command runs fine outside of salt.  Anyone have any ideas on this odd problem?  The command the minion is running according to salt-minion -l trace is: apt-get -q -y -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-c
00:46 doug1 Also probably important is it only fails the first run, the second run will install it.
00:47 systo joined #salt
00:47 doug1 PS whytewolf: I got the grains from the salt mine working thanks again.
00:47 whytewolf edrocks: i don't think it has been recommended for a while now. now they recommend using the repo.saltstack.org or using the bootstrap script
00:48 whytewolf doug1: that is an odd problem. is it asking for info while it is trying to install? [shouldn't be, as it is bind not mysql]
00:48 edrocks whytewolf: thanks, do you know if there is a way to get the bootstrap script to install the latest stable? ie 2016.3.3? I just ran in vagrant and it gave me `salt-minion 2016.9.0-152-g6e0869a`
00:49 Nahual joined #salt
00:49 doug1 whytewolf: it runs fine unattended when I run it myself from the command line
00:49 whytewolf edrocks: what command did you run??
00:50 whytewolf doug1: stranger and stranger. i see no reason it should do that then.
00:50 toastedpenguin joined #salt
00:50 edrocks whytewolf: curl -o bootstrap_salt.sh -L https://bootstrap.saltstack.com; sudo sh bootstrap_salt.sh git develop
00:50 doug1 This article seemed promising but I check and this package is not virtual
00:50 doug1 https://github.com/saltstack/salt/issues/24222
00:50 saltstackbot [#24222][OPEN] pkg.installed Is Not Installing a Package | I'm trying to get this Perl library installed on some machines, but for some reason it won't install through Salt....
00:50 whytewolf ahhh... drop the git develop
00:54 edrocks whytewolf: it works! thank you
00:55 whytewolf doug1: unforchantly i don't have an ubuntu box to fire up and test with :/ but i suspect it has something to do with the return of the command hanging. but i don't see how that is possable.
00:55 whytewolf edrocks: no problem
00:55 whytewolf doug1: i also could be wildy wrong about that. since i don't have an ubuntu box to test on
00:56 edrocks_ joined #salt
00:57 doug1 whytewolf: no worries, I just had an idea to try too.  I will try forcing an apt db update first
01:05 edrocks joined #salt
01:05 justanotheruser joined #salt
01:11 antonw joined #salt
01:13 munhitsu_ joined #salt
01:14 bVector joined #salt
01:14 moy joined #salt
01:15 mattl joined #salt
01:17 systo joined #salt
01:22 voxpop_ joined #salt
01:29 jas02 joined #salt
01:37 systo joined #salt
01:41 sebastian-w joined #salt
01:41 John_Kang joined #salt
01:47 jdipierro joined #salt
01:54 jdipierro joined #salt
01:57 sandro_ joined #salt
01:57 amontalban joined #salt
01:57 amontalban joined #salt
02:08 cdubmkvi joined #salt
02:08 gadams joined #salt
02:13 MTecknology cdubmkvi: sup dawg?
02:18 jdipierro joined #salt
02:22 jdipierro joined #salt
02:27 sjmh joined #salt
02:28 jdipierro joined #salt
02:30 Reverend joined #salt
02:30 jas02 joined #salt
02:31 pipps joined #salt
02:32 gadams joined #salt
02:34 cdubmkvi joined #salt
02:46 doug1 joined #salt
02:46 cdubmkvi joined #salt
03:01 cdubmkvi joined #salt
03:07 DEger joined #salt
03:09 raspado joined #salt
03:23 eMBee joined #salt
03:25 om2 joined #salt
03:27 DEger joined #salt
03:31 jas02 joined #salt
03:33 eMBee how do i read large files, such as log-files from a minion?
03:36 iggy that's not really going to be a strength of salt
03:36 iggy there are other tools to do that kind of thing
03:38 eMBee well, salt is currently the only way to access the machines, i'd have to open up ssh and add user accounts to use other options
03:42 DEger joined #salt
03:42 doug1 whytewolf:  I got it working though I don't understand the cause.  If I send pkg.installed a list containing 'pkgs': ['bind9', 'bind9utils', 'dnssec-tools'] it fails but just 'pkgs': ['bind9'] works.  salt does try to install all three packages but somehow it doesn't like that combination.
03:44 whytewolf thats .... strange... have you used a list elsewhere?
03:44 whytewolf see if it only happens to the bind toools?
03:47 doug1 Definitely strange and the cause of much brainhurt.  I haven't used a list on my own yet, I am using this formula from github https://github.com/saltstack-formulas/bind-formula.  According to the trace it definitely expands the list correctly and sends a working command to the shell.  But once it hits that command it never returns anything else again.
03:49 whytewolf humm, yeah it should work. after all it's just a list. it is very strange.
03:51 whytewolf I would send in bug reports to both salt [cause that should work] and to the formula maintainer. and see if there is someone higher up in the tree that sees what is happening
03:51 doug1 I'll try installing something not bind related as part of the same list tomorrow as an experiment.  For now I'm bound to be sick of bind.  …and too tired to make a good joke :)
03:52 whytewolf eMBee: well for log files why not setup a log file central system. such as elasticsearch or splunk
03:52 whytewolf doug1: i hear you. I need to get dinner before it gets WAY to late
03:53 whytewolf eMBee: large files are deifntly not salts bag.
03:54 doug1 Haha, if you are in the US its def getting there
03:54 whytewolf las vegas
03:54 whytewolf almost 9pm
03:56 doug1 LA here, same time.  Ok I'm outta here.  That was the last state that was failing in my salt-cloud auto-highstate orchestration you were helping me with.  So now it working, thanks again.
04:00 amontalban joined #salt
04:01 jaybocc2 joined #salt
04:02 eMBee whytewolf: central logging is probably a good idea. for now i'll try to get by with cp.push. for all but watching log files live that should be manageable
04:10 oliver_are joined #salt
04:12 cdubmkvi joined #salt
04:15 rdas joined #salt
04:18 jaybocc2 joined #salt
04:25 debian112 joined #salt
04:32 jas02 joined #salt
04:32 mpanetta joined #salt
04:34 oliver_are joined #salt
04:39 onlyanegg joined #salt
04:54 oliver_are joined #salt
05:06 yuhlw____ joined #salt
05:15 jimklo joined #salt
05:27 jooni joined #salt
05:31 om2 joined #salt
05:33 jas02 joined #salt
05:34 jaybocc2 joined #salt
05:47 whitenoise joined #salt
05:54 oliver_are joined #salt
05:55 sgo_ joined #salt
06:01 sh123124213 joined #salt
06:10 ivanjaros joined #salt
06:12 iggy oooh, another LA saltine
06:14 iggy eMBee: the problem is that loads the enitre file into memory
06:15 iggy (and I wouldn't be surprised if there were leaks in that code... I know we used to run our masters out of memory trying to move large files around)
06:21 bocaneri joined #salt
06:25 sh123124213 joined #salt
06:26 eMBee iggy: thanks, i'll keep that in mind
06:28 ntropy any tips for debugging an issue where pillar data is stale on the master, but up to date on the minion?
06:28 ntropy saltutil.refresh_pillar & saltutil.sync_all refresh=True don't help
06:28 ntropy pillar is only cached on the master right, so salt-call will fetch it from the master?
06:29 ntropy im confused how data can be different when looked up from master & minion, when effectively both should be getting it from the same place
06:29 ntropy unless i misunderstand how it works
06:34 jas02 joined #salt
06:34 jaybocc2 joined #salt
06:35 hemebond pillar data is also cached on the minion
06:35 hemebond refresh_pillar should refresh the data on both the master and the minion
06:35 hemebond (when run from the master at least)
06:42 oliver_are joined #salt
06:48 sgo_ joined #salt
06:57 Aleks3Y joined #salt
07:01 DEger joined #salt
07:04 amontalban joined #salt
07:04 amontalban joined #salt
07:07 Qlawy joined #salt
07:08 Qlawy Hi guys, anyone using salt to hmm... orchestrate dependent states on multiple minions?
07:12 ivanjaros joined #salt
07:14 AndreasLutro Qlawy: look up orchestration in the salt docs
07:15 ntropy hemebond: thanks, thats what the docs say too - it *should* refresh the data, but doesn't seem to work
07:18 hemebond ntropy: Very strange. Tried running in debug mode to check for errors?
07:19 asoc joined #salt
07:20 Reverend joined #salt
07:21 ntropy yes, nothing caught my eye though, so im out looking for suggestions etc before i take another deep dive and before logging an issue
07:27 toanju joined #salt
07:31 Qlawy AndreasLutro: thanks
07:31 Qlawy this is what I was suspecting as a solution ;)
07:33 DEger joined #salt
07:35 jas02 joined #salt
07:35 jaybocc2 joined #salt
07:36 dariusjs joined #salt
07:42 sgo_ left #salt
07:43 sgo_ joined #salt
07:44 inad922 joined #salt
07:47 sgo_ joined #salt
07:49 DEger joined #salt
07:50 sgo_ joined #salt
07:57 evle joined #salt
07:58 krymzon joined #salt
08:00 DEger joined #salt
08:01 fredvd joined #salt
08:03 geomacy joined #salt
08:06 sergeyt joined #salt
08:12 simmel joined #salt
08:17 Rumbles joined #salt
08:17 kbaikov joined #salt
08:17 DEger joined #salt
08:21 impi joined #salt
08:24 s_kunk joined #salt
08:25 felskrone joined #salt
08:27 sh123124213 joined #salt
08:28 lero joined #salt
08:28 ronnix joined #salt
08:29 Rumbles joined #salt
08:29 yuhlw____ joined #salt
08:30 DEger joined #salt
08:34 oliver_are Hi, I want to encode id_rsa file with salt, and I have to use it in state with contents_pillar for decoding. Could someone help me with an example. I search a lot unable to fine one.
08:36 stk joined #salt
08:36 jas02 joined #salt
08:36 stk left #salt
08:38 DEger joined #salt
08:38 ronnix_ joined #salt
08:41 catpig joined #salt
08:50 DEger joined #salt
08:51 Rumbles joined #salt
08:51 N-Mi joined #salt
08:54 sjoerd_ joined #salt
08:56 sjoerd_ Hi everyone, I'm hoping someone can enlighten me about pkg.installed using yum. It seems that it's not taking along any dependencies across repos and I can't find why
08:59 sjoerd_ I'm creating an extra repo, in this case for nginx, and then I've got a require on that repo. However it won't install because of missing dependencies. Manually installing it seens fine though
09:02 lero joined #salt
09:02 ronnix joined #salt
09:02 losh joined #salt
09:05 amontalban joined #salt
09:05 amontalban joined #salt
09:12 NV joined #salt
09:28 Rumbles joined #salt
09:36 jaybocc2 joined #salt
09:37 jas02 joined #salt
09:38 watersoul joined #salt
09:39 Cadmus joined #salt
09:47 remyd1 joined #salt
09:47 Cadmus Hello, I've got a mildly annoying bug regarding security limits (number of open files etc). I'm using cmd.run with a runas for a user, that user has the right entries in limits.conf and if I log on as that user I have the right limits. But when I run the statement the limits are different.
09:48 remyd1 Hi folks; I have an orchestrator which is failing on a specific states. Is there a way to tell the orchestrator to continue if it fails somewhere ?
09:48 Cadmus I've found a bug about it, but the workaround relies on you changing the limits on-the-fly, which would only work if you're running as root.
09:48 rdas joined #salt
09:53 cswang joined #salt
09:57 mamalos joined #salt
09:57 mamalos hi everybody
09:58 mamalos I am trying to add some functionality on some salt modules, but I'm new to salt (and its code) so I need the following information
09:58 mamalos some function executes __salt__['cmd.run']() with some arguments
09:59 mamalos and at some moment the function executed returns an error along with the message
09:59 mamalos is there a way to know it and act accordingly or do I have to run a separate command returning the exit status?
10:04 zifnab joined #salt
10:04 AndreasLutro mamalos: try cmd.run_all instead, it will return a dictionary including the command's exit code
10:07 Rumbles joined #salt
10:08 mamalos AndreasLutro: thanks, will do!
10:12 jaybocc2 joined #salt
10:12 Cadmus I'm quite stumped on how to get around this without some horrible shell-script hack.
10:13 sjoerd_ What OS are you using
10:13 ronnix joined #salt
10:14 Cadmus sjoerd_: This is CentOS
10:15 Cadmus If I could somehow make cmd.run use a login shell then the limits would be loaded correctly I think
10:16 sjoerd_ O would try to get around it by setting system-wide limits to what you need using sysctl
10:16 Cadmus That makes me a little uncomfortable, but would probably be okay. Let's give it a go
10:17 sjoerd_ you can do it per process using /etc/security/limits.conf
10:18 Cadmus sjoerd_: The limits are correct for the user I'm doing the runas to
10:19 Cadmus If I log in as the user all limits are right, but when I try to run the statement it doesn't use the runas users limits
10:19 Cadmus Here's the bug https://github.com/saltstack/salt/issues/9436
10:19 saltstackbot [#9436][OPEN] Minion configuration as non-root user | Hello:...
10:19 Cadmus Or something that's an approximation
10:21 Cadmus Oh-ho, a solution might be to edit the systemd file for the minion so it has more files, that sounds less intrusive
10:30 Cadmus Aaaand there's the number I was seeing. So I've found the right place, now we do a highstate and play the waiting game
10:32 ronnix joined #salt
10:33 CeBe joined #salt
10:33 Cadmus The witing game sucks, howeber it did work
10:36 ronnix joined #salt
10:36 geomacy joined #salt
10:37 Cadmus Is my issue different enough from the above to be worthy of a new issue? Or should I just tag it on?
10:37 DEger joined #salt
10:38 jas02 joined #salt
10:39 teryx510 joined #salt
10:40 ronnix joined #salt
10:40 mrBen2k2k2k joined #salt
10:44 sgo_ joined #salt
10:47 mrBen2k2k2k joined #salt
10:48 TSP_ joined #salt
11:01 slanders joined #salt
11:02 slanders Hi all, is there a way to view a dictonary in a state file? E.g. dump all of it contents in a file for troubleshooting?
11:04 cachedout joined #salt
11:06 aidin joined #salt
11:07 slanders ah, nevermind i gave my own answer :)
11:07 amontalban joined #salt
11:07 amontalban joined #salt
11:07 ronnix joined #salt
11:08 sjoerd_ I'm still having a fight with package dependencies from yum. I got it to work like this: http://pastebin.com/1d2FudKR - but the enablerepo line bugs me because those repos are enabled by default anyway
11:08 sjoerd_ anyone know the solution?
11:09 slanders sjoerd_: is that "_" intentional at the end of line 11?
11:09 sjoerd_ it's an artifact from my vim
11:09 slanders ack
11:10 slanders Sorry man, can´t help you with that right now
11:13 jaybocc2 joined #salt
11:14 DanyC joined #salt
11:17 amcorreia joined #salt
11:22 ptitdoc joined #salt
11:23 cyborg-one joined #salt
11:27 voxpop joined #salt
11:28 sh123124213 joined #salt
11:36 ivanjaros joined #salt
11:39 jas02 joined #salt
11:49 Jimlad_ joined #salt
11:59 athaller joined #salt
12:04 dendazen joined #salt
12:04 athaller hello is there a way to get a deep copy of a dict inside a jinja template? i have the problem that i want to merge multiple dicts into one dict but have the problem that the original dict gets modified when i do that.
12:05 athaller (its apparently only passing a reference and not really copying the dict)
12:05 babilen https://github.com/saltstack/salt/issues/28606
12:05 saltstackbot [#28606][OPEN] How to override nested parameters in map.jinja | If I have a defaults.yaml structure that looks like this (nested):...
12:06 ]V[ joined #salt
12:07 numkem joined #salt
12:07 athaller @babilen can i do that without the filter?
12:07 babilen Which filter?
12:07 athaller salt['grains.filter_by']
12:07 babilen Did you read the entire discussion?
12:07 babilen https://github.com/saltstack/salt/issues/28606#issuecomment-221297029 for example
12:07 saltstackbot [#28606][OPEN] How to override nested parameters in map.jinja | If I have a defaults.yaml structure that looks like this (nested):...
12:10 ronnix joined #salt
12:12 athaller yeah https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.defaults.html looks like what i wanted thank you
12:13 babilen Great :)
12:14 patrek joined #salt
12:15 numkem joined #salt
12:18 amontalban joined #salt
12:22 ronnix joined #salt
12:24 mavhq joined #salt
12:25 mpanetta joined #salt
12:32 nicksloan joined #salt
12:37 amontalban joined #salt
12:40 athaller babilen: hmh its still changing the original map :/ maybe im doing something wrong http://pastebin.com/PY9zVdmy
12:40 jas02 joined #salt
12:41 babilen athaller: Hmm .. that really should perform deep copies
12:41 babilen should™ that is
12:42 jas02 joined #salt
12:42 west575 joined #salt
12:42 athaller yeah but if i print the map i get the values i update in the copy also in the original dict
12:42 athaller i will make a nicer testcase and see
12:42 athaller maybe something else is going on :D
12:42 babilen athaller: I guess we'll have to make use of deep copies in utils/dictupdate.py
12:46 dariusjs joined #salt
12:47 daemonkeeper what exactly is a salt proxy doing to my state in the proxy code? I have a weird XML RPC client class I'm interfacing with, which works fine, even the proxy code I wrote in ipython. But as soon as I load it as a real salt proxy, it only works for one request at time, then I need to reconnect between state calls
12:51 daemonkeeper https://docs.saltstack.com/en/latest/topics/proxyminion/index.html suggests the data in memory would persist, and indeed my class remains instantiated, but something it loses.
12:53 DEger joined #salt
12:55 sergeyt joined #salt
12:57 DEger_ joined #salt
12:57 Nahual joined #salt
12:59 AirOnSkin joined #salt
12:59 ronnix_ joined #salt
13:00 nicksloan joined #salt
13:02 ronnix joined #salt
13:10 nZac joined #salt
13:11 aidin joined #salt
13:14 jaybocc2 joined #salt
13:15 lovecraftian joined #salt
13:17 DEger joined #salt
13:17 ronnix joined #salt
13:19 CampusD joined #salt
13:23 CampusD Hi All, had a quick question? Is there a way to determine connectivity to the master from the minion? On the master we have salt-run manage.up and or salt-run manage.status
13:24 AndreasLutro salt-call test.ping should do it I guess
13:24 ronnix joined #salt
13:25 sjoerd_ joined #salt
13:33 racooper joined #salt
13:34 netcho joined #salt
13:37 DEger joined #salt
13:38 promorphus joined #salt
13:39 CampusD joined #salt
13:40 CampusD Sorry, got disconnected there.  I just had a question about checking from the minion side whether they were connected to the master
13:40 winsalt_ periodically I see "'chcp' is not recognized as an internal or external command" from a failed state, has anyone had that happen?
13:43 jas02 joined #salt
13:51 Tanta joined #salt
13:51 athaller @babilen: how would i do that? salt['utils.dictupdate.merge_recurse']?
13:55 om2 joined #salt
13:55 babilen athaller: You can't call utils like that (which is why defaults.merge exist in the first place)
13:56 athaller hmh ok
13:56 athaller i tried it with a flat map an there it worked
13:56 athaller currently working on an nested example..
13:56 athaller if that also works i have to look at my code again :D
13:59 filippos joined #salt
13:59 babilen Right .. We use that in a some places and I don't really have issues
14:00 alvinstarr joined #salt
14:00 aljosa left #salt
14:00 cscf winsalt_, well, do you have the string 'chcp' anywhere in your states?  grep -r may help.  Did you perhaps want 'dhcp'?
14:02 winsalt_ chcp is an actualy utility (https://technet.microsoft.com/en-us/library/bb490874.aspx) , but I cant figure out why it cant be found.  It gets fixed when i restart the minion, but eventually comes back.
14:02 Tanta path
14:02 yuhlw____ joined #salt
14:07 mpanetta joined #salt
14:08 gmoro joined #salt
14:08 dariusjs joined #salt
14:08 mpanetta joined #salt
14:09 cscf Ah, windows.  Yeah, Path is a good thing to check
14:10 hasues joined #salt
14:11 DEger joined #salt
14:11 Brew joined #salt
14:19 Renich joined #salt
14:21 sh123124213 joined #salt
14:22 DEger joined #salt
14:22 hasues left #salt
14:22 raspado joined #salt
14:24 dendazen joined #salt
14:24 amontalb1n joined #salt
14:28 DEger joined #salt
14:32 J0hnStee- joined #salt
14:32 mamalos joined #salt
14:32 mamalos hey all
14:33 mamalos hey all!
14:33 mamalos I'm trying to add some functionality on some modules and I've faced the following problem:
14:35 mamalos what should be the return value of a "public" function  within a module when it fails? Should it be always False or can it be something more descriptive?
14:35 mamalos because I've met some functions which print return a message when erring and others that just return False
14:36 AndreasLutro mamalos: up to the module really. there's no fixed schema for return values in modules (sadly)
14:36 AndreasLutro I usually return a dict with data
14:36 mamalos AndreasLutro: but the same module does different things :)
14:36 AndreasLutro yes, point being/
14:36 AndreasLutro ?
14:37 mamalos AndreasLutro: so I was thinking of starting an issue which would result in a pull request that would make all functions of that module return a descriptive message (at least for that specific module)
14:37 mamalos is it worth the try or should I focus on something else?
14:37 AndreasLutro I'd support it
14:37 mamalos (cause I have a few more thing to do)
14:37 AndreasLutro but it would be a backwards incompatible change
14:37 mamalos ?
14:38 mamalos AndreasLutro: what do you mean by that exactly?
14:38 pfallenop joined #salt
14:38 ThomasJ joined #salt
14:39 zirpu joined #salt
14:39 armyriad joined #salt
14:39 amontalban joined #salt
14:39 amontalban joined #salt
14:39 Brew joined #salt
14:39 debian112 joined #salt
14:39 AndreasLutro for example, state modules could rely on the return values of the module you want to change - so you'd have to update the states that use the module as well
14:39 cdubmkvi joined #salt
14:39 onlyanegg joined #salt
14:39 joshin joined #salt
14:39 joshin joined #salt
14:39 sagerdearia joined #salt
14:39 raeven_ joined #salt
14:39 Rumbles joined #salt
14:39 AndreasLutro and salt users' custom states would break if they use the module
14:39 netcho joined #salt
14:39 racooper joined #salt
14:39 AndreasLutro etc.
14:39 jooni joined #salt
14:39 chutzpah joined #salt
14:39 cswang joined #salt
14:39 sgo_ joined #salt
14:39 AndreasLutro might still be worth it. just mentioning it
14:39 _W_ joined #salt
14:39 coredumb joined #salt
14:39 DEger joined #salt
14:39 mavhq joined #salt
14:40 mamalos AndreasLutro: hmmm, I hadn't thought about it that much, to be honest, and you're right
14:40 daemonkeeper joined #salt
14:41 mamalos which again points to the problem of not having a specific plan about the return value for failing functions
14:41 mamalos the truth is that it is for a freebsd specific module, which means that there should be not that many users in the first place ;-)
14:42 heaje joined #salt
14:43 Aleks3Y joined #salt
14:43 mamalos OK, I'll give it a try (starting with an issue, etc.) and see if it is welcomed...
14:43 mamalos thanks again
14:44 jas02 joined #salt
14:47 DEger joined #salt
14:47 DEger_ joined #salt
14:50 keltim joined #salt
14:52 mrBen2k2k2k joined #salt
14:53 swills joined #salt
14:53 Awesomecase joined #salt
14:53 ToeSnacks joined #salt
14:54 mattl joined #salt
14:55 antonw joined #salt
14:55 munhitsu_ joined #salt
14:55 BattleChicken joined #salt
15:03 StolenToast I have a pkg.installed state with a bunch of -sources: but when it tries to execute the result is this: Executing command "['yum', '-y', 'install', "sources-['imake', 'libXt-devel',...]"
15:04 StolenToast and of course "sources-[...]" isn't a real package
15:06 pcn You're passing the string instead of the list to a jinja template?
15:06 StolenToast oh sorry I just figured it out
15:06 StolenToast yeah that was the symptom
15:07 bowhunter joined #salt
15:13 jimklo joined #salt
15:14 jaybocc2 joined #salt
15:15 tiwula joined #salt
15:22 sh123124213 joined #salt
15:25 Renich joined #salt
15:28 ronnix joined #salt
15:28 _JZ_ joined #salt
15:37 ronnix joined #salt
15:45 jas02 joined #salt
15:45 ekristen joined #salt
15:49 heewa joined #salt
15:49 racooper joined #salt
15:50 ronnix joined #salt
15:52 sgo_ joined #salt
15:53 KingOfFools Sup guys. I have multiline strings in pillar variables. When I pass pillar variable from sate to file.managed template as defaults, instead of newline I have literal symbols '\n'. What can I do here?
15:54 lovecraftian joined #salt
15:57 ozux joined #salt
15:57 ronnix_ joined #salt
15:58 statik joined #salt
16:00 ronnix joined #salt
16:02 fxdgear joined #salt
16:03 ronnix joined #salt
16:04 barajasfab joined #salt
16:05 foundatron joined #salt
16:05 ponyofdeath joined #salt
16:07 ronnix joined #salt
16:11 heaje joined #salt
16:12 Renich joined #salt
16:13 ronnix joined #salt
16:17 ronnix joined #salt
16:22 DanyC joined #salt
16:22 woodtablet joined #salt
16:24 woodtablet joined #salt
16:29 TSP_ joined #salt
16:29 DanyC joined #salt
16:30 jdipierro joined #salt
16:32 DanyC left #salt
16:35 west575 joined #salt
16:37 Lionel_Debroux joined #salt
16:39 Jimlad joined #salt
16:43 jdipierro joined #salt
16:45 Edgan joined #salt
16:45 cmarzullo KingOfFools: are you using |
16:46 jas02 joined #salt
16:46 KingOfFools cmarzullo: no, what about it?
16:46 ronnix joined #salt
16:47 debian112 Saltmine question: Why would I get this error: salt-call mine.update
16:47 debian112 [ERROR   ] Function {'network.ip_addrs': ['eth0']} in mine_functions failed to execute
16:47 cmarzullo When I generatlly use multiline in pillar I do key: | then the values and stuff on the following lines.
16:47 debian112 Although I can get the IP with this: salt-call mine.get mineserver.com network.ip_addrs
16:47 debian112 Any idea is this a bug or something?
16:48 ivanjaros joined #salt
16:50 ronnix joined #salt
16:50 KingOfFools cmarzullo: hm.. what is the syntax? like this?: {{ variable| }}
16:52 cmarzullo https://gist.github.com/cmarzullo/06b56e4a2bb1c61f4bacf0c9c6a501f2
16:52 cmarzullo that'd be what's in pillar.
16:54 KingOfFools cmarzullo: meh, that would not work for me, im using py for pillar renderer
16:54 lero joined #salt
16:55 KingOfFools cmarzullo: i guess i need to find out what that thing do in yaml(?)
16:55 cmarzullo Ahhh. Haven't done a pillar py renderer yet.
16:56 KingOfFools cmarzullo: btw in pillar it looks good, newlines translated to \n symbols when I pass variable to template
16:58 fxdgear joined #salt
16:58 babilen KingOfFools: Could you paste an example of your state and pillar?
16:58 SaltyVagrant joined #salt
17:01 lovecraftian joined #salt
17:07 pipps joined #salt
17:08 fxhp joined #salt
17:09 sergeyt joined #salt
17:09 sjmh joined #salt
17:11 KingOfFools babilen: its kinda hard to show my pillar since it renderers with py from mysql data :)
17:12 sp0097 joined #salt
17:15 sh123124213 joined #salt
17:15 jaybocc2 joined #salt
17:18 KingOfFools babilen: but when i do pillar.get variable it looks good with normal multilining. But when I pass it to file.managed as defaults: variable: pillar_variable, all newlines changed to \n
17:19 babilen KingOfFools: Does the pillar content represent the entire content of the managed file?
17:20 KingOfFools babilen: yes
17:20 ptitdoc joined #salt
17:20 KingOfFools babilen: its ssl certificate :)
17:20 babilen Could you try using - contents_pillar: 'path:to:pillar_variable' in lieu of defaults?
17:22 DEger joined #salt
17:27 Taxz joined #salt
17:27 KingOfFools babilen: i guess i could for testing purposes, but im getting lots of data from pillar and generating lots of web server files from that. Would be bad if a go to pillar each time.
17:28 babilen Well, lets see if that behaves differently
17:28 ap000ca joined #salt
17:28 babilen Obviously the newlines are being interpreted as literal \n at one point
17:28 ronnix joined #salt
17:29 DanyC joined #salt
17:30 nini joined #salt
17:32 nini Greetings! I am trying to get  salt (latest from github) to run on CentOS 7 using the rh-python35 software collection. I'm not having much luck getting it to work, though.
17:33 nini The error I'm getting is: https://gist.github.com/ninz/3f66eea8ded9956e260eb7ece0421d55
17:34 nini I can't seem to find any documentation on how to run saltstack with python 3, although it apparently does run on python 3, and the unit tests don't pass. Is that correct?
17:34 babilen nini: Not familiar with CentOS packaging, but why did you choose that over http://repo.saltstack.com/#rhel ?
17:35 DEger joined #salt
17:35 babilen My impression was also that Salt is not quite yet ready to run on Py3 completely even though they made tremendous progress in that regard
17:35 nini I tried that first, and got the same error, so that's why I decided to try with a newer salt version from github, to see if it would run.
17:36 babilen You get exactly the same error?
17:36 nini yes
17:36 nini the TypeError
17:37 Edgan I think the 2016.9 release is supposed to make python3 first class
17:37 nini Edgan: is that the upcoming release?
17:37 Edgan nini: yes, technically public, but I found it buggy
17:38 babilen nini: Are you running that with py3 too?
17:38 babilen I wonder how you managed to get that exception on python2.7
17:38 nini babilen: yes, with the software collections python 3.
17:38 babilen Well ... use py2.7 for now
17:39 nini lol
17:39 nini so there is no public documentation on running at least a development environment with python 3 yet?
17:39 Kakwa_ I've an issue with a PR on the salt formula in github (https://github.com/saltstack-formulas/salt-formula/pull/259)
17:39 saltstackbot [#259][OPEN] make the configuration of engines specific to master or minion | the engines are now configured using the following pillars:...
17:39 babilen Did you specifically configure it to use Python 3 or was that the standard behaviour after installing the packages from the official repositories?
17:39 Kakwa_ is herisanu here?
17:40 babilen nini:           ^^^
17:40 Kakwa_ I'
17:40 sergeyt left #salt
17:40 bantone joined #salt
17:40 nini babilen: I configured it to use python 3. It's quite possibly why it's not working because I had to fiddle around with things
17:40 babilen nini: That seems to be the case. Is using Python 2.7 not an option for you?
17:41 KingOfFools babilen: hehe, this works for me. Looks ugly but still :D http://pastebin.com/raw/ar6gbcpd
17:41 babilen Yeah, pastebin.com is always ugly
17:41 nini we are trying to move our systems to python 3, and salt is the last remaining obstacle. I was checking out https://github.com/saltstack/salt/issues/11995 and it seems as though saltstack is almost ready for python 3, which is why I was testing out a new server with it.
17:41 saltstackbot [#11995][OPEN] Python 3 Support | Salt is currently not compatible with python 3. Ubuntu trusty and above default to using python 3, so it would be really nice to be able to run salt in the default python version.
17:41 babilen KingOfFools: So contents_pillar did not work?
17:42 babilen nini: Well, I can only encourage you to report that particular problem .. Salt will be there very soon, but I don't think that you can switch just yet.
17:42 KingOfFools babilen: didnt try yet
17:42 babilen KingOfFools: Ah, I was waiting for that before continuing :)
17:42 KingOfFools babilen: I'll try now, gimme few minutes
17:43 nini babilen: okay. So there is not really any documentation for testing saltstack with python3 yet, aside from the open issue?
17:43 babilen KingOfFools: It's okay. I was just curious where in the process the conversion happens. If you are happy with your solution I am happy.
17:44 babilen nini: I can't tell you. I am watching that issue and will be a happy panda the day they release a py3 compatible Salt version, but my impression was (and is) that that day is not today
17:44 DEger joined #salt
17:44 nini babilen: okay. No problem. I will continue to mess around with it and see if I can get it to work :)
17:44 nini thanks
17:45 babilen Please report that bug so that salt upstream has a chance to fix it
17:45 babilen Good luck! :)
17:45 nini babilen: will do! thanks
17:45 TSP_ joined #salt
17:46 KingOfFools babilen: I think it happens in YAML of state file. When I pass  variable to file.managed defaults with jinja, YAML interprets jinja variable to text and since theres no pipe symbol ('|') it changes all new liines to '\n'. I think somethink like that
17:47 jas02 joined #salt
17:47 babilen KingOfFools: So you really can't paste the state you used earlier?
17:47 babilen (and does that mean that contents_pillar works?)
17:48 KingOfFools babilen: it looked exactly the same but without pipe ('|') and | indent (12) in jinja variables
17:48 babilen KingOfFools: Ah, does it work if you use that with |yaml_encode ?
17:49 pipps joined #salt
17:49 KingOfFools babilen: what's the syntax? - defaults: argument: {{ variable | yaml_encode }}?
17:49 babilen *nod*
17:49 babilen Well, I typically use {{ foo|bar }}
17:50 babilen But as this is a multiline string you might have to use the : | ... |indent(...) variation
17:51 babilen Because why don't we convert a Python string to YAML only to parse it back?
17:51 babilen Might actually be easier to just write that state in #!py also :)
17:52 babilen In this case I'd use contents_pillar though
17:53 ronnix_ joined #salt
17:56 pipps joined #salt
17:57 jaybocc2 joined #salt
17:57 KingOfFools babilen: looke like {{ blabla | yaml_encode }} works too. And looks prettier :D Thanks!
17:57 KingOfFools *looks
18:02 ronnix joined #salt
18:03 MikaT joined #salt
18:05 ronnix_ joined #salt
18:06 babilen KingOfFools: Great :) -- See https://docs.saltstack.com/en/latest/topics/jinja/index.html#filters for documentation
18:07 KingOfFools babilen: alrighty. Thanks!
18:08 ronnix joined #salt
18:11 ronnix joined #salt
18:12 ozux joined #salt
18:13 nZac joined #salt
18:14 ronnix joined #salt
18:16 om2 is there a way to take a list from 'ls /dir/' and make an array to parse a for loop into a jinja2 template?
18:16 om2 ls would run on salt-minion fs
18:18 subsignal joined #salt
18:19 om2 I have this so far:  https://gist.github.com/andrebron/a60c883a9512bcc7c856726e242cdb12
18:19 om2 I don't think its proper syntax... any pointers?
18:22 om2 maybe {% for clientsftponly_users in salt['cmd.run']('ls /home/sftp/') %}   ?
18:23 debian112 Can someone help me with saltmine? I am trying to get the IP address of a host:
18:23 debian112 {{ salt['mine.get']('server2.com', 'network.ip_addrs').items() }}
18:23 debian112 try to get it in a state file?
18:24 sleblanc debian112, imho it's a catch-22; if you want to rely on static addresses, use static addresses; otherwise, use domain names
18:25 misconfig joined #salt
18:25 debian112 static addresses are unknown until the server is built
18:26 debian112 the servers are in the public cloud
18:26 gtmanfred debian112: what are you getting back from that that you don't like?
18:26 Sketch why is http.query such a bitch
18:27 Sketch text: {"result": "Expecting ',' delimiter or '}': line 1 column 94 (char 93)", "result_code": 1}
18:27 Sketch that would be a lot more useful if it actually gave me the entire line, and not just the last bit
18:27 Sketch since if i pass what has to be be exactly the same data with curl, i don't get an error.
18:27 debian112 gtmanfred: this works fine https://paste.debian.net/857655/
18:27 Satyajit joined #salt
18:27 debian112 I can get the ip on the command line
18:28 Sketch guess i'll just use cmd.run on curl...
18:28 debian112 but now I am trying to use a state file to get the ip, and update a jinja template
18:28 DanyC joined #salt
18:29 Tanta what do you need the IP for
18:29 gtmanfred debian112: why are you using items? that is for a dictionary
18:29 debian112 it runs and come back blank in the file
18:29 gtmanfred you are getting a list back from network.ip_addrs
18:29 Tanta what are you using the IPs for
18:29 gtmanfred also, i can't open your paste
18:29 debian112 hazel cast cluster
18:29 Tanta sometimes you should just ask about your goal and not your horrible solution
18:29 Tanta other ppl will have better solutions
18:30 gtmanfred debian112: {{ salt['mine.get']('server.com', 'network.ip_addrs')['server.com'][0] }}
18:30 nZac joined #salt
18:33 blue_ joined #salt
18:34 q1x joined #salt
18:35 sgo_ joined #salt
18:39 debian112 so the goal is that the minions need to get the ip addresses of all the servers.  let me try that: gtmanfred
18:41 jhauser joined #salt
18:41 gtmanfred yeah, iterate across it like a dictionary in python, and do a for loop
18:42 Sketch ha...that was the whole output.  i thought the error was coming from salt, but it was actually coming from the webapp.
18:44 om2 when I loop with salt['cmd.run']('ls /dir') I get the results as an array of values assigned by each character and not by each item...  Any ideas to make this work?
18:45 gtmanfred yeah, do a split on \n, otherwise it is a string
18:45 onlyanegg joined #salt
18:45 om2 so, instead of ls /dir result being file1,file2,file3,  I get f,i,l,e,1,f,i,l,e,2,f,i,l,e,3 in the array
18:46 om2 oh
18:46 gtmanfred it isn't an array, it is just a string
18:46 gtmanfred so you need to split on \n first
18:47 jas02 joined #salt
18:48 felskrone joined #salt
18:53 DanyC joined #salt
18:54 joe joined #salt
18:54 DanyC joined #salt
19:01 rogi joined #salt
19:02 rogi I'm trying to grab a token from docker swarm manager (cmd output) and pass it to other nodes, whats the preferred way to pass such variables around?
19:03 om2 thanks gtmanfred
19:04 gtmanfred np :)
19:04 gtmanfred rogi: you could use an external pillar, the salt mine, or publish.publish
19:05 rogi know of any examples in docs?
19:05 gtmanfred nope
19:05 gtmanfred the best would probably be writing your own customer ext_pillar
19:05 gtmanfred that looks for the swarm manager, then does the call, the puts that pillar on all minions that are going to be in the docker swarm
19:06 gtmanfred s/customer/custom
19:07 rogi ok, I'll read up on that thanks
19:11 lero joined #salt
19:15 bluenemo joined #salt
19:15 misconfig joined #salt
19:16 bluenemo hi guys. i'm trying to use pkg.installed to download a .deb file from github and the state gives me https errors: http://paste.debian.net/857660/ I'm on ubuntu 14.04, salt 2016.3.3
19:17 ptitdoc joined #salt
19:17 gtmanfred can you curl the file down on that system?
19:17 gtmanfred also, which version of debian are you on?
19:21 s_kunk joined #salt
19:22 DanyC_ joined #salt
19:23 fredvd joined #salt
19:24 nineteen joined #salt
19:24 pipps joined #salt
19:24 jas02 joined #salt
19:27 adelcast joined #salt
19:28 pcn Can the protocol version for the dockerio or dockerng states be set?  Trying to use environ.setenv doesn't seem to do what I need
19:29 DanyC joined #salt
19:32 gtmanfred do you mean the api version?
19:32 mohae_ joined #salt
19:32 pcn yeah
19:33 gtmanfred pcn: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.dockerng.html#configuration-options
19:33 gtmanfred docker.version in your configs
19:33 gtmanfred can also be set in the pillar data, since this uses config.get
19:33 pcn Aha, thanks, i didn't see that for some reason
19:33 gtmanfred no problem :)
19:34 jhauser joined #salt
19:34 pcn Ah, I had the states docs open, needed the module
19:34 toanju joined #salt
19:34 gtmanfred yar, usually the modules docs hold the information on setting the stuff up for the states, just as an fyi for the future :)
19:35 pcn TBH I feel like having the documentation separated this way, and not cross-linked, is kind of user-unfriendly
19:37 gtmanfred there are a bunch that are cross linked, but sometimes they don't get crosslinked when the creator of the module writes the docstrings
19:37 gtmanfred but yes, i agree
19:37 gtmanfred we need to have another doc sprint day
19:38 misconfig joined #salt
19:40 sh123124213 ahm, I'm trying to setup -> 2 masters connected to 2 syndics connected to 2 minions
19:41 sh123124213 when I do test.ping from the syndics all works fine
19:41 sh123124213 when I do test.ping from the masters one of them gets double results
19:42 gtmanfred are the syndics each connected to both minions, or are they connected to 2 different minions?
19:44 sh123124213 yes
19:44 sh123124213 both minions
19:45 sh123124213 gtmanfred: also, the syndics master pub and priv key is the same
19:46 sh123124213 now both masters report double results :(
19:47 sjoerd_ joined #salt
19:48 sh123124213 should the syndics have the same pub key in master ?
19:48 sjoerd_ Hi all, so I'm still having a fight with package dependencies from yum. I got it to work like this: http://pastebin.com/1d2FudKR - but the enablerepo line bugs me because those repos are enabled by default anyway. Does anyone know what I'm doing wrong
19:49 gtmanfred sh123124213: i actually don't know, i havent' used syndic or multimaster at all
19:49 gtmanfred sh123124213: it may be better to ask this question on the salt-users google group
19:50 DammitJim joined #salt
19:52 pipps joined #salt
19:53 rogi gtmanfred: would it be a bad idea to set_key on redis for things like the token and # of service nodes to bring up in swarm?
19:53 gtmanfred i mean, if you password protect redis, and then don't make it publically accessable, i don't see why not
19:56 pipps joined #salt
19:56 Nahual joined #salt
20:01 sjoerd_ /ignore #salt JOINS PARTS QUITS NICKS
20:01 sjoerd_ woops
20:04 sjoerd_ Does anyone know what's wrong with my state file that I linked 15 min ago?
20:07 gtmanfred odd, i don't have any extra dependencies coming with nginx
20:07 gtmanfred http://ix.io/1ts5
20:08 ecdhe joined #salt
20:09 lero joined #salt
20:09 gtmanfred sjoerd_: ^^
20:09 sjoerd_ Indeed, but when I remove the enablerepo line salt doesn't find nginx even though I've got the repo enabled by default
20:09 gtmanfred can you do just yum install -y nginx ?
20:09 sjoerd_ yup, that works fine
20:10 gtmanfred can you try running the state with `-l debug` and see if it gives any error messages?
20:12 DammitJim joined #salt
20:14 sjoerd_ Well I'll be darned...
20:14 gtmanfred :)
20:14 heewa joined #salt
20:14 sjoerd_ I could have sworn it was giving me trouble this afternoon
20:15 gtmanfred computers are afraid of my wrath
20:15 sjoerd_ Is salt clever enough to refresh the yum/rpm cached info when I add a new repo?
20:15 gtmanfred it should be
20:15 sgo_ joined #salt
20:15 manji it does
20:16 heewa Does anyone have a workflow for multiple people at a company working on salt configs without disrupting the regular production one? Like, if the files are in git on the master branch, and PersonA is working on their branch, can they get one minion to `state.apply` from their files? I tried environments and file_roots, but I’m not sure how to set it up in a clean, usable way.
20:17 sjoerd_ Well cheers guys, I'll have another stab at things tomorrow
20:20 sjoerd_ heewa: how about they spin up a vm in vagrant?
20:21 heewa I set that up for local dev. But at some point there stuff you can’t try unless it’s on a real server. And I know you should try to “get it right before running in prod”, but realistically this kinda work often involves cycles of trying it out and tweaking until you get it right.
20:22 heewa So, I’d love something like tweaking confs, rsync to salt master to a user-specific dir, and then something like `salt ‘id’ state.apply file_roots=heewa`
20:22 gtmanfred at my old job, we had one environment for dev, one for preprod, and one for prod, and we just took turns working on dev/preprod
20:23 sjoerd_ we've got the same where I am, dev preprod/UA and prod
20:23 heewa Do you mean the terminology salt uses for “environment”? Cuz then don’t you have to duplicate `top.sls` for states & pillars (making sure you didn’t get out of sync with `prod` enviornment’s) each time?
20:23 sjoerd_ dev they can mess around all they like, preprod/UA is more beta-y.
20:23 gtmanfred we had it all duplicated in top.sls
20:24 gtmanfred and you had to make the changes in dev first, and then merge to preprod and then prod in git
20:24 gtmanfred and we managed it all like any other git repo
20:24 gtmanfred alternatively, you could manage everything different thing in different formulas, and tie them together on the master
20:24 sjoerd_ ^ that :)
20:25 sjoerd_ and you could do the vagrant bit before hitting the first layer of dev
20:25 gtmanfred i forget who does that, but they did a nice talk about it at saltconf
20:25 gtmanfred and they had a testing suite that ran all the formulas once an hour
20:25 heewa That works.. I just worry that there’s stuff you need to change & revert that’s not part of the diffs of your actual change, in order to get things to work. Like modifying top.sls, or adding/merging formulas.
20:26 sjoerd_ you can always make snapshots of the vm's automatically and revert as needed. Or perhaps LVM snaps
20:26 gtmanfred snapper roll back was coming somewhere to rollback states, but i think it only works on suse
20:26 heewa I’m flirting with the idea of running multiple salt master procs on the same box on different ports, with their `base` env pointed at different dirs. So someone can ask a minion to talk to their personal salt master. Thoughts?
20:27 west575 joined #salt
20:27 heewa Cuz then only that one run of that one minion will use their stuff, while others are unaffected. But also their configs can be only the diffs from prod that they actually change, not any extra stuff to make targetting work.
20:28 heewa I only wish `salt-call` or `salt` had a cmdline config option to override master host.
20:28 subsignal joined #salt
20:29 sjoerd_ it looks for the host "salt" in dns by default
20:29 sjoerd_ you could mess with the hosts file to fake a diff master
20:29 heewa Oof! I’d be worried about missing the cleanup. Like either from human error, or if the script that did it failed to clean up for whatever reason.
20:29 gtmanfred https://www.youtube.com/watch?v=_GblO1kvKew&feature=youtu.be&list=PL9svBjLDUl_-sVwcRliUQ-VGDb2qvwpx_&t=52m
20:29 gtmanfred this guy
20:30 heewa sweet, I’ll watch that, thanks
20:31 sjoerd_ heewa: you could write a nagios (or whatever) check to see that there is no fake master on your server that is older then X
20:31 gtmanfred here is one of the guys that works with him talking about how they deploy mesos https://www.youtube.com/watch?v=8-3FBy1mP74
20:31 gtmanfred i can't remember which one they talk about running their tests against their salt formulas
20:31 gtmanfred but it is from the virtustream guys
20:32 heewa That’s cool! I do a very very dirty, minimal check in CI of salt confs.. kinda..
20:33 gtmanfred yeah, but that is IMO the best way to do it if you really want more people working on different stuff at the same time, split everything into formulas
20:33 heewa Something like `salt-call state.show_highstate --local --retcode-passthrough --config-dir=$PWD/.salt_lint/` where that conf dir contains a minion conf that can run in the CI env
20:33 jhauser joined #salt
20:33 gtmanfred esp with spm available now and being able to package formulas into balls that can be installed on the master
20:33 heewa Which doesn’t actually _run_ salt, but would catch really obvious stuff like templating errors, in _some_ cases (obviously not in grain/minion-specific scenarios)
20:34 gtmanfred yar
20:34 gtmanfred better than most do :P
20:37 _JZ_ joined #salt
20:38 sjmh joined #salt
20:42 beowuff joined #salt
20:43 tvinson is there something in the firewalld execution module appropriate for determining whether firewalld is enabled? i guess i could use firewalld.default_zone and check for error messages. i feel like there should be a firewalld.state that just calls firewall-cmd --state
20:44 jimklo joined #salt
20:46 bryang joined #salt
20:47 misconfig joined #salt
20:48 geomacy joined #salt
20:48 pcn Has anyone used the environment: [ "foo=bar" ] format with dockerng?  Trying to do that in a template is blowing up on me, even though the state.show_sls looks like what the documentation describes
20:49 heewa joined #salt
20:50 pcn It keeps telling me "Invalid environment configuration. See the documentation for proper usage."
20:52 pcn Trying to use the key: value syntax turns what I'm passing in into a "must be a string" error.
20:55 jenastar joined #salt
20:57 Rolypoly joined #salt
21:07 godber joined #salt
21:08 godber left #salt
21:09 godber joined #salt
21:11 jimklo joined #salt
21:20 nineteen joined #salt
21:29 nineteen joined #salt
21:30 jimklo joined #salt
21:42 heewa joined #salt
21:50 nineteen joined #salt
21:50 jimklo joined #salt
22:09 invalidexception joined #salt
22:10 CeBe joined #salt
22:10 jimklo joined #salt
22:15 jimklo_ joined #salt
22:20 GP_MikeD joined #salt
22:20 GP_MikeD Does anyone know how to test/render a jinja template without pushing the salt config?
22:21 invalidexception joined #salt
22:27 hemebond GP_MikeD: Pushing the config?
22:28 GP_MikeD I mean without running "Salt * ...."
22:28 hemebond And are you talking about the states?
22:28 hemebond Or do you literally mean just a Jinja template?
22:28 hemebond I mean, a Jinja template is just a Jinja template.
22:28 fannet_ joined #salt
22:29 nineteen joined #salt
22:29 hemebond You can import it from a Python console and render it with your own context.
22:29 fannet_ Does anyone know if its possible to share an S3 bucket from our organization to another organization?
22:30 fannet_ or at least a user in the other organization
22:30 ivanjaros joined #salt
22:30 hemebond fannet_: Not really a Salt question there.
22:31 hemebond S3 buckets support lots of authentication methods; including bucket policies.
22:31 fannet_ LOL sorry had multiple tabs open
22:31 Ch3LL GP_MikeD: maybe not what you are looking for but what about state.show_sls?
22:43 Eugene fannet_ - http://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example2.html ;-)
22:44 fannet_ haha thanks - I found my problem , it was the 'requester pays' option - this requires the client to have additional headers when requesting data from s3
22:48 cyborg-one joined #salt
22:49 daemonkeeper joined #salt
22:49 nineteen joined #salt
22:51 systo joined #salt
22:52 GP_MikeD hemebond: Thanks for your reply. I didn't know if it would still render pillars and such within a python console. I suppose I wouldn't be able to do this on a non-salt server due to the requirement of the pillars
22:53 rogi joined #salt
22:54 hemebond It won't render anything automatically if you just do it via a Python console and the Jinja API. As Ch3LL said, if you just want to see what the final state render will be, then you can probably use show_sls.
22:57 GP_MikeD OK. I'll look into the show_sls. Basically, I'm trying to insert some grain value (IP address) using network.ip_addrs and it keeps failing to render. Therefore, instead of running the salt each time I make a change, I want to see if I could render the template and have it tell me if the syntax is OK and possibly the output.
22:58 hemebond How are you applying the grains?
22:58 hemebond Normally you can just throw them into the Pillar data.
22:59 nineteen joined #salt
23:00 GP_MikeD Well, you don't normally use the IP address as a pillar. Instead you grab the IPs via grains.
23:01 hemebond I mean to actually set the grain. I didn't realise you were just trying to use one of the existing grains.
23:03 hemebond If you put the templating into a pillar you can just do pillar.items or pillar.get to check the result.
23:03 hemebond Then put the fixed templating back into your state.
23:06 Edgan joined #salt
23:09 nineteen joined #salt
23:12 pipps joined #salt
23:17 jimklo joined #salt
23:21 amontalban joined #salt
23:23 BattleChicken left #salt
23:28 amontalban joined #salt
23:29 nineteen joined #salt
23:30 sh123124213 joined #salt
23:33 futuredale joined #salt
23:35 nini joined #salt
23:35 teryx510 joined #salt
23:38 nineteen joined #salt
23:40 nicksloan joined #salt
23:48 nineteen joined #salt
23:59 debian112 joined #salt

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