Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-10-16

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

All times shown according to UTC.

Time Nick Message
00:01 Sec joined #salt
00:06 jas02 joined #salt
00:08 ronnix joined #salt
00:10 synical joined #salt
00:20 jab416171 joined #salt
00:24 amontalban joined #salt
00:25 knikolov joined #salt
00:29 netcho_ joined #salt
00:51 eseyman joined #salt
00:57 shakalaka joined #salt
01:04 catpigger joined #salt
01:05 cryptolukas How can I use grains in a pillar.sls like .. mydestination: localhost, localhost.localdomain, grains['ip4','ip6']
01:15 hemebond cryptolukas: salt['grains.get']('oscodename')
01:16 hemebond or whatever grain you want
01:17 hemebond You can list grains from the command line using "salt minion grains.list"
01:21 cryptolukas yes that clear. But how it works when you want to set a grain value in a pillar file i.e. mydestination: localhost, localhost.localdomain, salt['grains.get']('ip4')  on the minion machine mydestination: localhost, localhost.localdomain, 233.233.233.233
01:22 hemebond Oh you want to set grains?
01:24 hemebond Wait, settings grains via pillars doesn't make sense.
01:25 amcorreia joined #salt
01:25 knikolov joined #salt
01:26 cryptolukas ok. I should this solve in an other way. I thought this a good idea ^^
01:27 hemebond What are you trying to do?
01:27 hemebond (at a higher level)
01:29 edrocks_ joined #salt
01:31 cryptolukas i want to configure my postfix with salt. In normal case mydestination: localhost, localhost.localdomain. I want to prevent that my own ip isn't in this. So I want that salt set my ip. So i can't do a fail in the pillar :)
01:31 hemebond Well you can use grains in your pillars
01:32 hemebond And the pillar should be used by the postfix state/formula.
01:33 cryptolukas and how is the config in such case? I didn't find out yet.
01:34 hemebond Sorry, I don't understand.
01:34 cryptolukas sorry. its late
01:35 cryptolukas hemebond: Well you can use grains in your pillars How work this?
01:35 hemebond {{ salt['grains.get']('grainname') }}
01:36 hemebond https://docs.saltstack.com/en/latest/topics/pillar/index.html
01:37 jas02 joined #salt
01:46 sebastian-w joined #salt
01:46 cryptolukas ok
01:46 cryptolukas i understand it.
01:46 hemebond 👍
01:48 ilbot3 joined #salt
01:48 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
02:12 ZachLanich Hey guys, I can't for the life of me get this varnish saltstack formula working. I'm not sure the gitfs backend is working at all
02:12 ZachLanich Help?
02:12 hemebond ZachLanich: Need details :-)
02:12 ZachLanich Ok...Let me gather
02:12 hemebond I only have a vague idea what Varnish is.
02:13 ZachLanich I forked this: https://github.com/wecreatellc/varnish-formula
02:14 ZachLanich Salt Master Conf: http://pastebin.com/04i1BVvP
02:15 ZachLanich My Vagrant file tree (states in general work fine here in the "roots" backend: http://dp.wecreate.com/17TX2
02:15 ZachLanich top.sls: http://dp.wecreate.com/1iNc6
02:16 ZachLanich Error: http://dp.wecreate.com/rOZJ
02:16 ZachLanich I already installed python-git
02:17 ZachLanich Restarted salt-master service and the whole server for good measure
02:17 ZachLanich Varnish is just a key-store caching mechanism/web accelerator
02:17 ZachLanich The formula itself won't even run
02:18 ZachLanich I don't think the backend is working based on the error
02:20 hemebond Wait...
02:20 hemebond Are you using the gitfs correctly?
02:20 ZachLanich Idk lol. I read the docs.
02:20 hemebond Oh, you are.
02:21 hemebond Just seemed odd that it was in the gitfs_remotes
02:21 ZachLanich Straight out of the Formulas docs
02:21 hemebond Where are your pillars?
02:21 ZachLanich Seemed like it was all pretty easy. Just doesn't work lol
02:22 ZachLanich Sorry, that wasn't in the SS: http://dp.wecreate.com/1c7OZ
02:22 hemebond If you do a pillar.items on your minion does it list all the pillars?
02:23 ZachLanich Pillar file: http://pastebin.com/i7twgTnv
02:23 ZachLanich Let me see
02:23 shakalaka joined #salt
02:23 ZachLanich Seems like it doesn't even get that far: http://dp.wecreate.com/168t1
02:24 ZachLanich Complains about the sls
02:24 hemebond Sorry, I meant where are your pillar files and where is pillar_roots defined in your master config?
02:24 ZachLanich Wait...
02:25 ZachLanich I think my failure to put .sls on the pillar file might be my screw up
02:25 hemebond Yes, it can't find the pillar data.
02:25 hemebond And I can't see where you are configuring your pillars.
02:25 ZachLanich Ok, Pillar works now, still get the error lol
02:25 hemebond Pillars are parallel to states, not a part of them.
02:26 hemebond What do you mean pillar works?
02:26 hemebond Does it show your pillars?
02:26 ZachLanich pillar.items shows my data now that I corrected the file name
02:26 knikolov joined #salt
02:27 ZachLanich Wait, ok now state.apply runs it (albeit with 6/6 failed lol) but it just doesn't work when you call it straight like so: salt 'edge_1' state.apply varnish
02:27 hemebond What is the state.apply error now?
02:28 hemebond Could that be because you need varnish.repo and varnish.conf too?
02:28 hemebond You can include those on the state.apply like
02:29 hemebond It takes a comma-separated list.
02:29 ZachLanich http://pastebin.com/MzHKNDeg
02:29 ZachLanich I think there are default values for all of those without e overriding anything
02:32 shakalaka joined #salt
02:33 ZachLanich I'm not certain this formula is up to date with the correct repo info according to the docs...:http://book.varnish-software.com/4.0/chapters/Appendix_G__Solutions.html#solution-install-varnish
02:33 hemebond There are no xenial packages.
02:34 hemebond Oh you have to have a username and password for the new repo. boo
02:35 ZachLanich No, only for Varnish Cache Plus, which is the paid version
02:35 hemebond Although that varnish-cache site has Jessie
02:35 ZachLanich I use: "To use the varnish-cache.org repository" ...
02:35 hemebond Right. So there are no Xenial packages available, that's why it fails.
02:36 ZachLanich I think it works if I do all this by hand though
02:36 ZachLanich So it's just the SLS making assumptions?
02:36 hemebond But... no Xenial package http://repo.varnish-cache.org/ubuntu/dists/
02:36 hemebond You are running Xenial so it will look for Xenial packages.
02:37 hemebond You could possibly override that particular setting via a pillar.
02:37 hemebond Forcing it to install the package for a previous Ubuntu version.
02:38 ZachLanich I think I used the trusty version on the version I have running on DO
02:39 ZachLanich I must have...: https://www.varnish-cache.org/lists/pipermail/varnish-misc/2016-May/024943.html
02:40 ZachLanich I can override repo.sls, so let's try tweaking
02:47 ZachLanich Im getting closer...
02:48 ZachLanich Signature by key E98C6BBBA1CBC5C3EB2DF21C60E7C096C4DEFFEB uses weak digest algorithm (SHA1)
02:51 ZachLanich I'm having trouble figuring out how to Salt's pkgrepo module to make Varnish's install instructions happen
03:04 DEger joined #salt
03:08 jas02 joined #salt
03:09 amontalban joined #salt
03:09 amontalban joined #salt
03:27 flowstate joined #salt
03:27 knikolov joined #salt
03:31 edrocks joined #salt
03:31 DEger joined #salt
03:33 zulutango joined #salt
03:38 jenastar joined #salt
03:39 DEger joined #salt
03:53 |aaron what IDE do you guys use to mange your salt files? i normally like jetbrains stuff but the support in pycharm for jinja+yaml is pretty lacking..
03:54 ronnix joined #salt
03:55 Cidan joined #salt
03:56 hemebond I just edit with Sublime Text.
04:11 DEger joined #salt
04:17 flowstate joined #salt
04:18 DEger joined #salt
04:18 MTecknology |aaron: I use vim and git
04:19 MTecknology OH! also ls and cd!
04:20 MTecknology cd re<tabe>sa<tab>st<tab>; vim s<tab>f<tab>gog<tab>; type things; ZZ; git commit -am 'foo bar'; git push
04:21 lompik joined #salt
04:28 knikolov joined #salt
04:34 netcho_ joined #salt
04:36 DEger joined #salt
04:36 |aaron MTecknology: yeah thats what ive been doing with nano but its just so much slower than a proper ide
04:37 jas02 joined #salt
04:43 knikolov joined #salt
04:44 flowstate joined #salt
04:50 DEger joined #salt
04:55 oida joined #salt
05:06 DEger joined #salt
05:07 DEger joined #salt
05:08 DEger joined #salt
05:10 g3cko joined #salt
05:11 amontalban joined #salt
05:11 amontalban joined #salt
05:13 sybix joined #salt
05:15 flowstate joined #salt
05:18 MTecknology |aaron: ya, because you're using nano
05:18 sunkist joined #salt
05:19 DEger joined #salt
05:19 sybix joined #salt
05:20 |aaron yeah idk if ill ever have the wherewithal to join the vim master race. i like an intuitive editor
05:21 MTecknology what's intuitive about nano? The shortcuts listed at the bottom?
05:22 |aaron i cant stand the separate modes in vi
05:22 MTecknology then go with emacs
05:23 |aaron yeah maybe i should look into it ive never tried it
05:24 |aaron doesnt it require a ton of configuration to get full fledged IDE features though?
05:24 MTecknology irunno... never touched it
05:24 MTecknology that's a lie; I'll never touch it again is what I meant
05:25 DEger joined #salt
05:25 |aaron can you even get advanced ide features in emacs / vim? complex dependency management? im reading you cant
05:26 MTecknology I choose vim because it's simple and out of my way. To be honest, I don't think of separate modes. I just think of getting places and making changes. Error on line 4587?  :4587<enter> Need to try some new line but want to copy the old and just comment it for easy reference? yypi#<esc>  or // instead of #
05:26 MTecknology what kinda dependency management do you need?
05:26 MTecknology Oh! There's a neat tool for salt+vim
05:26 MTecknology https://github.com/saltstack/salt-vim
05:27 MTecknology auto-indent, pretty syntax highlighting, highlights some common errors
05:27 MTecknology like -include: vs. -includes:
05:28 |aaron well for php symfony, java..
05:28 |aaron not salt as much i guess
05:28 MTecknology I also like that "vi" is pretty much everywhere; vim is /almost/ always there, but I've never seen vi not be available
05:29 samodid joined #salt
05:30 |aaron yeah i know just enough vi to make quick edits to a file for that reason lol
05:31 MTecknology Try to avoid using arrow keys and stop doing :qw!
05:31 MTecknology just... don't ever, ever, *EVER* do :wq! again
05:32 MTecknology ZZ
05:32 MTecknology ^ that has other variations, but that's what I use 99.9% of the time
05:33 edrocks joined #salt
05:34 MTecknology |aaron: vim vs. emacs, though... kinda like irssi vs. emacs
05:34 |aaron i probably should just bite the bullet and spend a month or however long getting the ideal emacs setup
05:34 cyteen joined #salt
05:35 MTecknology or firefox vs. chromium vs. emacs
05:35 |aaron haha
05:35 MTecknology I wonder how long until emacs has systemd integration :S
05:37 |aaron HAH
05:37 |aaron pretty sure thats how skynet is born
05:39 MTecknology I wonder if 7 very reliable Stratum 1 NTP servers is too many to be synchronizing time from? :P
05:39 MTecknology I have written permission for all of them too; granted I only have a single host talking to them.
05:40 MTecknology Every other system, including any VPS, pulls from that guy. I figure, if they get a bit off, they should all get approximately the same bit off.
05:41 DEger joined #salt
05:47 cyteen joined #salt
05:51 angvp joined #salt
05:51 Ni3mm4nd joined #salt
05:52 MTecknology |aaron: if you want anything for vim, I can give you my .vimrc
05:53 MTecknology http://dpaste.com/010E6MB
05:54 MTecknology Also, that means I can open a file in vim I haven't messed with in weeks, and I'll still retain all the undo history. :)
05:54 * MTecknology likes him some vim!
06:08 jas02 joined #salt
06:08 Ni3mm4nd joined #salt
06:16 samodid joined #salt
06:17 flowstate joined #salt
06:35 netcho_ joined #salt
07:11 netcho_ joined #salt
07:13 amontalban joined #salt
07:13 amontalban joined #salt
07:17 flowstate joined #salt
07:34 edrocks joined #salt
07:37 jas02 joined #salt
07:37 ronnix joined #salt
07:49 ruxu joined #salt
08:15 flowstate joined #salt
08:15 amontalban joined #salt
08:15 amontalban joined #salt
08:16 netcho_ joined #salt
08:29 ivanjaros joined #salt
08:30 lovecraftian joined #salt
08:30 lovecraftian joined #salt
08:35 sgo_ joined #salt
08:37 armin joined #salt
08:47 cyteen joined #salt
09:08 jas02 joined #salt
09:15 infrmnt joined #salt
09:16 flowstate joined #salt
09:36 edrocks joined #salt
09:38 komputes joined #salt
10:00 sgo_ joined #salt
10:07 Trauma joined #salt
10:09 hemebond Is the 'init' grain the proper way to detect the service provider in a state?
10:12 hemebond Nevermind, found a better way.
10:14 west575 hemebond: what did you find?
10:14 hemebond {% if salt['test.provider']('service') != 'systemd' -%}
10:14 flowstate joined #salt
10:15 hemebond Found that in the nginx formula.
10:15 cyteen joined #salt
10:16 lero joined #salt
10:16 amontalban joined #salt
10:16 DarkKnightCZ joined #salt
10:17 mikecmpbll joined #salt
10:29 samodid joined #salt
10:30 DEger joined #salt
10:42 jas02 joined #salt
10:55 DarkKnightCZ joined #salt
11:08 netcho_ joined #salt
11:14 flowstate joined #salt
11:23 artemz joined #salt
11:29 amcorreia joined #salt
11:35 ivanjaros3916 joined #salt
11:38 edrocks joined #salt
11:40 ivanjaros joined #salt
11:43 ivanjaros joined #salt
11:45 rpb joined #salt
11:55 rpb joined #salt
12:04 samodid joined #salt
12:05 mavhq joined #salt
12:08 samodid joined #salt
12:09 netcho_ joined #salt
12:10 DarkKnightCZ joined #salt
12:10 abednarik joined #salt
12:14 flowstate joined #salt
12:18 amontalban joined #salt
12:25 mibr0 joined #salt
12:33 msdogado joined #salt
12:35 msdogado Hi guys. I am chasing for that for a while already but i can not manage to get it running. I want to check on running iptables rules within my top state and in case there is a difference between the running rules and the rules i provide via a managed file. If so it should reload/start iptabels
12:35 msdogado any ideas on how to react on changes to the running iptables rules?
12:36 msdogado reactor with inotify does not realy work aswell
12:47 abednarik joined #salt
12:47 voileux joined #salt
12:55 sunkist joined #salt
12:55 sunkist joined #salt
13:02 XenophonF joined #salt
13:10 netcho_ joined #salt
13:14 flowstate joined #salt
13:17 jas02 joined #salt
13:22 lionel joined #salt
13:35 Ni3mm4nd joined #salt
13:40 edrocks joined #salt
13:47 AirOnSkin joined #salt
13:52 nidr0x joined #salt
13:52 DarkKnightCZ joined #salt
13:54 samodid joined #salt
13:56 deus_ex joined #salt
14:08 Rumbles joined #salt
14:11 raspado joined #salt
14:12 netcho_ joined #salt
14:15 flowstate joined #salt
14:20 amontalban joined #salt
14:20 amontalban joined #salt
14:22 abednarik joined #salt
14:27 cyteen joined #salt
14:31 DEger joined #salt
14:33 mikecmpbll joined #salt
14:38 netcho_ joined #salt
14:42 Ni3mm4nd joined #salt
14:44 jas02 joined #salt
14:47 cyborg-one joined #salt
14:49 msdogado Hi guys. I am chasing for that for a while already but i can not manage to get it running. I want to check on running iptables rules within my top state and in case there is a difference between the running rules and the rules i provide via a managed file. If so it should reload/start iptables. Any ideas on how to react on changes to the running iptables rules? reactor with inotify does not realy workout for me
14:52 cyteen joined #salt
14:56 justanotheruser joined #salt
14:57 mrueg joined #salt
15:01 mrueg joined #salt
15:03 catpig joined #salt
15:09 q1x joined #salt
15:10 haam3r joined #salt
15:11 lovecraftian joined #salt
15:11 lovecraftian joined #salt
15:13 ruxu joined #salt
15:14 flowstate joined #salt
15:16 ruxu joined #salt
15:23 mrueg_ joined #salt
15:40 dh joined #salt
15:42 edrocks joined #salt
15:42 afics joined #salt
15:42 afics joined #salt
15:45 gentoo_ joined #salt
15:50 mavhq joined #salt
15:53 ruxu joined #salt
15:58 ruxu joined #salt
16:03 DEger joined #salt
16:10 sgo_ joined #salt
16:15 flowstate joined #salt
16:25 jas02 joined #salt
16:29 deus_ex joined #salt
16:29 whitenoise joined #salt
17:09 cyteen joined #salt
17:15 sp0097 joined #salt
17:15 sp0097 left #salt
17:22 deus_ex joined #salt
17:22 LexEither joined #salt
17:23 LexEither left #salt
17:30 DEger joined #salt
17:36 cyteen joined #salt
17:42 krymzon joined #salt
17:44 edrocks joined #salt
17:44 al is there a state module that can change simple key=value style config files?
17:45 al basically like salt.states.ini_manage, but without sections
17:52 mikecmpbll joined #salt
17:55 jas02 joined #salt
17:56 CeBe1 joined #salt
17:56 llua you used to be able to use ini_manage like that in older releases :/
17:58 llua states.augeas with the shellvars lens should be able to do it though
17:59 al llua, mkay, thanks
18:02 evle1 joined #salt
18:04 Sarphram joined #salt
18:11 al oh, actually this works
18:11 al ini.options_present:
18:11 al - sections:
18:11 al key: value
18:11 al in v2016.3.2
18:24 sgo_ joined #salt
18:28 llua doesn't it add a space around the =?
18:40 ronnix joined #salt
18:45 ronnix joined #salt
18:58 ivanjaros joined #salt
19:04 Rumbles joined #salt
19:13 _KaszpiR_ joined #salt
19:24 nidr0x joined #salt
19:26 ronnix joined #salt
19:34 justan0theruser joined #salt
19:38 ronnix joined #salt
19:38 sh123124213 joined #salt
19:38 jesusaur joined #salt
19:44 keimlink joined #salt
19:46 edrocks joined #salt
19:47 sp0097 joined #salt
19:47 sp0097 left #salt
19:50 sp0097 joined #salt
20:01 ProT-0-TypE joined #salt
20:09 ronnix joined #salt
20:12 shakalaka joined #salt
20:22 ZachLanich joined #salt
20:25 shakalaka joined #salt
20:26 jas02 joined #salt
20:30 ronnix joined #salt
20:34 shakalaka joined #salt
20:39 nsidhu joined #salt
20:46 shakalaka joined #salt
20:58 Trauma_ joined #salt
20:58 swills joined #salt
21:16 patrek_ joined #salt
21:24 shakalaka joined #salt
21:34 shakalaka joined #salt
21:41 justanotheruser joined #salt
21:46 abednarik joined #salt
21:48 edrocks joined #salt
21:53 theblazehen_ joined #salt
21:56 jas02 joined #salt
21:59 netcho_ joined #salt
22:00 mrueg joined #salt
22:03 raspado joined #salt
22:05 shakalaka joined #salt
22:06 mapu_ joined #salt
22:10 sgo_ joined #salt
22:11 jab416171 joined #salt
22:13 shakalaka joined #salt
22:18 msdogado I am looking for that for a while already but i can not manage to get it running. I want to check on running iptables rules within my high state and in case there is a difference between the running rules and the rules i provide via a managed file. If so it should reload/start iptables. Any ideas on how to react on changes to the running iptables rules? reactor with inotify does not realy workout for me
22:24 shakalaka joined #salt
22:26 jab416171 joined #salt
22:33 knikolov joined #salt
22:43 sp0097 joined #salt
22:49 sp0097 joined #salt
22:53 CampusD joined #salt
22:53 CampusD Hello, I was just wondering if anybody has seen an error like this before.
22:53 CampusD Failed to load ext_pillar cmdb_pillar: <RC=0x2[Authentication failed. You may have provided an invalid username/password combination], There was a problem while trying to send/receive your request over the network. This may be a result of a bad network or a misconfigured client or server, C Source=(src/bucket.c,784)>
22:54 CampusD I don't have access to the Saltmaster, we use git repos to push states and pillar data
22:54 CampusD I am thinking the gitfs pillar base is somehow disconnected somehow
22:54 hemebond You are apparently using CMDB as a source of Pillars.
22:56 CampusD that's not defined at the minion level right? I don't remember adding anything other than some custom grains on the minions
22:56 hemebond No, it will be on the master.
22:57 hemebond In a master+minion setup the pillars are collected and compiled on the master and only the result sent to the minion.
22:57 CampusD ok, that make sense, I've notified the team that has access to it, I guess I'll wait for their response
22:58 CampusD I have access to a git repo for my pillar data but I am not sure how they've setup the backend on the master to sync to that git repo
22:59 hemebond You can have lots of different sources for Pillars.
23:00 hemebond git, databases, regular YAML files..
23:03 CampusD I see, I know they've been talking about setting up some type of CMDB but they had not decided yet which
23:03 CampusD we'll see what they say, thanks for the details
23:13 shakalaka joined #salt
23:32 jas02 joined #salt
23:33 knikolov joined #salt
23:38 keimlink_ joined #salt
23:45 jab416171 joined #salt
23:47 cilkay joined #salt
23:50 cilkay Hello. I'm running 2016.3.3 on Debian 8. I have a state called "networking" with service.running that watches three files, /etc/network/interfaces, /etc/hosts, and /etc/hostname. I modify all three of those files in states the networking service doesn't get restarted as I would expect. I have to explicitly restart the service later for the changes to take effect. Why is that?
23:50 cilkay Shouldn't the watch on the file be sufficient to restart the service?
23:50 edrocks joined #salt
23:50 hemebond cilkay: Are you watching the state ID or are you trying to watch a file?
23:50 hemebond You can only watch other states.
23:51 cilkay I'm watching the file. Let me paste my code.
23:53 cilkay hemebond: https://gist.github.com/cilkay/28c7522d89ce12bd893da4a583f26535
23:55 hemebond You have "file: /etc/network/interfaces"
23:55 hemebond It should be "file: file_state_id" e.g., "file: interfaces"
23:55 cilkay Ah, whatever it's called above.
23:56 hemebond Yes. The first line in a state is the state ID.
23:56 hemebond For most modules the first line can be used as the state ID _and_ the name parameter value.
23:56 cilkay If I had called the "interfaces" state "fred", the watch should be "file: fred"
23:56 hemebond Correct.
23:56 cilkay OK, got it, thank you. This will clean up my states considerably.
23:57 hemebond 👍
23:57 cilkay I have many unnecessary restarts of daemons because I'd never understood this bit.
23:59 netcho_ joined #salt

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