Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-06-15

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

All times shown according to UTC.

Time Nick Message
00:05 wangofett joined #salt
00:19 johnkeates joined #salt
00:28 dxtr joined #salt
00:40 Rubin joined #salt
01:00 dxiri joined #salt
01:00 rem5 joined #salt
01:02 dxiri joined #salt
01:11 Yamazaki-kun joined #salt
01:13 Diaoul joined #salt
01:25 wangofett joined #salt
01:25 asyncsec joined #salt
01:31 cgiroua joined #salt
01:35 awpti joined #salt
01:47 Roh joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.5 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers <+> The call for speakers for SaltConf17 is now open: http://tinyurl.com/SaltConf17
01:49 hemebond joined #salt
01:49 hemebond So is pillar.show_top useless?
01:50 hemebond Doesn't seem to do anything useful. Doesn't even show the up-to-date data.
01:55 onlyanegg joined #salt
02:03 zerocoolback joined #salt
02:04 onlyanegg joined #salt
02:08 edrocks joined #salt
02:09 zerocoolback joined #salt
02:11 miruoy joined #salt
02:12 zerocool_ joined #salt
02:13 hemebond My master isn't even trying to compile the top.sls properly.
02:34 MTecknology Can network/interfaces.d/* globs not match files with a dot?
02:35 MTecknology I feel like I read that once before but I can't find it and the wordexp doc suggests otherwise
02:35 MTecknology .....
02:35 MTecknology doh!
02:35 hemebond MTecknology: Dunno. Got more context?
02:35 * MTecknology checks something...
02:39 MTecknology What's the default source line in ubuntu's etc/net/interfaces file?
02:39 MTecknology Is it source-dir or source?
02:40 hemebond what?
02:41 MTecknology source-directory uses a regex pattern instead of a glob like source .. for including extra files from interfaces.d/
02:52 MTecknology hemebond: context - https://github.com/saltstack/salt/pull/41754
02:57 hemebond Ah. No idea what that stuff is for.
02:58 hemebond Right now I can't even use pillars.... frickin master.
02:58 Roh joined #salt
03:03 dxiri joined #salt
03:05 evle joined #salt
03:08 Praematura joined #salt
03:30 mosen joined #salt
03:33 donmichelangelo joined #salt
03:39 hemebond omfg I figured it oooouuuuut.
03:40 hemebond While top files are merged, the list of files under each target is not :-(
04:10 edrocks joined #salt
04:15 dxiri joined #salt
04:19 Praematura joined #salt
04:32 wangofett joined #salt
04:33 stewgoin joined #salt
04:38 sgo_ joined #salt
04:53 patrek joined #salt
04:55 sgo_ joined #salt
04:55 Roh joined #salt
05:04 MTecknology hemebond: hm?
05:04 hemebond It was my had top.sls files in different environments.
05:04 hemebond *bad top.sls
05:05 hemebond I had the same pattern in multiple top.sls files.
05:05 hemebond A result of me shifting things around.
05:15 Bock joined #salt
05:24 samodid joined #salt
05:34 snakegums joined #salt
05:46 buhm joined #salt
05:49 rihannon joined #salt
05:54 drewbert joined #salt
05:56 drewbert https://docs.saltstack.com/en/latest/topics/transports/raet/index.html states that the version of RAET in 2014.7 is not complete, but does not suggest whether the current RAET is complete or not.
05:56 drewbert Is RAET compete? Is RAET recommended for embedded clients?
05:56 hemebond drewbert: It's not complete.
05:56 drewbert complete* derp
05:56 hemebond Use TCP if you want a newer transport.
05:57 drewbert I was just fighting getting 0mq on this embedded system, and raet looked slightly easier to install, that's why I'm asking. River tactics.
06:00 MTecknology raet was put on the shelf for indefinitely
06:01 drewbert Roger that. Seemed like an ambitious undertaking.
06:02 MTecknology there were a lot of other improvements that made raet less exciting so it just kinda fell to the side. I remember getting excited about it a few years back watching Tom talk about it at preconf.
06:08 dxiri joined #salt
06:12 do3meli joined #salt
06:12 do3meli left #salt
06:30 inad922 joined #salt
06:41 _KaszpiR_ joined #salt
06:41 aldevar joined #salt
06:49 CEH joined #salt
06:55 Deliant joined #salt
06:57 xet7 joined #salt
07:04 darioleidi joined #salt
07:04 Deliant joined #salt
07:10 dxiri joined #salt
07:13 Deliant joined #salt
07:14 samodid joined #salt
07:19 rgrundstrom joined #salt
07:20 rgrundstrom left #salt
07:20 rgrundstrom joined #salt
07:20 rgrundstrom Good morning
07:20 fracklen joined #salt
07:21 fracklen joined #salt
07:26 o1e9 joined #salt
07:27 rgrundstrom There must be a way to make this line shorter. Anyone that can help me out?
07:27 rgrundstrom - contents: 'createUser {{salt['pillar.get']('set_snmp_settings:set_snmp_user')}} SHA {{salt['pillar.get']('set_snmp_settings:set_sha_passwd')}} AES {{salt['pillar.get']('set_snmp_settings:set_aes_passwd')}}'
07:34 hoonetorg joined #salt
07:38 rgrundstrom Same line but in gist
07:38 rgrundstrom https://gist.github.com/anonymous/953a6bcda78c69a3c77a256cdc1ea261#file-gistfile1-txt
07:40 ccha joined #salt
07:44 coredumb rgrundstrom: I guess I'd put that in jinja variables
07:54 mugsie joined #salt
07:54 mugsie joined #salt
07:59 mikecmpbll joined #salt
08:08 losh joined #salt
08:10 Naresh joined #salt
08:10 rgrundstrom I did that now. It looks a lot better.
08:10 rgrundstrom coredump: thnx
08:11 dxiri joined #salt
08:12 coredumb rgrundstrom: well yw
08:12 coredumb calling on the pillar directly pillar[xxxx:xx] would also have reduced the character count but jinja variables would help with readability as well
08:14 edrocks joined #salt
08:17 oida joined #salt
08:19 ivanjaros joined #salt
08:26 pbandark joined #salt
08:30 Mattch joined #salt
08:33 Tomerzino joined #salt
08:44 candyman88 joined #salt
08:45 inetpro joined #salt
08:54 preludedrew joined #salt
08:57 N-Mi joined #salt
08:57 N-Mi joined #salt
09:00 mugsie joined #salt
09:00 mugsie joined #salt
09:12 OliverUK1 joined #salt
09:13 mt5225 joined #salt
09:22 mugsie joined #salt
09:22 mugsie joined #salt
09:24 candyman89 joined #salt
09:24 zulutango joined #salt
09:27 POJO joined #salt
09:30 ujjain joined #salt
09:30 ujjain joined #salt
09:35 Praematura joined #salt
09:46 candyman88 joined #salt
10:15 LondonAppDev joined #salt
10:15 edrocks joined #salt
10:16 evle1 joined #salt
10:21 dwfreed joined #salt
10:29 mugsie joined #salt
10:29 mugsie joined #salt
10:29 mt5225 joined #salt
10:33 nidr0x joined #salt
10:33 LondonAppDev joined #salt
10:34 nethershaw joined #salt
10:49 LondonAppDev joined #salt
11:03 nicksloan joined #salt
11:04 tent joined #salt
11:04 zerocoolback joined #salt
11:07 cb joined #salt
11:09 tent hello
11:09 tent I am quite new to saltstack, i was wondering if anyone could help me out with a problem
11:11 dstensnes post the problem, maybe someone has an answer :)
11:11 tent Allright, thanks
11:11 patrek joined #salt
11:11 dstensnes i can't promise anthing though
11:11 dstensnes :)
11:11 tent I understand :p let me type it out
11:12 mt5225 joined #salt
11:12 tent I get this message when i try to install docker on my minions :
11:12 tent E: Failed to fetch http://ppa.launchpad.net/saltstack/salt/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found               E: Failed to fetch https://repo.saltstack.com/~ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
11:13 tent So i found that i must update the apt repository right
11:13 tent but im such a newb that i dont know how to do that in the right way..
11:13 dunz0r tent: sudo apt-get update
11:13 tent Whenever i do that, i get the same msg
11:14 tent lots of ignore messages, well i had them
11:15 tent but i think i changed the wrong things with the add or remove repository
11:15 dstensnes http://ppa.launchpad.net/saltstack/salt/ubuntu/dists/
11:15 dstensnes doesn't appear to be an "xenial" path there
11:16 tent yes, i found that i must change the path to : https://repo.saltstack.com/#ubuntu
11:17 dstensnes so find the references to repo.saltstack.com in /etc/apt/sources.list.d
11:17 dstensnes remove those, and follow the instructions on https://repo.saltstack.com/#ubuntu
11:17 dstensnes don't know if ubuntu has an remove ppa functionality
11:18 dstensnes seems maybe
11:18 dstensnes https://askubuntu.com/questions/307/how-can-ppas-be-removed
11:18 dstensnes seems related
11:18 tent allright, i will try it out. thanks
11:19 dstensnes good luck!
11:19 dstensnes should maybe take some backups of configfiles or so too
11:19 dstensnes just in case
11:20 dstensnes tent: so you have somewhere to look up settings from before
11:20 dstensnes (i always do at least. Better to have, than not to have)
11:20 tent yea i will do that
11:20 tent thankyou!
11:20 dstensnes np :)
11:25 zerocoolback joined #salt
11:30 hemebond left #salt
11:32 tent well it didnt work :p
11:40 tent i changed the saltstack.list
11:40 tent but it still gives me the same message
11:40 tent so somehow it should be somewhere else right
11:41 LondonAppDev joined #salt
11:45 tent ah i come a bit futher :p
11:46 zerocoolback joined #salt
11:49 zerocool_ joined #salt
11:50 inad922 joined #salt
11:56 dstensnes tent: did you solve it?
11:57 tent yea! i finally got docker installed :P
11:57 tent now it gives me another error but okay. there is progress
11:58 dstensnes progress is good
12:00 tent yea :)!
12:02 amcorreia joined #salt
12:05 rem5 joined #salt
12:13 mt5225 joined #salt
12:15 thinkt4nk joined #salt
12:16 dxiri joined #salt
12:17 NeoXiD joined #salt
12:17 GnuLxUsr joined #salt
12:17 edrocks joined #salt
12:26 nicksloan joined #salt
12:29 onmeac joined #salt
12:30 onmeac Greetings, anyone here with knowledge on mater of masters/syndics?
12:35 dyasny joined #salt
12:38 dyasny joined #salt
12:41 edrocks joined #salt
12:41 impi joined #salt
12:42 noobiedubie joined #salt
12:45 gmoro joined #salt
12:48 cgiroua joined #salt
12:51 wangofett joined #salt
12:52 kulty joined #salt
12:54 cyteen joined #salt
12:58 asyncsec joined #salt
13:01 yuhl joined #salt
13:02 cyteen joined #salt
13:05 Phanes joined #salt
13:08 zerocoolback joined #salt
13:16 nicksloan joined #salt
13:24 mt5225 joined #salt
13:29 racooper joined #salt
13:33 mariusv joined #salt
13:46 mugsie joined #salt
13:49 mugundan joined #salt
13:50 LondonAppDev joined #salt
13:54 nicksloan joined #salt
13:55 xet7 joined #salt
14:01 manikandan joined #salt
14:06 JohnnyRun joined #salt
14:08 keltim joined #salt
14:10 edrocks joined #salt
14:16 PeterO joined #salt
14:26 lordcirth_work onmeac, don't ask to ask on IRC, just ask the real question
14:31 dstensnes Thou shan't ask to ask
14:31 socket- Can someone help me understand the difference between "win_wua.list_updates install=True" and "win_update.install_updates".
14:34 mt5225 joined #salt
14:34 lordcirth_work socket-, https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_wua.html#module-salt.modules.win_wua
14:34 lordcirth_work install_updates(guid=None) Installs updates that match the passed criteria. It may be easier to use the list_updates function and set install=True.
14:34 DammitJim joined #salt
14:35 lordcirth_work So with install_updates you need to specify a list of update GUIDs, with win_wua.list_updates install=True it just installs all updates
14:40 cyborg-one joined #salt
14:42 mugsie joined #salt
14:42 mugsie joined #salt
14:42 ivanjaros joined #salt
14:44 socket- ok, so with install_updates I actualy have to choose which ones to install, i can't just install everything available, but with list_updates, I can tell it to install everything listed. so if my goal is to push all security relevant updates, I should do list_updates with categories of critical, security... and do install=True
14:44 fracklen joined #salt
14:45 lordcirth_work socket-, according to the docs, that seems correct
14:45 socket- thanks
14:45 lordcirth_work socket-, bookmark https://docs.saltstack.com/en/latest/ref/modules/all/ and https://docs.saltstack.com/en/latest/ref/states/all/
14:47 fracklen_ joined #salt
14:47 patrek joined #salt
14:48 sarcasticadmin joined #salt
14:50 evle1 joined #salt
14:51 Praematura joined #salt
14:57 dxiri joined #salt
14:59 o1e9 joined #salt
15:00 preludedrew joined #salt
15:01 mt5225 joined #salt
15:03 megamaced joined #salt
15:04 mikecmpbll joined #salt
15:04 megamaced hi, I am trying to do a grains.present but only if a cmd.run returns true.. What is the best way to do that?
15:05 megamaced I tried grains.present -onlyif CMD but I keep getting error expected <block end>, but found '<block sequence start>'
15:09 Naresh joined #salt
15:11 dxiri joined #salt
15:11 darioleidi joined #salt
15:13 farcaller joined #salt
15:13 farcaller left #salt
15:13 farcaller joined #salt
15:14 farcaller hi. trying to debug a nasty jinja exception here: Rendering exception occurred: Jinja error: get() takes exactly 3 arguments (2 given)
15:14 farcaller caused by {{salt.pillar.get('net:primary_if')}} call in a sls
15:15 farcaller googling doesn't bring up anything really useful, other than to not use jinja dot syntax
15:15 farcaller but it seems to only affect salt-ssh, not salt
15:15 dstensnes get should have a default value if it doesn't exists, shouldn't it?
15:28 pbandark1 joined #salt
15:30 lordcirth_work megamaced, please paste a gist of your states
15:31 farcaller dstensnes: yep. I think it's some jinja bugotry :(
15:32 farcaller dstensnes: I wrote a new renderer that does `data_str.replace('salt.pillar.get(', 'salt["pillar.get"](')` and hooked it into master via `renderer: unfuck|jinja|yaml`
15:33 farcaller stumbling over so many errors as I move my well-polished salt stack to a new version / salt-ssh provisioning
15:36 Brew joined #salt
15:37 fracklen joined #salt
15:39 dxiri joined #salt
15:40 lordcirth_work farcaller, if there's a bug in salt-ssh, please check github for issues and make a bug report if there isn't one
15:41 farcaller lordcirth_work: I'm not sure if that's salt or jinja tbh
15:41 farcaller and not sure how to debug this thing
15:42 lordcirth_work farcaller, if a feature works in salt zmq and not salt-ssh, and there's no obvious reason, then it's probably a bug
15:42 lordcirth_work Regardless of what component is broken
15:42 farcaller I can only confirm that {{salt.pillar.get('one arg')}} is 100% failing on my notebook via salt-ssh, and works fine on my staging master. but then I have to run salt from head on notebook because of gpg being broken in last release
15:43 MajObviousman farcaller: I read that as "jinja bigotry" at first and I was super confused
15:43 MajObviousman like "Does Jinja care or even know if it's invoked via salt-ssh or not?"
15:43 farcaller jinja shouldn't. but jinja versions may differ
15:43 MajObviousman fair point
15:44 farcaller I would expect that with pip install I have latest and greatest jinja locally
15:44 lordcirth_work version mismatches are a common cause of problems
15:44 lordcirth_work farcaller, but do your python, salt-minion, jinja, etc versions match between master and minion?
15:44 ivanjaros3916 joined #salt
15:46 farcaller salt 2016.11.5 / jinja 2.8 / python 2.7.12+ on master. 2017.7.0-267-gcc72f1a / 2.9.6 / 2.7.10 on salt-ssh node. and there's no minion.
15:46 farcaller so everything is different
15:46 rihannon joined #salt
15:47 aldevar left #salt
15:50 fritz09 joined #salt
15:51 lordcirth_work farcaller, so, maybe you should change that
15:51 farcaller lordcirth_work: 2016.11.5 has a broken gpg, I can't use it on salt-ssh node :|
15:52 farcaller I guess I can spin up a test master from head, though
15:56 dxiri joined #salt
15:56 woodtablet joined #salt
15:57 heyimawesome joined #salt
16:02 sagi_ joined #salt
16:03 hosttor joined #salt
16:03 PatrolDoom joined #salt
16:04 mpanetta joined #salt
16:10 edrocks joined #salt
16:10 patrek joined #salt
16:10 dxiri joined #salt
16:18 KyleG joined #salt
16:18 KyleG joined #salt
16:18 nicksloan joined #salt
16:19 Praematura joined #salt
16:20 impi joined #salt
16:28 Madhu__ joined #salt
16:29 Brew joined #salt
16:32 wangofett joined #salt
16:34 dxiri joined #salt
16:34 mpanetta joined #salt
16:36 whytewolf farcaller: if salt['pillar.get'] works and salt.pillar.get does not. that isn't a jinja issue. that happens here https://github.com/saltstack/salt/blob/v2017.7/salt/renderers/jinja.py#L23-L42
16:37 farcaller aha.
16:37 farcaller thanks for pointing it out, I'll try to debug.
16:43 sgo_ joined #salt
16:46 dxiri joined #salt
16:48 onlyanegg joined #salt
16:48 nixjdm joined #salt
16:51 megamaced joined #salt
16:52 tiwula joined #salt
16:53 megamaced lordcirth_work: gist is https://gist.github.com/megamaced/46a91e6215fef93dac98b4cf2730ebc5#file-gistfile1-txt
16:53 megamaced I only want those commands to run once
16:54 megamaced so I want to set a grain, and then do an if grain not present, run the cmd
16:55 SalanderLives joined #salt
16:55 dxiri joined #salt
17:05 asyncsec_ joined #salt
17:06 nicksloan joined #salt
17:11 pasm joined #salt
17:12 dxiri_ joined #salt
17:19 Trauma joined #salt
17:32 johnkeates joined #salt
17:33 Shados joined #salt
17:36 dxiri joined #salt
17:42 edrocks joined #salt
17:47 woodtablet I see in the some pull requests comments and in the SaltStack Configuration Slidehare for a a module called slsutil.merge, but when I go to the Salt Documentation, slsutil only has one function, slsutil.render.. Am I glimpsing into the future or a dev version or someting ?
17:49 johnkeates https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.slsutil.html
17:49 johnkeates it's there
17:49 woodtablet grr: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.slsutil.html
17:49 woodtablet ahh
17:49 woodtablet develop vs latest
17:49 johnkeates indeed
17:50 woodtablet so it is the dev version
17:51 dxiri joined #salt
17:52 ahrs joined #salt
17:55 ChubYann joined #salt
17:57 riftman joined #salt
17:57 shanth im trying to set dns using pillars but the pillar data is not showing up for minions http://dpaste.com/2RV2ZSB is there something obviously wrong with my jinja?
17:58 woodtablet is this the whole gist ?
17:58 whytewolf shanth: {% if 'dallas' in grains['nodename'] %}
17:59 SalanderLives joined #salt
17:59 shanth so mine was not valid?
17:59 whytewolf no it was not
17:59 whytewolf * just means a * in ==
17:59 woodtablet ah nice catch whyte
17:59 whytewolf there is no language i know of that, that would have worked in
18:00 shanth oh wow
18:00 shanth how come https://docs.saltstack.com/en/latest/topics/jinja/index.html has examples like {% if grains['os'] == 'FreeBSD' %}?
18:01 shanth i couldn't make that with with {% if grains['os'] == '*Free* %} ?
18:01 whytewolf because grains['os'] can return FreeBSD
18:01 shanth so i cant use globs in jinja?
18:01 whytewolf but it won't return *Free*
18:02 shanth jinja  plz :(
18:02 whytewolf this isn't a jinja thing, this is a language thing
18:03 shanth but  {% if 'dallas' in grains['nodename'] %} will see if dallas exists in the string, it doesn't have to be an exact match right?
18:03 shanth my hosts are like minion.dallas.site.com
18:04 nixjdm joined #salt
18:04 whytewolf shanth: yes. in in this case is looking for a substring
18:04 shanth man, salt, lol
18:04 shanth just cant catch a break
18:04 whytewolf again. not a salt thing.
18:04 whytewolf this is python
18:04 shanth ahhh
18:05 whytewolf other langs have other ways of doing substring matching.
18:05 whytewolf but none that i know of do straight evaluation of regex style globs
18:05 shanth ahhh
18:08 woodtablet hey whytewolf: i really want 2 feature from salt (dev) version, are you by any chance running it ?
18:08 whytewolf hehe i don't work for salt ;)
18:08 whytewolf at least they don't pay me
18:09 woodtablet i know, but are you daring enough to run salt-dev in production ? lol
18:09 whytewolf i am not. and currently my dev machine is off while i recouple costs [i turned my openstack servers off for a while]
18:10 woodtablet ok, ill write my #!py shim, and wait. thanks! ^_^
18:11 Aleks3Y joined #salt
18:17 noobiedubie joined #salt
18:18 monjwf joined #salt
18:18 om2 joined #salt
18:20 cyborg-one joined #salt
18:20 schemanic joined #salt
18:20 bbbryson joined #salt
18:20 schemanic hello XenophonF are you around?
18:21 schemanic I'm unabashedly stealing your hostname state and I'm finding a jinja reference I cant locate in documentation
18:23 schemanic does anyone recognize 'grains.biosversion'
18:23 schemanic ?
18:23 dxiri joined #salt
18:25 lordcirth_work schemanic, what about it?  Shows up for me
18:26 schemanic I'm doing a grains.get biosversion and getting nothing on amazon linux
18:26 schemanic Is there a reason why that would happen?
18:26 lordcirth_work schemanic, well, it is a VM, they get to choose what they show
18:26 lordcirth_work schemanic, my salt-dev VM just says "VirtualBox"
18:26 schemanic point being that I'm not getting anything
18:26 lordcirth_work schemanic, as in, emptystring, or grain doesn't exist?
18:27 schemanic grains.ls doesn't even return 'biosversion'
18:27 schemanic and grains.get biosversion returns nothing
18:27 lordcirth_work schemanic, try grains.get manufacturer
18:28 lordcirth_work schemanic, but what exactly do you want biosversion for?
18:28 schemanic nothing
18:28 schemanic to grains.get manufacturer
18:28 schemanic I need it because it's in a state I'm using
18:28 schemanic The state is testing the operating system
18:28 schemanic to see if it's amazon linux
18:28 aldevar joined #salt
18:28 lordcirth_work schemanic, odd.  try grains.get virtual ?
18:29 lordcirth_work That's the canonical way to detect a VM
18:29 schemanic grains.get virtual returns 'xen'
18:29 schemanic it's not just detecting a vm
18:29 schemanic it's detecting Amazon Linux OS
18:29 lordcirth_work schemanic, so, you need to detect the distro, specifically?
18:29 lordcirth_work schemanic, what does /etc/lsb_release contain on Amazon OS?
18:29 lordcirth_work er, /etc/lsb-release
18:30 samodid joined #salt
18:30 schemanic Well yes, but I moreso want to know why someone is using this call to biosversion and it doesn't work, because the state is MEANT for Amazon linux
18:30 schemanic grains.get osfullname gets 'Amazon Linux AMI'
18:32 bluethundr joined #salt
18:32 aldevar left #salt
18:32 schemanic I guess I can key it to a different grain
18:34 schemanic can you tell me why I wouldn't have a biosversion grain?
18:36 whytewolf schemanic: the grain that build sbiosversion is rather complex with LOTS of reason it might not fill it out
18:36 whytewolf https://github.com/saltstack/salt/blob/9cf9cde6da908005e7d2636d2546f0e95f9b12cd/salt/grains/core.py
18:36 schemanic You're saying it's included or not included upon install?
18:36 shanth whytewolf: figured it out, i was using grains nodename when i meant to use grains id
18:36 shanth -_____-
18:37 whytewolf schemanic: it is the core grains module. it is there
18:37 schemanic You're saying it's not being provided a value though
18:38 schemanic because I'm getting back from saltstack: Rendering SLS 'base:hostname' failed: Jinja variable 'dict object' has no attribute 'biosversion
18:38 whytewolf I'm saying the function that sets biosversion either isn't running [which might be the case of you also don't have manufacture]
18:39 whytewolf and it might be for any number of reasons
18:39 whytewolf what salt version are you using?
18:39 afics joined #salt
18:39 schemanic 2016.11.5
18:39 whytewolf are you sure that minion has that version?
18:40 schemanic yes
18:42 whytewolf https://github.com/saltstack/salt/blob/v2016.11.5/salt/grains/core.py
18:42 whytewolf okay, then this is the version of core.py you have
18:42 whytewolf and we know it is running cause virtual and os are filled in
18:43 schemanic Alright, so then what's wrong, just that salt is trying to get that grain and the grain isn't showing up as returning because it has no value from the system?
18:44 whytewolf schemanic: i don't know. there are LOTS of reasons
18:44 schemanic hmm
18:44 schemanic okay. Thanks
18:45 whytewolf submit a bug report
18:45 whytewolf or read the code
18:46 whytewolf the part that does biosversion is close to a hundred lines on it's own
18:46 shanth works perfectly now woohoo im using jinja
18:46 DammitJim joined #salt
19:05 dxiri joined #salt
19:05 nixjdm joined #salt
19:08 nicksloan joined #salt
19:11 Renich joined #salt
19:18 fracklen joined #salt
19:19 DammitJim is it true that salt will create a unit for systemd for a service?
19:20 DammitJim or I need to create the unit and deploy it?
19:24 mikecmpbll joined #salt
19:26 dxiri joined #salt
19:29 nicksloan joined #salt
19:35 jbye joined #salt
19:36 jbye left #salt
19:36 jessebye joined #salt
19:37 iggy I've never seen salt create a unit file
19:37 iggy doesn't mean it won't do it under the right conditions
19:37 lordcirth_work DammitJim, Salt doesn't automatically make unit files that I know of
19:37 lordcirth_work Normally the package will include one
19:38 lordcirth_work I have made a few and installed them with file.managed
19:39 jessebye Hey all, I'm trying to use s3.put in a state using module.run, but having some trouble.
19:40 jessebye htpasswd_put_to_s3:   module.run:     - name: s3.put     - bucket: {{ npm.aws_s3_bucket }}     - local_file: {{ htpasswd_file }}     - path: /     - onlyif: 'test -e {{ htpasswd_file }}'
19:40 jessebye sorry, not sure how to format that better
19:41 UForgotten if someone has a moment to help me debug some jimja it would be greatly appreciated https://pastebin.com/7ha65G2y
19:41 UForgotten getting jinjivitis over here :(
19:42 iggy ugh... the adds, they kill
19:42 iggy *ads
19:43 nicksloan joined #salt
19:44 jessebye ah right, pastebin: https://pastebin.com/zpZu72Pq
19:45 UForgotten sorry. I should probably use github stash or something.  Basically this is probably somrthing I'm doing dumb. but I have other code that is similar that seems to work fine.
19:45 jessebye It returns "Module function s3.put executed", but the file is not in the root of the bucket.
19:45 cyteen joined #salt
19:45 dxiri joined #salt
19:48 DammitJim thanks lordcirth_work
19:49 DammitJim I created the unit and file.managed it
19:49 DammitJim then service.running - enabled and so on
19:49 schemanic Can anyone help me undertstand how to do roles in an ext_pillar
19:49 schemanic ?
19:51 iggy UForgotten: could you use ` | join(',')` instead of all that jinja? also, look at the loop variables instead of using that counter, also you should use ~ instead of +
19:52 UForgotten unfortuntaely not, I have to join the server and port
19:52 UForgotten and I tried ~ it did not make a difference, that was an entirely different rabbit hole
19:53 UForgotten because the port was actually an int, until I made it a str in the pillar I was getting typerror
19:53 jessebye Figured out my issue, the "path" needs to include the filename.
19:53 jessebye left #salt
19:53 portie joined #salt
19:54 UForgotten what do you mean about loop variables?
19:54 UForgotten I have other code that checks to see if it is iterable first but I tried seeing if it was iterable else setting it to something else, that didn't work either.  it's iterating, it's just not building the string. no feedback even with -l debug on salt-call
19:55 iggy UForgotten: http://jinja.pocoo.org/docs/dev/templates/#for
19:56 iggy there's a variable table right there
19:56 iggy i.e. loop.first might interest you
19:56 UForgotten ah, cool. I will look at that.
19:57 UForgotten is there a good doc that explains when to use {% vs {%- vs -%} vs %} ?
19:57 iggy don't really see a good reason why that wouldn't be working though
19:57 iggy http://jinja.pocoo.org/docs/dev/templates/#whitespace-control
19:57 iggy ^ re {% vs {%-
19:57 MTecknology UForgotten: the hyphen is for trimming whitespace. When you're screwing w/ yaml, it's typically silly
19:58 MTecknology When you're trying to write a nicely formatted config file from a template, it's a bit more useful.
19:58 iggy or if you're OCD like someone I work with
19:59 UForgotten Nice. TIL. Thanks for clarifying.  I'll go take a hatchet to this crap and see if I can get it to do the needful.
19:59 MTecknology https://gist.github.com/MTecknology/33b9e5a56fd5503484b5c4e77ae358e5 <-- generates a nice, pretty, and easy to read config for ferm.
19:59 MTecknology wow!
19:59 MTecknology I read that as hat-chet, as it... yet another hipchat
19:59 MTecknology as in*
20:00 whytewolf UForgotten: Please note that assignments in loops will be cleared at the end of the iteration and cannot outlive the loop scope.
20:00 ahrs joined #salt
20:00 whytewolf which is probley what you are running into
20:01 UForgotten whytewolf -I bet that explains it, so how am I supposed to build a string in a loop and use it after the loop?
20:01 MTecknology Why don't you share what you're actually trying to do?
20:03 whytewolf http://jinja.pocoo.org/docs/2.9/templates/#assignments
20:03 UForgotten given a list of servers without ports, and a port, assemble a comma separated list of server:port
20:04 nixjdm joined #salt
20:04 UForgotten so server_list=['192.168.0.1','192.168.0.2'] + server_port=2181 , output 192.168.0.1:2181,192.168.0.2:2181
20:05 whytewolf http://jinja.pocoo.org/docs/2.9/templates/#map + http://jinja.pocoo.org/docs/2.9/templates/#join i think
20:06 UForgotten seems like this would be a common problem. What's bizzare is that it's not even outputting the stuff I had put in to debug it.
20:06 censorshipwreck joined #salt
20:06 whytewolf it isn't that common actually, most people get around it by outputing in place
20:06 whytewolf so never see the issue
20:07 UForgotten I might could output in place if i can get it to not add crlf
20:10 lordcirth_work UForgotten, you should be able to avoid newlines if you use {%- -%}
20:10 UForgotten k. I'll give it a shot.
20:11 lordcirth_work UForgotten, http://jinja.pocoo.org/docs/2.9/templates/#whitespace-control
20:11 UForgotten lordcirth_work yep, on my reading list. thanks :)
20:13 inad922 joined #salt
20:16 bluethundr hey guys.. I'm having an issue launching ec2 servers with salt cloud
20:16 bluethundr can someone please have a look at this stack overflow: https://stackoverflow.com/questions/44553141/salt-cloud-error-deploying-to-aws   ?
20:17 Praematura_ joined #salt
20:17 UForgotten wow. so that works great. I was overthinking it.
20:17 bluethundr I think that the problem may relate to me usesing driver: ec2 in the cloud provider defninition
20:17 bluethundr but I'm unsure of how to correct it
20:17 UForgotten thanks for the loop variables tho, very useful
20:17 iggy why do you have minion and grains in there as None?
20:29 dxiri joined #salt
20:38 kulty joined #salt
20:39 dxiri joined #salt
20:42 Bock joined #salt
20:45 Bock joined #salt
20:52 nicksloan joined #salt
20:53 dxiri joined #salt
20:58 Splix76 joined #salt
21:04 nixjdm joined #salt
21:06 hemebond joined #salt
21:14 asyncsec joined #salt
21:28 sgo_ joined #salt
21:31 shanth am i not allowed to reference pillars in a pillar file? im trying to get sshd_listen to show as the em1 ip but my pillar wont render - http://dpaste.com/19P60QP
21:32 shanth am i forced to use grains?
21:32 hemebond shanth: No, you can't directly reference a pillar in pillar.
21:32 shanth welp there goes that plan
21:32 hemebond The order they're compiled is not consistent.
21:32 hemebond But...
21:33 shanth can i not reference a pillar in the same pillar or i cant reference pillar to pillar at all?
21:33 hemebond If you need to share values, might I suggest doing what I do and have a Jinja/YAML file of shared stuff that you import into pillar SLS files?
21:33 hemebond If it's in the same file you can just set a Jinja variable and then use that throughout the file.
21:33 shanth are you adding a jinja map to your pillars basically hemebond?
21:34 hemebond Not sure what you mean by "jinja map" but I have a jinja file that contains shared data.
21:35 asyncsec joined #salt
21:35 shanth im not sure that i follow
21:35 shanth how are you making a shared data file that is not a grain or pillar?
21:35 hemebond {%- from "globals.jinja" import g %}
21:35 hemebond Because all pillar files are run through a jinja parser before a YAML parser.
21:36 hemebond By default.
21:36 shanth hmm
21:36 hemebond Just like state files.
21:36 hemebond So that line I pasted is at the top of a pillar SLS file.
21:36 hemebond Then I can use {{ g.db.host }} to insert a value.
21:36 shanth i think that might complicate what im doing
21:36 hemebond In that case the database host name.
21:37 shanth :(
21:37 hemebond What is it you're trying to do?
21:37 shanth figure out a way to manage rc.conf
21:37 shanth it has lots of different values for each host
21:37 hemebond uhuh. I don't know what rc.conf is but so far not complex.
21:37 shanth i dont want to have 100 files that i manage, as in one for each host, so im leaning towards a large but manageable file with all the values
21:38 shanth let me whip up a simple example for you hemebond
21:38 hemebond Yikes.
21:38 shanth i dont know of any other way to do it so im trying with what kowledge i have :(
21:39 hemebond That means the large (but manageable) file will be opened and parsed every time.
21:39 shanth true
21:41 nicksloan joined #salt
21:43 candyman88 joined #salt
21:53 nocaberi joined #salt
21:54 Trauma joined #salt
21:54 sgo_ joined #salt
22:04 nixjdm joined #salt
22:05 whytewolf shanth: there is a process dba's use when trying to minimize the way data is constructed. it might help you with what you are trying to do and simplify your pillar data [i personally use this method for a lot of things that have nothing to do with databases, it takes a little tweeking to work outside of databases. and leaps of logic] https://en.wikipedia.org/wiki/Database_normalization
22:08 whytewolf but the basic premis of the idea is group things together that don't change often so that you can make the data that does change a focus of concern
22:09 fracklen joined #salt
22:16 shanth good stuff whytewolf
22:20 shanth i guess this is my basic idea for pillars hemebond whytewolf http://dpaste.com/3YSJRC1
22:20 shanth that way i can use these pillar values in all sorts of config files
22:20 hemebond That would be far easier to setup as a jinja lookup file./
22:21 hemebond (which I think is what you meant by jinja map)
22:21 shanth can you show me an example of what that looks like?
22:22 whytewolf hell, that looks like a good excuse to use a ext_pillar with a database backend
22:23 shanth thats what i was initially thinking whytewolf, one colum for each minion?
22:23 om2 joined #salt
22:24 shanth that would be soooo easy to manage, one column for each minion and i could at a glance see what values are what
22:24 hemebond http://dpaste.com/3GC558J
22:24 whytewolf ... you could go that route if you wanted .... OOOORRRRRRRR <points to database normalization>
22:24 hemebond One column per minion? No, that's not how you'd setup the database tables.
22:24 hemebond Just use Jinja.
22:24 hemebond This is not a complex problem.
22:24 shanth hm dang
22:25 shanth so i see this jinja map you linked, how do i use this?
22:25 hemebond Have you been through the Jinja and YAML tutorials yet?
22:25 hemebond The Salt tutorials?
22:26 shanth yea but i dont quite get how to do the import statement to bring this into a file
22:26 hemebond One sec.
22:26 whytewolf https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#salt.utils.jinja.SerializerExtension
22:26 shanth i see it here https://docs.saltstack.com/en/latest/topics/best_practices.html {% from "apache/map.jinja" import apache with context %} but i dont know how to make it work with yours
22:26 whytewolf start reading from there.
22:27 whytewolf also, don't need the jinja to load the yaml there. can just import_yaml "yaml file" as defaults
22:28 whytewolf saves a double jinja render
22:28 hemebond http://dpaste.com/37ETTYD
22:30 shanth my brain whytewolf lol
22:32 shanth hemebond: is the file you're linking is a map or is linking to a map?
22:33 whytewolf shanth: it is basicly a "defaults.yml" if you are looking for context in the documentation
22:33 shanth so it's a jnja map whytewolf?
22:33 whytewolf it is a yaml file used by a jinja map
22:35 shanth and i would import this map file into the pillar file?
22:36 shanth so then i have the map file and the pillar file, how does having 2 files instead of one solve the problem? my brain can't get around all this lol
22:36 whytewolf well, no the "map file" is actually combined into your pillar file and there is no true jinja.map file
22:39 whytewolf there are 2 files. a yaml defaults. which holds the info. and your pillar file that takes that defaults info and grabs just the relavent info that is needed for that minion
22:41 shanth ohhh whytewolf
22:41 shanth he just put them both in the one dpaste
22:41 shanth but two files
22:41 whytewolf yes
22:42 whytewolf one of the reasons i like gist over dpaste or other pastes. gist can have multiple files in the same gist
22:42 shanth and this {%- set minion_settings = map.get(salt['grains.get']('id'), {}) %} will assign the minions the pillar data?
22:43 whytewolf that will set the jinja variable minion_settings to the info for the minion. you still need to put put it
22:43 whytewolf such as {{minion_settings|yaml}}
22:45 shanth i just cant follow it :(
22:45 shanth i may have to go with my giant file until i figure out what you guys are talking about
22:45 whytewolf where are you getting stuck?
22:45 whytewolf actually this is still a giant file
22:46 shanth so i see the dpaste http://dpaste.com/37ETTYD that has the settings very similiar to my original idea http://dpaste.com/3YSJRC1 - i dont get how mapping that is making it assign to each minion though
22:46 shanth mine is at least using the mechanism of {% if 'master' in grains['id'] %}  to say only assign this stuff to this minion
22:46 shanth how is the map file doing that?
22:47 hemebond I recommend you use a pillar file per minion
22:47 whytewolf .get is a python function on dicts
22:47 hemebond Until you are more familiar with YAML and Jinja.
22:47 hemebond Just go with straight flat files assigned via the top.sls
22:51 shanth_ joined #salt
22:52 shanth joined #salt
22:52 shanth dangit
22:52 shanth chrome crashed
22:52 shanth missed what was said whytewolf
22:53 whytewolf i personally would still use a database, not because a database makes the problem simpler. but because you have already said this is going to be used for hundreds of minions. and managing a file with thousands of lines can get unreasonable quick. even in simple form.
22:54 whytewolf and no it wouldn't be 1 table
22:55 whytewolf anyway hemebond sugested you still to a file per minion and use top for targetting [which is recomended practice anyway]
22:55 shanth dang
22:56 shanth one file per minion?
22:56 hemebond Yes.
22:56 shanth i didn't know that was best practice
22:56 shanth and just dump all of the pillar data for that minion in that each file?
22:56 hemebond Until you understand how all the pieces work it is definitely the best practice.
22:57 shanth yeah dude cause i just dont get all the jinja yaml map stuff
22:57 shanth soo confusing
22:57 hemebond You can put generic stuff into other files.
22:57 iggy well, targetting via top file is best practice which implies 1 file per minion
22:57 whytewolf ^
22:57 hemebond e.g., user accounts can go into one file and applied to multiple minions.
22:59 whytewolf generally it is recomended to use jinja [or any other templating] as sparingly as possable.
22:59 hemebond But if information is for one minion only, then it should be in a file only for that minion.
23:00 shanth well that just saves me a lot of headache hemebond lol
23:00 hemebond ????
23:03 shanth here's what i did to manage dns, i did use some jinja but i thought it made sense. pillar data - http://dpaste.com/2BM54RH - resolv file - http://dpaste.com/1KEMBKN
23:03 shanth does this make sense what im doing or have i gone horribly wrong
23:03 hemebond Yeah, you should put each of those in a different file
23:03 hemebond And then use top.sls to apply the appropriate one to the minions.
23:03 hemebond grains['id'] is just the minion ID.
23:04 shanth dang
23:04 shanth so when _are_ you supposed to use jinja lol
23:04 hemebond So step back from the Jinja and if statements and just use regular salt, even if you have to duplicate some information at first.
23:04 shanth ok :(
23:04 hemebond When you understand it well enough and it makes sense :-)
23:05 hemebond e.g., I wouldn't use Jinja for that DNS stuff.
23:05 shanth so stick to single files and apply each one in pillar top?
23:05 hemebond Stick to flat files (without jinja).
23:05 shanth roger that hemebond
23:05 hemebond Not necessarily one file per minion, but definitely no targeting within the pillar files.
23:06 shanth :) thanks
23:06 hemebond ????
23:06 shanth whytewolf: can you re-link that serial thing you posted?
23:06 whytewolf serial thing?
23:07 shanth some salt doc link that had #serial something
23:07 shanth was maybe 5 mins ago
23:07 shanth maybe 10
23:07 whytewolf https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#salt.utils.jinja.SerializerExtension
23:07 shanth yeah that ty
23:08 whytewolf i wouldn't try that stuff till you actually understand what it is doing though
23:10 shanth yeah... trying to read that page is like
23:10 shanth i need to learn python/jinja at a beginner level
23:11 edrocks joined #salt
23:11 whytewolf build a flask app. that should learn you some jinja :P
23:14 shanth heck yeah
23:44 keltim joined #salt
23:59 fburk joined #salt

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