Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-01-05

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

All times shown according to UTC.

Time Nick Message
00:00 brodor Oh so "outside salt's purview" from https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.exists means that you have to transfer the file yourself?
00:01 hemebond "outside of Salt's purview" means you're not managing the file with Salt.
00:01 hemebond Which means you can't create the dependency.
00:01 hemebond So the file.exists is for creating a dependency on the file you're not managing with Salt.
00:02 hemebond Because dependencies are done between states.
00:02 pipps joined #salt
00:03 brodor Ahh, so I can just specify `creates` and make that task a prerequisite for installing with that script once it's present
00:03 hemebond "creates" is used to prevent something running more than once.
00:04 brodor Right. Obtaining that file from wget should only happen once.
00:04 hemebond e.g., cmd.run that downloads a file would not download again if that "creates" file already exists.
00:04 hemebond But that's a conditional, not a dependency.
00:05 brodor Yeah, the dependency would be executing that downloaded file
00:05 brodor Do I have that right?
00:05 hemebond "Execute File" -> requires -> "Download File"
00:06 hemebond https://docs.saltstack.com/en/latest/ref/states/requisites.html#require
00:06 hemebond https://docs.saltstack.com/en/latest/ref/states/requisites.html#id1 has actual examples for require
00:10 brodor Thanks, that's incredibly helpful
00:10 brodor I'll see if I can put it together
00:10 hemebond Good luck ūüĎć
00:19 dj_goku joined #salt
00:19 dj_goku joined #salt
00:24 jas02 joined #salt
00:25 dj_goku joined #salt
00:25 dj_goku joined #salt
00:25 Klas joined #salt
00:29 brodor @hemebond: Thanks, I think this is a successful state http://pastebin.com/qH5BuqLk
00:30 hemebond Looks pretty good. You might want to use a friendly name for the states instead of the bash command; makes it easier to understand the dependencies.
00:30 hemebond If you change the command in any way you'll have to update your require entry too.
00:31 brodor I was wondering why there was no name param in any of those examples
00:31 rpb joined #salt
00:31 hemebond Yeah. That shorthand can cause a lot of confusion.
00:32 brodor It looks like for cmd.run, name means COMMAND_TO_RUN and the top line is the state id
00:32 hemebond Correct.
00:32 hemebond That's the case for most state modules.
00:33 hemebond If you don't specify the "name" parameter then it'll use the state ID for the "name" parameter.
00:34 whytewolf https://docs.saltstack.com/en/latest/ref/states/highstate.html#name-declaration
00:35 cachedout joined #salt
00:35 dj_goku joined #salt
00:35 dj_goku joined #salt
00:58 dyasny joined #salt
01:00 jas02 joined #salt
01:01 keimlink_ joined #salt
01:06 madboxs joined #salt
01:12 mavhq joined #salt
01:16 keimlink joined #salt
01:18 mirko is there a way to use the roster-name as a variable inside states, as one uses grains?
01:18 eprice joined #salt
01:24 woodtablet left #salt
01:25 iggy not that I know of
01:25 sh123124213 joined #salt
01:26 eprice joined #salt
01:31 shoemonkey joined #salt
01:31 mavhq joined #salt
01:31 eprice joined #salt
01:35 eprice joined #salt
01:43 bltmiller joined #salt
01:45 DEger joined #salt
01:54 seanz joined #salt
01:57 eprice joined #salt
02:02 jas02 joined #salt
02:04 eprice joined #salt
02:06 edrocks joined #salt
02:09 cachedout joined #salt
02:11 eprice joined #salt
02:17 Julio joined #salt
02:18 eprice joined #salt
02:20 Cottser joined #salt
02:23 eprice joined #salt
02:24 eprice joined #salt
02:24 Julio anyone from Argentina or Uruguay?
02:31 catpigger joined #salt
02:32 eprice joined #salt
02:35 eprice joined #salt
02:36 bltmiller joined #salt
02:42 eprice joined #salt
02:47 qriff_ joined #salt
02:48 qriff_ i'm trying to setup salt-cloud with google cloud, and having some trouble figuring out the GCE functions.
02:49 qriff_ how do I put them in a state? for example, they show this on the reference page: salt-cloud -f create_disk gce disk_name=pd size=300 location=us-central1-b
02:49 eprice joined #salt
02:49 qriff_ but how would I put that in a state, to attach that to a machine?
02:49 qriff_ basically, want to deploy the minion, along with create and attach a persistent disk
02:54 eprice joined #salt
02:55 hemebond qriff_: You don't put it into a state, you run salt-cloud from the command line.
02:55 qriff_ sorry, I meant a mapping file
02:55 qriff_ :)
02:55 hemebond You would create a profile with that disk information in it.
02:56 hemebond And reference that profile from the map file.
02:57 eprice joined #salt
02:58 qriff_ hemebond: any pointers on how to format that?
02:58 hemebond Mmm, it depends on the provider/driver.
02:58 hemebond I've not used Google.
02:59 qriff_ trying to create a templated setup for our applications/setup, so we can setup duplicates in other projects in the future
02:59 qriff_ k, thanks
03:02 hemebond ec2 has a volumes parameter.
03:02 hemebond Can't see something similar on GCE.
03:02 hemebond https://github.com/saltstack/salt/pull/36104/commits/208a94679d3cd2acf8ac35ba585aff1a8202c829
03:02 saltstackbot [#36104][MERGED] WIP for GCE salt cloud volume support. | What does this PR do?...
03:03 hemebond Looks like someone is working on it.
03:05 iggy_ joined #salt
03:05 capn-morgan joined #salt
03:05 chron0 joined #salt
03:05 HRH_H_Cr1b joined #salt
03:05 jerrcs joined #salt
03:05 giany joined #salt
03:05 Xevian joined #salt
03:05 khorben joined #salt
03:05 nineteen joined #salt
03:05 Nebraskka joined #salt
03:05 esc\\ joined #salt
03:05 robins joined #salt
03:05 pocketprotector joined #salt
03:05 pocketprotector joined #salt
03:05 Flying_Panda joined #salt
03:05 schinken joined #salt
03:06 Deliant joined #salt
03:06 hax404 joined #salt
03:06 inire joined #salt
03:06 wm-bot4 joined #salt
03:06 sp0097 joined #salt
03:06 pmcg joined #salt
03:06 sp0097 left #salt
03:08 eprice joined #salt
03:10 DEger joined #salt
03:11 ninjada joined #salt
03:12 eprice joined #salt
03:12 tom29739 joined #salt
03:12 bltmiller joined #salt
03:13 qriff_ hemebond: thanks for the heads up, i'll keep track of that
03:13 hemebond ūüĎć
03:16 ninjada hey guys
03:16 ninjada getting an error when deploying via salt-cloud
03:16 ninjada [ERROR   ] There was a profile error: 'NoneType' object is unsubscriptable
03:17 hemebond ninjada: What provider/driver?
03:18 ninjada ec2
03:19 hemebond What version of Salt?
03:19 hemebond And you'll need to paste your profile somewhere.
03:19 hemebond Or run the salt-cloud command with debug logging to see the full error.
03:19 ninjada Salt Version:
03:19 ninjada Salt: 2016.11.1
03:19 hemebond ugh, I wouldn't use 2016.11 with EC2. It's a bit broken.
03:22 ninjada really?
03:22 ninjada whats the best vers
03:22 ninjada for ec2
03:22 hemebond I'm still on 2016.3.4
03:23 ninjada how can i downgrade :|
03:24 hemebond Mmm, use a cron or at job to downgrade the packages and restart the services using a script?
03:25 eprice joined #salt
03:26 fracklen joined #salt
03:27 sh123124213 joined #salt
03:29 pipps joined #salt
03:31 eprice joined #salt
03:34 ninjada downgraded to 2016.3.4
03:34 ninjada working again :|
03:35 hemebond Nice.
03:35 ninjada :)
03:35 eprice joined #salt
03:35 ninjada thanks man
03:35 hemebond ūüĎć
03:37 bastiand1 joined #salt
03:42 eprice joined #salt
03:53 eprice joined #salt
03:55 morissette joined #salt
03:58 icebal joined #salt
04:00 eprice joined #salt
04:07 iggy_ qriff_: you can actually put it all in states too (or orchestrate jobs or...)
04:08 qriff_ iggy: i have used salt for a long time, never the cloud stuff, do you know of any good examples?
04:08 iggy_ of putting salt cloud stuff in states?
04:08 edrocks joined #salt
04:10 eprice joined #salt
04:11 ninjada joined #salt
04:12 qriff_ yes, not sure how to convert the stuff I see on this page https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.gce.html into a state
04:13 anthonyshaw joined #salt
04:19 eprice joined #salt
04:24 eprice joined #salt
04:24 tpaul joined #salt
04:29 eprice joined #salt
04:29 bltmiller joined #salt
04:40 icebal joined #salt
04:43 eprice joined #salt
04:56 eprice joined #salt
04:58 ninjada_ joined #salt
05:00 eprice joined #salt
05:00 hemebond qriff_: https://docs.saltstack.com/en/latest/topics/cloud/salt.html#state-module
05:01 cyborg-one joined #salt
05:06 eprice joined #salt
05:06 mavhq joined #salt
05:07 eprice joined #salt
05:13 scoates joined #salt
05:15 spuder joined #salt
05:18 eprice joined #salt
05:20 samodid joined #salt
05:20 ninjada joined #salt
05:22 eprice joined #salt
05:32 DEger joined #salt
05:37 DEger joined #salt
05:39 eprice joined #salt
05:39 madboxs_ joined #salt
05:40 madboxs_ joined #salt
05:41 eprice joined #salt
05:50 eprice joined #salt
05:51 bocaneri joined #salt
05:52 bocaneri joined #salt
05:56 eprice joined #salt
05:58 alssi joined #salt
06:01 eprice joined #salt
06:02 eprice joined #salt
06:03 icebal joined #salt
06:07 eprice joined #salt
06:11 eprice joined #salt
06:13 eprice joined #salt
06:16 eprice joined #salt
06:19 eprice joined #salt
06:20 mavhq joined #salt
06:21 eprice joined #salt
06:25 spuder joined #salt
06:26 eprice joined #salt
06:31 eprice joined #salt
06:33 ivanjaros joined #salt
06:36 eprice joined #salt
06:42 eprice joined #salt
06:44 eprice joined #salt
06:49 alssi joined #salt
06:49 samodid joined #salt
06:51 eprice joined #salt
06:52 rawzone joined #salt
06:58 dkrae joined #salt
06:58 karlthane joined #salt
06:59 preludedrew joined #salt
07:00 madboxs joined #salt
07:03 eprice joined #salt
07:05 swills_ joined #salt
07:10 eprice joined #salt
07:12 eprice joined #salt
07:13 eprice joined #salt
07:16 eprice joined #salt
07:20 eprice joined #salt
07:21 madboxs joined #salt
07:27 eprice joined #salt
07:27 eprice joined #salt
07:28 alssi_ joined #salt
07:34 eprice joined #salt
07:39 rabha joined #salt
07:40 rabha Hello everyone
07:40 eprice joined #salt
07:40 rabha wanted to know whether we can specify root disk size for AWS ec2?
07:41 rabha i tried  volumes:     - { size: 30, device: /dev/sda }  and   BlockDeviceMapping:     - DeviceName: /dev/sda     EbsVolumeSize: 30
07:41 rabha but seems to be not working
07:42 madboxs joined #salt
07:45 mavhq joined #salt
07:47 eprice joined #salt
07:48 mavhq joined #salt
07:50 fracklen joined #salt
07:52 jas02 joined #salt
07:52 o1e9 joined #salt
07:53 eprice joined #salt
07:54 fracklen joined #salt
07:58 jas02 joined #salt
07:58 eprice joined #salt
07:59 madboxs joined #salt
07:59 jas02 joined #salt
08:00 eprice joined #salt
08:01 eprice joined #salt
08:03 jas02 joined #salt
08:04 eprice joined #salt
08:06 jas02 joined #salt
08:07 eprice joined #salt
08:11 jas02 joined #salt
08:12 edrocks joined #salt
08:12 eprice joined #salt
08:17 ronnix joined #salt
08:20 madboxs joined #salt
08:21 fracklen joined #salt
08:21 jas02 joined #salt
08:22 fracklen joined #salt
08:23 eprice joined #salt
08:23 fracklen joined #salt
08:26 eprice joined #salt
08:28 eprice joined #salt
08:33 eprice joined #salt
08:37 moeyebus9 joined #salt
08:39 jas02 joined #salt
08:40 madboxs joined #salt
08:41 eprice joined #salt
08:48 eprice joined #salt
08:49 eprice joined #salt
08:51 sh123124213 joined #salt
08:52 teclator joined #salt
08:53 eprice joined #salt
08:55 eprice joined #salt
09:00 eprice joined #salt
09:01 madboxs joined #salt
09:04 eprice joined #salt
09:06 jas02_ joined #salt
09:07 mikecmpbll joined #salt
09:09 eprice joined #salt
09:10 eprice joined #salt
09:10 mavhq joined #salt
09:10 keimlink joined #salt
09:11 jas02 joined #salt
09:11 JohnnyRun joined #salt
09:13 eprice joined #salt
09:17 eprice joined #salt
09:19 darioleidi joined #salt
09:22 madboxs joined #salt
09:23 eprice joined #salt
09:25 N-Mi__ joined #salt
09:25 eprice joined #salt
09:26 DEger joined #salt
09:43 Kelsar joined #salt
09:43 madboxs joined #salt
09:44 eprice joined #salt
09:46 teclator joined #salt
09:48 jhauser joined #salt
09:49 s_kunk joined #salt
09:49 eprice joined #salt
09:53 keimlink joined #salt
09:53 moeyebus9 joined #salt
09:54 eprice joined #salt
09:56 mavhq joined #salt
09:59 eprice joined #salt
10:01 eprice joined #salt
10:04 madboxs joined #salt
10:08 eprice joined #salt
10:12 eprice joined #salt
10:14 eprice joined #salt
10:16 eprice joined #salt
10:20 eprice joined #salt
10:24 eprice joined #salt
10:25 madboxs joined #salt
10:26 moeyebus9 joined #salt
10:28 irctc779 joined #salt
10:30 eprice joined #salt
10:37 nidr0x joined #salt
10:40 mavhq joined #salt
10:40 eprice joined #salt
10:45 madboxs joined #salt
10:48 eprice joined #salt
10:51 mavhq joined #salt
10:51 eprice joined #salt
10:53 sh123124213 joined #salt
10:54 dxtr Do I have to do something to trigger the salt mater to pull gitfs remotes?
10:54 dxtr salt master
10:54 dxtr Because it doesn't show up in 'salt-run fileserver.file_list'
10:55 hemebond dxtr: What if you do 'salt-run fileserver.update'?
10:56 hemebond Apparently it should refresh every 60 seconds anyway.
10:56 dxtr It didn't pull it there either but it read my configuration file with the gitfs settings according to the debug output
10:57 hemebond Something wrong with the config or repo possibly.
10:57 hemebond Does it fail if you try to use a state from the repo?
10:57 dxtr Ahha, I found it
10:58 dxtr fileserver-backend:...
10:58 dxtr Lame
11:00 eprice joined #salt
11:00 dxtr Okay so it seems to have pulled the remote now - but it still doesn't show up in the file list ;p
11:02 hemebond salt-run fileserver.file_list backend=git
11:02 hemebond That returns nothing?
11:03 eprice joined #salt
11:06 madboxs joined #salt
11:07 abednarik joined #salt
11:07 eprice joined #salt
11:08 dxtr Oh yes it does
11:08 dxtr Thanks!
11:08 dxtr Didn't know about the backend=git
11:11 dxtr Can I also list pillar files?
11:13 eprice joined #salt
11:14 eprice joined #salt
11:14 edrocks joined #salt
11:18 hemebond I can't see anything to do that.
11:20 Reverend dxtr: for a minion, you can do `salt \* pillar.items`
11:20 Reverend not sure if that helps
11:20 Reverend i've not been following your conversation
11:20 eprice joined #salt
11:23 eprice joined #salt
11:25 dxtr Reverend: That was almost exactly what I was looking for :)
11:25 dxtr By the way, if I am modifying the salt minion configuration through salt
11:25 dxtr Is it safe to restart the minion service then?
11:25 Reverend i guess. Just be aware that if you fuck it, all of your minions are going to disappear and there's no way to fix it
11:27 eprice joined #salt
11:27 madboxs joined #salt
11:31 eprice joined #salt
11:34 Miouge joined #salt
11:38 mavhq joined #salt
11:39 hemebond dxtr: https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-daemon-using-salt
11:39 eprice joined #salt
11:41 moeyebus9 joined #salt
11:45 eprice joined #salt
11:47 mavhq joined #salt
11:48 madboxs joined #salt
11:49 eprice joined #salt
11:54 sh123124213 joined #salt
11:54 eprice joined #salt
11:55 dxtr Also, someone were talking about setting mysql settings through pillars the other day
11:55 n1x0n_ joined #salt
11:55 MikaT_ joined #salt
11:55 Ahlee_ joined #salt
11:55 oyvindmo_ joined #salt
11:55 Sketch joined #salt
11:55 dxtr But I haven't quite found out how to do that
11:55 canci joined #salt
11:55 descrepes joined #salt
11:55 nshttpd joined #salt
11:55 aberdine joined #salt
11:55 MTecknology joined #salt
11:55 hatifnatt1 joined #salt
11:55 daks joined #salt
11:55 voileux joined #salt
11:55 Nei joined #salt
11:55 skullone joined #salt
11:56 dxtr So.. How do I do that?
11:56 k4kvm joined #salt
11:56 scooby2 joined #salt
11:56 lempa joined #salt
11:56 MTecknology joined #salt
11:56 yuhl__ joined #salt
11:56 Nei joined #salt
11:56 \ask joined #salt
11:56 netzvieh joined #salt
11:56 Reverend dxtr: are you using the formula, or writing your own?
11:56 scooby2 joined #salt
11:56 huleboer joined #salt
11:56 monokrome joined #salt
11:56 muep joined #salt
11:56 Guest5799 joined #salt
11:56 pppingme joined #salt
11:57 shakalaka joined #salt
11:57 dxtr Hmm, I am not using the formula. Maybe I should.
11:57 eprice joined #salt
11:58 chamunks joined #salt
11:58 Yoda-BZH joined #salt
11:58 Yoda-BZH joined #salt
11:58 Reverend it's up to you... but i usually set a bunch of things that are required more than once in a pillar, and fetch them out with `salt['pillar.get']("pillar:some:data")`
11:59 Reverend as my pillar data is:
11:59 Reverend pillar:
11:59 Reverend some:
11:59 Reverend date:
11:59 Reverend a*
12:00 Reverend for my case, I reference a shared loadbalancer quite a lot in my configs, so I ahve a 'generic' config pillar to store random shit in and just do "set loadbalancer {{ salt['pillar.get']("config:shared_elb") }}"
12:01 eprice joined #salt
12:02 uu joined #salt
12:03 tom29739 joined #salt
12:06 eprice joined #salt
12:09 madboxs joined #salt
12:14 dxtr [ERROR   ] Error occurred fetching gitfs remote 'https://github.com/saltstack-formulas/mysql-formula': Failed to resolve address for https: Name or service not known
12:14 dxtr What the..
12:15 viq dxtr: what do you want to set for mysql in minion config?
12:17 eprice joined #salt
12:18 viq dxtr: here's how I did this: https://pbot.rmdir.de/X_QH_IwXsXwCP1yazoZ-gg
12:19 Reverend can one do an 'if sls is present, use this group, else use this group' ?
12:19 Reverend that'd be superbly handy
12:19 viq Reverend: set a grain in said sls?
12:19 Reverend viq: you're a fucking hero.
12:20 AndreasLutro joined #salt
12:20 viq Either that, or hang execution of both on presence or lack of a pillar value
12:20 Reverend yeah. I'm going to do a 'webserver:nginx' OR
12:20 Reverend 'webserver:apache'
12:20 Reverend and use that.
12:22 jas02 joined #salt
12:22 Reverend quick questoin, how would one use grain.set in an sls?
12:22 Reverend :(
12:22 Reverend grains.set*
12:22 viq Use the grain state :P
12:23 johnkeates joined #salt
12:23 viq https://docs.saltstack.com/en/latest/ref/states/all/salt.states.grains.html
12:23 Reverend ah. i was looking at modules. thank you darling.
12:24 viq But if you absolutely have to then there's https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html
12:24 viq Also keep in mind that the conditional you're creating most likely will not match on first execution.
12:24 johnkeates i want to merge deeper pillar data, but it sometimes overwrites lists instead of merging them
12:24 viq johnkeates: use yamlex renderer
12:24 Reverend viq: because it will need to make the grain first?
12:24 viq Reverend: exactly
12:25 Reverend I'm half tempted to run all nginx AND apache under the same group, likw wwwdata or something
12:25 Reverend then there won't be any conflicts eitherway
12:25 johnkeates viq: was looking at that, is it supported better? I tried it in 2015 but it might have been beta-ish then
12:25 viq johnkeates: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.yamlex.html
12:25 eprice joined #salt
12:26 viq I've used it, though admittedly not too extensively, for quite a while
12:26 johnkeates i'm running the previous stable but I guess since the docs between latest and previous are the same, it should be at least comparably supported
12:26 dxtr How come salt tries to resolve https: when I've added some gitfs remotes?
12:26 viq johnkeates: no changes to docs != no changes to code
12:26 DEger joined #salt
12:27 johnkeates true, but no missing references also means it's not removed
12:27 viq dxtr: paste the config part
12:27 johnkeates unless the docs haven't gotten better the last 12 months :p
12:28 viq That I can't comment on ;)
12:28 dxtr viq: http://dpaste.com/03JCN14
12:29 cyborg-one joined #salt
12:29 madboxs joined #salt
12:30 viq https://github.com/saltstack/salt/commits/3b81c37a531c48ff54a2332c4ea9c0d108ce0e74/salt/renderers/yamlex.py doesn't show many changes recently
12:31 eprice joined #salt
12:31 viq dxtr: also check the link I hilighted you with 15 minutes ago ;)
12:32 dxtr viq: I did :p
12:33 viq dxtr: random idea, try removing the quotes?
12:33 dxtr I tried that first
12:33 dxtr Then I added the quotes :p
12:33 eprice joined #salt
12:34 viq Try using gitpython instead?
12:34 Reverend have I ever told anyone how much I can't stand apache after using nginx?
12:35 johnkeates no, but I hear ya
12:35 viq pygit is sometimes finnicky. Also they tend to make backwards incompatible changes in minor releases :(
12:35 viq Which reminds me, I should look again at http://man.openbsd.org/OpenBSD-current/man8/httpd.8  ;)
12:35 johnkeates yes!
12:36 johnkeates but it's a bit lighttpd-ish
12:38 viq I don't know what you mean since I have pretty much no experience with lighttpd
12:38 babilen joined #salt
12:39 viq huh, https://opensource.googleblog.com/2017/01/grumpy-go-running-python.html
12:39 johnkeates the picture of that meat grinder is accurate, next to the article
12:39 abednarik joined #salt
12:40 eprice joined #salt
12:40 Reverend I really like python. Think it's such a great language.
12:41 Reverend litterally anyone can use it, but it's also complex enough to do some crazy stuff in.
12:43 eprice joined #salt
12:45 mavhq joined #salt
12:46 tpaul joined #salt
12:46 oida joined #salt
12:46 eprice joined #salt
12:47 dijit I hope they allow it to run py3. We don't need another reason to hold off on moving to py3.
12:50 madboxs joined #salt
12:53 eprice joined #salt
12:54 eprice joined #salt
13:00 eprice joined #salt
13:00 numkem joined #salt
13:02 mavhq joined #salt
13:03 johnkeates anyone know is yamlex doesn't want to aggregate dicts?
13:05 dj_goku joined #salt
13:05 dj_goku joined #salt
13:05 DammitJim joined #salt
13:06 s_kunk joined #salt
13:07 eprice joined #salt
13:10 eprice joined #salt
13:11 madboxs joined #salt
13:13 eprice joined #salt
13:14 babilen joined #salt
13:18 moeyebus9 joined #salt
13:19 eprice joined #salt
13:22 eprice joined #salt
13:26 pcdummy viq: its a nice announcement but theres sadly no std. libray with grumpy.
13:27 johnkeates i bet the cdc has a std lib
13:27 pcdummy cdc?
13:27 johnkeates Centers for Disease Control and Prevention
13:27 johnkeates cdc.gov ;-)
13:29 johnkeates yamlex with !aggregate doesn't work for shiz
13:30 eprice joined #salt
13:30 amontalban joined #salt
13:30 amontalban joined #salt
13:31 edrocks joined #salt
13:32 madboxs joined #salt
13:32 eprice joined #salt
13:35 eprice joined #salt
13:41 fracklen joined #salt
13:46 eprice joined #salt
13:49 viq johnkeates: works fine in my environment
13:49 johnkeates it just works as if it's !reset in mine :(
13:50 fracklen joined #salt
13:50 eprice joined #salt
13:52 johnkeates an example of what doesn't work: https://gist.github.com/johnkeates/8465d264cf8f2cd76f4e4abfa8604a02
13:52 _Cyclone_ joined #salt
13:53 viq I don't think that's the correct syntax, but let me look
13:53 madboxs joined #salt
13:53 johnkeates that would explain it not working
13:53 johnkeates :p
13:54 eprice joined #salt
13:55 viq I think you'd want haproxy: !aggregate { frontends: { http-in: { acls: ['host-cdn-nl hdr_dom(host) -i cdn.special_example.nl', 'host-cdn-de hdr_dom(host) -i cdn.special_example.de']}}}
13:55 viq Or some similiar monstrosity :P
13:55 sh123124213 joined #salt
13:55 viq actually...
13:56 eprice joined #salt
13:57 viq maybe this? https://pbot.rmdir.de/QaAf8BikTA-M_ZhPQZlHmQ
13:57 johnkeates but isn't that JSON? :p
13:58 eprice joined #salt
13:58 viq JSON is still a valid YAML :P
13:58 johnkeates I suppose it doesn't matter, since the pillar data is just fed into jinja
13:58 johnkeates i'll just do it :p
13:58 eprice joined #salt
13:58 viq also, https://docs.saltstack.com/en/latest/ref/renderers/all/index.html
14:00 viq johnkeates: you can expand it to more YAMLy structure, I think, just this is close to syntax I see used in the docs page. Feel free to experiment ;)
14:03 eprice joined #salt
14:06 babilen joined #salt
14:06 eprice joined #salt
14:09 Ahlee_ joined #salt
14:12 voileux_ joined #salt
14:14 madboxs joined #salt
14:14 eprice joined #salt
14:14 racooper joined #salt
14:15 chowmeined joined #salt
14:16 nidr0x joined #salt
14:17 eprice joined #salt
14:18 s_kunk joined #salt
14:18 s_kunk joined #salt
14:18 _JZ_ joined #salt
14:20 dj_goku joined #salt
14:20 dj_goku joined #salt
14:20 s_kunk joined #salt
14:21 eprice joined #salt
14:25 _JZ__ joined #salt
14:29 cyteen joined #salt
14:29 eprice joined #salt
14:33 eprice joined #salt
14:34 madboxs joined #salt
14:36 abednarik joined #salt
14:37 jmcknight joined #salt
14:38 eprice joined #salt
14:39 nicksloan joined #salt
14:40 eprice joined #salt
14:41 dxtr Is it possible for an environment to say "run all the base states plus those specified here"?
14:41 dxtr I mean in the top file
14:41 mavhq joined #salt
14:45 eprice joined #salt
14:48 Reverend well yeah, that's the point of the top file... is it not?
14:48 eprice joined #salt
14:51 dxtr So the base states are run before the current environment always?
14:51 cscf dxtr, you want env foo to be merged with env base?
14:52 eprice joined #salt
14:53 nickabbey joined #salt
14:55 madboxs joined #salt
14:57 dxtr Basically, yes
14:57 UForgotten joined #salt
14:58 cscf I don't think that's a feature
14:58 eprice joined #salt
14:58 cscf You could probably write a script to generate a merged top.sls, if you really wanted
14:59 cscf But if you're not changing it a lot, it's probably easier to just copy base and edit it
15:01 haam3r Hi! Anybody know how I can pass the extracted dir name from archive.extracted to file.rename...basically I need to rename the folder ceated by arhcive.extracted?
15:02 cscf haam3r, well, if all else fails, you can rename the most recently created folder using bash
15:03 eprice joined #salt
15:03 teclator joined #salt
15:03 mpanetta joined #salt
15:03 haam3r true that...I was hoping for a more salty way of doing it.
15:03 haam3r I also tried: {% set dir_path = salt['file.find']('/srv/ type=d name=dokuwiki-* maxdepth=1')|first %}
15:04 haam3r but that's giving me an empty sequence error
15:04 haam3r although on the command line it works and I get a result back
15:04 cscf haam3r, oh look: "Salt now uses a function called archive.list to get a list of files/directories in the archive. "
15:05 cscf Perhaps you could use this function with some jinja or something
15:06 eprice joined #salt
15:07 mpanetta joined #salt
15:08 Tanta joined #salt
15:09 spuder joined #salt
15:11 haam3r cscf: Damn...Thanks a lot. Slightly on the slow side, since I'm checking from an external url but, worked like a charm.
15:12 eprice joined #salt
15:15 abednarik joined #salt
15:16 madboxs joined #salt
15:16 beardedeagle joined #salt
15:22 eprice joined #salt
15:26 eprice joined #salt
15:27 dxtr Why isn't salt-cloud running state.highstate when it's taking up a node?
15:28 dxtr start_action is set to state.highstate in /etc/salt/cloud
15:29 beardedeagle I had to set up a reactor to do that. I have never had start_action work for highstate.
15:30 remyd1 joined #salt
15:31 dxtr weird
15:31 remyd1 Hi folks, is it possible to have jinja loops or conditionnal values in an orchestrator or should it be done under sub-states called from the orchestrator ?
15:32 ssplatt joined #salt
15:32 eprice joined #salt
15:36 DammitJim joined #salt
15:37 madboxs joined #salt
15:38 fracklen joined #salt
15:38 remyd1 Ok, I found the answer
15:40 eprice joined #salt
15:40 remyd1 Another one: is it possible to manage grains from pillar ? If yes, how ?
15:41 babilen remyd1: Sure, just feed grains.present states from pillar data... What do you need that for though?
15:42 remyd1 I need it to assign some values on my minions
15:42 remyd1 e.g. I set manually some grains
15:42 babilen And they have to be grains as you can't just work with the pillar data directly?
15:42 remyd1 pool, roles, etc...
15:43 mavhq joined #salt
15:43 babilen I don't like grains for roles, but okay
15:43 ekristen joined #salt
15:43 remyd1 ===>>> That's why I would prefer to manage it with pillar
15:43 babilen I mean .. in most cases you can just access the pillar data directly. That way you can trust those settings.
15:44 babilen remyd1: Are you targeting states with that?
15:44 remyd1 In my states I am using both : pillars and grains and it becoming a bit complex
15:44 remyd1 If everything were set in pillars it would be easier
15:44 babilen You can target states by pillar too (e.g. I@ )
15:45 remyd1 can you provide any example ?
15:45 babilen https://docs.saltstack.com/en/latest/topics/targeting/pillar.html / https://docs.saltstack.com/en/latest/topics/targeting/compound.html
15:45 babilen Check I@ and J@ on the compound matcher site
15:46 eprice joined #salt
15:47 eprice joined #salt
15:47 remyd1 humm. I will have to think how to change all my grains into pillars, but that is a good starting point.
15:47 remyd1 babilen, thanks
15:47 mavhq joined #salt
15:48 babilen Please note that you cannot target pillars by pillars
15:48 anotherzero joined #salt
15:50 remyd1 BTW, I have some problem using nodegroup in last version of salt (2016.11)
15:51 remyd1 So I decided to convert all my nodegroup into grains, that's why it becoming a real headache
15:52 remyd1 In fact it does not work with old salt release
15:53 remyd1 https://github.com/saltstack/salt/issues/34034
15:53 saltstackbot [#34034][OPEN] nodegroup issue between slaves v 2015.5.10 and master > 2015.8.0 | Hi,...
15:56 nZac joined #salt
15:56 abednarik joined #salt
15:56 sh123124213 joined #salt
15:57 ekkelett joined #salt
15:57 DEger joined #salt
15:58 madboxs joined #salt
16:04 ReV013 joined #salt
16:08 cachedout joined #salt
16:08 mavhq joined #salt
16:09 dyasny joined #salt
16:13 debian112 joined #salt
16:14 evidence joined #salt
16:16 ReV013 hi. I'm trying to create a custom grain using python. It works with some modules, but invoking salt.modules.network.default_route() gives me this - global name '__grains__' is not defined
16:17 ReV013 it seems default_route seems to use kernel grain. But this context seems to be missing. How can I pass it to library
16:18 gtmanfred iggy: I am trying my best... That is my only goal to get them done by Nitrogen
16:18 beardedeagle So I haven't tried this _yet_, but since saltstack uses pyyaml I assume that it allows for construction of objects at parse-time
16:18 gtmanfred iggy: if i could get out of having to do issue triage half my time... it would be great
16:18 madboxs joined #salt
16:20 beardedeagle I guess that would be more of a question for any of the devs floating in this channel
16:21 gtmanfred what do you mean by parsetime?
16:21 beardedeagle directory: &DIRECTORY /Users/jesse
16:21 beardedeagle contents: !!python/object/apply:os.listdir [*DIRECTORY]
16:21 beardedeagle something like that
16:21 gtmanfred ahh yes
16:21 gtmanfred beardedeagle: https://github.com/gtmanfred/salt-states/blob/oldmaster/website/mysql.sls#L4
16:22 gtmanfred i am not sure about !!, but maybe?
16:22 gtmanfred the anchors and hooks work
16:22 beardedeagle !! is a tag from yaml itself I think
16:22 wm-bot4 Sorry, you are not authorized to perform this
16:23 gtmanfred cool, then probably
16:23 beardedeagle awesome. I will have to play with this. it would significantly alter how I write things.
16:26 gtmanfred it would be awesome if we could get grains, pillars, and execution modules in there
16:26 dyasny_ joined #salt
16:26 beardedeagle would definitely make things _FAR_ more dynamic
16:27 beardedeagle might be something I tackle in the near future
16:29 gtmanfred beardedeagle: actually, those tags are disabled in yaml_safe_load
16:29 sarcasticadmin joined #salt
16:29 oliv` joined #salt
16:30 beardedeagle damn
16:31 gtmanfred the reasoning being, if it is enabled, it is a big ole fat cve trap
16:32 debian112 joined #salt
16:32 PatrolDoom joined #salt
16:33 jav joined #salt
16:35 alvinstarr joined #salt
16:39 art5005 joined #salt
16:39 bd joined #salt
16:39 madboxs joined #salt
16:39 art5005 Is there a shortcut to escaping JSON data stored in a pillar field?
16:40 art5005 ie, this is giving me an error:      data: '{ "foo": "bar"}'
16:40 art5005 found unexpected ':'
16:40 art5005 Or do I just need to use " and escape the other double-quotes within the JSON?
16:44 art5005 Oh, whoops.. Scratch that, it is working.
16:46 nZac joined #salt
16:51 debian112 joined #salt
16:51 Trauma joined #salt
16:54 jas02 joined #salt
16:54 beardedeagle yeah @gtmanfred, looks like ansible does the same
16:56 jas02 joined #salt
16:58 heaje joined #salt
17:00 madboxs joined #salt
17:01 abednarik joined #salt
17:04 winsalt joined #salt
17:04 winsalt does anyone have a link to docs showing how to call a runner in an orchestration?
17:05 xbglowx joined #salt
17:05 chowmein__ joined #salt
17:05 UForgotten joined #salt
17:07 ksk joined #salt
17:07 Edgan joined #salt
17:07 ksk hola!
17:09 jas02 joined #salt
17:10 mavhq joined #salt
17:10 beardedeagle Looks like a python object _CAN_ be marekd as safe and loaded through yaml.safe_load though
17:10 ssplatt winsalt: i think theirs a good example on either the reactor or the runner docs page
17:10 beardedeagle marked*
17:10 debian112 joined #salt
17:10 ssplatt s/theirs/there’s/
17:10 winsalt i think i found it https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.runner
17:11 ssplatt https://docs.saltstack.com/en/latest/topics/reactor/ is what i was thinking
17:12 beardedeagle that is what I use: salt.runner
17:12 beardedeagle salt.runner: - name: cloud.destroy
17:12 dyasny joined #salt
17:12 mavhq joined #salt
17:14 raspado joined #salt
17:14 _beardedeagle joined #salt
17:15 winsalt so you can do kwargs just by listing them, you dont need to specify - kwargs: whatever: value
17:16 tiwula joined #salt
17:17 bltmiller joined #salt
17:19 _beardedeagle right, so the full state would be this in my example = destroying_server: salt.runner: - name: cloud.destroy - instances: {{ data.host }}
17:21 madboxs joined #salt
17:22 swills joined #salt
17:23 winsalt thanks!
17:24 nickabbey joined #salt
17:25 pipps joined #salt
17:28 moeyebus9 joined #salt
17:28 woodtablet joined #salt
17:31 pcdummy gtmanfred: all fine in Utah?
17:32 pcdummy Asking cause of the Snowstorm there.
17:35 beardedeagle joined #salt
17:35 DEger joined #salt
17:39 pipps joined #salt
17:42 madboxs joined #salt
17:42 dj_goku joined #salt
17:42 dj_goku joined #salt
17:45 onlyanegg joined #salt
17:53 cyteen joined #salt
17:54 abednarik joined #salt
17:56 ssplatt joined #salt
17:58 sh123124213 joined #salt
17:59 sp0097 joined #salt
18:01 nickabbey joined #salt
18:02 madboxs joined #salt
18:04 ssplatt joined #salt
18:10 beardedeagle joined #salt
18:14 pipps joined #salt
18:15 fracklen joined #salt
18:15 nmccollum Is there an easy way to make a salt state that applies all of the states in a directory?
18:16 PatrolDoom you can include them in the base state your applying
18:16 PatrolDoom see " - include"
18:17 nmccollum Just to make sure we are talking about the same thing.  I'd like to generate sls files to install certain software packages.  Then once it goes production just copy the sls into /srv/salt/whatever and have a state that reads all of the sls in that folder.
18:18 PatrolDoom not possible unless you've already defined the states preior
18:18 PatrolDoom there are limitations to techology
18:18 PatrolDoom ;o
18:18 PatrolDoom prior*
18:18 cmarzullo nmccollum: are you thinking of a masterless setup?
18:19 cmarzullo You can certainly run salt command locally pointing to a local file_roots
18:19 nmccollum No, just trying to eliminate a step.
18:19 PatrolDoom but you'd still have to define the states in a state correct
18:19 nmccollum I could write this in python easily, just wanting to know if salt already does it.
18:20 cmarzullo that sure sounds like masterless setup
18:20 PatrolDoom sounds like includes to me but idk...
18:21 PatrolDoom either way you'd still have to define the states to be applied
18:22 chowmeined joined #salt
18:23 nmccollum I mean... you could do something like
18:23 anotherzero joined #salt
18:23 madboxs joined #salt
18:24 nmccollum for sls in $(find /srv/salt/ -name '*.sls' | sed -e 's/\/srv\/salt\///g'); do salt '*' state.apply $sls; done
18:24 nmccollum Obviously you'd want to change the find to /srv/salt/something
18:25 cmarzullo or you just do salt-call --local --file_root=/tmp/specialdir state.sls state_file_with_includes
18:26 nmccollum Yes, but then i'd have to generate the list of files.
18:26 nmccollum I want it to just look at all of the files in a directory, then apply all of them.
18:27 PatrolDoom i get what youre trying to do
18:27 PatrolDoom however salt isn't implemented in that manner from my usage
18:27 PatrolDoom e.g. you define everything
18:27 cmarzullo shrug if you want to make salt work in some wierd workflow by using sed. . . sounds great. GLHF. Everyone else uses the built in functionality to do infrastructure as code.
18:27 raspado if deleting a host via salt-cloud, does it also remove the minion key?
18:27 PatrolDoom cmarzullo: indeed
18:28 nmccollum I just used the for loop as an example of what I wanted to do.
18:28 nmccollum I just didn't want to go writing code for salt, to do something that is already available.  If it's not, no big deal.  I'll make it do what I want.  I just didn't want to reinvent the wheel.
18:28 cmarzullo yeah that's not what 99% of people who use cfgmgmt are trying to do
18:29 PatrolDoom heh
18:29 cmarzullo it's not indempotent. You can't do ordering. You can't do requiists
18:29 cmarzullo what order will your files get run as.
18:29 cmarzullo hint, it's based on inodes.
18:29 nmccollum Doesn't matter to me what order, as long as they are all done.  Like I said, that idea was just for installing distinct and seperate software packages.
18:32 PatrolDoom mmm weird, i def care about ordering
18:32 PatrolDoom then again GL
18:32 keimlink_ joined #salt
18:32 DEger joined #salt
18:33 nmccollum I mean, in some things I care about ordering... but in this, I'm just trying to streamline a step.  If a user uses a package, i'd have it touch the sls file.  If a package hasn't been used in months, i'd just remove the sls file.  That way when nodes are provisioned the package isn't pulled because it's not used.
18:36 keimlin__ joined #salt
18:37 edrocks joined #salt
18:37 fracklen_ joined #salt
18:38 debian112 joined #salt
18:41 Tanta you can pseudo-order with includes
18:41 Tanta they execute in the order included
18:42 jmcknight joined #salt
18:44 madboxs joined #salt
18:45 LiberalSquash joined #salt
18:45 LiberalSquash left #salt
18:46 sh123124213 joined #salt
18:49 mavhq joined #salt
18:50 gtmanfred pcdummy: i don't live in utah
18:52 Kelsar joined #salt
18:52 s_kunk joined #salt
18:52 s_kunk joined #salt
18:54 austin_ joined #salt
18:55 austin_ when a master publishes something and the minion confirms it can execute that request, where are the files actually stored on the minion disk ?
18:55 austin_ cachedir ?
18:55 PatrolDoom austin_: /var/cache/salt-*
18:55 austin_ ok cool
18:56 nZac joined #salt
18:57 pipps joined #salt
19:05 madboxs joined #salt
19:07 Praematura joined #salt
19:10 fracklen joined #salt
19:14 dj_goku joined #salt
19:14 dj_goku joined #salt
19:15 mikecmpbll joined #salt
19:15 druonysus joined #salt
19:16 pipps joined #salt
19:21 moeyebus9 joined #salt
19:21 Kelsar joined #salt
19:25 abednarik joined #salt
19:26 Brew joined #salt
19:26 madboxs joined #salt
19:27 DammitJim I have a good amount of folders to create on different servers
19:28 DammitJim what is the best way to supply this information in pillar for a state to consume that pillar data and create the folders?
19:28 pcdummy Anyone knowing more about that event: https://www.meetup.com/SaltStack-user-group-Salt-Lake-City/events/236081729/ ?
19:28 pcdummy Waiting for a remote link to join it, don't wanna wait forever.
19:29 cyborg-one joined #salt
19:30 wwalker joined #salt
19:30 wwalker is there a way to make a state task run dependent upon filea being older than fileb or filea being non-existant (like make)?
19:31 Kelsar joined #salt
19:31 PatrolDoom maybe using "unless" to run a cmd and go based on that?
19:34 emerson joined #salt
19:34 pipps joined #salt
19:36 cscf wwalker, non-existant can be done by depending on file.missing, but I think you'll need cmd.run for age
19:38 tapoxi easy way for salt-cloud to reboot hosts after provisioning them?
19:39 mavhq joined #salt
19:39 ssplatt salt myhost system.restart ?  something like that
19:40 Kelsar joined #salt
19:40 ssplatt tapoxi: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.system.html#salt.modules.system.reboot
19:40 tapoxi yeah that's what I'm doing but I was hoping it would be baked into the bootstrap script or salt-cloud
19:41 ssplatt you cold make it a reactor
19:41 tapoxi yeah I'll probably do that
19:41 ssplatt so once you get salt/cloud/system/up or whatever the message is, kick off a reboot
19:42 sjohnsen joined #salt
19:43 pipps joined #salt
19:45 DammitJim ugh, how do I iterate through pillar that is like: directory: - mydir - yourdir
19:45 cmarzullo {% for dir in directory %}
19:46 DammitJim cmarzullo, I don't have to do: for dir in pillar.get('directory', {} ).items() ?
19:46 Tanta take off the -
19:46 Tanta make it a real list
19:46 cmarzullo oh sorry I'm so used to doing the map.jinja way
19:46 nickabbey joined #salt
19:46 Kelsar joined #salt
19:46 Tanta if you have single elements you dont need dicts
19:46 cmarzullo but your default for directory is a dictionary not a list
19:46 Tanta oh
19:46 Tanta nevermind
19:47 madboxs joined #salt
19:47 DammitJim cmarzullo, what are you saying, then?
19:47 cmarzullo {% for dir in pillar.get('directory',[]) %}
19:47 DammitJim oh, I don't have to do items, right?
19:47 Tanta not [], {}
19:47 Tanta empty associative array
19:48 cmarzullo isn't directory a list and not dict?
19:48 Tanta and I would throw an '.iteritems()' on the end
19:48 DammitJim that was it, thanks!
19:48 DammitJim no items
19:48 Tanta I did this a lot until I understood Jinja
19:49 Tanta dicts of dicts of dicts, weird loops
19:49 Tanta it's better to focus on the structure of the data first
19:49 wwalker cscf PatrolDoom :  thank you.
19:50 pipps joined #salt
19:50 nickabbey joined #salt
19:53 sh123124213 joined #salt
19:56 om2 joined #salt
19:59 seme joined #salt
19:59 Brew joined #salt
20:02 seme hi guys.. I set up a disk with lvm2 but I'm not sure how to partition and format the disk. I haven't been able to get it done with the blockdev or disk states
20:02 seme and it looks like the parted module might help but I'm not sure I can specify modules like that in my state file unless it is ok to do that with teh cmd state
20:05 pipps joined #salt
20:07 jeffspeff joined #salt
20:07 madboxs joined #salt
20:08 Brew joined #salt
20:08 jeffspeff curious if anyone in here has the link to todays 5.0 online demo
20:08 DammitJim ok, I think I just made this more complicated....
20:09 DammitJim what paste system do we use here in salt?
20:09 fracklen joined #salt
20:11 DammitJim https://gist.github.com/anonymous/ba9190d1ce2299a9196f8e875a7da77c
20:11 gtmanfred jeffspeff: we do not, there were some problems from what I hear
20:11 DammitJim can someone help, please
20:11 spuder joined #salt
20:11 DammitJim basically, how do I access those "subfolders"
20:12 Eugene I like(and own) https://vomitb.in
20:12 Eugene DammitJim - you want to access the Pillar data from your state?
20:13 cscf DammitJim, you are storing your pillar vars as folders:geb2b:subfolders , yet you are iterating over 'folders'
20:13 DammitJim yeah... right now I can access the user, but I can't get to the subfolders
20:13 gtmanfred DammitJim: in that , geb2b is the value in user
20:13 Eugene Yeah, you need to have the key right.
20:13 DammitJim cscf, I will be adding more folders later
20:13 gtmanfred you should do items
20:13 cscf DammitJim, is 'geb2b' a user?
20:13 DammitJim ok, I changed that to use ...'folders', {}).items()...
20:14 DammitJim now I need another for loop to parse through "subfolders"
20:14 DammitJim yes, geb2b is a user that I'm using to set the permissions (user, group)
20:15 pipps joined #salt
20:15 DammitJim basically, how do I address folders.geb2b.subfolders
20:15 Trauma joined #salt
20:15 mavhq joined #salt
20:16 gtmanfred just like that
20:16 gtmanfred pillar.folders.geb2b.subfolders
20:16 spuder joined #salt
20:16 DammitJim but geb2b is a variable in my loop... it's called user
20:17 gtmanfred so? just reference the pillar with user in it
20:17 DammitJim for dirs in user.subfolders doesn't work
20:18 DammitJim do I need to do iteritems or something?
20:18 gtmanfred i left a comment on your gist
20:18 DammitJim ugh, I've done this before, just don't have it clarer in my head
20:18 DammitJim thanks
20:20 DammitJim thanks gtmanfred I was using user, subfolders instead of user, userdict
20:20 DammitJim then on the line below I was just saying for dirs in subfolders
20:20 DammitJim I get it now
20:22 ronnix joined #salt
20:28 madboxs joined #salt
20:30 trent_ joined #salt
20:32 fyb3r joined #salt
20:36 mr_kyd joined #salt
20:37 mr_kyd hi!
20:38 mr_kyd the module pkg still exist ?
20:38 mr_kyd cuz
20:38 mr_kyd salt * sys.doc pkg
20:39 mr_kyd doesnt any happend.
20:42 _JZ_ joined #salt
20:43 ivanjaros joined #salt
20:46 gtmanfred yes it does
20:46 gtmanfred check on your minion using salt-call and see if it throws any errors
20:47 fracklen joined #salt
20:49 madboxs joined #salt
20:49 druonysus joined #salt
20:51 _Cyclone_ joined #salt
20:53 mr_kyd gtmanfred: thanks!
20:55 sh123124213 joined #salt
20:58 darthzen joined #salt
20:59 SamYaple hello. for setting up clusters of things with salt formulas, is it common/expected to list out all hosts like https://github.com/zulily/mariadb-galera-server-formula/blob/master/pillar.example#L8-L29
20:59 SamYaple ive seen it other places to, but it doesnt seem very dynamic
21:00 lionel joined #salt
21:00 PatrolDoom well it is a cluster
21:01 PatrolDoom does the software itself support "dynamic" clustering or w/e youre wanting to achieve
21:02 SamYaple it supports dynamically adding and removing nodes, sure. but the config file itself has a list of expected nodes that should be active when the process starts
21:02 PatrolDoom indeed thus is that what this formula is attempting to do?
21:03 PatrolDoom so the formula is for initial state mgmt. from there you manage your software/env as however you deem fit
21:03 PatrolDoom just be aware if the state doesn't match reality, you may have issues w/ highstating
21:03 PatrolDoom erm runnign that state on w/e nodes in the cluster
21:04 SamYaple oh no, im sure that formula works fine. but just curious asking if _that_ is expected, versus looking up this information from __salt__['mine.get']('role:mariadb') or something
21:05 PatrolDoom ah, well you may want to fork the formula to be able to pull from a dynamic backend
21:05 bltmiller joined #salt
21:05 AndreasLutro mine data can be faked so it's somewhat less secure, and not always 100% reliable, but yes, we do use it for crude service discovery
21:07 SamYaple AndreasLutro: is that considered a bad thing? to use it in such a way
21:07 AndreasLutro doubt it, you just have to be aware of the dangers and caveats
21:08 SamYaple see ive got a working Mariadb+Galera role myself. Ive been messing around as a test, learning saltstack and stuff. Ive been having trouble with orchestration and im pretty sure im abusing salt states
21:08 SamYaple im just trying to acomplish this in the best way possible
21:09 AndreasLutro personally I use mine.get but make it possible to manually override with pillars
21:09 SamYaple AndreasLutro: ah. that seems like a reasonable compromise. I like that
21:10 madboxs joined #salt
21:11 SamYaple in the case of galera, its a bit complicated. if all nodes are stopped, i need to check the contents of a file on each host and run a special state on the host with the highest number based on the files.
21:12 SamYaple so if i have three nodes with values 2 2 and 3, and all the services are stopped, i would need to start 3 first with a special param. having trouble determining the best way t odo that
21:12 SamYaple i have accomplished it, but im not super happy with teh results
21:12 bltmiller joined #salt
21:12 SamYaple or the means in which I have accomplished it
21:13 AndreasLutro that's quite complex, I'd probably end up writing a custom runner for the whole process
21:14 SamYaple AndreasLutro: can the runner check files on the minions? doesnt the runner run on the master itself?
21:14 AndreasLutro it runs on the master, but can run execution modules on arbitrary minions
21:15 SamYaple and said modules can check these files. so i can reuse the ones ive already made
21:15 SamYaple ok. so that might be the best path forward
21:16 SamYaple AndreasLutro: for refernce, this is the awfulness that _actually_ works that I hate and want to not do. https://github.com/SamYaple/kolla-salt/blob/983be2b039291f9410dcbca6c42a3a932e9b208b/salt/kolla/mariadb/bootstrap.sls
21:16 SamYaple a runner might solve this for me. i hadnt considered it before (still reasonable new to salt)
21:19 pipps joined #salt
21:29 KennethWilke joined #salt
21:31 madboxs joined #salt
21:32 PatrolDoom joined #salt
21:32 Miouge joined #salt
21:45 jas02 joined #salt
21:51 madboxs joined #salt
21:56 Sketch joined #salt
21:59 raspado does deleting a host via salt-cloud -d option remove the minion key as well?
21:59 hemebond raspado: Should do.
21:59 raspado I dont see the deleted host in salt-run manage.status
22:00 raspado oh very cool, yeah i couldnt find any documentation if deleting the host also removes the key
22:00 raspado but it appears that it does
22:02 Vaelatern Bug: When passed -C, boostrap_salt.sh still fails if it doesn't find dependency installation functions.
22:03 Vaelatern I speak specifically of https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
22:05 pipps99 joined #salt
22:08 rml joined #salt
22:09 tapoxi SamYaple: I use a runner for deployments it's way easier
22:10 tapoxi I only use states for maintaining systems
22:10 gtmanfred SamYaple: check out the orchestrate runner
22:11 SamYaple gtmanfred: yes i use it, it doesnt help so much here
22:12 home01 joined #salt
22:12 madboxs joined #salt
22:13 gtmanfred ahh ok
22:14 gtmanfred SamYaple: are you trying to get dynamic data from other minions?
22:15 rml joined #salt
22:15 SamYaple gtmanfred: in this specific example, yes. /var/lib/mysql/grastate.dat contains a number that I need to fetch and examine before proceeding
22:15 gtmanfred check out the peering system https://docs.saltstack.com/en/latest/ref/peer.html
22:16 gtmanfred it can do live checks, instead of only looking in the mine
22:16 SamYaple ok gtmanfred. im not familiar with it. im digging into runners and peer now. thank you!
22:16 gtmanfred no problem!
22:17 gtmanfred Where are you working at now?  If you don't remember me, we were at that one epic bonus dinner where you fake stole kevins wallet
22:17 SamYaple gtmanfred: that was pretty funny
22:18 gtmanfred until kevin tried to kill me it was :P
22:18 SamYaple he tried to do the same to me. we had all had a bit o' alcohol
22:18 SamYaple i still work at RAX
22:18 gtmanfred :D
22:18 gtmanfred ahh cool
22:18 SamYaple or should I say, im back at rax
22:18 gtmanfred ahh right, i thought you had left
22:19 gtmanfred I left for Salt back in March of last year
22:19 SamYaple congrats. i really like saltstack
22:19 gtmanfred Same
22:20 home01 left #salt
22:20 SamYaple i was trying to use it for orchestration stuff before orchestration runner was a thing. and the thing before just wasnt quite there yet. so i had to switch to ansible. now im back because i really didnt like ansible and saltstack has all the things i need now
22:20 gtmanfred overstates?
22:20 SamYaple yea those
22:20 gtmanfred yeah those werent great
22:20 SamYaple this would have been about 2 years ago
22:20 SamYaple yep
22:20 gtmanfred yup, i remember using overstates
22:21 gtmanfred https://github.com/gtmanfred/salt-states/blob/oldmaster/overstate.sls
22:22 dimeshake same
22:23 gtmanfred dimeshake: hey buddy!
22:23 dimeshake howdy!
22:25 cachedout joined #salt
22:30 SamYaple can salt formulas include custom runners/modules/states?
22:30 SamYaple i spot checked, but i didnt see any formulas taht had those
22:32 heaje joined #salt
22:33 madboxs joined #salt
22:34 pipps joined #salt
22:37 gtmanfred yes
22:37 gtmanfred starting with 2016.11 at least
22:38 gtmanfred SamYaple: https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.saltutil.html
22:38 gtmanfred sorry, you can do modules and states in older versions, 2016.11 added runners
22:38 gtmanfred you can put _modules and _states and all the other module_dirs in any of the external fileservers
22:39 gtmanfred a formula is basically just a gitfs remote fileserver
22:41 Sketch joined #salt
22:42 spuder joined #salt
22:42 SamYaple joined #salt
22:43 SamYaple gtmanfred: sorry. dropped for a bit. checking logs for what you said
22:43 gtmanfred lemme know what the last message you saw was
22:44 DEger joined #salt
22:44 SamYaple pretty sure i got it all
22:44 SamYaple 22:41 <@gtmanfred> a formula is basically just a gitfs remote fileserver
22:44 SamYaple that answers the question
22:45 SamYaple i think i can make a non-awful galera orchestration for saltstack using docker
22:45 SamYaple which was my goal
22:45 gtmanfred yup, that was the last of it
22:47 DEger joined #salt
22:54 madboxs joined #salt
22:54 pipps joined #salt
22:56 gtmanfred 8 bays
22:57 gtmanfred ...
22:57 SamYaple 10 bays!
22:57 gtmanfred lol
22:57 gtmanfred that was the wrong channel
22:57 fyb3r 4 bays :(
22:57 gtmanfred I just bought a whole bunch of new drives to finish filling out my NAS Today
22:58 SamYaple nice!
22:58 SamYaple i gave up my nas
22:59 SamYaple i run 3 servers for openstack with ceph for storage
23:01 pipps joined #salt
23:03 prg3 joined #salt
23:06 fyb3r left #salt
23:09 sh123124213 joined #salt
23:10 gtmanfred aight, i gotta move some laundry to the dryer, and get dinner started! cyall tomorro
23:10 SamYaple o/
23:15 madboxs joined #salt
23:17 prg3 joined #salt
23:19 bltmiller joined #salt
23:20 onlyanegg joined #salt
23:21 dps joined #salt
23:22 abednarik joined #salt
23:23 dijit joined #salt
23:24 jas02 joined #salt
23:25 khaije1 joined #salt
23:25 khaije1 joined #salt
23:25 khaije1 joined #salt
23:27 khaije1 I'm trying to collection some grains values from a sub-shell for a larger command. Is there a tidy way to extract just the value?
23:27 druonysus joined #salt
23:30 amontalban joined #salt
23:30 amontalban joined #salt
23:32 nZac joined #salt
23:35 madboxs joined #salt
23:36 onlyanegg joined #salt
23:42 jas02 joined #salt
23:44 SamYaple gtmanfred: so peer/publish is working for me. without salt.mine. which is a huge plus. im trying to make it more... reusable/standard now
23:45 hemebond I thought peer/publish wasn't really used now.
23:45 SamYaple hemebond: :( it was just recommended to me
23:45 SamYaple its way better than using salt.mine for this paritcular point
23:46 onlyanegg joined #salt
23:50 fracklen joined #salt
23:54 mdk194 joined #salt
23:56 madboxs joined #salt

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