Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-01-04

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

All times shown according to UTC.

Time Nick Message
00:02 keimlink_ joined #salt
00:09 madboxs joined #salt
00:16 dijit joined #salt
00:17 Rumbles joined #salt
00:25 toastedpenguin1 joined #salt
00:25 madboxs joined #salt
00:29 raspado question
00:29 raspado using pkg.installed, if i specify a version
00:30 raspado will it upgrade any packages to that version if the package is installed
00:30 hemebond I believe so.
00:31 raspado thx hemebond
00:32 hemebond I believe it will also try to downgrade.
00:33 raspado oh nice
00:39 fredrick joined #salt
00:39 Klas joined #salt
00:40 fxhp joined #salt
00:40 madboxs joined #salt
00:54 eprice joined #salt
00:56 madboxs joined #salt
00:56 iggy nmccollum: yeah, I hit that before with just a 2G file_roots
00:57 iggy we ended up doing http:// sources for a bunch of stuff
00:57 fracklen joined #salt
00:59 xbglowx joined #salt
01:01 pipps joined #salt
01:05 eprice joined #salt
01:11 pipps joined #salt
01:17 eprice joined #salt
01:21 woodtablet left #salt
01:23 elh9_ joined #salt
01:23 nmccollum You know what would be super awesome, if salt would dump stdout and stderr back immediately back from minions as it came in.
01:23 nmccollum Kind of like how parallel ssh will.
01:23 rpb joined #salt
01:24 hemebond But then... how would that look on the master?
01:24 hemebond Would the master then buffer the output?
01:25 dxiri joined #salt
01:25 eprice joined #salt
01:25 elh9__ joined #salt
01:27 anthonyshaw joined #salt
01:30 nmccollum So, in parallel ssh it prefaces the returns based on the hostname.
01:31 supermike_ How do people smarter than me manage package repos across Ubuntu releases?
01:32 eprice joined #salt
01:32 hemebond If "parallel ssh" is what I've used before, then I personally would never use that output; it was a confusing mess.
01:32 hemebond supermike_: What do you mean?
01:32 supermike_ I have pkgrepo.managed with name: "deb ... xenial main", but I feel like hardcoding the release is bad. Also the URLs sometimes contain release version numbers...
01:33 hemebond You can use grains to get the OS code.
01:33 supermike_ Oh wow, you can use grains within an .sls?
01:33 hemebond Or just use pillars to specify the different path.
01:34 hemebond Sure can.
01:34 hemebond You'll see it used a lot in formulas.
01:34 iggy deb http://extras.ubuntu.com/ubuntu {{ grains.oscodename }} main
01:34 iggy like that
01:34 supermike_ I have a pretty homogenous environment, so I never ventured that far until now.
01:34 supermike_ Thanks so much, this is awesome.
01:34 iggy deb http://repo.saltstack.com/apt/ubuntu/{{ grains.osrelease }}/amd64/latest {{ grains.oscodename }} main
01:35 iggy or like that for the salt repo
01:35 iggy gets more difficult when you have multiple distros
01:36 nmccollum I always find it bazaar that people use Ubuntu for production servers.
01:36 hemebond Why is that?
01:37 eprice joined #salt
01:37 nmccollum bizzare meh
01:37 iggy we have quite a few of them... less issues than other distros I've dealt with
01:38 nmccollum Same reason I wouldn't use Fedora.
01:38 hemebond "fewer issues"
01:38 * hemebond apologises
01:38 nmccollum SLES, CentOS, RHEL, Debian... sure
01:39 nmccollum Arch, Fedora, Ubuntu... nah
01:39 iggy to each their own I guess
01:40 supermike_ cranking along at 1.2m+ req/sec, a few minor headaches due to some custom kernel stuff I have done... but Ubuntu has worked out pretty well for me.
01:40 supermike_ I mean, it's clearly not _enterprise grade_
01:40 hemebond 1.2m requests per second? goodness me
01:40 nmccollum It's along the lines of putting Windows 10 on a machine to run IIS, when Server is clearly the better choice.
01:41 hemebond But Ubuntu server is pretty much the same as Debian server.
01:41 iggy except actually maintained by a company
01:42 hemebond That's right. With additional enterprise systems built for it too.
01:43 supermike_ ...and with a few more up-to-date packages
01:43 nmccollum Don't confuse higher version number with more up-to-date.
01:43 supermike_ sorry, closer to upstream
01:44 nmccollum If I am running a server, I want tried and true.  Less bugs.
01:44 hemebond Bug you'll also get unfixed bugs.
01:44 nmccollum I'm fine with less features as long as it has less bugs.
01:44 hemebond fewer bugs
01:44 * hemebond apologises
01:45 iggy as well you should
01:45 nmccollum Less is technically correct when the amount is intangible.
01:46 iggy so... back to saltstack
01:46 nmccollum If I said, "I'm fine with less features as long as it has fewer than 30 bugs."
01:46 hemebond Yes, speaking of Saltstack and bugs...
01:46 supermike_ Oh, do I get to pick which 30 bugs? :)
01:46 hemebond 4,078 open bugs.
01:46 hemebond *issues.
01:49 eprice joined #salt
01:49 Tgrv joined #salt
01:55 eprice joined #salt
01:55 onlyanegg joined #salt
01:55 shoemonkey joined #salt
01:55 tercenya joined #salt
01:58 eprice joined #salt
02:03 aarontc joined #salt
02:04 eprice joined #salt
02:09 eprice joined #salt
02:11 Neighbour joined #salt
02:14 madboxs joined #salt
02:15 eprice joined #salt
02:21 eprice joined #salt
02:23 eprice joined #salt
02:24 eprice joined #salt
02:26 madboxs joined #salt
02:32 catpiggest joined #salt
02:34 shoemonkey joined #salt
02:38 madboxs joined #salt
02:41 mavhq joined #salt
02:46 cachedout joined #salt
02:46 icebal joined #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.4, 2016.11.1 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
02:49 eprice joined #salt
02:51 madboxs joined #salt
02:55 Neighbour joined #salt
02:56 eprice joined #salt
03:01 eprice joined #salt
03:03 madboxs joined #salt
03:07 mTeK joined #salt
03:09 ronnix joined #salt
03:13 DEger joined #salt
03:15 shoemonkey joined #salt
03:15 madboxs joined #salt
03:21 elh9 joined #salt
03:24 elh9 joined #salt
03:28 madboxs joined #salt
03:30 djinni` joined #salt
03:33 eprice joined #salt
03:39 bastiandg joined #salt
03:40 eprice joined #salt
03:40 madboxs joined #salt
03:46 cachedout joined #salt
03:49 Neighbour joined #salt
03:51 eprice joined #salt
03:53 madboxs joined #salt
03:57 shoemonkey joined #salt
03:59 eprice joined #salt
03:59 justanotheruser joined #salt
04:05 eprice joined #salt
04:05 madboxs joined #salt
04:08 Neighbour joined #salt
04:10 eprice joined #salt
04:10 jeddi joined #salt
04:13 ponyofdeath joined #salt
04:16 dxiri joined #salt
04:17 madboxs joined #salt
04:22 un1x01d joined #salt
04:27 emattiza joined #salt
04:27 eprice joined #salt
04:29 madboxs joined #salt
04:34 eprice joined #salt
04:34 emattiza joined #salt
04:35 pipps joined #salt
04:38 emattiza joined #salt
04:41 eprice joined #salt
04:42 madboxs joined #salt
04:43 emattiza joined #salt
04:43 emattiza left #salt
04:44 emattiza joined #salt
04:45 eprice joined #salt
04:45 emattiza joined #salt
04:50 eprice joined #salt
04:50 eprice joined #salt
04:53 eprice joined #salt
04:54 madboxs joined #salt
04:55 sp0097 joined #salt
04:58 eprice joined #salt
05:01 filippos joined #salt
05:01 eprice joined #salt
05:04 eprice joined #salt
05:04 cyborg-one joined #salt
05:07 madboxs joined #salt
05:08 eprice joined #salt
05:09 justanotheruser joined #salt
05:17 preludedrew joined #salt
05:19 madboxs joined #salt
05:19 XenophonF joined #salt
05:23 dxiri joined #salt
05:26 eprice joined #salt
05:26 saintpablos joined #salt
05:31 debian112 joined #salt
05:35 eprice joined #salt
05:40 citaret Hi, what's the proper way to get the value of the minion's ip address in a jinja template file?
05:43 eprice joined #salt
05:47 rdas joined #salt
05:50 nicerobot[m] joined #salt
05:52 eprice joined #salt
06:07 eprice joined #salt
06:10 bocaneri joined #salt
06:13 eprice joined #salt
06:15 jeddi joined #salt
06:18 eprice joined #salt
06:26 eprice joined #salt
06:32 eprice joined #salt
06:35 eprice joined #salt
06:35 eprice joined #salt
06:36 ivanjaros3916 joined #salt
06:36 sh123124213 joined #salt
06:37 sh123124213 joined #salt
06:40 iggy citaret: there's more than one way... depending on some circumstances
06:45 eprice joined #salt
06:48 eprice joined #salt
06:55 eprice joined #salt
06:57 ThomasJ|m joined #salt
06:57 saintaquinas[m] joined #salt
06:57 jcl[m] joined #salt
06:57 Mads[m] joined #salt
06:57 jerrykan[m] joined #salt
06:57 Salander27 joined #salt
06:57 dnull[m] joined #salt
06:57 M-liberdiko joined #salt
06:57 M-MadsRC joined #salt
06:57 freelock[m] joined #salt
06:57 tmrtn[m] joined #salt
07:02 teclator joined #salt
07:03 rai_ joined #salt
07:09 eprice joined #salt
07:12 eprice joined #salt
07:18 eprice joined #salt
07:21 citaret iggy: i use {{ grains['ip4_interfaces']['eth0'][0] }} for now, is there any better way?
07:22 PatrolDoom the docs show the "|" way
07:24 eprice joined #salt
07:26 eprice joined #salt
07:27 rabha joined #salt
07:27 rabha Hello Everyone
07:28 rabha I am new to SaltStack and would your help to debug the error I'm getting while deploying a AWS ec2 instance
07:29 vijay_ joined #salt
07:30 eprice joined #salt
07:32 madboxs joined #salt
07:33 eprice joined #salt
07:38 eprice joined #salt
07:38 iggy citaret: that makes a lot of assumptions... but yeah, if it works, it works
07:39 impi joined #salt
07:40 citaret iggy: is there some doc that i can refer to ?
07:40 eprice joined #salt
07:42 madboxs joined #salt
07:43 iggy there are a lot... jinja docs, jinja renderer, lots of examples all over the docs, etc
07:43 iggy formulas can have some good stuff (although a lot of them are super convoluted for beginners)
07:46 eprice joined #salt
07:48 citaret iggy: thanks, so, how could i start to search for it, from google or salt docs. seems like my search return not much useful information.
07:50 darioleidi joined #salt
07:50 eprice joined #salt
07:52 madboxs joined #salt
07:53 iggy depends what you need
07:57 q1x joined #salt
07:59 fracklen joined #salt
08:00 anthonyshaw joined #salt
08:00 fracklen joined #salt
08:00 jas02 joined #salt
08:02 madboxs joined #salt
08:03 eprice joined #salt
08:09 Rumbles joined #salt
08:12 madboxs joined #salt
08:13 DEger joined #salt
08:14 cliluw joined #salt
08:16 eprice joined #salt
08:23 madboxs joined #salt
08:27 eprice joined #salt
08:27 Arendtsen joined #salt
08:31 sh123124213 joined #salt
08:32 iggy gtmanfred: what's the status on refreshed openstack modules?
08:33 madboxs joined #salt
08:33 eprice joined #salt
08:36 Reverend joined #salt
08:36 eprice joined #salt
08:36 Reverend hello folks!
08:41 ronnix joined #salt
08:43 madboxs joined #salt
08:43 JohnnyRun joined #salt
08:43 PatrolDoom joined #salt
08:45 eprice joined #salt
08:52 eprice joined #salt
08:53 impi joined #salt
08:53 madboxs joined #salt
08:57 eprice joined #salt
09:00 eprice joined #salt
09:01 eprice joined #salt
09:01 amontalban joined #salt
09:01 amontalban joined #salt
09:02 Rumbles joined #salt
09:03 madboxs joined #salt
09:03 jeddi joined #salt
09:05 keimlink joined #salt
09:05 eprice joined #salt
09:09 eprice joined #salt
09:11 Reverend hey chaps
09:11 disaster123 joined #salt
09:13 madboxs joined #salt
09:17 hvn joined #salt
09:17 hvn joined #salt
09:18 eprice joined #salt
09:20 teclator joined #salt
09:21 eprice joined #salt
09:23 madboxs joined #salt
09:24 eprice joined #salt
09:25 dxiri_ joined #salt
09:31 dxiri joined #salt
09:32 eprice joined #salt
09:33 madboxs joined #salt
09:37 jeddi joined #salt
09:41 Ashald joined #salt
09:43 madboxs joined #salt
09:47 eprice joined #salt
09:53 eprice joined #salt
09:55 madboxs joined #salt
09:56 eprice joined #salt
09:58 s_kunk joined #salt
09:59 armin joined #salt
09:59 eprice joined #salt
10:04 eprice joined #salt
10:05 madboxs joined #salt
10:06 Kelsar joined #salt
10:12 eprice joined #salt
10:15 eprice joined #salt
10:16 o1e9 joined #salt
10:17 eprice joined #salt
10:26 jhauser joined #salt
10:26 eprice joined #salt
10:29 eprice joined #salt
10:33 sh123124213 joined #salt
10:37 Hybrid joined #salt
10:38 kalaspace joined #salt
10:38 kalaspace hi everybody
10:43 Nei joined #salt
10:48 eprice joined #salt
10:56 eprice joined #salt
11:00 N-Mi__ joined #salt
11:06 madboxs joined #salt
11:06 rdas joined #salt
11:09 eprice joined #salt
11:14 DEger joined #salt
11:15 eprice joined #salt
11:20 eprice joined #salt
11:23 sun_ joined #salt
11:26 eprice joined #salt
11:27 madboxs joined #salt
11:30 eprice joined #salt
11:34 eprice joined #salt
11:37 eprice joined #salt
11:44 abednarik joined #salt
11:46 eprice joined #salt
11:48 madboxs joined #salt
11:50 Reverend any way to get a md5 filter on a piece of text anyone?
11:51 Reverend currently doing `{{ textvar }}`
11:51 Reverend need it to be an md5 string :)
11:51 seatan joined #salt
11:51 seatan hey
11:52 seatan does anybody have an idea why would salt-ssh hang with no timeout?
11:52 seatan running it with -l debug shows that it hangs here: "[DEBUG   ] VT: Salt-SSH SHIM Terminal Command executed. Logged to TRACE"
12:08 eprice joined #salt
12:08 madboxs joined #salt
12:11 eprice joined #salt
12:12 seatan joined #salt
12:16 eprice joined #salt
12:21 eprice joined #salt
12:26 viq seatan: try with -l trace
12:27 raw_ joined #salt
12:27 rdas joined #salt
12:29 madboxs joined #salt
12:30 eprice joined #salt
12:32 darioleidi_ joined #salt
12:33 eprice joined #salt
12:35 sh123124213 joined #salt
12:37 eprice joined #salt
12:40 eprice joined #salt
12:43 eprice joined #salt
12:50 madboxs joined #salt
12:53 numkem joined #salt
12:58 tpaul joined #salt
12:58 eprice joined #salt
12:58 dxiri joined #salt
13:01 cyteen joined #salt
13:02 alrayyes joined #salt
13:08 eprice joined #salt
13:11 madboxs joined #salt
13:14 eprice joined #salt
13:15 dxiri joined #salt
13:19 eprice joined #salt
13:20 eprice joined #salt
13:23 jas02 joined #salt
13:26 jas02 joined #salt
13:27 oida joined #salt
13:27 eprice joined #salt
13:28 mindscratch joined #salt
13:28 mindscratch Is it possible to do a "file.replace" on more than one file? without redefining the "file.replace" stuff over and over?
13:29 babilen mindscratch: You can easily generate the state with, say, a for loop over the variable bits of the state
13:30 mindscratch so just the file names that I need to do the replace on change
13:30 mindscratch i have two files
13:31 DEger joined #salt
13:31 babilen Then iterate over the file names and fill them into the template
13:32 mindscratch ok, thanks
13:38 amontalban joined #salt
13:38 amontalban joined #salt
13:43 eprice joined #salt
13:43 darvon joined #salt
13:45 nicksloan joined #salt
13:47 eprice joined #salt
13:50 mikecmpbll joined #salt
13:51 dxtr Is it possible for environments to inherit stuff from base?
13:52 dxtr Oh yeah
13:52 dxtr There, found it :p
13:55 shoemonkey joined #salt
13:57 eprice joined #salt
13:58 losh joined #salt
14:00 cyborg-one joined #salt
14:00 _JZ_ joined #salt
14:02 eprice joined #salt
14:04 yuhl__ left #salt
14:06 _JZ_ joined #salt
14:06 dxiri_ joined #salt
14:07 mikecmpbll joined #salt
14:09 eprice joined #salt
14:13 madboxs joined #salt
14:18 eprice joined #salt
14:22 eprice joined #salt
14:23 abednarik joined #salt
14:26 rdas joined #salt
14:28 dxiri joined #salt
14:28 XenophonF joined #salt
14:31 jmcknight joined #salt
14:32 daxroc Is there a salt way of delaying execution of a state - http.query ?
14:32 mavhq joined #salt
14:34 madboxs joined #salt
14:34 eprice joined #salt
14:36 sh123124213 joined #salt
14:37 dunz0r daxroc: Like delay it until something has happened or some amount of time?
14:38 nickabbey joined #salt
14:38 daxroc dunz0r: I'm making rest calls and want to delay the execution for say a 500ms
14:40 eprice joined #salt
14:40 cmarzullo salt '*' test.sleep 20
14:41 cmarzullo it's an execution module thogh.
14:41 dunz0r daxroc: I guess you could use cmd.wait or something, with sleep
14:42 ravan joined #salt
14:42 ravan hello
14:42 cmarzullo o/
14:42 ravan can you tell me about salt
14:42 daxroc Is using the test states to control flow an anti-pattern ?
14:43 daxroc Or are they intended to be used like this, or just for testing states ?
14:43 ravan i have seen SALT as version in application. what does it mean?
14:43 ravan is it means that app was using SALT versioning tool?
14:44 abednarik joined #salt
14:44 cmarzullo daxroc: to me it sounds like an anti-pattern if you are using salt for cfg mgmt. but if you are using it in a runner I don't see it as that bad. But that's just me.
14:45 dunz0r ravan: Salt's an automation and configuration management framework. It's not a versioning tool.
14:45 Rumbles joined #salt
14:46 daxroc cmarzullo: I'm in the same boat
14:47 jmcknight daxroc: depending on your specific use case, process.wait_socket might fit your needs
14:47 ravan what is the exact use of this fram work... please give short words..
14:49 dunz0r ravan: Remote execution, configuration management.
14:49 daxroc Salt is many things to many people, It's a config-management framework, remote-execution tool, it has an event-bus this alone distinguishes it from competitors.
14:49 cmarzullo SaltStack platform or Salt is a Python-based open-source configuration management software and remote execution engine.
14:50 dunz0r And event-driven orchestration
14:50 keimlink joined #salt
14:50 dunz0r I don't think you can use any shorter word, to be honest :/
14:51 ravan ya understood. thank you very much.
14:51 dendazen joined #salt
14:53 eprice joined #salt
14:54 kidneb joined #salt
14:54 elh9 joined #salt
14:55 madboxs joined #salt
14:57 elh9_ joined #salt
14:58 racooper joined #salt
14:59 cachedout joined #salt
14:59 irctc298 joined #salt
14:59 dyasny joined #salt
15:00 eprice joined #salt
15:01 dxiri_ joined #salt
15:02 mpanetta joined #salt
15:07 DEger joined #salt
15:08 elh9 joined #salt
15:08 nickabbey joined #salt
15:10 saintpabloss joined #salt
15:10 ronnix_ joined #salt
15:10 GordonTX joined #salt
15:11 mpanetta_ joined #salt
15:12 eprice1 joined #salt
15:13 wangofett joined #salt
15:14 cyborg-one joined #salt
15:14 tapoxi thoughts on thorium?
15:15 tapoxi I'm wondering if I can use it for some basic monitoring so I can only alert after x failed checks
15:15 eprice joined #salt
15:15 beardedeagle joined #salt
15:16 madboxs joined #salt
15:18 dyasny joined #salt
15:18 dj_goku joined #salt
15:18 dj_goku joined #salt
15:19 eprice joined #salt
15:23 nicksloan joined #salt
15:28 eprice joined #salt
15:28 lkannan joined #salt
15:30 mpanetta joined #salt
15:31 nickabbey joined #salt
15:33 Brew joined #salt
15:33 eprice joined #salt
15:34 sarcasticadmin joined #salt
15:36 bmc_ joined #salt
15:36 eprice joined #salt
15:37 madboxs joined #salt
15:40 amontalban joined #salt
15:40 amontalban joined #salt
15:41 dlloyd has anyone seen an issue where 2016.3.4 on ubuntu will fail to reload a crontab after a number of them are applied? its always the last entry, always the same one, and the crontab file on disk has the proper trailing newline to appease cron
15:42 daxroc https://www.irccloud.com/pastebin/cexpH9Is/
15:43 eprice joined #salt
15:43 daxroc How do you nest on the above iteration, It errors on the nested loop with None has no attribute iteritems
15:46 asnnam joined #salt
15:47 Tanta joined #salt
15:48 abednarik joined #salt
15:50 ALLmightySPIFF joined #salt
15:52 hasues joined #salt
15:52 hasues left #salt
15:53 cmarzullo {% if n_config %}{% for service, s_contif %}
15:55 eprice joined #salt
16:01 nicksloan joined #salt
16:05 fredrick joined #salt
16:14 dxiri joined #salt
16:21 edrocks joined #salt
16:24 morissette joined #salt
16:28 nicksloan joined #salt
16:30 cyteen joined #salt
16:32 debian112 joined #salt
16:33 PatrolDoom joined #salt
16:34 fredrick Anyone having multiple git repos working with kitchen-salt.
16:34 ivanjaros joined #salt
16:36 johnkeates joined #salt
16:36 johnkeates how do i merge subkeys?
16:38 sh123124213 joined #salt
16:39 cmarzullo fredrick: sorry I missed your response yesterday. what do you mean multiple git repos. Are you testing formulas with kitcen-salt or some other workflow
16:41 fredrick sorry multiple branches on a single repo.  Master for my top.sls and then a separate branch for my state files.  Oh and a actual separate repo completely for pillar data
16:42 cmarzullo So you are using kithen-salt as a deployment tool?
16:42 nickabbey joined #salt
16:42 cmarzullo Or for like integration testing.
16:42 fredrick Eventually.  But for now I want to use it to test states before pushing to the actual repo
16:43 fredrick I hate having to find out I missed a spacing or typo'd after I commit and run a highstate.
16:45 cmarzullo yeah we have a whole formula testing pipeline with test-kitchen
16:45 cmarzullo For state / pillar verification it gets a little more difficult. I generally do that in vagrant. But you can do it in kitche.
16:46 cmarzullo You could build out the project with git submodules pulling in the pieces or you can use the dependencies pieces of salt-kitchen.
16:46 yetanotherzero joined #salt
16:48 cmarzullo https://github.com/simonmcc/kitchen-salt/blob/master/provisioner_options.md#dependencies
16:48 Heartsbane joined #salt
16:48 Heartsbane joined #salt
16:49 fredrick Ahh so kitchen has the ability just need to get better with it?
16:50 cmarzullo yeah there's a lot there.
16:50 cmarzullo I suspect you'll need a combinatino of the provisioner options and using git submodules.
16:52 fredrick The only place I see git in the kitchen-salt provisioner is for the bootstrap??
16:53 cmarzullo It'd be more about how you setup your kitchen project.
16:54 fredrick Ok that is what I wanted to make sure I understood.  So I should do something like have kitchen project pull the correct repo branches to the correct directories then have the kitchen-salt run after?
16:54 cmarzullo I don't use kitchen for integration testing. I use it for making testable formulas.
16:55 cmarzullo That's one way to do it.
16:55 cmarzullo Probably closest to what you want.
16:56 qpqp joined #salt
16:56 fredrick What do you do for intergration testing?  I truly am trying in the long run for it to be the last step before deploying changes to infrastructure
16:56 cmarzullo But there's defo dragons to be fought down that path. For example for somethings you may need a salt master. So you'll have to stand one up with test-kitchen.
16:56 cmarzullo If you have gpg pillar that could cause issues.
16:57 dxiri_ joined #salt
16:57 cmarzullo http://unicolet.blogspot.com/2016/05/a-not-so-short-guide-to-tdd-saltstack.html
16:57 cmarzullo Basically we break every service down into testable formunlas.
16:57 fredrick Pillar was my biggest concern.  I use vault for all of that.
16:58 cmarzullo I don't worry too much about pillar. I see pillar as the CMDB that can change a lot and it's impact should not be catastropic.
16:58 cmarzullo I am more concerned about people making breaking changes to formulas.
16:58 fredrick Agreed.  It is just my key and value.  Can be anything.
16:59 fredrick The formula and ensuring they do not break anything is the important part.
16:59 cmarzullo Yeah that's where we use test kitchen.
16:59 cmarzullo If you make a change to a formula you run test kitchen locally. It'll verify the resultant vm with serverspec.
17:00 cmarzullo when you do a PR against our production formula. Jenkins picks up the PR and runs through the test again.
17:00 cmarzullo But this time it'll test against our cloud provider to ensure nothing wierd is going on.
17:00 cmarzullo Then the salt admins can see that the PR has passed the tests, we then review the code, then merge.
17:00 cmarzullo Then the formula gets rolled out to production.
17:01 cmarzullo All of our formulas have fake pillar. ssh-key: "THIS IS NOT A REAL KEY"
17:01 nidr0x joined #salt
17:01 cmarzullo But when it runs in prod it'll pull gpg pillar.
17:02 fredrick Nice very similar, looking to do the same with gitlab versus jenkins but that is pretty much exactly what I am looking to do.
17:03 fleaz joined #salt
17:04 cmarzullo It's not error free, but it reduces the risk and provides accountablitlty.
17:04 fredrick Any recommendations for kitchen tuturials
17:06 dj_goku joined #salt
17:07 alvinstarr joined #salt
17:10 dxiri joined #salt
17:10 cachedout joined #salt
17:12 bltmiller joined #salt
17:14 asnnam with jinja can I string two comparisons together?
17:15 fyb3r joined #salt
17:15 nmccollum like:  % if grains['os'] == 'CentOS' & grains['virtual'] == 'physical' %}
17:15 CrummyGummy joined #salt
17:17 edrocks joined #salt
17:19 abednarik joined #salt
17:20 woodtablet joined #salt
17:20 cmarzullo That one blog post from above.
17:21 cmarzullo that's about it as related to salt.
17:21 cmarzullo I have a little scaffold generator that makes a workable foormula.
17:21 cmarzullo https://github.com/cmarzullo/saltscaffold
17:22 fredrick cmarzullo actually reading the blog post currently.
17:22 * PatrolDoom wants the post
17:22 cmarzullo That's basically the pattern we use.
17:22 whytewolf nmccollum: {% if (grains['os] == 'CentOS') and (grains['virtual'] == 'physical') %}
17:22 hemphill joined #salt
17:22 cmarzullo PatrolDoom: http://unicolet.blogspot.com/2016/05/a-not-so-short-guide-to-tdd-saltstack.html
17:22 PatrolDoom cmarzullo: ty vm
17:22 fredrick Nice scaffold
17:23 cmarzullo That scaffold is what we start with. But we have a number of other patterns and best practices we encourage.
17:23 edrocks is there a way to allow state.sls to run while a schedule job state.sls is running? We have a long running backup state that is in a cron job and are wondering if we can fix it with config or need to switch to something like cmd.run for the scheudle function
17:24 fredrick It is great, man that is going to speed me along incredibly.  I was trying to figure out how to do it.
17:24 cmarzullo We use a lot of feature toggles based on pillar. To turn on and off pieces of the formula.
17:25 Brew joined #salt
17:25 ronnix joined #salt
17:25 catpig joined #salt
17:25 fleaz joined #salt
17:31 ssplatt joined #salt
17:32 Trauma joined #salt
17:35 gimpy2938 joined #salt
17:36 gimpy2938 When running something on multiple minions with cmd.run, how can I tell which ones salt is waiting on when it hangs?
17:37 bltmiller gimpy2938: you can inspect status of currently running jobs *I think* with something like salt-run jobs.active
17:38 bltmiller review this: https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.jobs.html
17:39 gimpy2938 bltmiller: thanks, jobs.active was it
17:40 mavhq joined #salt
17:42 pipps joined #salt
17:42 DEger joined #salt
17:47 edrocks is there a way to tell if a state is running as a scheduled job or manually by call to state.sls? ie a grain or something?
17:47 Edgan joined #salt
17:48 cyteen joined #salt
17:49 pipps joined #salt
17:49 fyb3r grains are simply information about the minion itself, i.e. hardware specs.
17:50 edrocks fyb3r: do you know if there is some similar concept?
17:50 keimlink_ joined #salt
17:55 fyb3r salt.modules.state.running(concurrent=False)    from: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html
17:55 fyb3r something like that?
18:01 edrocks I think using the bg option on cmd.run may fix my issue
18:02 fyb3r Ah I thought you meant a way to see if maybe a separate user was executing a state file
18:02 nickabbey joined #salt
18:03 PatrolDoom joined #salt
18:08 jls591 joined #salt
18:10 mavhq joined #salt
18:12 mikecmpbll joined #salt
18:19 tapoxi anyone using dulwich?
18:19 tapoxi I'm trying to switch from pygit2 but getting this on startup: salt-master[13326]: [CRITICAL] Exception caught while initializing gitfs remote 'https://github.com/saltstack-formulas/users-formula.git': 'bool' object has no attribute 'replace'
18:20 tapoxi config is identical to my old pygit2 one
18:23 _JZ_ joined #salt
18:25 morissette joined #salt
18:26 yetanotherzero joined #salt
18:26 iggy open an issue... exceptions are bad
18:27 tapoxi seems to work under GitPython, odd
18:27 pipps joined #salt
18:29 keimlink joined #salt
18:32 pipps joined #salt
18:32 Brew joined #salt
18:34 mpanetta joined #salt
18:40 sh123124213 joined #salt
18:45 fracklen joined #salt
18:54 dj_goku joined #salt
18:54 dj_goku joined #salt
18:55 s_kunk joined #salt
18:57 sh123124213 joined #salt
18:58 DEger joined #salt
18:58 jas02 joined #salt
18:59 sarcasticadmin joined #salt
18:59 dxiri joined #salt
18:59 Praematura joined #salt
19:05 jas02 joined #salt
19:06 _Cyclone_ joined #salt
19:11 mavhq joined #salt
19:11 jas02 joined #salt
19:13 PatrolDoom joined #salt
19:16 pipps joined #salt
19:28 jas02 joined #salt
19:36 Ch3LL_ joined #salt
19:36 bantone joined #salt
19:36 tawm04_ joined #salt
19:36 stotch joined #salt
19:36 tedski joined #salt
19:36 duckfez joined #salt
19:36 ahammond joined #salt
19:36 blue joined #salt
19:36 majuscule joined #salt
19:36 lionel joined #salt
19:36 dustywusty joined #salt
19:36 saltsa joined #salt
19:36 mariusv joined #salt
19:36 bryguy joined #salt
19:36 tru_tru joined #salt
19:36 ashmckenzie joined #salt
19:36 Hydrosine joined #salt
19:36 pjs joined #salt
19:36 binocvlar joined #salt
19:36 haam3r joined #salt
19:36 utahcon_ joined #salt
19:36 AvengerMoJo joined #salt
19:36 theblazehen joined #salt
19:36 drags joined #salt
19:36 lazybear joined #salt
19:36 notCalle joined #salt
19:36 KevinAn27 joined #salt
19:36 nikogonzo joined #salt
19:36 mariusv joined #salt
19:36 baikal joined #salt
19:37 tercenya joined #salt
19:37 rome_390 joined #salt
19:37 patrek joined #salt
19:37 carmony joined #salt
19:37 bob_twinkles joined #salt
19:38 Gareth joined #salt
19:39 swa_work joined #salt
19:39 ToeSnacks joined #salt
19:40 whytewolf joined #salt
19:40 nickabbey joined #salt
19:40 Cidan joined #salt
19:45 abednarik joined #salt
19:45 pipps joined #salt
19:46 nicksloan joined #salt
19:49 jas02 joined #salt
19:51 _Cyclone_ joined #salt
19:54 spuder joined #salt
19:55 _Cyclone_ joined #salt
19:56 jas02 joined #salt
19:57 tapoxi joined #salt
20:03 oida joined #salt
20:03 fyb3r1 joined #salt
20:07 madboxs joined #salt
20:10 pipps joined #salt
20:11 Trauma left #salt
20:11 Trauma joined #salt
20:15 eprice joined #salt
20:16 abednarik joined #salt
20:17 eprice joined #salt
20:19 icebal joined #salt
20:19 amontalban joined #salt
20:19 amontalban joined #salt
20:21 eprice joined #salt
20:21 anthonyshaw joined #salt
20:26 eprice joined #salt
20:28 madboxs joined #salt
20:29 eprice joined #salt
20:33 eprice joined #salt
20:33 bltmiller joined #salt
20:37 pipps joined #salt
20:37 squishypebble joined #salt
20:40 bakins joined #salt
20:40 debian112 joined #salt
20:42 dj_goku joined #salt
20:42 dj_goku joined #salt
20:43 DEger joined #salt
20:46 mavhq joined #salt
20:47 bltmiller joined #salt
20:47 yetanotherzero joined #salt
20:49 madboxs joined #salt
20:54 mavhq joined #salt
21:01 debian112 joined #salt
21:05 wangofett joined #salt
21:06 pipps joined #salt
21:06 hemebond Yikes. pillar.get with merge changes the pillar data? That's really bad.
21:08 DEger joined #salt
21:10 madboxs joined #salt
21:12 cmarzullo not sure what you were expecting. It is a merge.
21:13 hemebond https://github.com/saltstack/salt/issues/38558
21:13 saltstackbot [#38558][OPEN] pillar.get("...", default=var, merge=true) updates default value | Description of Issue/Question...
21:13 cmarzullo of course you don't really have context. soo..
21:15 DammitJim joined #salt
21:17 hemebond merge shouldn't update your pillar data :-)
21:17 ssplatt you are merging. of course it should
21:17 hemebond Really?
21:17 cmarzullo yeah I mean you are merging
21:18 ssplatt i have default  foo: bar, i merge  custom   foo: baz.   i get foo=baz
21:19 hemebond Right. And now you have "foo: baz" for all other calls to that pillar.
21:19 hemebond That's what you expect?
21:19 cmarzullo yeah
21:19 hemebond Oh, okay.
21:19 cmarzullo A different minion will get different pillar.
21:19 cmarzullo It's not updating it in the master.
21:20 \ask joined #salt
21:20 hemebond True, but on the same minion, if you reference the "default" pillar data again, it will still have the new value.
21:20 hemebond I guess I didn't really understand what merge was for.
21:20 amontalban joined #salt
21:20 amontalban joined #salt
21:21 ssplatt what were you thinking would happen?
21:21 DEger joined #salt
21:22 hemebond Seems I misinterpreted "Specify whether or not the retrieved values should be recursively merged into the passed default." to mean it would just recursively merge the default values into the output.
21:22 ssplatt in that bug report, the first two quotes say the same thing to me
21:22 hemebond Not the other way around.
21:22 ssplatt no
21:22 ssplatt into default
21:22 ssplatt INTO
21:22 debian112 joined #salt
21:22 hemebond Yeah, I see it now.
21:22 hemebond "Seems I misinterpreted"
21:22 ssplatt yeah sorry, was trying to just add emphasis
21:22 hemebond Then again...
21:23 cmarzullo I usually use the map.jinja convention: https://docs.saltstack.com/en/latest/topics/best_practices.html#modularity-within-states
21:23 hemebond If you're doing a pillar.get, it must return a reference to the pillar key rather than a dict.
21:24 hemebond I can't actually see a use in merging back into default.
21:24 ssplatt you do it at the start of the run
21:24 ssplatt instead of in the middle
21:24 ssplatt so you can have default.sls
21:24 ssplatt and custom.sls
21:24 ssplatt or whatever you want the names to be
21:24 ssplatt or common.sls
21:25 ssplatt then overwrite things in common.sls with custom things based on use-case later on
21:25 keimlink joined #salt
21:27 hemebond Yeah, I still don't really need it to change the original pillar data.
21:27 hemebond Just whatever I'm working on.
21:28 hemebond So you'd do that in your pillar files?
21:29 cmarzullo A state formula has a bunch of defaults for the state. Then pillar overrides those defaults. The state file merges the defaults with the pillar at the top of the state. Then you use that for everything.
21:30 cmarzullo If I need specific changes I do separate jinja sets for those.
21:30 hemebond Sure, that makes sense. But according to the issue the pillar data has now been changed for other formulas and states.
21:30 madboxs joined #salt
21:31 hemebond So using pillar.get for defaults returns a reference to the actual pillar structure, causing your pillar data to change, not a temporary dict.
21:32 cmarzullo If I'm updating pillar data through a merge for say values for ssh. I wouldn't want ssh values for something else.
21:32 cmarzullo To me, it seems like your states are not the tight collections.
21:41 hemebond I guess to the reporters and I it seems odd to modify a parameter like that.
21:41 DEger joined #salt
21:41 pipps joined #salt
21:43 cachedout joined #salt
21:44 moeyebus9 joined #salt
21:44 mavhq joined #salt
21:44 sh123124213 joined #salt
21:44 hemebond Also, regarding those two quotes, they read very differently to me.
21:45 hemebond One says "returned data", which to me does not mean the original/source data dictionary.
21:46 cmarzullo Pillar is returned from the master. The values are megered into the returned data.
21:47 hemebond "returned from the master" if further back in the process from "returned from the function call"
21:47 hemebond So it depends on what you think of as returning the data.
21:47 cmarzullo I'll admit the second one is oddly worded.
21:48 cmarzullo or rather word choice could be improved.
21:48 hemebond The second one is clearest on the behaviour though.
21:48 hemebond (assuming you're talking about the second quote)
21:49 ssplatt hemebond: they mean the same to me in that one you do the merge, every other reference after that in the same salt run on that same minion uses that new, merged pillar data
21:49 cmarzullo sometimes it helps to think of the message queue behind salt. the minion puts a message on the queue asking for it's pillar. The master compiles and returns that data to the minion.
21:49 hemebond Right, because you think of "returned pillar data" not as the data returned by the pillar.get call, but the entire pillar data dict.
21:49 oida joined #salt
21:50 cmarzullo yeah.
21:51 hemebond Also, that first quote makes no sense at all if you're not using a pillar.get call for your defaults.
21:51 madboxs joined #salt
21:52 hemebond based on the behaviour that is
21:53 cmarzullo it's a shortcut so you don't have to put {% if my_pillar.my_value%}{% set otherval= pillar.get(myvalue)%}
21:54 cmarzullo isn't it the same in python?
21:54 hemebond But defaults can be a dict from anywhere.
21:54 cmarzullo sure.
21:54 cmarzullo but if you don't want to merge don't merge.
21:54 hemebond So the quote makes no sense based on current behaviour.
21:54 cmarzullo I mean. you are tilling it to merge.
21:54 hemebond Telling it to merge recursively into the returned pillar data.
21:55 cmarzullo yeah
21:55 hemebond Which would be 'test' in their example.
21:55 hemebond 'default' is just a dict.
21:56 hemebond So I thought merge=True would recursively merge default into 'test'.
21:56 hemebond 'default'
21:57 fyb3r joined #salt
22:01 amontalban joined #salt
22:01 amontalban joined #salt
22:02 pipps99 joined #salt
22:07 PatrolDoom joined #salt
22:10 hemebond Doing my own tests, without merge=True, myvar in "set myvar" doesn't get any nested default data.
22:10 hemebond So I have to use merge=True to get the recursive merge.
22:12 madboxs joined #salt
22:13 hemebond Using merge=True ALSO merges the pillar data back into the default dict.
22:14 hemebond Which means if the default data is used multiple times, with different pillar data each time, the data will basically be a merge of all of it.
22:17 debian112 joined #salt
22:19 invalidexception joined #salt
22:26 onovy joined #salt
22:28 whytewolf ugh, hate trying to handle quoting between bash, custom python module and salt.
22:30 dj_goku joined #salt
22:31 fyb3r Yeah, swapping between languages gets to be a difficult thing. I swear syntax errors are my number one enemy and its ALWAYS something with quotes
22:33 whytewolf it won'ting be so bad if the thing i was building a custom module for didn't have a nasty setting that needed strong quoting. rndc addzone is a royal pain
22:33 madboxs joined #salt
22:33 jeddi joined #salt
22:33 liviudm joined #salt
22:33 whytewolf but i got it in the end.
22:38 fracklen joined #salt
22:38 alvinstarr joined #salt
22:38 whytewolf i also wish cmd.run returned a dict object with stderr,stdout and retcode
22:39 iggy cmd.run_all ?
22:40 whytewolf sonva
22:40 whytewolf that is exactly what i needed.
22:41 whytewolf my brain must be friend pretty sure i know about that
22:42 whytewolf s/friend/fried
22:47 fyb3r left #salt
22:48 nickabbey joined #salt
22:49 fracklen joined #salt
22:51 sp0097 joined #salt
22:54 madboxs joined #salt
22:56 jas02 joined #salt
23:00 dxiri_ joined #salt
23:03 DEger joined #salt
23:10 DEger joined #salt
23:12 Kelsar joined #salt
23:15 madboxs joined #salt
23:19 sh123124213 joined #salt
23:20 dendazen joined #salt
23:23 jas02 joined #salt
23:24 fracklen joined #salt
23:28 sp0097 left #salt
23:32 abednarik joined #salt
23:33 pipps joined #salt
23:35 madboxs joined #salt
23:37 teclator joined #salt
23:42 teclator joined #salt
23:43 PatrolDoom joined #salt
23:47 pipps joined #salt
23:47 mavhq joined #salt
23:48 spuder joined #salt
23:53 brodor joined #salt
23:54 sh123124213 joined #salt
23:54 brodor So, what's the canonical way to get things installed in a minion that don't have something like a pkg?
23:55 brodor I see that you can have the master download a file and then use file.managed to copy it over, but that's sort of indirect
23:55 hemebond brodor: Does it have a package manager at all?
23:55 hemebond Or do you mean a zip or something?
23:55 jeddi joined #salt
23:56 brodor The background is that node.js is poorly sourced in most POSIX pkg managers, so the "standard practice" is to use a version manager which gets installed via a shell script
23:56 brodor Case in point, n: wget -L https://git.io/n-install | bash
23:56 brodor Scuse me, curl -L
23:57 hemebond Right. Yeah, usually just cmd.run or cmd.script
23:57 Xopher joined #salt
23:58 brodor So I can use file.exists to see if it's downloaded, and then cmd.run to go from there?
23:59 hemebond Oh, yes, if you want to transfer the n-install file yourself.
23:59 hemebond You would just make the cmd.run require the file.managed.

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