Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-02-13

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

All times shown according to UTC.

Time Nick Message
00:06 ronnix joined #salt
00:23 rarnau joined #salt
00:24 p04451 joined #salt
00:27 jeffspeff joined #salt
00:27 DEger joined #salt
00:28 djgerm joined #salt
00:30 cacasmacas joined #salt
00:36 cacasmacas joined #salt
00:43 rarnau left #salt
00:49 edrocks joined #salt
00:50 scsinutz joined #salt
01:02 Tanta joined #salt
01:03 brokensyntax joined #salt
01:06 jas02 joined #salt
01:13 shoemonkey joined #salt
01:21 tharkun joined #salt
01:28 Poppabear joined #salt
01:35 DEger joined #salt
01:48 CeBe joined #salt
01:50 netcho_ joined #salt
01:57 DEger joined #salt
02:00 CeBe joined #salt
02:02 catpigger joined #salt
02:10 DEger joined #salt
02:12 shoemonkey joined #salt
02:12 DEger joined #salt
02:23 armyriad joined #salt
02:29 mpanetta joined #salt
02:31 mpanetta joined #salt
02:32 cacasmacas joined #salt
02:54 jas02 joined #salt
03:03 neilf__ joined #salt
03:03 gableroux joined #salt
03:07 jas02 joined #salt
03:18 beardedeagle joined #salt
03:23 ronnix_ joined #salt
03:23 PatrolDoom joined #salt
03:25 ronnix_ joined #salt
03:32 Tanta joined #salt
03:36 cacasmacas joined #salt
03:41 aphor joined #salt
03:41 cacasmacas joined #salt
03:45 JPT joined #salt
03:51 netcho_ joined #salt
03:51 aphor anyone love the OpenStack salt-formulas?
03:56 utahcon_ joined #salt
03:56 utahcon__ joined #salt
04:00 ivanjaros joined #salt
04:09 jas02 joined #salt
04:28 DEger joined #salt
04:31 DEger joined #salt
04:44 evle joined #salt
04:47 hoonetorg joined #salt
04:51 edrocks joined #salt
04:52 iggy nope
04:55 jas02 joined #salt
05:04 shoemonkey joined #salt
05:09 jas02 joined #salt
05:12 jimklo joined #salt
05:21 cacasmacas_ joined #salt
05:38 scoates joined #salt
05:51 netcho_ joined #salt
05:52 cacasmacas_ joined #salt
05:57 preludedrew joined #salt
06:02 scsinutz joined #salt
06:09 gladia2r joined #salt
06:10 jas02 joined #salt
06:11 fracklen joined #salt
06:38 rdas joined #salt
06:45 mavhq joined #salt
06:58 JohnnyRun joined #salt
07:04 shoemonkey joined #salt
07:09 colttt joined #salt
07:15 teclator joined #salt
07:22 ReV013 joined #salt
07:22 DEger joined #salt
07:28 impi joined #salt
07:31 cacasmacas____ joined #salt
07:37 jimklo joined #salt
07:39 heyimawesome joined #salt
07:40 ravenx joined #salt
07:43 jas02 joined #salt
07:44 jimklo joined #salt
07:46 jimklo joined #salt
07:49 ravenx is it possible to pretty print the json that returns from a curl to the salt-api ?
07:50 jimklo joined #salt
07:55 iggy ravenx: pipe it to `jq` ?
07:56 ravenx ah, i was thinking more of using kwargs and the --out==<something>
07:58 jas02 joined #salt
08:01 jas02 joined #salt
08:02 Inveracity joined #salt
08:07 fracklen joined #salt
08:10 cacasmacas_ joined #salt
08:13 LondonAppDev joined #salt
08:13 darioleidi joined #salt
08:14 cacasmacas____ joined #salt
08:16 cacasmacas____ joined #salt
08:19 LondonAppDev Hey, do you know how I can make bluetooth turn on by default when I load my Ubuntu 16.04 machine?
08:19 ravenx saltstate for the bluetooth.service or w/e in systemd?
08:20 ravenx or sysvinit depend on what init system you use?
08:20 LondonAppDev crap sorry ravenx I meant to post that in the Ubuntu channel.
08:20 LondonAppDev Thanks for the reply though, maybe I could actually use Salt to do it.
08:21 LondonAppDev That's a good idea
08:21 ravenx lol
08:21 ravenx but uh..the concept is still the same:
08:22 ravenx you dont have to use salt now, just go:  sudo systemctl enable <bluetooth service>
08:24 eThaD joined #salt
08:26 fracklen joined #salt
08:28 Firewalll joined #salt
08:33 jhauser joined #salt
08:36 jgelens joined #salt
08:39 diagnostuck joined #salt
08:42 inad922 joined #salt
08:45 fracklen joined #salt
08:46 fracklen joined #salt
08:50 cacasmacas_ joined #salt
08:51 jimklo joined #salt
08:53 cacasmacas_ joined #salt
08:55 cacasmacas____ joined #salt
08:56 ronnix joined #salt
08:58 eThaD joined #salt
08:59 jas02_ joined #salt
08:59 ivanjaros joined #salt
09:05 shoemonkey joined #salt
09:09 mikecmpbll joined #salt
09:14 eThaD joined #salt
09:31 s_kunk joined #salt
09:34 eThaD joined #salt
09:34 s_kunk joined #salt
09:35 eThaD joined #salt
09:39 jgelens joined #salt
09:45 _KaszpiR_ joined #salt
09:54 eThaD joined #salt
10:00 jas02_ joined #salt
10:04 xet7 joined #salt
10:13 diagnostuck joined #salt
10:14 mgi01 joined #salt
10:16 mgi01 hi all - I'm having some trouble getting salt.run to talk to Windows minions. it seems to be related to using runas
10:17 mgi01 I get "The current directory is invalid" (which I can work around, to some extent)
10:17 mgi01 or I get "No closing quotation"
10:17 ruxu joined #salt
10:17 mgi01 err s/salt\.run/cmd.run
10:18 netcho_ joined #salt
10:24 eThaD joined #salt
10:26 mavhq joined #salt
10:29 p04451 joined #salt
10:30 neilf__ joined #salt
10:32 cyborg-one joined #salt
10:34 ronnix_ joined #salt
10:42 Erik-P joined #salt
10:42 Erik-P hi all can i use include in top.sls to include another top.sls?
10:43 ravenx yo dawg, i heard you liked top.sls....
10:45 cacasmacas_ joined #salt
10:45 hemebond Why would you need to include another top.sls?
10:46 skrobul you will break the internet
10:46 Erik-P lol
10:46 Erik-P i am working with git
10:47 Erik-P and i want dev to get access to top.sls but only to the project they are the owners
10:47 cacasmacas____ joined #salt
10:47 Erik-P so i set a project call base in git with a top file for all envs
10:48 hemebond There is a master config setting to only process the section of top.sls for that particular environment.
10:48 hemebond Oh I see.
10:48 Erik-P but i like to include a top file from another project that the dev have access to
10:48 hemebond Well I believe you can use Jinja in top.sls
10:49 Erik-P Jinja i must use but can i do in top include to another top ?
10:49 hemebond Well you can include other files using Jinja.
10:49 cacasmacas____ joined #salt
10:49 hemebond So you could create separate files for each project and just collect them all.
10:51 Erik-P like this?
10:51 Erik-P https://gist.github.com/anonymous/c84588c59008d13d6f770308c2be9a49
10:53 edrocks joined #salt
10:56 milesizzo joined #salt
10:56 mgi01
10:59 amcorreia joined #salt
11:00 mgi01 can anyone explain why I get "No closing quotation" with this code? https://codepaste.net/ygf37b
11:03 mgi01 I'm using 2016.11.2 (Carbon)
11:04 AndreasLutro mgi01: share the full error message please
11:04 mgi01 sure
11:05 mgi01 https://codepaste.net/smu8fa
11:06 shoemonkey joined #salt
11:09 AndreasLutro that's an odd one, you might have to use pdb to figure out what's being passed to shlex because I can't reproduce it
11:09 AndreasLutro >>> shlex.split(s, posix=False)
11:09 AndreasLutro ['cd', 'c:\\n$blah', '=', '"hello"', 'echo', '$blah']
11:09 mgi01 alright, I'll try it in python and see if it's a quirk of my installation
11:11 jas02 joined #salt
11:11 AndreasLutro mgi01: are you sure you're on 2016.11.2? the line numbers from your stack trace don't match
11:11 mgi01 that's the version I get when I run salt --version
11:11 mgi01 is it a mismatch between server and minion?
11:12 AndreasLutro yeah salt --version is just the master
11:12 AndreasLutro run salt 'name-of-minion' test.version
11:12 mgi01 oh right, is this coming frmo the minion?
11:12 mgi01 ah
11:12 AndreasLutro or `salt-call --version` on the minion
11:12 mgi01 yes! that's it.. it's 2016.3.1
11:13 evle1 joined #salt
11:13 AndreasLutro cmd = 'Powershell -NonInteractive "{0}"'.format(cmd.replace('"', '\\"'))
11:13 AndreasLutro maybe it's this that's screwing up your quotes
11:13 mgi01 so next question: how do I upgrade the minions?
11:14 mgi01 ahh
11:14 AndreasLutro on windows? no idea
11:14 mgi01 I think I need to get the versions up to date first before continuing debugging
11:14 AndreasLutro not a bad idea
11:15 mgi01 thanks for that, huge help
11:17 ravenx anyone know if it is possible to get real time feed back from jobs?
11:17 ravenx meaning instead of waiting for the entire thing to finish and i get ym results
11:17 ravenx i see it come in line by line in real time on my CLI
11:20 ravenx basically, streaming.
11:21 AndreasLutro not without a lot of work. salt isn't designed for interactivity
11:21 ravenx i see
11:22 ravenx so it isn't like a flag i can pass to output?
11:22 ravenx --output=stream
11:22 ravenx :(
11:23 AndreasLutro absolutely not
11:24 DEger joined #salt
11:26 ravenx aw man
11:26 ravenx do you know if this is a feature that is commonly requested
11:26 ravenx or has been but shot down?
11:27 Erik-P anyone can give me an idea how to work with top that each dev team need access to his branch top file but without using environment on the minion (i need base and dev/prod/qa)?
11:28 AndreasLutro Erik-P: I've done this in top.sls in the past: {% include 'top.local.sls' ignore missing %}
11:28 AndreasLutro kinda hacky but it works
11:28 ravenx AndreasLutro: also, i kinda thought that the use_vt accomplished this
11:29 ravenx "use_vt
11:29 ravenx Use VT utils (saltstack) to stream the command output more interactively to the console and the logs. This is experimental."
11:29 AndreasLutro doesn't change how master/minion interaction works, where the result of a job is sent as json to the master when the job is done
11:30 AndreasLutro I mean you'll get more info interactively if you do `salt-call -l info` but I assume that's not what you're after
11:30 ravenx nope
11:30 ravenx ah well :|
11:30 cacasmacas_ joined #salt
11:30 diagnostuck joined #salt
11:32 cacasmacas____ joined #salt
11:34 cacasmacas_ joined #salt
11:44 jas02 joined #salt
11:48 impi joined #salt
11:50 ronnix joined #salt
11:59 lasseknudsen joined #salt
12:01 jas02_ joined #salt
12:17 lasseknudsen2 joined #salt
12:18 cacasmacas_ joined #salt
12:18 gmoro joined #salt
12:20 abednarik joined #salt
12:21 cacasmacas_ joined #salt
12:24 cacasmacas_ joined #salt
12:31 jab416171 joined #salt
12:31 irated joined #salt
12:35 krymzon joined #salt
12:36 inad922 joined #salt
12:40 numkem joined #salt
12:48 netcho_ hi all, docs fow salt-cloud aws say that it is possible to use subnetname instead of subnetID in cloud.profiles, but when i set it i get error that subnetID needs to be set
12:51 dlloyd did state service.status recently change to prefer, for init systems, `service <name> status` over checking for `sig`?
12:54 dlloyd and by that i mean, of course, state service.running
12:54 scristian joined #salt
12:56 diagnostuck joined #salt
12:59 cacasmacas_ joined #salt
13:01 dlloyd https://gist.github.com/dglloyd/c590d72e6dd528b82d618962ad7a9a54 some debug information, this only seems to happen during the initial highstate
13:02 jas02_ joined #salt
13:05 JohnnyRun joined #salt
13:07 shoemonkey joined #salt
13:15 irctc755 joined #salt
13:18 Hadi joined #salt
13:20 irctc589 joined #salt
13:23 jas02_ joined #salt
13:27 nebuchad` joined #salt
13:27 yuhl_____ joined #salt
13:29 teclator_ joined #salt
13:29 Laogeodritt| joined #salt
13:30 pietdv joined #salt
13:30 Garo__ joined #salt
13:30 tooth_ joined #salt
13:30 nihe_ joined #salt
13:30 sybix joined #salt
13:30 the_lale1u joined #salt
13:30 MTecknol1gy joined #salt
13:30 stotch_ joined #salt
13:30 Fade joined #salt
13:30 kleszcz joined #salt
13:31 j4son joined #salt
13:31 netcho_ joined #salt
13:31 brd_ joined #salt
13:31 dunz0r_ joined #salt
13:31 oeuftete_ joined #salt
13:31 doubleme1res joined #salt
13:31 eichiro_ joined #salt
13:32 garthk joined #salt
13:32 dwfreed joined #salt
13:32 dijit joined #salt
13:34 ivanjaros joined #salt
13:35 daxroc Is using multiple runners a bad idea in pillars ?
13:35 daxroc *mine.get calls
13:35 wwalker joined #salt
13:45 babilen daxroc: Why do you think so?
13:45 manji I was under the impression that we should avoid mine.get in pillars
13:46 daxroc I've several runners - mine.gets operating on 200 minions and it seems to kill the master
13:46 manji that doesn't sound right
13:46 daxroc * causes the master to start timing out
13:47 daxroc events seem to queue up
13:47 edrocks joined #salt
13:49 daxroc on my dev setup I do se several outputs like "[salt.transport.ipc][ERROR   ][31473] Exception occurred while handling stream: [Errno 0] Success" when executing the orchestration
13:50 daxroc I've not looked too hard for the cause but I'm suspecting the runners ?
13:55 aphor joined #salt
14:03 nickabbey joined #salt
14:04 remyd1 joined #salt
14:05 diagnostuck joined #salt
14:05 nZac joined #salt
14:05 DEger joined #salt
14:06 eThaD joined #salt
14:07 averell joined #salt
14:10 navjot joined #salt
14:11 navjot 2017-02-10 17:35:59,558 [ERROR] salt_api_helpers vm: Unexpected data structure when getting os_family grain 2017-02-10 17:35:59,579 [ERROR] salt_api_helpers vm: Response: {"return": [{}]} i am getting this error in jenkins from saltmaster please help me.
14:12 navjot i tried salt-call grains.get os_family and getting rhel but not sure what it is
14:12 aphor anybody salting openstack? https://github.com/salt-formulas/salt-formula-* openstack stuff seems to be a little rough around the edges.
14:13 aphor @navjot that is the abbreviation for Red Hat Enterprise Linux aka RHEL, rhel
14:13 XenophonF aphor: writing a formula for OpenStack is a Salt rite of passage
14:14 navjot yea i need rhel as os_family grain instead of unexpected data strucuture
14:14 aphor XenophonF: I wanted to talk architecture because I am not feeling this "pillar all the things" style.
14:15 XenophonF this is my work-in-progress: https://github.com/irtnog/openstack-formula
14:15 XenophonF but i need to go back and rework parts of it
14:15 gableroux joined #salt
14:16 XenophonF this probably reflects my best current work w/r/t pillaring all the things: https://github.com/irtnog/openssh-formula or https://github.com/irtnog/shibboleth-formula
14:16 aphor thx. looking
14:16 XenophonF i have a slightly different style than what you'll find in saltstack-formulas
14:16 XenophonF ymmv
14:16 navjot how can i get the expected data any suggestions
14:17 XenophonF navjot: os_family on RHEL/CentOS should return `RedHat`
14:18 XenophonF aphor: oh, also take a look at https://github.com/irtnog/tomcat-formula, which I use with shibboleth-formula
14:18 aphor @navjot: you were on the right path trying salt-call grains.get, but you should try a pastebin so people can see what you're actually dealing with.
14:19 XenophonF specifically, the tomcat.shibboleth-idp state glues the two formulas together, but otherwise you can call the `shibboleth.idp` or `tomcat` SLSes independently and they work
14:19 aphor nice
14:19 XenophonF i'm pretty big on no cross-SLS dependencies except in special, carefully written cases like that glue SLS
14:20 XenophonF if you're writing states from scratch, it's probably a good idea to start with just a simple SLS, no Pillar data
14:21 XenophonF get that working on one computer and then learn what you need to generalize (i.e., move to defaults.yaml/map.jinja/Pillar) when you deploy on the second computer
14:21 aphor idk. My feeling is that if the stuff sls targets has implicit dependencies, then it's OK to have the sls do imports and requisites, but if the dependency is optional, that stuff needs to be wrapped in jinja guard conditions.
14:23 XenophonF i tend to follow the defaults.yaml/map.jinja pattern because even when i'm not writing formulas (and thus trying to target some combo of Windows/Unix/Linux), i still have to support different Linux variants (we run Windows/CentOS/Ubuntu internally)
14:23 XenophonF again, ymmv
14:23 XenophonF start simple, then generalize
14:23 aphor +1 on no pillar data. My new thing is everything gets opinionated defaults, and map.jinja must figure out if there are pillar overrides.
14:24 XenophonF that's exactly what the defaults.yaml/map.jinja pattern is
14:24 XenophonF you'll notice in my openssh-formula that my opinionated defaults come from "Secure Secure Shell"
14:25 XenophonF at work i further customize those by overriding the DH-GEx moduli list with one we generated ourselves
14:25 XenophonF (to give you an example)
14:25 aphor For openstack, there's an execution module distributed with salt to provide config file getters and setters, but I fear when I look inside it will have a foul smell.
14:25 bluenemo joined #salt
14:25 brousch__ joined #salt
14:26 daxroc whats the sequence to clear pillars and refresh?   salt '*' saltutil.clear_cache; salt '*' saltutil.sync_all; salt '*' mine.update; salt '*' saltutil.pillar_refresh
14:26 XenophonF daxroc: sync_all calls pillar_refresh if i remember the source right
14:26 bluenemo can I give arguments to a formula when using salt 'master' state.sls formula or salt-run state.sls formula? I'm thinking of sth like salt-run state.sls formula variable=foo, so that in the formula I can use sth like {% if variable == 'foo' %} Is that possible somehow?
14:27 daxroc Hym still get an old value in the pillar
14:27 XenophonF daxroc: https://github.com/saltstack/salt/blob/develop/salt/modules/saltutil.py#L704
14:27 XenophonF note that the refresh kwarg defaults to true
14:28 XenophonF daxroc: is your pillar data in git? it takes a minute to update the salt-master's copy after you push something
14:29 XenophonF frankly, if you're just trying to refresh pillar data, you don't need the other stuff - just run saltutil.refresh_pillar
14:29 aphor @XenophonF I think I want to do OpenStack with a lot of mined config. I haven't done much _module in formulas, but I'm leaning that way since I think that's the cleanest way to put what I want in sane mine_functions.
14:30 daxroc Thanks. No it's local. I've altered a pillar to read data from the mine. But it's maintaining the old static values from the pillar.
14:31 XenophonF is mine data available at pillar rendering time/place?
14:31 XenophonF (i don't know)
14:31 AndreasLutro yes but in my experience it's very different from state rendering time
14:31 XenophonF you should probably double-check the master log for anything hinky
14:31 AndreasLutro I can't remember how/why but remember avoiding it
14:31 mpanetta joined #salt
14:32 XenophonF AndreasLutro: same here, and i don't have the "why" written down anywhere :(
14:32 XenophonF daxroc: what we're getting at is that pillar data gets rendered on the master, not the minion
14:32 XenophonF so double-check the semantics of mine.get
14:32 aphor @XenophonF: mining data in pillars breaks the caching scheme, and adds cycles to what should be a DAG of config data.
14:33 daxroc Should be good - working fine for other calls - the difference is they are defined in the sls with mine_functions
14:34 daxroc Can you have more than one mine_functions in a pillar item?
14:34 aphor @daxroc: yeah!
14:34 aphor https://docs.saltstack.com/en/latest/topics/mine/index.html
14:35 navjot os_family = sh.get_os_family(minion_id) how can i manually write a script to get it .
14:35 aphor check the https://docs.saltstack.com/en/latest/topics/mine/index.html#mine-functions-aliases section
14:35 navjot the os_family grain
14:36 XenophonF navjot: are you overriding the os_family grain or something?
14:36 XenophonF it's set automatically
14:37 AndreasLutro I think this is what I ran into https://github.com/saltstack/salt/issues/11509
14:37 saltstackbot [#11509][MERGED] Exception when using Salt mine from pillar | ```...
14:37 navjot i just want to get data coming in this function
14:37 XenophonF you'd get it by calling grains.get - https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.get
14:37 AndreasLutro you have to call salt-run from the pillar if you want it to work
14:37 navjot how can i write a script to get it in my python code file as i am new i have little idea
14:38 XenophonF navjot: i'm not really following you here. maybe you can explain what you're doing in greater detail?
14:38 AndreasLutro I think the execution module isn't connected to the master's mine cache or something like that
14:38 AndreasLutro https://github.com/saltstack/salt/pull/27096/files
14:38 saltstackbot [#27096][MERGED] Add note about retrieving Mine data from Pillar & Orchestrate | Closes #11509...
14:38 navjot thanks
14:39 aphor @navjot: os_family=$( salt ${minion_id} --out=txt --static grains.get os_family|cut -d' ' -f2 )
14:40 aphor .. just because you *can* does not mean you *should* however...
14:40 armyriad joined #salt
14:40 DEger joined #salt
14:41 bluenemo salt '*' state.apply test pillar='{"foo": "bar"}' is kind of what I was looking for (regarding my question above)
14:45 ntropy_ joined #salt
14:45 phx__ joined #salt
14:45 mikecmpb_ joined #salt
14:47 toabi joined #salt
14:49 racooper joined #salt
14:50 impi joined #salt
14:54 WKNiGHT joined #salt
14:54 kbaikov joined #salt
14:56 p04451 joined #salt
14:57 ALLmightySPIFF joined #salt
15:01 PatrolDoom joined #salt
15:03 nZac joined #salt
15:03 jas02 joined #salt
15:04 beardedeagle joined #salt
15:04 jas02 joined #salt
15:08 diagnostuck joined #salt
15:11 cacasmacas_ joined #salt
15:13 edrocks joined #salt
15:14 cacasmacas____ joined #salt
15:17 Tanta joined #salt
15:18 dendazen joined #salt
15:19 Brew joined #salt
15:23 scoates joined #salt
15:24 Brew joined #salt
15:34 abednarik joined #salt
15:38 dyasny joined #salt
15:39 achedeuzot joined #salt
15:39 achedeuzot Hello there ! Is there a way to show the diff between a salt master and a minion ? It keeps applying a state when I do state.highstate and I don't understand why...
15:40 mpanetta joined #salt
15:40 beardedeagle it can do that depending on what the state is, like say a cmd.run
15:41 achedeuzot it's a file.recurse
15:42 AndreasLutro 95% of the time when that happens it's because you have two states modifying the same file
15:44 _JZ_ joined #salt
15:44 whytewolf the other 5% is something else edits a file that is being managed
15:48 tapoxi joined #salt
15:48 sarcasticadmin joined #salt
15:52 cacasmacas____ joined #salt
15:53 achedeuzot whytewolf it looks like it yeah, there's a newline at the end of the file that gets deleted
15:54 achedeuzot I have to find the bugger that rewrites the file with the same data minus the last \n ...
15:54 achedeuzot thanks :)
15:55 inad922 joined #salt
16:03 Reverend will  salt['file.directory_exists']("/some/directory")  work in an if statement on my sls?
16:04 whytewolf Reverend: yes, that is why a lot of those bool functions exist is for jinja logic
16:05 jas02 joined #salt
16:05 Reverend GG
16:05 Reverend tvm
16:05 navjot joined #salt
16:06 orionx joined #salt
16:07 amagawdd joined #salt
16:16 fracklen joined #salt
16:16 impi joined #salt
16:18 gableroux joined #salt
16:19 gableroux joined #salt
16:25 cacasmacas_ joined #salt
16:28 debian112 joined #salt
16:28 cacasmacas_ joined #salt
16:30 jimklo joined #salt
16:31 XenophonF oooooh dang it
16:31 XenophonF i wish i could supply archive/file/git states with an mtree-like description of what i expect the file system permissions to be
16:32 XenophonF freaking file.directory state keeps clobbering the executable bit on a script i clone using git.latest
16:32 tom[] joined #salt
16:35 cmarzullo yeah I ended up give up on that and packaging all the things with FPM.
16:41 fracklen joined #salt
16:43 abednarik joined #salt
16:45 juntalis joined #salt
16:45 impi joined #salt
16:46 onlyanegg joined #salt
16:47 feld joined #salt
17:01 scsinutz joined #salt
17:01 orionx_ joined #salt
17:02 wendall911 joined #salt
17:03 juntalis joined #salt
17:04 cacasmacas____ joined #salt
17:04 orionx__ joined #salt
17:04 ronnix joined #salt
17:06 jas02 joined #salt
17:07 cacasmacas____ joined #salt
17:10 cacasmacas_ joined #salt
17:12 cacasmacas_ joined #salt
17:13 Reverend well that salt['file.directory_exists'] is useless
17:14 tercenya_ joined #salt
17:15 cmarzullo I've used it before.
17:15 cmarzullo https://gist.github.com/cmarzullo/07651ff32b7761b0fac16e922a5f57ca
17:17 Reverend :(
17:17 Reverend hmm
17:17 cmarzullo will that help?
17:17 Reverend you're using it slightly differently to me
17:18 Reverend what's the difference between salt['file.directory_exists'] anbd salt.file.directory_exists ?
17:18 cmarzullo Dunno.
17:18 Reverend :D
17:18 Reverend ima try the "not" though
17:18 whytewolf one is just a shortcut. they are exactly the same
17:18 Reverend hang on
17:18 cmarzullo It's one of those things where's there's a couple ways to do things.
17:18 gtmanfred Reverend: nothing
17:19 scoates joined #salt
17:19 Reverend taa
17:19 Reverend hang fire.
17:19 heaje joined #salt
17:19 DanyC joined #salt
17:19 Reverend it seems to do it only when the server is first spinning up tho. now I've cancelled it, it worked fine -_-
17:20 Reverend OHHHHHHHHH
17:21 whytewolf Reverend: your not checking for the existence of a directory that will be created by a state are you?
17:21 Reverend close....
17:21 c-rad joined #salt
17:21 Reverend I'm checking the existance of a directory that is on a mount...
17:21 Reverend the mount is mounted on that run
17:21 Reverend if I make a '
17:21 Reverend requisite on that state, will it run the nfs mount first?
17:21 Reverend and -then- check>?
17:22 whytewolf jinja is compiled before states are ran
17:22 Reverend shitsnacks
17:22 Reverend \that was why I was using a cmd then.
17:22 Reverend i couldn't remember why
17:22 Reverend so i removed it
17:22 Reverend haha
17:23 DanyC hi all, anyone knows how can i do s'thing like this (pseudo code) "in a state.sls file run in a while loop a state id until result is 200 after that move to next dependent state id?" in salt? the problem i'm trying to solve is: i need to wire various curls and continously runn the first curl GET untill 200 then move to 2nd curl POST|PUT
17:24 whytewolf Reverend: there is a work around. there is a state called file.exists which is used for prereqs like that one you are trying
17:25 scsinutz joined #salt
17:25 Reverend can you do it in a requisite?
17:26 Reverend so, like the file.directory,
17:26 Reverend (which I'm using to chown)
17:26 whytewolf https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.exists
17:26 Reverend tvm
17:27 Reverend that's -almost- what I want to do. Can you put a watch on any state?
17:27 whytewolf a watch requires a mod-watch function
17:27 Reverend okay - let me gist this, as iot might make more sense :p
17:27 edrocks joined #salt
17:28 Reverend https://hastebin.com/gararofavu.md whytewolf :)
17:30 whytewolf no, as file doesn't have a mod_watch function watch would be useless. however onchanges might be what you want
17:30 Reverend i want to ideally watch the 'git' one... and then run the chown on the new gti repo.
17:30 Reverend lemme check onchanges :)
17:30 Reverend soryr for being a pain!
17:31 Reverend oo. that looks legit. hang on ;)
17:38 cyborg-one joined #salt
17:39 nixjdm joined #salt
17:41 cmarzullo DanyC: looping like that isn't a 'state' you are more talking about orchestration.
17:41 DanyC cmarzullo: yes correct but i guess i can't wire the 'states' in that way ?
17:43 cmarzullo not really (imo) You could write a python script that you call from cmd.run that is stateful.
17:43 cmarzullo So your python (or whatever) does the needful. and returns when it's done.
17:44 gtmanfred you could also write your own custom state module that does that
17:44 nixjdm joined #salt
17:45 Reverend whytewolf: that worked PERFECTLY
17:45 Reverend i just need to add a new repo now to make sure it can add a new one :)
17:46 whytewolf very nice
17:51 cyteen joined #salt
17:54 Reverend whytewolf: it worked indeedyy. thanks again darling. much apprecaited.
17:54 Reverend sorry again for being a pain in your ass :P haha
17:55 whytewolf lol. no problem.
17:58 DammitJim joined #salt
17:59 urban2 joined #salt
18:00 jav joined #salt
18:07 jas02 joined #salt
18:07 fracklen joined #salt
18:21 MTecknology joined #salt
18:42 jas02 joined #salt
18:42 anotherzero joined #salt
18:43 edrocks joined #salt
18:44 anotherzero joined #salt
18:45 joshin joined #salt
18:45 joshin joined #salt
18:46 s_kunk joined #salt
18:47 cacasmacas joined #salt
18:48 DanyC thx cmarzullo ! will do so
18:48 cuxtud joined #salt
18:50 cuxtud Fileserver_backend is git. gitf_remotes has the ssh for bitbucket server url. ssh keys are present. How do I verify that it can see the states from the repo
18:54 whytewolf cuxtud: from the master try salt-run fileserver.dir_list backend=git
18:58 netcho_ joined #salt
19:02 djgerm joined #salt
19:02 DanyC joined #salt
19:04 DanyC_ joined #salt
19:05 beardedeagle am I missing something? `salt['pillar.get']('something', default=something.sensu, merge=True)` This does not do a true merge in the sense that if I have a key: val in both defaults and the pillar that it basically "concats" the key:val pairs. Instead it overwrites the key:val with the pillar.
19:07 beardedeagle sorty `salt['pillar.get']('something', default=defaults.something, merge=True)`*
19:07 jas02 joined #salt
19:08 dyasny joined #salt
19:10 orionx joined #salt
19:16 netcho_ joined #salt
19:17 Praematura joined #salt
19:17 gableroux joined #salt
19:19 seanz joined #salt
19:19 sarcasticadmin joined #salt
19:20 buglessdr joined #salt
19:22 Tanta_G joined #salt
19:30 seanz1 joined #salt
19:30 seanz1 left #salt
19:30 seanz1 joined #salt
19:34 gk-1wm-su joined #salt
19:34 gk-1wm-su left #salt
19:36 bob_twinkles joined #salt
19:45 pissoff joined #salt
19:50 sh123124213 joined #salt
19:54 jas02 joined #salt
19:55 anotherzero joined #salt
19:57 Edgan joined #salt
19:59 Trauma joined #salt
20:04 cmarzullo what does that mean to concat a key:value pair? You can only have one key.
20:05 cuxtud joined #salt
20:06 cuxtud How to I refresh the fileserver_backend cache
20:09 jas02 joined #salt
20:09 mk-fg joined #salt
20:13 beardedeagle cmarzullo: in the case of python and contacting dicts of lists, you'd just end up with the same dict with ALL list items
20:14 beardedeagle either way I solved it
20:17 whytewolf cuxtud: salt-run fileserver.update
20:18 whytewolf cuxtud: honestly i use this as i also use git_pillar https://github.com/whytewolf/salt-phase0-states/blob/master/orch/salt-core-update.sls and it kind of takes care of everything
20:21 DammitJim joined #salt
20:22 amagawdd joined #salt
20:28 cacasmacas joined #salt
20:33 viccuad joined #salt
20:33 gmoro joined #salt
20:34 viccuad Hi folks. Is there a way to make salt not query for gitfs's on every highstate, but use the cached ones? thanks in advance
20:37 jrklein joined #salt
20:39 cscf viccuad, I thought by default it checks every 60s to refresh its caches?
20:39 viccuad D:
20:40 viccuad why not do it when a highstate gets called, and only if X time has passed since the last one?
20:41 viccuad how can I change that 60s default? I can't find anything on the docs
20:41 cscf viccuad, why, what is wrong with it?
20:43 viccuad cscf: I find it a bit too much, to redownload all the repos everytime I apply highstate
20:43 cscf viccuad, I think it only does 'git pull' not rm & clone
20:43 cscf viccuad, https://docs.saltstack.com/en/latest/ref/configuration/master.html#loop-interval
20:44 cyborg-one joined #salt
20:44 viccuad cscf: thanks for the link :)
20:44 whytewolf loop-interval changes a lot more then just the fileserver backend update.
20:45 viccuad I'm using it masterless, so maybe it makes sense for me
20:45 whytewolf are you useing schedule at all
20:46 viccuad nope
20:46 tapoxi what's a nice command I can run that returns nothing at all
20:46 viccuad tapoxi: true?
20:46 whytewolf wait masterless? yeah then you don't even have it looping which is why it has to run the update every highstate. there is no getting around that
20:47 viccuad whytewolf: ok, that makes more snse
20:47 tapoxi viccuad: an execution module that returns nothing
20:47 viccuad tapoxi: test.ping?
20:47 cscf but it's still only doing 'git pull', right?  Not really strenuous
20:47 tapoxi viccuad: nope returns True
20:47 whytewolf yeah it is just git pull.
20:47 whytewolf tapoxi: make one
20:48 whytewolf there isn't one already
20:48 tapoxi I have two masters connected via the slack engine, some commands are only valid for one master. I need to define the command otherwise it returns "Invalid Command" on the master with no support
20:48 tapoxi but then I have to make that command do something
20:49 whytewolf test.sleep 20
20:49 Sarphram joined #salt
20:50 tapoxi whytewolf: returns true
20:50 tapoxi I think I need to edit the engine to listen for alternative commands
20:50 whytewolf there isn't a module that doesn't return something
20:50 tapoxi eg use !prod_ or !dev_ to be its trigger instead of just '!'
20:56 Trauma_ joined #salt
21:02 jas02 joined #salt
21:03 scsinutz joined #salt
21:05 karlthane joined #salt
21:13 fracklen_ joined #salt
21:19 armguy joined #salt
21:44 scsinutz1 joined #salt
21:53 fracklen joined #salt
21:56 DanyC joined #salt
21:58 swills_ joined #salt
22:06 abednarik joined #salt
22:10 jas02 joined #salt
22:10 nickabbey joined #salt
22:16 cacasmacas joined #salt
22:17 jas02 joined #salt
22:20 scsinutz joined #salt
22:37 Tanta joined #salt
22:41 tapoxi hey can someone who knows the salt source see if I found a bug?
22:42 tapoxi https://github.com/saltstack/salt/blob/develop/salt/engines/slack.py
22:42 tapoxi line 212, shouldn't tgt_type be expr_form ?
22:42 Aleks3Y joined #salt
22:44 cacasmacas joined #salt
22:44 AndreasLutro expr_form has apparently been deprecated for tgt_type very recently
22:47 tapoxi ok
22:51 blu_ joined #salt
22:52 Trauma joined #salt
22:57 darthzen_ joined #salt
22:58 gk--1wm- joined #salt
23:10 jas02 joined #salt
23:29 jas02 joined #salt
23:29 cacasmacas joined #salt
23:36 DanyC joined #salt
23:50 gmoro joined #salt
23:53 Heartsbane Just a Monday rant: If a developer writes a code and migration on Monday that totally buggers the QA environment. Thank God for Salt, because you 16:30 MDT I can get useful error messages of what went wrong and launch one command to make it correct and still have time to go home at 17:00 MDT :P *salt saved me from Monday*
23:53 Heartsbane and hurting a developer
23:54 whytewolf monday, that isn't a problem. Friday and there would be one less dev in the world
23:55 Heartsbane robawt: basepi: ^^^
23:56 Heartsbane whytewolf: something like that
23:57 onlyanegg joined #salt
23:57 robawt haha nice Heartsbane  :)

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