Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-10-06

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

All times shown according to UTC.

Time Nick Message
00:00 nineteen joined #salt
00:05 netcho joined #salt
00:08 nineteen joined #salt
00:09 q1x joined #salt
00:10 woodtablet left #salt
00:19 hasues joined #salt
00:19 sjmh joined #salt
00:19 hasues left #salt
00:20 jas02 joined #salt
00:21 nineteen joined #salt
00:28 sh123124213 joined #salt
00:32 onlyanegg gtmanfred: good video
00:32 infrmnt1 joined #salt
00:35 onlyanegg I have a state where I want to remove a directory if any state within a loop fails. My problem is I don't know how to specify the failed state without the loop variable. Is it possible to do? Maybe with a glob?
00:36 hemebond You can't use globs to match state IDs as far as I know.
00:37 nineteen joined #salt
00:38 dendazen joined #salt
00:39 nidr0x joined #salt
00:39 onlyanegg https://gist.github.com/onlyanegg/7ba7524ca3c516021f0ebb0a4e4f53d6
00:41 onlyanegg hmm, ok. I guess I'm just trying to avoid creating the same state over and over. It's not a huge problem. Really only readability, and peace of mind, lol.
00:41 hemebond The same state over and over?
00:47 nineteen joined #salt
00:48 onlyanegg yeah, my solution is to put the remove directory state within the loop so that it has the loop variable, but then it gets created several times, the only difference being the 'onfail' state that it is connected to
00:51 GP_MikeD left #salt
00:58 nineteen joined #salt
01:02 justan0theruser joined #salt
01:09 nineteen joined #salt
01:13 Nahual joined #salt
01:15 catpigger joined #salt
01:18 nineteen joined #salt
01:21 jas02 joined #salt
01:29 sh123124213 joined #salt
01:30 amontalban joined #salt
01:30 amontalban joined #salt
01:31 nineteen joined #salt
01:39 nineteen joined #salt
01:41 sebastian-w joined #salt
01:42 promorphus joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.8.12, 2016.3.3 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:48 nineteen joined #salt
01:49 rogi joined #salt
01:49 promorphus joined #salt
01:49 k_sze[work] joined #salt
01:50 John_Kang joined #salt
01:57 sandro_ joined #salt
01:57 mavhq joined #salt
01:58 nineteen joined #salt
02:06 netcho joined #salt
02:07 subsignal joined #salt
02:08 nineteen joined #salt
02:08 mpanetta joined #salt
02:14 raspado joined #salt
02:17 nineteen joined #salt
02:22 evle joined #salt
02:22 jas02 joined #salt
02:25 rogi gtmanfred: i'm a bit green, how would one set a redis key from shell cmd response?
02:27 nineteen joined #salt
02:31 sh123124213 joined #salt
02:37 nineteen joined #salt
02:46 blu__ joined #salt
02:47 nineteen joined #salt
02:48 mapu joined #salt
02:52 jaybocc2 joined #salt
02:53 k_sze[work] joined #salt
03:00 nineteen joined #salt
03:12 armyriad joined #salt
03:15 watersoul joined #salt
03:19 nineteen joined #salt
03:20 pipps joined #salt
03:23 jas02 joined #salt
03:24 hemebond yaml.dump corrupts strings. How nice is that.
03:28 sjmh ?
03:29 nineteen joined #salt
03:29 hemebond loading and then dumping a multi-line string duplicates all the newline characters in it.
03:30 sjmh ha, fun
03:31 sjmh http://comments.gmane.org/gmane.text.yaml.general/3745
03:33 amontalban joined #salt
03:33 amontalban joined #salt
03:37 nineteen joined #salt
03:40 raspado joined #salt
03:50 nineteen joined #salt
03:57 nineteen joined #salt
03:58 hemebond It also just randomly splits my strings with new newlines.
03:58 hemebond Will have to just hope that AWS can still read the data.
04:07 nineteen joined #salt
04:07 netcho joined #salt
04:07 netcho joined #salt
04:12 raspado joined #salt
04:13 oliver_are joined #salt
04:16 Aleks3Y joined #salt
04:18 nineteen joined #salt
04:22 DanyC joined #salt
04:24 jas02 joined #salt
04:25 subsignal joined #salt
04:28 netcho joined #salt
04:29 hemebond Thankfully AWS can still read it; even the Saltstack repo key with its additional newlines.
04:30 nineteen joined #salt
04:32 sh123124213 joined #salt
04:35 subsignal joined #salt
04:37 nineteen joined #salt
04:46 jeddi joined #salt
04:48 nineteen joined #salt
04:51 auzty joined #salt
04:57 rdas joined #salt
04:58 nineteen joined #salt
05:07 nineteen joined #salt
05:14 justanotheruser joined #salt
05:16 ptitdoc joined #salt
05:18 nineteen joined #salt
05:25 jas02 joined #salt
05:27 nineteen joined #salt
05:28 DanyC_ joined #salt
05:35 amontalban joined #salt
05:35 amontalban joined #salt
05:37 nineteen joined #salt
05:40 nidr0x joined #salt
05:47 nineteen joined #salt
05:55 sh123124213 joined #salt
05:58 nineteen joined #salt
06:06 DEger joined #salt
06:07 DEger joined #salt
06:07 impi joined #salt
06:09 sh123124213 joined #salt
06:14 subsignal joined #salt
06:17 sgo_ joined #salt
06:17 nineteen joined #salt
06:21 whitenoise joined #salt
06:26 jas02 joined #salt
06:27 nineteen joined #salt
06:29 netcho joined #salt
06:29 sgo_ joined #salt
06:34 yuhlw____ joined #salt
06:46 Miouge joined #salt
06:50 Narfology joined #salt
06:51 whitenoise joined #salt
06:55 silver310 joined #salt
06:55 oliver_are joined #salt
06:56 silver310 hello, Is it possible to capture output of cmd.run in a state?
06:56 silver310 the output is in json format, I want to use that to compare some grains to the result
06:57 nineteen joined #salt
06:59 oliver_are Hi, Rvm and Ruby is not getting install by following this salt doc https://docs.saltstack.com/en/latest/ref/states/all/salt.states.rvm.html    This is the error I got http://dpaste.com/1ZGV4H3
07:00 hemebond silver310: I don't know of a way to capture output, but perhaps you could use a custom event and reactor instead.
07:01 hemebond silver310: https://groups.google.com/forum/#!msg/salt-users/tY5WRlL5qJg/IGbYZvLzDQAJ
07:06 netcho joined #salt
07:07 nineteen joined #salt
07:10 silver310 tnx i'll try that
07:14 alvinstarr joined #salt
07:15 RandyT joined #salt
07:21 watersoul joined #salt
07:25 DEger joined #salt
07:26 jas02 joined #salt
07:27 nineteen joined #salt
07:27 toanju joined #salt
07:32 dariusjs joined #salt
07:33 jeddi joined #salt
07:36 DanyC joined #salt
07:37 amontalban joined #salt
07:37 amontalban joined #salt
07:37 nineteen joined #salt
07:40 jhauser joined #salt
07:42 DEger joined #salt
07:45 JohnnyRun joined #salt
07:48 nineteen joined #salt
07:54 DEger joined #salt
07:55 sergeyt joined #salt
07:55 irctc867 joined #salt
07:56 irctc867 i would like to hit the salt-server using rest APIs, how do i specify a nodegroup under the target field?
07:56 irctc867 tgt='-N nodegroup' ?
07:56 nineteen joined #salt
07:58 blue_ joined #salt
07:58 flagword joined #salt
07:59 losh joined #salt
07:59 hemebond irctc867: https://docs.saltstack.com/en/latest/topics/reactor/#calling-execution-modules-on-minions
08:00 hemebond Similar to top.sls
08:00 hemebond (and all other targeting)
08:02 felskrone joined #salt
08:05 geomacy joined #salt
08:05 DEger joined #salt
08:05 jaybocc2 joined #salt
08:06 nineteen joined #salt
08:07 Rumbles joined #salt
08:11 jeddi joined #salt
08:12 athaller joined #salt
08:13 armyriad joined #salt
08:13 jeddi joined #salt
08:15 lero joined #salt
08:15 sh123124213 joined #salt
08:16 athaller basepi: hello again :D about the defaults.merge thing yesterday? i have a testcase that shows that the original map gets modified with the copied map when using nested maps...
08:16 subsignal joined #salt
08:18 nineteen joined #salt
08:18 athaller ah its already in the github issue you provided :/
08:19 jeddi joined #salt
08:19 DEger joined #salt
08:21 impi joined #salt
08:23 DanyC joined #salt
08:23 dariusjs joined #salt
08:24 jeddi joined #salt
08:26 nineteen joined #salt
08:27 krymzon joined #salt
08:27 jas02 joined #salt
08:28 DEger joined #salt
08:29 jeddi joined #salt
08:32 ozux joined #salt
08:33 ronnix joined #salt
08:34 krymzon_ joined #salt
08:34 jeddi joined #salt
08:38 SaltyVagrant joined #salt
08:38 nineteen joined #salt
08:39 jeddi joined #salt
08:40 DEger joined #salt
08:40 ivanjaros joined #salt
08:40 DanyC left #salt
08:40 netcho joined #salt
08:44 ronnix joined #salt
08:44 jeddi joined #salt
08:45 Reverend joined #salt
08:46 nineteen joined #salt
08:47 jhauser joined #salt
08:49 jeddi joined #salt
08:51 ronnix joined #salt
08:53 s_kunk joined #salt
08:54 jaybocc2 joined #salt
08:54 jeddi joined #salt
08:55 netcho joined #salt
08:57 nineteen joined #salt
08:59 averell joined #salt
09:00 jeddi joined #salt
09:00 jeddi left #salt
09:06 nineteen joined #salt
09:11 ronnix_ joined #salt
09:11 ptitdoc joined #salt
09:16 nineteen joined #salt
09:17 ronnix joined #salt
09:23 rdas joined #salt
09:27 nineteen joined #salt
09:28 ronnix joined #salt
09:28 jas02 joined #salt
09:29 aidin joined #salt
09:31 raja joined #salt
09:32 raja left #salt
09:36 nineteen joined #salt
09:39 athaller joined #salt
09:39 amontalban joined #salt
09:44 ronnix_ joined #salt
09:47 ronnix joined #salt
09:47 nineteen joined #salt
09:52 ronnix_ joined #salt
09:55 ronnix joined #salt
09:59 ronnix joined #salt
10:06 nineteen joined #salt
10:14 ronnix_ joined #salt
10:16 sh123124213 joined #salt
10:18 subsignal joined #salt
10:21 ronnix joined #salt
10:24 ronnix_ joined #salt
10:25 dariusjs joined #salt
10:27 nineteen joined #salt
10:28 sergeyt joined #salt
10:30 ronnix joined #salt
10:33 ronnix joined #salt
10:34 J0hnSteel joined #salt
10:34 sgo_ joined #salt
10:37 nineteen joined #salt
10:37 DEger joined #salt
10:46 nineteen joined #salt
10:48 DEger joined #salt
10:50 ronnix joined #salt
10:57 nineteen joined #salt
11:00 sh123124213 joined #salt
11:03 M-liberdiko joined #salt
11:06 jaybocc2 joined #salt
11:06 freelock[m] joined #salt
11:06 M-MadsRC joined #salt
11:09 nineteen joined #salt
11:11 amcorreia joined #salt
11:14 TSP_ joined #salt
11:15 ronnix joined #salt
11:17 nineteen joined #salt
11:18 teryx510 joined #salt
11:19 M-MadsRC joined #salt
11:19 saltstackbot joined #salt
11:21 ronnix joined #salt
11:21 jaybocc2 joined #salt
11:24 ronnix joined #salt
11:26 nineteen joined #salt
11:28 sh123124213 joined #salt
11:29 amontalban joined #salt
11:29 amontalban joined #salt
11:29 jas02 joined #salt
11:32 sgo_ joined #salt
11:38 nini joined #salt
11:39 lero joined #salt
11:40 abednarik joined #salt
11:44 scoates joined #salt
11:45 nineteen joined #salt
11:48 impi joined #salt
11:50 nicksloan joined #salt
11:50 alexlist joined #salt
11:51 aidin joined #salt
11:56 nineteen joined #salt
11:57 ronnix joined #salt
12:06 nineteen joined #salt
12:10 raeven__ joined #salt
12:14 promorphus joined #salt
12:15 barajasfab joined #salt
12:16 nineteen joined #salt
12:17 numkem joined #salt
12:19 subsignal joined #salt
12:20 Rumbles if you use salt-cloud to set up AWS, can you use it to configure our VPC, subnets, routing, internet gateways, nat gateways, SNS, IAMs users etc, or is it just for setting up instances oncw you have set up all the ancillery stuff?
12:20 dariusjs joined #salt
12:21 Rumbles your, not our
12:26 nineteen joined #salt
12:30 jas02 joined #salt
12:33 feld_ joined #salt
12:36 nineteen joined #salt
12:37 ivanjaros joined #salt
12:38 chadhs joined #salt
12:41 DammitJim joined #salt
12:41 whitenoise joined #salt
12:41 promorphus joined #salt
12:46 nineteen joined #salt
12:46 ronnix joined #salt
12:48 dendazen joined #salt
12:49 teryx510 joined #salt
12:50 Tanta joined #salt
12:53 cyborg-one joined #salt
12:54 dendazen joined #salt
12:57 nineteen joined #salt
12:58 DarkKnightCZ joined #salt
13:00 DarkKnightCZ Hi, I have little trouble with external pillars... I'm using mysql to retrieve those with query like this 'SELECT A,B,C,D FROM salt_pillar WHERE hostname LIKE %s' with depth 3 which forms into A => B => C => D tree... the issue is that I can have multiple entries where A, B and C are the same, but D is different. Currently pillars contains only the latest D found, is it possible to force it to create list from Ds if possible? Thanks
13:05 ronnix joined #salt
13:07 nineteen joined #salt
13:08 netcho joined #salt
13:11 sergeyt joined #salt
13:16 nineteen joined #salt
13:18 Aprogas joined #salt
13:25 nineteen joined #salt
13:27 Brew joined #salt
13:29 sh123124213 joined #salt
13:30 amontalban joined #salt
13:30 amontalban joined #salt
13:31 jas02 joined #salt
13:31 ronnix joined #salt
13:33 jaybocc2 joined #salt
13:34 SaltyVagrant DarkKnightCZ: For clarification: If I understand what you’re saying, you have several D values, e.g. D = v1, D = v2, D = v3 and you effectively want D: [ v1, v2, v3 ] in the pillar wheres athe pillar currently takes the last D value (v3) (This is because pillars normally override earlier values with later ones)
13:35 SaltyVagrant DarkKnightCZ: Ha. smiley not intended! D : [ v1, v2, v3 ]
13:35 nineteen joined #salt
13:37 DarkKnightCZ SaltyVagrant: yes, correct :)
13:38 DarkKnightCZ I want to avoid adding extra column with indexes, but if it's not possible without it, it would work
13:39 XenophonF joined #salt
13:41 dariusjs joined #salt
13:42 lovecraftian joined #salt
13:42 lovecraftian joined #salt
13:43 gmoro joined #salt
13:45 SaltyVagrant DarkKnightCZ: I’m no expert on the mysql pillar module, but doesn’t as_list: True     with_lists: [] do this?
13:45 nineteen joined #salt
13:47 SaltyVagrant DarkKnightCZ: So in your example (I think) al_list: True   with_lists: [4]
13:47 mapu joined #salt
13:48 SaltyVagrant DarkKnightCZ: s/al_list/as_list/
13:48 SaltyVagrant DarkKnightCZ: See https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.sql_base.html for details
13:49 jaybocc2 joined #salt
13:49 ekristen joined #salt
13:50 KingOfFools Sup guys. Thereis documentation https://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html#module-salt.states.network which mentiones '-ipaddrs' option, but it looks like it doesn't work. It just does nothing.
13:51 wendall911 joined #salt
13:51 SaltyVagrant KingOfFools: ‘- ipaddr’ not ‘ipaddrs’ (or is that a typo in your msg?)
13:52 KingOfFools SaltyVagrant: ctrl-f 'ipaddrs' on that page. There's a list after that option. But i looked into module, 'ipaddrs' mentioned there just ones in __doc__ place.
13:53 KingOfFools SaltyVagrant: I'm just looking for the way to add multiple ip addresses
13:55 DarkKnightCZ SaltyVagrant: that works only if the value is number, as it does % on it ("unsupported operand type(s) for %: 'int' and 'tuple'")
13:55 SaltyVagrant KingOfFools: ‘- ipaddr_start: 192.168.1.1’   ‘- ipaddr_end: 192.168.1.10’ for a range of ips. I assume you mean multiple non-contiguous ip addresses? If so, not sure.
13:56 KingOfFools SaltyVagrant: yea, non-contiguous
13:57 nineteen joined #salt
14:00 SaltyVagrant KingOfFools: Ah, in that case  I’m afraid I’ve no idea. Sorry.
14:01 babilen KingOfFools: That option only seems to be supported on RH based distributions
14:02 KingOfFools babilen: im using centos 7
14:02 babilen KingOfFools: It's handled in rh_ip.py
14:03 losh joined #salt
14:04 SaltyVagrant DarkKnightCZ: I know this is not ideal, but can you cast the value in the select? Or does it have to be a number in the pillar?
14:05 KingOfFools babilen: so, i should use modules.rh_ip?
14:05 ronnix joined #salt
14:05 nineteen joined #salt
14:05 DarkKnightCZ SaltyVagrant: aah, i know why is it complaining... yes i can cast it
14:05 subsignal joined #salt
14:06 babilen KingOfFools: No, that would be used by the state .. I'm just trying to elaborate on the "couldn't find it in the code" bit
14:06 babilen KingOfFools: The state accepts kwargs and hands them over to the module
14:08 Aprogas left #salt
14:09 KingOfFools babilen: well, ipaddrs does nothing for me. No errors, no messages, nothing
14:10 DarkKnightCZ SaltyVagrant: well, no luck with that
14:12 SaltyVagrant DarkKnightCZ: Hmm. Check with_lists is right (I may have got it wrong, may be  3 not 4) Assuming you hadn’t figured that out already. Failing that, I’m at a loss now, sorry.
14:14 DarkKnightCZ SaltyVagrant: yup, no luck with that... maybe i will debug the source code to see what is wrong
14:14 DarkKnightCZ another possibility is to have something like 'select A,B,C,D,1 from ...'
14:15 SaltyVagrant DarkKnightCZ: That’s were I’d go from here (unless some helpful soul knows the answer, ‘lift up the floorboards and root around’ :) )
14:16 amontalban joined #salt
14:17 DarkKnightCZ yup, thanks for the hints :)
14:19 ronnix joined #salt
14:22 Rumbles joined #salt
14:22 tmclaugh[work] joined #salt
14:23 Miouge joined #salt
14:25 SaltyVagrant DarkKnightCZ: np
14:26 ronnix_ joined #salt
14:27 nineteen joined #salt
14:28 _JZ_ joined #salt
14:29 DarkKnightCZ SaltyVagrant: integrated and works :)
14:29 ronnix joined #salt
14:29 amontalb1n joined #salt
14:29 SaltyVagrant DarkKnightCZ: Excellent!
14:32 ronnix joined #salt
14:32 jas02 joined #salt
14:34 racooper joined #salt
14:34 dariusjs joined #salt
14:35 ronnix joined #salt
14:36 raspado joined #salt
14:37 nineteen joined #salt
14:38 ronnix_ joined #salt
14:41 lero joined #salt
14:46 ronnix joined #salt
14:47 hasues joined #salt
14:47 hasues left #salt
14:50 ronnix_ joined #salt
14:58 heewa joined #salt
15:07 nini joined #salt
15:07 supermike_ joined #salt
15:08 JamieH_ joined #salt
15:09 edrocks joined #salt
15:09 ronnix joined #salt
15:11 twodayslate joined #salt
15:11 pipps joined #salt
15:13 Freek joined #salt
15:14 bmcorser joined #salt
15:14 abele joined #salt
15:14 jimklo joined #salt
15:18 CaptTofu joined #salt
15:19 doriftoshoes joined #salt
15:19 hacks joined #salt
15:20 czchen joined #salt
15:20 jhauser_ joined #salt
15:20 imanc joined #salt
15:22 WKNiGHT joined #salt
15:23 KingOfFools does anyone have any experience with rh_ip? Not much information in documentation. Can't get that thing work
15:27 hillna joined #salt
15:27 mapu joined #salt
15:27 jhauser_ joined #salt
15:28 toastedpenguin joined #salt
15:30 fxdgear joined #salt
15:31 sh123124213 joined #salt
15:33 jas02 joined #salt
15:33 monrad joined #salt
15:33 kutenai joined #salt
15:34 Electron^- joined #salt
15:35 SteamWells joined #salt
15:35 Aleks3Y joined #salt
15:36 phtes_ joined #salt
15:36 djural joined #salt
15:36 lkannan joined #salt
15:38 beowuff joined #salt
15:39 DarkKnightCZ joined #salt
15:39 shawnbutts joined #salt
15:39 ivanjaros joined #salt
15:40 futuredale joined #salt
15:41 rogi joined #salt
15:43 om joined #salt
15:44 flagword joined #salt
15:47 ptitdoc joined #salt
15:53 ronnix joined #salt
15:55 Miouge joined #salt
15:56 cyteen joined #salt
15:57 Trauma joined #salt
16:00 jaybocc2 joined #salt
16:00 ronnix joined #salt
16:02 heewa I’m running into a bug in the fileclient. Trying to figure out how to fix it, but not sure how `__utils__` is supposed exist in `utils/s3.py`. Anyone know?
16:02 heewa Like, what makes it exist before calling functions in s3 utils?
16:02 nineteen joined #salt
16:02 impi joined #salt
16:02 gtmanfred if you check in salt.loader
16:03 gtmanfred you will see the stuff getting loaded and adding the __utils__ dunder
16:03 gtmanfred then you can do __utils__['s3.<thing>'] and thing is a function in salt/utils/s3.py
16:04 gtmanfred in order for it to have __utils__, it must be loaded through the loader as well* so salt.loader.utils(opts)
16:04 Narfology I have lots of hosts with hostname demox000 - demox100, with static ips 10.1.2.100 - 10.1.2.200. Is there a way I can use a number and compute the IP from the suffix of the hostname?
16:05 heewa Actually, new question: there’s only one line in `utils/s3.py` that uses the `__utils__[‘foo’]()` style, but many other lines that use `salt.utils.foo()` style. Maybe that one-off line should be changed to look like the others?
16:06 Miouge joined #salt
16:06 sgo_ joined #salt
16:06 heewa narfology: Like, in a template? Would `{{ hostname | replace(‘demox’, ’10.1.2.’) }}` work for you?
16:07 Narfology well it would correspond to this in python: 'demox%s' % (100+vm_number)
16:07 sjmh joined #salt
16:07 Narfology heewa ^^
16:09 Narfology it's 100 + vm_number
16:09 heewa narfology: I’m not sure I get it. What do you have and what you want to end up with?
16:09 Narfology demox_num with ip being 100 + _num
16:09 gtmanfred heewa: we moved it over in 2015.8 to fix an issue.  We are working on moving them all to __utils__ cause they require __opts__ usually, and if we load it in the loader, we get that without having to pass it through
16:10 mpanetta joined #salt
16:11 heewa gtmanfred: Oh ok. Well, here’s my situation: I’m trying to use s3 urls in file.managed with a local fileclient, but that thing doesn’t populate __opts__ or __salt__, so it breaks at various places. Any ideas for how I can find out what I need to change to fix it?
16:11 heewa I’m comfortable diving around the code. Any hints/leads, or places I can model it after?
16:11 gtmanfred file.managed should already support s3:// i think
16:11 gtmanfred what do you mean by loacl fileclient?
16:12 ronnix joined #salt
16:12 infrmnt joined #salt
16:13 nineteen joined #salt
16:13 heewa Like, if you run `salt-call —local state.apply`, then the file client that things like file.managed use is an instance of a `class LocalClient()`. That thing does not set up __utils__ & __opts__, I guess.
16:14 gtmanfred ahh, yeah i have no idea where to start other than checking that everything loaded in localclient has the dunders added in when loading
16:14 gtmanfred which is *should* ...
16:14 edrocks joined #salt
16:14 onlyanegg joined #salt
16:14 heewa Ok, I’ll give it a shot. Thanks!
16:16 jaybocc2 joined #salt
16:16 ronnix joined #salt
16:16 Narfology how do I set the primary group for a user in salt?
16:17 lero joined #salt
16:17 fredrick joined #salt
16:18 bltmiller joined #salt
16:18 fredrick can I move files to s3 via webhook since the only thing I see for s3 file moves is a module?
16:20 gtmanfred Narfology:set the gid in a user.present state? https://docs.saltstack.com/en/latest/ref/states/all/salt.states.user.html#salt.states.user.present
16:21 gtmanfred fredrick: you mean a salt-api webhook?
16:21 fredrick Yup
16:21 nineteen joined #salt
16:21 gtmanfred you can do whatever you want from a webhook
16:21 gtmanfred it just drops an event on the reactor
16:21 gtmanfred so if you write a reactor that kicks off moving s3 files, then yes
16:22 fredrick guess that is where I am stuck, want to just do "s3.put mybucket remotepath local_file=/path/to/file"
16:23 fredrick not sure how to get that into a reactor
16:23 fredrick and of course would be copy entire directory.
16:23 gtmanfred https://docs.saltstack.com/en/latest/topics/reactor/
16:24 gtmanfred do a local.s3.put event in the reactor file
16:24 gtmanfred with those arguments
16:24 gtmanfred put file place:
16:24 gtmanfred local.s3.put:
16:24 gtmanfred - args:
16:24 gtmanfred remotepath
16:24 gtmanfred - kwargs:
16:24 gtmanfred local_file: /path/to/file
16:24 fredrick so s3.put from the main salt class will work in a reactor?
16:25 gtmanfred would also need a tgt to target the minion to run it on
16:25 gtmanfred but that is basically it
16:25 fxdgear When I run `mine.flush` it's not removing everything :( I have some IP addresses and servers from minions that have been deleted.
16:25 gtmanfred if there is an s3.put runner, you could do runner.s3.put
16:28 fredrick How do you find out if there is a runner?
16:28 gtmanfred salt-run -d s3.put
16:28 gtmanfred or look and see if there is an s3 file in salt/runners/
16:28 gtmanfred there is not, so you would need to use local
16:28 gtmanfred and target a minion
16:28 gtmanfred which could be the master
16:30 fredrick https://gist.github.com/rchannel/6e461ea2068780947593ee3caaa0fab0
16:30 fredrick This is what I was thinking but was not sure it would work since the s3 was a module not a state
16:32 nineteen joined #salt
16:32 gtmanfred that should work
16:32 gtmanfred fix the typos though :P
16:32 fredrick details
16:32 gtmanfred heh
16:33 gtmanfred but yes, that should work, then you just need a reactor event for the webhook
16:33 gtmanfred and tie it to that reactor file
16:33 debian112 joined #salt
16:34 jas02 joined #salt
16:34 flagword left #salt
16:34 fredrick Nice I did not know you had to have it in the reactor file as well.
16:35 swa_work joined #salt
16:37 gtmanfred yeah, the salt-api webhook just does events, you can see the entire event stream with `salt-run state.event pretty=True`
16:37 fredrick cool, one last thing do you know if s3.put has a option for all files in  directory?
16:38 gtmanfred i do not
16:38 abednarik joined #salt
16:38 Narfology gtmanfred: thanks!
16:40 rdas joined #salt
16:40 sh123124213 joined #salt
16:40 sh123124213 joined #salt
16:41 gtmanfred no problem
16:41 fredrick Thanks that worked perfect for a single file.  Will have to play and see if I can find a way to do entire directory
16:42 nineteen joined #salt
16:42 gtmanfred good luck! :)
16:44 dps joined #salt
16:44 Renich joined #salt
16:45 sjmh how does eauth work w/ syndics?  does each syndic have to have it's own auth setup too
16:46 woodtablet joined #salt
16:47 gtmanfred uhh, i believe that the syndic passes it up to the master of masters, but let me check
16:49 gtmanfred actually, it sounds like you do need to configure it on each syndic
16:49 gtmanfred if you want to be able to run salt \* test.ping commands from it
16:50 woodtablet joined #salt
16:50 woodtablet hello everyone, hello room
16:51 gtmanfred o/
16:51 woodtablet =D
16:52 nineteen joined #salt
16:53 ronnix joined #salt
16:54 woodtablet how are you guys controlling authorized key files for ec2-user in AWS, where multiple ssh pub keys are munged together? I have 2 ideas, and I am looking to bounce ideas off others or find how they are doing it. 1st idea, just manually cat all my user keys, and do this manually each time i need to update the keep. 2nd idea, some sort of bash script to create the authorized key file, and then have salt copy it around
16:57 gtmanfred I just use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.ssh_auth.html
16:58 gtmanfred and do a jinja for loop over pillar data
16:58 gtmanfred and put it in - names:
16:59 tercenya joined #salt
17:00 ronnix joined #salt
17:01 woodtablet gtmanfred - where the names are each key ?
17:02 woodtablet like this:
17:02 woodtablet - names:
17:02 woodtablet - AAA some key1
17:02 woodtablet - ssh-dss aaaabbbb userkey2
17:02 gtmanfred yes
17:02 woodtablet wow, cool
17:02 woodtablet thanks!
17:03 edrocks joined #salt
17:03 gtmanfred np
17:03 nineteen joined #salt
17:03 subsignal joined #salt
17:04 cswang joined #salt
17:06 ronnix joined #salt
17:06 Narfology if I make yum update (etc...) on the minion, it works. if I try to set a state that installs a package from the master, yum gives an error message with an ipv6 address. any ideas?
17:07 promorphus joined #salt
17:07 concernedcitizen joined #salt
17:07 concernedcitizen joined #salt
17:08 deus_ex joined #salt
17:13 nineteen joined #salt
17:15 bltmiller joined #salt
17:20 yuhll joined #salt
17:20 sjmh gtmanfred : thanks - that's what I was worried about
17:20 sjmh We do a bunch of custom eauth stuff on our master-o-masters
17:21 sjmh if the syndics don't have eauth configured, will they just allow everything then?
17:22 edrocks if I just want to require a managed directory from another sls file and I include it will it run every single thing in the sls file?
17:22 Narfology pkg.installed uses ipv6, but when I do it locally (yum install), it uses ipv6 and it works
17:22 Narfology any ideas?
17:22 gtmanfred sjmh:i was wrong, you do need to configure it on all the masters that the syndics are connected to
17:23 gtmanfred edrocks: yes
17:23 sjmh gtmanfred - yeah I was thinking the other way tho - we DON'T have eauth configured on the syndics, but we do have it on the MoM
17:23 nineteen joined #salt
17:23 edrocks gtmanfred: is there a way to just get the part I want? I think I just have to make a third sls file and move the part I want there
17:24 sjmh basically, there's a team that has their own salt-master here and we're trying to bring it in as a syndic, but they don't want us to touch their master or include our custom eauth modules/config
17:24 gtmanfred edrocks: that is what you should do, and then just include it forboth files
17:24 sjmh so just trying to see if that'll work
17:24 promorphus joined #salt
17:24 gtmanfred sjmh: it will not, if you want to do eauth on their master, they would need to install the eauth stuff there, the syndic only goes one way, sending stuff to the master of masters, it can't request stuff like eauth verification
17:25 edrocks does "- file: /filename" work when you want to require a `file.recurse`?
17:25 gtmanfred yes
17:25 lero joined #salt
17:26 sjmh gtmanfred - right, I'm thinking if we didn't configure eauth on the syndic, and our MoM pushes the job to the syndic, would the syndic just allow access as a default, since it has no eauth?
17:26 sjmh Or would it fail
17:26 gtmanfred yes it would allow it
17:26 infrmnt joined #salt
17:26 sjmh ok.  may have to go that route then
17:26 abednarik joined #salt
17:27 sjmh only other way I could think of doing the setup was a) running a second salt-minion on each of the minion's connected to that team's master and have them point at our master
17:27 sjmh or b) running their salt-minions in multi-master and talking to both masters
17:27 sjmh but both of those seem to have more issues than it's worth
17:27 gtmanfred yar
17:28 yuhll joined #salt
17:28 edrocks gtmanfred: it works perfectly now. Thank you for the info!
17:29 geomacy joined #salt
17:29 edrocks is there a name for sections in sls file?
17:29 gtmanfred uhh, each sectoin is a state, and it has states in it
17:29 gtmanfred i wish we used states less
17:30 edrocks so graceful-down would be a state here? http://pastebin.com/6QYYPqKB
17:30 gtmanfred but the top part is the stateid, so each state in there has the same stateid
17:30 gtmanfred ¯\(°_o)/¯
17:30 gtmanfred i consider it a state, but you can have multiple states in that
17:30 gtmanfred graceful-down is technically the stateid
17:31 tercenya joined #salt
17:31 gtmanfred so all states in there will have the same stateid, and if they don't have a name: argument, the state id is used as the name
17:32 nineteen joined #salt
17:32 gtmanfred also, it is important to note that every time that state file is run, the service apache graceful will run, and not just only if the other state changes
17:33 gtmanfred which is why service.running and watch are used, if the regular state just runs, it just checks that the service is running, but if you use watch: on the file, it will do a restart on the service
17:33 gtmanfred and i believe it does a reload/graceful first unless you specify full restart on ubuntu/debian iirc
17:34 edrocks I'm not worried about apache. I just copied it from the docs page.
17:34 gtmanfred kk
17:35 jas02 joined #salt
17:38 felskrone joined #salt
17:39 KingOfFools misleading documentation again :(
17:39 KingOfFools spent half of the day
17:40 edrocks KingOfFools: care to share?
17:40 Narfology cmd.run assumes non-zero return codes are failures. However, Oracle does it their own way. How can I get cmd.run to accept a return code of 6 as success?
17:41 gtmanfred in the state?
17:41 nineteen joined #salt
17:41 edrocks Narfology: use a script and make the script return 0
17:42 Narfology a script? python?
17:42 edrocks shell? shouldn't matter
17:42 Narfology ah
17:42 sqwishy joined #salt
17:42 Narfology ok
17:42 gtmanfred Narfology: are you using the cmd.run state or execution module?
17:42 KingOfFools edrocks: well, first of all i was trying to use 'ipaddrs' option in network.managed. I found out that it uses rh_ip.py module. Now i found that there are different renderers. And there is no rendering option in rh7 renderer. Documentation says nothing on that matter.
17:42 Narfology edrocks: thanks a lot
17:43 edrocks Narfology: it's not pretty but it should work :)
17:43 Narfology gtmanfred: cmd.run
17:43 gtmanfred the state or execution module
17:43 KingOfFools edrocks: no rendering option for ipaddrs
17:43 Narfology init.sls something: cmd.run: ...
17:43 gtmanfred it can be used from the commandline or in a statefile
17:43 gtmanfred ok
17:44 gtmanfred i thought there used to be an option in cmd.run that could specify which retcodes were successes
17:44 gtmanfred but apparently not
17:45 edrocks KingOfFools: interesting. I didn't realize you could manage networks with salt. I just setup managed users/groups yesterday
17:46 gtmanfred Narfology: you could pass `- ignore_retcode: True` to the state, and run a creates or something else to see if it succeeded
17:46 Narfology gtmanfred: hm, yeah, but Oracle is horrible. I guess I just wrap as per edrocks's suggestion.
17:46 Narfology Thanks!
17:47 gtmanfred or use a check_cmd to check if it worked https://docs.saltstack.com/en/latest/ref/states/requisites.html#check-cmd
17:47 edrocks gtmanfred: where did you find `ignore_retcode`? I don't see it here https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.run or in the develop branch
17:48 gtmanfred edrocks: the cmd.run state passes kwargs to the cmd module which has an ignore_retcode option
17:48 edrocks gtmanfred: are there any docks on kwargs? I couldn't find anything about it a couple days ago when I was messing with docker
17:49 gtmanfred you have to look through the code
17:49 gtmanfred unfortunately
17:49 Narfology there should be   - success_retcodes: [0,1,4,6...]
17:50 gtmanfred that would be nice
17:50 curio joined #salt
17:51 edrocks looks this this is where it checks https://github.com/saltstack/salt/blob/53f1523cb890d627a6cbc91266ea0f2690f05916/salt/modules/cmdmod.py#L923
17:52 curio Sorry if there's a better spot to post this, but I'm using file.managed to work around a bug in the artifactory state (https://github.com/saltstack/salt/issues/36634) and despite specifying source_hash (http://....md5), it still seems to be downloading the whole artifact every highstate
17:52 saltstackbot [#36634][OPEN] Articatory state is broken or not working as advertised. | Description of Issue/Question...
17:52 gtmanfred edrocks: also here https://github.com/saltstack/salt/blob/develop/salt/modules/cmdmod.py#L634-L641
17:53 curio does file.managed not verify the source_hash checksum against the suspected cached version of the file?
17:56 ronnix joined #salt
17:57 tiwula joined #salt
18:02 nineteen joined #salt
18:08 s_kunk joined #salt
18:08 fxdgear hey all sorry if I missed the response earlier but I'm having some lingering data in my salt-mine. I followed the instructions in the salt-mine docs about auto generating HA Proxy configs for new nodes entering a cluster.
18:09 fxdgear BUT lets say I delete the entire cluster and want to rebuild
18:09 fxdgear but I only rebulid with 3 of the 10 previous nodes...
18:09 fxdgear I'm seeing the first 3 nodes updated with the right IP addresses
18:09 fxdgear but the IP addresses from the nodes who no longer exist are still showing up :(
18:10 fxdgear mine.flush does not remove that data
18:12 nineteen joined #salt
18:13 MajObviousman were there any changes in the pillar execution module between 2015.5 and 2016.3 by chance?
18:13 ronnix joined #salt
18:13 gtmanfred maybe? what are you experiencing?
18:14 MajObviousman when I do pillar.item on something one layer deep, it's printing nothing
18:14 MajObviousman https://gist.github.com/anonymous/8fbbfa5b034d76d57900de7fe78e9ee8
18:14 subsignal joined #salt
18:14 MajObviousman salt 2015.5.10 (Lithium)
18:15 edrocks is there a way to remove a prefix from a string in jinja?
18:15 edrocks besides a regex filter?
18:15 gtmanfred edrocks: .replace('prefix', '')
18:16 gtmanfred also can be |replace
18:16 gtmanfred edrocks: http://jinja.pocoo.org/docs/dev/templates/#replace
18:16 edrocks gtmanfred: thank you!
18:16 edrocks gonna start calling you salt master
18:16 gtmanfred :)
18:17 edrocks well I mean salt-master
18:17 edrocks lol
18:17 gtmanfred MajObviousman: that should not have changed behaviour afaik
18:17 gtmanfred aight, i gotta go get a haircut, good luck :P
18:17 MajObviousman is what I expected too
18:17 MajObviousman not sure why it's giving me nothing back
18:17 Miouge joined #salt
18:18 MajObviousman do I have the formatting of my pillar file wrong?
18:18 gtmanfred looked fine to me
18:19 MajObviousman it behaves the same if I convert that second layer dict to a list
18:21 nineteen joined #salt
18:23 sgo_ joined #salt
18:24 jenastar joined #salt
18:26 oliver_are Hi, I'm getting this error while installing RVM and ruby
18:26 oliver_are http://dpaste.com/0Z3Z25Z
18:26 oliver_are Could someone help me in resolving this ?
18:27 jenastar hey, we just met.. click this.
18:28 abednarik joined #salt
18:28 oliver_are jenastar, can you help me with this?
18:30 jenastar I dunno, i don't want to click it
18:31 pdayton joined #salt
18:33 nineteen joined #salt
18:34 nicksloan joined #salt
18:36 jas02 joined #salt
18:39 nicksloan joined #salt
18:39 jaybocc2 joined #salt
18:39 lero joined #salt
18:40 teryx510 joined #salt
18:41 Hipikat joined #salt
18:42 nineteen joined #salt
18:42 cswang joined #salt
18:42 Rubin anyone manage to get pygit2 working on debian 7 or 8?
18:42 Rubin it seems stuck in dependency hell and looks like people gave up on it :/
18:43 Rubin https://github.com/saltstack/salt-pack/issues/70
18:43 saltstackbot [#70][MERGED] Add pygit2 0.20.3, libgit2 0.20.0 to Ubuntu 12.04/14.04 LTS repos | Debian does not package this at all, so it needs to go in for both wheezy and jessie....
18:43 Rubin it says "where a user can install using pip or other means." but i cant find any directions to doing that witohut trashing everything
18:44 blue_ joined #salt
18:44 ptitdoc salt proxyminions are quite hard to use or develop
18:45 nicksloan joined #salt
18:45 ptitdoc It feels like it is not very used hence not very stable. Is it the case ?
18:46 ptitdoc For instance, if I try to use the esxi proxy minion, I end up with LazyLoader not being able to find the init function
18:47 nidr0x joined #salt
18:47 ptitdoc Another example, when creating a custom ssh proxyminion, I ends up with the following error :
18:47 ptitdoc TerminalException: isalive() encountered condition where "terminated" is 0, but there was no child process. Did someone else call waitpid() on our process?
18:47 gleo_ joined #salt
18:47 scoates joined #salt
18:47 ptitdoc but when I run ps on my proxyminion system, I see the ssh process running
18:50 jas02 joined #salt
18:50 bltmiller joined #salt
18:51 nicksloan joined #salt
18:51 gleo_ i want to programatically access saltstack but i m not sure whether i should use the python client api or restful net api
18:51 gleo_ i m using python 3
18:52 nineteen joined #salt
18:57 bltmiller joined #salt
18:59 JPT gleo_: I guess it depends on your specific goal. Personally, i would avoid exposing the salt api.
18:59 jas02 joined #salt
19:01 nineteen joined #salt
19:01 gleo_ cool but how do i use the client api with python 3
19:02 gleo_ i m not sure if it is compatible with it
19:04 mavhq joined #salt
19:05 JPT Damn it, i didn't think about that part. Erm ...
19:05 scoates joined #salt
19:05 gleo_ :)
19:05 JPT Since i don't know about that part, i assume, somebody else will know --- or you may find out yourself :)
19:05 cswang joined #salt
19:06 nidr0x joined #salt
19:06 JPT You could also run your script on the same machine that runs your salt and still use the salt-api
19:08 gleo_ thats the plan but would prefer not to have run another service
19:10 JPT Maybe just try to build a generic salt client and then see if it runs with python3.
19:10 JPT And in case the whole salt-api is too much but the salt client does not work with python3 yet, perhaps build a small client in python2 and use it as a bridge to your python3 script?
19:11 nineteen joined #salt
19:12 bltmiller joined #salt
19:14 gleo_ k thx will check it out
19:17 subsignal joined #salt
19:18 promorphus I'm attempting to copy a directory on a minion to another directory, however it keeps giving me a 'Failed to copy <source> to <target>' message, but I can't find out more information then that
19:18 promorphus Can anyone tell me how I might get more information, or fix the problem?
19:19 Miouge joined #salt
19:20 mavhq joined #salt
19:21 nineteen joined #salt
19:24 whytewolf promorphus: on the minion use salt-call -l debug <command>
19:29 promorphus whytewolf, I have, that's where im getting the error
19:30 promorphus it's surprisingly uninformative
19:30 whytewolf well you can move up to -l trace
19:30 ThierryR joined #salt
19:31 nineteen joined #salt
19:31 promorphus right, it's already at  trace
19:31 ThierryR joined #salt
19:31 promorphus is it ok to post log info in here, or should I take that to a git issue?
19:32 whytewolf use gist or other system
19:33 promorphus https://gist.github.com/promorphus/a1eeda6d48abea946496f4efb4cf68cd
19:34 promorphus completely stumped, there isn't enough information to actually figure out what the issue is
19:34 promorphus oh, i should point out, im attempting to copy a directory with file.copy,
19:34 whytewolf ohhhh. file.copy DOES NOT WORK on directories.
19:34 promorphus which seems normal
19:34 fgimian joined #salt
19:34 promorphus oh
19:34 promorphus crap
19:35 promorphus ok, do I have other options?
19:35 whytewolf there is a reason it says files for every option
19:36 RedundancyD joined #salt
19:37 heewa_ joined #salt
19:37 whytewolf i do not know of an option for coping a directory.
19:38 mavhq joined #salt
19:40 whytewolf you could use cmd.run
19:40 whytewolf with a creates
19:40 bowhunter joined #salt
19:41 nineteen joined #salt
19:42 subsignal joined #salt
19:42 Tanta try https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.recurse
19:42 Tanta this can copy a directory
19:42 whytewolf does file.recurse allow file:// as a source?
19:43 whytewolf since he is trying to copy a directory on the same server
19:43 Tanta oh, no, it is for master -> minion
19:43 Tanta for that, I would use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.rsync.html
19:44 Tanta or cmd.run with rsync, I have used that myself
19:44 whytewolf oh yeah forgot about the rsync state
19:45 whytewolf but a cmd.run with a cp -a and a creates should also work
19:46 jerryc joined #salt
19:46 whytewolf although the rsync would be better since it will keep the directory synced between the two
19:49 Renich_ joined #salt
19:51 nineteen joined #salt
19:52 mapu joined #salt
19:52 Miouge joined #salt
19:53 pdayton joined #salt
19:55 pppingme joined #salt
19:55 Renich joined #salt
19:59 Miouge joined #salt
20:01 Renich_ joined #salt
20:01 nineteen joined #salt
20:02 pppingme joined #salt
20:05 sgo_ joined #salt
20:08 pipps joined #salt
20:08 beardedeagle joined #salt
20:11 nineteen joined #salt
20:11 abednarik joined #salt
20:12 nicksloan joined #salt
20:19 onlyanegg Can I replace text across all files in a directory with file.replace?
20:19 bowhunter joined #salt
20:20 Rubin if i want to apply the same settings to all my environments, is there a way to not have to have duplicate entries in top.sls? i tried something like {{salt['config.get']('environment')}}: as the environment (instead of base:) but it doesnt seem to work
20:20 Rubin is there a way to specify an entry for all environments?
20:21 nineteen joined #salt
20:22 onlyanegg Rubin: Could you have minions pull from a 'common' environment AND a more specific environment?
20:24 jav joined #salt
20:24 whytewolf onlyanegg: file.replace only works on a single file. that being said you in thoery could get a list of files in a directory using jinja file.find, and iterate over them to create a long set of file.replace stanzas
20:26 onlyanegg Thanks, whytewolf. I was looking for something like that.
20:27 teryx5101 joined #salt
20:27 yuhll joined #salt
20:30 whytewolf Rubin: from reading the docs. if you don't use state_top_file and only use targeting in the top files. you should be able to assign state files from any enviroment to a minion. but i could be wrong. I do not use enviroments and only have the docs to go off of
20:32 nineteen joined #salt
20:33 nidr0x joined #salt
20:36 Rubin whytewolf, yeah it seems i might have to have an empty base
20:36 Rubin environments are really confusing.
20:37 Rubin if you dont set them, you get base, except that if you config.get environment you get none not base
20:37 Rubin so the none is this weird hard-coded exception mechanic
20:37 Rubin why didnt they just make the default environment 'base'
20:40 nineteen joined #salt
20:43 bltmille_ joined #salt
20:45 fleaz joined #salt
20:49 subsigna_ joined #salt
20:49 Edur joined #salt
20:49 wangofett joined #salt
20:50 babilen Rubin: I would recommend to not use environments at all.
20:51 babilen Use different master that track different branches as "base" if you have to, but everything that involves different environments in salt is a complete nightmare
20:52 mavhq joined #salt
20:53 nidr0x joined #salt
20:55 gtmanfred we used to use it successfully at my old job, but we targeted completely different minions in each environment, so it was easier.  and each minion had preprod dev or prod in the name, so it was easy to figure out from the names and then roles on the minions
20:55 oida joined #salt
20:56 jhauser joined #salt
20:58 fannet_ joined #salt
20:58 nsidhu joined #salt
21:00 sjmh joined #salt
21:00 Rubin my goal is to to dev in files, but put prod in git
21:01 Rubin and then toggle single host between them
21:01 Rubin so you can put a server into dev mode and work on it.. and when you like how it works, commit that into git for production
21:01 Rubin but im having trouble working out how to do that
21:01 Rubin multiple masters might work
21:01 Rubin kind of a pita
21:02 whytewolf humm. maybe it is just the cloud guy in me that always has trouble with the thought of changing a servers role from one state to another. for me it is create a dev server. find out that the states work well. nuke it out of existance and create a new server as prod
21:02 rogi joined #salt
21:03 Rubin yeah thats a fine mentality, whytewolf but it isnt the reality of how our infrastructure here works
21:03 woodtablet left #salt
21:03 babilen I've tried to work with environment and GitFS two years ago and it was a complete PITA. Just setup differetn masters that track different branches and it works. Everything else was just horrible.
21:03 mavhq joined #salt
21:04 whytewolf different strokes. I literally couldn't physically do what you are saying at my work. dev and prod are acctually two compleatly different clouds. with no cross talk between them
21:05 Rubin this is more change control on existing servers than deployment (thought it can do that too)
21:05 whytewolf but yeah. babilen's idea would be best.
21:06 babilen (as sad as that is)
21:06 whytewolf change change the master: setting in the minion config when you want to go from dev to prod
21:06 Rubin yeah
21:08 barajasfab joined #salt
21:10 subsignal joined #salt
21:10 nineteen joined #salt
21:13 Rubin ugh now iv really botched it up. i get no response on every other test.ping
21:13 Rubin reliably alternating between success and no response
21:13 Rubin lol
21:16 nicksloan joined #salt
21:21 nineteen joined #salt
21:21 Rubin stuck process on master
21:22 Rubin if it got the 'bad' one it would not return, otherwise was fine. had to stop it and kill -9
21:27 ahammond does salt-run fileserver.update also fetch git pillars? If not, how do I force that?
21:30 nineteen joined #salt
21:31 ivanjaros joined #salt
21:40 nineteen joined #salt
21:45 whytewolf ahammond: no, you should be able to force an update with salt '*' saltutil.pillar_refresh
21:45 ahammond whytewolf I've tried that. Along with stopping master & purging /var/cache/salt/*
21:46 whytewolf wait you purged the cache and it isn't updating?
21:46 whytewolf there isn't any other store for it. besides on the minion
21:47 whytewolf are you sure git was updated?
21:49 ahammond whytewolf I check github and see the updated value.
21:49 ahammond it's cached somewhere, and I can't figure out where. :)
21:50 whytewolf the only caches for pillar are on the master... which you said you purged and the minion. which pillar_refresh clears
21:50 nineteen joined #salt
21:51 ahammond whytewolf yeah... that's what I thought. The pillar repo has only one branch, so it's not a branching thing.
21:51 whytewolf okay so the only branch is HEAD?
21:52 ahammond whytewolf master, but yeah.
21:53 whytewolf same thing [sorry I'm way old school and remeber the CVS days]
21:53 whytewolf salt-run git_pillar.update
21:53 whytewolf ?
21:53 ahammond whytewolf those were dark times. :)
21:53 whytewolf https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.git_pillar.html
21:54 ecdhe new in salt: cvsfs
21:54 ecdhe =)
21:54 ahammond whytewolf nope. still see stale data.
21:55 ahammond https://gist.github.com/ahammond/7bc9a36bcafdb7d15ae2f5c93517155a
21:55 ahammond The 6.2: centos62 entry isn't there in github.
21:56 jhauser joined #salt
21:56 whytewolf ahammond: humm. have you checked to see if you have non git_pilars that might be somehow merging in?
21:56 heewa joined #salt
21:56 whytewolf [not even sure that word work like that but I'm out of ideas]
21:56 ahammond whytewolf we have other pillars, but none of them would be anywhere near this namespace.
21:58 whytewolf well try the same cache clear trick on the minion maybe there is something stuck on it's end
21:58 om joined #salt
21:58 whytewolf refresh_pillar SHOULD clear that. but if it isn't
21:59 whytewolf you might also check the git_pillar.update by adding -l debug
21:59 whytewolf in case it is on the master side
22:00 nineteen joined #salt
22:03 ahammond oh dear.
22:04 ahammond I didn't get a lot of sleep last night. This was 100% user error: I was modifying the virtualmachine section of the pillar, not the production side, and wondering why the changes didn't appear in prod.
22:04 ahammond Sigh.
22:04 whytewolf ...
22:04 whytewolf lol, it happens
22:05 edrocks joined #salt
22:12 beardedeagle joined #salt
22:14 bluenemo joined #salt
22:17 bluenemo hi guys. How can I say sth like:  salt '*|!mail' state.sls test ? I want to target all minions except those with 'mail' in grains['id'] ?
22:17 sh123124213 joined #salt
22:19 ecdhe joined #salt
22:20 nineteen joined #salt
22:28 Edgan salt -C '* and not G@kernel:Darwin' test.ping
22:28 gtmanfred salt -C 'not mail*' state.apply test
22:29 gtmanfred salt -C 'not *mail*' state.apply test
22:29 gtmanfred or you can do -E or -P and do it in regex/pcre
22:30 nineteen joined #salt
22:31 Rumbles joined #salt
22:32 jgarr joined #salt
22:33 jgarr I have some el6 systems throwing the error AttributeError: type object 'IOLoop' has no attribute 'current' trying to run minion 2016.3.2-1. I think this an old python package that needs an update but I don't remember which. Anyone have ideas?
22:35 jas02 joined #salt
22:39 om joined #salt
22:40 nineteen joined #salt
22:42 Edgan jgarr: https://github.com/saltstack/salt/issues/28403
22:42 saltstackbot [#28403][OPEN] Unable to start salt-minion :AttributeError: 'IOLoop' object has no attribute 'make_current' | Hi, ...
22:45 rogi is there a good way to 'overlay' local changes over gitfs remotes for easier local testing of states?
22:46 bluenemo gtmanfred, cool thx, didnt know that was possible
22:46 Rubin rogi, thats what iv been trying to work out for a couple days now
22:47 Rubin how to test a host with a config before you commit it :/
22:47 amontalban joined #salt
22:48 rogi gtmanfred any tips?
22:51 gtmanfred rogi: just add roots to the file servers, and above git, then the local file stuff will override gitfs, but you have to copy the whole file
22:52 gtmanfred also, I am out for the evening, 6pm here
22:52 nineteen joined #salt
22:52 gtmanfred rogi: https://docs.saltstack.com/en/latest/ref/file_server/backends.html#using-multiple-backends
22:55 jgarr Edgan: zmq, that was it! thanks
23:00 nineteen joined #salt
23:02 jgarr Edgan: know anything about https://paste.fedoraproject.org/445286/75794920/ ? I have that on the last few systems I'm troubleshooting
23:05 Rubin considering using 'masterless' mode on minions against a local working copy of the git repo to test
23:05 Rubin overlaying seems troubling because a change could be removing something
23:06 Edgan Rubin: I use salt-ssh instead of salt-call
23:06 pipps joined #salt
23:07 Edgan jgarr: head -1 /usr/lib64/python2.6/site-packages/backports/__init__.py
23:07 Rubin Edgan, salt-ssh can be told not to use the master?
23:07 Edgan Rubin: salt-ssh doesn't have to be told
23:07 Rubin oh
23:07 Rubin how does it know where to get the files to work from?
23:07 Rubin current directory?
23:08 jgarr Edgan: whoa snap, that's for sure not ascii
23:08 Edgan Rubin: Saltfile in the current directory, which then points at the current directory, which then points at a master file, which points at the pillars/formulas
23:09 Edgan jgarr: rpm -V `rpm -qf /usr/lib64/python2.6/site-packages/backports/__init__.py`
23:10 Edgan Rubin: https://paste.fedoraproject.org/445289/57953971/
23:10 jgarr reinstalling python-backports
23:10 jgarr thanks again
23:10 nineteen joined #salt
23:11 Edgan Rubin: https://paste.fedoraproject.org/445291/79548114/
23:11 Edgan jgarr: now how did it get corrupted?
23:12 jgarr no clue. It was only on 4 systems
23:12 Rubin Edgan, thanks. will try this
23:17 jgarr left #salt
23:20 nineteen joined #salt
23:20 teryx510 joined #salt
23:27 Rubin where does that second file go exactly?
23:27 Rubin (the one with forulas/_ssh/master)
23:30 Rubin Edgan, is that your top.sls?
23:30 nineteen joined #salt
23:33 om joined #salt
23:33 pdayton joined #salt
23:36 promorphus joined #salt
23:37 mndo joined #salt
23:41 nineteen joined #salt
23:41 Rubin nvm i see its like /etc/master
23:41 jas02 joined #salt
23:43 pipps joined #salt
23:44 rdrake joined #salt
23:47 Edgan Rubin: yes
23:48 Edgan Rubin: I do _ssh/Saltfile and _ssh*/master(for different things) and symlink _ssh*/Saltfile to _ssh/Saltfile
23:48 Edgan Rubin: So I can have multiple masters, but one Saltfile
23:48 Edgan Rubin: I do deploys with salt-ssh. So I have _ssh_deploy. I also do master mode code testing, so I have _ssh_master.
23:49 Edgan Rubin: Another file is the roster, which is a list of hosts.
23:50 nineteen joined #salt
23:51 Rubin i see there is a roster module that does 'cache' wnoder if that will work
23:51 Edgan Rubin: cache?
23:52 Rubin > Use the minion cache on the master to derive IP addresses based on minion ID.
23:52 pipps joined #salt
23:52 Edgan Rubin: I looked into the auto generate a roster from an api a while back. There is some existing code, but it is horribly broken. I have some hacked code to get an auto EC2 roster.
23:53 Rubin wish there was a module to just use dns
23:54 Edgan Rubin: How would it know what to look for? Zone transfer?
23:54 Edgan Rubin: let me give you an example of a roster
23:55 Edgan https://paste.fedoraproject.org/445318/47579811/
23:57 Rubin got it working i think
23:58 Edgan Rubin: and I use the is_ssh grain(defined in the roster) to do matching in top.sls
23:58 Edgan Rubin: https://paste.fedoraproject.org/445320/14757982/
23:58 Rubin wait. why do you do that?
23:58 Edgan Rubin: Be careful with grains in the roster though. I found they aren't recognized in pillar top.sls.
23:59 XenophonF joined #salt
23:59 Edgan Rubin: I use salt-ssh for deployments. So in house code gets is_ssh:2. Which then lets me skip base stuff during a deploy. Them I don't try to update things like git, accounts, salt-minion, etc

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