Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-01-16

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

All times shown according to UTC.

Time Nick Message
00:00 saltslackbridge joined #salt
00:04 saltslackbridge <gtmanfred> Mtecknology use the indent jinja filter
00:08 MTecknology What's that look like with include?  I tried to guess  '' {% include 'foo/bar.sls' with context | indent(width=6) %} ''
00:13 MTecknology Might be better to just ask myself if I'm trying to do the wrong thing...
00:29 MTecknology Does "include: []" in states/pillar still not support -ignore_missing? :(
00:36 stanchan joined #salt
00:57 MTecknology The only way I'm getting to work so far is by 1) making sure stuff in files to be included is spaced as much as where I'm going to need it and 2) making sure {% include .. %} is at the begging of the line.   I'm definitely not a fan of this approach.
01:03 MTecknology GOT IT!!! :D   {% filter indent() %}\n{% include %}\n{% endfilter %}  :D
01:11 MTecknology I thought I did anyway... rendering is claiming that indent(first=True) is not a thing, but the docs disagree. :(
01:13 whytewolf MTecknology: try indentfirst instead of first
01:16 MTecknology It doesn't complain about indentfirst, but true or false, it seems to not impact what's rendered.
01:17 whytewolf strange. [that it doesn't change the render, not that it doesn't complain]
01:17 MTecknology I suspect a leading newline is getting in here.
01:17 whytewolf maybe
01:19 MTecknology there we go... that's less terrible. :D
01:20 MTecknology Yay!! It's working in a test VM. Now I just need to apply what I learned to ~500 files.
01:20 MTecknology 400*
01:21 MTecknology whytewolf: gtmanfred: Thanks! :)
01:31 zerocoolback joined #salt
01:36 Larri joined #salt
01:42 major joined #salt
01:50 zerocoolback joined #salt
01:57 UtahDave joined #salt
02:00 masber joined #salt
02:22 nomeed joined #salt
02:24 RandyT joined #salt
02:24 RandyT joined #salt
02:56 ilbot3 joined #salt
02:56 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.8, 2017.7.2 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
03:04 lkthomas joined #salt
03:09 shiranaihito joined #salt
03:50 v0rtex joined #salt
03:57 MTecknology Is there such thing as a module that's only available to the master (for pillar rendering)?
03:58 whytewolf a runner?
04:06 MTecknology oh well.. had to check to see if it was an easy task. The module isn't doing anything secretive so it's fine, but woulda been nice if it were convenient.
04:16 shred joined #salt
04:22 lompik joined #salt
04:56 shred left #salt
05:10 evle joined #salt
05:56 stanchan joined #salt
05:56 Hybrid joined #salt
05:57 lompik joined #salt
06:12 aruns__ joined #salt
06:16 aruns joined #salt
06:20 zerocoolback joined #salt
06:32 Rubin joined #salt
06:38 jacksontj joined #salt
06:51 miruoy joined #salt
06:56 qwert joined #salt
07:05 LocaMocha joined #salt
07:17 Eugene joined #salt
07:22 esteban joined #salt
07:38 msn joined #salt
07:43 aruns__ joined #salt
07:45 yuhl joined #salt
07:47 darioleidi joined #salt
07:50 aldevar joined #salt
07:51 Ricardo1000 joined #salt
07:57 lkthomas does salt command have to be running on root account ?
07:58 Lionel_Debroux joined #salt
08:20 Hybrid joined #salt
08:22 zulutango joined #salt
08:25 eseyman lkthomas: it doesn't but running as a non-root user limits what it can actually do
08:27 Tucky joined #salt
08:31 miruoy joined #salt
08:42 oyvindmo joined #salt
08:49 lkthomas eseyman, thanks
08:49 lkthomas so on latest version of salt, state.apply is same as highstate, correct ?
08:50 eseyman that's how I understand it, yes
08:56 RandyT joined #salt
08:56 RandyT joined #salt
08:58 lkthomas eseyman, okay thanks
09:00 zerocoolback joined #salt
09:11 stanchan joined #salt
09:28 toanju joined #salt
09:37 babilen lkthomas: state.apply is an alias for state.highstate and state.sls depending on the number of arguments you give it. state.sls_id has not yet been integrated
09:53 ebbex joined #salt
09:59 lompik joined #salt
10:06 sayyid9000 joined #salt
10:08 cyteen joined #salt
10:31 sayyid9000 joined #salt
10:36 Cadmus joined #salt
10:39 Edgan joined #salt
10:42 Cadmus Hello, I've got a cluster of servers running a service that I'm trying to build with Salt, but there's a coordination issue I need to solve but I don't really know the right terms to search.
10:43 Cadmus Basically every server of the cluster needs to get to a certain state, then a command needs to be run on just one of them
10:46 m4rk0 zer0def, I'm already using pkg.installed but it's broken for package downgrades...
10:46 ebbex Cadmus: https://docs.saltstack.com/en/latest/topics/orchestrate/orchestrate_runner.html
10:47 Cadmus ebbex: Thanks
10:59 Cadmus Yeah, this looks like what I'm after, now to rewrite all my statements
11:01 ebbex Cadmus: :)
11:02 Cadmus With luck they'll be more readable from hereon in :P
11:06 sh123124213 joined #salt
11:11 CrummyGummy joined #salt
11:30 Elsmorian joined #salt
11:42 kedare joined #salt
11:45 Elsmorian joined #salt
11:51 oida joined #salt
11:56 Mattch joined #salt
12:18 zerocoolback joined #salt
12:28 Dev0n joined #salt
12:29 rockey joined #salt
12:34 sayyid9000 joined #salt
12:40 squig joined #salt
12:42 squig HI
12:42 squig left #salt
12:42 squig joined #salt
12:43 squig Hi (wondering if I am voiced)
12:43 squig I wondered if salt has a "UI" these days
12:43 squig I generally run foreman as an interface, but this is a new install in a big company and the foreman is too much too quickly for the team here
12:44 squig I am wondering how I can get some one to see whats going on?
12:51 impi joined #salt
12:57 XenophonF Salt Enterprise is probably the way to go.
12:58 XenophonF saltpad is effectively dead
12:58 XenophonF I'm not aware of others.
12:59 XenophonF well, IIRC there was something called Molten
12:59 XenophonF https://github.com/martinhoefling/molten
12:59 XenophonF https://github.com/saltstack-formulas/molten-formula
13:00 XenophonF Maybe someone else knows more about it?  I haven't had a chance to play with it.
13:01 squig salt enteprise costs $$$?
13:01 XenophonF well yes but you get support and your money helps fund development
13:02 squig but I don't have $$$
13:02 XenophonF well do you have EUR?  ;)
13:03 squig really it depends how its licensed
13:03 babilen They presumably want you to buy enterprise level support on simply licensing their UI
13:03 squig I dont really need support.
13:04 squig when I cant find the price :) I am worried about the cost
13:04 babilen It is rather expensive
13:04 XenophonF If I could buy per-incident support or a block of hours from them, I would.  I'm having a hell of a time with these damn SaltReqMessageTimeoutException errors.  :(
13:05 babilen Have you tried the TCP transport?
13:05 XenophonF not yet but it's on my to-do list
13:05 babilen good
13:06 XenophonF I'm going to enable the other transports on the master and then test against known-bad minions.
13:07 squig do I get support hours for the time I have given them patches?
13:08 yuhl_ joined #salt
13:08 XenophonF I wonder how difficult it would be to use SAML SSO or SAML ECP with salt-api...
13:09 CrummyGummy hi, how can I add search domains to a host salt is managing?
13:13 CrummyGummy it feels like it should be handled with DHCP but I haven't worked out how to handle that with dnsmasq
13:17 XenophonF You'd push the additional domain search suffixes like so: dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com
13:19 XenophonF that's DHCP option 119
13:19 XenophonF you could use Salt to modify /etc/resolv.conf (e.g., a file.replace state), but I think updating your dnsmasq config is the better route
13:20 CrummyGummy thanks
13:21 darioleidi joined #salt
13:22 Nahual joined #salt
13:30 egilh joined #salt
13:40 edrocks joined #salt
13:47 c4rc4s joined #salt
13:54 pbandark joined #salt
13:56 kettlewell joined #salt
14:01 hasues joined #salt
14:04 jeffspeff joined #salt
14:05 spiette joined #salt
14:05 hashwagon joined #salt
14:10 JawnAuz__ joined #salt
14:19 gh34 joined #salt
14:26 numkem joined #salt
14:38 DammitJim joined #salt
14:43 indistylo joined #salt
14:43 CrummyGummy Any one know how to set "Acquire::http::Proxy=..." for apt? The alternative is to maintain a file :(
14:45 saltslackbridge <mts-salt> we maintain a file in `/etc/apt/apt.conf.d` for exactly this reason
14:47 CrummyGummy ok, thanks. Do you need to force an update after creating the file?
14:47 saltslackbridge <mts-salt> apt doesn't maintain a daemon so i don't think so, new apt commands just use the file as soon as it's available
14:47 CrummyGummy (y) thanks
15:01 _val_ If I wanted to have this grain content: http://sprunge.us/ieRG  how would I use salt .... grains.setval  ?
15:02 saltslackbridge <mts-salt> is there a reason you want to use setval rather than set?
15:05 darioleidi joined #salt
15:21 babilen Also strikes me as appropriate content for pillars rather than grains
15:29 _val_ hmm
15:29 _val_ From the master, I'm trying to write some grains on the minion. This is how our infrastructure works right now.
15:30 _val_ sure I can put that into the pillar but I was just looking for an answer if I could use grains.setval
15:32 impi joined #salt
15:38 yuhl joined #salt
15:47 yuhl_ joined #salt
15:48 oida joined #salt
15:59 Aleks3Y joined #salt
15:59 dh joined #salt
16:01 cgiroua joined #salt
16:03 cgiroua joined #salt
16:10 pipps joined #salt
16:12 pipps joined #salt
16:14 hemebond joined #salt
16:23 englishm_work joined #salt
16:25 tiwula joined #salt
16:26 NightMonkey joined #salt
16:36 impi joined #salt
16:41 ouemt joined #salt
16:50 stanchan joined #salt
16:55 hashwagon joined #salt
16:55 hashwagon Not sure if my message went through -- I'm trying to create a state to run a file.exists and if the file doesn't exit it will run an onfail initiate separate state file. Is this possible? Anyone have an example?
16:59 mpanetta joined #salt
17:00 saltslackbridge <mts-salt> it is, but a failing state isn't ideal. perhaps you could define `unless` or `onlyif` in the state you want to run instead?
17:02 darioleidi joined #salt
17:03 hashwagon I'll look at those options. I appreciate it.
17:03 saltslackbridge <mts-salt> if you can't modify the target state then you could perhaps still use requisites in a different form in a new state, even if it only calls test.nop
17:09 jpsharp joined #salt
17:19 Hybrid joined #salt
17:27 pipps joined #salt
17:56 khaije1 joined #salt
18:01 Kax joined #salt
18:14 oida joined #salt
18:18 noobiedubie joined #salt
18:18 edrocks joined #salt
18:20 noobiedubie hi all I have a syntax question. I'm trying to set up a schdule through pillars using file.find and the delete action to clear a fileshare on a regular basis. I'm a little confused as to where to place the delete action though in job_args or job_kargs? My current config is as follows:
18:20 noobiedubie https://paste.debian.net/hidden/214a0cef/
18:22 Valfor joined #salt
18:22 Valfor joined #salt
18:24 DammitJim joined #salt
18:29 tiwula joined #salt
18:29 Trauma joined #salt
18:29 relidy joined #salt
18:30 Edgan joined #salt
18:34 scbunn joined #salt
18:35 cliluw joined #salt
18:35 edrocks joined #salt
18:37 toanju joined #salt
18:49 onlyanegg joined #salt
18:49 pipps joined #salt
18:50 noobiedubie ?
18:50 pipps99 joined #salt
18:56 sayyid9000 joined #salt
18:57 pipps joined #salt
18:59 pipps joined #salt
19:04 xet7 joined #salt
19:05 pipps joined #salt
19:09 evle3 joined #salt
19:12 XenophonF noobiedubie: take a look at https://github.com/irtnog/salt-states/blob/development/sched/patch.sls#L10
19:12 XenophonF job_args are non-keyword arguments to the exec module's function
19:12 XenophonF job_kwargs are keyword arguments to same
19:13 XenophonF e.g., the function signature for state.apply is something like apply(name, **kwargs)
19:16 XenophonF (the actual function def for state.apply is somewhat magical so perhaps that's a bad example)
19:16 XenophonF (but it behaves as if that's its function signature)
19:17 * XenophonF puts on his wizard hat and robes.
19:21 Elsmorian joined #salt
19:23 JPT joined #salt
19:24 bbradley joined #salt
19:26 noobiedubie ok makes more sense XenophonoF but how do I pass options like delete under kwargs? As I have it with delete: True or just delete with no colon and nothing after it?
19:27 noobiedubie docs are unclear if it is handles as a boolean or some other value (just a string)?
19:28 noobiedubie or can i do delete=/path/to/directory in job_args?
19:29 pipps99 joined #salt
19:30 oida joined #salt
19:31 sayyid9000 joined #salt
19:38 major joined #salt
19:41 ymasson joined #salt
19:43 * MTecknology abhors the use of "roles" and strongly prefers useful/concise minion_id naming to target systems. Roles get abused and broken so easily. .. I feel like that got extremely popular with chef and puppet because there's not a lot of sensible ways to target clients.
19:46 xet7 joined #salt
19:46 MTecknology I've yet to meet a client that /hasn't/ completely destroyed their own concept of roles. Lots of mismatched names (like roles: keepalive vs. keepalived. vs. keepalive-master), most of them end up going unused/unreferenced, lots of other issues..
19:48 JPT joined #salt
19:51 stanchan joined #salt
19:53 Elsmorian joined #salt
19:54 heaje joined #salt
19:55 Brew joined #salt
19:58 _JZ_ joined #salt
20:00 J0hnSteel joined #salt
20:00 JPT joined #salt
20:03 MTecknology noobiedubie: fwiw- I noticed a 'w' missing from your 'job_kargs'.
20:04 MTecknology a/-o
20:04 MTecknology also- I think two-space indents is typically the norm
20:04 major joined #salt
20:07 Shirkdog joined #salt
20:18 Aleks3Y joined #salt
20:21 major joined #salt
20:22 haam3r_ joined #salt
20:23 major joined #salt
20:25 edrocks joined #salt
20:29 pipps joined #salt
20:30 cyteen joined #salt
20:32 zulutango joined #salt
20:32 tiwula joined #salt
20:33 IconicLight joined #salt
20:33 xet7 joined #salt
20:40 IconicLight joined #salt
20:43 aldevar joined #salt
20:45 onlyanegg joined #salt
20:45 yuhl joined #salt
20:50 lordcirth_work joined #salt
20:50 IconicLight joined #salt
20:51 IconicLight hello
20:53 lordcirth_work hi
20:53 IconicLight I'm trying to get some help setting up my first salt formula/pillar
20:53 IconicLight if I run salt 'my-test-minion' pillar.items, the first thing back I see is Error encountered while render pillar top file.
20:54 IconicLight So first, I believe my pillar top.sls file has problems
20:54 IconicLight I have exhaustively looked over all the documentation & verified many times over my format for stuff matches
20:54 lordcirth_work IconicLight, can you pastebin your pillar/top.sls?
20:54 IconicLight I can't find any tutorials for a full working formula build including pillar file, so I have no real world working example to try to follow
20:55 IconicLight https://pastebin.com/X2Nk0BbC
20:56 IconicLight very simple, referencing the single pillar file for my single formula i'm trying to test
20:56 lordcirth_work IconicLight, that looks correct, though you should probably avoid using separate envs on your first experiments
20:57 babilen We'd have to see openldap.sls also (and please use one of http://paste.debian.net, https://gist.github.com, http://sprunge.us, … :)
20:57 IconicLight yeah I put that on the back burner, i was trying to push stuff from the dev environment and that was a headache
20:57 IconicLight so i said screw it i can push from base instead & still couldn't even get that working
20:57 lordcirth_work And also paste your /etc/salt/master so I can see your file_roots and pillar_roots
20:58 stanchan joined #salt
20:59 IconicLight so i'm not using the default /srv/salt paths but I did adjust them in the salt master file, but since I did change them there, i am confused how I'm suppose to reference the new directory structure
20:59 IconicLight give me a moment to generate salt master file
21:01 IconicLight https://pastebin.com/Z1BmdV81
21:01 IconicLight mater
21:01 IconicLight master*
21:01 IconicLight opps
21:01 IconicLight i notice first mistake
21:02 lordcirth_work IconicLight, so, your openldap.sls is in /salt/base/pillars ?
21:02 IconicLight https://pastebin.com/4UfACsKz
21:03 IconicLight there is updated copy
21:03 IconicLight i had a wrong directory for vase
21:03 IconicLight base*
21:03 IconicLight it was pointing at dev folder
21:03 oida joined #salt
21:04 IconicLight @lordcirth_work no; inside /salt/base/pillars is a folder called openldap
21:04 lordcirth_work ok, and inside that, init.sls ?
21:04 IconicLight inside openldap folder is init.sls
21:04 lordcirth_work ok good
21:05 pipps joined #salt
21:05 IconicLight https://pastebin.com/B5mtKsGC
21:05 IconicLight this is the init.sls file
21:05 IconicLight for openldap
21:06 IconicLight https://github.com/saltstack-formulas/openldap-formula
21:06 IconicLight that is the formula i'm working with
21:06 IconicLight I'm only wanting to deploy ldap client. the readme says "Install and configure ldap client. You should at least set pillar[openldap:base] and pillar[openldap:uri] to provide the client with minimal configuration."
21:06 IconicLight so hence i've only set those 2 variables
21:06 IconicLight the other 2 variables in that file are for slapd (LDAP server)
21:10 lordcirth_work IconicLight, you seem to have 4 spaces between tiers in init.sls
21:11 MTecknology IconicLight: 1) It'd be much easier to follow if you were a bit less spammy with that enter key (finish a thought before using it, please).  2) pastebin.com is one of the worst pbin services (dpaste, gist, etc. are *much* better).3) you typically want to avoid dicking with /etc/salt/{master,minion} files since it's a package-maintained file. That's why the .d/ dirs exist and why
21:11 lordcirth_work Should work but I'd recommend using 2-space tabs as the docs do
21:11 MTecknology they're magnificent.  3) Since you're apparently just getting started, you'd likely be much better served if you just outright avoided the use of formulas. (I have a massive rant there.)  Part of the rant is that formulas force you into not understanding what's going on.  and 6) spacing matters. Check out http://yaml-online-parser.appspot.com/
21:11 stanchan joined #salt
21:12 rodr1c joined #salt
21:12 IconicLight the pillar.example on that saltstack forumla has 4 spaces, i didn't necessarily put them there. Though I did read the YAML should usually have 2 space indent on each line down
21:13 IconicLight just changed init.sls to only 2 spaces, and systemctl restart salt-master
21:13 IconicLight still 'Error encountered while render pillar top file.'
21:14 socket- joined #salt
21:14 MTecknology that's not very helpful unless you provide the actual error (the top file is also helpful)
21:14 IconicLight @MTecknology the only thing I really changed was the directories in the master file. is that bad practice?
21:15 MTecknology If you type the first two letters of a nick, and hit tab, you can correctly complete a nick ;)
21:15 MTecknology What I said about those files is generic advice that applies to lots more situations than just salt.
21:16 IconicLight @MTecknology pillar top file or states top file
21:16 IconicLight ?
21:16 MTecknology clearly that's a question that doesn't follow up on anything I said..
21:16 IconicLight sorry i'm confused what your asking for then?
21:16 MTecknology oh, .. I get see.  ... dunno, which one do you have an error for?
21:17 xet7 joined #salt
21:18 IconicLight i also do not know how to retrieve any additional info on the error. just simply able to see that the first output i get from "salt 'ubuntu-test' pillar.items" is "Error encountered while render pillar top file." Which my only assumption is that my pillars top.sls file has an error
21:19 MTecknology logs
21:19 IconicLight what logfile would i be looking for
21:19 MTecknology have you ever managed a linux system before?
21:20 IconicLight yes i've used linux for years. i found it in var/log
21:20 IconicLight there are 13 log files in /var/log/salt
21:20 lordcirth_work /var/log/salt/master should have it
21:23 JPT joined #salt
21:23 IconicLight 2018-01-16 16:13:18,053 [salt.pillar      ][CRITICAL][19425] Pillar render error: Error encountered while render pillar top file.
21:24 IconicLight Just seems to be a bunch of that same error message, which is really all I was getting from the output of ""salt 'ubuntu-test' pillar.items""
21:25 lordcirth_work IconicLight, try running salt with '-l debug'
21:28 IconicLight do you want output in pastebin?
21:29 lordcirth_work sure
21:30 MTecknology -l debug will need to be on the master since it's a pillar render error... but I suspect you just didn't read the log closely enough and there's probably a reason listed already.
21:30 IconicLight https://pastebin.com/7B95aJyN
21:30 IconicLight yes i ran debug on maaster
21:31 lordcirth_work hmm I don't see anything there
21:31 IconicLight like hints to why it's failing, or nothing is displayed, like you can't see the pastebin info
21:32 lordcirth_work No hints, yeah
21:32 MTecknology IconicLight: salt-master* needs the -l debug...
21:32 MTecknology you just did the same as salt-call (from the master)
21:32 lordcirth_work as opposed to the salt command?
21:33 MTecknology yup
21:34 pipps joined #salt
21:34 IconicLight sorry i'm confused. not sure what that means
21:35 lordcirth_work stop the salt-master daemon, and start it manually with -l debug
21:35 lordcirth_work tmux or screen may be useful
21:36 IconicLight 'salt-master -l debug' is that the command i need to run?
21:37 Elsmorian joined #salt
21:37 pipps99 joined #salt
21:43 _JZ_ joined #salt
21:49 IconicLight Got it figured out
21:49 IconicLight dev/pillars/top.sls file wasn't correct
21:49 IconicLight i wasn't sure how to tell if it was referencing that file before, but 'salt-master -l debug' let me see that i twas
21:55 IconicLight Hmm... now it just tells me 'No Top file or external nodes data matches found.' when trying to do 'salt '*' state.highstate'
21:56 esteban joined #salt
21:58 Trauma joined #salt
22:01 stanchan joined #salt
22:01 edrocks joined #salt
22:03 Trauma joined #salt
22:04 onlyanegg joined #salt
22:04 pipps joined #salt
22:11 pipps99 joined #salt
22:18 cgiroua joined #salt
22:20 pipps joined #salt
22:25 ThomasJ joined #salt
22:25 esharpmajor joined #salt
22:27 caain joined #salt
22:27 caain left #salt
22:27 cain_ joined #salt
22:28 cain_ Hi, does anyone know why attempting to run `salt '*' grains.disks.disks` gives me 'grains.disks.disks is not available'?
22:31 mianosm I think you want something more specific like: salt '*' disk.usage /
22:31 mianosm I think you want something more specific like: salt '*' disk.usage # rather
22:32 mianosm or salt '*' disk.percent / # for a percent instead
22:32 cain_ what i want to do is use salt to automatically format a block device and setup the mount
22:32 cain_ but i want to enumerate the block devices first
22:32 cain_ if that makes sense
22:32 cgiroua joined #salt
22:33 mianosm https://docs.saltstack.com/en/2015.8/ref/modules/all/salt.modules.disk.html
22:35 mritchie joined #salt
22:39 cain_ ah thanks. Looks like the module doesn't provide the data I want. I'll just write a custom grain thingy
22:48 kettlewell joined #salt
22:53 onlyanegg joined #salt
23:03 pipps joined #salt
23:05 pipps joined #salt
23:07 pipps joined #salt
23:07 stanchan joined #salt
23:16 esteban__ joined #salt
23:24 mritchie joined #salt
23:29 sjh_ joined #salt
23:31 hatifnatt joined #salt
23:32 hatifnatt Hi. Is there any alive WebUI for Salt?
23:35 stanchan joined #salt
23:40 pipps joined #salt
23:42 packeteer joined #salt
23:49 pipps joined #salt
23:52 MTecknology I think salt enterprise is about it for anything actively developed
23:55 cyteen joined #salt

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