Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-04-25

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

All times shown according to UTC.

Time Nick Message
00:01 alexlist joined #salt
00:02 rem5 joined #salt
00:02 edrocks joined #salt
00:04 woodtablet *cough*
00:04 woodtablet *shakes fist at the monkey*
00:05 whytewolf ugh, not looking forward to the operating system gymnastics I am going to have to do for this...
00:05 woodtablet tons of map.jinja ?
00:06 whytewolf no, pdns athorative running in a network namespace while a pdns resolver runs in the global name space.
00:06 whytewolf it actually is more of an how the hell do i do this in redhat. vs a how do i do it in salt
00:07 raspado joined #salt
00:07 woodtablet pdns as in private dns or caching dns proxy ?
00:08 whytewolf PowerDNS
00:08 whytewolf https://www.powerdns.com/
00:08 whytewolf the answer to your question is Yes
00:09 raspado joined #salt
00:09 woodtablet so i did something.. hmm.. interesting
00:09 whytewolf the authoritive piece is for hosting new zones. the resolver is the caching dns piece
00:09 whytewolf interesting?
00:09 tkojames joined #salt
00:09 whytewolf like a monkey wearing a tutu interesting?
00:10 woodtablet i needed private dns, so i made cron job that pulls all the hosts out of inventory system, munges and builds a few zone files and uploads them to a private s3 bucket. while my unbound servers for the private dns servers pull those zone files reguarly and if changed reload dns
00:11 woodtablet the same unbound servers forward lookups, so it works for public lookups as well
00:12 toastedpenguin joined #salt
00:12 woodtablet but i am not sure of your situation... this is just something i needed
00:13 whytewolf I need a standard solution that i can use with both salt and designate.
00:13 tkojames_ joined #salt
00:13 whytewolf https://docs.openstack.org/developer/designate/
00:14 whytewolf i was looking at bind but ... i have done bind a million times
00:14 woodtablet i have too, never tried the POWA of power
00:16 woodtablet i gotta run to grab my kids, but api inserts in aws route53 is super easy, and making an api thing for your dns zone populator for unbound is pretty easy too i bet after my little venture. gl, see you tomorrow ^_~
00:16 woodtablet left #salt
00:16 whytewolf hehe i do route53, manipulation for my external stuff. this is 100% internall that i don't want out there
00:17 whytewolf welp, time to get dinner. then think about streaming
00:17 whytewolf l8r
00:17 Praematura joined #salt
00:37 hemebond Streaming?
00:38 XenophonF joined #salt
01:02 jas02 joined #salt
01:13 Musti joined #salt
01:14 rem5 joined #salt
01:32 renoirb joined #salt
01:35 Xenophon1 joined #salt
01:39 renoirb_ joined #salt
01:43 rem5_ joined #salt
01:46 onlyanegg joined #salt
01:46 Pyro_ joined #salt
01:46 pipps joined #salt
01:46 rhand joined #salt
01:49 scoates joined #salt
01:55 zerocoolback joined #salt
01:55 zerocoolback joined #salt
01:57 MTecknology hemebond: HELP!!!!
02:00 nikdatrix joined #salt
02:02 hemebond What's happened?
02:04 asyncsec joined #salt
02:19 mpanetta joined #salt
02:19 Praematura joined #salt
02:20 tkojames joined #salt
02:28 onlyanegg joined #salt
02:29 auzty joined #salt
02:31 mpanetta joined #salt
02:47 evle joined #salt
02:48 shortdudey123 joined #salt
03:03 edrocks joined #salt
03:06 hemebond Can't have been that bad then :-)
03:18 Praematura joined #salt
03:36 armyriad joined #salt
03:43 asyncsec joined #salt
03:45 fracklen joined #salt
03:51 sp0097 joined #salt
03:52 mpanetta_ joined #salt
04:01 nikdatrix joined #salt
04:15 raspado joined #salt
04:32 antpa joined #salt
04:33 onlyanegg joined #salt
04:43 antpa joined #salt
04:46 golodhrim|work joined #salt
04:57 Bock joined #salt
05:04 nafg__ joined #salt
05:05 edrocks joined #salt
05:06 onlyanegg joined #salt
05:09 sh123124213 joined #salt
05:13 antpa joined #salt
05:22 antpa joined #salt
05:24 mavhq joined #salt
05:33 rdas joined #salt
05:37 Tanta joined #salt
05:55 jas02 joined #salt
06:02 nikdatrix joined #salt
06:04 maxence joined #salt
06:05 yelin Hello, since the last release, I have an IPv6 DNS.
06:05 bdobbs joined #salt
06:06 yelin Hello, since the last release, I have an IPv6 DNS warning. I have no IPv6 and it is disabled in the minion config. How can I remove this warning ?
06:10 Praematura joined #salt
06:15 aldevar joined #salt
06:30 swa_work joined #salt
06:33 jas02 joined #salt
06:37 Ricardo1000 joined #salt
06:37 ProT-0-TypE good question @yelin. I've just upgraded and have the same issue
06:37 hemebond You didn't paste the warning.
06:38 yelin Hey, this is the warning : [WARNING ] Unable to find IPv6 record for "server" causing a 10 second timeout when rendering grains. Set the dns or /etc/hosts for IPv6 to clear this.
06:39 hemebond Is that on the minion or master?
06:39 antpa joined #salt
06:41 yelin It is on the minion when I run 'salt-call state.highstate'
06:42 hemebond Does the minion have ipv6 but the master not?
06:43 yelin Both master and minion do not have IPv6 address
06:43 hemebond Have you disabled ipv6 completely on the minion?
06:43 hemebond (not in Salt, but in the OS)
06:43 jas02 joined #salt
06:44 felskrone joined #salt
06:45 yelin I set IPv6 to false on the server. IPv6 is not disabled from sysctl
06:46 yelin (IPv6 is set to false on salt minion config)*
06:55 jas02 joined #salt
07:01 whytewolf the ipv6 setting in salt doesn't tell the grains to not try rendering the ipv6 grains. that is done by auto detecting if ipv6 is disabled in the operating system. if it isn't then it will try rendering it in the grains. causing the issue you see
07:04 preludedrew joined #salt
07:06 muxdaemon joined #salt
07:08 jas02 joined #salt
07:10 o1e9 joined #salt
07:10 netcho joined #salt
07:14 yelin Ok, well, thanks for the informations
07:17 fracklen joined #salt
07:17 _JZ_ joined #salt
07:18 fracklen joined #salt
07:19 jas02 joined #salt
07:21 Miouge joined #salt
07:23 jas02 joined #salt
07:23 Miouge How do I access the “saltenv” from a jinja? I want to do something like “master: {{ saltenv }}” in a state
07:24 Miouge s/master/branch
07:24 whytewolf ...
07:24 whytewolf {{ saltenv}}
07:25 whytewolf i actually use that in this https://github.com/whytewolf/dyn_salt_top/blob/master/top.sls
07:27 whytewolf kind of i have it jammed with other vars in this line
07:27 whytewolf {% set output = {saltenv:{grains['id']:state_list}} -%}
07:27 lasseknudsen2 joined #salt
07:28 whytewolf which just says create a enviroment set that only includes the minion this is running on. with the states in state_list
07:28 impi joined #salt
07:28 yuhl______ joined #salt
07:30 ntropy joined #salt
07:34 XenophonF joined #salt
07:38 muxdaemon joined #salt
07:39 Xenophon2 joined #salt
07:40 feld_ joined #salt
07:41 utahcon_2 joined #salt
07:41 jeblair_ joined #salt
07:41 duckfez_ joined #salt
07:41 Straphka joined #salt
07:41 leev joined #salt
07:41 daemonkeeper joined #salt
07:49 prg3 joined #salt
07:53 ronnix joined #salt
07:54 Miouge whytewolf: well that’s simpler than what I expected :D
07:58 raqua joined #salt
07:58 nikdatrix joined #salt
08:00 geomacy joined #salt
08:01 Rumbles joined #salt
08:05 mikecmpbll joined #salt
08:06 pbandark joined #salt
08:09 pbandark joined #salt
08:18 pbandark hi.. is it possible to pass any sls file as a parameter for "require_in"  requisite? In one sls file, I am verifying if provided url is present or not. if it returns 200 status then inlude other sls file otherwise stop execution. is it possible ?
08:21 XenophonF joined #salt
08:25 jdipierro joined #salt
08:29 s_kunk joined #salt
08:33 bdrung_work joined #salt
08:41 pbandark i guess i found the way but it seems i am hitting https://github.com/saltstack/salt/issues/22852
08:41 saltstackbot [#22852][MERGED] Cannot `require_in` an entire SLS | **Salt:**...
08:57 Mattch joined #salt
08:58 lasseknudsen joined #salt
09:06 miruoy__ joined #salt
09:06 miruoy__ moin
09:07 Dev0n joined #salt
09:18 tobiasBora joined #salt
09:23 it_dude joined #salt
09:28 Rumbles joined #salt
09:51 ronnix joined #salt
09:51 zerocoolback joined #salt
09:57 jhauser joined #salt
10:01 lasseknudsen joined #salt
10:06 N-Mi__ joined #salt
10:17 Reverend joined #salt
10:17 Reverend hey chaps
10:18 Reverend can I watch an sls from another one... i.e. can i watch my newrelic sls -from- my php one so that it restarts the service if anything changes?
10:20 ProT-0-TypE you have to do an import first
10:20 ProT-0-TypE then it will work
10:26 zerocoolback joined #salt
10:31 edrocks joined #salt
10:46 zerocoolback joined #salt
10:47 Reverend hmmmmmmmmmmmmmmm
10:47 Reverend okay =]
10:47 Reverend thanks ProT-0-TypE
10:52 Xenophon1 joined #salt
10:57 pbandark Reverend: https://docs.saltstack.com/en/latest/ref/states/requisites.html
11:16 ronnix joined #salt
11:17 antpa joined #salt
11:17 amcorreia joined #salt
11:24 Miouge joined #salt
11:26 lorengordon joined #salt
11:32 XenophonF joined #salt
11:32 Praematura joined #salt
11:32 felskrone is there a way to do a os.listdir() within a pillar file? i want to supply a directory listing to the minions via pillars
11:39 XenophonF felskrone: maybe the file module's readdir() function?
11:39 antpa joined #salt
11:40 XenophonF oh wait
11:40 XenophonF you said pillar
11:40 XenophonF Pillar rendering happens on the master.
11:41 paant joined #salt
11:44 Superpanda joined #salt
11:44 Superpanda left #salt
12:02 jdipierro joined #salt
12:04 felskrone XenophonF: yes, but maybe it will work, sec
12:10 zerocoolback joined #salt
12:20 XenophonF I can't seem to get this schedule.present state to work on Windows.
12:20 XenophonF https://gist.github.com/xenophonf/cb5cd30bb0e653f0d35ccab31d758dd5
12:26 felskrone XenophonF: file.readdir() works as i need it, i just need to filter the results a bit, thx
12:30 aphor joined #salt
12:33 candyman88 joined #salt
12:35 Electron^- joined #salt
12:40 ronnix joined #salt
12:42 nikdatrix joined #salt
12:47 candyman89 joined #salt
12:50 yelin left #salt
12:57 zerocool_ joined #salt
12:58 candyman88 joined #salt
12:59 edrocks joined #salt
12:59 racooper joined #salt
13:02 jdipierro joined #salt
13:13 Ch3LL joined #salt
13:17 Tanta joined #salt
13:20 tapoxi joined #salt
13:31 Brew joined #salt
13:38 gmoro joined #salt
13:38 jas02 joined #salt
13:45 impi joined #salt
13:48 brousch__ joined #salt
13:55 austin_ joined #salt
13:57 renoirb joined #salt
14:03 antpa joined #salt
14:04 DammitJim joined #salt
14:04 noark9 joined #salt
14:05 Pyro_ joined #salt
14:08 antpa joined #salt
14:10 spicyJalepeno joined #salt
14:18 rem5 joined #salt
14:26 pcn It looks like the salt repos have 2016.11.4 now.
14:30 domel joined #salt
14:32 mikecmpbll joined #salt
14:33 aphor joined #salt
14:37 mpanetta joined #salt
14:38 hasues joined #salt
14:39 ronnix joined #salt
14:41 Miouge joined #salt
14:41 whytewolf pcn: yes it went live yesterday
14:42 whytewolf pcn: you really should get on the salt-announce list. they tell you when things go live.
14:43 muxdaemon joined #salt
14:43 cmarzullo still no elasticsearch master job cache returner fixes.
14:43 cmarzullo :(
14:44 whytewolf was there a PR for fixes?
14:45 cmarzullo no
14:45 cmarzullo me just being hopeful.
14:45 greyeax joined #salt
14:45 whytewolf you could always submit a PR.
14:46 cmarzullo I tried to figure it out a couple times. My kung fu isn't strong enough.
14:47 ronnix_ joined #salt
14:49 whytewolf is there at least an issue submitted?
14:49 cmarzullo defo. I have paid ES support. Tried to get them to do it. They didn't bite. :(
14:50 PatrolDoom joined #salt
14:50 Guest73 joined #salt
14:51 jas02 joined #salt
14:52 pcn whytewolf: too much mail :(
14:52 ronnix joined #salt
14:52 whytewolf pcn: salt-announce only sends mail when a release is done.
14:52 asyncsec joined #salt
14:53 mikecmpbll joined #salt
14:53 whytewolf https://groups.google.com/forum/#!forum/salt-announce
14:55 icebal95 joined #salt
14:56 zerocoolback joined #salt
14:56 pcn whytewolf: I mean my inbox is pretty overflowing, I never see what's there.  Mea culpa.
14:56 whytewolf pcn. thats why filters are a thing in email.
14:57 whytewolf use them, love them
14:57 icebal joined #salt
14:57 pcn My filters are overflowing.  I've been using subaddresses to filter mail since qmail came out, but in the end it has to get read.
14:58 jas02 joined #salt
14:58 XenophonF joined #salt
14:59 whytewolf sounds like typical procedure overload.
15:02 Sketch any idea why pkg.installed always returns an error when specifying the version with kernel-headers/kernel-devel on aws, even though it successfully installs the requested version?
15:03 evle1 joined #salt
15:04 cscf Sketch, sounds like a bug.  Run apt on the command line and see if it returns 0 or not
15:05 whytewolf or yum if using aws linux
15:05 ahrs joined #salt
15:05 jdipierro joined #salt
15:06 it_dude joined #salt
15:07 feliks if it possible to diff two files on two salt minions via salt?
15:07 feliks *is
15:07 cscf Yeah, whatever pkg manager.  If it returns non-0 on success, that's a bug in the pkg manager, otherwise that's a salt bug
15:08 cscf feliks, like, diff /etc/apache2.conf across 2 minions?
15:08 cscf I'm not aware of a way
15:08 Sketch package manager returns 0
15:09 Sketch at least with the args i'm giving it
15:09 Sketch i don't know for sure what salt is passing to it
15:09 cscf Sketch, salt-call -l debug
15:09 whytewolf feliks: no, not possable the minions don't know about each others files so have no way to diff them.
15:10 Sketch [INFO    ] Executing command ['yum', '-y', 'install', 'kernel-headers-4.9.20-11.31.amzn1.x86_64', 'kernel-devel-4.9.20-11.31.amzn1.x86_64'] in directory '/root'
15:11 Sketch # yum -y install kernel-headers-4.9.20-11.31.amzn1.x86_64 kernel-devel-4.9.20-11.31.amzn1.x86_64 ; echo $?
15:11 Sketch 0
15:12 fujexo[m] joined #salt
15:12 feliks cscf: yes
15:12 sarcasticadmin joined #salt
15:12 pcn feliks: you could write a runner on the saltmaster that could do that by returning the file contents and having the master use the python difflib
15:12 feliks whytewolf: is there no way to transfer the files to the master and diff them there using builtins?
15:12 cscf Sketch, seems like you should report a bug, then
15:13 feliks pcn: ok thanks. but nobody built this yet?
15:13 Sketch guess so
15:14 whytewolf feliks: no one built it because it would be a security nightmare. but there is cp.push to get files from the minion to the master [needs to be enabled it is disabled by default]
15:14 J0hnSteel joined #salt
15:15 pcn whytewolf: For single-file-diff, nightmare seems extreme.  It's an invocation of cmd.run cat filename on each minion.
15:16 whytewolf pcn: if a minion can diff a file on another minion it is a nightmare.
15:16 pcn I'm suggesting a runner from the master
15:17 whytewolf yes, but that a. doens't let the minion know about the diff. which was the original question. and b. isn't what i was talking about.
15:17 feliks whytewolf: so id rather stay away from it and do the diffs another way?
15:17 feliks whytewolf: sry, didnt read the follow ups. seems like a misunderstanding
15:18 icebal joined #salt
15:18 whytewolf if a minion could do it. then a minion could say salt-call filesync.diff /dev/null 'target':/etc/shadow
15:19 whytewolf and get the contents of the shadow file on another server
15:19 mugundan joined #salt
15:19 pcn whytewolf: I don't read this as "can a minion diff on another minion", I read it as "can salt allow a diff of two files in the infrastructure", but not necessarily from one minion to another.
15:20 bantone joined #salt
15:20 pcn Your point is correct, I'm not disagreeing there, I'm not sure it's directed at exactly the question being asked, though.
15:20 pcn That or I've missed a lot of context.
15:21 whytewolf depends. if this is meant to be included from a state. kind of negates the master being involoved with it
15:21 whytewolf if this is just a cli exersize then yes you are correct
15:21 Sketch aha, it's not a bug.  having x86_64 in the name makes it fail the comparison check salt is doing after running yum
15:22 Sketch yum let's you install name.x86_64
15:22 Sketch but whatever salt is doing to compare version numbers afterwards gets confused by the x86_64
15:22 nikdatrix joined #salt
15:23 whytewolf Sketch: that is because of the way yum outputs the packages named. the .x86_64 gets seperated out to version so isn't part of the name anymore
15:23 asyncse__ joined #salt
15:23 freelock joined #salt
15:23 saintaquinas[m] joined #salt
15:23 jerrykan[m] joined #salt
15:23 gomerus[m] joined #salt
15:23 ThomasJ|m joined #salt
15:25 icebal joined #salt
15:25 Sketch guess i can {% set kernelrelease = grains.get('kernelrelease')|replace(".x86_64", "") %}
15:25 bob97 joined #salt
15:29 ssplatt joined #salt
15:31 Trauma joined #salt
15:31 muxdaemon joined #salt
15:31 jdipierro joined #salt
15:37 amcorreia joined #salt
15:41 Praematura joined #salt
15:43 jas02 joined #salt
15:48 bunjamins joined #salt
15:48 icebal- joined #salt
15:50 bunjamins hey, i'm having trouble rendering a set of sls pillars where i user the same pillar reference in multiple sls files.  I'm using the filebeat formula and want to set multiple prospectors, depending on the personality of the server it woudl have multiple
15:51 bunjamins filebeat:   log_paths:     -       paths:
15:51 bunjamins in multiple files I set new paths
15:52 bunjamins should this be possible, or do i need to differentiate the pillar names in each file to make this work?
15:52 PatrolDoom joined #salt
15:56 aldevar left #salt
15:57 aphor joined #salt
15:58 raspado joined #salt
16:02 __aphor__ joined #salt
16:03 test joined #salt
16:03 pcn bunjamins: can you put the example in a gist or something?
16:04 Guest73 joined #salt
16:05 tercenya joined #salt
16:05 bunjamins yeah
16:05 Guest73 joined #salt
16:07 bunjamins https://gist.github.com/anonymous/02e6335957e66f23c3e3b8e941e56451
16:09 pcn bunjamins: You will only get 1 out of that.
16:09 pcn saltstack doesn't try to do merges of values in that way.
16:10 pipps joined #salt
16:12 pipps joined #salt
16:12 bunjamins do you know of a way to accomplish this?
16:12 whytewolf https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-source-merging-strategy see if that helps
16:13 bunjamins looks promising, thanks pcn and whytewolf
16:15 wavded joined #salt
16:16 impi joined #salt
16:19 utahcon joined #salt
16:19 utahcon_ joined #salt
16:25 juntalis joined #salt
16:28 mdpolaris joined #salt
16:30 nixjdm joined #salt
16:31 mdpolaris Does anyone know if it is possible to use s3fs with a bucket in a remote region? The docs don’t mention being able to set a region in the master.conf, but I know the s3 module allows a region to be passed in to the calls
16:34 gtmanfred that is a good question, i don't know the answer
16:34 do3meli joined #salt
16:35 pcn mdpolaris buckets are global
16:36 mdpolaris right, but the s3s module tries to auto generate the path
16:36 mdpolaris and it bases it off the the location where the master is running
16:36 pcn Ah, got it.
16:36 mdpolaris i should have been more clear. my fault. :)
16:37 mdpolaris I might am going to try some of the settings listed here: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.s3.html
16:37 gtmanfred yeah, that works for the module, i am not sure if it works for the fileserver, but it might
16:38 sh123124213 joined #salt
16:39 whytewolf it might https://github.com/saltstack/salt/blob/develop/salt/fileserver/s3fs.py#L322-L324
16:39 gtmanfred neat
16:39 whytewolf s3.location is also there
16:43 pipps joined #salt
16:44 mdpolaris i just added it, i can confirm it does work
16:45 mdpolaris it has to be added to the master.conf. I tried in the pillar for the master-minion, but i didn’t expect that to work since the minion isn’t executing this
16:51 aneeshusa joined #salt
16:53 rem5_ joined #salt
16:54 cyteen joined #salt
16:58 Bryson joined #salt
16:58 brent_ joined #salt
17:00 mikecmpbll joined #salt
17:01 brent_ joined #salt
17:04 xet7 joined #salt
17:05 Trauma joined #salt
17:08 brent_ joined #salt
17:14 brent_ joined #salt
17:17 jvelasquez joined #salt
17:17 djgerm joined #salt
17:20 wendall911 joined #salt
17:29 wendall911 joined #salt
17:29 XenophonF Are schedule states supported on Windows?
17:30 XenophonF https://gist.github.com/xenophonf/cb5cd30bb0e653f0d35ccab31d758dd5
17:30 XenophonF That gives me every impression that the cmd.script function was scheduled hourly, but then schedule.list returns nothing
17:33 tawm04 joined #salt
17:34 s_kunk joined #salt
17:41 geomacy joined #salt
17:44 whytewolf don't know why they wouldn't be supported
17:44 cyborg-one joined #salt
17:46 whytewolf does anything show when you salt-call -l debug the state that has schedule.present?
17:48 Trauma joined #salt
17:51 cyborg-one joined #salt
17:51 Praematura joined #salt
17:58 XenophonF let me try that
17:59 tercenya joined #salt
18:00 jas02 joined #salt
18:01 it_dude joined #salt
18:02 rem5 joined #salt
18:08 censorshipwreck joined #salt
18:15 fracklen joined #salt
18:16 KyleG joined #salt
18:16 KyleG joined #salt
18:17 geomacy joined #salt
18:19 ChubYann joined #salt
18:21 miruoy__ Could someone point me in the right direction with this config? https://github.com/Lothiraldan/saltpad/blob/master/docs/installation/salt-api-cherrypy-cors.md
18:21 miruoy__ I'm unable to validate my external auth.
18:22 jas02 joined #salt
18:23 miruoy__ i believe the issue is in my master conf but this looks fine when checking the documentation online
18:29 XenophonF whytewolf: I don't see anything untoward in the debug output - https://gist.github.com/xenophonf/cb5cd30bb0e653f0d35ccab31d758dd5#file-debug-out
18:40 englishm_llnw joined #salt
18:41 sh123124213 joined #salt
18:44 whytewolf XenophonF: you are correct nothing in that says why it isn't showing up in the list... and it looks to be adding it everytime... not sure if the list isn't returning correctly and it is adding it everytime
18:46 afics joined #salt
18:48 whytewolf i do notice that the list is empty for the internal command also
18:54 andi- joined #salt
18:57 sp0097 joined #salt
18:58 antpa joined #salt
18:59 tercenya joined #salt
19:00 jas02 joined #salt
19:02 aphor joined #salt
19:08 brasticstack joined #salt
19:09 DammitJim joined #salt
19:12 onlyanegg joined #salt
19:13 brasticstack Hi! I'm curious- are there any conventions that should be followed for the return values of execution modules? I'm writing a custom module and I'm not sure how I'd get salt to display a useful error message to the user if the execution failed.
19:13 Rumbles joined #salt
19:14 _KaszpiR_ joined #salt
19:14 Inveracity joined #salt
19:17 brasticstack or, specifically, to display it in red as error output
19:18 tapoxi joined #salt
19:20 jdipierro joined #salt
19:20 t0m0 joined #salt
19:21 ThomasJ joined #salt
19:21 s0undt3ch joined #salt
19:21 sh123124213 joined #salt
19:22 woodtablet joined #salt
19:25 antpa joined #salt
19:27 fracklen joined #salt
19:28 jdipierro joined #salt
19:31 pipps joined #salt
19:37 jdipierro joined #salt
19:37 jas02 joined #salt
19:39 Guest73 joined #salt
19:41 jdipierr_ joined #salt
19:43 jdipierro joined #salt
19:43 lorengordon joined #salt
19:53 Praematura joined #salt
19:54 antpa joined #salt
19:54 DammitJim joined #salt
19:55 DammitJim what is the best way to define pillar data
19:55 DammitJim where one has somewhat of a key,value pair
19:55 DammitJim where the key can repeat itself
19:56 DammitJim so, something like:
19:56 DammitJim group1: user1
19:56 DammitJim group1: user2
19:56 DammitJim because I'm going to use that pillar data to build a file
19:56 DammitJim in a for loop
19:56 whytewolf ...
19:56 gtmanfred group1:
19:56 gtmanfred - user1
19:57 gtmanfred - user2
19:57 gtmanfred list
19:57 whytewolf ^
19:57 DammitJim oh
19:57 DammitJim dammit
19:57 gtmanfred dammit jim!
19:57 DammitJim sorry...
19:57 gtmanfred :P
19:58 whytewolf I'm a doctor not an statistician
19:58 DammitJim now I have to remember how to dig a list like that in my template
19:58 DammitJim I'm so lame
19:59 whytewolf for value in salt.pillar.get('group1').items()
19:59 whytewolf :P
19:59 gtmanfred it is a list
19:59 gtmanfred no need for .items
19:59 whytewolf oh yeah
20:00 whytewolf so used to working with dicts
20:00 DammitJim wait, what?
20:00 DammitJim so, how do I reference group
20:00 DammitJim and how do I reference users?
20:00 whytewolf for user in salt.pillar.get('group1')
20:00 DammitJim group1 is generic
20:00 DammitJim I might have group2
20:01 DammitJim or developer_group
20:01 DammitJim so, pillar might look like:
20:01 gtmanfred so, if you have multiple ones, you need to put them under a header, then call it with the items
20:01 DammitJim group1:
20:01 DammitJim - user1
20:01 DammitJim -- user2
20:01 DammitJim group 2:
20:01 gtmanfred right
20:01 gtmanfred stop
20:01 DammitJim thanks
20:02 DammitJim so, I would need to do: for group, values in pillar.get('groups', {} ).items()
20:02 DammitJim right?
20:02 gtmanfred yes
20:02 DammitJim then loop through the values
20:03 whytewolf da
20:03 jas02 joined #salt
20:04 DammitJim ugh
20:04 DammitJim something is borked
20:04 DammitJim I did
20:05 whytewolf GIST!
20:05 antpa joined #salt
20:05 DammitJim https://gist.github.com/anonymous/2ae3dc427ec16830f47bbb9f6493fb1f
20:05 DammitJim embarrassed
20:06 sushant joined #salt
20:06 DammitJim I think my pillar might be messed up
20:06 DammitJim group1:
20:07 DammitJim - user1
20:07 DammitJim - user2
20:07 whytewolf ... add your full pillar to the gist
20:07 scoates joined #salt
20:09 dfinn joined #salt
20:12 lorengordon joined #salt
20:14 renoirb joined #salt
20:16 DammitJim OK, I think the problem is that I would need to do for command in commands.group1 in my second for loop
20:16 DammitJim is there any way to do this dynamically?
20:16 rem5 joined #salt
20:20 gtmanfred no? because that is what items is for
20:21 DammitJim so: for command in commands.iteritems()
20:21 gtmanfred no, just items()
20:21 gtmanfred for group, values in pillar.get('groups', {} ).items()
20:21 gtmanfred values will have the list of users
20:22 DammitJim https://gist.github.com/anonymous/ca9bc98baaa04dcf78f4d90ae5e8c266
20:22 DammitJim so, what do you do with users?
20:22 DammitJim for user in users.items() ?
20:23 gtmanfred gist your pillar data too
20:24 DammitJim https://gist.github.com/anonymous/970fb1112ed79e7a7c677448e3d22b1b
20:24 gtmanfred that does not have a nopass_section
20:24 gtmanfred so it won't match the pillar request you are making
20:25 DammitJim nopass_section is section, I don't know what happened to the paste
20:25 DammitJim sorry
20:25 gtmanfred give me one gist with all of the information to reproduce what you are seeing
20:26 whytewolf DammitJim: create a github account and you can edit your gists and add multiple files...
20:27 DammitJim whytewolf, that's what I was trying to do... edit my own gists and that's why it was taking me a while
20:27 DammitJim let me create 1 gist first
20:28 DammitJim https://gist.github.com/anonymous/5b497613ffc566515bca797a0ff2aba3
20:29 gtmanfred this will never match
20:29 gtmanfred {%- if pillar.get('nopass_sections', {}) == None %}
20:30 DammitJim oh ok, I'll remove it
20:30 gtmanfred i left a comment that should work
20:30 DammitJim ty sir
20:31 gtmanfred how are you testing that it doesn't work?
20:31 DammitJim I'm running the state with test=true
20:31 DammitJim you just removed .items()
20:32 gtmanfred eys
20:32 DammitJim I tried that, too and didn't work
20:32 gtmanfred yes
20:32 DammitJim :(
20:32 gtmanfred what didn't work about it?
20:32 DammitJim Pillar failed to render with the following messages:
20:32 DammitJim ----------
20:32 DammitJim Rendering SLS 'sudo.nopass' failed. Please see master log for details.
20:32 Splix76 joined #salt
20:32 antpa joined #salt
20:32 DammitJim does that mean my pillar is screwed up?
20:33 DammitJim my pillar.items shows just fine:    nopass_sections:
20:33 DammitJim ----------
20:33 DammitJim bamboodeploy:
20:33 DammitJim - /usr/sbin/service railscheduler restart
20:33 DammitJim - /bin/systemctl restart lstemailq.service
20:33 DammitJim OMG, that's too much
20:33 gtmanfred it failed to render a file that is located at sudo/nopass.sls
20:34 gtmanfred probably at /srv/pillar/sudo/nopass.sls
20:34 tercenya joined #salt
20:34 DammitJim right, that's the pillar I posted
20:35 DammitJim I bet you a fat fingered something
20:37 gtmanfred DammitJim: https://gist.github.com/gtmanfred/18695f879bda1bb738251c95be047229
20:37 gtmanfred it works here
20:37 tkojames joined #salt
20:38 gtmanfred also, you could totally get rid of the extra for loop by using the jinja join filter
20:38 DammitJim thanks
20:38 DammitJim now you are making my head spin
20:38 gtmanfred included that in the gist ijust posted
20:39 DammitJim thanks
20:39 DammitJim I'm learning
20:41 prg3 joined #salt
20:43 DammitJim man, why does the master log say nothing
20:45 sp0097 Hi there, I am running into an issue where we have an external pillar defined, and when I do a highstate, I get “Failed to load ext_pillar http_yaml: 'args' parameter should be dict, list or tuple. Not <type 'NoneType’>” .  Just some background, this has been working for a while ( I think I fatfingered something, can’t figure what though ), the http pillar points to a server we have in aws.  The aws web server is still up and running.  I am on redhat
20:45 sp0097 11.4 of salt.  Any suggestions?
20:47 sp0097 …and the master/minion are on the same machine.
20:47 fracklen joined #salt
20:49 jdipierro joined #salt
20:51 onlyanegg joined #salt
20:51 edrocks joined #salt
20:52 hasues left #salt
20:52 rem5 joined #salt
20:53 woodtablet the value in the pillar is coming up none
20:53 woodtablet your "args" is not being defined
20:59 sp0097 hmm, I don’t have any pillar keys named args…double checking again though.  I should be checking the remote pillar files?
21:00 jhauser joined #salt
21:01 asyncsec joined #salt
21:01 aphor joined #salt
21:02 whytewolf args referes to the list of arguments below http_yaml in your config. most likely you don't have neough spacing on them. add two more spaces to what you currently have. [the first letter of the line should line up under the second t in http, when using a fixed font]
21:14 teratoma joined #salt
21:17 sp0097 ext_pillar:
21:17 sp0097 - http_yaml:
21:17 sp0097 url: http://amazonaws/versions/build_versions.txt
21:17 sp0097 - http_yaml:
21:17 sp0097 url: http://amazonaws/versions/reporting_build_versions.txt
21:17 sp0097 It’s correct as far as I can tell, but still experiencing same error.
21:21 whytewolf url is one space to far to the left
21:21 whytewolf add a space to it
21:22 sp0097 joined #salt
21:23 onmeac joined #salt
21:25 it_dude joined #salt
21:26 XenophonF I wonder what text editors people are using where they end up having indentation errors like that.
21:27 sp0097 I am using vi
21:27 XenophonF like old school Unix vi/ex or something somewhat modern like vim?
21:28 sp0097 whytewolf, it’s the way you suggested.  When I pased:q!
21:28 tercenya joined #salt
21:28 schemanic joined #salt
21:28 sp0097 oops,  when I pasted it doesn’t look correct.
21:29 whytewolf yeah i was going off of what you pasted which isn't correct
21:29 sp0097 [root@rhel144 master]# vi --version
21:29 sp0097 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 12 2016 08:08:03)
21:29 XenophonF that should have support for yaml
21:29 whytewolf lol, it does. I use vim all the time for salt
21:30 whytewolf sp0097: hint. install salt-vim
21:30 sp0097 yum install salt-vim?
21:30 whytewolf https://github.com/saltstack/salt-vim
21:30 XenophonF there you go
21:30 whytewolf sp0097: have you used plugins to vim before?
21:31 sp0097 no, not really.
21:31 * XenophonF wanders back to the Emacs frame, mumbling about heathens and the purifying fire at the end of days.
21:32 whytewolf XenophonF: you shall burn in the fires of the eternal editors. forever with the hand cramps of old
21:32 XenophonF LOL
21:32 XenophonF man editor support is key to getting indent-sensitive syntax right
21:33 XenophonF that's proving to be a serious stumbling block to getting people to adopt salt at work
21:34 XenophonF I'm like, Emacs! vim! Notepad++!
21:34 XenophonF Only a couple of guys are programmers so...
21:35 whytewolf I hate that nano replaced vi as the default infacto editor in linux
21:35 whytewolf I rip that crap out
21:36 jdipierro joined #salt
21:37 PatrolDoom joined #salt
21:38 XenophonF no kidding
21:38 XenophonF it's the notepad of unix
21:39 whytewolf yeah. although it is worse. it is just a rewrite of pico
21:39 whytewolf and pine/pico should have stayed as a college project.
21:42 XenophonF those were great for the first few weeks of using unix
21:42 XenophonF but that's it
21:44 whytewolf pico was good the first day. till i learned how not to leave :wq all over the place
21:52 brasticstack :x
21:52 brasticstack Same as :wq without the reaching
21:54 Praematura joined #salt
21:55 N-Mi__ joined #salt
21:56 pipps joined #salt
21:56 whytewolf well, kind of :x is closer to :up then :wq. but :x is actually a better way as it won't update the file if no changes were made in the buffer
21:57 scoates joined #salt
22:00 brd whytewolf: I noticed a recently (6mon) hired sys admin at one job using nano so I quickly wrote a recipie to purge it from the environment to force him to learn something else
22:01 whytewolf brd: I like this. this is good
22:01 MajObviousman potentially dumb question: is there a command line option to show what minions would be contacted by my given matcher string without actually running anything?
22:01 MajObviousman like a --do-nothing
22:01 MajObviousman I've been doing test.ping a lot, but that issues out jobs and it's cluttering up my job cache considerably
22:02 whytewolf anything you send will show up in the job cache.
22:02 MajObviousman so I don't wnat to send anything
22:03 MajObviousman my understanding is the master deciphers what minions will get the message, not broadcasting it out
22:03 whytewolf ... but it is the minion that decideds if it matches your query. so you have to send something
22:03 MajObviousman huh
22:03 MajObviousman so I have it backwards then
22:04 antpa joined #salt
22:04 whytewolf the master does a kind of weak attempt at calculating it.
22:05 MajObviousman and I'd wager that weak attempt skips pillar or grain match clauses
22:05 whytewolf oh ... i think i might have one way... if you have a mine_function setup. you could use the mine.get runner
22:05 MajObviousman I think I do. At least I see that in my job caches and logs all the time
22:05 * MajObviousman will look into that angle, thanks for the tip
22:05 whytewolf the master does use grains. it uses the grains cache
22:07 MajObviousman hmm. It's also the master that compiles the pillar and only sends relevant entries out to each minion, so maybe it does factor those in also
22:08 scoates joined #salt
22:28 pipps joined #salt
22:32 TomJepp joined #salt
22:36 scoates joined #salt
22:49 Razed11 joined #salt
22:50 Razed11 I'm upgrading a Salt master from version 2015.5.3 (Lithium) to 2016.11.4 (Carbon). How can I know if my configuration file is compatible?
22:51 rav joined #salt
23:10 preludedrew joined #salt
23:12 fracklen joined #salt
23:18 toastedpenguin joined #salt
23:18 masber joined #salt
23:32 ishiz joined #salt
23:33 sh123124213 joined #salt
23:34 ishiz Hi there. I was wondering if anyone has seen this before, "Jinja variable is undefined." The variable IS defined because I am using it elsewhere in the file just fine. https://pastebin.com/pPbEvJuR
23:35 onlyanegg joined #salt
23:35 woodtablet _pyro - you here?
23:36 woodtablet bah
23:36 ishiz With those states commented out, there are no issues. When uncommented, I get: "Unable to manage file: Jinja variable 'phabricator_dir' is undefined" for the /etc/init.d/aphlict state.
23:36 ishiz But that variable is being used in other states without issues.
23:40 woodtablet brd: lols (i am slowly catching up now)
23:40 brd :)
23:41 woodtablet ishiz -- you need to define the variable phabricator_dir
23:42 ishiz It's imported
23:43 woodtablet can you paste the gist for the map.jinja ?
23:43 woodtablet maybe the minion you are trying to apply this to does not match what is in the maps, and there might not be a default defined
23:44 ishiz Yeah, but until then: the variable is defined simply as a string. In the commented-out state above, if I salt-call in debug mode and look at the rendered output, it is rendered correctly.
23:44 bbbryson joined #salt
23:44 theblazehen joined #salt
23:44 ishiz If I uncomment out the states and render the output, some of the states have the variable rendered, others don't.
23:45 ishiz I am wondering if there is some weird unicode or something that is causing two variable names to look identical but not actually match.
23:48 woodtablet hmm.. thats weird. so phabricator_dir shows up fine for aphlict-config when this commented out ?
23:48 juntalis joined #salt
23:49 ishiz I fixed it. Even though the names look identical in every way, when deleting the lines it is used and retyping them manually, it fixed it.
23:49 woodtablet ohh wow you have some weird character in there.
23:49 ishiz I copy-pasted the two strings into diff and it said it was identical, but I guess not.
23:50 woodtablet that wont show it
23:50 woodtablet glad you figured it out tho
23:50 woodtablet nice
23:50 ishiz Thank you woodtablet for the sanity check
23:50 woodtablet you are welcome ^_^
23:51 rav_ joined #salt
23:56 Praematura joined #salt

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