Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-09-22

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

All times shown according to UTC.

Time Nick Message
00:04 shoemonkey joined #salt
00:12 morissette joined #salt
00:13 johnj_ joined #salt
00:13 numkem joined #salt
00:23 hammer065 joined #salt
00:24 jfelchner joined #salt
00:32 _ssn_06_ joined #salt
00:35 hammer065 joined #salt
00:43 _ssn_06 joined #salt
00:44 _ssn_06 Hello. Please help me to get how does login to docker-registry work. I read https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.dockerng.html
00:45 _ssn_06 but getting 'unauthorized: authentication required'
00:45 _ssn_06 doing something wrong but cant get what exactly (
00:51 _ssn_06 if hub stored in pillars, what should be included to state.sls ?
00:51 _ssn_06 to make it work
00:53 _ssn_06 oh I see how it works bu module, question is it it could be used in state to avoid additional salt run just for login
01:13 shoemonkey joined #salt
01:14 johnj_ joined #salt
01:31 _ssn_06 fixed :) pillar conf was wrong. thank
01:34 justanotheruser joined #salt
01:54 ilbot3 joined #salt
01:54 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> Support: https://www.saltstack.com/support/ <+> 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
02:12 joshin joined #salt
02:15 johnj_ joined #salt
02:20 squishypebble joined #salt
02:26 shoemonkey joined #salt
02:29 shoemonk_ joined #salt
02:29 zerocool_ joined #salt
02:35 murrdoc joined #salt
02:36 shoemonkey joined #salt
02:37 murrdoc is there a mr meza in this room
02:37 murrdoc paging see meza
02:45 justanotheruser joined #salt
02:52 debian1121 joined #salt
02:56 sh123124213 joined #salt
02:57 Dereckson joined #salt
03:02 ivanjaros joined #salt
03:10 noraatepernos joined #salt
03:16 johnj_ joined #salt
03:41 pbandark joined #salt
03:52 shoemonkey joined #salt
03:57 shoemonkey joined #salt
04:17 johnj_ joined #salt
04:34 evle2 joined #salt
04:35 felskrone joined #salt
04:56 Hybrid joined #salt
04:58 _aeris_ joined #salt
05:18 johnj joined #salt
05:39 onlyanegg joined #salt
05:45 sh123124213 joined #salt
05:49 _KaszpiR_ joined #salt
05:55 Hybrid joined #salt
05:57 ivanjaros joined #salt
05:57 shoemonkey joined #salt
06:06 nku does creating a new file qualify as an onchanges.file event?
06:06 nku and i assume if have to create the file before applying the onchanges.file state?
06:08 nku thing is, i want to reload systemd unit files whenever any service file is modified, but i'm not sure if one global state is enough to accomplish this
06:15 colttt joined #salt
06:17 do3meli joined #salt
06:17 do3meli left #salt
06:19 johnj joined #salt
06:30 jas02 joined #salt
06:35 colttt joined #salt
06:37 jmiven joined #salt
06:44 jas02 joined #salt
06:54 maestropandy joined #salt
06:56 _KaszpiR_ joined #salt
07:12 ashepelev_ joined #salt
07:14 ashepelev_ joined #salt
07:15 Ricardo1000 joined #salt
07:16 ashepelev_ joined #salt
07:16 ashepelev_ Hello
07:17 ashepelev_ I'm trying to use SaltMine. I've configured an additional item on master node, but it doesn't update the minions:
07:18 ashepelev_ salt minion1 config.option mine_functions returns one item less than salt-call config.option mine_functions on master
07:18 ashepelev_ salt '*' mine.update doesn't help =(
07:19 ashepelev_ salt '*' saltutls.sync_all doesn't help either
07:19 ashepelev_ salt '*' saltutils.sync_all doesn't help either
07:20 Hydrosine joined #salt
07:20 johnj joined #salt
07:22 Hydrosine joined #salt
07:30 vb29 joined #salt
07:31 colttt joined #salt
07:40 robman joined #salt
07:47 onlyanegg joined #salt
07:50 maestropandy joined #salt
07:50 Ricardo1000 joined #salt
07:52 LeProvokateur joined #salt
07:58 shoemonkey joined #salt
08:01 jas02 joined #salt
08:01 ntropy ashepelev_: i run into similar issues quite frequently as well
08:01 ntropy ashepelev_: while not a fix, i know minion restart *usually* helps
08:02 ntropy would love to hear a proper way to prevent this from happening in the first place
08:04 Arendtsen joined #salt
08:04 ws2k3 joined #salt
08:04 vb29 joined #salt
08:05 miruoy joined #salt
08:06 vb29 left #salt
08:06 pualj joined #salt
08:06 swills joined #salt
08:06 tru_tru joined #salt
08:06 _aeris_ joined #salt
08:07 dvdmuckle joined #salt
08:07 stack joined #salt
08:07 inetpro joined #salt
08:08 dograt joined #salt
08:08 iggy joined #salt
08:08 Ahlee joined #salt
08:08 nrezinorn joined #salt
08:10 mikecmpbll joined #salt
08:10 ashepelev_ ntropy: thanks
08:10 aerbax joined #salt
08:10 twooster joined #salt
08:13 pbandark joined #salt
08:14 Naresh_ joined #salt
08:16 shakalaka joined #salt
08:18 keith4 joined #salt
08:19 Vaelatern joined #salt
08:19 Mogget joined #salt
08:21 beardo joined #salt
08:22 Horgix joined #salt
08:24 schasi joined #salt
08:26 felskrone joined #salt
08:33 maestropandy joined #salt
08:39 yidhra joined #salt
08:41 obitech joined #salt
08:41 obitech morning guys
09:08 oida joined #salt
09:15 Rubin joined #salt
09:18 ccha joined #salt
09:22 colegatron joined #salt
09:23 johnj joined #salt
09:40 mavhq joined #salt
09:46 Tucky joined #salt
09:48 onlyanegg joined #salt
09:52 schasi Morning :D
09:56 djinni` joined #salt
09:59 shoemonkey joined #salt
10:07 saml joined #salt
10:23 johnj joined #salt
10:26 Kruge joined #salt
10:27 maestropandy joined #salt
10:27 Kruge I'm experiencing some problems upgrading to 2017.7.1 on ubuntu 16.04.  Running pkg.upgrade against a minion from the salt master results in the salt-minion package being left "in a very bad inconsistent state", and requires a dpkg --configure -a followed by apt-get install -f to fix
10:28 Kruge I don't think I'm doing anything wrong, but you never know...
10:28 Kruge Oh, and it also terminates the salt-minion process, so I have to ssh into each box to fix it
10:28 Kruge Which is the nice party
10:28 Kruge -y
10:34 ejsf joined #salt
10:34 jas02 joined #salt
10:38 sastorsl joined #salt
10:38 maestropandy joined #salt
10:39 kjsaihs joined #salt
10:39 sastorsl Any issues with the yum saltstack repos?
10:40 sastorsl It seems that http://repo.saltstack.com/yum/redhat/5/ is available on only one of two(?) nodes since I'm getting arbitrary 404's
10:53 pfallenop joined #salt
10:53 pfallenop joined #salt
10:55 obitech sastorsl are you trying to install saltstack via yum packagemanager? If you're running into issues try the bootstrap script https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html
11:11 Kruge In case anyone else is interested, this appears to be my problem: https://github.com/saltstack/salt/issues/43340
11:24 johnj joined #salt
11:30 obitech Is there a way to save all files or subdirectories in a list inside a .sls and iterate over them with jinja ?
11:44 impi joined #salt
11:45 ibro joined #salt
11:49 onlyanegg joined #salt
11:50 J0hnSteel joined #salt
11:51 dendazen joined #salt
11:54 sh123124213 joined #salt
12:00 shoemonkey joined #salt
12:09 jas02 joined #salt
12:13 Nahual joined #salt
12:14 robman joined #salt
12:14 smead joined #salt
12:25 johnj joined #salt
12:42 squishypebble joined #salt
12:50 maestropandy joined #salt
12:55 squishypebble joined #salt
12:56 nickadam joined #salt
12:58 maestropandy left #salt
13:07 Brew joined #salt
13:09 wavded joined #salt
13:23 shoemonkey joined #salt
13:26 johnj joined #salt
13:28 XenophonF obitech: what do you mean?
13:29 XenophonF you could use cp.list_master to find files accessible through the Salt file server
13:29 XenophonF or you could use file.find to, well, find files on the minion's file system
13:30 XenophonF or you could use archive.list
13:31 obitech I tried something along those lines: https://gist.github.com/obitech/f80a45b0f315db63f4fa788dfdb870a0
13:31 maestropandy joined #salt
13:31 XenophonF or boto_s3_bucket.list_objects
13:31 obitech however, I'm getting different outputs when I do it from master (salt '*' file.finde ...) and when I do it from jinja as in the gist.... really don't know why >_<
13:32 XenophonF well that looks like it might work
13:32 obitech if I go with salt '*' file.find ... I'm getting exactly the list I need
13:32 obitech but from jinja I often get more files or like OUTPUT_TRIMMED or something like that
13:34 XenophonF that's weird
13:34 XenophonF can you post some examples?  maybe you hit a bug in file.find.
13:34 obitech I know right ? I mean passing multiple variables should work like in the gist or am I missing something ?
13:35 obitech I might create an issue later
13:36 inre joined #salt
13:39 mchlumsky joined #salt
13:47 tapoxi joined #salt
13:50 onlyanegg joined #salt
13:58 maestropandy joined #salt
13:59 cgiroua joined #salt
14:01 sarcasticadmin joined #salt
14:02 jmb13562 joined #salt
14:02 XenophonF you could try putting {{ salt.file.find(...)|yaml }} into a Jinja template and render it on the minion using file.managed
14:02 XenophonF but it should return a list of filenames
14:04 racooper joined #salt
14:05 zerocool_ joined #salt
14:09 fatal_exception joined #salt
14:14 pbandark1 joined #salt
14:15 pualj joined #salt
14:17 rojem joined #salt
14:18 JawnAuz joined #salt
14:21 rojem joined #salt
14:23 rojem joined #salt
14:27 XenophonF It looks like a patch I submitted got included in Salt milestone 13 (https://github.com/saltstack/salt/milestone/13), but that page won't load.
14:27 XenophonF Is there a way to find out which Salt release included the patch?
14:28 johnj joined #salt
14:31 jmb13562 joined #salt
14:35 sarcasticadmin joined #salt
14:41 XenophonF got it using git blame
14:45 winsalt joined #salt
14:45 omie888777 joined #salt
14:48 morissette joined #salt
14:50 onlyanegg joined #salt
14:55 csmule joined #salt
14:58 cgiroua joined #salt
15:01 winsalt Does anyone have trouble with the win_servermanager  module __virtual__ returning False ?
15:01 tkojames joined #salt
15:03 tapoxi joined #salt
15:05 maestropandy left #salt
15:07 Ricardo1000 joined #salt
15:10 vtolstov joined #salt
15:10 numkem joined #salt
15:13 vtolstov hi. i'm use salt 2016.11 under debian and try to use pkgrepo.managed wit consolidate
15:14 vtolstov my repos defined in pillar and state file produced with jinja
15:15 vtolstov after i'm add another repo (dotdeb) i see that sources.list does not have needed line
15:15 vtolstov and salt each highstate outputs that line added but inside file i don't see this line
15:21 oida_ joined #salt
15:24 xet7 joined #salt
15:24 Hybrid joined #salt
15:26 oida joined #salt
15:28 vtolstov nevermnd i have error on this line and pkgrepo.managed remove this linen after consolidate
15:30 johnj joined #salt
15:39 shoemonkey joined #salt
15:42 tiwula joined #salt
15:43 Hybrid joined #salt
15:52 lbv joined #salt
16:03 brent_ joined #salt
16:06 onlyanegg joined #salt
16:08 woodtablet joined #salt
16:12 jmb13562 joined #salt
16:15 wavded joined #salt
16:21 JawnAuz If I have information on a minion inside a SQL Server instance, how would I take the result of a query and store it as a grain?
16:22 JawnAuz Was looking at sql module but missing how I can get it in a jinja-map file context.
16:24 sh123124213 joined #salt
16:31 johnj joined #salt
16:35 inre joined #salt
16:35 ivanjaros joined #salt
16:35 squishypebble joined #salt
16:36 inre joined #salt
16:43 sh123124213 joined #salt
16:43 zerocool_ joined #salt
16:45 it_dude joined #salt
16:46 johnkeates joined #salt
16:48 bluenemo joined #salt
17:06 pipps joined #salt
17:14 jas02 joined #salt
17:21 morissette joined #salt
17:24 nielsk joined #salt
17:29 lane_ joined #salt
17:32 johnj_ joined #salt
17:35 hoonetorg joined #salt
17:39 shoemonkey joined #salt
17:40 cyborg-one joined #salt
17:42 _KaszpiR_ joined #salt
17:43 nixjdm joined #salt
17:51 jas02 joined #salt
17:58 jmb13562 joined #salt
18:00 murrdoc joined #salt
18:08 XenophonF JawnAuz: You're talking about SQL Server, so I assume you're using https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mssql.html#salt.modules.mssql.tsql_query.
18:08 XenophonF Is that correct?
18:08 JawnAuz Correct.
18:08 wavded joined #salt
18:09 XenophonF tsql_query() returns tuples or dictionaries, so you'd just iterate over them or reference them.
18:09 khaije1 joined #salt
18:09 XenophonF I don't know how your stuff is structured, so you could merge the dictionaries directly using the update() dictionary method.
18:09 XenophonF maybe
18:10 JawnAuz Yeah, looks like I should be able to write results to values in my map.jinja and then just do a lookup. I assume the map file will run each time with the state and so be minion-specific, just the sql credentials are stored in pillar to enable the module to execute.
18:11 XenophonF I'm assuming you only get one row back and that column names == dictionary keys in your whatever_settings dict, and that things follow the usual defaults.yaml/map.jinja formula
18:12 XenophonF map.jinja runs every time an SLS file that includes it gets rendered
18:12 pipps joined #salt
18:12 ivo_ joined #salt
18:14 JawnAuz Yeah, I should be able to do things like query ID as one result, Class as another, etc... Once they're in the map I'll just store them as grains on the minion so they're accessible to the rest of Salt as targetting/minion_id renaming. Still tinkering with it but storing as grains at least since they shouldn't change after initialized.
18:14 XenophonF hm
18:14 DammitJim joined #salt
18:15 XenophonF I'd maybe set a Pillar key depending on the query results.
18:15 XenophonF That way the database queries (and credentials) stay on the master.
18:15 * XenophonF shrugs
18:15 XenophonF YMMV
18:15 XenophonF TIMTOWTDI
18:15 JawnAuz I was thinking that, too. Figured I'd get the data first and then decide where to keep it.
18:16 XenophonF good plan
18:16 XenophonF I didn't know Salt could talk to SQL Server.  That's great!
18:16 JawnAuz My issue is that I want some of the data that's trapped in SQL on my minions to become their new minion_id, ultimately.
18:18 JawnAuz Like role.[ID-in-SQL].[Class-in-SQL].WIDE.Hostname - Right now I don't have a way to get those at Salt-install time.
18:18 csmule Adding this as gitfs, but I have a top file at salt/env in my git repo and it's acting like the base env. But I defined this to be the environment csdev.
18:19 csmule gitfs_remotes:
18:19 csmule - http://ourrepo/repos/sxa/repo.git:
18:19 csmule - saltenv:
18:19 csmule - csdev:
18:19 csmule - ref: salt-csdev
18:19 csmule - root: 'salt/env'
18:19 csmule oops
18:19 XenophonF pls use gist.github.com or something
18:19 XenophonF not  pastebin.com though - such ads, much surveillance
18:19 johnkeates paste.nsa.gov works great
18:19 csmule yah, one sec. sorry.
18:19 XenophonF :-D
18:20 johnkeates comes with permanent backup for free! :D
18:20 XenophonF hey that's the Linus Torvalds backup method
18:20 csmule https://gist.github.com/stonefury/24fdb54eb076e45bc952dc44669646c4
18:20 XenophonF upload to FTP and let the world mirror it :)
18:21 csmule A co-worker added this repo to manage our "csdev" servers, but his top.sls file is acting like the base top.sls.
18:21 johnkeates your top ordering settings is probably bad
18:21 johnkeates you'll probably want to set an explicit ordering and merging strategy
18:21 JawnAuz Yeah, definitely check top_file_merging_strategy
18:25 csmule Thanks johnkeates JawnAuz I'll look into that!
18:27 J0hnSteel joined #salt
18:30 choke joined #salt
18:32 choke hey all, having a slight issue with my salt, i'm certain i'm doing something wrong I just don't know what: https://gist.github.com/jblac/4c83b3d5b308f32031a99f9f493f4a36 has an example pillar, my state sls and the output i'm given hopefully someone here can assist.
18:33 johnj_ joined #salt
18:34 noraatepernos joined #salt
18:35 XenophonF <rant> The Salt docs need to teach people to use the Jinja |yaml and |yaml_encode filters </rant>
18:35 XenophonF sorry
18:35 XenophonF choke: change `{{ processed_environments }}` to `{{ processed_environments|yaml_encode }}`
18:36 XenophonF Jinja is _just_ a text macro system.
18:36 XenophonF It isn't like Lisp macros, which are syntax-aware.
18:36 choke trying it out right now.
18:36 XenophonF Rather it's like C macros, which just modify the text.
18:37 mikecmpbll joined #salt
18:37 toofer joined #salt
18:37 XenophonF so when you drop a variable into the textual, YAML-formatted representation of a data structure, Jinja knows nothing about that syntax, Jon Snow.
18:38 XenophonF you either have to hope you don't cause syntax errors, or you have to explicitly serialize those objects from your Jinja code
18:39 XenophonF which is what the |yaml_encode (for scalars) and |yaml (for lists/dictionaries) Jinja filters do
18:39 hasues joined #salt
18:40 choke It gets further but with that, but i am getting an error yaml_encode() only works with YAML scalar data; failed for <type 'list'> which makes sense, so I guess I need to either change my input or do some post processing on it afterward
18:40 XenophonF oh i didn't read that very clearly
18:41 XenophonF hang on let me throw a gist together with what you could try
18:41 XenophonF basically you could loop over that list
18:41 XenophonF also - indent "environements" et seq. over two more spaces
18:42 XenophonF what you have is legal YAML but it's a little confusing
18:42 XenophonF environment is under defaults but looks like it's inline with it
18:42 choke so what i've got is, a list of environment variables a mile long in my pillar.  i take and put that into a list in the format php likes "env[ENVIRONMENT_VAR] = value" which will then get put in place in the file
18:43 choke Yeah, i haven't re-configured my editor to play nice with yaml yet -- i should really do that - the 2 space thing gets me a lot
18:43 lordcirth_work :set expandtab tabstop=4 shiftwidth=2
18:44 lordcirth_work er, s/4/2
18:45 XenophonF choke: https://gist.github.com/xenophonf/e478a727c73294435a66b13bbc9f1898
18:45 XenophonF that's how I'd do it
18:45 hasues left #salt
18:46 XenophonF that includes whitespace controls so the output file looks right
18:47 XenophonF I assumed you intended environments to be a string
18:47 XenophonF s/string/multi-line string/
18:48 XenophonF you could do the Pillar lookup inside salt://php/files/pool_www.jinja
18:48 XenophonF or you could pass the Pillar key's value via defaults or context (after serializing using |yaml)
18:49 XenophonF whatever causes you the least confusion
18:49 ChubYann joined #salt
18:49 choke I didn't know that you could do the pillar lookup inside the file -- though I think conceptually I like what I was doing and what you came up with ( which works aside from some things inside the file itself that foul up jinja ) as it's 'easier' to find and modify in case of problems later.
18:50 mayk joined #salt
18:50 XenophonF that's cool
18:50 XenophonF I prefer putting lookups in my templates b/c then they're self-contained.
18:51 XenophonF Context variables confuse/surprise me sometimes.
18:52 choke I could see that too -- maybe as I get more solid with saltstack itself i'll change my way and do the lookups inside the templates which really would have negated my entire problem.
18:55 XenophonF good plan
18:59 nixjdm joined #salt
19:00 debian112 joined #salt
19:00 choke so quick question - i used your state you sent - within the file would I need to loop through that inside the file or just {{ environments }}? -- the latter doesn't seem to put anything into the file.
19:01 XenophonF so you could just put `{{ environments }}` in that file
19:01 XenophonF there's an easier way, assuming the file only contains that list of environments
19:01 XenophonF you can change the `defaults` kwarg to `contents`
19:02 XenophonF and remove the `source` and `template` kwargs
19:02 XenophonF and then the file.managed state will take the contents of the file directly from the state definition
19:02 debian112 left #salt
19:02 XenophonF which is nice for use cases like these
19:02 XenophonF very simple
19:02 choke there's quite a bit more than just that -- it's a default php configuration file that i need to just inject into.   but doing `{{ environments }}` doesn't seem to be doing the job.
19:02 XenophonF gotcha
19:03 XenophonF hm
19:03 XenophonF maybe change `defaults` to `context`?
19:03 XenophonF I don't use those options but I vaguely recall defaults having special semantics.
19:03 XenophonF Let me RTFM real quick.
19:04 XenophonF hm, no that should work
19:04 khaije1 I'm on the verge of writing a salt module, wondering if I can use a python 3 module with a python 2 install of Salt?
19:05 schemanic joined #salt
19:05 XenophonF choke: {{ environments }} inside pool_www.conf.jinja should work
19:05 schemanic can I call the same state module twice in -require?
19:06 schemanic I need for both a file.exists and a file.managed state to have gone off before I run another state
19:07 morissette joined #salt
19:07 _aeris_ joined #salt
19:07 XenophonF schemanic: yes, for example - https://github.com/irtnog/salt-states/blob/development/tomcat/shibboleth-idp.sls#L61
19:07 choke I think I know why it's not working -- i'm an idiot is why...
19:08 schemanic Word. I was sure I'd seen something where you cant call the same module in require
19:08 choke my pillar got modified to be 'environment' instead of 'environments' -- changed that, and it worked beautifully
19:09 XenophonF awesome - glad you figured it out, choke
19:09 toofer joined #salt
19:11 aldevar joined #salt
19:11 schemanic Xenophonf, whytewolf iggy, gtmanfred - I wanted to say thank you all a great deal - I'm feeling like I'm developing a real command of writing salt code and its directly from your assistance. Thank you very very much.
19:12 schemanic Goes for anyone else I missed too - a huge thanks to the folks on this channel
19:15 sh123124213 joined #salt
19:19 dyllie joined #salt
19:24 schemanic I'm having trouble with file.uncomment. It's telling me pattern is not found, but I'm fairly certain I'm following what I'm supposed to be doing
19:26 schemanic https://gist.github.com/anonymous/cca9b2afe515e7428bda22a660c56ee3
19:29 JawnAuz Agree with schemanic , lots of great help here when we get stuck on something.
19:33 schemanic anyone have any suggestions for file.uncomment?
19:34 johnj_ joined #salt
19:37 dyllie__ joined #salt
19:39 jdipierro joined #salt
19:40 shoemonkey joined #salt
19:41 dyllie___ joined #salt
19:41 dyllie_ joined #salt
19:42 dyllie_ I am trying to understand the salt -t 10 timeout behavior
19:42 dyllie_ I am running a command salt server1 cmd.run 'ls -l /var' -t 10
19:43 dyllie_ the minion receives the command and tries to run it. However the minion has got some issues and the command is getting hung due to some issue. I was expecting salt to timeout the command
19:44 dyllie_ however the command never timeout and the job is keep running forever.
19:44 jdipierro The timeout in seconds to wait for replies from the Salt minions. The timeout number specifies how long the command line client will wait to query the minions and check on running jobs. Default: 5
19:44 jdipierro from the docs. Doesn't mean it'll stop the CLI command
19:44 dyllie_ Is the -t supposed to timeout only when the salt-minion is not reachable?
19:45 schemanic I figured my thing out
19:45 Eugene schemanic - that regex wouldn't match lines 30 or 36, AFAIK..... I typically end-around this sort of problem by using file.managed to begin with. You might have better luck with file.line, which has more to it
19:45 schemanic It looks like saying - char: # was being interpreted as a yaml comment
19:45 schemanic so I needed to say - char: '#'
19:46 Eugene Or that ;-)
19:46 schemanic Word. Thanks Eugene
19:46 dyllie_ I think salt-minion is reporting to salt-master as far this job is concerned that it is still running the command whatever it was running
19:47 choke makes sense, especially since # is a comment char -- though you also shouldn't need the .* on the regex as normal regex will match based on contains.
19:47 Eugene IMO file.managed is a better fit for most config files like this, especially in combination with most packages' conf.d/ folder
19:47 dyllie_ Wondering if my understanding is correct
19:47 Eugene IE, just add a file for your config instead of trying to manage what already exists.
19:47 dyllie_ This is killing our salt master load to 90%
19:49 pipps joined #salt
19:49 tapoxi joined #salt
19:50 lordcirth_work schemanic, just always quote strings.  Otherwise YAML will continue to find new and exciting ways to eat your data.
19:50 schemanic :/
19:50 fatal_exception joined #salt
19:50 schemanic I see it so little in stuff I download though... I just want to do it the way most people are... augh
19:51 Eugene "Most people" don't bother to read enough or follow best practices
19:52 choke best practices? pfft -- i strive for mediocrity! ( kidding )
19:52 lordcirth_work I put "Anyone putting secrets in this repository will be shot" in our states repo readme.  Feels good.
19:54 pipps joined #salt
19:55 choke I have a benefit there, i'm the only one doing any work on our infrastructure -- and my git repo is on a locally hosted system that only I and my salt master have access to...  i shouldn't be putting secrets in there still ( like the environment variables for all our environments ) but I do it anyway 'cause I haven't learned a better way as of yet.
19:55 Eugene Separate Pillar & State repos works well. Keep the Pillar safe
19:56 Eugene And publish your State repo on Github, if you're brave enough
19:57 choke I haven't added it to github, but I might at some point -- though it'd still be in a private repo since -- I don't think anyone would find our states useful in virtually any way.
19:58 choke if i showed it, i'm 100% certain you'd want to either a. tell me a better way or b. fly to san diego and slap me.... but i'm relatively new to salt so always room to grow and make it better as I learn.
19:58 keith4 joined #salt
19:59 nixjdm joined #salt
20:01 lordcirth_work I have made a point of not committing anything to the states repo that I couldn't put on Github, but I still haven't published it.
20:02 lordcirth_work There are some things that might be neat to share, like I wrote some additional scripts for mollyguard.
20:14 wavded joined #salt
20:18 * whytewolf stretches
20:19 * johnkeates tickles whytewolf while streching
20:19 whytewolf lol
20:20 johnkeates it's the worst thing. comfortably stretching and someone just pokes you
20:20 whytewolf it is
20:21 Neighbour worse than yawning and someone sticking something in your mouth? :P
20:21 johnkeates well, i do that to my cat sometimes
20:21 johnkeates he doesn't seem to mind :p
20:21 whytewolf this is getting weird
20:21 johnkeates i often steer towards weird
20:22 johnkeates but most of the time, not intentionally
20:23 jas02 joined #salt
20:26 whytewolf anyway, I gota go drop off the banks equipment to send back to them. and then relax for a week.
20:35 johnj_ joined #salt
20:38 fatal_exception joined #salt
20:43 JawnAuz So I can run things like salt['pillar.get'] in my map.jinja, can I run anything in attempt to return a value?
20:45 csmule_ joined #salt
20:47 DammitJim joined #salt
20:50 pipps joined #salt
20:57 Hybrid joined #salt
20:58 fatal_exception joined #salt
20:59 nixjdm joined #salt
21:03 iggy rephrase the question?
21:06 JawnAuz Like I'm trying to do something along the lines of... salt['mssql.tsql_query'](' SELECT...') to return a value the same way I would with pillar.get.
21:06 izibi joined #salt
21:08 cgiroua joined #salt
21:11 toastedpenguin joined #salt
21:12 absolutejam The map.jinja is for returning the right values from a dict
21:12 absolutejam if you'll run a query no matter what the OS, you could store the query in the map dict
21:13 absolutejam otherwise, just do an if statement based on the OS
21:14 iggy running sql query's every time an sls file is rendered doesn't sound like a good plan
21:15 absolutejam Yeah, keep actions to states and use jinja for information-gathering steps if needed
21:15 lkolstad joined #salt
21:16 JawnAuz Yeah, I'm doing this in my map.jinja already actually, or attempting to do this, that is.
21:17 JawnAuz In this case, I'm wanting this to trigger when a system syncs it's local mssql instance (already configured creds via pillar) and then rename the minion based on several of the fields that will then exist in the DB.
21:18 JawnAuz Reactor triggered sls, essentially with all this query stuff being in the associated map.jinja
21:19 JawnAuz So it shouldn't run often, but would generated the new unique minion_id which I then have a separate thing for salt/auth reactor...
21:22 iggy if you are doing it like that, it's going to run every time you render the sls files (so every hightstate, apply, etc)
21:22 wavded joined #salt
21:23 pualj joined #salt
21:24 JawnAuz So if I want to store it and it's unique per minion, could I have it just be a state that writes the output to a grain on the individual minion, then use the grain for the renaming step?
21:29 iggy yes, although, you can't set a grain and use it in the same state run
21:29 iggy so you'll have to multi-step it somehow
21:33 JawnAuz Thinking I'll do a grains.present and use the tsql_query to set those, then separately kick off a rename with the available grain values. Seems like the queries would only trigger whenever that particular sls file is called then.
21:36 johnj_ joined #salt
21:38 pipps joined #salt
21:41 shoemonkey joined #salt
21:48 doubletwist joined #salt
21:49 doubletwist joined #salt
21:50 izibi joined #salt
21:50 murrdoc iggy hiya!
21:53 pipps joined #salt
21:54 doubletwist joined #salt
21:55 iggy go away
21:55 johnkeates which way
21:58 nixjdm joined #salt
22:02 murrdoc omg hiya
22:04 mrueg joined #salt
22:17 pipps joined #salt
22:20 cliluw joined #salt
22:37 johnj_ joined #salt
22:44 gmoro_ joined #salt
22:45 oida_ joined #salt
22:46 cliluw joined #salt
22:49 dendazen joined #salt
22:51 xMopxShell Is the 'clean' parameter of 'file.recurse' supposed to remove all files from the managed directory that aren't present in the source?
22:51 xMopxShell That's what the doc sounds like to me though the language isn't quite clear. Plus it doesn't seem to be working.
22:52 pipps joined #salt
22:54 onlyanegg joined #salt
22:55 sh123124213 joined #salt
22:56 fuzzy left #salt
22:56 Uni joined #salt
22:58 onlyanegg joined #salt
22:59 shoemonkey joined #salt
23:27 pipps joined #salt
23:35 rathier joined #salt
23:38 johnj_ joined #salt
23:51 justanotheruser joined #salt

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