Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-08-10

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

All times shown according to UTC.

Time Nick Message
00:02 systemexit joined #salt
00:09 cwright joined #salt
00:22 onlyanegg I'm getting this weird thing where my master is resolving differently in salt and from `host` or `dig`. Can anyone tell me how the masters are resolved or where in the code that is?
00:28 iggy it should be basic python code (socket.gethostbyname(), etc)
00:29 onlyanegg hmmm, ok, makes sense
00:40 merlincorey joined #salt
00:42 merlincorey how can I run a state tree locally?  I'm hoping to be able to use something like `salt-call --local` but maybe somehow apply it directly to a state tree in a particular directory that is NOT actually "installed" locally.  Main idea is I am trying to test some states without going full-on testinfra just yet
00:44 iggy sure, you can pass file_roots to masterless afaik
00:45 whytewolf yup, something like salt-call --local --file_root=<blah> --pillar_root=<blah2>
00:46 whytewolf or was that file-root and pillar-root ..
00:46 iggy I was trying to look it up, but ADD kicked in
01:12 keldwud joined #salt
01:21 hammer065 joined #salt
01:37 mavhq joined #salt
01:40 shoemonkey joined #salt
01:40 noobiedubie joined #salt
01:51 ilbot3 joined #salt
01:51 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.6, 2017.7.0 <+> 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 <+> Please make sure you're properly identified to speak in the channel.
01:57 jab416171 joined #salt
01:57 sh123124213 joined #salt
02:06 hasues joined #salt
02:08 zerocool_ joined #salt
02:28 noraatepernos joined #salt
02:30 shoemonkey joined #salt
02:57 evle joined #salt
03:13 donmichelangelo joined #salt
03:29 shoemonkey joined #salt
03:38 onlyanegg joined #salt
03:57 darioleidi_ joined #salt
03:59 sh123124213 joined #salt
04:22 hasues whytewolf: you around
04:23 whytewolf kind of, whats up?
04:23 hasues Wanted to discuss what I was trying to do and what I found out.
04:24 whytewolf ok
04:24 hasues Basically, I was trying to install a package or some such's configuration.  For instance, I had some configuration for zlib.
04:25 doubletwist joined #salt
04:25 hasues Then I had to other packages I wanted to install that would include that configuration.  This way, if I wanted to create a top.sls file that could install one or both of those packages I could.
04:26 hasues I was getting that error about the sls id already being found or some such.  It ends up I could use the two includes, but if I include it like "include zlib/conf" and "include zlib.conf", it causes an error.  But if I make those match?  It has no issue.  (i.e. include zlib.conf for each state file)
04:27 whytewolf ahhh. yeah that is an issue. you should be consistent in everything you do
04:27 whytewolf i try and avoid / based anything
04:27 hasues That being said, I wanted your thoughts on what we were discussing earlier as the consensus was "don't use includes".  I wanted to know what would be a better method for what I was doing as I want to learn the procedures and methods the "right" way?
04:28 whytewolf I don't mean don't use them. i havn't but i also rely heavilly on orchestration not highstate
04:28 hasues I think I used the / originally as the documentation led me that way.  It wasn't until later that I learned about using the "."
04:29 hasues I see.  All this tells me is I have much to learn.  I was listening to what the other fellow was saying earlier, and I was reading through the links he sent concerning openssh as an example, but when I read through that, it seems alien to me; I haven't done enough yet to warrant using much of what was being done in those examples.
04:33 whytewolf well, what he was saying was to limit includes. to things that absolutly need them. your example would actually be one. but in his example you have a state that insalls zlib, one that installs another package that may or may not use zlib. and then a glue state that if you want both you call\
04:33 whytewolf the glue state was the one with the includes
04:33 hasues I follow you.
04:35 whytewolf the main thing i cation against with includes. is things like init files that are 90% includes
04:35 whytewolf trying to find an example
04:35 hasues I guess what I was thinking is, I would think I could make a salt file for some thing I want to install and configure, and I could do so without having to worry about collisions of such, and like the other person was saying, I was trying to find a way of doing that by treating them like header files.  If I use glue states, then I have to know all of those dependencies before writing a top file which makes it hard for me to make
04:35 whytewolf okay, yeah here is what drives me up a wall
04:36 whytewolf https://github.com/saltstack-formulas/node-formula/blob/master/node/init.sls
04:36 hasues I'll take a peek.
04:36 hasues Hm, I may be doing a bit of that.
04:36 hasues So what I'm trying to do is automate what I want a bunch of Gentoo boxes to look like in their configuration.
04:37 whytewolf 100% of what is in that init file can be done with top.
04:37 whytewolf and with out polluting pillar [which is a second sin for this one]
04:38 whytewolf seems fitting that a node.js formula would have exactly the behavour that drives me nuts
04:38 hasues So that means, I have to worry about what each package's use and accept keywords will look like.  So that means that if I know what those flags will look like, and I know a package will need them in order for them to be installed the way I want, I have a common salt file for the package that contains that config, and the init.sls which may or may not be used, depending if I am going to actually install the package (which result
04:38 hasues whytewolf: I see.  I really need to have some training on this.  I have so many questions.
04:39 whytewolf well the thing about using package managers. you don't have to worry about it being installed before hand. the package manager will handle dependencies
04:39 whytewolf even in gentoo if you have your use set up right you don't have to install the packages those use settings need. they will be called in and installed by ebuild
04:41 whytewolf basicly to many people are explicit when they should be implicit. this actually has consiquencies in some systems. such as gentoo that when you remove a package. clean up scripts won't clean up the dependencies because they are included in the world file
04:43 hasues whytewolf: Correct.  That's what I'm seeing.  There is so much leaning on what the package manager does for you, I'm having to do some extra maintenance.  The good news is that Gentoo doesn't have to have a single world file anymore; package.use is a directory, and you can have those categories as sub directories, with the package name as the file with what configuration it is to have in it.
04:43 hasues With what I'm seeing, this seems to be the way to address this, and it seems to work, so that's good news.
04:43 whytewolf yeah been a while since i used gentoo.
04:44 whytewolf [think going on 10 years now]
04:44 hasues But yeah, if I were doing this for work, obviously I wouldn't necessarily be using Gentoo.  My thoughts were "hey, do something intricate to give you a better understanding", and it seems to be working.
04:44 hasues If I were configuring CentOS, this would be an easier game altogether.
04:45 whytewolf lol, centos is actually easier. it is what i use.
04:45 hasues Yeah.  I use it for work.  I don't use it for my personal stuff.
04:45 hasues For work projects, totally use Cent.
04:47 whytewolf openstack on gentoo is a nightmare, and my compute nodes are not suppoerted on anything but vmware, xen, RHEL [cent] or windows. so i had little choice
04:47 hasues Anyway, sorry for giving you a pet peeve earlier.  I just didn't want to spam up the channel with this when other people needed help.
04:47 whytewolf hey no problem. i understand.
04:47 hasues Yeah, I looked at OpenStack on Gentoo.
04:47 ws2k3 joined #salt
04:47 hasues For client.  Not as a compute node...that would be rough stuff.
04:48 ws2k3 joined #salt
04:48 hasues Plus, after rewriting this stuff for the 11th time, I was a bit frustrated :)
04:48 hasues I just really need to get some training on this so I can bounce ideas.
04:48 ws2k3 joined #salt
04:49 ws2k3 joined #salt
04:49 whytewolf https://imgur.com/gallery/HgSk1 my openstack setup
04:49 whytewolf the bottom server there is my salt master
04:49 ws2k3 joined #salt
04:49 hasues Oh wow, that's pretty cool.
04:49 hasues I feel for your power bill ;)
04:50 ws2k3 joined #salt
04:50 whytewolf lol. i live in vegas. so during the summer i HATE my power bill
04:50 hasues Hey, I had a rack like that years ago.
04:51 whytewolf for a chea rack it actually is really nice. got that one for about $150
04:51 hasues Is utilities expensive there?
04:51 hasues cool beans
04:51 whytewolf actually vegas is one of the cheaper places i have lived.
04:51 hasues What are you using for your block storage?  Ceph?
04:52 shanth_ joined #salt
04:52 whytewolf nfs, although on my next iteration since newton and above support synology directly it will be iscsi. through a newer synology system then the one there
04:53 whytewolf i thought about finding some cheap systems and building ceph, but my summer power bill tells me no
04:55 hasues Maybe if you could make a flash array and hardware you could suspend when you aren't using it?  No idea
04:56 whytewolf there is hardly a time i am not using it. and on the next iteration that usage will go up. as i plan to migrate my mediaserver into openstack [after the rebuild of coarse]
04:56 whytewolf i do currently shut it down when i am out of town.
04:58 hasues Have you ever taken a look at OpenNebula?
04:58 whytewolf not really.
04:59 hasues I was interested in using it at work, but OpenStack had so much momentum, they went with it and dumped it, then never looked at it either again.
04:59 beardedeagle joined #salt
05:00 whytewolf we use openstack at work. so it is helpful for me to stay current with openstack
05:00 sh123124213 joined #salt
05:00 hasues I want to.  I'm just trying to get skilled in AWS at the moment.
05:01 ws2k3 joined #salt
05:01 hasues So while I'm learning SaltStack for my own interest, I'm being discouraged in messing with it and doing CloudFormation and Jenkins, etc.
05:01 hasues Which I do for work, but I still like Salt Stack.
05:02 hasues I'm really interested in it after having using Chef and other tools.
05:05 whytewolf it can be interesting once you get into it.
05:05 hasues I thought it was.  I just kept being tasked to death so I could not give it the attention it needed.
05:05 whytewolf it happens
05:11 hasues wow, Asus servers.  Nice.
05:11 whytewolf they were cheap ;)
05:12 hasues I don't think I knew they made them.
05:13 whytewolf they were barebones systems
05:13 hasues The stuff on the bottom...the Dell and such I've had lots of those.
05:13 hasues I think mine were Silicon Mechanics or some such.
05:13 whytewolf yeap. most have seen lenovos and dells
05:14 hasues I used to have access to a ton of Sun X64 hardware, but I just didn't have the time to keep up with it so I let it go :(
05:15 whytewolf since oracle bought sun i stopped caring about sun hardware ... it was good hardware i just don't like oracle
05:15 hasues Exactly.
05:15 hasues I have three Sun x84 workstations sitting next to me right now.
05:16 hasues When the Oracle thing happened, I lost interest.  Granted, on the Sparc side, it really didn't matter.  It wasn't like Sun was making anything.  Fujitsu did the work.  The same stuff model per model was being sold by them; Sun just rebranded it.
05:17 whytewolf fujitsu was making sparc? huh, didn't know that
05:17 whytewolf oh you said x64
05:18 hasues Fujitsu was making all of Sun's Sparc hardware.
05:18 hasues Fujitsu has x64 as well, but I don't think Sun was rebranding that.
05:18 hasues You could literally go and look at the old T2000's on both sites.  One said Sun, the other said Fujitsu.
05:19 Bock joined #salt
05:19 whytewolf sparc used to be made by sun directly.
05:19 hasues Yeah, their older stuff.  But when their attempt at making the Gemini failed, all of it went to Fujitsu.
05:20 hasues So the M series and Niagra chips, etc...that was all Fujitsu
05:22 hasues https://www.oracle.com/servers/sparc/t7-1/index.html
05:22 hasues http://www.fujitsu.com/jp/products/computing/servers/unix/sparc/lineup/t7-1/
05:22 hasues :)  Same stuff
05:23 whytewolf yeah. I'm used to the ultraSPARC line which was all sun with texas instraments being the chip manufacture
05:24 whytewolf humm, T1 [the original niagra] was also Sun and TI
05:25 hasues Interesting.
05:25 whytewolf looks like what happened is they licensed fijitsu to manufacture computers based on the sparc chip.
05:25 hasues I know that TI and others are part of the Sparc Architecture committee as it is a standard.
05:26 hasues I was under the understanding that Fujitsu was making those CPUs as well.  I say this because even in the installation media, it had certain mention of CPU support, which mentioned the earlier models of Fujitsu CPUs.
05:27 hasues Ah, yes, the SPARC64 I think is what I was thinking of.
05:27 hasues UltraSparc was Sun, SPARC64 was Fujitsu
05:27 whytewolf ahhh yeah.
05:28 whytewolf i forgot SPARC64 was even a thing. i heard about them but never used them
05:28 felskrone joined #salt
05:29 whytewolf looks like UltraSparc t3 was the last sun chip. it was oracle after that
05:29 hasues That sounds right.
05:30 whytewolf and oracle changed it to just SPARC T4
05:30 hasues I used to keep up with that when I looked at openSparc, but that was years ago.  I think I left the Solaris world after managing M5's or some such.
05:31 whytewolf yeah I never got my hands on an M5. I was still working with 880's and 490R's and the like
05:31 hasues M5K...I think that is what it was.  I had M4Ks as well.
05:31 whytewolf we did have a couple of T1 Niagras
05:31 hasues I had some 880s and 890s as well.
05:31 whytewolf that never got used in my time with that compnay
05:31 hasues I had a 15K before the M5k
05:32 whytewolf yeah i worked at a newspaper for all this. the 880s were the biggest thing we had
05:32 hasues I guess they had snappier hardware that phased them out?
05:32 hasues Hah, I supported newspapers as well.
05:33 whytewolf stephens media was the company i was at. review journal being the biggest paper
05:33 ws2k3 joined #salt
05:33 hasues I was at E.W. Scripps.
05:33 hasues I used to run the servers that hosted Dilbert :P
05:33 whytewolf hehe nice
05:34 whytewolf i worked for the paper that created righthaven and tried to destroy copyright
05:34 ws2k3 joined #salt
05:34 whytewolf [they didn't like it when i told them it was a bad idea]
05:35 hasues I had never heard of it.  Interesting.
05:35 darioleidi_ joined #salt
05:35 hasues Seems like a bad idea if one is suing someone with no money.  If there is some way one could collect from their ad revenue, maybe.
05:36 hasues Interesting.  I read about it on Wikipedia.  I see the mention to Stephens.
05:37 swills joined #salt
05:37 swills joined #salt
05:37 whytewolf yeah. kind of the point i brought up. also brought up a lot of the companies they were suing were using the info under fair use
05:37 whytewolf i even told my boss at the time when he told me he was thinking of starting something like that up that it would backfire
05:38 whytewolf and it did.
05:38 whytewolf big time
05:38 hasues Looks like it, based on what I'm reading on what happened to Righthaven
05:41 whytewolf anyway, i need to get going.
05:41 hasues Yeah, same here.  Thanks again for your time.
05:41 swills_ joined #salt
05:41 whytewolf no problem :) have a good night
05:41 hasues You too!
05:45 TyrfingMjolnir_ joined #salt
05:45 hasues left #salt
05:47 swills joined #salt
05:47 swills joined #salt
05:53 oida joined #salt
05:59 swills joined #salt
05:59 swills joined #salt
06:04 mavhq joined #salt
06:16 sh123124213 joined #salt
06:19 ws2k3 joined #salt
06:27 do3meli joined #salt
06:27 do3meli left #salt
06:28 robin2244 joined #salt
06:29 ws2k3 joined #salt
06:32 robin2244 Hi All, someone can help me, i d'on't find anything about this in the documentation, it's possible to use file.replace for replace with grains value ?
06:39 sh123124213 joined #salt
06:43 kukacz joined #salt
06:44 kukacz_ joined #salt
06:44 mbuf joined #salt
06:46 icebal joined #salt
06:48 frdm joined #salt
06:58 rvairaashtak joined #salt
07:10 kukacz joined #salt
07:13 zulutango joined #salt
07:14 k_sze[work] joined #salt
07:18 darioleidi joined #salt
07:18 stanchan joined #salt
07:26 Hybrid joined #salt
07:27 Tucky joined #salt
07:30 mbuf joined #salt
07:35 TyrfingMjolnir_ joined #salt
07:38 Ricardo1000 joined #salt
07:45 ws2k3 joined #salt
07:46 ws2k3 joined #salt
07:54 JohnnyRun joined #salt
08:00 whatever joined #salt
08:01 pbandark joined #salt
08:03 mikecmpbll joined #salt
08:03 ws2k3_ joined #salt
08:03 Clarizen joined #salt
08:09 Clarizen joined #salt
08:14 avasiu joined #salt
08:15 Naresh joined #salt
08:16 Clarizen joined #salt
08:26 cyborg-one joined #salt
08:28 Mattch joined #salt
08:29 ws2k3_ joined #salt
08:29 permalac joined #salt
08:30 k1412 Hello everyone, I use file.managed to remplace a symlink but it look that it not remove the symlink, it is normal ?
08:33 permalac joined #salt
08:33 Reverend joined #salt
08:36 cablekevin joined #salt
08:37 permalac joined #salt
08:39 permalac joined #salt
08:49 hoonetorg joined #salt
08:50 ws2k3_ joined #salt
08:51 ws2k3_ joined #salt
08:51 ws2k3_ joined #salt
08:52 ws2k3_ joined #salt
08:52 ws2k3_ joined #salt
08:53 ws2k3_ joined #salt
08:53 ahrs joined #salt
08:58 mike25de k1412: can you post a link here to your code? a gist or smth?
08:58 mike25de so i can also test it.
08:58 k1412 mike25de: yes, 2min
08:58 mike25de robin2244: you want to do what with grains? replace a file based on a grain value?
09:00 k1412 mike25de: https://privatebin.net/?43ded4935d927691#7VimEl1izBbOJq8iH+omVKWVNe01FDPu9sjVgtH7PpI= it's only to replace the link between /etc/ldap/ldap.conf and /etc/sudo-ldap.conf with a new file directly
09:00 mike25de you are not replacing a link... but a file k1412
09:01 k1412 mike25de: ah so it follow the link ok
09:01 mike25de that state will copy a file from your salt repo to the /etc/bla bla on the minion - is that what you need?
09:01 mike25de or you need a symlink?
09:02 k1412 mike25de: manually i need to remove the link and copy the file so I have the 2 files separted
09:02 k1412 *separate
09:02 mike25de if you want symlinks use this: :https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.symlink
09:03 k1412 It's possible to only remove the link ?
09:03 mike25de sure you can remove a link
09:11 mike25de joined #salt
09:11 mike25de k1412: it seems my proxy is shitty
09:12 k1412 mike25de: no issue, I have solved it to use follow_symlinks = False in file.managed ^^
09:12 mike25de k1412: ah.. so your remote file was a symlink?
09:12 mike25de that's what wasn't clear for me.
09:13 k1412 mike25de: yes, I would only remove it and replace it with a true file (sorry i was not very clear)
09:13 mike25de ah now i got it :)
09:14 mike25de by default file.managed has the follow_symlinks=True
09:15 mike25de so you found the correct solution
09:15 mike25de :)
09:15 k1412 Thanks ^^, I didn't saw it at first time ^^
09:15 o1e9 joined #salt
09:16 mike25de k1412: it happened also to me 100 times... now when i use a state function first i check ALL the options :) which ones are enabled by default etc
09:16 mike25de there are a lot of options helpful that you don't know about until you RTFM :P
09:17 k1412 true, I begin with salt and I have always difficut for the syntax, when I need to add : or a - etc ^^
09:17 k1412 but little by little it's better
09:17 mike25de k1412: no worries i also mix them :P
09:18 N-Mi_ joined #salt
09:18 k1412 if one not work the other will ^^
09:18 mike25de these are my worse mistakes :) lists etc
09:18 mike25de you will get used to it
09:18 robin2244 mike25de: i want replace like a sed a value with grain value in my sls file. for exemple like that -> https://gist.github.com/anonymous/9220fa18231be89336e51e49f9620f9f
09:19 mike25de robin2244: let me test also... can you give me a sample from your zabbix as well?
09:19 mike25de so i test with your code
09:19 mike25de just a few lines...
09:19 mike25de where you want data to be replaced
09:23 robin2244 mike25de: https://gist.github.com/anonymous/4d9c8493ad399b916a235f911c48681c - Thanks a lot for your help
09:28 mike25de robin2244: got it
09:28 mike25de repl: {{ hostname }}
09:28 mike25de that's what you put wrong
09:28 mike25de when you need to output the string... you need to {{ myVar }}
09:29 mike25de in your case the state looks for string hostname instead of its value from the grains robin2244
09:29 mike25de that should do it
09:34 mike25de for my tests - it worked like a charm :P
09:35 robin2244 mike25de: ah ok, thanks a lot , i will try, do you know if it's possible to have multi pattern and repl in the same file.replace ? For exemple i want replace HOSTNAMEAGENT per {{ hostname }} and IPSERVER per static text and i want use only one file.replace not two
09:36 mike25de i am not sure that is possible... you have to look at the python search() function.
09:36 mike25de probably you have to do it twice.
09:37 robin2244 mike25de: Yes i think too, thanks again :-)
09:37 mike25de robin2244: why don't you deploy the zabbix config from the salt master? and in the config you can use whatever number of {{ vars }} that are being replaced at runtime... and on the minion the file gets in the desired state?
09:38 mike25de do you know what i mean? - i might not be explicit enough
09:41 zerocool_ joined #salt
09:41 cyborg-one joined #salt
09:46 robin2244 I use it like that i think, https://gist.github.com/anonymous/855df0b952afd34b0d26f78c90bc46e6, hese is an example
09:46 robin2244 *here is an example
09:47 kukacz joined #salt
09:53 mike25de robin2244: one sec... i will check it
09:54 robin2244 mike25de: no problem take your time :-)
10:11 smartalek joined #salt
10:11 smartalek joined #salt
10:13 mike25de robin2244: here you go
10:13 mike25de https://gist.github.com/anonymous/a7de368024768a8e313cb5536dc9385f
10:13 mike25de i think this one is a bit better than yours
10:13 mike25de you do not have to do replacements... AFTER you copy the file.. that is just extra work
10:14 mike25de you can do all at once:... you can pass variables from the salt state using file.managed defaults to your conf file.
10:14 mike25de while it is being deployed
10:14 mike25de after conf deploy you need to restart/start zabbix etc.
10:17 aldevar joined #salt
10:17 aldevar left #salt
10:26 kukacz joined #salt
10:28 mike25de robin2244: did you manage to test it? ... my webchat is disconnecting so i have no idea if you have responded to me or not :P
10:28 mike25de shitty proxy at my side :D
10:30 DammitJim joined #salt
10:30 DammitJim where do you guys normally save keys for licenses?
10:31 DammitJim I am configuring a repository on Ubuntu using salt and I have to set the key as part of the url for the repo as well as the key for the keyserver
10:34 mike25de DammitJim: sorry man... can't really help since i haven't used license keys...
10:34 mike25de or i do not... undestand maybe what keys :P
10:39 DammitJim nevermind about the licence keys
10:39 DammitJim however, I do want to know how one configures salt to manage repositories for ubuntu
10:39 DammitJim say I want to add a new repository... how does one set up the gpg key for that repo?
10:40 mike25de DammitJim: good point.. i think there was smth in the docs... i use mostly centos :) .. .let me see if i can find it..
10:41 mike25de DammitJim: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html
10:41 DammitJim yeah, I read that
10:41 mike25de that's about everything ... i know :P
10:42 DammitJim just trying to convert that information to what the docs from this product are
10:42 mike25de :( sorry can't be more helpful.  I am not an advanced salt user ... i try to get there :)
10:47 DammitJim joined #salt
10:53 permalac joined #salt
10:57 permalac joined #salt
10:59 permalac joined #salt
11:08 nku i have a huge state file i want to split up, and call some states individually. however, they often require something when i need an order, but i want to be able to run them without salt knowing the requirement is already fulfilled. how can i do this?
11:10 smartalek nku: Maybe wrap those declarations in jinja statements that use module calls that check to see if the requirement is fulfilled.
11:11 mike25de you can run a state but also include in it annother state
11:11 mike25de for ex... the pre-requisites can be a separate sls file that will be included in all your other states
11:11 mike25de just from the top of my head...
11:12 nku smartalek: i'll look into that, thanks
11:12 nku mike25de: the problem is that one state requires things that are in other states, but i want to run the first state without the requirements
11:12 mike25de and of course you can add jinja magic and salt-modules commands to make sure ... you have dependencies met.
11:12 nku the whole state file deploys a complex app, but sometimes i just need to upgrade one component of it
11:15 johnkeates joined #salt
11:15 mike25de nku: then you can check if for example the files you need to change exist... and you can then run the patch state
11:15 mike25de i hope i understood correctly :)
11:16 rawkode joined #salt
11:16 zerocool_ joined #salt
11:27 pbandark1 joined #salt
11:29 Reverend is there any way to get salt's cp.push_dir to push to like ~/mydir or does it -have- to be in /var/cache/etc/etc/etc
11:39 Reverend [ERROR   ][30767] {'ret': False} <-- lol. mad helpful. xD
11:47 ProT-0-TypE joined #salt
11:54 robin224_ joined #salt
11:57 zigurat_ joined #salt
11:58 zigurat_ Hey. Quick question I am looking to replace 3 lines in a file with pattern/repl. How can I do this. Subsequent mentions of '-patter' do not seem to work
11:59 dunz0r zigurat_: Block.replace?
12:02 zigurat_ The lines are randomly in the file
12:02 mike25de zigurat_: i think you have to run 3 states.. to do that ... one replacement at the time... BUT imho it would be easier if you manage- deploy the file from the salt server OR use blockreplace as dunz0r mentioned
12:03 mike25de if you deploy it from the master - then you can use the power of templating
12:03 zigurat_ Ok thanks. Ill see
12:03 mike25de i just made a short demo... 10 minutes ago for robin224_ .... i will give you now the code
12:03 dunz0r zigurat_: Ah, then you'd need three separate states, if it's different replacements for each pattern
12:04 dunz0r If it's the same replacement for each, you could write regexp that matches all three
12:04 mike25de he wanted to deploy some zabbix conf + some jinja magic + replacement... here it is
12:04 mike25de https://gist.github.com/anonymous/a7de368024768a8e313cb5536dc9385f
12:06 robin2244 joined #salt
12:07 debian112 joined #salt
12:09 mavhq joined #salt
12:21 bfrogs joined #salt
12:24 bfrogs left #salt
12:24 bfrogs joined #salt
12:24 zerocool_ joined #salt
12:26 Ali_ joined #salt
12:32 JonsBo_ joined #salt
12:34 JonsBo joined #salt
12:39 JonsBo Hi! I have a problem. I'm trying to make sure a mysql user exists, but I also need to make sure a package is installed/uninstalled before that(python-mysqldb). Found this bug: https://github.com/saltstack/salt/issues/36896 but how can I solve this using salt? Isn't the following example in the docs basically the same thing? https://docs.saltstack.com/en/latest/ref/states/index.html#reloading-modules Does anyone know why reload_modules
12:39 JonsBo aren't working? Any workarounds instead of running twice?
12:44 shoemonkey joined #salt
12:53 zerocool_ joined #salt
12:54 cliluw joined #salt
12:55 Ali_ left #salt
12:59 spiette joined #salt
13:00 debian1121 joined #salt
13:03 jdipierro joined #salt
13:09 ssplatt joined #salt
13:09 mavhq joined #salt
13:12 noobiedubie joined #salt
13:13 blademaster joined #salt
13:14 TyrfingMjolnir_ joined #salt
13:21 evle joined #salt
13:21 _JZ_ joined #salt
13:27 numkem joined #salt
13:39 mavhq joined #salt
13:41 debian112 joined #salt
13:42 high_fiver joined #salt
13:43 jespada joined #salt
13:45 numkem joined #salt
13:52 shoemonkey joined #salt
14:00 cgiroua joined #salt
14:06 swills joined #salt
14:09 cablekevin joined #salt
14:09 DammitJim joined #salt
14:20 swills joined #salt
14:23 swills joined #salt
14:23 swills joined #salt
14:25 fatal_exception joined #salt
14:30 onlyanegg joined #salt
14:37 darioleidi joined #salt
14:38 DammitJim if I want to add multiple repositories to the same repo list in /etc/apt/sources.list.d, do I need to add a pkgrepo.managed for each of the repositories?
14:40 mavhq joined #salt
14:40 mchlumsky joined #salt
14:41 zerocool_ joined #salt
14:43 Brew joined #salt
14:45 swills joined #salt
14:45 swills joined #salt
14:47 shoemonkey joined #salt
14:48 dmaphy joined #salt
14:49 racooper joined #salt
14:50 PsionTheory joined #salt
14:51 rawkode_ joined #salt
14:53 zerocool_ joined #salt
14:59 high_fiver joined #salt
15:02 swills joined #salt
15:02 swills joined #salt
15:02 ouemt joined #salt
15:06 zerocoo__ joined #salt
15:09 Jason1234 joined #salt
15:10 swills joined #salt
15:10 swills joined #salt
15:10 mavhq joined #salt
15:11 rgrundstrom_ joined #salt
15:11 onlyanegg joined #salt
15:12 rgrundstrom_ left #salt
15:15 shoemonkey joined #salt
15:15 zerocool_ joined #salt
15:17 zerocoo__ joined #salt
15:18 Inveracity joined #salt
15:22 jdipierro joined #salt
15:22 swills joined #salt
15:25 _aeris_ joined #salt
15:26 _aeris_ joined #salt
15:33 sarcasticadmin joined #salt
15:33 robin224_ joined #salt
15:52 kedare joined #salt
15:52 sjorge joined #salt
15:57 felskrone1 joined #salt
15:58 high_fiver joined #salt
15:58 pipps joined #salt
15:59 debian1121 joined #salt
16:00 pipps joined #salt
16:02 ouemt joined #salt
16:04 robin2244 joined #salt
16:06 shoemonkey joined #salt
16:14 stanchan joined #salt
16:18 dfinn joined #salt
16:19 aphor_ left #salt
16:19 aphor_ joined #salt
16:21 josuebrunel joined #salt
16:23 josuebrunel left #salt
16:25 sp0097 joined #salt
16:25 willprice joined #salt
16:31 sarcasticadmin joined #salt
16:37 stanchan joined #salt
16:46 agustafson joined #salt
16:50 sarcasticadmin joined #salt
16:57 sarcasticadmin joined #salt
16:58 impi joined #salt
16:59 sarcasticadmin joined #salt
16:59 sp0097 left #salt
17:00 scooby2 Whats the best way to edit a line of text in a file with salt? cmd.run w/ unless and then sed the line?
17:07 nixjdm joined #salt
17:09 Lionel_Debroux_ joined #salt
17:10 sjorge joined #salt
17:11 ouemt joined #salt
17:11 fritz09 joined #salt
17:15 merlincorey how can I run a state tree locally?  I'm hoping to be able to use something like `salt-call --local` but maybe somehow apply it directly to a state tree in a particular directory that is NOT actually "installed" locally.  Main idea is I am trying to test some states without going full-on testinfra just yet
17:22 DoomPatrol is there some documentation for caveats w/ using "includes"?
17:23 DoomPatrol having a sudden issue where the state to be included works on it's own but not when included in another state
17:27 DoomPatrol hrm should work per docs, "When other SLS files are included, everything defined in the included SLS file will be added to the state run."
17:31 sjorge joined #salt
17:31 whytewolf merlincorey: didn't you ask this yesterday and didn't we give you an answer of use --file-root and --pillar-root with your salt-call --local command?
17:33 whytewolf scarcry: file.line?
17:34 smartalek scooby2: If it's just one line, you might want to give file.replace a shot.
17:35 swills joined #salt
17:35 swills joined #salt
17:38 XenophonF joined #salt
17:50 wendall911 joined #salt
17:53 robin2244 joined #salt
17:55 XenophonF I really don't like how some boto_* states mix dictionary and string types.
17:56 XenophonF e.g., boto_lambda.function_present's Permissions kwarg takes a string in JSON format
17:57 XenophonF while boto_iam_role.present's policy_document and policies kwargs take dictionaries
17:57 wendall911 joined #salt
17:57 XenophonF so some times I have to use import_json and others I use import_text, and sometimes I use |yaml and others I use |yaml_encode (respectively)
17:58 merlincorey whytewolf: I did ask it yesterday but didn't have a hilite so I missed it among my 99999 windows -- thanks for the re-response
17:59 XenophonF only 99999 windows? newb
17:59 XenophonF ;)
17:59 merlincorey :P
17:59 merlincorey do you know off hand if `--file-root` plays nicely with `--pillar=` -- I can only assume it does and that I'll have to try it and see, but if there is a huge gotcha there would be nice to know before I try it here in a couple minutes ::
17:59 whytewolf i wish i only had 99999 windows per computer
17:59 sjorge joined #salt
18:00 whytewolf it should
18:00 merlincorey awesome thanks
18:00 merlincorey I'll test it shortly here, fingers crossed and thanks for the pointer
18:00 it_dude joined #salt
18:03 impi joined #salt
18:05 edrocks joined #salt
18:05 high_fiver joined #salt
18:07 high_fiver joined #salt
18:11 swills joined #salt
18:12 pipps joined #salt
18:13 sjorge joined #salt
18:14 XenophonF oh, I get it - boto_lambda.function_present Permissions is a list of policy Statements
18:14 XenophonF RTFS FTW
18:17 XenophonF dammit messed up the git revert
18:17 XenophonF oh well
18:20 LeProvokateur joined #salt
18:23 nixjdm joined #salt
18:23 mikecmpbll joined #salt
18:25 noobiedubie joined #salt
18:26 LeProvokateur joined #salt
18:27 XenophonF didn't RTFS enough apparently
18:27 XenophonF OK the boto_lambda state applied and it might have even worked!
18:28 sjorge joined #salt
18:28 high_fiver joined #salt
18:30 swills joined #salt
18:31 ChubYann joined #salt
18:32 robin2244 joined #salt
18:34 LeProvokateur joined #salt
18:36 vegasq joined #salt
18:39 darioleidi joined #salt
18:39 pipps joined #salt
18:43 wendall911 joined #salt
18:47 sjorge joined #salt
18:57 robin2244 joined #salt
19:00 sjorge joined #salt
19:14 sjorge joined #salt
19:14 sjorge joined #salt
19:22 J0hnSteel joined #salt
19:22 MTecknology XenophonF: what's the S part of that?
19:23 nixjdm joined #salt
19:27 whytewolf my guess. script
19:27 whytewolf or source
19:29 robin2244 joined #salt
19:34 tom29739 joined #salt
19:35 brokensyntax joined #salt
19:35 Kartul joined #salt
19:38 J0hnSteel joined #salt
19:41 bildz im finding that local.cmd_full_return timing out before the return output comes back.  is there a longer timeout threshhold I can add?
19:43 DammitJim joined #salt
19:46 colabeer joined #salt
19:48 cyborg-one joined #salt
19:49 impi joined #salt
19:52 pipps joined #salt
19:54 debian112 joined #salt
19:55 pipps joined #salt
19:59 Rubin joined #salt
20:03 robin2244 joined #salt
20:03 pipps joined #salt
20:12 pipps99 joined #salt
20:18 jespada joined #salt
20:21 ProT-0-TypE joined #salt
20:23 numkem joined #salt
20:23 nixjdm joined #salt
20:29 debian1121 joined #salt
20:29 pbandark joined #salt
20:30 vtolstov joined #salt
20:31 vtolstov hi! when i'm running state.highstte on minion i see that message: Passing on saltutil error. This may be an error in saltclient. 'retcode'
20:31 vtolstov 'm try to google it and now found the root of this issue. As i see this messages present only when i'm use my own state module
20:32 pipps joined #salt
20:32 vtolstov this is my module http://git.sdstack.com/vtolstov/salt/raw/master/_modules/drone.py this is my state module http://git.sdstack.com/vtolstov/salt/raw/master/_states/drone.py
20:34 shanth_ joined #salt
20:36 shanth_ salt doesn't seem to handle doing file.recurse on largish directories (100-200MB) as it takes 5-10 minutes per run. there are certain projects that we download from source, make modifications to and push out the project. am i better off trying to make a package and push it like that?
20:38 doubletwist Any suggestions on the best way to handle configuring iptables? The iptables-formula on github seems old-ish and doesn't actually work as documented.
20:39 doubletwist Esp need the ability to configure common rules that apply to all hosts, and to add additional rules as needed depending on service/role.
20:40 doubletwist or maybe via firewalld?
20:43 coredumb doubletwist: I think I'd do that with pillars
20:43 MTecknology shanth_: You should have a local repo with a branch for your modifications and use git.latest
20:44 shanth__ joined #salt
20:44 coredumb a default list of rules from a default pillar that could be merged/overriden by specific rules from specific pillar
20:44 coredumb or the likes
20:44 coredumb depend of you pillar setup
20:45 doubletwist pillar setup is very basic at this point because I'm a salt-stack n00b and this is only the 3rd or 4th thing I'm attempting using salt
20:45 merc joined #salt
20:46 doubletwist This is a small proof of concept as I decide whether to use salt, ansible or puppet
20:47 coredumb doubletwist: should be taken care of with 2 or 3 pillar files for your poc :)
20:47 coredumb and salt event bus and reactor system beats the other ones anyway :^P
20:47 shanth_ joined #salt
20:47 doubletwist Except I'm still trying to wrap my head around how this works and fits together, and I can't find crap as far as good examples goes
20:48 doubletwist All the examples go from "here's something SUUUUPER basic that nobody will actually use in a real environment" to "Here's something SUUUUUPER complex that took us years to hack together and 90% of which doesn't apply to anyone else" :)
20:48 doubletwist Though that's also true for the other CM solutions.
20:48 doubletwist it's really driving me nuts
20:49 coredumb well keep it simple
20:49 coredumb pillars is your datas
20:49 coredumb states your code that uses the datas
20:49 marceloneil joined #salt
20:49 coredumb from there do what you want :)
20:49 doubletwist Yeah I've got that part down. It's the formatting of each that eludes me
20:49 marceloneil Is anyone here familiar with the python bindings for salt cloud?
20:51 robin2244 joined #salt
20:52 armguy joined #salt
20:54 viq doubletwist: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.iptables.html in states that have services listening?
20:54 shanth__ joined #salt
20:54 viq doubletwist: .insert for the common rules, and then .append eg in apache state, dovecot state, etc
20:55 viq Also possibly https://docs.saltstack.com/en/latest/topics/tutorials/states_pt3.html#extend-declaration
20:55 viq marceloneil: is this a survey?
20:56 marceloneil viq: No, I'm just struggling a bit with it
20:57 viq marceloneil: then give people a chance and ask the actual question
21:02 marceloneil viq: Sorry! I just can't find much documention on salt.cloud.CloudClient. The "path" and "config_dir" parameters are both optional, however it seems to Error without the "path" parameter. I don't know what config files/directories I am supposed to assign to each parameter
21:02 doubletwist viq: Thanks. I'll see if I can figure out something functional from that
21:07 marceloneil nvm, I seem to have figured it out. A cloud config file is required (it can be blank), which is assigned to the profile parameter.
21:07 keldwud joined #salt
21:08 keldwud joined #salt
21:10 mavhq joined #salt
21:15 darioleidi joined #salt
21:17 fatal_exception joined #salt
21:19 onlyanegg joined #salt
21:20 Hypercube32 joined #salt
21:22 nixjdm joined #salt
21:33 pualj joined #salt
21:40 mavhq joined #salt
21:40 Shirkdog joined #salt
21:52 mechleg joined #salt
21:58 sarcasticadmin joined #salt
21:59 onlyanegg In a formula, what should go into settings.sls vs map.jinja?
22:04 MajObviousman that has never been clear to me
22:05 MajObviousman I assume you'd want a default of every datum which could possibly come from the map.jinja in the settings.sls
22:05 MajObviousman such that if it is not present in the map, you still have a value that you can trap for
22:06 robin2244 joined #salt
22:08 jdipierro joined #salt
22:09 Deliant joined #salt
22:10 onlyanegg I thought it was more like map.jinja is for distribution specific values and settings.sls is more for configuration of the service... but I've seen some deviation from that
22:14 smartalek joined #salt
22:20 rpb joined #salt
22:23 nixjdm joined #salt
22:28 ecdhe joined #salt
22:28 rawkode joined #salt
22:28 iggy settings.sls vs defaults.yaml
22:28 rawkode joined #salt
22:29 iggy and there are no hard rules... mostly because every piece of software has it's own oddities
22:33 justanotheruser joined #salt
22:34 onlyanegg what are you saying about settings.sls vs defaults.yaml?
22:38 keldwud joined #salt
22:47 robin2244 joined #salt
23:00 ahrs joined #salt
23:06 pipps joined #salt
23:10 debian112 joined #salt
23:10 mavhq joined #salt
23:15 debian1121 joined #salt
23:23 twiedenbein joined #salt
23:28 hemebond Hmm. Even if a package is installed already, if Apt throws an error the states all fail.
23:34 pipps joined #salt
23:39 jmiven joined #salt
23:45 debian112 joined #salt
23:53 noraatepernos joined #salt
23:58 armguy joined #salt

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