Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-09-22

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

All times shown according to UTC.

Time Nick Message
00:02 pratikmallya joined #salt
00:02 hal58th murrdoc, I feel your pain. Got a bug with pkg.latest thats fixed in 2015.5.5
00:03 hal58th trisell you use pillar and a jinja for loop to put the static ips into your file
00:04 bhosmer joined #salt
00:05 dthom91 joined #salt
00:10 teebes joined #salt
00:11 awpti joined #salt
00:12 Heartsbane joined #salt
00:13 bfoxwell joined #salt
00:14 clintberry joined #salt
00:15 LtLefse joined #salt
00:15 phpdave11 joined #salt
00:16 Riz joined #salt
00:16 Starrr joined #salt
00:17 jfred joined #salt
00:17 canci joined #salt
00:18 iggy hal58th: throw the pkg module from 2015.5.5 into /srv/salt/_modules ?
00:19 hal58th I didn't know you could do that. But it's not very feasible with the multiple environment deployment strategy that I currently use.
00:20 iggy yeah, _modules/_states/etc overrides built-ins
00:21 ahale joined #salt
00:21 chitown joined #salt
00:22 dh_ joined #salt
00:24 FredFoo joined #salt
00:25 keekz joined #salt
00:26 pravka joined #salt
00:26 tru_tru joined #salt
00:26 simmel joined #salt
00:26 Cottser joined #salt
00:27 GreatSnoopy joined #salt
00:29 breakingmatter joined #salt
00:37 ajw0100 joined #salt
00:39 bhosmer joined #salt
00:44 numkem joined #salt
00:47 knite what does a - do in {%- ... %} vs a plain {% ... %}? can't find the answer in docs...
00:48 whytewolf knite: http://jinja.pocoo.org/docs/dev/templates/#whitespace-control
00:48 knite thanks!
00:50 teebes joined #salt
00:52 hasues joined #salt
00:52 hasues left #salt
00:59 sbogg joined #salt
01:03 clintber_ joined #salt
01:09 bhosmer joined #salt
01:14 kevin-wk left #salt
01:15 rocket joined #salt
01:19 phw_ joined #salt
01:19 zmalone joined #salt
01:20 subsignal joined #salt
01:22 untamo13 joined #salt
01:27 GrueMaster joined #salt
01:30 rocket joined #salt
01:30 otter768 joined #salt
01:35 catpiggest joined #salt
01:36 zmalone joined #salt
01:41 bhosmer joined #salt
01:47 breakingmatter joined #salt
01:47 Bryson joined #salt
01:51 charli_ joined #salt
01:53 kusams joined #salt
02:02 rocket joined #salt
02:05 ITChap joined #salt
02:13 bhosmer joined #salt
02:17 otter768 joined #salt
02:19 malinoff joined #salt
02:23 otter768 joined #salt
02:24 breakingmatter joined #salt
02:37 opensource_ninja joined #salt
02:37 bhosmer joined #salt
02:39 jbrnds joined #salt
02:39 stupidnic joined #salt
02:41 ajolo joined #salt
02:42 sarlalian joined #salt
02:44 Zytox_ joined #salt
02:45 kermit joined #salt
02:46 Cottser joined #salt
02:55 bhosmer joined #salt
02:56 Arbusto joined #salt
02:56 evle joined #salt
03:04 jmreicha joined #salt
03:04 zsoftich joined #salt
03:05 mapu joined #salt
03:07 bhosmer joined #salt
03:09 pentabular joined #salt
03:09 SheetiS joined #salt
03:11 zwi joined #salt
03:12 favadi joined #salt
03:15 trisell joined #salt
03:19 pratikmallya joined #salt
03:22 malinoff joined #salt
03:23 neogenix joined #salt
03:24 clintberry joined #salt
03:28 bhosmer joined #salt
03:29 fxhp joined #salt
03:40 ageorgop joined #salt
03:46 malinoff joined #salt
03:48 mosen joined #salt
03:49 Furao joined #salt
03:58 writteno1 joined #salt
03:58 bhosmer joined #salt
04:01 Starrr left #salt
04:04 favadi joined #salt
04:04 Akhter joined #salt
04:07 Furao joined #salt
04:13 Akhter joined #salt
04:19 orion203 joined #salt
04:19 PeterO_ joined #salt
04:19 subsignal joined #salt
04:22 Furao joined #salt
04:25 Furao joined #salt
04:25 breakingmatter joined #salt
04:33 Furao joined #salt
04:37 Furao joined #salt
04:37 kusams_ joined #salt
04:42 stanchan joined #salt
04:42 bhosmer joined #salt
04:52 Furao joined #salt
04:53 ageorgop joined #salt
04:54 bhosmer joined #salt
04:54 rdas joined #salt
05:00 lahwran joined #salt
05:01 krymzon joined #salt
05:01 subsignal joined #salt
05:02 anmol joined #salt
05:02 ageorgop joined #salt
05:03 Arbusto joined #salt
05:07 pcdummy joined #salt
05:10 sbogg joined #salt
05:21 jackjones joined #salt
05:22 ageorgop joined #salt
05:29 bhosmer joined #salt
05:36 aristedes1 joined #salt
05:42 felskrone joined #salt
05:48 aparsons joined #salt
05:54 clintberry joined #salt
05:59 laax joined #salt
06:00 colttt joined #salt
06:09 lb1a joined #salt
06:10 Furao joined #salt
06:11 otter768 joined #salt
06:12 malinoff joined #salt
06:15 bhosmer joined #salt
06:21 katyucha joined #salt
06:23 dopesong joined #salt
06:27 breakingmatter joined #salt
06:29 Furao joined #salt
06:34 svinota joined #salt
06:37 rdas joined #salt
06:37 forcer joined #salt
06:39 forcer Hello! The state writing documentation mentions that there's a __states__ variable available to state modules, but when I try to use it, I am told it is not defined. What do I need to do to access this variable? Using Salt 2015.5.5.
06:41 edulix joined #salt
06:44 kukacz joined #salt
06:44 auzty joined #salt
06:45 Ztyx joined #salt
06:45 elsmo joined #salt
06:49 dh joined #salt
06:52 krymzon joined #salt
06:57 harkx joined #salt
06:59 stanchan joined #salt
06:59 Furao joined #salt
07:00 bhosmer joined #salt
07:01 KermitTheFragger joined #salt
07:03 rubendv joined #salt
07:03 rubendv joined #salt
07:06 kusams joined #salt
07:08 kawa2014 joined #salt
07:09 GreatSnoopy joined #salt
07:10 vvoody joined #salt
07:11 hoonetorg hi, is there a way to show a rendered pillar.sls file?
07:11 Arbusto joined #salt
07:12 Ztyx joined #salt
07:12 elsmo joined #salt
07:13 larsfronius joined #salt
07:16 Grokzen joined #salt
07:18 pbrooko joined #salt
07:18 |Trend| joined #salt
07:20 Ztyx joined #salt
07:22 markm joined #salt
07:22 chiui joined #salt
07:26 pratikmallya joined #salt
07:29 Ztyx1 joined #salt
07:33 aw110f joined #salt
07:36 aw110f_ joined #salt
07:39 Ztyx joined #salt
07:39 pbrooko joined #salt
07:43 Tritlo joined #salt
07:43 SteamWells joined #salt
07:43 Phtes joined #salt
07:43 lkannan joined #salt
07:43 antonw joined #salt
07:43 EWDurbin joined #salt
07:44 akafred joined #salt
07:44 copelco joined #salt
07:44 m0nky joined #salt
07:44 bhosmer joined #salt
07:46 Ztyx left #salt
07:49 CeBe joined #salt
07:49 thalleralexander joined #salt
07:49 ramishra joined #salt
07:50 pbrooko joined #salt
07:52 CeBe1 joined #salt
07:58 markm joined #salt
07:59 Aleks3Y joined #salt
08:01 pbrooko_ joined #salt
08:02 eseyman joined #salt
08:04 OliverMT joined #salt
08:04 Ztyx1 joined #salt
08:07 kusams joined #salt
08:08 linjan joined #salt
08:09 s_kunk joined #salt
08:11 traph joined #salt
08:12 otter768 joined #salt
08:17 clintberry joined #salt
08:21 elsmo joined #salt
08:25 thalleralexander joined #salt
08:26 keimlink joined #salt
08:30 gwmngilfen joined #salt
08:31 bhosmer joined #salt
08:33 Joe__ joined #salt
08:36 pbrooko joined #salt
08:38 nchauvet joined #salt
08:39 permalac joined #salt
08:40 ashb joined #salt
08:43 larsfronius joined #salt
08:44 clintberry joined #salt
08:57 MadsRC joined #salt
09:00 kutenai joined #salt
09:01 djinni` joined #salt
09:07 impi joined #salt
09:07 aristedes joined #salt
09:07 nbari joined #salt
09:07 nbari hi all, how can I  extend the PATH while running a recipie
09:07 aristedes left #salt
09:07 nbari current path 'PATH': '/sbin:/bin:/usr/sbin:/usr/bin' but I want to add /usr/local/sbn
09:07 nbari I mean /usr/local/sbin
09:07 nbari any ideas ?
09:08 Ztyx1 left #salt
09:12 Arbusto joined #salt
09:15 bhosmer joined #salt
09:16 LM317 joined #salt
09:21 mihait joined #salt
09:22 LM317 hey, is there a way to make watch_in optional? e.g. i have a java sls that contains a watch_in for something in a tomcat sls, but not every minion i install java on necessarily also uses tomcat
09:23 LM317 or am i required to use a watch inside the tomcat sls instead
09:25 oherrala Dunno if it's the correct solution but wrap the watch_in with Jinja
09:27 bhosmer joined #salt
09:33 LM317 cool idea! now i just need to figure out how to use jinja if a state is present
09:33 LM317 how to determine if a state is present*
09:35 larsfronius joined #salt
09:37 larsfronius joined #salt
09:42 N-Mi joined #salt
09:43 denys joined #salt
09:43 nbari left #salt
09:46 hillna joined #salt
09:46 collinanderson joined #salt
09:46 shawnbutts joined #salt
09:46 frankS2 joined #salt
09:47 basepi joined #salt
09:47 Bram___ joined #salt
09:47 Bram___ Hello :)
09:47 czchen joined #salt
09:48 neilf joined #salt
09:48 zerthimon joined #salt
09:48 subsignal joined #salt
09:49 bhosmer joined #salt
09:49 Bram___ i have a questoin about win_update and sls. I want to automatic restart a windows machine when update`s is finish and recheck everything. When no update`s are avaible then stop the job.
09:50 lietu joined #salt
09:50 akoumjian joined #salt
09:50 Striki joined #salt
09:51 munhitsu joined #salt
09:51 thalleralexander joined #salt
09:51 davedash joined #salt
09:51 lietu I'd like to use salt to ensure /etc/openvpn/ipp.txt is present and is owned by nobody:nobody, but I don't want it to touch the contents once it has been created .. what state would work for this? afaik file.managed manages contents, file.touch didn't seem to have ownership
09:51 JonGretar joined #salt
09:52 goki joined #salt
09:52 lietu oh hm, "If source is left blank or None, the file will be created as an empty file and the content will not be managed." .. that should mean that file.managed should work for me
09:52 supermike__ joined #salt
09:52 gazarsgo joined #salt
09:52 NachoDuck joined #salt
09:52 twodayslate joined #salt
09:53 LyndsySimon joined #salt
09:53 wiqd joined #salt
09:53 bbhoss joined #salt
09:53 moderation joined #salt
09:53 mattl joined #salt
09:54 tcolvin joined #salt
09:54 CaptTofu joined #salt
09:54 simonmcc joined #salt
09:54 LinuxHorn joined #salt
09:54 Norrland lietu: try a different file first. "echo foo > /etc/test.txt"
09:55 chiui joined #salt
09:55 mikepea joined #salt
09:55 Norrland lietu: then use file.managed to set permissions.
09:55 felskrone lietu: have a look at requisites and only_if
09:55 codekobe joined #salt
09:55 grepory joined #salt
09:56 akitada joined #salt
09:56 bstaz joined #salt
09:57 imanc joined #salt
09:58 kusams joined #salt
09:58 ramblinpeck joined #salt
10:00 doriftoshoes joined #salt
10:00 abele joined #salt
10:00 JordanRinke joined #salt
10:01 armyriad joined #salt
10:06 lietu thanks
10:13 otter768 joined #salt
10:19 giantlock joined #salt
10:21 cberndt joined #salt
10:25 thalleralexander joined #salt
10:29 breakingmatter joined #salt
10:31 bhosmer joined #salt
10:46 favadi joined #salt
10:48 Bram___ Somebody can help me so i`ll look in the right direction ?
11:04 fredvd joined #salt
11:05 bhosmer joined #salt
11:11 felskrone1 joined #salt
11:12 breakingmatter joined #salt
11:19 agend joined #salt
11:33 subsignal joined #salt
11:39 subsignal joined #salt
11:47 kusams joined #salt
11:48 bhosmer joined #salt
11:59 DammitJim joined #salt
12:00 quasiben joined #salt
12:00 bhosmer joined #salt
12:04 evle joined #salt
12:05 DammitJim does mount.mounted edit the fstab?
12:07 diudara joined #salt
12:10 diudara hi guys. I have a pillar which is used to determine packages to be installed by a state. I have an if statement with "or" in order to include multiple logics but its not worling
12:10 diudara http://justpaste.it/nwdp
12:10 diudara {% if ("testserver" or "mainserver" or "serverX") in salt['grains.get']('roles') %}
12:10 diudara if i use the above statement on a server "testserver" it works
12:11 diudara but if it is used on server "mainserver" is not
12:11 forcer diudara: ("testserver" or "mainserver" or "serverX") evaluates to "testserver"
12:11 JDiPierro joined #salt
12:12 diudara @forcer hmmm..yes you are right...it finds the first matching and then continues
12:14 otter768 joined #salt
12:16 TyrfingMjolnir joined #salt
12:16 diudara but how do you actually achieve this?
12:16 diudara if grain value contains any of the following values?
12:18 kawa2014 joined #salt
12:18 forcer Diaoul: {% set roles = salt["grains.get"]("roles", []) %} {% if "testserver" in roles or "mainserver" in roles or "serverX" in roles %} works. You can also do set magic if your lists get too long.
12:20 bhosmer joined #salt
12:26 ikarpov joined #salt
12:32 djinni` joined #salt
12:32 nchauvet left #salt
12:32 diudara @forcer that did the trick !! Thnaks alot buddy
12:36 kusams joined #salt
12:37 forcer diudara: You're welcome :-)
12:37 tmclaugh[work] joined #salt
12:44 impi joined #salt
12:51 favadi joined #salt
12:53 bhosmer joined #salt
12:54 Arbusto joined #salt
12:55 BogdanR joined #salt
12:56 BogdanR Hello
12:56 BogdanR I just upgraded to salt Lithium from an older version and I found out that lines like the floowing don't work with junja templates anymore:
12:56 BogdanR Name = {{ salt['pillar.get']('master:id') }}-fd
12:57 BogdanR If I run "salt '2perf-event2' pillar.get master:id" it returns the data I expect just fine.
12:58 BogdanR This problem only seems to happen in the jinja template
13:01 bhosmer joined #salt
13:02 BogdanR I was able to replace that line which used pillar to use grains but I still think you should know about the issue.
13:02 BogdanR My equivalent line is now:
13:02 BogdanR Name = {{ grains['nodename'] }}-fd
13:06 rocket joined #salt
13:08 DammitJim what should I do when a minion did not return?
13:09 jdesilet joined #salt
13:10 anmol joined #salt
13:12 favadi joined #salt
13:15 kant joined #salt
13:15 pdayton joined #salt
13:16 monkey661 joined #salt
13:16 drawsmcgraw DammitJim: Look for the job in the job_cache
13:17 drawsmcgraw https://docs.saltstack.com/en/develop/topics/jobs/index.html#the-jobs-runner
13:17 drawsmcgraw Specifically, use 'list_jobs" to find the job id (jid), then feed that jid to 'lookup_jid'
13:17 bhosmer joined #salt
13:22 teebes joined #salt
13:22 zwi joined #salt
13:23 DammitJim drawsmcgraw, do you know if file.directory will create subdirectories if the main directory doesn't exist?
13:24 drawsmcgraw DammitJim: I believe it takes a 'createdirs' parameter.
13:24 drawsmcgraw Or something similarly named.
13:24 numkem joined #salt
13:24 DammitJim oh yeah, I just found it
13:24 DammitJim thanks
13:25 aristedes joined #salt
13:25 aristedes joined #salt
13:26 pdayton1 joined #salt
13:26 perfectsine joined #salt
13:27 subsignal joined #salt
13:28 protoz joined #salt
13:30 ctron joined #salt
13:30 ctron oh... it is #salt, not #saltstack :) I was on the wrong channel all this time XD
13:32 shiriru joined #salt
13:34 Arbusto joined #salt
13:34 lootic joined #salt
13:35 lootic Hello! I wonder if you can chain saltcloud providers, like reuse some of the config so you dont need to rewrite it for every provider you want.
13:35 ctron Hi everybody. I have a doubt about "duplicated id's", I am using the following state http://paste.ubuntu.com/12520812/ and I get a "Conflicting ID 'file.managed' " error. As far as I understand, the only thing that should be unique is the state ID, that is the "setup_app_website:"
13:35 lootic Say if I wanht two similar but not identical providers.
13:35 ctron why it is going wrong?
13:35 mapu joined #salt
13:38 krymzon joined #salt
13:38 bhosmer joined #salt
13:38 racooper joined #salt
13:38 pravka joined #salt
13:38 hasues joined #salt
13:39 cpowell joined #salt
13:39 krymzon_ joined #salt
13:39 hasues left #salt
13:40 Arbusto joined #salt
13:41 sunkist joined #salt
13:43 Deevolution ctron: Each top level stanza needs a unique name.  You can have multiple file.managed entries, but you need to put them each under a unique name.
13:44 Deevolution ctron: You could just move the -name: value above the file.managed (indenting it under it) and remove the '-name: ' portion altogether.
13:46 Phil-Work joined #salt
13:46 ctron Deevolution: do you mean I can't file.manage two files (.pem and .cfg) under the same state id?
13:46 Deevolution ctron: Each of the file.managed entries will need a different name.  You can have as many as you want.
13:47 ctron Deevolution: do you mean a different state id? I undestand as 'state id' the 'setup_app_website:' tag I use in the very beginning, may be  I'm wrong
13:48 Deevolution I rewrote your state here: http://paste.ubuntu.com/12521162/
13:48 Phil-Work I have some nodes with a common grain value and I need to get the IPs of all of those nodes in a jinja template - any hints?
13:48 Deevolution That should show what I'm getting at.
13:48 Deevolution You don't actually need the state name at all since it's derived from the file it is in.
13:49 Sps joined #salt
13:50 ctron Deevolution: I readed in the doc that is recommended to use the -name instead to use the file itself as a tag...
13:51 kaptk2 joined #salt
13:51 Deevolution ctron:  That's reasonable.  But you then just need to add a 'title' in place of the path, and put file.managed under it.
13:51 LM317 left #salt
13:51 ctron Deevolution:  so, as far as I understand, every single action needs its own unique 'title' is it right?
13:52 ctron be it because it is unique in the state, be it because you give different titles, isn't?
13:53 Deevolution ctron: That's mostly true.  You can use the same title for some things (i.e. that same title to install a package and manage a service).
13:54 pdayton joined #salt
13:55 ctron ok, I see. I have another doubt about how to tell nginx to restart when I add a new configuration file in the /etc/nginx/sites-enabled folder. The doubt is because I do not want to set a 'watch' in the nginx state (maybe in some servers I do not want it)
13:56 _JZ_ joined #salt
13:57 ctron how can I, in the 'sitedeploy' state, tell nginx service to 'watch' the folder instead to explicitly do a 'service.running -reload'?
13:57 ctron oh, and thank you very much for the previous help! :)
13:58 Deevolution ctron: You're welcome.  And I'm not sure I understand what you're trying to do?  You want nginx to restart when changes occur?  Or you only want some servers to do that?
13:58 perfectsine_ joined #salt
14:00 ctron Deevolution: I'll try to explain: I know how to use 'watch' in the nginx pkg.install. but in (some) servers I want to automatically reload/restart when a new site-config-file appears on the sites-enabled folder. so I apply the nginx installation state to install it, but the 'watch' only to the servers I want. I've read something about watch_in but I am very confused with the dependencies system
14:02 Deevolution ctron:  You want to restart when new files are added via the state?  Or just on the file system?
14:03 berserk joined #salt
14:03 ctron Deevolution: mmm ... I do not see the difference. the file will be added there because a state will place there (in my case), but any of the approaches would do the work :)
14:03 berserk joined #salt
14:04 andrew_v joined #salt
14:04 Deevolution See this: http://stackoverflow.com/questions/23716009/saltstack-in-a-watch-statement-how-do-i-specify-a-directory-where-all-files-sh
14:04 _JZ_ joined #salt
14:04 bhosmer joined #salt
14:07 zmalone joined #salt
14:10 TyrfingMjolnir joined #salt
14:10 Cyis Anyone know of a way to make salt wait to confirm a service is stopped before proceeding?
14:11 pravka joined #salt
14:12 losh joined #salt
14:12 Akhter joined #salt
14:12 protoz joined #salt
14:14 ctron Deevolution:  ok, I undestand the right way to do it is like this: http://paste.ubuntu.com/12521314
14:14 ctron not very sure why the last pkg: nginx but seems it works
14:14 protoz_ joined #salt
14:15 otter768 joined #salt
14:15 malinoff joined #salt
14:16 kusams joined #salt
14:17 djinni` joined #salt
14:19 stephanbuys joined #salt
14:23 Deevolution ctron: That looks more or less correct to me.  The last pkg: entry will restart if the package changes (i.e. version upgrade).
14:24 Arbusto joined #salt
14:26 ctron ok, thank you very much. now I am fighting with a "SLS u'setup-app-website' is not formed as a list".  saltstack yml files are making me grow gray hair XD
14:26 sgargan joined #salt
14:26 Deevolution ctron:  I guess I've gotten quite used to the YAML formatting.  It's pretty readable to me these days, LOL.
14:28 Cyis I've got a case where I'm having a race condition where I'm stopping the service, doing some file deployments than restarting the service but the service isn't completely stopped before restarting it
14:29 jorb joined #salt
14:30 perfectsine joined #salt
14:33 stephanbuys1 joined #salt
14:33 lootic I found what I searched for but with the keyword "extends" I cant make it work. It complains about "if ':' not in extended['provider']:". Theres a longer traceback too that I could pastebin.
14:34 lootic Context is that I try to reuse a profile in other profiles. So its more dry.
14:34 blartftt joined #salt
14:35 kawa2014 joined #salt
14:36 larsfron_ joined #salt
14:36 bhosmer_ joined #salt
14:40 blartftt why do i get this strange output from a salt run when i use a firewalld statement? https://gist.github.com/anonymous/bc9abcb61246e9fce493
14:40 thalleralexander joined #salt
14:40 Cyis is it possible to include another .SLS state file and have the jinja variable from the state file including it accessible?
14:42 Cyis I've had to split a state into 2 so I could reference a different pillar to pull the data but I had several of the common tasks moved into another sls state file that I would include but I had it doing it's own pillar.get call... now with the split I either have to duplicate that file or find a way to pass the variable from the parent
14:42 felskrone joined #salt
14:44 kusams_ joined #salt
14:44 fellex joined #salt
14:47 fellex pssst
14:51 clintberry joined #salt
14:56 bhosmer joined #salt
14:56 bosyak where I can download salt?
14:56 PeterO_ joined #salt
14:57 bosyak can't find link on http://saltstack.com/community/
14:58 teebes joined #salt
14:58 blartftt https://docs.saltstack.com/en/latest/topics/installation/index.html
14:58 blartftt choose your distro
15:00 hoonetorg joined #salt
15:01 bosyak blartftt, thanks
15:01 blartftt np
15:02 kawa2014 joined #salt
15:05 zwi joined #salt
15:08 impi joined #salt
15:14 murrdoc joined #salt
15:15 Arbusto_ joined #salt
15:15 jalbretsen joined #salt
15:18 davisj Cyis: I think 'import with context' may be what you want https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#include-and-import
15:21 Cyis davisj: I think from searching I found it isn't supported but there's a feature request for it
15:24 bhosmer joined #salt
15:26 kusams joined #salt
15:28 Arbusto joined #salt
15:28 h3x3d joined #salt
15:29 pratikmallya joined #salt
15:29 trph joined #salt
15:30 timoguin_ joined #salt
15:31 h3x3d guys, i have a question about yaml syntax in file.managed using this: https://gist.github.com/h3x3d/2f259097b0d398bbf527 the question is - what is the right syntax to use multiline strings in file.managed.contents?
15:31 ajw0100 joined #salt
15:31 polishdub joined #salt
15:32 ageorgop joined #salt
15:33 h3x3d posted gist give's me an error "Rendering SLS 'file_name_here' failed: could not found expected ':'"
15:36 traph joined #salt
15:37 whytewolf h3x3d: you need more indentation.
15:38 h3x3d whytewolf: ty, will try now
15:38 aphor joined #salt
15:38 bhosmer_ joined #salt
15:39 trebortech joined #salt
15:39 h3x3d whytewolf: ty a lot, works now
15:40 edrocks joined #salt
15:40 Arbusto joined #salt
15:41 lietu joined #salt
15:42 cmek can I pass a dictionary to a template in file.managed defaults:?
15:43 khaije|mentat joined #salt
15:43 khaije|mentat Hi all! Is there a way to have multiple 'include:'s in a state?
15:44 Fiber^ joined #salt
15:44 khaije|mentat I'd like to gradually modularize a state (as I test it) but it won't be possible to do it all at once
15:44 murrdoc include:
15:45 murrdoc - one
15:45 murrdoc - two
15:45 murrdoc - three
15:45 kusams joined #salt
15:46 ageorgop joined #salt
15:47 khaije|mentat murrdoc: I'm aware of that option but, last I checked, it's not possible to have more than one 'include:' statement in a file
15:47 murrdoc yup only one in a file
15:48 khaije|mentat I'm shooting for modularity, maybe I could rig up some jinja to insert yaml into a file...
15:49 ageorgop joined #salt
15:49 khaije|mentat s/into a file/into a sls file/
15:51 anotherZero joined #salt
15:58 h3x3d1 joined #salt
16:01 xDamox joined #salt
16:04 malinoff joined #salt
16:07 khaije|mentat joined #salt
16:10 ITChap joined #salt
16:15 Taz_ joined #salt
16:16 otter768 joined #salt
16:16 xMopxShell joined #salt
16:16 edrocks joined #salt
16:18 Taz_ Anyone know you can tell where a state comes from when you run highstate? For example, how would I know which formula is installing a package when there are mutliple formulas applied to a node?
16:19 Phil-Work each state has a unique name
16:19 pratikma_ joined #salt
16:20 Phil-Work you can grep for that in your tree to find the right sls file
16:22 Taz_ thanks Phil-Work
16:22 Taz_ i guess I was thinking more like how puppet does with classes, you can see where a resource comes from because its part of a class structure
16:24 Taz_ I was also trying to cut down on the output from highstates, for example doing a ssh key has a huge identifier with the key itself
16:25 jodv joined #salt
16:26 writtenoff joined #salt
16:27 neogenix joined #salt
16:27 saltycharles joined #salt
16:29 vexati0n joined #salt
16:30 vexati0n hey is there any minion configuration that will cause the minion to restart itself if it hasn't heard anything on the pub port connection for a while?
16:30 vexati0n i have a lot of minions that just 'go dark' and apparently don't realize it
16:33 * rickflare slaps Taz_ around a bit with a large trout
16:33 Taz_ vexati0n: is that on aws?
16:33 aparsons joined #salt
16:35 Bryson joined #salt
16:35 rickflare Taz_ why are you using aws?
16:36 Taz_ i was asking vexati0n. I have had network issues that cause issues with minions timing out and stopping their services
16:36 Taz_ was just wondering
16:37 katyucha joined #salt
16:37 rickflare ahh
16:37 rickflare Taz_ are you a ginger?
16:38 Taz_ LOL
16:38 Taz_ get out of here rickflare
16:38 rickflare LOL
16:42 andrew_v joined #salt
16:43 bhosmer_ joined #salt
16:44 alexlist_ joined #salt
16:44 KyleG joined #salt
16:44 KyleG joined #salt
16:44 Taz_ vexati0n: thats an interesting issue tho, i still have that issue sometimes
16:46 wendall911 joined #salt
16:47 Gareth o/
16:47 knite joined #salt
16:50 tjs joined #salt
16:52 murrdoc _o_
16:52 murrdoc _o|
16:52 murrdoc |o|
16:52 murrdoc \o_
16:52 tjs hi folks.  my co-workers and i are trying to plan out how we are going to start using salt, but we have some basic fundamental issues with salt states and versioning.
16:53 KyleG we store our salt states in git.
16:54 tjs we have an existing system (home-grown) where we specify specific packages for everything, including config bits so that as things change in time, we can go back to a particular state many revs in the past to do A/B testing etc.
16:56 tjs one of my issues with salt states, even storing them in git, is that the states in a specific salt environment on the master is used for every minion in that environment.
16:57 tjs and when we have hundreds of unique services spread across dozens of teams (and thousands of server instances), it's nearly impossible to coordinate all of that ...
16:57 druonysus joined #salt
16:57 druonysus joined #salt
16:58 tjs so maybe i'm just not wrapping my brain around how to manage salt states properly ... or i'm too ingrained on how our existing home-grown system works, but i struggle with how to do development of salt states safely and rolling them out in a controlled fashion.
16:59 openfly check out the flag saltenv
16:59 openfly that being said.. so far I prefer puppet.
17:00 forrest joined #salt
17:01 tjs we have a small chef environment that one group uses where you can specify specific cookbooks, including the version of that cookbook ... and salt doesn't really seem to have an equivalent.
17:01 forrest joined #salt
17:02 tjs and it also supports dependencies like a normal package management system would ... so you can easily have a whole heirarchy of cookbooks get run.
17:02 openfly so we do something like... prompt:  salt *target* state.hightstat saltenv=dev
17:02 tjs i don't see how salt supports something similar... which is why i wonder if it requires thinking about things differently.
17:02 openfly and that will target specifically a dev salt path
17:02 openfly although theres also bases
17:03 openfly plenty of ways to segregate in the fashion you are trying to
17:04 aparsons joined #salt
17:05 RedundancyD joined #salt
17:05 protoz joined #salt
17:08 tjs regarding dependencies, salt handles those by simply including other states, and the best i can tell, if you want to version your states, you have to specify the versions as part of the state name itself.
17:08 berserk joined #salt
17:08 tjs or possibly include a generic state, which looks for a specific version number and then calls the appropriate version ...
17:09 protoz_ joined #salt
17:09 cruatta joined #salt
17:10 tjs like calling `postfix`, which looks for some pillar data like states:postfix:version and then calls something like `postfix-20151022` ...
17:10 tjs do other folks try to control state versions to this level? or do folks tend to have one version for each saltenv?
17:13 khaije|mentat the {% load_text 'path/to/state.sls' as subst_var_name %} thing I tried didn't work. For the best perhaps.
17:14 khaije|mentat dod pillar files have a conventional suffix?
17:14 khaije|mentat *do
17:16 * khaije|mentat sees here ( https://docs.saltstack.com/en/latest/topics/tutorials/pillar.html ) that it's '*.sls' which seems weird somehow
17:18 davisj khaije|mentat: .sls
17:20 Phtes I feel like i'm missing something but cant seem to find it in docs, how would I install modules within a state for apache php etc?
17:21 Phtes Inside of the pkg declaration
17:21 davisj tjs: I think most folks probably use git tags to manage that sort of thing rather than explicitly versioned states. Also, this doesn't really solve your vertion problem, but you are aware of the various reuisits, right?  https://docs.saltstack.com/en/latest/ref/states/requisites.html#id1
17:21 nitay joined #salt
17:22 tjs davisj: yes, the requisites help with dependencies but not necessarily versioning.
17:22 tjs and what do you mean by using git tags rather than versioned states?  how are git tags used?
17:23 tjs forgive me... i swear i'm just "not getting" something important to be able to put these things together ... and it's really frustrating :)
17:24 gadams999 joined #salt
17:24 davisj tjs: just that if your state files are in a git repo you can tag them at a particilar version.
17:24 davisj Also there's gitfs pillars, but I've not played with that at all.
17:25 davisj s/pillars//
17:25 tjs but i don't get how you then use those specific tags ... on a per-minion bases, rather than for a while saltenv on a master.
17:26 tjs s/bases/basis/
17:26 forcer A typical approach is to have your prod infrastructure replicated in a staging infrastructure, where the latter uses the git repo's stage branch and the former the prod branch. You push changes to stage, see if the staging infrastructure works as expected, and then merge the changes into prod. Also, you can run state.highstate with the argument test=True to do some rough checks as to whether things work.
17:26 * davisj phew... I'm not the only one who can't spell
17:26 forrest If anyone is using salt-ssh in a virtualenv on their local system with their local ssh keys and wants to add a note to https://github.com/saltstack/salt/issues/27284 or update the docs before I get around to figuring out the syntax, that would be great.
17:27 bhosmer_ joined #salt
17:27 forcer I have seen people use either salt envs for distinguishing stage from prod, or just use two separate salt masters to replicate the setup more closely.
17:28 davisj tjs: sorry I don't have more concrete answers for you, just some vague pointers. Not a problem domain I've tackled yet.
17:28 tjs forcer: the problem i see is that you're still using one version of your whole state tree for everything talking to that master.
17:28 gadams999 are there any good examples of file.managed with S3? I can get salt.s3.get to return an object, but file.managed is throwing an error in fileclient.py (could not fetch from {0}..."
17:28 whytewolf tjs: when you are talking about "versioning" are you talking about versions of the states. or the pkg.installed - version:
17:29 tjs and when you have hundreds of services being managed by dozens of teams of varying talent... that coordination gets ugly.
17:29 gadams999 unsure if it's a version problem (master and minion both 2015.3.0) or format of the S3 URL
17:29 tjs i'm talking about version of the salt states themselves.
17:29 forcer tjs: That is normal. When you build a program, you use one version of that source tree, too. States are not separate programs in that sense.
17:29 tjs how to properly configure various packages, etc...
17:30 nate_c joined #salt
17:30 davisj Your minions are necessarily using the same set of states. saltenv is one switch for that.
17:30 Phtes Anyone able to point me in the right direction for installing modules for php / apache etc via salt states, thanks!
17:31 forcer You are facing the typical problem of developing a large piece of software requiring integration. Continuous Integration and testing (nagios or similar) are your friends.
17:31 davisj s/are/aren't/
17:31 tjs as states evolve for whatever reason, it needs to be controlled.  one team might be using version X of a package whereas another team might be using version Y.  those versions might have different sub-dependencies, or different configuration syntax ... managing that evolution of the salt states is the problem i'm thinking about.
17:31 forcer afk now though :-)
17:32 tjs and as states evolve, it might also rely on changes to the pillar data it looks for ... so those ideally should be versioned alongside the states.  at least, in my mind they should.
17:33 davisj Phtes: how do you install them now?
17:33 * davisj uses rpms
17:33 GreatSnoopy joined #salt
17:33 armyriad joined #salt
17:34 whytewolf tjs: what i have typically seen is a typicall local -> dev -> testing -> prod style development. local is where all the chaos you are describing takes place. the rest is more controlled. and each with their own branches.
17:34 tjs davisj: agreed the minions are definitely not using the same set of states.  that's my entire problem. :)  saltenv seems to be good if you can run a handful of sets (dev/qa/prod/etc)
17:34 markm joined #salt
17:35 armyriad joined #salt
17:36 gadams999 Do IAM roles work with file.managed in 2015.8.0?
17:37 tjs another struggle for us, is that we have many products internally that have painfully long "release trains" ... that last upwards of 3-6 months... so coordination between groups where they are all running potentially slightly different versions of things, that's where haivng a single state tree for a while environment gets hard to comprehend ...
17:37 waf joined #salt
17:37 tjs s/while/whole/ ... that's the second time i've done that. ugh.
17:38 clintber_ joined #salt
17:38 tjs maybe, as you guys have suggested, we need better control/order over the qa/uat/prod type environments ...
17:39 whytewolf tjs: it will make your life a lot easier then trying to support multple versions of the same software.
17:39 tjs and in dev we let folks each run their own environment for their own sandboxed world.
17:40 tjs whytewolf: it's not even running multiple versions of the same software so much ... it's many different services all using similar components ... and the sharing of components that's hard.
17:42 whytewolf tjs: then maybe break it out more. group the simalarities and make the oddities edge cases.
17:43 cruatta joined #salt
17:43 ferbla joined #salt
17:46 DammitJim joined #salt
17:46 Phtes davisj: I...see what your saying
17:46 Phtes xD
17:46 whytewolf tjs: maybe time to get a new possition at your company. team cordination czar. job description. working to bringing sanity to the configurations. and standardizations
17:49 bhosmer_ joined #salt
17:49 tjs yeah.  we certainly need something to better align the different groups :|
17:50 whytewolf Phtes: if you are talking about pear packages. go with os package manegment if you are talking about php apps then you might want to look into composer
17:51 Phtes whytewolf:  talking about adding thinks like mod_event etc to apache as you install it all
17:51 whytewolf then yeah that would just be os package manegment
17:55 viq joined #salt
17:58 danlsgiga joined #salt
17:58 kant_ joined #salt
17:58 bhosmer joined #salt
17:59 tjs davisj, whitewolf: thanks for the suggestions/thoughts.
17:59 danlsgiga does anyone know why an empty map {} returns as string from a macro?
17:59 murrdoc joined #salt
18:00 danlsgiga I have a macro that creates a map and most of the time it will return an empty map {}... when I use it in an if test, it only works if I check it using quotes... if var == '{}' instead of if var == {}
18:01 murrdoc1 joined #salt
18:02 khaije|mentat so I'm looking for a way to run a command, which then pauses for input on stdin (a password), then send "<thepassword>ENTER" to get it to fully execute ... is there a way to do this w/ Salt?
18:02 iggy salt doesn't have some sort of expect like functionality built-in
18:03 Akhter joined #salt
18:03 * whytewolf shivers. ugh expect scripts. i still have nightmares about those
18:03 khaije|mentat mkay, I'm looking for ways to pass it a path or FD but nothing so far
18:03 khaije|mentat thanks iggy
18:05 stephen144 joined #salt
18:06 jodv joined #salt
18:09 larsfronius joined #salt
18:10 PI-Lloyd joined #salt
18:11 tmclaugh[work] joined #salt
18:12 tmclaugh[work] joined #salt
18:13 mapu joined #salt
18:13 denys joined #salt
18:14 baweaver joined #salt
18:15 krymzon joined #salt
18:16 otter768 joined #salt
18:17 kant joined #salt
18:19 traph joined #salt
18:19 traph joined #salt
18:19 stephanbuys joined #salt
18:24 edrocks joined #salt
18:24 Akhter joined #salt
18:27 Arbusto joined #salt
18:28 cruatta joined #salt
18:29 juesor joined #salt
18:32 murrdoc joined #salt
18:33 davisj tjs: I think the way some companies with similar complexity problems manage it is by assigning ownership of each component to a single team or person. And that team would be responsible for writing their own states that enforced the configuration they need. Of course it helps if you have strong seperation al-la containers
18:36 khaije|mentat joined #salt
18:36 nitay joined #salt
18:37 perfectsine joined #salt
18:37 trph joined #salt
18:37 trph joined #salt
18:44 baweaver joined #salt
18:45 dopesong joined #salt
18:48 PI-Lloyd joined #salt
18:49 domel joined #salt
18:49 nitay joined #salt
18:50 ziro` joined #salt
18:52 perfectsine joined #salt
18:52 sirex joined #salt
18:55 ziro` Hi, I am going to begin managing my servers with salt. I am taking a very lightweight approach with Salt, snce I’ll only be managing machines running the main software on docker containers. So, case: I have an collection of images that I turn into services. I can do this with systemd services but I am stumped on how to structure my formulas. Some of the service containers are pretty generic and might be shared across multiple apps but some of the containers ar
18:55 ziro` specific to application A and application B
18:56 ziro` I have always struggled with salt’s feeform structuring and lack of clear documentation on the subject
18:58 domel hi everyone. Has anyone used iptables.state to manage firewall etc?
18:58 cruatta_ joined #salt
18:58 domel how can i add this syntax via state https://gist.github.com/anonymous/0f835de5c4c2bd6284c7
19:01 Taz_ ziro`: from what i understand you make your formulas generic and then pass data into them with pillar...if i understand your question you can use pillar data to add the specific data for application a vs b while they share some similarities
19:02 ziro` I just want to use directories but the whole init.js stuff feels ugly
19:02 Taz_ domel: it looks like you are close? did you see the docs for it? https://docs.saltstack.com/en/latest/ref/states/all/salt.states.iptables.html
19:03 domel yeah im stumped on !
19:03 ziro` I have a bunch of services I want to deploy to boxes, that’s it really
19:03 Taz_ ziro`: i usually do something /srv/saltstack/formulas and put all my formulas there, then use /srv/saltstack/pillar with my pillar data to keep them seperate. Each site uses the same formulas (from git) while pillar data differs. Not sure if that helps
19:03 murrdoc good implementation
19:03 murrdoc for a ginger
19:03 ziro` does salt flatten the directory structure?
19:04 Taz_ ziro`: theres like a standard way to import states https://docs.saltstack.com/en/latest/topics/best_practices.html
19:05 murrdoc rtfm (totes not srs)
19:05 murrdoc salt doesnt flatten directory structure
19:05 murrdoc when working as a fileserver
19:05 timoguin joined #salt
19:05 ziro` hmm, the example only shows one level deep
19:06 ajw0100 joined #salt
19:06 ziro` does it work with multple levels?
19:06 murrdoc use .
19:06 murrdoc include level1.level2.level3
19:06 murrdoc you can also do include .level1
19:06 murrdoc for relativityness
19:06 ziro` great thanks
19:07 timoguin joined #salt
19:11 ageorgop joined #salt
19:13 trph joined #salt
19:13 linjan joined #salt
19:14 Akhter joined #salt
19:14 trph joined #salt
19:15 Taz_ domel: your salt state works fine?
19:15 domel yeah it renders correctly
19:15 domel but i cant pass the ! as option
19:17 Taz_ ohh, sorry im not as familiar with iptables
19:18 teebes joined #salt
19:19 Taz_ domel:     - tcp-flags: '! FIN,SYN,RST,ACK SYN' would that work?
19:19 saltycharles joined #salt
19:19 Taz_ domel: produces: /usr/sbin/iptables --wait -t filter -A INPUT  -p tcp -m state --state NEW --in-interface eth+ ! --tcp-flags FIN,SYN,RST,ACK SYN --jump DROP
19:20 knite joined #salt
19:20 pratikmallya joined #salt
19:23 domel yes thats it
19:23 Taz_ :)
19:23 domel awsome thx
19:23 Taz_ np
19:24 kofi_ray joined #salt
19:24 kofi_ray Evening all
19:24 Taz_ howdy
19:25 kofi_ray any idea why this is returning 2x please ?
19:25 kofi_ray salt '*' cmd.run 'uptime'
19:25 kofi_ray rhelvm.int.dolphingeo.com:
19:25 kofi_ray 19:21:50 up  3:20,  1 user,  load average: 0.00, 0.01, 0.05
19:25 kofi_ray rhelvm.int.dolphingeo.com:
19:25 kofi_ray 19:21:50 up  3:20,  1 user,  load averag
19:26 murrdoc salt \* test.ping
19:26 kofi_ray murrdoc: same result
19:26 Taz_ salt-key -L
19:26 murrdoc ^
19:27 kofi_ray salt-key -L shows it just once
19:27 whytewolf salt '*' cmd.run 'hostname'
19:27 murrdoc nah
19:27 murrdoc ssh minion
19:28 murrdoc pgrep salt-minion
19:28 zmalone multiple minion processes are more fault tolerant
19:28 laax joined #salt
19:28 Taz_ minionsception
19:28 stephanbuys joined #salt
19:28 StolenToast why might a minion return the same results 3 or 4 times?
19:28 murrdoc zmalone:  with the jokes
19:29 StolenToast because of multiple processes
19:30 kofi_ray StolenToast: yea that worked
19:30 kofi_ray cheers guys
19:31 kofi_ray left #salt
19:33 szhem joined #salt
19:35 stupidnic Would somebody help me understand how salt mine is supposed to work? From what I understand you define the mine_functions in the minion's pillar, but I can't seem to get that to actually return anything.
19:37 lz-dylan_ Hey folks!
19:37 lz-dylan I'm trying to find a secure way to put API keys into Pillar. Right now all my salt stuff is checked into a single GitHub repo, so I don't want to put credentials directly in.
19:38 lz-dylan I've got my eye on salt.pillar.s3 as a way to append pillar more securely...
19:38 lz-dylan ...will that work with IAM roles for authentication?
19:39 lz-dylan The documentation says that if I don't provide key and keyid, ext_pillar will try to retrieve them from EC2 instance metadata, which _sounds_ like the way I understand IAM roles to work.
19:42 StolenToast can I require other sls files in states?  "Inherit" them?
19:43 lz-dylan StolenToast: sort of
19:43 gadams999 haven't had luck uisng s3:// for file operations yet
19:43 StolenToast let's say i have a service that installs the same way on all hosts but has a different config file per cluster
19:43 lz-dylan StolenToast: you can `include` an SLS file into another SLS file, and then `require` one or more states within states
19:44 StolenToast so I'd have to list each state?
19:44 lz-dylan StolenToast: then what you probably want is to use Jinja to interpolate the name of the config file based on something about each cluster
19:44 stupidnic StolenToast: use Jinja
19:45 lz-dylan ie. `config: /path/to/{{ var.environment }}/configfile`
19:45 whytewolf stupidnic: see if this helps a bit https://gist.github.com/whytewolf/eff4a15f0eaa8d5354a3 with your mine info
19:45 stupidnic whytewolf: thank you
19:45 lz-dylan that's a _really_ hand-wavey version, I'm afraid, but if you can show me what yoou're working with I can get more specific
19:46 jhauser joined #salt
19:46 stupidnic whytewolf: that's actually what I am trying to do too, so that's perfect
19:46 stupidnic thanks
19:46 StolenToast lz-dylan: http://hastebin.com/witacopeso.sm
19:47 StolenToast the state on line 22 is different depending on cluster, which can be extrapolated from the hostname
19:47 baweaver joined #salt
19:48 lz-dylan StolenToast: What part of the state is different? The name, the resulting gmond.conf, something else...?
19:48 StolenToast the source will be different, "gmond1.conf, gmond2.conf..."
19:48 StolenToast line 24
19:48 StolenToast that's the line that needs to be matched to the cluster ID
19:49 lz-dylan gotcha.
19:49 lz-dylan Yeah, I'd find a way to get the cluster ID into salt if it's not there already, assigning it to a jinja variable
19:50 lz-dylan and then do ` - source: salt://ganglia/gmond{{ cluster_id }}.conf`
19:50 aphor lz-dylan" write a grain?
19:50 lz-dylan would that cluster ID be available---yeah I was gonna say, get it into grains :)
19:50 StolenToast It would be best if I could just gather that info from each node's hostname but due to unfortunate past naming convention all the names have a useless prefix
19:51 danlsgiga am I able to use salt.wait_for_event: inside a reactor sls?
19:51 StolenToast so the ID would be the first 6 OR 7 characters
19:51 aphor lz-dylan: write a grain. I think that's what you want.
19:52 danlsgiga so far I think it only works for the orchestrator runner
19:52 lz-dylan aphor: you mean for StolenToast's issue, yes?
19:52 StolenToast ok so I write a grain that calculates the ID based on the node's hostname and then assign it something like "clusterID"
19:52 StolenToast then in jinja I can use that value in a matching line
19:52 lz-dylan Sounds like a plan to me!
19:52 StolenToast and it will automagically gather that grain from every minion?
19:53 whytewolf if you need it from the other minions. then you might want to mine that
19:53 lz-dylan That or just conveniently rename your gmond.conf files to match your ugly hostname :) that wouldn't affect the eventual result--the final filename is still the name of the state, not the name of the source
19:53 trisell joined #salt
19:53 lz-dylan StolenToast: you might want to resync grains the first time, but yeah, it should do Smart Things magically on highstate
19:54 Akhter joined #salt
19:55 aphor lz-dylan: yeah, StolenToast wants a grain.
19:55 StolenToast this nomenclature can get confusing
19:55 StolenToast grains and pillars and mines and stuff
19:56 whytewolf grains - minion side data, pillars -  master side data, mines - functions to move minion data between minions
19:56 whytewolf in a nut shell anyway
19:57 PI-Lloyd joined #salt
19:59 bhosmer_ joined #salt
20:02 RandyT joined #salt
20:02 pratikma_ joined #salt
20:03 danlsgiga I'd like to run a salt.orchestrate based on data received through an event... The reactor will probably call the orchestrate state, but I'd like to pass data from my reactor to my orchestrate state...
20:03 danlsgiga I do this using the kwarg pillar in the state.orchestrate?
20:04 nitay joined #salt
20:06 d_j_giles joined #salt
20:07 d_j_giles If you're in the Charlotte, NC area, we're starting a new meetup group around SaltStack.  See the following http://www.meetup.com/Charlotte-SaltStack-Meetup/events/225231189/
20:07 baweaver joined #salt
20:08 fredvd joined #salt
20:10 giantlock joined #salt
20:11 cruatta joined #salt
20:12 breakingmatter joined #salt
20:17 otter768 joined #salt
20:20 twork i've got what i hope i a common screwup: i'm writing a new template by copying and adjusting an old one. new file name; "include:" in init.sls names both the old and the few template, other relevant details look the same to me. but salt is treating the new template as literal.
20:21 twork what did i probably miss, clues?
20:24 knite how do I manage per-host pillars? eg, I have 20 hosts, each one has several unique key/value pairs. I can do this with one giant pillar/values.sls file, but that seems rather awkward?
20:24 druonysuse joined #salt
20:24 druonysuse joined #salt
20:25 stupidnic knite: put them each in their own file and then include those files in your top.sls?
20:25 knite stupidnic: you mean with ext_pillar for files? I have that as well for actual files, but using it for config data means the "files" pillar would have more than file contents?
20:26 lz-dylan twork: can you pastebin what's going on?
20:26 lz-dylan or gist or whatever
20:27 twork lz-dylan: ok, will do. figured this would be one of those "oh yeah you forgot to..." issues.
20:28 laax joined #salt
20:29 lz-dylan I'm still struggling to get ext_pillar to play nice with s3
20:30 lz-dylan I'm trying to follow https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.s3.html and the error messages I'm getting from salt-master aren't really pointing me in a particular direction
20:30 lz-dylan https://gist.github.com/arubis/16e89bb5f9f680320a87
20:30 lz-dylan ^^ would LOVE some help on this one
20:35 CheKoLyN joined #salt
20:35 boargod joined #salt
20:36 saguilar joined #salt
20:36 twork lz-dylan: ha, you may have coaxed me into solving my problem. i think i was conflating a couple of file/field names and when i had to explicitly show them, the oops became clear.
20:36 twork as you were, all...
20:36 ajw0100 joined #salt
20:37 lz-dylan Happy to be a rubber duck :)
20:37 Arbusto joined #salt
20:37 |Fiber^| joined #salt
20:38 StolenToast So I've set up a grain and it works, if I grains.item it the minion responds correctly
20:38 StolenToast however my sls fails to compile because "jinja variable not defined" (the grain I just made)
20:39 StolenToast do I have to use some call to give {{ fam }} (family, cluster ID) value before the sls can use it?
20:39 StolenToast http://hastebin.com/laliqifave.sm
20:39 quasiben joined #salt
20:40 StolenToast looks like it might be something like grains[fam] instead
20:41 forrest joined #salt
20:42 davisj StolenToast: yeah, {{ grain['fam'] }}
20:43 StolenToast that works, thanks
20:44 ajw0100_ joined #salt
20:48 lz-dylan Shoot. I'm finding that my s3 pillar states work if I specify my AWS keys right in the master config (which is what I was hoping to avoid using IAM roles).
20:55 baweaver joined #salt
20:56 sbogg joined #salt
20:56 InAnimaTe joined #salt
20:56 laax joined #salt
21:01 InAnimaTe joined #salt
21:01 danlsgiga is there any benefit on using salt['pillar.get'] or salt['grains.get'] over pillar['mypillar'] and grains['mygrain'] ?
21:02 d_j_giles joined #salt
21:02 babilen You can access nested values (... 'foo:bar:baz')
21:02 freelock danlsgiga: with salt['pillar.get'] etc you can specify a default value if a key is not defined
21:02 twork eugh. if it ain't one thing... now i've go "Jinja variable undefined" rendering a file where the variable Jinja complains about never appears.
21:03 twork not a call for help so much as a plea of anguish.
21:03 freelock so is there any word on when 2015.8.0 is going to land in the ubuntu repository?
21:03 danlsgiga got it... thanks babilen freelock
21:05 babilen Am I mistaken or is the salt-formula broken in that nested gitfs defaults would be overwritten by the update in https://github.com/saltstack-formulas/salt-formula/blob/master/salt/map.jinja#L79 ?
21:05 zmalone freelock: according to a github issue, it won't, and they'll be making a new repo
21:05 babilen It wouldn't be obvious for master, but that call doesn't do a deep merge, does it?
21:06 zmalone https://github.com/saltstack/salt/issues/27159
21:06 babilen And, yes another case in which using jinja there just sucks
21:06 InAnimaTe joined #salt
21:07 twork does using jinja ever not just suck? i'm sure it's a great tool and better than others etc. etc. but debugging it is a bitch.
21:09 freelock zmalone: thanks for the link...
21:10 freelock the bootstrap script is still loading 2015.05.03
21:10 babilen Yeah, it's just that the .update idiocy in Python (i.e. the inability to define a function that handles what happens with values for duplicate keys) paired with jinja's inability (in salt in particular) to easily use external modules or just literal Python blocks, makes that issue incredibly painful to solve
21:14 breakingmatter joined #salt
21:14 zmalone Yeah, there is no repo in that new location yet freelock
21:15 zmalone They are just promising that there will be one eventually.
21:15 zmalone The bootstrap script still uses the ppa, last I checked
21:22 sgargan joined #salt
21:30 relidy joined #salt
21:30 michaelm joined #salt
21:30 Akhter joined #salt
21:32 michaelm Hello All.  I am having trouble finding a way to install a list of perl modules.  Anyone have an easy answer?
21:33 fredvd joined #salt
21:33 CryptoMer joined #salt
21:33 CryptoMer joined #salt
21:34 aristedes joined #salt
21:35 aristedes left #salt
21:35 babilen pkg.install the corresponding packages? Use cpan.install (only module), run appropriate commands in a cmd.run, ....
21:37 michaelm tried to use this, but kept getting errors.
21:37 michaelm - run:       - perl -MCPAN -e 'install {{ ' '.join(pillar['perl_modules']) }}'
21:37 jhauser joined #salt
21:38 bluenemo joined #salt
21:39 xDamox joined #salt
21:39 sgargan joined #salt
21:41 murrdoc there is a perl module
21:41 babilen errors?
21:41 michaelm No function declared in state 'cmd' in SLS
21:41 babilen And just to ask the obvious again: Why don't you simply install the corresponding package and what is wrong with https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cpan.html if you really have to use cpan?
21:42 babilen Mind pasting the entire state declaration to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … ?
21:43 michaelm I was trying to use something like this  https://github.com/saltstack/salt/issues/2130
21:45 michaelm I am really new to saltstack.  I saw the docs.saltstack.com page on salt.modules.cpan just not sure how to implement that in a state and/or pillar to install a list of modules.
21:47 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#salt.states.module.run for example, but really: start with "errors?"
21:47 babilen or even: which module(s) ?
21:47 knite joined #salt
21:48 jdesilet is it possible to have multiple files listed out under a require argument in a state?
21:49 babilen no
21:50 babilen err, yes, should be
21:50 jdesilet I'll paste an example of what I'm trying to do here in just a moment
21:50 babilen (sorry, thought you were asking about multiple stateswith the same id)
21:50 clintberry joined #salt
21:50 jdesilet http://paste.ofcode.org/xWRgHgq4uQ8M7LkhFnBhYd
21:51 clintberry joined #salt
21:51 babilen and?
21:52 jdesilet "The require statement in state '$statename' is SLS '$state' needs to be formed as a list
21:52 pcdummy joined #salt
21:52 pcdummy joined #salt
21:53 babilen It is formed as a list (at least in your example)
21:53 jdesilet I admit my python is weak so I'm not sure if this is just a syntax issue or not
21:53 babilen And your example wouldn't work anyway
21:53 babilen (file1 is not defined)
21:53 jdesilet say just below it I did define each
21:53 jdesilet sorry I was rushing
21:55 hal58th yeap, looks correct jdesilet
21:55 subsignal joined #salt
21:55 babilen Can't you paste the actual code you are having problems with ?
21:55 PeterO_ joined #salt
21:55 jdesilet one moment, let me see what I can do here
21:58 jdesilet http://paste.ofcode.org/u2EYQxGpvJbE9AGap5PqZU
21:59 babilen It's "require" not "requires"
22:00 hal58th I also recommend breaking up the states into individual state names
22:00 jdesilet fixing
22:00 jdesilet but still errors out
22:00 jdesilet Data failed to compile:
22:00 jdesilet ----------
22:00 jdesilet The require statement in state 'splunkforwarder' in SLS 'splunk' needs to be formed as a list
22:00 jdesilet ----------
22:00 jdesilet Multiple dictionaries defined in argument of state 'splunkforwarder' in SLS 'splunk'
22:01 hal58th yes, break up your states. one sec
22:01 hal58th http://paste.ofcode.org/nUcVAV9irjMgZ7xsVTskQC
22:01 Akhter joined #salt
22:02 babilen - requires
22:02 jdesilet all right, I will get on that.
22:03 hal58th oh yeah, fix my typo for require
22:03 babilen fscvo "your" typo :)
22:03 jdesilet hehe
22:03 jdesilet I can't just copy and paste it over easily so I'll be working on this for a bit
22:04 hal58th What? What kind of backwards setup do you have?
22:04 babilen Why is that ?
22:05 jdesilet I first had to scrub stuff out
22:05 jdesilet then I have to check changes into corp git
22:05 jdesilet everything needs a check
22:05 babilen yay :(
22:06 hal58th Takes me a minute tops to get into my CI environment. That's only because my CI salt-master has a cron to git pull every minute.
22:07 toastedpenguin joined #salt
22:07 hal58th And my dev environment is instantaneous of course :)
22:07 babilen You might want to consider developing stuff locally in a vm before you push it
22:07 babilen (so that it is at least syntactically clean)
22:09 Rockj joined #salt
22:09 colonD joined #salt
22:09 arapaho_ joined #salt
22:10 jhauser joined #salt
22:10 jbub joined #salt
22:11 larsfronius joined #salt
22:13 Zachary_DuBois joined #salt
22:13 SubOracle joined #salt
22:14 frankS2 joined #salt
22:14 twodayslate joined #salt
22:15 collinanderson joined #salt
22:15 Nazzy joined #salt
22:16 Jarus joined #salt
22:16 freelock joined #salt
22:18 pentabular joined #salt
22:18 manfred joined #salt
22:18 otter768 joined #salt
22:19 knite joined #salt
22:20 sunkist joined #salt
22:22 dthom91 joined #salt
22:24 qman__ joined #salt
22:25 dec joined #salt
22:25 forrest Does anyone remember what the check is to simply see if a pillar item exists for jinja? I'm using: {% if pillar[app_name]['item'] %} which works fine when the pillar value exists, but bombs otherwise. I thought that this would pass by if the value just didn't exist in the pillar, is this inaccurate?
22:26 f33rx joined #salt
22:27 jodv joined #salt
22:28 forrest Hmm, maybe {% if 'item' in pillar[app_name] %}
22:28 TomJepp joined #salt
22:28 jodv_ joined #salt
22:28 dstokes joined #salt
22:28 baweaver joined #salt
22:29 Aikar joined #salt
22:29 hal58th {% if salt['pillar.get']('app_name') %}
22:29 adelcast1 I am looking at the network state module and the very end of the managed function there is:
22:29 hal58th that works and never bombs
22:29 adelcast1 # TODO: create saltutil.refresh_grains that fires events to the minion daemon
22:29 adelcast1 grains_info = salt.loader.grains(__opts__, True)
22:29 adelcast1 __grains__.update(grains_info)
22:29 adelcast1 __salt__['saltutil.refresh_modules'](
22:30 hal58th no pasting multiple lines of code. use a pasting service
22:30 adelcast1 I understand that the purpose is to update the grain info, but why is the last line needed? (it forces a new refresh grain operation)
22:30 adelcast1 ok, sorry, since there where 4 lines I was lazy enough to skip the copy/paste
22:31 keimlink joined #salt
22:34 iggy maybe to sync the grains back to the master
22:34 hal58th forrest, you see my response?
22:35 forrest hal58th: I did now
22:35 sgargan joined #salt
22:35 hal58th next time I will include your name in my response forrest :)
22:35 forrest I'm trying to stick with the existing convention of using pillar[]
22:35 forrest I usually use pillar.get as well :\
22:35 forrest since that will just fail out properly
22:38 babilen forrest: ... is defined %}
22:38 forrest ?
22:38 forrest babilen: What?
22:38 alexhayes I'm trying to use https://github.com/DEnet/ufw-formula which is referring to a state ufw.enabled - does anyone know anything about this? Was it in a previous/upcoming release of Salt>
22:38 alexhayes ?
22:38 babilen {% if pillar.foo is defined %}
22:39 forrest babilen: oh right right right, thanks
22:39 adelcast1 iggy: ah, interesting, maybe,,, I can see that refresh_modules triggers module_refresh event
22:39 babilen Sorry, thought "is defined" would be enough :D
22:39 adelcast1 which I believe refresh grains, but then sounds redundant to load event manually first, then trigger an event that will load grains again
22:40 twork i need some debugging clue. i'm getting a rendering error, "Rendering SLS 'base:vsftpd.vsftpd_user_config' failed: Jinja variable 'vsftpd' is undefined", but 'vsftpd' doesn't appear in that file.
22:40 alexhayes Oh... found it... it has it's own module/states
22:41 iggy twork: gist
22:41 babilen alexhayes: which probably require ufw to be installed for the module to be available
22:42 sunkist joined #salt
22:42 kusams joined #salt
22:42 twork https://gist.github.com/mjinks/ba0c04b98189c63facdf
22:43 babilen twork: We obviously have to see the state in question too (*all* included ones as well)
22:44 opensource_ninja joined #salt
22:44 iggy yeah, I meant gist the states
22:44 pdayton joined #salt
22:45 twork coming...
22:47 protoz joined #salt
22:49 CryptoMer joined #salt
22:50 bfoxwell joined #salt
22:50 twork (sorry, it takes a while, cut-and-paste from xterm to gist with a big file is slow)
22:52 twork ok, i think that's everything. which may mean that "my whole problem is i'm not looking in the right place"
22:53 twork https://gist.github.com/mjinks/ba0c04b98189c63facdf
22:54 iggy service: {{ vsftpd.service }}
22:54 f33rx_ joined #salt
22:55 drawsmcgraw left #salt
22:56 f33rx_ joined #salt
22:57 f33rx_ joined #salt
22:57 twork iggy: okay, i should have included another file. moment...
22:58 f33rx joined #salt
23:00 f33rx joined #salt
23:00 twork 'init.sls' is there now. it includes vsftpd.service. again for convenience, https://gist.github.com/mjinks/ba0c04b98189c63facdf
23:01 twork ...which... didn't cause trouble until this afternoon
23:01 twork so i figured the trouble had to be somewhere else
23:01 N-Mi joined #salt
23:01 ajw0100 joined #salt
23:01 f33rx joined #salt
23:03 f33rx joined #salt
23:04 kusams joined #salt
23:04 f33rx joined #salt
23:04 pdayton joined #salt
23:04 ziro` joined #salt
23:05 f33rx joined #salt
23:06 ziro` is namespacing discouraged, or encouraged?
23:06 PeterO_ joined #salt
23:06 ziro` or neither
23:07 f33rx joined #salt
23:07 murrdoc encouraged
23:08 f33rx joined #salt
23:09 ajw0100 joined #salt
23:09 sunkist joined #salt
23:09 f33rx joined #salt
23:10 Akhter joined #salt
23:10 twork unrelated (maybe) to my present trouble, except to demonstrate that i'm still cargo culting: in a pattern like "pillar.get('users', {}).items()", what's the meaning of that blank {}?
23:11 f33rx joined #salt
23:11 druonysuse joined #salt
23:12 twork i try to answer thse questions for myself, honest i do
23:12 hal58th twork, it means if you can't find the pillar key for users, then return an empty dict
23:12 thehaven joined #salt
23:12 Akhter joined #salt
23:12 twork thanks hal58th
23:12 f33rx joined #salt
23:12 hal58th anything after the comma is a default return if the pillar value can't be found :)
23:13 f33rx joined #salt
23:15 f33rx joined #salt
23:16 twork hal58th: aaaah, okay, i do know how to read it when what follows the comma is a literal. thanks.
23:16 f33rx joined #salt
23:17 f33rx joined #salt
23:18 Arbusto joined #salt
23:19 f33rx joined #salt
23:19 pratikmallya joined #salt
23:20 f33rx joined #salt
23:22 ajw0100 joined #salt
23:22 f33rx joined #salt
23:23 shpoont joined #salt
23:23 f33rx joined #salt
23:24 mapu joined #salt
23:24 godber1 joined #salt
23:25 f33rx joined #salt
23:25 shpoont joined #salt
23:26 twork iggy: i owe you a beverage of your choice. that string had not, in fact, been present the last time this rendered correctly.
23:26 f33rx joined #salt
23:26 twork time to go obtain caloric input.
23:27 f33rx joined #salt
23:29 f33rx joined #salt
23:30 f33rx joined #salt
23:32 f33rx joined #salt
23:33 berserk joined #salt
23:33 f33rx joined #salt
23:35 f33rx joined #salt
23:35 tmclaugh[work] joined #salt
23:36 f33rx joined #salt
23:37 f33rx joined #salt
23:38 mosen joined #salt
23:38 tmclaugh[work]_ joined #salt
23:38 ziro` joined #salt
23:39 f33rx joined #salt
23:40 f33rx joined #salt
23:41 f33rx joined #salt
23:43 f33rx joined #salt
23:45 berserk joined #salt
23:45 CryptoMer joined #salt
23:47 otter768 joined #salt
23:49 tmclaugh[work] joined #salt
23:49 baweaver joined #salt
23:56 aristedes joined #salt
23:58 forrest Before I go digging through the code, does anyone use https://docs.saltstack.com/en/latest/ref/configuration/logging/handlers/salt.log.handlers.sentry_mod.html on masterless minions?
23:59 forrest It doesn't say whether it is supported on minions only or not

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