Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-06-14

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

All times shown according to UTC.

Time Nick Message
00:19 XenophonF joined #salt
00:20 woodtablet left #salt
00:28 ssplatt joined #salt
00:42 bowhunter joined #salt
00:48 hassan2566 joined #salt
00:51 rem5 joined #salt
00:52 lorengordon joined #salt
01:01 Edur joined #salt
01:01 lstor joined #salt
01:01 c4rc4s_ joined #salt
01:01 rofl____ joined #salt
01:08 dxiri joined #salt
01:08 ghs39ghsggf joined #salt
01:09 ghs39ghsggf left #salt
01:11 Eugene McNinja - you can use your own bootstrap script with `sleep` in it....
01:11 patrek joined #salt
01:19 ssplatt joined #salt
01:26 erratas joined #salt
01:29 justan0theruser joined #salt
01:33 rem5_ joined #salt
01:34 dxiri joined #salt
01:39 evle1 joined #salt
01:45 onlyanegg joined #salt
01:52 nicksloan joined #salt
01:54 dxiri joined #salt
01:54 snc joined #salt
02:03 Roh joined #salt
02:03 asyncsec joined #salt
02:08 justanotheruser joined #salt
02:12 wonko21 joined #salt
02:13 zerocoolback joined #salt
02:13 zerocoolback joined #salt
02:16 zerocool_ joined #salt
02:18 justanotheruser joined #salt
02:20 dxiri joined #salt
02:21 teh_champ joined #salt
02:26 justanotheruser joined #salt
02:40 zerocoolback joined #salt
02:41 bigjazzsound joined #salt
02:45 justanotheruser joined #salt
02:45 justanotheruser joined #salt
02:50 zerocoolback joined #salt
02:51 zerocoolback joined #salt
02:52 zerocoolback joined #salt
02:53 zerocoolback joined #salt
02:53 zerocoolback joined #salt
02:55 cyteen joined #salt
02:56 justanotheruser joined #salt
03:06 nafg joined #salt
03:14 Guest73 joined #salt
03:19 justanotheruser joined #salt
03:20 justanotheruser joined #salt
03:22 Sense8 joined #salt
03:30 druonysus joined #salt
03:34 donmichelangelo joined #salt
03:37 onlyanegg joined #salt
03:48 Sense8 left #salt
03:54 Praematura joined #salt
04:03 samodid joined #salt
04:04 preludedrew joined #salt
04:05 edrocks joined #salt
04:15 cyborg-one joined #salt
04:20 cyborg-one joined #salt
04:21 hoonetorg joined #salt
04:37 kungfoopanda joined #salt
04:40 fracklen joined #salt
04:43 cmichel joined #salt
04:55 Mogget_ joined #salt
04:58 qwertyco joined #salt
05:01 Diaoul joined #salt
05:08 edrocks joined #salt
05:18 cyteen joined #salt
05:23 hasues joined #salt
05:24 hasues left #salt
05:26 ivanjaros joined #salt
05:34 onlyanegg joined #salt
05:39 rihannon joined #salt
05:41 Bock joined #salt
05:44 Bock joined #salt
05:49 joehh joined #salt
05:55 do3meli joined #salt
05:55 do3meli left #salt
05:59 candyman88 joined #salt
06:00 h32Lg joined #salt
06:02 [CEH] joined #salt
06:20 aldevar joined #salt
06:26 samodid joined #salt
06:29 felskrone joined #salt
06:32 onlyanegg joined #salt
06:35 fracklen joined #salt
06:36 preludedrew joined #salt
06:43 jvr joined #salt
06:48 [CEH] joined #salt
06:56 canaar joined #salt
06:58 N-Mi joined #salt
06:58 N-Mi joined #salt
06:59 sgo_ joined #salt
07:12 canaar joined #salt
07:14 Loreek joined #salt
07:14 Loreek Hello
07:15 Loreek Can anyone help me with salt.auth.django.auth external authentication?
07:16 Loreek This is the paste of apache log : https://gist.github.com/anonymous/381d04a7e5d2854c7a705f2eea3341ca
07:17 fracklen joined #salt
07:19 absolutejam Morning
07:19 absolutejam Anyone have issues with tab completion working for function names?
07:20 absolutejam I can do `salt 'A[tab]` and it suggest minions and then [tab] again for it to suggest params (eg --list)
07:20 absolutejam but I can't do `salt 'test' test.[tab]`
07:28 seffyroff is there a way I c an add an array of rows to an sqlite3.row_present: or do I need to declare each row separately?
07:34 cyteen joined #salt
07:36 absolutejam You could jinja template it
07:37 absolutejam {% set rows = ['foo', 'bar'] %}
07:37 absolutejam {% for row in rows %} ... state including  {{ row }} ... {% endfor %}
07:38 absolutejam I'd set the variable separately as it allows you to span multiple lines for nicer formatting
07:40 edrocks joined #salt
07:47 Reverend joined #salt
08:03 samodid joined #salt
08:10 mugsie joined #salt
08:10 mugsie joined #salt
08:15 lorik joined #salt
08:19 mugsie joined #salt
08:20 MTecknology or better, from pillar
08:21 zulutango joined #salt
08:22 XenophonF joined #salt
08:29 BlackBishop joined #salt
08:30 BlackBishop how would I do something like salt 'machine' pillar.item item:something and have just the value ! no color/formating and stuff
08:30 mikecmpbll joined #salt
08:30 BlackBishop ?
08:31 babilen BlackBishop: https://docs.saltstack.com/en/latest/ref/output/all/index.html
08:31 babilen txt sounds about right - alternatively output it as json and use jq
08:31 pbandark joined #salt
08:32 BlackBishop so --output raw or txt seem to return json :)
08:33 Mattch joined #salt
08:33 BlackBishop I was thinking something would return just the value ( especially since I specified one machine )
08:35 BlackBishop but I'll use jq ..
08:36 buhm joined #salt
08:38 buhm Hey. Does someone know if there is a easy way to add "Login as a service" right to user in Windows with salt? I'm creating an user and assigning a service to run as that user but startup is failing because that right is missing
08:38 buhm Managed machine is WIndows 10
08:38 EthPyth joined #salt
08:41 onlyanegg joined #salt
08:42 BlackBishop babilen: https://paste.fedoraproject.org/paste/jfFh2zF9skJfjc9iIaXhrg any ideas on how I would get only 'yes\n' ?
08:42 BlackBishop ( maybe even without a \n )
08:44 babilen BlackBishop: Pipe the json outputter output into jq and extract the value
08:44 lorik Hello
08:44 lorik Can anyone help me with salt.auth.django.auth external authentication?
08:44 lorik This is the paste of apache log : https://gist.github.com/anonymous/381d04a7e5d2854c7a705f2eea3341ca
08:45 lorik Its seems like there are errors in the library itself. In salt/auth/django.py
08:46 BlackBishop thanks, was wondering about the jq filter, nvm, I'll figure it out.
08:47 BlackBishop done.
08:48 Aleks3Y joined #salt
08:50 babilen BlackBishop: https://stedolan.github.io/jq/
08:50 N-Mi joined #salt
08:50 N-Mi joined #salt
08:52 babilen Ah, you wanted the exact invocation
08:57 [CEH] joined #salt
09:04 ivanjaros joined #salt
09:06 defswork hi - I'm new to salt - I'm just setting up some users using users formula but setting manage_vimrc to True doesn't seem to be working - I've created the requisite source path/vimrc file
09:13 defswork nvm - I noticed that the users sls doesnt automatically incluide the vimrc sls - users.vimrc does the job
09:19 PhilA joined #salt
09:23 mugsie joined #salt
09:27 candyman88 joined #salt
09:33 PhilA joined #salt
09:35 mugsie joined #salt
09:41 edrocks joined #salt
09:43 flughafen left #salt
09:52 POJO joined #salt
09:55 cyborg-one joined #salt
10:02 absolutejam you can do users.* afaik
10:02 absolutejam for all states under user
10:04 inad922 joined #salt
10:05 Praematura joined #salt
10:06 Naresh joined #salt
10:10 EthPyth joined #salt
10:15 _KaszpiR_ joined #salt
10:18 mugsie joined #salt
10:20 zerocoolback joined #salt
10:23 voidspacexyz joined #salt
10:42 onlyanegg joined #salt
10:44 zerocoolback joined #salt
10:51 hemebond joined #salt
10:55 sgo_ joined #salt
11:04 ceh joined #salt
11:08 evle joined #salt
11:21 EthPyth joined #salt
11:34 lorengordon joined #salt
11:35 EthPyth joined #salt
11:36 thinkt4nk joined #salt
11:39 thinkt4n_ joined #salt
11:40 POJO joined #salt
11:42 cyborg-one joined #salt
11:44 buhm For winrepo_remotes_ng, can i somehow select only specific subdirectory from git repo? Similar to gitfs_remotes allows specifying - root: subdirectory
11:46 bowhunter joined #salt
11:57 zerocoolback joined #salt
11:57 zerocoolback joined #salt
11:58 EthPyth joined #salt
11:58 PhilA_ joined #salt
12:00 candyman88 joined #salt
12:00 impi joined #salt
12:01 qwertyco joined #salt
12:03 BlackBishop left #salt
12:03 dxiri joined #salt
12:03 dxiri joined #salt
12:04 PhilA joined #salt
12:07 xet7 joined #salt
12:14 candyman88 joined #salt
12:14 rem5 joined #salt
12:21 Eagleman_ joined #salt
12:21 amcorreia joined #salt
12:22 candyman88 joined #salt
12:23 candyman88 joined #salt
12:23 POJO joined #salt
12:26 Eagleman_ Why does the salt command hangs for 10 minutes on the cli when the default timeout is 5 seconds?
12:30 dxiri_ joined #salt
12:30 Qwazerty joined #salt
12:31 dendazen joined #salt
12:33 candyman88 joined #salt
12:33 infrmnt joined #salt
12:35 numkem joined #salt
12:36 dxiri joined #salt
12:39 dstensnes hello. I think I have heard this being talked about here before, but can someone please refresh my memory
12:40 ssplatt joined #salt
12:40 dstensnes i'm using runner.http.query in a reactor sls file, and my log has tons of "body:" statements in it
12:42 edrocks joined #salt
12:43 onlyanegg joined #salt
12:43 dstensnes anyone?
12:44 Eagleman_ Channel seems pretty dead
12:46 amcorreia joined #salt
12:48 Inveracity joined #salt
12:53 Cadmus The Americans aren't awake yet.
12:53 Cadmus Stay online, leave your question up, there's a good chance someone will see it.
12:53 dendazen joined #salt
12:55 gmacon Eagleman_: the 5 second timeout is before the minion acknowledges the command and starts work
12:55 dxiri joined #salt
12:56 nicksloan joined #salt
12:56 dstensnes indeed quite dead. Where in the states are they located?
12:57 dstensnes or rather, which timezone?
12:57 Eagleman_ Mexico
13:02 Lionel_Debroux_ joined #salt
13:06 Lionel_Debroux joined #salt
13:14 xet7 joined #salt
13:16 asyncsec joined #salt
13:16 racooper joined #salt
13:18 dxiri joined #salt
13:21 dxiri joined #salt
13:27 McNinja Eugene, yeah thats what I was going to play around with today :) Figured I would also submit a feature request to have an option added for a sleep also
13:27 McNinja thanks!
13:31 cgiroua joined #salt
13:34 notArnold joined #salt
13:34 bowhunter joined #salt
13:37 gmoro joined #salt
13:38 kulty joined #salt
13:41 stewart311 joined #salt
13:43 dxiri joined #salt
13:43 onlyanegg joined #salt
13:44 TomerZino joined #salt
13:49 stewart311_ joined #salt
13:50 xet7 joined #salt
13:52 stewart311_ left #salt
13:52 stewart311_ joined #salt
13:53 stewart311_ Good Morning
13:54 dxiri joined #salt
13:55 stewart311_ Could anyone help with Jinja variables inside map.jinja here is my example https://gist.github.com/anonymous/e36f8961ca2db856bd740ebf41032139
13:57 Brew joined #salt
14:00 mugsie joined #salt
14:00 mugsie joined #salt
14:05 sgo_ joined #salt
14:06 dxiri joined #salt
14:07 masber joined #salt
14:13 qwertyco joined #salt
14:17 Praematura joined #salt
14:18 dstensnes darn it.... i'm doing something wrong with that reactor sls file, but I cannot find it...
14:20 ahrs joined #salt
14:21 stewart311_ What are you trying to accomplish dstensnes
14:22 qwertyco joined #salt
14:24 dstensnes i have an reactor that i want to visit an url on certain evens
14:24 dstensnes *events
14:24 dstensnes just to notify another system
14:25 dstensnes and just throw away the response from the request
14:25 dstensnes but my syslog is spammed with "body:" lines
14:26 dstensnes stewart311_: did i make sense?
14:29 noobiedubie joined #salt
14:29 stewart311_ yes it does make sensu you could have syslog server discard events if $msg contains "/api/operations" then ~
14:30 dstensnes i could, but that is not the correct solution
14:30 dstensnes the problem is somewhere in my salt configuration i believe
14:30 s0undt3ch_ joined #salt
14:30 dxiri joined #salt
14:30 dstensnes i think i might be doing that wrong
14:30 dstensnes but i cannot figure out what is right
14:32 dstensnes i keep trying different things with this command
14:32 dstensnes salt-run http.query url='http://www.google.com/'
14:32 mpanetta joined #salt
14:32 dstensnes because i was hoping maybe adding "text=False" should have helped
14:32 dstensnes but I might be going about this all wrong
14:32 dstensnes or "body=False"
14:32 mpanetta joined #salt
14:34 Lionel_Debroux_ joined #salt
14:36 StolenToast can anyone tell me why '{% if '7.3' in grains['osrelease'] %}' doesn't seem to catch nodes running centos 7.3.1611?
14:37 StolenToast osrelease grain is just that, 7.3.1611
14:38 sarcasticadmin joined #salt
14:38 dstensnes i thought maybe "in" there is more for looking in arrays, but i might be wrong
14:39 dstensnes StolenToast: i thought maybe "in" there is more for looking in arrays, but i might be wrong
14:39 StolenToast I've used it to search for hostname substrings, maybe the '.' is breaking it?
14:40 StolenToast I also tried using "== '7.3.1611'" and that didn't work either
14:40 stewart311_ To be honest I'm just getting started with Reactors so I'm not 100% sure how to handle response
14:41 dstensnes stewart311_: okay, thanks anyway :)
14:41 dstensnes StolenToast: maybe this helps? https://stackoverflow.com/questions/28346000/method-similiar-to-startswith-in-jinja2-flask
14:41 dstensnes StolenToast: something like that "startswith" thingy, if that works
14:42 noobiedubie StolenToast: are you sure this isn't being caught? Could it be somthing else in your state that is causing the desired actions to be executed?
14:44 StolenToast it's a simple if-else state, and it's defaulting to "else"
14:44 onlyanegg joined #salt
14:44 noobiedubie your syntax is correct only thingI can think of might be a type bug. Is is returning 7.3 as an int instead  of string maybe??
14:44 StolenToast I didn't think about that, does jinja have casting?
14:45 Edgan joined #salt
14:51 Lionel_Debroux joined #salt
14:55 dxiri joined #salt
14:59 XenophonF StolenToast: what do you mean about casting?
14:59 XenophonF scrolling up, I see you're trying to match against the osrelease grain
14:59 StolenToast if grains['osrelease'] returns a "str" and jinja interprets "7.3" as a double or something then conventional coding tells me they won't compare because this isn't python
15:00 XenophonF you're doing string comparisons wrong
15:00 XenophonF https://docs.python.org/2/library/stdtypes.html#string-methods
15:01 XenophonF you need to do something like `{% if grains['osrelease'].startswith('7.3') %}`
15:01 XenophonF https://docs.python.org/2/library/stdtypes.html#str.startswith
15:02 ujjain joined #salt
15:02 ujjain joined #salt
15:03 XenophonF as you can see from http://jinja.pocoo.org/docs/dev/templates/#comparisons, Jinja's `==` operator is about object equality
15:03 Lionel_Debroux_ joined #salt
15:03 XenophonF you're assuming it has sematics that it doesn't have
15:04 qwertyco joined #salt
15:04 StolenToast ok, this is confusing because this seems to have worked in a different situation
15:05 StolenToast why does "in" not work?
15:05 XenophonF cf. https://github.com/pallets/jinja/blob/master/jinja2/tests.py#L106
15:05 dstensnes ProT-0-TypE: hello
15:06 XenophonF Jinja in has the same sematics as Python in: https://github.com/pallets/jinja/blob/master/jinja2/tests.py#L165
15:06 dstensnes ProT-0-TypE: from the internet I can see that you asked the question about "body:" output from http.query
15:07 StolenToast dang this doesn't work either {% if grains['osrelease'].startswith('7.3') %}
15:07 StolenToast there must be something else here
15:07 dstensnes ProT-0-TypE: did you find a solution?
15:08 XenophonF StolenToast: https://docs.python.org/2/library/stdtypes.html?highlight=#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange
15:08 XenophonF what is the value of the osrelease grain in question?
15:08 JohnnyRun joined #salt
15:08 XenophonF s/in question/on the minion in question/
15:09 StolenToast inspecting the grain returns 7.3.1611
15:09 candyman88 joined #salt
15:11 XenophonF when you say "dang this doesn't work either" - what actually happens?
15:11 StolenToast the "else" condition is triggered instead of the "if"
15:11 StolenToast just passes over it
15:11 XenophonF can you try rendering `{{ grains['osrelease'] }}` and `{{ grains['osrelease'].startswith('7.3') }}`? e.g. via state.single file.managed etc.?
15:13 XenophonF so on the minion you'd run `salt-call state.single file.managed name=/tmp/file template=jinja contents="{{ grains['osrelease'] }} {{ grains['osrelease'].startswith('7.3') }}"`
15:13 XenophonF i think
15:13 dstensnes Question: If i want to put the data from beacons into influxdb for later graphing in grafana. How should I go about that?
15:13 XenophonF or put it in a file
15:13 XenophonF and are you sure you're getting the osrelease from the minion and not the master?
15:14 StolenToast can grains[''] return items from the master?
15:15 StolenToast I thought it specifically only took data from minions
15:15 XenophonF no
15:15 XenophonF but if you run it on the master instead of the minion...
15:15 StolenToast maybe that's it
15:15 StolenToast because the file contents are 7.3.1611 Tru
15:15 XenophonF I've made that mistake a bunch of times which is why I'm asking
15:15 StolenToast *true
15:15 StolenToast I am running salt-call from the minion
15:15 XenophonF gotcha
15:16 XenophonF OK so it's returning true so something else is wrong
15:16 StolenToast but your test indicated that the startswith condition works
15:16 s0undt3ch_ left #salt
15:16 XenophonF can you post the SLS or template?
15:16 XenophonF let's see this in context
15:16 StolenToast I'll post it hold on
15:17 s0undt3ch joined #salt
15:18 StolenToast https://gist.github.com/anonymous/567ffeecebdb181e76215044fe01ba6d
15:18 StolenToast and I'm just running this state alone to test it
15:19 ivanjaros joined #salt
15:20 dxiri joined #salt
15:21 XenophonF hang on i have a centos 7.3 system i can test this against
15:21 SalanderLives joined #salt
15:21 noobiedubie could it be that your minion is not 7.3?
15:21 StolenToast if it isn't then grains['osrelease'] is returning the wrong result
15:21 Praematura joined #salt
15:21 XenophonF I thought about that but we tested it and the version is right
15:22 StolenToast but I am reasonably sure about it: CentOS Linux release 7.3.1611 (Core)
15:23 StolenToast we tested a startswith condition that returned true, so something else here is going wrong
15:23 XenophonF hm
15:23 XenophonF it works for me
15:23 StolenToast well dang
15:24 XenophonF i just rendered it like `salt-call state.single file.managed name=/tmp/file source=salt://lustre.sls template=jinja`
15:24 StolenToast I guess the only thing to try now is... rebuild it?
15:24 XenophonF so something else is broken
15:24 noobiedubie me too which is what makes me think the wrong minion is being targeted or something like that
15:24 StolenToast I can have that done over lunch
15:24 XenophonF what version of Salt are you running, StolenToast?
15:24 XenophonF did you build from source or are you using the official packages?
15:24 StolenToast oof it's kinda old
15:24 StolenToast 2016.3.1
15:25 StolenToast I am using packages but I forget if I got them from the salt repo
15:25 XenophonF I'm running 2016.11.5 from the official repo.
15:25 StolenToast let me retry that, I remembered as I was typing it
15:25 XenophonF could be a bug
15:25 StolenToast I got this package from the official repo
15:25 StolenToast yeah maybe
15:25 XenophonF unfortunately I don't have any other ideas
15:25 noobiedubie same here version wise that i tested on
15:25 StolenToast I don't expect you to
15:25 XenophonF I don't have anything older against which I could test.
15:25 StolenToast ok I'll try the newest official release
15:26 XenophonF my CentOS 7 minions are running the usual mix of base+epel+saltstack repos, with a little SCL for additional flavor
15:27 StolenToast these guys are on a hidden network, I can't give them outside access to these repos so I have to copy the packages
15:27 * XenophonF winces
15:27 XenophonF might be worth your while to setup spacewalk
15:27 StolenToast the price we pay for high-performance science
15:27 StolenToast yes actually that is a great idea
15:28 StolenToast this is a frequent problem
15:28 XenophonF dude, I am right there with you
15:28 XenophonF I support similar stuff for NIAID.
15:28 XenophonF hate hate hate deploying stuff in the science DMZs
15:28 darvon joined #salt
15:29 StolenToast cool!
15:29 StolenToast it's kind of funny, the user-desktops part of this place has a Redhat sub and everything that comes with it, including Satellite (paid spacewalk)
15:29 StolenToast but we have to do things free
15:30 XenophonF then again as a sometimes jackbooted thug er infosec practioner myself i kind of appreciate how far my colleagues have locked stuff down
15:30 XenophonF yeah I kind of assumed you didn't have RHEL available to you since you said CentOS
15:30 XenophonF I'm in the same boat.
15:31 StolenToast ultimtely it's for the best, I think
15:32 PatrolDoom joined #salt
15:38 XenophonF omg the new archive.extracted state's behavior is driving me the crazy
15:38 XenophonF "below paths exist, but are the incorrect type"
15:39 Cadmus XenophonF: At least we can orverride ownership now, that was hair-tearing for a while
15:41 SalanderLives joined #salt
15:41 major okay .. soo .. is anyone else using salt-api on Ubuntu Xenial? .. because there seems to be a bug w/ notifying systemd that it is up
15:42 dstensnes grr.... http.query puts "body:" in syslog files from my reactor
15:42 dstensnes lots and lots
15:42 dstensnes anyone?
15:42 dstensnes please? I've been stuck on this for a couple of hours now
15:43 Lionel_Debroux_ joined #salt
15:47 nicksloan joined #salt
15:49 fritz09 joined #salt
15:54 Lionel_Debroux joined #salt
15:55 st8less joined #salt
15:55 dxiri joined #salt
15:59 sgo_ joined #salt
15:59 XenophonF Cadmus: IKR
15:59 exegesis joined #salt
16:00 XenophonF except now that i've re-specified if_missing, I need to figure out how to disable enforce_ownership_on
16:03 mt5225 joined #salt
16:03 dstensnes found the origin of the body header though. salt/utils/http.py:516 sets the body into ret['body']
16:03 XenophonF i wish there was a way to pass an mtree-like spec to things like archive.extracted or file.recurse
16:03 dstensnes i commented it out for now...
16:04 woodtablet joined #salt
16:04 dstensnes i do not know why the return is sent to syslog though....
16:05 dstensnes is there a #salt-dev channel or something?
16:05 Lionel_Debroux_ joined #salt
16:05 dstensnes #salt-devel seems to be it
16:05 dstensnes i will inquire more about it there tomorrow
16:06 dstensnes have a nice evening....
16:08 XenophonF cheers
16:11 onlyanegg joined #salt
16:11 dxiri joined #salt
16:15 schemanic_ joined #salt
16:16 LondonAppDev joined #salt
16:19 aldevar joined #salt
16:24 thinkt4n_ joined #salt
16:28 masber joined #salt
16:31 dxiri joined #salt
16:38 ChubYann joined #salt
16:43 chowmeined joined #salt
16:45 POJO joined #salt
16:48 exegesis joined #salt
16:51 v3x why is it so hard to get a modern version of Git for centos 7 ?
16:52 ws2k3 joined #salt
16:53 tiwula joined #salt
16:53 hemebond joined #salt
16:54 rihannon joined #salt
16:55 whytewolf because centos stays locked to the same versions of packages as redhat. and redhat trys to not move versions during the lifetime of a distro version. and no one makes git rpms because the people that use git tend to just build their own anyway.
16:56 thinkt4n_ joined #salt
16:56 whytewolf i have no idea why redhat didn't move to git 2 at least when redhat 7 was release dthough. it was out.
16:57 dxiri joined #salt
17:00 XenophonF v3x: if you want newer stuff without breaking base, use SCL
17:02 XenophonF there's rh-git29-git in SCL, and there may be newer versions. i didn't look too hard
17:03 whytewolf git is in scl? that seems heavy handed. python i understand. as a newer pythong does break yum. but git really doesn't break the base system
17:05 XenophonF I dunno.
17:06 whytewolf never been a fan of the implimentation of scl
17:06 MTecknology Is there a magic trick to making salt create an empty file?
17:07 XenophonF file.touch?
17:07 whytewolf file.touch
17:07 * MTecknology goes and puts on his dunce hat
17:08 MTecknology also, thanks!  I couldn't break my head out of file.managed. Cripes I feel silly now.
17:09 XenophonF you can do it with file.managed, too. just set contents=''
17:09 XenophonF but that empties it if it has stuff in it
17:09 XenophonF which may or may not be what you want
17:09 whytewolf XenophonF: that actually wouldn't be a blank file. would contain at the very least a string null
17:09 MTecknology file.touch is exactly the exact thing that I exactly need
17:11 whytewolf MTecknology: the file.managed mindset is a tough habbit to break when we condition ourselves to almost never look at the other functions in file. because most of them are bad habbits
17:12 MTecknology file.touch...
17:12 MTecknology Note that if you just want to create a file and don't care about atime or mtime, you should use file.managed instead, as it is more feature-complete. (Just leave out the source/template/contents arguments, and it will just create the file and/or check its permissions, without messing with contents)
17:13 * whytewolf shrugs
17:14 MTecknology file.touch sounded like what I wanted until I read that, and then I laughed because it so perfectly matches what you just said.
17:14 edrocks joined #salt
17:19 XenophonF whytewolf: actually it is a zero length file, as long as you set contents_newline=False, too
17:21 PeterO joined #salt
17:22 whytewolf but it is so much easier to just do /tmp/contents: file.managed: []
17:23 whytewolf :P
17:23 _KaszpiR_ joined #salt
17:23 whytewolf and yes with contents_newline: false your contents: '' would work
17:25 racooper joined #salt
17:28 candyman88 joined #salt
17:30 XenophonF true
17:31 dxiri joined #salt
17:35 impi joined #salt
17:40 POJO joined #salt
17:41 _KaszpiR_ joined #salt
17:41 PatrolDoom joined #salt
17:42 patrek joined #salt
17:44 lordcirth_work I'm writing a state, how do I get it included in doc generation?
17:44 XenophonF for inclusion into salt?
17:45 XenophonF i mean, you just set docstrings on things the same as other salt states
17:45 XenophonF they use sphynx sphinx however that's spelled ;)
17:46 mikecmpbll joined #salt
17:47 lordcirth_work XenophonF, yeah, but I did 'make html' and though my changes to a module showed up, my state (entirely new file) doesn't show
17:48 XenophonF hm
17:48 samodid joined #salt
17:49 lordcirth_work XenophonF, is there an "include" sort of thing anywhere other than just making the file in states/ ?
17:49 whytewolf shouldn't be
17:50 MTecknology I just did file.managed with no source/contents
17:50 whytewolf ohhh, there is
17:50 whytewolf lordcirth_work: https://docs.saltstack.com/en/latest/topics/development/conventions/documentation.html#adding-module-documentation-to-the-index
17:50 MTecknology I only care that the file was created with a certain set of permissions...
17:50 MTecknology (creating /var/log/custom_app.log)
17:51 lordcirth_work whytewolf, cool thanks
17:52 sgo_ joined #salt
17:57 lordcirth_work whytewolf, so it shows up in the state list but it's not a link and there's no description
17:59 dxiri joined #salt
18:02 PatrolDoom joined #salt
18:02 aldevar joined #salt
18:03 XenophonF omfg i hate archive.extracted - on this zip file it's setting permissions to 0000 on everything
18:04 lordcirth_work XenophonF, that's odd, report a bug
18:04 defsdoor joined #salt
18:05 st8less joined #salt
18:06 whytewolf yeah that defintly looks to be a bug. most likely something that wasn't tested as zip files unlike tar balls don't contain permision info. so it is taking that as hey i have no permissions
18:06 whytewolf ... by default... sorry forgot that part
18:07 whytewolf zip files don't have permissions by default. not that they can't
18:07 XenophonF freaking extract_perms new in 2016.11 and set to true by default
18:07 whytewolf that would do it
18:07 lordcirth_work XenophonF, I think the problem is more the behavior of extract_perms when faced with a permissionless zip
18:08 XenophonF also the 10-sec timeout warning i get because i'm not running ipv6 is super annoying
18:08 lordcirth_work Not really the fact that it's default
18:09 whytewolf really hate that ipv6 change. literally the only thing that changed in that grain is that warrning was added.
18:10 lordcirth_work Seems I need to create ./ref/states/all/salt.states.nfs_export.rst
18:11 whytewolf you shouldn't need to create it the document build procedure should
18:12 lordcirth_work whytewolf, but that would be in _build wouldn't it?
18:12 lordcirth_work Does 'make html' write anywhere outside of _build?
18:13 whytewolf Build the documentation which will generate an .rst file for the new module in the same directory as the index.rst.
18:13 whytewolf thats what i gather from that line
18:13 whytewolf it builds it as part of autodoc
18:13 lordcirth_work whytewolf, perhaps I need to do 'make' with somethign other than html?
18:14 whytewolf I don't know.
18:15 whytewolf I'm only going off of documentation. i have never submitted a new module to salt. only tweeked an old one
18:16 qwertyco joined #salt
18:18 asyncsec joined #salt
18:23 KyleG joined #salt
18:23 KyleG joined #salt
18:23 lordcirth_work whytewolf, I ran "make clean" and salt/doc/ref/states/all/salt.states.host.rst is still here.  So I think that's the source.
18:25 POJO left #salt
18:26 ahrs Can I prevent file.append from inserting new lines? This isn't doing what I'd expect it to do https://gist.github.com/anonymous/f42f313d7a6de93d9dd6ca13e56d4455
18:31 rem5_ joined #salt
18:33 PatrolDoom joined #salt
18:33 dxiri joined #salt
18:35 lordcirth_work ahrs, what do you expect it to do?  The same but without newline characters?
18:35 lordcirth_work ahrs, could you add to the gist the file you want to be generated?
18:35 ws2k3 joined #salt
18:38 ahrs lordcirth_work: https://gist.github.com/anonymous/ef4afee93225a1b49a7eeb7c079d602c
18:38 XenophonF so even with extract_perms=False the permissions are screwed up
18:38 XenophonF wtf
18:39 XenophonF let's try use_cmd_unzip=True
18:40 lordcirth_work ahrs, is there anything pre-existing in that file not managed by salt?
18:41 lordcirth_work ahrs, if not, I would use a single file.manage with a jinja template rather than so many file.append's
18:41 noobiedubie joined #salt
18:42 whytewolf hummm that looks like ini file format. if it is, you might rather investigate ini_manage
18:42 ahrs lordcirth_work: nope. I think doing the second forloop inline could work (even though it looks a mess) I'm testing it now. Templates would probably be neater though, I've not used them before though so will need to look at the documentation ;)
18:42 ahrs Is a template just a file with jinja in it?
18:42 whytewolf ahrs: yes
18:43 whytewolf or other template llang handled with templte : <support salt template lang>
18:43 whytewolf my typing is getting worse...
18:44 J0hnSteel joined #salt
18:45 samodid joined #salt
18:50 PatrolDoom joined #salt
18:51 XenophonF the unzip command works, thank goodness
18:53 onlyanegg joined #salt
18:53 dxiri joined #salt
18:53 nixjdm joined #salt
18:54 XenophonF not idempotent though
18:54 XenophonF grr
19:01 hemebond left #salt
19:02 aneeshusa joined #salt
19:02 Praematura_ joined #salt
19:03 heaje joined #salt
19:04 kalessin joined #salt
19:04 edrocks joined #salt
19:06 dxiri_ joined #salt
19:06 aphistic joined #salt
19:07 onlyanegg joined #salt
19:08 aphistic hi! i'm new to salt and trying to figure out the easiest way to install the salt minion on the servers in my home lab. i see there's a salt.minion formula, is there a way to run that on a system that has a fresh linux install from the salt master?
19:10 felskrone joined #salt
19:10 PatrolDoom joined #salt
19:17 lordcirth_work aphistic, you can use salt-ssh from the salt-master so long as the minion-to-be trusts it's ssh key
19:17 thinkt4nk joined #salt
19:18 schemanic- joined #salt
19:18 schemanic- Heya, do any state modules exist for working with Amazon Elastic File System?
19:19 schemanic- There are a number of boto modules but I didn't see any in the documentation
19:19 sgo_ joined #salt
19:21 aphistic lordcirth_work: ah, ok. so it's probably just as easy to install the minion myself
19:21 lordcirth_work aphistic, in many cases yes.  'apt install salt-minion' and optionally 'echo "master: hostname.lan" >> /etc/salt/minion && systemctl restart salt-minion'
19:22 lordcirth_work er, >, not >>
19:22 aphistic cool, thanks :)
19:22 lordcirth_work At least that's what I do.  My master then rewrites /etc/salt/minion immediately with the full-featured one.
19:23 lordcirth_work I also (at work) put those commands into a PXE preseed
19:23 aphistic do you just install the distro's salt-minion or do you add the saltstack repos?
19:25 lordcirth_work aphistic, for the preseed, I install from standard ubuntu 16.04 repo, then once it's up the salt-master runs a common.salt.minion state I wrote that adds the repos, updates the package, and changes /etc/salt/minion
19:26 aphistic ahh, gotcha
19:26 lordcirth_work It's convenient to do the minimum in preseed, container creation, etc since there are different places I'd need to put it, and do as much as possible in salt itself
19:27 lordcirth_work my lxc container creation template does add the repo, though, because it was easy to do.
19:31 dxiri joined #salt
19:32 heaje joined #salt
19:33 asyncsec joined #salt
19:35 socket- Hey all, is there a way to use the salt.modules.smtp.send_msg via the CLI instead of a state file?  ref: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.smtp.html
19:39 noobiedubie anyone have any tricks to deal with a state that pulls from an S3 bucket a jar file with a version number trying to fully automate the process so doing {% set version = 'x' %} isn't the solution I'm looking for as new versions can be added by devs anytime
19:42 lordcirth_work whytewolf, I found the problem, I just put 'nfs_exports' instead of 'nfs_export' in the index.  lol.
19:43 lordcirth_work socket-, you can usually use any module from cli.  salt 'minion' smtp.send_msg smtp.server=foo ...
19:44 lordcirth_work socket-, looking more closely, looks like you do need to define some config first
19:45 socket- Thanks, i'll try that.
19:49 whytewolf socket-: anything salt.modules IS a cli module.
19:49 whytewolf salt.states are the state modules that are used in state files
19:50 dxiri joined #salt
19:52 major there anyway to do a string pattern match w/in jinja?
19:53 major not a full re .. just .. a simple glob
19:54 whytewolf so you want if 'string' in string?
19:54 major slightly more complex than that
19:55 whytewolf how much more complex?
19:55 major if 'string'.pattern('*foo*bar'):
19:56 major I should step back ..
19:56 major I have 1 variable in a pillar of variables that needs to be different based on the minion_id
19:56 gmoro joined #salt
19:57 whytewolf https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.match.html
19:57 fracklen joined #salt
19:59 whytewolf so {% if salt.match.glab('pattern') %} [match modules work on minion id
19:59 lorengordon joined #salt
20:01 major sounds perfect
20:02 whytewolf also, in what keyset is my brain today. what keyboard has a anywhere near o
20:08 nixjdm joined #salt
20:11 sgo_ joined #salt
20:20 gord0 joined #salt
20:21 dxiri joined #salt
20:23 cyteen joined #salt
20:26 dxiri joined #salt
20:28 schemanic_ joined #salt
20:30 asyncsec joined #salt
20:32 candyman88 joined #salt
20:32 kulty joined #salt
20:33 druonysus_ joined #salt
20:33 rebbdohr joined #salt
20:40 sgo_ joined #salt
20:43 jix0 joined #salt
20:47 druonysus joined #salt
20:47 jix0 left #salt
20:47 jix0 joined #salt
20:47 asyncsec joined #salt
20:49 PatrolDoom joined #salt
20:50 dxiri joined #salt
20:51 PatrolDoom joined #salt
20:53 lordcirth_work I am trying to compare 2 lists of dict, and it seems they always report equal
20:56 scottk_ joined #salt
20:59 aldevar left #salt
20:59 scottk__ joined #salt
20:59 sarcasticadmin joined #salt
21:05 BenGriffin joined #salt
21:08 dxiri joined #salt
21:09 nixjdm joined #salt
21:10 woodtablet *showing restraint* (there are some jokes i could throw in there about comparing dicts.. )
21:13 ry joined #salt
21:14 lordcirth_work woodtablet, your restraint is appreciated
21:15 woodtablet lordcirth_work - are you comparing the keys in the dicts or the values and they always show up equal ?
21:16 lordcirth_work woodtablet, not entirely sure, I ended up fixing it by accident.  I think I just had some statements in the wrong if's.
21:19 woodtablet lordcirth_work - okie dokie. everyone here is probably better then I at salt, but python, I might be able to help you with =D
21:19 aphistic can anyone point me in the right direction for how i would create a comma-separated list of all but the current node with the same role? i'm trying to write a state that sets up a cluster of things and they each need to know about each other
21:22 woodtablet for example.. i am trying to figure out how to do pillar merging better for firewalld. i want to merge the pillars.. but instead i am getting clobbering.. i tried to use an include like here:
21:22 woodtablet https://docs.saltstack.com/en/latest/topics/pillar/
21:22 woodtablet but no luck. suggestions ?
21:23 woodtablet sorry that was supposed to be one line
21:30 PatrolDoom joined #salt
21:30 rihannon1 joined #salt
21:32 Trauma joined #salt
21:32 nebuchadnezzar joined #salt
21:35 linovia Is that a known limitation that not all the state work with unless ?
21:38 linovia in my case, I have a file.managed that includes an unless condition but it is executed everytime
21:43 whytewolf linovia: i just tested it works fine with file.managed
21:43 dxiri joined #salt
21:43 linovia well double check typos, but all the other states with the same unless didn't execute :(
21:45 whytewolf https://gist.github.com/whytewolf/c26e1b8bb9770648882fd504244c2af5
21:46 linovia weird
21:50 linovia oh, I just realized that my other states may not be activated before they had no reasons to change. facepalm
21:52 linovia and it turns out my unless condition was wrong (was using file: /path/to/existing/file while unless only works with shell commands it seems). Not sure how / what misguided me
21:52 linovia thanks whytewolf !
21:52 whytewolf no problem :)
21:54 dxiri joined #salt
21:54 schemanic joined #salt
21:55 linovia another question, is it possible to force a service restart immediately after a state and avoid the deferred restart ? I'm setting a temporary state to bootstrap a nginx configuration to get lets encrypt certificate and then set the "final" configuration. Since I'm changing the host file twice, nginx will only reload after the second change took place while I'd like it to reload after each file change
21:57 whytewolf ugh, that is "possable" just ugly. you need a service.running that watches each file independently.
21:58 linovia mmm, I'll create my own state then
21:58 whytewolf i actually do something simalar here. https://github.com/whytewolf/salt-phase0-states/blob/master/sys/install/mysql.sls
21:58 whytewolf taking a server.running on thye end of the mysql pkg install because i need mysql to start before touching the config file other wise my changes to the config file break the plugin system
21:59 linovia I see
21:59 linovia will give it a try, thanks for the hint
21:59 PatrolDoom joined #salt
21:59 CheckYourSix joined #salt
22:15 inetpro joined #salt
22:19 dxiri joined #salt
22:22 aneeshusa joined #salt
22:30 patrek joined #salt
22:41 dxiri joined #salt
22:44 dxtr joined #salt
22:44 Praematura_ joined #salt
22:49 Antiarc joined #salt
22:49 PatrolDoom joined #salt
22:50 dxtr joined #salt
22:56 MeltedLux joined #salt
22:56 dxiri joined #salt
23:00 nicksloan joined #salt
23:03 dxiri joined #salt
23:08 edrocks joined #salt
23:12 psy0rz left #salt
23:14 onlyanegg joined #salt
23:15 bowhunter joined #salt
23:21 cyborg-one joined #salt
23:21 patrek joined #salt
23:24 dxiri joined #salt
23:25 PatrolDoom joined #salt
23:46 justanotheruser joined #salt
23:51 dxiri joined #salt
23:59 stupidnic left #salt

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