Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-07-12

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

All times shown according to UTC.

Time Nick Message
00:01 Laserwhit Ok, thanks, I thought it might be something like that but I found docs that seems to indicate it was available in 2015.5.0.  Oh well.
00:01 whytewolf beacons functionality was available, but the beacons module wasn't
00:01 whytewolf we had to hand configure that stuff back then
00:01 Laserwhit Oh, makes sense
00:01 whytewolf in the olden days
00:03 Laserwhit Next question, if I'm running on system that install 2015.5.10 by default (centos 6.7 and up) is it a problem to try and upgrade?
00:03 Laserwhit systems
00:04 Laserwhit Or will I find myself with compatibility problems in general?
00:04 whytewolf well master should be updated first. but you should build a test system to run your states through. see if there is anything that might getcha cause there are a lot of differences
00:12 thinkt4n_ joined #salt
00:15 hatifnatt hemebond: Yes I can add require or require_in with extend but with state.show_sls --out=yaml I can't see any changes in order
00:16 hemebond That seems odd.
00:19 whytewolf hatifnatt: try show_low_sls instead of show_sls
00:19 cyborg-one joined #salt
00:19 waynr i'm having trouble finding in the pillar documentation whether or not list values are supported....i guess i could just try it
00:21 citaret joined #salt
00:21 hemebond waynr: Yes, you can use lists in pillars.
00:22 waynr hemebond: thanks
00:22 hatifnatt whytewolf: same order in show_low_sls
00:22 whytewolf hatifnatt: are you looking at the order they are listed in or at the order field?
00:23 hatifnatt whytewolf: order field
00:23 whytewolf humm.
00:24 whytewolf that doesn't sound right.
00:24 hatifnatt whytewolf: wait I need to re-check
00:26 hatifnatt whytewolf: nope same order in show_sls and in show_low_sls
00:27 whytewolf humm, still doesn't sound right. like a buggy thing that should have a bug report
00:27 whytewolf require should recalc order.
00:28 hatifnatt If I change order of include, I see changes in order but according to the documentation I can't rely on that.
00:28 whytewolf you can't
00:29 lorengordon joined #salt
00:29 hatifnatt Looks like if I need guaranteed order of execution I need to create one big sls.
00:29 hemebond That shouldn't be the case.
00:30 hemebond Which version of Salt?
00:30 whytewolf require should defintly gerantee order. if it isn't then it is a bug
00:31 hemebond Does the output show your altered dependencies?
00:31 hatifnatt I can split in smaller files but still need cross files require that mean I can't run them as separate states.
00:31 hatifnatt hemebond: version is  2016.11.6
00:33 pabloh007fcb Hello everyone, I have an error I'm getting on a beacon file im trying to load on the salt-minion here is the error when I run the minion with  debug >> config[service]['oncleanshutdown'] = False TypeError: 'str' object does not support item assignment
00:34 ecdhe joined #salt
00:34 ecdhe joined #salt
00:34 pabloh007fcb this is the beacons file https://gist.github.com/pabloh007/6d39ac7de670eed1783558701ce3cb11
00:39 whytewolf pabloh007fcb: that looks like an error to report.
00:40 whytewolf since you are not setting oncleanshutdown it is trying to be set https://github.com/saltstack/salt/blob/v2016.11.6/salt/beacons/service.py#L91 here. however something doesn't like that assignment
00:40 hatifnatt hemebond: there is example https://gist.github.com/hatifnatt/19d3fc037e62a2f9d037b2d627ecef53
00:40 woodtablet left #salt
00:43 pabloh007fcb <whytewolf> thanks im wondering if it has to do with the python version
00:43 whytewolf what version of python are you on?
00:43 pabloh007fcb I have another salt-minion running with beacons working correctly
00:44 pabloh007fcb 2.7.12 is where I get the error and 2.7.5 is where I get no errors
00:45 Guest73 joined #salt
00:46 hatifnatt hmm looks like __run_num__ have correct values respecting to requires
00:47 hemebond hatifnatt: Why are you using test=True?
00:47 whytewolf hehe didn't notice that with the show_sls
00:47 hemebond (just out of curiosity)
00:48 whytewolf defintly not something to use for a show
00:48 hemebond So extend is listed separately.
00:48 whytewolf personally not a fan of test=True anyway. it blocks some things to much, and doens't block other things enough
00:49 hatifnatt hemebond: Just too lazy to erase, I think it doesn't change anything.
00:49 hemebond I wonder if this does not actually show the final execution order, just the initial order and extend modifies it later.
00:49 whytewolf hatifnatt: it does
00:49 hemebond I mean, I use extend a lot these days and it's worked so far.
00:49 hemebond Also, I don't normally put the module function in the extend, e.g., service: instead of service.running:
00:50 hatifnatt whytewolf: but not in this case
00:50 onlyanegg joined #salt
00:52 hemebond What about state.show_lowstate?
00:52 hemebond That shows the final state of ... states... yeah?
00:53 whytewolf if he is going to be doing this as a highstate run. that was what the show_low_sls shows is the single states lowstate
00:54 hatifnatt May be I'm just moving in wrong direction. Idea is to create separate states which i can run manually or from other states, and some 'top state' in this case 'init.sls' where I can manipulate with order.
00:56 hemebond I can't get show_low_sls to show my extend. Probably not working properly because of my envs.
00:58 hatifnatt I.e. I want to install haproxy service from some 'role' state, but I don't want to start this service so I include 'service.haproxy.install'.
01:01 hatifnatt hemebond: I can't see extend in my show_low_sls too.
01:04 hemebond There's something wrong with my extend I think. Even show_highstate doesn't list it.
01:05 hemebond Actually it doesn't list any of the dependencies created by extend.
01:07 jeddi joined #salt
01:13 hatifnatt As conclusion I can see __run_num__ changes to correct order if I use extend with require I can see it if I'm running state.sls statename test=True --out=yaml but state.show_sls or state.show_low_sls display same order with or without extend.
01:14 hemebond Okay so the show_* functions don't take extends into account.
01:14 hatifnatt It seems like that.
01:14 masuberu joined #salt
01:18 hatifnatt hemebond: thaks for advice!
01:21 Guest73 joined #salt
01:34 swa_work joined #salt
01:49 ilbot3 joined #salt
01:49 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.6 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers <+> The call for speakers for SaltConf17 is now open: http://tinyurl.com/SaltConf17
01:51 hojgaard joined #salt
01:53 hemebond hatifnatt: show_lowstate works.
01:57 masber joined #salt
02:01 hojgaard joined #salt
02:02 thinkt4nk joined #salt
02:06 mk-fg joined #salt
02:06 mk-fg joined #salt
02:09 cyborg-one joined #salt
02:10 fogus joined #salt
02:11 pmcg joined #salt
02:12 nicksloan joined #salt
02:14 dxiri joined #salt
02:16 zerocoolback joined #salt
02:36 Guest73 joined #salt
02:42 Score_Under joined #salt
02:43 joe_n joined #salt
02:44 nixjdm joined #salt
02:54 onlyanegg joined #salt
02:57 PatrolDoom joined #salt
03:13 edrocks joined #salt
03:35 justanotheruser joined #salt
03:42 rpb joined #salt
03:46 donmichelangelo joined #salt
03:53 Guest73 joined #salt
03:56 dxiri joined #salt
03:59 evle joined #salt
04:06 tobstone joined #salt
04:29 jas02 joined #salt
04:32 dxiri_ joined #salt
05:15 edrocks joined #salt
05:19 tobstone joined #salt
05:20 Diaoul joined #salt
05:29 jas02 joined #salt
05:31 icebal joined #salt
05:38 Bock joined #salt
05:46 Guest73 joined #salt
05:49 darioleidi joined #salt
06:00 kerrick joined #salt
06:06 jas02 joined #salt
06:08 jeddi joined #salt
06:29 Tucky joined #salt
06:44 karlthane joined #salt
07:11 jas02 joined #salt
07:13 jas02_ joined #salt
07:16 N-Mi joined #salt
07:16 N-Mi joined #salt
07:17 edrocks joined #salt
07:17 jas02 joined #salt
07:21 beardedeagle joined #salt
07:26 N-Mi_ joined #salt
07:28 Trauma joined #salt
07:29 jas02 joined #salt
07:31 usernkey1 joined #salt
07:33 felskrone joined #salt
07:35 usernkey joined #salt
07:35 Guest73 joined #salt
07:36 Ricardo1000 joined #salt
07:41 preludedrew joined #salt
07:42 darioleidi joined #salt
07:42 jas02 joined #salt
07:44 aldevar joined #salt
07:48 aldevar joined #salt
07:50 pualj joined #salt
07:53 mikecmpbll joined #salt
07:55 N-Mi_ joined #salt
07:56 LeProvokateur joined #salt
07:57 gnomethrower joined #salt
07:58 coredumb Morning
07:58 coredumb does the file.absent support regex?
08:01 N-Mi_ joined #salt
08:02 Rumbles joined #salt
08:06 jas02 joined #salt
08:41 mbuf joined #salt
08:47 dxiri joined #salt
08:55 jhauser joined #salt
08:56 rotia joined #salt
09:01 pbandark joined #salt
09:04 dyasny joined #salt
09:22 c06 joined #salt
09:22 c06 hi all
09:23 c06 i trying to access my pillar data(list) in jinja2 templates and traversing. for loop taking it whole list as string
09:28 coredumb 09:58       coredumb | does the file.absent support regex? < it's not btw
09:28 coredumb :D
09:29 coredumb c06: can you paste an example of your pillar and jinja code?
09:29 c06 2 mins
09:29 c06 coredumb: ^^
09:32 c06 coredumb: https://pastebin.com/JwCTgSSE
09:33 c06 if i use {{ pillar['option_data'] }} -> am getting ['a','b','c','d'].. but in for loop its pasring as string
09:34 coredumb simple try
09:34 coredumb for i in pillar['option_data']
09:34 coredumb what does that get you?
09:36 c06 option [ .. option ' .. option a.. option '.............................option ]
09:37 c06 coredumb: its printing in new line so option [ then option '
09:37 coredumb your pillar is in yaml right?
09:37 coredumb that's not how you do a lit in yaml
09:38 c06 coredumb: the whole thing its taking as string and do traversing, its not considering as dictionary.. and if i use pillar.get().items its not reading
09:38 coredumb https://pastebin.com/aGnJCeLE
09:38 coredumb s/lit/list/
09:39 c06 sorry i am understand s/li
09:39 coredumb 11:37       coredumb | that's not how you do a lit in yaml < I meant list no lit  :)
09:40 coredumb https://pastebin.com/12YTZmSV < also if expecting a list your default shouldn't be a dict. [] instead of {}
09:40 c06 ok let me try both
09:41 c06 coredumb: i will ping once i got result
09:41 coredumb the default change will only matter if the pillar is empty
09:41 coredumb I just think it's cleaner though
09:42 coredumb option_data: ['a','b','c','d'] declares ['a','b','c','d'] as a scalar
09:42 rpb joined #salt
09:42 coredumb so it makes sense you had your strin result
09:44 c06 coredumb: nice explanation dude..
09:45 c06 once min let me try both dude
09:45 coredumb and I meant string not strin
09:45 coredumb can't type this morning
09:45 N-Mi_ joined #salt
09:46 mbuf joined #salt
09:46 c06 hahaha
09:46 c06 no issue dude
09:48 ccha I have a file in pillar, in state how can I check if this file exists ?
09:49 coredumb ccha: by file you mean file path? or?
09:49 ccha yes file path
09:49 coredumb ccha: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.exists guess this should help you
09:50 evle joined #salt
09:50 ccha coredumb: the file is not on minion
09:50 ccha only in pillar folder
09:50 ccha and pillar git
09:51 coredumb you mean the file path?
09:51 coredumb what do you use the file path for then?
09:51 coredumb or you mean to check if the pillar exists?
09:52 ccha I create a file in pillar folder for states.ssh_auth source
09:53 ccha I have a dict with user name, I did a loop for each user and check if there is key file, it use the state
09:53 coredumb ccha: {% if pillar[xxx] is defined %} ?
09:54 ccha the file is not in pillar/top.sls
09:54 ccha it is not a variable
09:55 ccha it's a plain text file
09:55 ccha maybe I should not put in pillar
09:55 ccha but n salt/
09:56 coredumb can't fathom what you're trying to do/doing :)
10:00 ccha coredumb: https://gist.github.com/anonymous/133df8fad398a2290ef8d8447a7733ca
10:03 coredumb ah you mean ensure that the key exists in salt://
10:03 coredumb no idea
10:03 Trauma joined #salt
10:05 ccha yes
10:06 ccha I want to put le if the file exists
10:11 evle joined #salt
10:11 dyasny joined #salt
10:19 edrocks joined #salt
10:24 smartalek joined #salt
10:34 jas02 joined #salt
10:39 kedare joined #salt
10:50 usernkey1 joined #salt
10:51 Ricardo1000 joined #salt
10:58 jas02 joined #salt
10:58 zerocoolback joined #salt
10:59 aldevar joined #salt
11:10 c06 joined #salt
11:15 goutham joined #salt
11:24 CrummyGummy joined #salt
11:37 thinkt4nk joined #salt
11:39 thinkt4n_ joined #salt
11:48 kedare joined #salt
11:51 gmoro_ joined #salt
11:59 zerocoolback joined #salt
12:05 Rumbles joined #salt
12:16 BHauser joined #salt
12:20 BHauser Hi all, what is the proper way to send information to the saltmine from a statefile? (I have defined a kubernetes.master state and now i want to publish some information about the master to use in the kubernetes.node state).
12:21 BHauser :s/\ master\ /kubernetes\ master/
12:22 shengis joined #salt
12:22 padthai joined #salt
12:24 c06 left #salt
12:26 cyborg-one joined #salt
12:31 pualj_ joined #salt
12:34 cgiroua joined #salt
12:40 Krumkake joined #salt
12:40 ArawN joined #salt
12:40 aldevar joined #salt
12:40 ArawN Hello...
12:40 rylnd_ joined #salt
12:40 djural_ joined #salt
12:40 cliluw joined #salt
12:40 ArawN I am looking for some advices regarding the renaming and netw config update after a salt-cloud clone of a QEMU vm, does enyone has a best practices ?
12:40 tedski_ joined #salt
12:40 johtso_ joined #salt
12:40 ArawN I mean renaming and updating net config using salt ....
12:41 Vye joined #salt
12:41 colttt joined #salt
12:41 bigjazzsound joined #salt
12:41 aarontc joined #salt
12:41 esharpmajor joined #salt
12:41 ujjain joined #salt
12:41 ujjain joined #salt
12:42 defswork joined #salt
12:42 kuromagi joined #salt
12:42 yidhra joined #salt
12:42 gtmanfred joined #salt
12:42 PIerB joined #salt
12:42 gmacon joined #salt
12:43 ArawN q
12:43 wych joined #salt
12:43 valkyr2e joined #salt
12:45 spicyJalepeno joined #salt
12:45 pualj joined #salt
12:46 ksa joined #salt
12:46 J0hnSteel joined #salt
12:46 PIerB Helllo,
12:47 PIerB I need to update the hostname and network config after a QEMU cloning, does anyone has a good tip to handle this using salt ?
12:48 jdipierro joined #salt
12:48 gord0 joined #salt
12:49 eichiro joined #salt
12:52 noobiedubie joined #salt
12:52 shengis joined #salt
12:52 UForgotten joined #salt
12:55 tom29739 joined #salt
12:57 ssplatt joined #salt
12:59 Rubin joined #salt
13:05 edrocks joined #salt
13:12 fatal_exception joined #salt
13:15 Naresh joined #salt
13:16 mikecmpb_ joined #salt
13:17 edrocks_ joined #salt
13:18 nicksloan joined #salt
13:19 edrocks joined #salt
13:22 toanju joined #salt
13:26 rotia left #salt
13:27 Vaelatern joined #salt
13:31 racooper joined #salt
13:38 zer0def quick question - is the bug with a looping ref-check in `git.latest` over https known?
13:41 censorshipwreck joined #salt
13:45 dxiri joined #salt
13:45 evle joined #salt
13:57 zerocool_ joined #salt
14:02 dxiri joined #salt
14:05 ecdhe_ joined #salt
14:06 LeProvokateur joined #salt
14:11 cgiroua joined #salt
14:14 nicksloan left #salt
14:24 thinkt4nk joined #salt
14:28 kjsaihs joined #salt
14:33 _JZ_ joined #salt
14:36 astronouth7303 joined #salt
14:36 hillna joined #salt
14:37 Brew joined #salt
14:37 thinkt4n_ joined #salt
14:40 cyteen joined #salt
14:43 PatrolDoom joined #salt
14:45 edrocks joined #salt
14:47 thinkt4nk joined #salt
14:48 eichiro joined #salt
14:55 sjorge joined #salt
15:01 jdipierro joined #salt
15:12 morissette joined #salt
15:17 lordcirth_work joined #salt
15:21 thinkt4nk joined #salt
15:28 sarcasticadmin joined #salt
15:28 dxiri joined #salt
15:30 Guest73 joined #salt
15:47 woodtablet joined #salt
15:49 edrocks joined #salt
16:06 bildz joined #salt
16:13 dynamicudpate joined #salt
16:13 MTecknology I get to learn about extend today!
16:17 cyborg-one joined #salt
16:20 bildz has anyone worked with integrating Jira and saltstack?
16:22 noobiedubie bildz what do you need?
16:24 evle2 joined #salt
16:25 bildz noobiedubie: a starting point for working on the integration
16:26 noobiedubie bildz: integration? meaning installation? you looking to actually like create and manage projects?
16:26 bildz noobiedubie: more around using a self service portal where you can schedule tasks and kick them to salt to manage the workflow
16:28 noobiedubie bildz: o jeeze I mean it's doable using webhooks in jira and runners in salt but man that's no small task
16:28 bildz i realize this
16:29 thinkt4n_ joined #salt
16:30 noobiedubie bildz: you first you'd have to setup a listener for salt, which triggers a runner script of you choosing based on the webhook payload
16:31 noobiedubie bildz: then you'd need to some trigger in salt (could be in same runner script) to make a jira api call to move your workflow foreward
16:33 bildz noobiedubie: thank you!  that is definiltey a good starting point
16:34 bildz noobiedubie: i know what to go off and research
16:34 noobiedubie no problem best of luck
16:36 jas02 joined #salt
16:37 jas02_ joined #salt
16:39 beardedeagle joined #salt
16:39 racooper joined #salt
16:40 iggy coredumb: no, but it does support `- names:`
16:40 coredumb :D
16:40 dxiri joined #salt
16:41 coredumb iggy: I've seen but I don't know exact names :(
16:41 coredumb I've worked around with a cmd.run + onlyif btw
16:42 iggy you could get a list from file.readdir
16:43 jas02 joined #salt
16:43 iggy but if you've got it fixed...
16:44 mikecmpbll joined #salt
16:51 jas02 joined #salt
16:52 jas02 joined #salt
16:54 dxiri joined #salt
16:54 jas02 joined #salt
16:55 jas02_ joined #salt
17:01 jdipierro joined #salt
17:04 astronouth7303 bildz: the HTTP API (salt-api) has a webhook endpoint that takes the payload and dumps it to the event bus
17:04 astronouth7303 where reactor (or maybe something else) can handle it
17:05 jas02 joined #salt
17:06 jas02_ joined #salt
17:07 edrocks joined #salt
17:11 bildz astronouth7303: thank you!
17:12 astronouth7303 of course, i'm using a tiny Flask (Python) app to handle webhooks from our gitlab instance, and it only tosses a few things in salt's direction
17:12 wendall911 joined #salt
17:14 MTecknology I used a git post-commit hook to read the commit and decide which host/env should run a highstate from that and had it run a custom saltevent script via sudo that did a little bit more sanity checking before pushing the event to the master
17:15 jimklo joined #salt
17:15 ChubYann joined #salt
17:15 bildz MTecknology: pretty slick
17:18 spicyJalepeno joined #salt
17:20 jas02 joined #salt
17:21 Edgan joined #salt
17:29 smartalek Hello All, anyone ever use match.filter_by to look for a grain or glob? The default match is suppose to be compound but using the "G@" syntax it's missing the grain I have set.
17:31 jas02 joined #salt
17:32 MTecknology wouldn't match.grain make more sense?
17:33 jas02 joined #salt
17:34 smartalek it would, but if the grain is missing I have two globs that I'd like it to try and match.
17:35 iggy smartalek: gist code?
17:35 jas02_ joined #salt
17:36 jas02__ joined #salt
17:38 smartalek https://gist.github.com/alektant/50ad6de9ad909364890eb935f973c9e6
17:42 whytewolf smartalek: i know it says it defaults to compound... but just in case. try actually setting the expr_form to compound
17:42 iggy and grains.get roles:consul:bootstrap on the minion in question is something other than False?
17:43 whytewolf also. does that target work to select a minion?
17:43 PatrolDoom joined #salt
17:47 smartalek whytewolf: tried setting expr_form and minion_id explicity with no change in operation.
17:48 smartalek iggy: the minion in question is the only one that has the bootstrap grain, but it is not getting the values from that key.
17:49 iggy what is the bootstrap grain set to?
17:50 iggy or is roles:consul = bootstrap?
17:50 smartalek iggy: yes, roles:consul = bootstrap
17:51 iggy I guess that should work
17:51 iggy I mean afaik, it should, I can't think of any reason not to
17:51 whytewolf i would still make sure it targets.
17:51 whytewolf if it doesn't work with -C then it won't work in match
17:53 jas02 joined #salt
17:53 whytewolf if it does work. try negetaing it in the other settings
17:53 smartalek whytewolf: Just tested targeting with test.ping…it works.
17:54 iggy if it's in pillar data, I know there's some oddities due to pillar being rendered on the master, but I feel like they would have thought of that
17:54 whytewolf yeah, my testing with match modules show they work fine in pillar.
17:54 jas02 joined #salt
17:54 whytewolf I'm wondering if this is a case of last item wins
17:54 whytewolf and since last item is '*'
17:55 whytewolf which is why i sugested the negeating it
17:58 kerrick joined #salt
18:00 darioleidi joined #salt
18:01 mpanetta joined #salt
18:02 dxiri joined #salt
18:02 jas02 joined #salt
18:04 xDamox joined #salt
18:07 jas02 joined #salt
18:08 druonysus joined #salt
18:08 druonysus joined #salt
18:08 druonysus_ joined #salt
18:09 noobiedubie joined #salt
18:09 hoonetorg joined #salt
18:10 jas02_ joined #salt
18:11 teratoma joined #salt
18:12 astronouth7303 ooo 2017.7.0 got tagged. Waiting for the release notes/changelog
18:16 jas02 joined #salt
18:21 whytewolf astronouth7303: it is a major release. and i doubt they are going to only have 1 rc
18:23 jas02 joined #salt
18:23 astronouth7303 it's tagged as v2017.7.0, not v2017.7.0rc2
18:24 jas02_ joined #salt
18:25 pabloh007fcb Hello everyone, quick question, is it possible to use pillars inside of reactor files? specifically the reactor that responds once an event is triggered?
18:26 whytewolf astronouth7303: i know. just saying i don't think it is the end of the rc's yet
18:26 whytewolf i'm not going to hold my breath that the wait is over.
18:27 astronouth7303 pabloh007fcb: ??? they do entirely different things
18:27 darioleidi joined #salt
18:27 astronouth7303 oh, nvm, misread it
18:30 pabloh007fcb Im trying to use it but it says pillar not found
18:30 pabloh007fcb I can use it all over different states and is working fine
18:30 whytewolf pabloh007fcb: no. you can't use pillar
18:30 whytewolf reactor is rendered on the master
18:30 whytewolf not the minion
18:30 whytewolf other states are rendered on the minion
18:31 pabloh007fcb thanks whytewolf
18:32 aldevar joined #salt
18:32 astronouth7303 hm. it looks like orchestrate and reactor sls is annoyingly different. :/
18:32 cyteen joined #salt
18:34 whytewolf astronouth7303: they were built at different times for different purpases by different people. it kind of makes sense they are different.
18:34 whytewolf orchestration is more state like in it's structure. and even can be run as a state on the master.
18:34 astronouth7303 there's historical reasons for them to be different, but that doesn't mean they have actual UI/UX reasons to be different
18:35 whytewolf they function on compleatly different types of data. so yes
18:35 whytewolf there is
18:35 pabloh007fcb what im trying to do is target the minion id to use a specific environment. so I had a list of servers on pillar file and upon match use the environment on the pillar. Perhaps a better way would be to use grains?
18:35 astronouth7303 pabloh007fcb: grains are per-minion, too
18:36 jas02 joined #salt
18:36 astronouth7303 pabloh007fcb: you need to know what minions to target and then run a state on them
18:37 whytewolf pabloh007fcb: nodegroups might be your friend
18:37 nixjdm joined #salt
18:38 pabloh007fcb thanks whytewolf ill look into that
18:41 NeoXiD joined #salt
18:49 eichiro joined #salt
18:51 mugundan joined #salt
18:55 jas02 joined #salt
18:56 jas02 joined #salt
18:56 Trauma joined #salt
18:56 chrysanthemum_ joined #salt
18:59 dxiri joined #salt
19:01 DoomPatrol joined #salt
19:02 kerrick joined #salt
19:05 preludedrew joined #salt
19:08 PatrolDoom joined #salt
19:10 PatrolDoom left #salt
19:11 darioleidi joined #salt
19:13 edrocks joined #salt
19:25 wlfyit joined #salt
19:27 nixjdm joined #salt
19:28 raspado joined #salt
19:31 Awesomecase joined #salt
19:35 oida_ joined #salt
19:37 wlfyit joined #salt
19:45 englishm_work joined #salt
19:45 DoomPatrol joined #salt
19:49 wlfyit joined #salt
19:53 kerrick joined #salt
19:54 vaelen joined #salt
19:57 vaelen joined #salt
19:58 vaelen joined #salt
19:59 kerrick joined #salt
20:00 smartalek joined #salt
20:01 scelestic joined #salt
20:07 wlfyit joined #salt
20:09 ecdhe_ left #salt
20:10 ecdhe joined #salt
20:10 ecdhe joined #salt
20:13 preludedrew joined #salt
20:26 dxiri joined #salt
20:27 nixjdm joined #salt
20:30 jas02 joined #salt
20:33 xet7 joined #salt
20:35 onlyanegg joined #salt
20:54 onlyanegg joined #salt
20:58 kerrick joined #salt
21:00 kerrick_ joined #salt
21:00 jimklo joined #salt
21:07 edrocks joined #salt
21:16 pabloh007fcb not sure if this is the right place about questions of salt.dockerng module
21:17 pabloh007fcb if anyone knows, im trying to run a container with the argument of '--ip' using a docker defined network.  however I dont see this parameter on the dockerng.running state
21:17 pabloh007fcb I tried using something the kwargs to pass it but its not there.
21:19 astronouth7303 pabloh007fcb: how are you calling it?
21:19 scottk_ joined #salt
21:20 scottk_ I want to run in a state the execution module system.reboot if win_wua.get_needs_reboot returns True. How is the best way to do this?
21:25 pabloh007fcb hi astronouth7303 Im using the following state. to check if its running.  https://gist.github.com/pabloh007/d507e19d90302ddb120d10cfa56bf386
21:25 pabloh007fcb I use  salt '*' state.highstate
21:26 astronouth7303 kwargs is `**kwargs`, meaning that if running takes `ip` (i'm not sure it does), it'll be top-level, next to `network_mode`, `detach`, etc
21:26 jas02 joined #salt
21:27 nixjdm joined #salt
21:27 astronouth7303 what you've declared would have kwargs={'kwargs': {'ip': '172.18.0.2'}}
21:28 whytewolf pabloh007fcb: this bug report seems to indacat that something called connect_container_to_network is what you want to investigate. https://github.com/saltstack/salt/issues/39126
21:28 wlfyit joined #salt
21:29 pabloh007fcb yeah whytewolf that's what im looking for. Thanks
21:29 pabloh007fcb Ill look into that
21:30 spicyJalepeno has anyone ever seen anything like this in their master logs? I have the id set in the minion config, and a grains.get id returns the proper id, but whne starting the master i see this: [DEBUG   ] Guessing ID. The id can be explicitly set in /etc/salt/minion    [DEBUG   ] Found minion id from generate_minion_id(): salt.master.local
21:31 spicyJalepeno then later in my logs i see this and i dont even have a minion with this id. a pillar.items for the master returns fine and a highstate returns fine: [ERROR   ] Pillar rendering failed for minion salt.master.local_master:
21:32 spicyJalepeno i am also seeing this, but all my minions render the top file fine: [CRITICAL] Pillar render error: Rendering Primary Top file failed, render error:
21:34 whytewolf are you running a dev version or something. that looks like your salt-master is trying to act as a salt minion
21:34 spicyJalepeno i am running Salt: 2016.3.5
21:35 spicyJalepeno the master is running a minion, but that minion points to a higher level master
21:36 whytewolf thats not what i said
21:36 PeeOnYou joined #salt
21:37 whytewolf i said the master is trying to act like a minion. to it's self.
21:37 aarontc left #salt
21:37 whytewolf I have no idea why
21:37 aarontc joined #salt
21:37 whytewolf i have never seen that before
21:37 spicyJalepeno that's what i thought as well when i looked at it, it seems really odd
21:38 spicyJalepeno i think it is causing performance issues as well
21:39 PeeOnYou left #salt
21:39 whytewolf i wouldn't doubt it
21:41 whytewolf humm this bug seems to point to something simalar. https://github.com/saltstack/salt/issues/17189
21:41 whytewolf but it is for a much older version
21:43 spicyJalepeno yeah interesting
21:46 spicyJalepeno thanks for taking time to look
21:51 jas02 joined #salt
21:55 fl3sh what is the best way to copy files form master to minion?
21:56 pabloh007fcb Currently im using  the file.managed state with success, you basically put the files on your master /srv/ directory a
21:56 scottk_ joined #salt
21:56 scottk_ Can i run any execution module in a salt state?
21:57 spicyJalepeno @fl3sh: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.get_file
21:57 spicyJalepeno if you are just trying to do a 1 time thing, that is what i use
21:57 fl3sh I need to run it more than once
21:58 spicyJalepeno yeah you probably want to do file.managed like pablo said
21:58 fl3sh ok, thx I will check
21:58 pabloh007fcb Here is the link to documentation pretty straight forward
21:58 pabloh007fcb https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
22:00 fl3sh Yes I see, thx again
22:01 whytewolf scottk_: you can use module.run to run a exacution module in a state. works like cmd.run in that if you don't put qualifiers on it, it will run everytime
22:02 scottk_ thanks!
22:09 edrocks joined #salt
22:16 jas02 joined #salt
22:20 onlyanegg How can I get dotted parameters in the config within states?
22:20 onlyanegg I have this {{ salt['config.get']('rawfile_json.filename') }}, but I get Jinja variable 'dict object' has no attribute 'rawfile_json'
22:27 whytewolf huh. i just tested with a pillar that has a dot in it useing that exact syntax and had no problem
22:27 nixjdm joined #salt
22:28 onlyanegg hmmm, ok. Maybe I have a rogue rawfile_json somewhere
22:28 MTecknology I'm being lazy and not looking up rawfile_json, but shouldn't that be a : delimeter?
22:29 whytewolf MTecknology: nope it is rawfile_json.filename: <path_to_output_file>
22:29 whytewolf https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.rawfile_json.html#module-salt.returners.rawfile_json
22:32 MTecknology heh, something new has been learned. I guess my job for the day is complete.
22:32 aerbax joined #salt
22:32 onlyanegg yup, I had a {{ opts.rawfile_json.filename }} lying around. Thx, whytewolf
22:32 usernkey joined #salt
22:32 lazybear joined #salt
22:32 gmoro joined #salt
22:32 lorengordon joined #salt
22:33 jagguli- joined #salt
22:33 KevinAn2757 joined #salt
22:33 whytewolf np
22:35 nku joined #salt
22:35 stankmack joined #salt
22:35 froztbyte joined #salt
22:35 mishanti1 joined #salt
22:35 babilen joined #salt
22:35 sarcasticadmin joined #salt
22:35 dh joined #salt
22:36 iter joined #salt
22:37 jas02 joined #salt
22:38 watersoul joined #salt
22:39 heyimawesome joined #salt
22:40 GothAck joined #salt
22:40 jhujhiti joined #salt
22:40 goal joined #salt
22:41 LeProvokateur joined #salt
22:50 kerrick_ joined #salt
22:53 leonkatz joined #salt
22:54 waynr does anyone have a link to documentation explaining best practice for sharing secrets (private keys, credentials, etc) only with specific minions (ie, not sharing with unintended minions)
22:55 whytewolf proper use of pillar
22:55 whytewolf https://docs.saltstack.com/en/latest/topics/pillar/
22:56 whytewolf that handeles your who
22:56 whytewolf https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html that handleds your encryption
22:57 waynr nice
22:57 waynr whytewolf++
22:58 whytewolf i have heard tell of using vault as a ext_pillar. but i am unsure how to make sure which minion gets what pillar in it's setup
22:59 sarcasticadm joined #salt
23:00 waynr hmm you could just give each minion its own gpg keypair and encrypt minion-specific secrets with that minion's public key
23:01 waynr so all minions would see all ciphertext but could only decrypt their own
23:02 whytewolf you can, not sure if you would run into lots of gpg errors as things try to render the keys it doesn't have
23:03 waynr oh yeah
23:05 tom29739 joined #salt
23:10 edrocks joined #salt
23:21 MTecknology You'd have to render gpg on the minion, which means you'd probably be writing all that yourself, ya?
23:23 MTecknology that actually seems pretty doable - https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.gpg.html#salt.modules.gpg.decrypt
23:27 nixjdm joined #salt
23:40 MTecknology "[...] a form of therapy to help cure people of their free time and disposable income." love that phrase
23:41 raspado joined #salt
23:41 whytewolf 5 movie deaths that can't happen?
23:42 shoemonkey joined #salt
23:42 MTecknology yup, also.. slapped that into the wrong channel
23:42 whytewolf hehe
23:46 rpb joined #salt

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