Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-04-22

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

All times shown according to UTC.

Time Nick Message
00:00 onslack joined #salt
00:23 dxiri joined #salt
00:35 ShiraseSakuya joined #salt
00:36 ShiraseSakuya joined #salt
00:40 ShiraseSakuya joined #salt
00:44 ShiraseSakuya joined #salt
00:56 stooj joined #salt
01:17 mikecmpbll joined #salt
01:41 hemebond joined #salt
01:55 ilbot3 joined #salt
01:55 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2017.7.5, 2018.3.0 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
02:09 shiranaihito joined #salt
02:23 dxiri joined #salt
02:28 mechleg joined #salt
02:29 evle1 joined #salt
03:01 evle joined #salt
03:27 PsionTheory joined #salt
03:36 swa_work joined #salt
03:38 tiwula joined #salt
03:56 evle joined #salt
04:40 mosen joined #salt
04:42 orichards joined #salt
05:13 ponyofdeath joined #salt
05:24 mosen joined #salt
05:39 alex-zel joined #salt
05:40 alex-zel "render error: global name '__opts__' is not defined" I keep getting this error when trying to use #!py rendered state
06:18 killahanson joined #salt
06:23 DanyC joined #salt
06:53 evle joined #salt
07:09 xet7 joined #salt
07:12 orichards joined #salt
07:13 tyx joined #salt
07:13 killahanson joined #salt
07:19 bigjazzsound1 joined #salt
07:22 killahanson_ joined #salt
07:33 bigjazzsound1 joined #salt
07:36 evle1 joined #salt
07:58 orichards joined #salt
07:58 briner joined #salt
08:06 killahanson joined #salt
08:12 Bochi_ joined #salt
08:21 killahanson joined #salt
08:23 killahanson joined #salt
08:24 stooj joined #salt
08:27 killahanson joined #salt
08:30 killahanson joined #salt
08:38 killahanson joined #salt
08:45 killahanson joined #salt
08:52 killahanson joined #salt
09:10 killahanson joined #salt
09:12 killahanson joined #salt
09:17 killahanson joined #salt
09:19 NEOhidra joined #salt
09:43 exarkun joined #salt
10:07 briner joined #salt
10:10 rollniak joined #salt
10:50 NEOhidra joined #salt
11:00 NEOhidra joined #salt
11:01 NEOhidra left #salt
11:24 whytewolf I sometimes wonder if we should have some formulas that have orchestration built in. for like clustered products.
11:28 babilen I don't see a problem with that at all
11:28 babilen And in some cases it would make perfect sense
11:29 orichards joined #salt
11:30 whytewolf I just wonder why no one has done it. there are a lot of things i could see. an orchestration for 'just build me the whole cluster, here are your servers'
11:52 oida joined #salt
12:00 dendazen joined #salt
12:08 Barbarossa joined #salt
12:09 Barbarossa Hi! I've written a small python module an put it in fsroot/_modules/mymodule.py. It works fine an I can use my functions within jinja templates like a charm.
12:09 Barbarossa Now I'd like to use a value from pillar within this module but seem to be unable to find a pointer on how to accomplish that
12:10 Barbarossa Could anyone point me into the direction of documentation or any example on how to access a pillar value from within a python module?
12:11 babilen Barbarossa: You are looking for __pillar__ -- https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html
12:11 babilen I'd typically access it with __salt__['pillar.get'] or __salt__['config.get']
12:11 babilen (depending on your usecase)
12:12 Barbarossa Hm, I tried using __pillar__ but that didn't seem to be present. I'll try the __salt__-way
12:12 babilen It's all monkey patched later, so you can't access it in module skope
12:12 Barbarossa Hm?
12:14 babilen Could you paste an example of something that didn't work to one of http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
12:15 sjorge joined #salt
12:20 Barbarossa https://paste.debian.net/hidden/3cca1b3a/
12:21 babilen It's impossible to tell as you didn't paste the exact context in grubenlampe.py, but I would guess that it is a call within module (as opposed to function) scope
12:22 Barbarossa Yes it is
12:22 Barbarossa I can try to do that within the function which needs the token
12:23 babilen You are also looking for __salt__['pillar.get']
12:24 Barbarossa Oh, thanks!
12:24 oida joined #salt
12:26 Barbarossa Cool, querying pillar from within a function works like a charm. That was the missing link, thank you!
12:26 babilen It's monkey patches later, which is why you can't access it when the module is evaluated during import
12:27 babilen *patched
12:33 orichards joined #salt
12:45 stooj joined #salt
13:35 Elsmorian joined #salt
13:52 NEOhidra joined #salt
15:27 dendazen joined #salt
15:39 orichards joined #salt
15:51 matti__ joined #salt
15:53 simmel_ joined #salt
15:53 Kelsar_ joined #salt
15:54 ouzo12 joined #salt
15:55 PatrolDoom joined #salt
15:56 demonkeeper joined #salt
15:57 jor_ joined #salt
15:57 izibi_ joined #salt
15:59 jijiki joined #salt
16:02 ecdhe joined #salt
16:02 bluenemo joined #salt
16:03 sayyid9003 joined #salt
16:04 Deliant joined #salt
16:04 tom[] joined #salt
16:04 nledez joined #salt
16:04 nledez joined #salt
16:04 frots joined #salt
16:05 bantone joined #salt
16:09 nkuttler joined #salt
16:09 ExtraCrispy joined #salt
16:12 Savemech joined #salt
16:20 rockey joined #salt
16:25 freelock joined #salt
16:25 benasse joined #salt
16:25 hoverbear joined #salt
16:25 Gareth joined #salt
16:25 dragon788 joined #salt
16:25 whiteinge joined #salt
16:25 synical joined #salt
16:25 twiedenbein joined #salt
16:25 dstensnes joined #salt
16:25 robinsmidsrod joined #salt
16:28 LeProvokateur joined #salt
16:30 codewaffle joined #salt
16:31 J0hnSteel joined #salt
16:31 ws2k3 joined #salt
16:32 ws2k3 joined #salt
16:32 ws2k3 joined #salt
16:33 ws2k3 joined #salt
16:33 nledez joined #salt
16:33 nledez joined #salt
16:33 ws2k3 joined #salt
16:34 ws2k3 joined #salt
16:38 Yamakaja joined #salt
16:44 nkuttler joined #salt
17:08 orichards joined #salt
17:32 synical joined #salt
17:32 synical joined #salt
17:33 hammer065 joined #salt
17:48 Elsmorian joined #salt
17:57 Bochi_ joined #salt
18:41 dxiri joined #salt
18:44 Bochi_ joined #salt
18:59 Trauma joined #salt
19:04 NEOhidra joined #salt
19:08 dxiri joined #salt
19:08 Trauma joined #salt
19:11 Trauma joined #salt
19:17 rollniak joined #salt
19:19 NEOhidra Is it possible to create a python3.6 virtual environment - am i missing something or Salt is not at 100% compatible with python3?
19:19 NEOhidra The state https://pastebin.com/Kd0ZwmKW results in this error - https://pastebin.com/GfJtTgGn
19:19 NEOhidra Using "venv_bin: /usr/bin/pyvenv-3.6" is not helping - https://pastebin.com/tVbSMzLC
19:21 _KaszpiR_ NEOhidra are you sure you have that pythonbinary on remote host?
19:22 NEOhidra python3.6 -m virtualenv test - works fine
19:22 NEOhidra and  /usr/bin/pyvenv-36 is available
19:23 stooj joined #salt
19:23 briner joined #salt
19:29 Trauma joined #salt
19:35 Processus42 joined #salt
19:43 exarkun joined #salt
20:01 ws2k3 joined #salt
20:07 rtr63gdh[m] joined #salt
20:07 freelock joined #salt
20:07 sxar joined #salt
20:07 jerrykan[m] joined #salt
20:07 benasse joined #salt
20:07 Tenyun[m] joined #salt
20:07 atmoz joined #salt
20:07 hoverbear joined #salt
20:07 toofoo[m] joined #salt
20:07 viq[m] joined #salt
20:07 benjiale[m] joined #salt
20:07 aboe[m] joined #salt
20:07 alj[m] joined #salt
20:07 gomerus[m] joined #salt
20:07 ThomasJ|m joined #salt
20:07 fujexo[m] joined #salt
20:07 glock69[m] joined #salt
20:07 systeem[m]1 joined #salt
20:07 gomerus[m]1 joined #salt
20:13 Trauma joined #salt
20:15 Trauma joined #salt
20:18 orichards joined #salt
20:26 Bochi_ joined #salt
20:35 ws2k3 joined #salt
20:35 evle2 joined #salt
20:35 ws2k3 joined #salt
20:36 ws2k3 joined #salt
20:36 ws2k3 joined #salt
20:37 ws2k3 joined #salt
20:37 ws2k3 joined #salt
20:45 ws2k3 joined #salt
21:30 gmoro joined #salt
21:30 orichards joined #salt
22:10 Trauma joined #salt
22:17 gswallow joined #salt
22:18 gswallow I'm a bit frustrated with salt.  Why doesn't something like this just *work*?
22:18 gswallow {% for pkg in pillar.get('base:packages') %}
22:18 gswallow {{ pkg }}:
22:18 gswallow pkg.installed
22:18 gswallow {% endfor %}
22:20 NEOhidra try - {% for pkg in pillar['base']['packages'] %}
22:22 gswallow I swear I tried something similar to that.  I danced around this issue for I swear an hour.  Thanks.
22:40 coredumb should pillar.get syntax be like "salt[pillar.get]('base:packages')" ?
22:41 coredumb shouldn't*
22:43 NEOhidra i think so
22:44 MTecknology gswallow: because "pillar" is a dictionary and you're trying to do things dicts don't support
22:46 MTecknology more importantly... why would you have one individual state for every package you want installed? That seems like a lot of overhead for no gain.
22:53 Whissi joined #salt
23:11 ws2k3 joined #salt
23:22 jfindlay gswallow: if your packages are formatted as a list you can just use the pkgs argument to pkg.installed
23:22 gswallow thanks
23:22 jfindlay pkg.installed:
23:22 jfindlay - name: base-packages
23:22 gswallow I'm just trying to whip up a really simple demo and it's sorta maddening
23:22 gswallow all the server setup has me a bit frazzled
23:22 jfindlay - pkgs: {{ pillar['base']['packages'] }}
23:23 gswallow it's working for now
23:24 gswallow this is safer, though, right?  salt['grains.get']('base:packages', [])
23:24 gswallow it's like ruby's fetch
23:24 jfindlay yes if by safer you mean 'fail silently'
23:26 jfindlay gswallow: `salt` is the dictionary containing exec module functions, but if you're in a jinja block, you can use python primitives, like `grains.get('base', {}).get('packages', [])`
23:27 jfindlay your method would probably be more readable in this case
23:36 stooj joined #salt

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