Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-02-02

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

All times shown according to UTC.

Time Nick Message
00:07 pipps joined #salt
00:16 Hybrid joined #salt
00:25 gvengel Is there a way to test if an ID is already defined? Specifically to prevent the "Detected conflicting IDs, SLS IDs need to be globally unique" error. I can mix-in some additional data into the ID, but then I actually end up double defining files. I'm looking for some like "{% if my_id not in salt['the_magic_id_registry'] %}"
00:35 Larri1 joined #salt
00:42 wongster80 joined #salt
00:44 MTecknology gvengel: a better naming scheme would probably be sufficient
00:46 * MTecknology doesn't know what "double define files" is supposed to mean
00:48 zerocoolback joined #salt
00:50 pipps joined #salt
00:51 gvengel Yeah, changing the ID naming scheme sort of works. I'm trying to create users and groups based on the set of groups which have been applied to a host. The problem is users can exist in multiple groups. I need a way to deduplicate the list. If I mix both the username and group name into the ID, I don't get duplicate ID's, but then I do define check the "user.present" state twice.
00:52 gvengel I thought I might be able to get it working with "extend", but it doesn't look like extend works if the ID isn't defined already.
00:53 MTecknology sounds like you should logically separate users from groups, so the a group is just a list of users.
00:54 MTecknology so that*
00:55 gvengel Yeah, I can do that, except I don't want to include users from the pillar source which are not in a group applied to the host.
00:56 MTecknology even more reason to logically separate?
00:56 gvengel If I put both the users and group in pillar, I can totally write a Python based state which does exactly what I want. Except I want the groups to be states, not in pillar. :)
00:56 MTecknology I don't follow
00:57 tiwula joined #salt
00:58 MTecknology It kinda sounds like you might be going out of your way to over-complicate what it is you need.
00:59 gvengel Okay, so I have something like: group/admin.sls, group/publisher.sls, and user/accounts.sls. accounts.sls generates all possible accounts from pillar data. admin.sls and publisher.sls create the admin and publisher groups respectively.
01:00 gvengel I only want users defined in the admin or publisher groups to be created on the system, *not* all the users from accounts.sls
01:02 gvengel I'm coming from puppet, and trying to port our code to salt. With puppet, users in "accounts" were defined as "virtual" resources, then the groups would "realize" the users.
01:03 MTecknology try to stop thinking as puppet taught you to think
01:03 gvengel I'm 100% on board with that; however, I still have a problem I need to solve. ;0
01:03 MTecknology puppet and chef have a *lot* of backward logic that does nothing but force you into terrible corners
01:03 MTecknology right... I told you what I think you should do.
01:03 gvengel Agreed, that's why I'm porting to salt.
01:05 gvengel Can you clarify then? Maybe I'm missing what you meant by "logically separate users from groups"?
01:06 MTecknology I'm not really sure how...
01:06 MTecknology make them two different things
01:06 MTecknology "so the a group is just a list of users."
01:06 MTecknology (copy/pasted the typo..)
01:09 shiranaihito joined #salt
01:11 gvengel What if I want both "admin" and "publishers" accounts to part of the "adm" group? Then I have to double define the list of user.
01:11 MTecknology no?
01:11 MTecknology don't "double define" anything...
01:13 gvengel Maybe that's the wrong term. How would I include a group of users in other groups?
01:14 MTecknology personally.. I don't know why you'd try to do this with salt in the first place. Outside of top-dawg admins, I do whatever I can to avoid locally defined users.
01:14 MTecknology why would you do that?
01:14 gvengel Because we have different sets of top-dawgs. :)
01:16 MTecknology "include a group of users in other groups?" "why would you do that?" "Because we have different sets of top-dawgs."  ... what now?
01:17 gvengel Anyway, I'll figure out a solution using the primitives salt provides.
01:17 MTecknology primitives?
01:17 gvengel Tools
01:18 MTecknology "groups" should be nothing more than a list of users... if you look at groups as just that, it /should/ be pretty easy to come up with lots of solutions for whatever voodoo you're working on.
01:21 appleb joined #salt
01:21 whytewolf gvengel: salt provides ... dicts and lists... you provide the logic.
01:23 gvengel Yep, I can make it work if I move the groups to pillar and write the logic in a Python based state. I was just hoping to make the groups states, not pillar data.
01:24 MTecknology I strongly doubt you need to "write the logic in a Python based state."
01:24 MTecknology but ya... the data being into states really /should/ come from pillar.
01:25 gvengel I don't believe jinja allows you to mutate dictionaries, so I'd have to do that in python.
01:25 baikal joined #salt
01:26 MTecknology if you're still stuck on mutating and double defining, I'm gonna go grab myself a beer and listen to some tunes. :P
01:26 MTecknology you're over-complicating something that's likely *very* simple
01:26 MTecknology stop trying to do puppet with salt
01:26 noirosop joined #salt
01:27 noirosop left #salt
01:28 oida joined #salt
01:28 gvengel Cheers! And yes, porting the puppet code is messy. I'm just trying not to change the way we implement things too much. I will as necessary.
01:39 Church- Man I love salt, finally programming at work again.
01:39 Church- Of a sorts.
01:39 wongster80 left #salt
01:40 wongster80 joined #salt
01:43 AidanWong joined #salt
01:46 AidanWong left #salt
01:47 wongster80 Hi, is it necessary to type cast pillar values in order to do algebra computation?
01:50 MTecknology wongster80: iiuc, yes
01:51 MTecknology (but pillar values can be numbers.. so maybe I don't follow the question)
01:52 wongster80 I’m trying to sum up two pillar and i get:
01:52 MTecknology wongster80: pillar is rendered yaml, you can look up yaml data types and that's pretty well what you get w/ pillar.
01:52 wongster80 Jinja error: unsupported operand type(s) for +: 'int' and 'str'
01:54 LoggerZZZ joined #salt
01:54 wongster80 https://gist.github.com/wongster80/96c2f429b9e179c968ae82d156e2a9a5
01:56 MTecknology I don't think that jinja does what you think it does
01:57 MTecknology This might help you a bit- http://yaml-online-parser.appspot.com/
02:01 MTecknology gvengel: When you write states, use as little jinja as possible, let pillar drive what your states do, and most importantly, step back and try to figure out the simplest way to define your data set with respect to what you want to do with it.
02:04 LoggerZZZ joined #salt
02:04 whytewolf wongster80: your loop, i don't think it does what you think it does. or to put it a better way, 0 + 'key_buffer_size' = 'tac0'
02:08 Church- wongster80: Never go in against a wolf when code is on the line. The most classic blunder.
02:08 LoggerZZZ joined #salt
02:10 gvengel Thanks. I've actually got most of our code base ported already, and have been using that philosophy. Just need to get user management sorted out.
02:12 MTecknology Why are you managing local users in the first place?
02:13 LoggerZZZ joined #salt
02:14 MTecknology don't you have a directory service that you could use for centralized management?  No need to maintain a forever list of everyone that's no longer around..
02:16 gvengel We do, but we prefer local accounts for many of our systems where the directory is not accessible.
02:17 MTecknology I have further questions, but I'm pretty sure I don't want the answers. :P
02:28 LoggerZZZ joined #salt
02:56 zerocoolback joined #salt
02:58 ilbot3 joined #salt
02:58 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.8, 2017.7.2 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
02:58 gvengel I got everything working! It turns out you can use dictionaries in jinja with the expression statement {% do ... %}. It's only ~10 lines of jinja to dedup users from groups, so I'm calling it "ugly, but acceptable".
03:00 nomeed joined #salt
03:01 MTecknology FSV of acceptable
03:11 wongster80 MTecknology: any guidance on whether Salt can implement the jinja sum filter using pillar? http://jinja.pocoo.org/docs/2.10/templates/#sum
03:12 MTecknology if it's supported by jinja, then it's supported by salt
03:13 LoggerZZZ joined #salt
03:16 whytewolf just make sure it is supported by the version of jinja you have installed
03:24 tzero joined #salt
03:26 DammitJim joined #salt
03:29 lompik joined #salt
04:33 esteban joined #salt
04:47 dwoz I've noticed salt-cloud with ec2 on python 3 seems to break with the most recent changes merged from the oxygen to develop branch. As best as I can tell at this point it's due to M2Crypto being a requirement to the ec2 cloud module but M2Crypto not having been ported to python 3 yet. Just a heads up as I am still looking into this some before opening an issue.
04:50 zerocoolback joined #salt
04:51 zerocoolback joined #salt
05:23 zerocoolback joined #salt
05:25 Udkkna joined #salt
05:30 zerocoolback joined #salt
05:48 aruns__ joined #salt
05:50 justan0theruser joined #salt
05:54 pipps joined #salt
06:18 zulutango joined #salt
06:18 zerocoolback joined #salt
06:19 zerocoolback joined #salt
06:19 LocaMocha joined #salt
06:24 LocaMocha joined #salt
06:25 zerocoolback joined #salt
06:54 aruns__ joined #salt
06:54 Udkkna joined #salt
07:11 zerocoolback joined #salt
07:14 rgrundstrom Good morning
07:14 coredumb Morning
07:43 yuhl joined #salt
07:55 Ricardo1000 joined #salt
07:55 pualj_ joined #salt
08:00 zerocoolback joined #salt
08:05 jas02 joined #salt
08:06 Tucky joined #salt
08:11 Hybrid joined #salt
08:14 aldevar joined #salt
08:34 jas02 joined #salt
08:34 zerocoolback joined #salt
08:51 jrenner joined #salt
08:54 MTecknology morning? I /just/ finished work for the day
08:55 pcgod joined #salt
08:55 MTecknology err.. for the yesterday*
08:57 jas02 joined #salt
09:00 zerocoolback joined #salt
09:02 pcgod joined #salt
09:03 LoggerZZZ joined #salt
09:04 mikecmpbll joined #salt
09:23 pbandark joined #salt
09:23 Hybrid joined #salt
09:28 colegatron joined #salt
09:34 av_ joined #salt
09:43 LoggerZZZ joined #salt
09:54 sergeyt joined #salt
10:07 LoggerZZZ joined #salt
10:19 xet7 joined #salt
10:22 sol7 joined #salt
10:22 jbailey joined #salt
10:25 yujunz joined #salt
10:34 jbailey joined #salt
10:42 jbailey joined #salt
10:44 aldevar joined #salt
10:45 Hybrid joined #salt
10:47 aldevar left #salt
11:00 jbailey joined #salt
11:14 LoggerZZZ joined #salt
11:18 LoggerZZZ joined #salt
11:18 zimablue hey, is there a way to run salt on the latest python version?
11:24 sergeyt joined #salt
11:25 stanchan joined #salt
11:41 zerocoolback joined #salt
11:42 Tys_ joined #salt
11:45 CrummyGummy joined #salt
11:57 Dr_Jazz as in python 3?
12:00 av_ joined #salt
12:14 kryl joined #salt
12:14 kryl hi
12:15 Grauwolf joined #salt
12:18 xet7 joined #salt
12:19 evle joined #salt
12:26 CrummyGummy joined #salt
12:29 tiwula joined #salt
12:51 kettlewell joined #salt
12:57 sergeyt joined #salt
13:04 kettlewe_ joined #salt
13:13 Nahual joined #salt
13:13 sergeyt joined #salt
13:23 sergeyt joined #salt
13:42 zimablue yeah python3, issues seems to suggest that it's possible but I can't find where it actually says how to do it
13:49 xagony joined #salt
13:51 yujunz joined #salt
13:55 _JZ_ joined #salt
14:02 XenophonF zimablue: if you can't find pre-built packages for your O/S, you get to build them yourself!!
14:04 zimablue it's kind of a chicken and egg problem, logically when provisioning my master it kind of makes sense to me to install salt first and try to use that for all the further steps
14:04 zimablue so using a bootstrap script
14:05 zimablue but if I use apt instead of bootstrap can I specify a python3 version? I'm using Ubuntu
14:12 sergeyt joined #salt
14:14 LoggerZZZ joined #salt
14:27 pualj_ joined #salt
14:30 LoggerZZZ joined #salt
14:36 yujunz joined #salt
14:37 sjorge joined #salt
14:41 Kelsar joined #salt
14:43 LoggerZZZ joined #salt
14:48 sergeyt joined #salt
14:49 ouemt joined #salt
14:49 tzero joined #salt
14:51 socket- joined #salt
14:52 XenophonF What do the instructions say? ;)
14:53 XenophonF I mean, right now, no.
14:54 XenophonF According to repo.saltstack.com they're only providing Python 2 versions of the packages.
14:54 DammitJim joined #salt
14:54 racooper joined #salt
14:54 XenophonF You could make your own packages, and then publish them via PPA.
14:54 XenophonF see also salt-pack
14:55 XenophonF you're pretty far down the DIY rabbit hole at that point
14:56 socket- Hey all, I have 2 salt masters, with their /etc/salt/pki being shared on NFS.  I also have both of them behind a load balancer 4505/4506.  The minion shows registered on both masters, when i did a test.ping from master1, it worked, then tried again and it failed. no salt commands appear to work from master2. Here are the minion logs for the test.ping  any ideas why this isn't working?
14:56 socket- https://apaste.info/d4Hn
14:59 XenophonF does salt-master load balancing work like that?
15:00 cgiroua joined #salt
15:00 socket- not sure, im wondering if it's a zeromq thing,  my understanding is the minion opens a socket to the master
15:01 socket- I'm gonna try with tcp transport to see if it makes a difference
15:08 pualj_ joined #salt
15:10 sergeyt joined #salt
15:11 XenophonF socket-: have you seen this? https://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html
15:12 XenophonF I need to set up multimaster at some point...
15:12 XenophonF and syndic
15:13 pualj_ joined #salt
15:19 pualj_ joined #salt
15:20 zerocoolback joined #salt
15:25 socket- yeah, it looked like it was more for having multiple master, not behind a loadbalancer
15:26 socket- I'm trying to see if there is a way to have shared storage for stuff like pki, cache, logs, states, and then i can scale the python app for better compute/availibility
15:27 xet7 joined #salt
15:28 dendazen joined #salt
15:29 pualj_ joined #salt
15:30 LoggerZZZ joined #salt
15:31 dnull joined #salt
15:34 jacksontj joined #salt
15:35 dnull joined #salt
15:36 jeffspeff joined #salt
15:37 hi joined #salt
15:47 DammitJim joined #salt
15:55 ouemt joined #salt
15:55 gh34 joined #salt
16:08 zerocoolback joined #salt
16:10 stanchan joined #salt
16:12 stanchan joined #salt
16:22 LoggerZZZ joined #salt
16:37 tys_ joined #salt
16:38 mattfoxxx joined #salt
16:40 mattfoxxx joined #salt
16:47 Bryson joined #salt
16:52 Hybrid joined #salt
16:59 jas02 joined #salt
17:00 jas02 joined #salt
17:06 LoggerZZZ joined #salt
17:06 Lionel_Debroux_ joined #salt
17:11 Lionel_Debroux joined #salt
17:17 LoggerZZZ joined #salt
17:19 Lionel_Debroux joined #salt
17:19 mikecmpbll joined #salt
17:30 DanyC joined #salt
17:30 stanchan joined #salt
17:32 dfinn joined #salt
17:37 onlyanegg joined #salt
17:44 ouemt joined #salt
17:46 ouemt joined #salt
17:50 LoggerZZZ joined #salt
17:59 pipps joined #salt
18:07 pipps joined #salt
18:12 pipps99 joined #salt
18:14 MTecknology socket-: Once upon a time, I wrote a module that I used for selection two syndics per minion that a minion would connect to. Basically, cksum(minion_id) mod_divide % num_syndics == syndic_X.  Repeat w/ cksum(minion_id + 1) and you get the second it'll connect to.
18:15 MTecknology I didn't actually use cksum, I wanted something faster and invented some custom relatively light-weight hash, but probably would have been smarter.
18:15 frew joined #salt
18:16 frew https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed, `param bool skip_suggestions` says `Force strict package naming. Disables lookup of package alternatives.`
18:16 frew surely that's wrong
18:17 MTecknology it sounds like it's worded sanely..
18:18 MTecknology Hey! I still have it! :D
18:21 zimablue @XenophonF ok so python2 for now, that's a bit sad. This might be the last major python thing not moved to 3?
18:22 frew MTecknology: why would `skip_suggestions` mean anything about naming?
18:23 ouemt_ joined #salt
18:23 MTecknology zimablue: At least it's an official effort within saltstack. :)
18:23 ouemt joined #salt
18:25 ouemt joined #salt
18:27 DanyC joined #salt
18:27 MTecknology socket-: Personally, I'd avoid a load balancer w/ salt if you don't absolutely need it.
18:27 MTecknology This is the thing.. https://gist.github.com/MTecknology/e47299734438f5a57344019ef7996b97
18:34 ymasson joined #salt
18:34 kryl Is there any "network" dedicated module to create all stuff inside a VPC (routes, VPC himself, IGW, ...) ?
18:36 pipps joined #salt
18:40 pipps99 joined #salt
18:43 jbailey joined #salt
18:45 Neighbour kryl: closest is boto_vpc
18:45 kryl Neighbour, thank you ;)
18:45 pipps joined #salt
18:46 pipps99 joined #salt
18:46 kryl Is it a good idea by scheme to deploy private subnet instances in a "connected" subnet with internet access and deploy from the snapshot to the secure area ?
18:46 bbbryson joined #salt
18:47 ouemt joined #salt
18:50 LoggerZZZ joined #salt
18:50 pipps joined #salt
18:55 ouemt joined #salt
19:00 CampusD joined #salt
19:09 pualj_ joined #salt
19:14 frew left #salt
19:18 onlyanegg joined #salt
19:23 pipps joined #salt
19:24 pipps99 joined #salt
19:26 LoggerZZZ joined #salt
19:28 pipps joined #salt
19:28 pipps joined #salt
19:41 basepi joined #salt
19:44 Hybrid joined #salt
19:55 jas02 joined #salt
20:00 XenophonF zimablue: SaltStack (and hopefully the community around it) is working on porting to Python 3.
20:00 XenophonF there are Python 3 packages for Windows
20:01 XenophonF I think the official packages target whatever is the system Python, e.g., on RHEL/CentOS 7 that Python 2.7; on RHEL/CentOS 6 that's Python 2.6
20:01 XenophonF I don't directly support any Ubuntu servers so I don't know what they come with.
20:02 pipps joined #salt
20:03 kryl joined #salt
20:14 jas02 joined #salt
20:16 LoggerZZZ joined #salt
20:18 Hybrid joined #salt
20:43 stanchan joined #salt
20:44 pipps joined #salt
20:47 dencom joined #salt
20:49 pipps joined #salt
20:50 pipps99 joined #salt
20:52 jdipierro joined #salt
20:56 Hybrid joined #salt
20:57 dencom joined #salt
21:00 pipps joined #salt
21:03 mchlumsky joined #salt
21:04 pipps joined #salt
21:06 Edgan gtmanfred: https://github.com/saltstack/salt/issues/44145  This make any sense now?
21:12 dencom_ joined #salt
21:17 viq Is there a way to get list of engines running?
21:17 Edgan viq: engines?
21:18 LoggerZZZ joined #salt
21:18 viq like https://docs.saltstack.com/en/latest/ref/engines/all/salt.engines.slack.html#module-salt.engines.slack  and https://docs.saltstack.com/en/latest/ref/engines/all/salt.engines.webhook.html#module-salt.engines.webhook
21:19 xet7 joined #salt
21:23 saltslackbridge joined #salt
21:24 saltslackbridge <gtmanfred> hrm
21:24 saltslackbridge <gtmanfred> ok good
21:25 yuhl joined #salt
21:29 jas02 joined #salt
21:29 * viq grumbles
21:30 viq So I have logstash, webhook and slack engines configured. I appear to have proper indentation this time. Logstash and webhook engines are running, there's no sign in logs of slack one even being attempted
21:31 viq ...oh, right, there's an error
21:33 viq Ah, because slack engine, as opposed to state and execution modules, requires slackclient to be installed
21:33 relidy joined #salt
21:39 kiorky joined #salt
21:42 viq And AUR doesn't have slackclient for python2
21:43 hemebond viq: PIP?
21:43 Edgan viq: Random python dependencies for corner cases is one of the annoying things that needs to be fixed.
21:44 viq hemebond: only if I'd move the whole salt-master into a virtualenv
21:44 viq Edgan: aye
21:44 hemebond You don't want the package available server-wide?
21:45 viq hemebond: I don't want something not managed by the package manager dumped onto the system, no
21:48 saltslackbridge <gtmanfred> @vicviq time to submit an aur package
21:49 pipps joined #salt
21:53 viq First asking the maintainer of the python3 version whether he'd make it for python2 as well ;)
21:55 jas02 joined #salt
21:58 jas02 joined #salt
22:05 pipps99 joined #salt
22:08 pipps joined #salt
22:10 jas02 joined #salt
22:10 pipps99 joined #salt
22:12 dencom_ joined #salt
22:17 jas02 joined #salt
22:24 kiorky joined #salt
22:28 viq Can thorium_roots be on git, or do those need to be paths on a filesystem?
22:29 saltslackbridge <gtmanfred> it cannot be git
22:30 Edgan gtmanfred: Can you look at this ticket that you already comment on? https://github.com/saltstack/salt/issues/44145
22:31 kryl How will you provide a new instance in a private subnet without internet access with salt ? Is it a good idea to create the instance, build/setup all services in a different subnet and snapshot/create from this instance to the private subnet ? The process sound to be too heavy isn't it ?
22:31 saltslackbridge <gtmanfred> i starred that email, and i will look when i have time, possibly monday
22:32 viq gtmanfred: thank you
22:33 viq kryl: that's a complicated question, and answer somewhat depends on what you want to achieve and what you have available, and what your limitations are
22:38 kryl viq, sure, if I want to "upgrade" a service in a private subnet with a full isolation I'll have to add a NAT gateway but it will break the security concept for a while. On the other hand if I try to pull this instance, upgrade it in an other place and deploy it again I feel it's not the right solution...
22:39 ouemt joined #salt
22:39 viq kryl: ether you need local repo, or "immutable infrastructure", when instead of trying to update service, you kill the old instance and start a new one from an updated image
22:39 kryl I'm just wondering if there is a good practice to do that. Keeping security of the isolation constant and maybe not terminate / deploy the instance for each intervention who will need an internet connection ?
22:40 kryl ok there is 3 solutions.
22:41 pipps joined #salt
22:42 dencom joined #salt
22:42 kryl I'm not sure salt will be the right tool for such tasks. (in the case of immutable infrastructure)
22:42 saltslackbridge <gtmanfred> configuration management is a small fraction of what salt does, so meh
22:43 saltslackbridge <gtmanfred> it does immutable infrastructure well too, the real power in salt is using the event bus that runs underneath everything
22:43 viq Salt can build the images. Salt can orchestrate the update process. Etc
22:45 whytewolf salt, the all singing, all dancing automation tool of the world.
22:46 pipps99 joined #salt
22:48 dencom joined #salt
22:48 viq that and mgmt ;)
22:49 saltslackbridge <gtmanfred> i remember when he was writing mgmt, everything that he was saying about what he was designing, was just salt in go.
22:50 whytewolf speaking of which. just thought it should be put out there. if you wish to join those of us at salt. we are hiring. please see https://saltstack.bamboohr.com/jobs/ for positions.
22:50 pipps joined #salt
22:51 heaje joined #salt
22:52 viq Anything on the other side of the pond?
22:53 whytewolf They will work with remote. I live in vegas. even though I'm a resolution engineer II
22:53 whytewolf depends on position of coarse
22:53 whytewolf s/they/we
22:54 viq hmm
22:54 viq thanks
22:54 pipps_ joined #salt
22:54 whytewolf and we do have people across the pond
22:56 pipps joined #salt
23:02 copec joined #salt
23:02 zulutango joined #salt
23:02 jas02 joined #salt
23:03 kryl bye all ;) & thank you
23:08 jas02 joined #salt
23:09 stanchan joined #salt
23:17 viq hmmm, "act if no beacon.status messages received for X time", interesting use for thorium...
23:17 copec I've never used environments with saltstack, and I'm reading https://docs.saltstack.com/en/latest/ref/states/top.html#top-file-compilation-examples
23:18 copec I don't understand https://docs.saltstack.com/en/latest/ref/states/top.html#scenario-3-no-environment-specified-top-file-merging-strategy-is-same explained below
23:19 copec Under https://docs.saltstack.com/en/latest/ref/configuration/minion.html#top-file-merging-strategy it says for same  "then for each environment, only that environment's top file is processed"
23:19 kiorky joined #salt
23:19 copec So why is base and dev environment being processed?
23:33 viq copec: because environment was not specified, so all of them will be checked
23:34 viq From my reading of those pages
23:35 viq If you specify environment, then only that top file is considered. If you don't, then all are, but with "same" for merging strategy each top file is looked at separately, instead of them being merged
23:39 copec I think that points me to not understanding why each top file for each environment references other environments
23:40 doubletwist Ok I copied almost verbatim an existing rsyslog-formaula and I'm trying to do something similar for another formula I'm writing
23:40 doubletwist See: https://paste.fedoraproject.org/paste/dHDJrxHFknFgGjKiUk1-Dg
23:40 viq It can, it doens't have to. If you want to save yourself the headache of figuring that out, don't. But this describes what happens if you do.
23:41 copec My brain doesn't allow me :-/
23:41 doubletwist Hrm. Issue note there is a little inclear.
23:41 * viq grumbles at paste sites not working with disabled javascript
23:42 doubletwist So 'freshclamlogfilemaxsize' is set in defaults.yaml as "50M". Then I use config.get and set a template default to use if the var/value can't be found [of the freshclam default 2M]
23:43 doubletwist But it doesn't pick up the '50m' from the defaults.yaml at all.  But if I put 'freshclamlogfilemaxsize' in a pillar, then it picks up that value just fine.
23:44 viq what is "mode"? https://docs.saltstack.com/en/latest/ref/thorium/all/salt.thorium.calc.html#salt.thorium.calc.mode
23:46 doubletwist So what am I missing that is making it not pick up values from defaults.yaml ?
23:47 mTeK joined #salt
23:49 whytewolf doubletwist: you are setting your configline to only what comes in the pillar not passing in your defaults with the merged data
23:51 doubletwist whytewolf: interesting. That's how it's done in rsyslog-formula [from saltstack-formulas github]
23:51 doubletwist I was just copying that because it seemed to work ok
23:51 whytewolf also the line you labeled as "merge" in salt:lookup is going to overwrite not merge
23:52 whytewolf oh i see. wow that is a stupid way of doing it. merge one way then merge into pillar and hope it goes
23:52 pipps joined #salt
23:53 doubletwist seems to be a pretty common thing in the formulas on saltstack-formulas github
23:54 whytewolf this would help explain why i avoid formulas
23:55 doubletwist SO how would you do it if you wanted to have some default, use or override certain items based on OS, then use or overrite certain settings if they exist in the pillar?
23:56 whytewolf let me see if i have that out in public

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