Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-05-15

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

All times shown according to UTC.

Time Nick Message
00:01 hoonetorg joined #salt
00:21 hoonetorg joined #salt
00:26 mosen joined #salt
00:31 justanotheruser joined #salt
00:38 bwells_ joined #salt
00:55 cyborg-one joined #salt
01:00 bwellsnc joined #salt
01:11 Bock joined #salt
01:14 Bock joined #salt
01:22 asyncsec joined #salt
01:23 rem5_ joined #salt
01:23 noobiedubie joined #salt
01:26 mosen ok saltines
01:26 mosen module writing time :) I wonder if the api has changed any
01:27 gnomethrower joined #salt
01:30 masber joined #salt
01:33 amcorreia joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.4 <+> Support: https://www.saltstack.com/support/ <+> SaltStack Webinar on Carbon, Nitrogen, and Enterprise 5.1 on May 18, 2017 https://goo.gl/PvsOvQ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
01:57 zerocool_ joined #salt
02:01 bwellsnc joined #salt
02:28 AvengerMoJo joined #salt
02:39 ponyofdeath joined #salt
02:45 JPT joined #salt
02:47 bwellsnc joined #salt
03:08 sh123124213 joined #salt
03:19 bwellsnc joined #salt
03:29 bwellsnc joined #salt
03:32 miruoy joined #salt
03:41 bwellsnc joined #salt
03:42 icebal joined #salt
03:44 edrocks joined #salt
03:49 DEger joined #salt
04:14 icebal joined #salt
04:35 DEger joined #salt
04:37 Guest73 joined #salt
04:37 DEger joined #salt
04:41 lorengordon joined #salt
04:47 golodhrim|work joined #salt
04:51 fracklen joined #salt
04:51 DEger joined #salt
04:53 Terminus joined #salt
05:02 fracklen joined #salt
05:07 feld joined #salt
05:18 Guest73 joined #salt
05:21 sh123124213 joined #salt
05:25 sh123124213 joined #salt
05:27 gnomethrower joined #salt
05:29 rdas joined #salt
05:33 Guest73 joined #salt
05:38 felskrone joined #salt
05:41 rgrundstrom joined #salt
06:02 do3meli joined #salt
06:03 do3meli left #salt
06:19 fracklen joined #salt
06:29 yuhl______ joined #salt
06:30 rdas joined #salt
06:30 Elsmorian joined #salt
06:30 aldevar joined #salt
06:32 rgrundstrom joined #salt
06:37 fracklen joined #salt
06:39 Ricardo1000 joined #salt
06:42 om3 joined #salt
06:47 ronnix joined #salt
06:49 pheonix991 joined #salt
06:53 fracklen joined #salt
06:57 DEger joined #salt
06:57 Guest73 joined #salt
06:58 jhauser joined #salt
07:11 Tantagel joined #salt
07:15 fracklen joined #salt
07:16 fracklen joined #salt
07:16 fracklen joined #salt
07:20 sjohnsen joined #salt
07:22 armyriad joined #salt
07:24 Tantagel joined #salt
07:25 JohnnyRun joined #salt
07:31 colttt joined #salt
07:32 Ricardo1000 joined #salt
07:36 o1e9 joined #salt
07:42 kwork joined #salt
07:45 jas02 joined #salt
07:56 mikecmpbll joined #salt
07:57 candyman88 joined #salt
08:01 oida joined #salt
08:01 candyman89 joined #salt
08:03 rgrundstrom Good morning everyone
08:09 kbaikov joined #salt
08:11 pbandark joined #salt
08:21 rgrundstrom Anyone think they can help me out here? https://justpaste.it/16o8n
08:30 sh123124213 joined #salt
08:30 babilen rgrundstrom: Try set_role
08:31 Elsmorian joined #salt
08:31 hemebond Yeah, Jinja variable with hyphen is a no-no.
08:31 hemebond Also... Are you actually setting the variable somewhere?
08:34 babilen rgrundstrom: Also .. why are you setting the role in grains?
08:34 babilen I mean you have them in pillars already and can target based on that
08:37 impi joined #salt
08:37 babilen https://docs.saltstack.com/en/latest/topics/targeting/compound.html (→ I@ and J@) + https://docs.saltstack.com/en/latest/topics/targeting/pillar.html
08:38 glyf joined #salt
08:38 rgrundstrom babilen: You are absolutly correct on that point. Im blameing lack of sleep.
08:39 babilen If you arrive at the point that you also want to target pillars based on roles, you can approach it by using an external pillar for roles (e.g. pillarstack, but any would work) and setting https://docs.saltstack.com/en/latest/ref/configuration/master.html#ext-pillar-first
08:41 SGrade joined #salt
08:49 rgrundstrom babilen: Ive managed to set my pillars/top.sls to look for a pillar with the same hostname as the server. (FQDN would have been prefered but using dots is not going to work.) This way we can custom each server with the config it needs... I still have tons of stuff to fix. But its slowly getting there
08:50 hemebond Why wouldn't dots work?
08:51 inad922 joined #salt
08:52 rgrundstrom hostname.domain.com is hostname/domain/com for salt if i understood it right.... So trying to set a pillar with dots is the same as looking in diffrent directorys in the pillar tree.
08:52 hemebond Oh in the filename.
08:53 hemebond You could just change them to underscores or something.
08:53 babilen That can be automated also with |replace(...)
08:53 hemebond Or have your directory structure match your domain structure. That'd be pretty neat.
08:53 sjorge joined #salt
08:55 rgrundstrom babilen: i know there is the solution of doing it that way but i think it would be... ugly.
08:56 babilen Why?
08:57 arapaho left #salt
08:57 rgrundstrom a file that is hostname_domin_com.sls just would not feel right.... Maybie if it could be replaced with something similar to a dot.
08:57 * hemebond whispers "directories"
08:58 babilen Do you really have entirely different pillars for each host ?
08:58 Rumbles joined #salt
08:59 rgrundstrom Preferbly yes... The users that should have access, sudo rights, DNS settings etc... vary gratley from server to server..... Not an ideal solution for the IT department but that is what i have to work with.
09:00 rgrundstrom greatly*
09:00 * rgrundstrom needs to enable spellchecking in my brain. A lot of sub systems is not working today.
09:02 rgrundstrom Ofc im setting this up with default values as well. Hopefully that will sort out some of the spagetti configuration that is all over the place today.
09:04 rgrundstrom Time for some lunch.... babilen, hemebond thank you for your support.
09:08 Tantagel you are forgiven, please go in peace
09:11 Tantagel Happy Mother's Day
09:11 Tantagel I love you all
09:13 babilen Wasn't that yesterday?
09:13 Tantagel yeah
09:13 Tantagel belated
09:13 babilen In some parts of the world that is
09:14 Tantagel hmmm
09:14 Tantagel well I live in DC
09:14 Tantagel so I'm on EST
09:15 babilen https://en.wikipedia.org/wiki/Mother%27s_Day#Dates_around_the_world seems to vary considerably
09:15 saltstackbot [WIKIPEDIA] Mother's Day#Dates around the world | "Mother's Day is a celebration honoring the mother of the family, as well as motherhood, maternal bonds, and the influence of mothers in society. It is celebrated on various days in many parts of the world, most commonly in the months of March or May. It complements similar celebrations honoring family..."
09:16 Tantagel hmm weird
09:16 Tantagel well celebrate it however you do
09:16 Tantagel :)
09:16 Tantagel I don't know everything babilen
09:17 babilen How dare you! ;)
09:17 Tantagel hehehehe
09:17 * Tantagel hugs babilen
09:17 Tantagel thanks for your help
09:20 glyf joined #salt
09:21 glyf joined #salt
09:22 glyf joined #salt
09:23 glyf joined #salt
09:23 glyf joined #salt
09:40 legreffier joined #salt
09:42 impi joined #salt
09:49 edrocks joined #salt
09:53 babilen gtmanfred: Just tried the local.service.{{ action }} approach for batched runs and it doesn't appear to run batched. Guess I will have to go through orchestration for now :( -- http://paste.debian.net/932483/
09:54 * rgrundstrom lunch was scheduled for "later"
09:57 rgrundstrom I have seen in formulas that they have a template in ex:"source: salt://templates/resolv.conf" but the template contains code to set specifik options (ex. IP-Adresses, hostnames, etc.) Ive tried this but could not get it to work. Anyone know of any online examples?
09:58 guedressel_web joined #salt
10:05 honestly rgrundstrom: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
10:05 honestly add "template: jinja" to the options of file.managed
10:05 honestly and it'll be run through templating
10:06 honestly detailed documentation is here: https://docs.saltstack.com/en/latest/topics/jinja/index.html#understanding-jinja
10:06 J0hnSteel joined #salt
10:11 kshlm joined #salt
10:13 beardedeagle joined #salt
10:25 mariusv joined #salt
10:25 mariusv joined #salt
10:26 lunarlamp joined #salt
10:29 Joy what is the ordering of passes while parsing an .sls, with regard to ext_pillar?
10:29 dendazen joined #salt
10:29 Joy asking because i was trying to do {{ pillar['userdata:passwords:' + user + '.shadow' ] }}
10:29 Tantagel good morning Joy
10:29 Joy but it fails during state.apply
10:30 Tantagel how you doin
10:30 Tantagel just keep trying you will get it :)
10:30 Tantagel pillar['userdata:passwords' ~ user ~ '.shadow'
10:30 Tantagel the ~ is concatenate
10:30 Joy it did seem to concatenate properly, it just said that the pillar value is not there
10:31 Joy but it is there when i run items.get manually
10:31 Joy so i'm thinking the external file tree pillar that i set up is unreachable at the time jinja or whatsitcalled runs
10:32 Tantagel oh weird
10:32 Tantagel dunno
10:32 Joy Jinja variable 'salt.pillar object' has no attribute u'userdata:passwords:validusername.shadow'
10:32 Joy i could technically rewrite this into a normal pillar, but file_tree seemed simpler
10:35 hemebond Joy: I believe ext_pillar is parsed before regular pillar, but beyond that the behaviour cannot be guaranteed,
10:35 hemebond So don't try to use pillars in pillars.
10:36 hemebond If that doesn't answer your question then I don't understand your question :-)
10:37 felskrone anyone have an idea with which data-parameter i can force a yaml.YAMLError exception?
10:40 babilen Joy: You want salt['pillar.get]('userdata:passwords' ~ user ~ '.shadow')
10:41 felskrone never mind, i just mocked yaml.dump with side_effect=yaml.YAMLError
10:41 babilen pillar['userdata:passwords:' + user + '.shadow'] is looking for the key "userdata:passwords:foo.shadow" rather than traversing nested datastructures
10:54 evle1 joined #salt
10:54 Praematura joined #salt
10:56 Neighbour Joy: File tree by default does not work like that...but I have patches to make it work like you think it should
10:59 XenophonF joined #salt
11:04 jas02 joined #salt
11:07 jas02 joined #salt
11:07 amcorreia joined #salt
11:11 pbandark1 joined #salt
11:11 it_dude joined #salt
11:16 ronnix joined #salt
11:18 fredvd joined #salt
11:21 Terminus joined #salt
11:22 jas02 joined #salt
11:30 jas02 joined #salt
11:33 Neighbour babilen: The file tree external pillar only reads plain text files and dumps them in the pillar..unless you have https://github.com/saltstack/salt/pull/38769 which throws templating engines at the read data first
11:33 saltstackbot [#38769][MERGED] pillar/file_tree.py: Data read from files is now passed through the c… | What does this PR do?...
11:34 Neighbour I'm not sure which versions of salt have this PR incorporated though
11:39 swa joined #salt
11:40 swa Hi, I'm trying to retrieve info from the mine, I need to filter on two grains.. Can't find any example. This doesn't work {% for host, ip_addrs in salt['mine.get']('ETNIC_ITOP_STATE:proj_sap and ETNIC_ENV:PRD }}', 'network.ip_addrs', 'grain').items() -%}
11:42 swa forget the }} in my example, this is wrong and i'm in the middle of tests
11:42 Ricardo1000 joined #salt
11:45 hemebond swa: You need to use compound matching, not grain matching.
11:45 hemebond You're in the middle of a test? A Salt test?
11:46 swa no i'm testing every combination possible, and the }} were leftovers
11:46 hemebond Oh.
11:46 swa i tried compound but let me try again
11:47 yuhl______ joined #salt
11:47 zerocool_ joined #salt
11:49 Joy cool, i'll try
11:50 wavded joined #salt
11:51 swa hemebond, https://pastebin.com/KwEhxxsi
11:51 Joy yep, salt['pillar.get'](...) works, yay
11:51 swa can you check what i'm doing wrong? :)
11:51 hemebond swa: You haven't got the prefix in the matching.
11:51 hemebond Are you using pillar or grains? You need I@ or G@
11:52 swa grains
11:52 swa doc says this: salt '*' mine.get 'os:Fedora and S@192.168.5.0/24' network.ipaddrs compound
11:52 swa os is a grain and is not prefixed
11:52 swa let me try with G@
11:53 hemebond I would say that example is wrong.
11:53 swa yes, it is :) G@ works :D
11:53 swa thanks
11:53 hemebond 👍
11:54 Joy babilen: thanks
11:55 Joy btw the only reason i'm using plain-text passwords like this is https://github.com/saltstack/salt/issues/41135
11:55 saltstackbot [#41135][OPEN] gpg renderer doesn't seem to work with salt-ssh, tries to execute gpg on the minion? | Hi,...
12:03 babilen Neighbour: File tree?
12:03 zulutango joined #salt
12:03 Ricardo1000 joined #salt
12:06 babilen Joy: salt-ssh is, IMHO, not worth it
12:09 fleaz joined #salt
12:09 Neighbour babilen: the file tree external pillar
12:10 babilen Neighbour: Yes, sure .. I know what you refer to, but I'm not exactly sure about the context
12:11 mbologna joined #salt
12:12 mbologna joined #salt
12:12 PFault joined #salt
12:12 Joy babilen: i'm trying to use salt to provision something while the client happens to be behind a NAT
12:13 Joy salt-ssh has a lot of promise, it mostly works well, but it has been rather frustrating to navigate several of its quirks
12:14 Joy it stands to reason that a lot of people using the popular kid(TM) ansible will be trying salt-ssh
12:16 Neighbour babilen: Joy is using the file tree external pillar, but is unable to fetch nested items from it; you were helping him/her with that, so I thought I'd give you information you might need with that
12:21 jas02 joined #salt
12:24 babilen Joy: To me the power of SaltStack stems from the one feature that Ansible doesn't have: The message bus between minions and the master(s). This feature is what stands behind awesomeness such as Reactors, Beacons, ... and *speed*. Furthermore SaltStack allows you to configure external datasources easily and is just nicer for managing larger number of boxes.
12:25 babilen Joy: Also many Ansible people that have to work in a group will end up with a central server quite often as you would, well, go bonkers if hundreds of people were to run Ansible playbooks from their laptops against your production environment.
12:25 nicksloan joined #salt
12:26 babilen salt-ssh would be great if it would, at least, allow you to use all the features of SaltStack that do not require the message bus (even though that really castrates SaltStack), but there are problems everywhere ..
12:26 JohnnRun joined #salt
12:27 babilen You've already encountered one of them, and I found https://github.com/saltstack/salt/issues/26585 to be particularly annoying
12:27 saltstackbot [#26585][OPEN] salt-ssh not providing jinja file for salt-formula | When bootstrapping\setting up a VPS using salt-ssh, I use [salt-formula](https://github.com/saltstack-formulas/salt-formula) to properly configure the minion after the bootstrap script has done its job....
12:29 asyncsec joined #salt
12:32 dendazen joined #salt
12:37 geomacy joined #salt
12:38 noobiedubie joined #salt
12:38 XenophonF Joy: did you try the workaround described in issue 41135?
12:39 XenophonF oh i see it doesn't work for some people :(
12:51 plamer joined #salt
12:54 numkem joined #salt
12:54 thinkt4nk joined #salt
12:55 zerocoo__ joined #salt
12:56 Praematura joined #salt
13:01 Terminus joined #salt
13:04 Tantagel joined #salt
13:12 glyf joined #salt
13:15 zerocool_ joined #salt
13:20 nicksloan joined #salt
13:21 Neighbour XenophonF: were you the one who, somewhere in the last 7 days, tried to convince me to use ~ for concatenation instead of +?
13:21 Neighbour (in jinja)
13:21 saltyotter joined #salt
13:22 racooper joined #salt
13:27 mat_ joined #salt
13:27 mat_ joined #salt
13:32 Guest73 joined #salt
13:33 plamer joined #salt
13:37 babilen Neighbour: That would have been me
13:41 Neighbour babilen: Ah, well, I just found my use-case why I used + instead of ~.....when you have a variable that is a unicode-string, and you ~ it with a piece of 'text', say 'text' ~ var    it will end up as: textu'<var_contents>'    with the u' ' present as string-data
13:41 Neighbour instead of the whole thing being cast to string (which happens when you're using +)
13:45 Joy babilen: honestly for my use case i didn't even look up reactors or beacons
13:45 Joy babilen: though i have to say that i did actually come across a similar bug to that one - the salt:// URLs weren't working at all
13:45 tapoxi joined #salt
13:46 Joy XenophonF: yes, it appears it's several different issues
13:48 Joy XenophonF: i reported the issue and tried those patches, to no avail :)
13:49 babilen Neighbour: That's such a horrendously embarassing bug that I don't even know what to say
13:49 babilen But yeah .. time for Python 3 !
13:51 PatrolDoom joined #salt
13:53 Neighbour babilen: :)
13:55 c_g joined #salt
13:57 Neighbour babilen: It seems to be a bug in jinja...
13:57 babilen Neighbour: I'm serious .. You just don't use __repr__() in lieu of __str__ or __unicode__
13:58 babilen But then .. mixing unicode and strings has always been "interesting"
13:59 Neighbour but that happens a lot with salt..strings in jinja templates are regular strings, but pillar data usually is unicode
14:00 Joy speaking of most confusing salt-ssh bugs, i just found https://github.com/saltstack/salt/issues/39239
14:00 saltstackbot [#39239][OPEN] Using a listen with salt-ssh doesn't work, but watch does | Description of Issue/Question...
14:00 babilen Neighbour: One should always ensure to convert strings to unicode as early as possible (right after reading that data) and use unicode internally through
14:01 babilen So a "from future import unicode_literals" is something I'd like to see in py2 code
14:01 pheonix991 joined #salt
14:03 Neighbour hmm, good point, I'll include that in my custom states/modules from now on :)
14:07 XenophonF Neighbour: I am the one that always tells people to use |format(...)|yaml_encode in jinja
14:07 Joy this was the bug that had pushed me towards file_tree ext_pillar: https://github.com/saltstack/salt/issues/38458
14:07 saltstackbot [#38458][MERGED] salt-ssh uses sudo to create cache dir, later fails to access it | Description of Issue/Question...
14:07 XenophonF +1 to from future import unicode_literals
14:07 Joy FWIW
14:14 ssplatt joined #salt
14:24 censorshipwreck joined #salt
14:24 art6006 joined #salt
14:26 sarcasticadmin joined #salt
14:30 cb joined #salt
14:38 Inveracity joined #salt
14:41 cyborg-one joined #salt
14:45 sh123124213 joined #salt
14:49 evle joined #salt
14:49 renaissancedev joined #salt
14:50 Brew joined #salt
14:53 dyasny joined #salt
14:53 Praematura joined #salt
14:59 JohnnRun joined #salt
15:02 Rumbles joined #salt
15:03 CampusD joined #salt
15:04 CampusD Hi guys, question, for salt.runners.manage.up, https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.manage.html#salt.runners.manage.up , is there a way to target by a grain?
15:07 Cadmus joined #salt
15:07 babilen CampusD: Just set expr_form as shown in the documentation you linked
15:07 dyasny joined #salt
15:08 CampusD babilen: would it be "tgt=some_grain, expr_form=grain"
15:08 CampusD ?
15:08 babilen Note quite
15:09 pcn joined #salt
15:09 babilen tgt="some_grain" expr_form="grain" is what you are after .. don't quote the two arguments
15:10 keltim joined #salt
15:10 pcn Is there a returner that just logs everything on the event bus?
15:11 pcn I guess there's no need to be a returner, specifically, but any way to have a full log of the event bus for debugging/auditing?
15:11 CampusD thanks babilen, I'll give it a try
15:12 plamer joined #salt
15:14 Rumbles joined #salt
15:15 CampusD babilen: that worked, thanks (tgt='grain_name:grain_vaule', expr_form='grain')
15:15 jauz joined #salt
15:16 babilen :D
15:17 Cadmus I'm having a bit of problem dealing with a yum repo, and I was wondering what people thought the right way to do it is *deep breath*
15:17 Cadmus So I have an RPM that adds the repo, this is good and works. The rpm adds several mutually exclusive repos, and you're meant to enable the one you want
15:19 Cadmus I can't use the pkgrepo tools a that expects one repo per file, I could try manually regexing the file, but that seems silly, or I could maintain my own copy, but risk it becoming out of sync with the rpm
15:21 Cadmus Has anyone else had this or any idea about how to proceed?
15:21 cscf Cadmus, I don't see why the rpm would change the repos frequently
15:21 cscf Just adding the repo with pkgrepo seems best to me.
15:21 Cadmus cscf: Yeah, probably doesn't :) I think that's the best way to do this.
15:21 babilen Is somebody here using salt-mode with emacs?
15:23 pcn babilen thanks for mentioning that!  I've been using some other hacks, will try that.
15:23 babilen pcn: What are you referring to?
15:24 babilen salt-mode?
15:25 pcn yeah
15:27 pcn I was using mmm-mode with yaml and mako until now.
15:27 pcn I'm trying it out now
15:28 babilen Okay, it hangs when I use a file such as http://paste.debian.net/932551/ -- can you reproduce that?
15:28 pcn looking
15:28 cscf When setting up a VM to use git salt, do I just 'pip install -e ./salt' without the virtualenv?
15:29 pcn babilen: I can write the file and it highlights it... let's see about opening it... Yes, that doesn't load
15:31 aldevar left #salt
15:31 babilen pcn: Okay, thanks for confirming that. I guess I'll stick to http://paste.debian.net/932552/ for the time being unless you are using something awesomer ;)
15:31 pcn Do you mind if I open an issue with the maintainer?
15:31 Rumbles cscf you can just do "pip install salt" but it won't install any dependancies....
15:32 babilen pcn: I am currently doing that .. just needed confirmation
15:32 cscf Rumbles, won't that install 2016.11.4, rather than git?
15:32 pcn OK, I'll watch that
15:32 Tantagel # printf -- 'does this work'
15:32 Tantagel oops
15:33 Rumbles that would install 2016.11.4 (latest in pip) do you mean you want to install the latest from git cscf ?
15:33 cscf Rumbles, I set up a virtualenv a while back following this: https://docs.saltstack.com/en/latest/topics/development/hacking.html
15:34 cscf Rumbles, but I want to setup a VM because there are some bugs regarding hostnames, networking, etc that I want a full machine for
15:34 Rumbles ok
15:34 cscf Just wondering which bits I could skip and which I can't.
15:34 * Rumbles looks at the docs
15:35 cscf Don't worry, I'll figure it out
15:35 Rumbles well if you still have the files in the virtualenv
15:36 Rumbles you could just git pull in the working folder for salt
15:36 Rumbles then go up one level and run pip install -e ./salt I would say
15:36 cscf But I'm not using the virtualenv, that's the point
15:37 Rumbles then just do all the steps except for starting the virtualenv
15:37 Rumbles should get you there
15:38 babilen pcn: https://github.com/glynnforrest/salt-mode/issues/3
15:38 saltstackbot [#3][OPEN] Hangs when opening files with jinja string concatenation | Dear Maintainer,...
15:38 glyf babilen: pcn: I'm maintaining emacs salt-mode since the start of this year. I've just tried opening the problem file and can confirm it's broken. Will look into it!
15:39 Rumbles that was quick
15:39 babilen glyf: Amazing, thank you! I'm quite surprised it took this long to surface.
15:40 cb joined #salt
15:40 glyf babilen: me too. I suspect it's something to do with the underlying mmm-mode getting confused about language boundaries. Could be easy to fix, could be hard. I'll have a look at it this week.
15:40 whoami joined #salt
15:41 babilen glyf: I'm also fighting a problem in yaml-mode in that it's indentation is horribly broken. See https://github.com/yoshiki/yaml-mode/issues/24 for indent-region and try entering the following content: http://paste.debian.net/932554/
15:42 saltstackbot [#24][OPEN] Indent-region doesn't unindent correctly | The yaml file...
15:42 whoami is it possible to use git as fileserver_backend on a masterless minions?
15:43 babilen glyf: The indentation implementation is a bit, well, overzealous in that it indents to the "maximal sensible level", which isn't really that sensible. I guess implementing something context aware as in python-mode is a lot of work.
15:43 jas02 joined #salt
15:43 whoami joined #salt
15:44 glyf babilen: correct. the underlying yaml-mode doesn't unindent terribly well. Perhapr salt-mode could override some of the behaviour, but to me it feels like a bug in yaml-mode
15:44 glyf babilen: the other bug I will definitely look into though, it shouldn't lock up emacs like that
15:45 DEger joined #salt
15:45 babilen glyf: The second bug is actually specific to salt-mode. I don't see the first "foo" being indented if I use it directly. Should I report that against salt-mode ?
15:47 glyf babilen: sure, go ahead if you think it's salt-mode specific
15:48 babilen glyf: It looks like this http://paste.debian.net/932558/ -- The nested sequence behaviour seems to be specific to yaml-mode, but salt-mode also indents the opening "foo:" for some reason
15:49 glyf babilen: hmmm, that is indeed extra terrible
15:49 jas02 joined #salt
15:49 babilen Between a rock and a hard place :D
15:49 glyf babilen: what about the context, are there any lines above foo: ?
15:50 babilen No, that's the entire buffer
15:51 glyf babilen: interesting, thanks. Looks like I'll be doing some elisp spelunking soon
15:51 babilen I started to look into yaml-mode's indentation functionality, but think that it needs a complete rewrite to be more context sensitive.
15:52 DEger joined #salt
15:53 nicksloan joined #salt
15:54 edrocks joined #salt
15:54 PatrolDoom joined #salt
15:56 wendall911 joined #salt
15:56 PatrolDoom joined #salt
15:58 pcn I feel like having an option to invoke a yaml formatter would be helpful.  Since IIRC from the beginning they've all been broken
15:58 glyf pcn: an external command?
15:59 glyf it would be great if there was a gofmt style command for .sls files
16:01 rmelero joined #salt
16:05 sp0097 joined #salt
16:06 dstensnes joined #salt
16:06 dstensnes hello
16:06 dstensnes i have configured beacons for load and diskusage
16:06 _JZ_ joined #salt
16:06 dstensnes but i want those results sent to influxdb
16:07 dstensnes how would i go about this?
16:07 dstensnes write a reactor?
16:08 promorphus joined #salt
16:08 noraatepernos joined #salt
16:08 shanth i think you need a salt runner dstensnes
16:09 pcn glyf I mean for yaml parsing specifically.
16:09 dstensnes i do have a salt runner configured in my minion
16:09 dstensnes or rather
16:09 dstensnes returner
16:09 dstensnes hmm
16:09 shanth im sorry i think renderer actually dstensnes
16:09 shanth i get confused on which one does what :)
16:10 dstensnes i do too :)
16:10 pcn Like if jinja could be replaced with placeholders and the rest be formatted.  It's just that the dark corners of yaml are icky.
16:10 shanth https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.influxdb_return.html#module-salt.returners.influxdb_return dstensnes
16:10 shanth that can make your results go into influxdb
16:10 dstensnes that bit is configured
16:10 dstensnes seems to work, when i call it like this> salt '*' test.ping --return influxdb
16:11 shanth ah
16:11 dstensnes however, i would like the beacon data to be sent there as well
16:12 shanth oh, not sure then
16:12 dstensnes i am missing something, but I am not that experienced with saltstack, so i'm trying to figure it out
16:12 shanth im sure one of the saltployees can help you out once they get into work. just hang around for a bit longer
16:12 DammitJim joined #salt
16:12 dstensnes i will :)
16:13 dstensnes i'm thinking i might need some kind of engine module
16:13 glyf pcn: ah, I see. The yaml spec is surprisingly intricate. Reliably formatting it when jinja tags are all over it doesn't seem easy.
16:14 rory joined #salt
16:14 greyeax joined #salt
16:16 pipps joined #salt
16:16 glyf swapping out jinja during the formatting could be possible I guess
16:16 DEger joined #salt
16:16 babilen glyf: It's a bit tricky, yeah (i.e. "an absolute nightmare") -- I filed https://github.com/glynnforrest/salt-mode/issues/4 and the corresponding one in yaml-mode. I had hoped that fixing this would not require a complete redesign of the indentation framework, but that looks increasingly likely.
16:16 saltstackbot [#4][OPEN] First line is indented if it ends in a colon | When entering the following content `yaml-mode` currently indents wrongly....
16:16 pipps joined #salt
16:18 glyf babilen: hmmm, it does seem likely. Just how much of a redesign do you think the yaml-mode formatting needs? Might as well implement a fresh ruleset in salt-mode and remove mmm-mode completely
16:19 glyf (thinking long term here, obviously)
16:19 tapoxi anyone know if salt has developer support plans?
16:19 DEger_ joined #salt
16:22 tapoxi I emailed them and it ended up in a black hole
16:25 raspado joined #salt
16:26 edrocks joined #salt
16:29 tiwula joined #salt
16:36 mkillebrew I have a 'module.run' for highstate inside a state. The return of that will always be that changes were made, even if the highstate itself made no changes. Is there any way I can pass the return from the actual highstate to the return of module.run so of highstate made no changes, module.run returns as no changes?
16:38 jespada joined #salt
16:39 cyteen joined #salt
16:39 MTecknology man, that looks messy
16:40 pipps joined #salt
16:42 MTecknology my first thought is that you could probably write a custom module to strip changes if there were no failures.
16:43 mkillebrew unless there's a better way to require a highstate at the end of a state.
16:46 om2_ joined #salt
16:47 sh123124213 joined #salt
16:50 GnuLxUsr joined #salt
16:51 edrocks joined #salt
16:51 edrocks joined #salt
16:53 asyncsec joined #salt
16:54 Guest73 joined #salt
16:55 smcquay left #salt
17:01 MTecknology mkillebrew: what's the use case? Why do you need a highstate after a state?
17:02 tiwula joined #salt
17:02 MTecknology (as opposed to just running a highstate in the first place)
17:04 ChubYann joined #salt
17:06 Rumbles joined #salt
17:08 Xenophon1 joined #salt
17:13 sh123124213 joined #salt
17:14 noraatepernos joined #salt
17:14 DEger joined #salt
17:19 Trauma joined #salt
17:20 onlyanegg joined #salt
17:22 nixjdm joined #salt
17:31 SaucyElf joined #salt
17:36 rory left #salt
17:38 bwellsnc hey guys, I am trying to find this.  I have a init.sls file that I am managing several config files in.  Can I target just one of those config files to deploy?
17:41 MTecknology bwellsnc: probably, wanna share what you're working with in a dpaste?
17:42 bwellsnc Ok, one sec
17:42 pipps joined #salt
17:43 candyman89 joined #salt
17:44 dstensnes Hello. I have configured load beacon and diskusage beacon in my salt instance, as well as an influxdb returner
17:44 pipps joined #salt
17:45 dstensnes i would like to push the data fields returned from the beacons into influxdb
17:46 MTecknology I imagine you could use the reactor to push returned data wherever you want it
17:46 dstensnes i cannot quite connect the dots on how to the returned data from the beacons, feed back into the influxdb returner
17:46 dstensnes anyone have a clue for me? please?
17:46 pipps joined #salt
17:46 bwellsnc https://zerobin.net/?96ab840ac2074c90#Yt861qkH7K3Xd/GJ6qsugpOOwOSeK6ylLg7U1FK2YN0=
17:46 ronnix joined #salt
17:46 dstensnes MTecknology: I thought so to, i just figured someone must have wanted this before
17:46 MTecknology Javascript is required for ZeroBin to work.
17:46 MTecknology sorry.. can't help
17:47 bwellsnc I just want to update one of those files, that is it... I don't want to apply them all
17:47 dstensnes it seems this is the non-javascript version: https://zerobin.net/?96ab840ac2074c90#Yt861qkH7K3Xd/GJ6qsugpOOwOSeK6ylLg7U1FK2YN0=
17:47 dstensnes at least it was marked as "raw"
17:47 MTecknology I got the same error
17:48 bwellsnc Sorry, I didn't want to have to clean the entries
17:48 dstensnes github gist maybe?
17:49 bwellsnc Ok, try this:   https://gist.github.com/anonymous/a77708f159e2d34d6288639e606291c6
17:50 MTecknology lol @ https://zerobin.net/tos.html
17:51 MTecknology bwellsnc: What is it you want to exclude and under what circumstance?
17:51 Edgan joined #salt
17:52 dstensnes MTecknology: well, about that forwarding of beacon data to influxdb returner
17:52 dstensnes you say custom written reactor is the way to go?
17:52 bwellsnc I just want to push out one of those file, map.txt file... that's it
17:52 bwellsnc I don't want to apply the entire state
17:53 MTecknology so you still want everything managed, but you just want systems to only update the one file?
17:53 dstensnes bwellsnc: i suppose there are loads of solutions, but maybe you can test for an environment variable on the rest?
17:53 dstensnes so if the environment variable is set, then you skip the other ones?
17:54 LostSoul joined #salt
17:54 bwellsnc I just know I have an ansible guy here who is trying to make a push to replace salt and this is one of the "things" he can do with ansible
17:54 MTecknology bwellsnc: I still don't understand exactly what it is you're needing.
17:55 MTecknology I'm pretty confident salt can do it, though.
17:55 dstensnes bwellsnc: there is no command argument to skip certain stuff like in ansible
17:55 bwellsnc There are 3 files in there that are changed, but I only want to push out the map.txt file right now.  This is going to about 15 servers
17:56 nicksloan joined #salt
17:56 dstensnes however, that being said, you can use any condition you want for tests within the formula
17:56 dstensnes but you will have to edit it slightly
17:56 dstensnes as far as I understand it
17:57 bwellsnc Ok, so I am going to have to comment out what I don't want to change and do that one
17:57 dstensnes well
17:57 dstensnes i suppose you could just use salt-cp
17:57 dstensnes if it's just a one of thing
17:58 MTecknology bwellsnc: I think this is what you're looking for - https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.single
17:58 dstensnes cool
17:58 dstensnes didn't know about that one
17:58 nidr0x joined #salt
17:59 bwellsnc ah ok... let me look at that
17:59 MTecknology brb
18:00 Splix76 joined #salt
18:00 c_g_ joined #salt
18:03 fracklen joined #salt
18:03 bwellsnc used salt-cp... that was pretty simple
18:03 dstensnes bwellsnc: grat :)
18:03 dstensnes *great
18:11 LostSoul joined #salt
18:12 jas02 joined #salt
18:13 nicksloan joined #salt
18:14 MTecknology salt-cp works as long as you don't do any templating. Otherwise, you'll want to figure out how to use the state execution module for it.
18:14 whytewolf salt-cp? isn't that decomm?
18:15 whytewolf [sorry just logged back into znc, so only caught the last of that]
18:16 Tantagel joined #salt
18:17 coredumb Hey folks
18:17 coredumb is there a way to completely exit the highstate process on some condition ?
18:18 whytewolf coredumb: https://docs.saltstack.com/en/latest/ref/states/failhard.html
18:20 coredumb whytewolf: not specifically on a failure actually :)
18:20 coredumb on any condition I'd put
18:20 coredumb like salt.module.sys.exit
18:20 whytewolf coredumb: thats the method of getting salt to stop
18:20 KyleG joined #salt
18:20 KyleG joined #salt
18:20 whytewolf you could put it on a test state that is known to fail
18:21 coredumb whytewolf: ohhhhhh ok I see
18:21 coredumb cheat!
18:21 coredumb :D
18:21 whytewolf yeap
18:21 KyleG joined #salt
18:21 KyleG joined #salt
18:22 coredumb thx whytewolf I'll see what I can do with this
18:22 whytewolf if you can get the jid of the currently running job you could use saltutil.kill_job
18:23 candyman89 joined #salt
18:23 whytewolf or term_job if you don't want to be as aggressive
18:24 whytewolf there is also (rerm|kill)_all_jobs
18:25 coredumb whytewolf: interesting
18:26 whytewolf options
18:27 danielsh joined #salt
18:29 danielsh hi, I've noticed some potentially buggy code which may or may not have security implications, how do I report that ?
18:29 whytewolf danielsh: https://docs.saltstack.com/en/latest/security/
18:30 whytewolf if it is a security bug email the details to security@saltstack.com
18:30 danielsh thank you, will do
18:30 ahrs joined #salt
18:33 Elsmorian joined #salt
18:33 nixjdm joined #salt
18:36 Pulp joined #salt
18:36 GMAzrael joined #salt
18:40 danielsh sent.
18:41 danielsh left #salt
18:41 danielsh joined #salt
18:45 sh123124213 joined #salt
18:45 geomacy joined #salt
18:56 Rumbles joined #salt
19:00 edrocks joined #salt
19:01 johnkeates joined #salt
19:05 Praematura_ joined #salt
19:08 MTecknology apparently we use salt around here to ensure anything deployed is already broken...
19:09 whytewolf if it anit broke, break it?
19:09 kwork joined #salt
19:09 MTecknology purty much
19:09 candyman89 joined #salt
19:15 aldevar joined #salt
19:16 hahuang65 joined #salt
19:16 hahuang65 can anyone help me with a `blockreplace`? I get an error about not finding the marker_end before the file ends, but I want to `append_if_not_found`
19:19 cyborg-one joined #salt
19:22 Guest73_ joined #salt
19:28 Elsmorian joined #salt
19:28 Eugene hahuang65 - A good first step would be posting what you have in your state right now(use a pastebin. I like https://vomitb.in). I've never actually used blockreplace myself, but I'm sure if you are patient somebody will point out the problem
19:29 Eugene Or at least keep you amused with cat jifs
19:30 DEger joined #salt
19:31 c_g_ hey, is there a way to -override- an 'onchanges' check inside a cmd.run state? I have an sls_id I'd like to kick off by calling it manually on occasion ... even if nothing has changed
19:31 tapoxi jiraphics interchange format
19:32 whytewolf c_g_: instead of putting an onchanges on your cmd.run use a onchanges_in on the state that the onchanges listens for. what way you can just call the cmd.run
19:34 nixjdm joined #salt
19:35 c_g_ thanks whytewolf, worked like a charm!
19:36 Guest73_ joined #salt
19:37 DEger joined #salt
19:43 jhauser_ joined #salt
19:50 peters-tx joined #salt
19:53 saltyotter Quick question: I ran sudo salt '*' win_update.list_updates and none of the minions returned any updates. How do I see installed updates?
19:54 hahuang65 joined #salt
19:58 whytewolf saltyotter: check your past jobs see if anything updated something. but by basicly logic. if it is installed it no longer is an update. an update is a pending installation item that changes the version of the installed item. in a possitive manner.
19:59 shanth c_g_: can you give me an example of what you just did with the onchanges_in setup?
20:00 thinkt4n_ joined #salt
20:02 saltyotter whytewolf: thanks for the help. So I did misunderstand the command, but at the same time, the results still don't show the 13 possible updates that I know exist (via the gui)
20:02 whytewolf saltyotter: that i don't know about. i don't do windows
20:04 saltyotter whytewolf: When I run sudo salt-run jobs.lookup_jid 20170515144210275035 I do see output such as HNYOWNPDT080T0S:     - HP - Display - HP ProDisplay P201 LED Backlit Monitor
20:04 saltyotter so I imagine that's a pending update for a driver. But I know there are missing pending update.
20:04 hahuang65 Eugene: haha never seen vomitb.in before lol. but I figured it out. I just had to wrap my stuff in double quotes
20:04 hahuang65 Eugene: sorry for the late response, I had to drive
20:04 flebel joined #salt
20:05 whytewolf saltyotter: maybe, that could also be the update happening.
20:05 whytewolf depends on your configuration
20:05 ecdhe Any considerations for using a framework like django to generate pillar data for salt to apply to an on-prem appliance?
20:05 saltyotter hmm.. default config. nothing fancy. just starting out
20:06 whytewolf default? default is nothing.
20:06 whytewolf if the command you running returning nothing or returning a black list?
20:06 saltyotter installed a master. installed about 30 minions to test. some ubuntu, some, windows, some freebsd.
20:07 saltyotter have winrepo syncing and can push a pkg
20:07 saltyotter that's about it
20:07 GMAzrael joined #salt
20:07 saltyotter returns the minion id: with nothing under it (no spaces no nothing)
20:08 whytewolf thats a black list
20:08 ecdhe For example, freenas uses django to render its user interface, but then enforces the policies with... bash scripts? I'm trying to discern if it'd be worth using salt to enforce similar, gui-generated local appliance policy.
20:08 saltyotter k, that's what i see then
20:08 c_g_ shanth: https://vomitb.in/r5YwfhhajT
20:08 KyleG1 joined #salt
20:09 saltyotter what's the implication of a black list?
20:10 whytewolf a blacklist? that would be don't do these items [blacklist items]
20:11 GMAzrael joined #salt
20:12 saltyotter ok, so some of the minions produce nothing under the id and some produce some updates under the id. Should I assume those that produce updates under the id are actually blacklisting those updates, ergo, not installing them?
20:12 whytewolf i don't know
20:12 saltyotter k
20:13 onlyanegg joined #salt
20:13 jas02 joined #salt
20:13 saltyotter in that case, I don't want to waste your time. But can you tell me how I'm able to list all currently installed Windows Updates (e.g., KB 2983123)? Is that via the pkg module? If so, it doesn't appear to show all installed updates
20:14 pbandark joined #salt
20:16 geomacy joined #salt
20:16 thinkt4nk joined #salt
20:18 nicksloan joined #salt
20:19 whytewolf saltyotter: i don't know. like i said I don't do windows and that is ALL windows.
20:20 Sketch i don't use salt with windows either, but ISTR there is a windows updates module, it might do what you want?
20:20 saltyotter whytewolf: ok, thanks. Will keep prodding it
20:21 Sketch https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_update.html
20:21 Sketch maybe not
20:22 saltyotter Sketch: Yes, I see that now. Ran it and it does list the pending updates with KB numbers. So that's a start. Is also indicated if each update is installed or not. But I don't see how to show installed updates yet. Will keep looking.
20:22 saltyotter https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_wua.html
20:22 kal-el joined #salt
20:22 saltyotter wua is the Windows Updates utility. Seems to plug directly into that
20:23 saltyotter likely for backwards compatability
20:28 saltyotter Sketch: some success... I can get it to list installed updates by running sudo salt '*' win_wua.list_updates installed=True but it doesn't appear to show all installed updates. Looks like it's skipping the OS-related ones. I grepped one that I know is installed and don't see it in the output
20:32 gtmanfred babilen: when you get a minute, can you open an issue on github and I will take a closer look at that, because we should totally be supporting batch from the reactor
20:33 nixjdm joined #salt
20:33 kal-el Hello, so I've read in the doc that it's not necessary to configure minion firewall rules, is it possible to define ports that the minion will communicate to master with?  I'm running into an issue where adding a "reject all others" iptables rule is causing a master to lose connection with itself after applying state.  all other connections work appropriately, so it doesn't seem to be an issue with iptables ordering or the reject rule
20:34 kal-el I have the incoming ports, 4505, 4506 listening
20:34 gtmanfred as long as all outbound connections are allowed, then the minion does not need firewall rules
20:34 gtmanfred the minions listen on the masters remote interface for push messages
20:35 kal-el yeah, that's the problem, I'm trying to limit outbound
20:35 kal-el am I able to define a port in minion config?
20:35 gtmanfred i do not believe that there is a way to specify which ports to exit on in the minion
20:35 gtmanfred you will need to set allow rules out for the minion to connect to a destination port 4505 and 4506
20:36 kal-el I have the rules set for 4505 and 4506 to listen on itself.
20:37 gtmanfred do you allow all connections on loopback?
20:38 kal-el ah, i need an output for loopback, thanks
20:38 gtmanfred no problem
20:38 kal-el I have incoming, but not outgoing
20:38 onlyanegg joined #salt
20:38 gtmanfred +1
20:40 hashwagon joined #salt
20:42 armyriad joined #salt
20:43 impi joined #salt
20:51 babilen gtmanfred: I will, just didn't get around to do it today. If you have an idea as to where this would be implemented (rough sketch) I might just do it tomorrow if I find a few free minutes.
20:51 gtmanfred so, local in the reactor should just be an instantiated LocalClient
20:52 gtmanfred so it might need to have cmd_batch called maybe? instead of cmd.
20:52 gtmanfred that is my guess
20:52 gtmanfred but iirc that is how we do it in salt-api, so i wouldn't be surprised if we just need to do it in the reactor too
20:53 gtmanfred or not in the api
20:53 gtmanfred i forget, but i just added cmd_subset.
20:53 gtmanfred for orchestration
20:54 onlyanegg joined #salt
20:54 gtmanfred babilen: https://github.com/gtmanfred/salt/blob/develop/salt/modules/saltutil.py#L1180-L1199
20:55 gtmanfred yup, we only ever call cmd_async https://github.com/saltstack/salt/blob/develop/salt/utils/reactor.py#L297
20:56 gtmanfred but it will have to go through the pub stuff for cmd_async
20:57 gtmanfred that could be fun
20:57 gtmanfred babilen: tag me in that issue when you make it :)
20:59 Sarphram joined #salt
20:59 babilen gtmanfred: I will, thanks again .. Time for dinner :)
20:59 gtmanfred no problem!
21:04 KyleG joined #salt
21:04 KyleG joined #salt
21:07 Praematura_ joined #salt
21:09 * whytewolf sits and waits for saltconf 2017 announcments :P
21:09 jalaziz joined #salt
21:11 shanth c_g_: does that basically make your cmd.run run before your git thing?
21:12 miruoy joined #salt
21:12 whytewolf shanth: no, the _in versions act as kind of injectors they inject the requisit on the state listed
21:13 whytewolf so in this chase it will ingect onchanges: git-tools into the cmd.run
21:13 renaissancedev joined #salt
21:13 whytewolf so, wait yes git-tools will still need to run first
21:14 whytewolf and if it changes restart will run. but if you just run the restart by it's self it will also run
21:14 miruoy_ joined #salt
21:16 Guest73 joined #salt
21:17 onlyanegg joined #salt
21:19 shanth why cant you just put the onchanges on the second part and it does the same thing? whytewolf
21:19 whytewolf shanth: because he wanted to be able to run the cmd.run without the other state present
21:19 whytewolf which the onchanges was preventing
21:20 shanth ahh!!!
21:20 shanth so the second block will always run?
21:21 shanth because block 1 requires block 2 and block 2 doesn't require block 1?
21:21 whytewolf it will when it is run seperatly. if the first block is in the same run it will only run if block 1 runs
21:22 shanth how is it run separately?
21:22 c_g_ shanth: I wanted to be able to run `salt '*' state.sls_id restart <path-to.state>`
21:23 whytewolf ^ that way
21:23 hemebond `state.apply <path.to.state>`
21:23 whytewolf can also use state.single
21:23 hemebond Wait...
21:23 shanth i didn't know  state.sls_id restart was an option
21:23 hemebond What is "restart"?
21:23 shanth maybe this is why i can't follow
21:24 whytewolf hemebond: nope. state.sls_id or state.single he wanted to run a single id inside of state file
21:24 hemebond Oh I see.
21:24 gtmanfred that is super cool
21:24 gtmanfred did not know that existed
21:24 hemebond ^
21:24 shanth so with  state.sls_id <name of id> i can target a specific id in a state?
21:24 c_g_ it's really helpful when you have a large state file, and only really want to test one thing
21:24 gtmanfred shanth: yes
21:24 gtmanfred specific state id in a state file
21:24 shanth and since you made that id have no requirement it can fire alone?
21:24 shanth brilliant
21:25 whytewolf exactly
21:25 shanth really good stuff, now i understand :)) added that to my notes
21:25 whytewolf also, I was wrong. forgot state.single is to basicly build a state on the command line
21:27 whytewolf sls_id is REALLY nice for testing single items
21:30 whytewolf would be kewl if state.apply had a three way toggle so that it could do highstate, sls, or sls_id
21:31 whytewolf but the logic for that escapes me
21:31 * gtmanfred super hard passes on that id
21:31 gtmanfred ea
21:31 gtmanfred yeah, i have no idea on the logic, because right now we use sls() if mods are specified
21:31 gtmanfred otherwise we run highstate
21:32 whytewolf yeah. exactly. would need a way to know if the first item entered is a id or a mod. and the second item entered is a mod or a value for sls
21:33 nixjdm joined #salt
21:33 whytewolf and if niether matches. run highstate
21:34 gtmanfred which is going to be fun :P
21:34 whytewolf we put the fun in funeral
21:35 asyncsec joined #salt
21:36 gtmanfred haha
21:38 fracklen joined #salt
21:40 Elsmorian joined #salt
21:40 c_g joined #salt
21:40 f4ls3 joined #salt
21:40 f4ls3 hey! qq, salt on windows. when using cmd.run, what is the default use these are run as?
21:41 raspado joined #salt
21:41 iggy the user the service is running as (system?)
21:41 iggy don't know that much about Windows minions tbh
21:42 gtmanfred it uses the user the system is running as
21:42 gtmanfred and you can only use the runas option if the user running salt-minion is an Administrator
21:44 f4ls3 so if i install the salt-minion under Administrator all cmd.run modules will be executed under the Administrator account?
21:45 f4ls3 does the salt-minion create or use a local system account?
21:45 gtmanfred yes, unless you specify another user to run it as
21:45 gtmanfred same in linux, it run as root, unless you specify runas
21:45 gtmanfred as for craeting an admin user, i do not believe so
21:47 f4ls3 interesting. I have a share mounted as Administrator. but if i launch a process via salt cmd.run on that system with the mounted share, it can't find it.
21:47 f4ls3 I have to mount the share within the same cmd.run and then execute my program
21:47 hemebond That seems normal.
21:48 hemebond Have you checked the task manager to see what salt-minion is running under?
21:48 gtmanfred i don't know how shares work, but that seems weird to me :/ but it could be my knowledge about windows isn't great
21:48 fracklen joined #salt
21:50 f4ls3 it looks like its running under SYSTEM, not Administrator
21:50 hemebond That'll be why.
21:50 f4ls3 yeah, it's SYSTEM. so that sounds right why it cant find the share
21:51 gtmanfred windows is magic
21:51 hemebond Though for some reason I think network shares aren't shared well between processes. Not sure why I think that.
21:51 whytewolf no, magic is more reliable
21:51 gtmanfred it is
21:51 gtmanfred but i know how linux works under the hood
21:51 gtmanfred which takes away the magic
21:51 hemebond The installer decides which user salt-minion will run as when it registers the service.
21:51 fracklen joined #salt
21:52 hemebond Nothing to do with who installed it.
21:52 f4ls3 https://docs.saltstack.com/en/latest/topics/installation/windows.html#create-the-unprivileged-user-that-the-salt-minion-will-run-as
21:53 f4ls3 you can modify the user it will install and run as
21:53 DEger joined #salt
21:53 hemebond Why would you run salt as an unprivileged user?
21:53 f4ls3 i'm not, and can't i dont think. but the option is there
21:54 hemebond Yeah, you can just open services.msc and edit it there.
21:54 shanth salt has so many pieces. does any one man know it all?
21:54 hemebond Administrator account might have issues with UAC though.
21:55 f4ls3 ah yeah, that would work too
21:55 shanth this man might be a god
21:55 hemebond thatch might.
21:55 whytewolf not even sure thatch knows it all anymore
21:55 whytewolf :P
21:55 whytewolf but he would be the closest one
21:55 shanth i wonder if he is seth house or colton meyers, i read their books
21:55 hemebond (I would be very surprised if he did)
21:55 gtmanfred i know thatch doesn't
21:55 whytewolf shanth: neither
21:55 gtmanfred i think it would take 3 of us to sit down to get it all
21:56 shanth do you guys know if the corporate support for salt allows a salt employee to help write complex states or configure certain aspects of salt?
21:56 gtmanfred shanth: yes
21:56 gtmanfred we have professional services for that
21:57 shanth is it per hour or flat package price? i put in a request for a quote
21:57 gtmanfred you purchase a bucket of hours from my understanding
21:57 shanth nice
21:58 woodtablet joined #salt
21:59 shanth im wondering if i configure my pillars to use a database such as mongodb if i can assign a large number of values to a minion
21:59 shanth like if i had one column for each minion and each one had 100 pieces of information and values
22:00 gtmanfred yes
22:01 shanth then i think i have solved my big issue that i was going to make a mailing list post about gtmanfred
22:01 shanth if i can dump in all those pieces of information and use jinja to call them as pillars then i am set
22:01 shanth that way i dont have a monolithic pillar file to manage or a giant jinja map
22:08 asyncsec joined #salt
22:11 jalaziz_ joined #salt
22:17 hrumph joined #salt
22:17 sh123124213 joined #salt
22:18 hrumph hi
22:19 Guest73 joined #salt
22:19 whytewolf greetings
22:19 gtmanfred hello
22:19 hrumph hi
22:20 gtmanfred guten tag
22:20 hrumph so i downloaded from git. i made some changes to some module code
22:20 hrumph all i want to do is compile the html
22:20 hrumph so i'm in salt/doc
22:21 hrumph I did make html but I don't see my changes reflected in the generated html
22:21 gtmanfred are you looking in doc/_build/ ?
22:21 hrumph yes
22:21 gtmanfred i would say nuke the file that hasn't changed, and run make html again
22:22 gtmanfred it shouldn't need that, but idk
22:23 whytewolf also make sure there are not some strange requirements your setup might need https://docs.saltstack.com/en/latest/topics/development/hacking.html#editing-and-previewing-the-documentation
22:23 gtmanfred ahh good to know about that
22:23 gtmanfred This is the one I was looking at https://docs.saltstack.com/en/latest/topics/development/conventions/documentation.html#building-the-documentation
22:25 whytewolf docs, docs everywhere
22:29 jas02 joined #salt
22:29 brd <3 docs
22:34 thinkt4nk joined #salt
22:35 shanth brd from #freebsd? :)
22:38 nicksloan joined #salt
22:41 preludedrew joined #salt
22:47 nidr0x joined #salt
22:51 auha joined #salt
22:52 aldevar joined #salt
22:53 auha Hello, I'm having an issue with salt roots fileserver backend. Using salt://<path to file> works for one of my states, but it doesn't work for another one of my states. I've been banging my head against the wall for a while on why this would not work. Does anybody have any suggestios on what I could do to help troublehsoot it further?
22:54 gtmanfred are you using it in a file.managed or in something else?if not, have you confirmed that the state module supports salt://
22:54 gtmanfred auha: check out the salt cp module for interacting with the fileserver on the minion directly https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html
22:54 gtmanfred https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.list_master
22:54 auha I am using file.managed
22:54 gtmanfred cp.list_master will list all files in the fileserver
22:55 whytewolf auha: are you using enviroments
22:55 gtmanfred cp.get_file_str will return the file from the fileserver
22:55 auha No I am not using environments
22:55 auha I have used the CP module and got that to work
22:55 auha to copy from master to the minion
22:56 hahuang65 how do I upgrade the version of a bin if it's installed thru a formula?
22:56 auha But when I do a file.managed it just goes dumb and doesn't know what I'm talkinga bout.
22:58 woodtablet joined #salt
22:58 hrumph my bad i didn't realise that it puts the functions in alphabetical order or something like that
23:01 iggy auha: you might want to try gist'ing your states, any error messages, cp.list_master output, etc
23:01 iggy it'll probably be easier to see what's going on
23:01 mikecmpbll joined #salt
23:04 sh123124213 joined #salt
23:04 onlyanegg joined #salt
23:05 auha_ joined #salt
23:07 nicksloan joined #salt
23:13 auha So I created a gist
23:13 auha https://gist.github.com/Auha/22c0367c53610c862186a82bcc363795
23:13 auha I also just tested cp.get_file
23:13 auha and that somehow works
23:14 hemebond auha: Do you have `/srv/salt/nginx/files/angular.conf`?
23:14 auha Anything else you would want me to add into the gist file?
23:14 auha Yes
23:14 auha I will double check it on the master
23:15 hemebond Your `context` is wrong.
23:15 hemebond You need to indent those properties one more level.
23:15 auha I will try that out, but I think its already indented one level
23:16 hemebond According to your jist you've created a dict with {'context': '', 'server_name'....
23:16 whytewolf auha: basicly this is what he is talking about https://gist.github.com/whytewolf/8a5bc335816eafc516efa2204a6410ce
23:18 auha Giving it a shot
23:18 auha I hope that's the issue
23:18 whytewolf i don't think it is
23:18 hemebond The error is about a missing file.
23:18 auha ... That fixed it
23:19 hemebond lol
23:19 whytewolf although env: dev could be throwing it off
23:19 auha Hah
23:19 auha I guess when it was parsing the sls file it though that my source was all off.
23:20 lionel joined #salt
23:21 auha That's weird though because I format my other files that have done file.managed the same way with the context
23:22 whytewolf auha: it shouldn't be working. it might not cause it to error like that but the context most likely isn't getting set either
23:22 whytewolf in this instance env: dev might have been being interpedted to cause the thing to look in a dev enviroment for the file that doens't exist
23:24 whytewolf there is a note at the top of https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html about this very thing involoveing 4 sapces instead of the normal two
23:24 auha Oh yeah you're right.
23:26 auha Thanks for the help
23:26 auha I knew it was something dumb.
23:46 justan0theruser joined #salt
23:51 gmoro joined #salt
23:51 auha left #salt
23:52 prg3 joined #salt
23:54 hemebond What is https://github.com/salt-formulas ?
23:56 whytewolf it is the saltstack comunity formulas
23:57 hemebond Do people usually use it over saltstack-formulas?
23:58 whytewolf no

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