Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-11-25

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

All times shown according to UTC.

Time Nick Message
00:03 jas02 joined #salt
00:08 alexhayes joined #salt
00:12 cyborg-one joined #salt
00:19 abednarik joined #salt
00:23 edrocks joined #salt
00:25 raspado when I run salt-call state.apply, I get "'state-apply' is not available."
00:25 raspado how come?
00:33 Straphka_ joined #salt
00:35 abednarik joined #salt
00:35 dxiri joined #salt
00:36 Klas joined #salt
00:41 DEger joined #salt
00:44 patrek joined #salt
00:54 jas02 joined #salt
01:01 raspado what is the difference between state.apply and state.highstate
01:13 aarontc joined #salt
01:16 cyteen joined #salt
01:20 dxiri joined #salt
01:24 bocaneri joined #salt
01:26 XenophonF you're doing something wrong
01:26 XenophonF state.apply is available locally
01:27 XenophonF i use `salt-call state.apply ...` all the time
01:27 XenophonF e.g., `salt-call state.apply salt.formulas saltenv=production test=True`, with salt.formulas being an SLS ID in https://github.com/saltstack-formulas/salt-formula
01:28 XenophonF state.apply is equivalent to state.sls
01:28 XenophonF I'd have to RTFM/RTFS to tell you how they differ.
01:29 XenophonF cscf: I wrote a formula for SpigotMC a while ago, but it was one of the first I did.  It sucks and hasn't aged well.
01:29 XenophonF I'm rewriting it.
01:29 XenophonF raspado: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html
01:31 raspado i did it on the minion
01:31 raspado salt-call state.apply
01:31 raspado i use it all the time on the older salt minions
01:31 raspado but doesnt seem to be avail on the new minion ver
01:33 Hydrosine joined #salt
01:34 cyteen joined #salt
01:43 mpanetta joined #salt
01:52 XenophonF can you post the error message verbatim using ix.io or gist.github.com or something?
01:52 XenophonF you should be able to call that function on anything running 2015.5 or newer
01:53 cyteen joined #salt
01:55 jas02 joined #salt
02:26 edrocks joined #salt
02:30 raspado hmmm wtf
02:30 raspado meh, ill deal with it tomorrow -_-
02:35 fannet joined #salt
02:53 catpigger joined #salt
02:55 evle joined #salt
02:55 jas02 joined #salt
03:13 aarontc joined #salt
03:15 valkyrie joined #salt
03:26 dxiri joined #salt
03:29 fannet joined #salt
03:33 DEger joined #salt
03:51 bastiand1 joined #salt
03:56 jas02 joined #salt
04:04 jas02 joined #salt
04:11 dxiri joined #salt
04:12 dxiri joined #salt
04:15 informant1 joined #salt
04:23 fannet joined #salt
04:25 armyriad joined #salt
04:28 edrocks joined #salt
04:30 XenophonF https://github.com/irtnog/spigotmc-formula
04:30 XenophonF cscf: i had to make a lot of updates
04:31 XenophonF now i need to add debian support to my hyperv.ic formula, b/c the balloon driver doesn't get installed automatically and my minecraft server is limping along in 512 MB RAM!
04:38 dps joined #salt
04:43 kingpower joined #salt
04:46 dxiri joined #salt
04:46 donmichelangelo joined #salt
04:50 tkharju joined #salt
04:57 jas02 joined #salt
05:01 LV-426 joined #salt
05:09 rdas joined #salt
05:10 samodid joined #salt
05:18 fannet joined #salt
05:30 jas02 joined #salt
05:34 dxiri joined #salt
05:36 jas02 joined #salt
05:43 zulutango joined #salt
05:54 Varun joined #salt
05:58 Varun In salt command I am able to set env var, how to achieve the same with salt python api.  salt "mynode" cmd.run "echo $MYVAR" env="{MYVAR: 'MyValue' }"   My code: import salt.client local = salt.client.LocalClient() local.cmd('*', 'cmd.run', ["echo $MYVAR"])
05:58 jas02 joined #salt
05:59 Varun See this paste for clarity , http://pastebin.com/raw/FJu6fJny
06:02 ivanjaros joined #salt
06:12 fannet joined #salt
06:22 jas02 joined #salt
06:24 hemebond Varun: Have you tried passing it as a kwarg?
06:34 jas02 joined #salt
06:41 jas02 joined #salt
06:54 sgo_ joined #salt
06:58 felskrone joined #salt
06:59 jas02 joined #salt
07:06 fannet joined #salt
07:19 ivanjaros joined #salt
07:26 fannet joined #salt
07:30 edrocks joined #salt
07:40 jas02 joined #salt
07:44 _weiwae joined #salt
07:44 arapaho joined #salt
07:45 jas02_ joined #salt
07:53 ReV013 joined #salt
08:00 jas02 joined #salt
08:09 scooby2 joined #salt
08:18 jhauser joined #salt
08:24 teclator joined #salt
08:24 mohae_ joined #salt
08:25 JohnnyRun joined #salt
08:25 fracklen joined #salt
08:27 krymzon joined #salt
08:27 samodid joined #salt
08:31 ronnix joined #salt
08:48 o1e9 joined #salt
08:53 o1e9 joined #salt
08:55 cyteen joined #salt
08:57 Varun hemebond: Thanks  , kwarg worked.
08:57 Varun I am running cmd like following , salt is invoking the script but its not waiting to complete the script, its immeditely returning. How to run local.cmd  in a blocking way.  local.cmd('mynode', 'cmd.run', ["python /tmp/script.py"], kwarg={'env': {'PATH':'/opt/virtualenvs/test:/bin:/usr/sbin:/usr/bin:/bin:/sbin'}})
08:57 hemebond 👍
08:58 hemebond I think in the docs it mentions how to use the local client synchronously, as opposed to asynchronously.
08:59 prg3 joined #salt
09:00 jas02 joined #salt
09:11 geomacy joined #salt
09:12 impi joined #salt
09:12 swa_work joined #salt
09:13 amcorreia joined #salt
09:13 Rumbles joined #salt
09:25 fannet joined #salt
09:27 JohnnyRun joined #salt
09:30 jeddi joined #salt
09:32 edrocks joined #salt
09:35 s_kunk joined #salt
09:35 s_kunk joined #salt
09:44 kgoetz I'm using jinja templates for some files but when rendered my template values are empty. I'm using pillar.get in an attempt to get the user supplied config (my jinja is {{ salt['pillar.get']('tendenci:default:bind_address') }} ). all values are specified ina  map.jinja file, not in a pillar sls. could that be my problem?
09:46 yuhlw joined #salt
09:55 N-Mi joined #salt
09:55 N-Mi joined #salt
09:57 cyteen joined #salt
09:58 fannet joined #salt
09:59 fannet joined #salt
10:02 jas02 joined #salt
10:05 keimlink joined #salt
10:09 kgoetz it transpires i was missing {% from "tendenci/map.jinja" import tendenci with context %} in my template
10:09 kgoetz salt seems to require lots of boilerplate :/
10:25 cyteen_ joined #salt
10:34 JohnnyRun joined #salt
10:39 toanju joined #salt
10:40 babilen kgoetz: You don't have to "{% from "tendenci/map.jinja" import tendenci with context %}" in order to be able to access the pillar
10:40 babilen You do, however, have to import it if you want to access values in the map
10:41 babilen Not sure why that comes as a surprise
10:42 babilen And you, naturally, have to specify the data in the pillar if you want to access it via the pillar. map.jinja is simply a file that has nothing to do with pillars unless you implement pillar access in there
10:43 jhauser joined #salt
10:48 kgoetz babilen: thanks for the feedback. i've just come accross https://docs.saltstack.com/en/latest/topics/best_practices.html#modularity-within-states ; it appears to more or less explalin how to use the map.jina file in the context of pillars so i will try again using it as a guide
10:48 riftman joined #salt
10:48 babilen Ah, I figured you had read that already :)
10:49 kgoetz (probably first thing tomorrow in the hope that a break helps things settle.)
10:49 kgoetz sadly not yet, but it looks handy
10:50 babilen In the end the whole "defaults.yaml" and "map.jinja" design is a design pattern that could be implemented differently also. It's just that, due to being documented as "best practice" and advertised by #salt, it is being used in various formulas
10:51 babilen There are still some issues (in particular concerning deep merging of pillars as Python doesn't have a built in deep-merge update method for dictiories), but by and large it proved to be a sensible design
10:51 babilen *dictionaries
10:52 kgoetz i'm finding the variety of files used in salt a bit odd, *.sls vs map.jinja is the one i've encountered today; i'm sure i'll encounter defaults.yaml soon enough
10:52 kgoetz think i've cleared the hump though, from here on i can start getting things done with salt while i learn more
10:53 babilen Salt is *very* versatile and allows you to solve a problem in a variety of ways
10:54 babilen It also supports a plethora of renderers (cf. https://docs.saltstack.com/en/latest/ref/renderers/) which means that you encounter code/states/pillars/... written in YAML, Python, Jinja2, Mako, ...
10:56 babilen Formulas are a design pattern that allow you to: 1. Keep default values in a single place (defaults.yaml) 2. Keep distribution/platform specific values in a "os_map" that is being distributed by OS or OS release 3. Allow users to set settings they would usually want to set in the foo:* namespace (for foo-formula) and 4. Allow users to override defaults and platform specific settings by defining values in foo
10:56 babilen :lookup:* pillar namespace
10:57 kgoetz i'll have a quick look at the renderers doco but don't expect i'll make use of it in the near future :) are formulas able to override defaults from other formulas? (I assume yes but will ask anyway)
10:57 babilen Please elaborate on "are formulas able to override defaults from other formulas" please
10:59 jschoolcraft joined #salt
10:59 kgoetz say you download the nginx and postgres formulas from https://github.com/saltstack-formulas/ and drop them in your salt repo. then you develop your inhouse-formula to configure an application using nginx and postgres. can your inhouse formula set defaults for the other two? as i type it out i'm starting to think the likely answer is that appropriate pillar data be configured in the salt base repository render
10:59 kgoetz ing the question moot
11:00 babilen Yes
11:00 babilen ;)
11:00 amontalban joined #salt
11:00 amontalban joined #salt
11:00 babilen Your intuition that simply by defining suitable pillar data you would achieve whatever you want to achieve
11:01 abednarik joined #salt
11:01 babilen The Saltstack community did unfortunately decide to not allow dependencies between formulas .. I consider that to be a grave mistake as it fragments the available codebase and forces reimplementations everywhere
11:02 netcho joined #salt
11:02 babilen (which is a maintenance nightmare)
11:02 jas02 joined #salt
11:03 kgoetz i've seen a few comments about the lack of dependencies. hopefully they will come at some point because ansible and others do that really well.
11:03 amcorreia joined #salt
11:04 babilen It is a horrible decision that will hamper Saltstack adoption massively IMHO
11:05 kgoetz i'm inclined to agree. i simply assumed it had some, i didn't realise it was missing until i had committed a few days to learning about salt
11:05 babilen Salt needs 2 things right now that are more important than anything else: 1. A single, community maintained, easy to use and integrate "formula" repository 2. A single defined why to express dependencies between formulas, so that the same service is being configured in an identical manner everywhere
11:06 babilen Unfortunately Saltstack (the company) doesn't agree with me
11:06 netcho babilen: i would add 1 more thing: passing ENV variables into states :D
11:07 kgoetz funny you should mention #1 there, i asked about it in the last 24 hours.
11:08 babilen kgoetz: It is embarassing that Saltstack doesn't have an equivalent to, say, ansible galaxy. I also have no idea why not everyone at Saltstack prioritises implementing that
11:09 babilen https://docs.saltstack.com/en/develop/topics/releases/2016.11.0.html -- Those features are all nice to have, but if those two points above aren't addresses Saltstack will have a problem
11:09 kgoetz galaxy is awesome. if i do successfully move to saltstack its going to be a thing i miss a lot
11:10 babilen gtmanfred: ^
11:10 keimlink joined #salt
11:14 kgoetz i'll give it a couple of weeks to get used to salt then do some reasearch in to what exists by way of community repositires and dependency systems. for now i'll spend my spare time making things tick and learning how they break
11:14 kgoetz babilen: thanks for your help thus far
11:21 N-Mi joined #salt
11:48 darioleidi joined #salt
11:49 mikecmpbll joined #salt
11:50 mikecmpbll joined #salt
11:51 _aeris_ joined #salt
11:52 mavhq joined #salt
11:53 indistylo joined #salt
11:55 impi joined #salt
11:56 DEger joined #salt
12:03 jas02 joined #salt
12:10 teclator joined #salt
12:13 rbjorklin joined #salt
12:14 rbjorklin Is there any way to limit ext_pillar in a similar way as normal pillars? Using the consul_pillar module seems to be sort of a all or nothing approach...
12:15 rbjorklin Unless you actively design your consul structure to fit saltstack. This can be a bit of a problem if you were already running production applications utilizing consul before you started using saltstack.
12:17 rbjorklin The whole assign pillars based on grains is security by obscurity at best and is kind of frowned upon from what I've gathered
12:19 rbjorklin Point 5 in: https://docs.saltstack.com/en/latest/topics/best_practices.html#general-rules
12:34 edrocks joined #salt
12:41 mackripe_ joined #salt
12:45 jas02 joined #salt
12:46 babilen rbjorklin: If the external pillar doesn't support it, then you can't limit it I think
12:47 babilen Ånd yes, do not assign sensitive pillar data based on grains
12:53 AndreasLutro anyone know if it's possible to add fake data to the mine? for testing purposes
12:54 babilen AndreasLutro: Call an execution function that returns fake data as mine function alias
12:54 XenophonF joined #salt
12:54 AndreasLutro more specifically, I need to add mine data for minions that don't actually exist
12:55 AndreasLutro which I don't think an exec module will do for me
12:55 babilen Ah, no .. that wouldn't work
12:56 AndreasLutro looks like mine data is stored in /var/cache/salt/master/minions/$host/mine.p
12:56 dendazen joined #salt
12:56 AndreasLutro rather not manipulate that directly!
12:59 numkem joined #salt
13:00 AndreasLutro oh well guess it's not possible
13:04 jas02_ joined #salt
13:05 keimlink joined #salt
13:13 indistylo [Off Topic]Hello Folks, Is there any tool online or linux based which can do video editing like this https://m.youtube.com/watch?v=rbRieFzbZXA
13:14 abednarik joined #salt
13:26 ronnix joined #salt
13:36 pmcg joined #salt
13:45 akhter joined #salt
13:50 losh joined #salt
13:51 filippos joined #salt
13:52 impi joined #salt
13:54 onlyanegg joined #salt
13:55 dps joined #salt
13:58 dps_ joined #salt
14:05 jas02 joined #salt
14:06 rem5 joined #salt
14:06 abednarik joined #salt
14:08 JohnnyRun joined #salt
14:13 sh123124213 joined #salt
14:14 sh123124213 is there anything I can do when I run cmd.run and the process I'm running doesn't redirect stdout correctly ?
14:16 akhter joined #salt
14:17 ronnix_ joined #salt
14:29 akhter joined #salt
14:33 DEger joined #salt
14:36 edrocks joined #salt
14:47 akhter joined #salt
14:52 ReV013 left #salt
14:55 dendazen joined #salt
14:57 jas02 joined #salt
14:59 jas02 joined #salt
15:02 ronnix joined #salt
15:02 cscf sh123124213, is it printing on stderr, maybe?
15:02 cscf That should show up too, though
15:06 jas02_ joined #salt
15:07 JohnnyRun joined #salt
15:09 Electron^- joined #salt
15:11 sh123124213 cscf : yes it is
15:12 cscf sh123124213, append ' 2>&1  ' to the command
15:12 KingOfFools left #salt
15:12 sh123124213 ye sure
15:12 cscf redirects stderr into stdout
15:12 sh123124213 i know that :P
15:12 cscf oh that doesn't work?>
15:12 sh123124213 problem is i want some of the output
15:13 sh123124213 and dont want to cat the file
15:13 cscf sh123124213, I didn't say to redirect to a file
15:13 cscf 2>&1 by itself will print to stdout
15:17 akhter joined #salt
15:26 akhter joined #salt
15:30 dxiri joined #salt
15:30 akhter joined #salt
15:31 darthzen_ joined #salt
15:33 abednarik joined #salt
15:33 cscf What's the cleanest way to switch minions to a new master?  Edit /etc/salt/minion, delete pki, restart salt-minion?
15:33 cscf If I do it through salt, will it break partway through?
15:44 gaghiel joined #salt
15:45 gaghiel quick one. conditional sls based if a pkg is installed?
15:45 dariusjs joined #salt
15:52 akhter joined #salt
15:54 manji gaghiel, please elaborate
15:54 manji :)
15:55 ronnix joined #salt
15:55 gaghiel <3
15:56 gaghiel {% if salt['pkg.exists]('pkgname' %} custom_State {% endif %}
15:57 jerrcs joined #salt
15:59 mpanetta joined #salt
15:59 manji gaghiel, you could use list_pkgs
16:00 manji something like
16:00 gaghiel just tried that {% set dotrue = salt['pkg.list_pkgs'] %}
16:00 manji if somepkg in  salt['pkg.list_pkgs;
16:00 gaghiel but pkg.list_pkgs is not a module and thus no in salt dict
16:03 manji gaghiel, it is  salt['pkg.list_pkgs']()
16:03 manji try this:
16:03 manji http://paste.ofcode.org/38DfSXvCapLr2aRpnQCAdM3
16:05 gaghiel manji: it worked :)
16:05 manji :D
16:05 gaghiel damn
16:05 gaghiel i didn't see salt.modules.pkg as it appears at the top of the list
16:06 gaghiel special snowflake
16:07 jas02_ joined #salt
16:08 jas02 joined #salt
16:12 akhter joined #salt
16:12 mpanetta_ joined #salt
16:15 DEger joined #salt
16:16 debian112 joined #salt
16:19 darthzen_ joined #salt
16:21 ssplatt joined #salt
16:21 samodid joined #salt
16:22 darthzen joined #salt
16:25 darthzen joined #salt
16:32 DEger joined #salt
16:36 akhter joined #salt
16:40 dyasny joined #salt
16:42 abednarik joined #salt
16:47 akhter joined #salt
16:50 ronnix_ joined #salt
16:55 nicksloan joined #salt
16:58 Electron^- joined #salt
17:02 akhter joined #salt
17:04 combinare left #salt
17:07 nicksloan joined #salt
17:08 dxiri joined #salt
17:09 jas02_ joined #salt
17:13 akhter joined #salt
17:13 bltmiller joined #salt
17:19 akhter joined #salt
17:23 akhter joined #salt
17:27 Aleks3Y joined #salt
17:32 onlyanegg joined #salt
17:32 kingpower joined #salt
17:32 dtsar joined #salt
17:33 dtsar hi - can someone explain the salt grain of `machineid`?
17:33 dtsar i'm looking to use salt to manage my personal configs across physical machines i have
17:34 dtsar will the machineid persist over OS re-installs?
17:34 dtsar or is it a randomized value generated by salt upon installation of salt?
17:36 dyasny joined #salt
17:38 babilen dtsar: It's populated from /etc/machine-id or /var/lib/dbus/machine-id
17:38 edrocks joined #salt
17:39 babilen IIRC it's being set on installation
17:39 babilen (OS installation that is)
17:39 babilen https://www.freedesktop.org/software/systemd/man/systemd-machine-id-setup.html
17:40 dtsar babilen: aha! thanks
17:40 babilen np
17:40 dtsar related: i have yet to find a single page that documents all the default salt grains
17:41 nidr0x joined #salt
17:41 dtsar i suppose the source code itself :/
17:42 dtsar just being lazy, i guess
17:43 babilen dtsar: grains/core.py it is
17:46 dtsar yeah, that was really lazy of me. thx
17:47 sh123124213 joined #salt
17:48 s_kunk joined #salt
17:48 s_kunk joined #salt
17:48 darthzen joined #salt
17:48 dtsar i guess the best "bare-metal" identifiers in the grains would be cpu_model or num_cpus
17:49 kingpower joined #salt
17:50 sypets joined #salt
17:50 teclator joined #salt
17:51 bltmiller joined #salt
17:53 kingpower_ joined #salt
17:53 babilen dtsar: Grains are easy to write also
17:53 babilen (if you require something else than what is being offered out of the box)
17:53 Trauma joined #salt
17:57 darthzen joined #salt
18:02 dtsar joined #salt
18:04 darthzen joined #salt
18:07 hasues joined #salt
18:07 hasues left #salt
18:09 jas02_ joined #salt
18:19 akhter joined #salt
18:19 Rumbles joined #salt
18:22 donmichelangelo joined #salt
18:28 akhter joined #salt
18:33 raspado joined #salt
18:33 akhter joined #salt
18:33 ProT-0-TypE joined #salt
18:38 akhter joined #salt
18:42 akhter joined #salt
18:44 sh123124213 joined #salt
18:45 nidr0x joined #salt
18:46 kingpower_ joined #salt
18:50 akhter joined #salt
18:51 ssplatt joined #salt
18:51 nicksloan joined #salt
18:55 DEger joined #salt
18:55 akhter joined #salt
19:03 cyborg-one joined #salt
19:03 akhter joined #salt
19:04 DEger joined #salt
19:07 onlyanegg joined #salt
19:10 dxiri joined #salt
19:10 jas02_ joined #salt
19:19 akhter joined #salt
19:21 fracklen joined #salt
19:25 DEger joined #salt
19:26 Trauma joined #salt
19:29 dxiri joined #salt
19:33 akhter joined #salt
19:37 akhter joined #salt
19:41 akhter joined #salt
19:41 ronnix joined #salt
19:47 akhter joined #salt
19:53 akhter joined #salt
19:54 onlyanegg joined #salt
19:58 akhter joined #salt
20:05 akhter joined #salt
20:09 akhter joined #salt
20:14 sh123124213 joined #salt
20:14 bltmiller joined #salt
20:18 akhter joined #salt
20:24 nicksloan joined #salt
20:25 fracklen joined #salt
20:26 amontalban joined #salt
20:26 amontalban joined #salt
20:31 akhter joined #salt
20:35 akhter joined #salt
20:40 akhter joined #salt
20:48 akhter joined #salt
20:50 Cottser joined #salt
20:54 akhter joined #salt
20:54 Rumbles joined #salt
20:56 jkleckner joined #salt
21:00 akhter joined #salt
21:06 akhter joined #salt
21:07 dendazen joined #salt
21:08 jas02 joined #salt
21:09 gimpy2938 joined #salt
21:12 jas02_ joined #salt
21:13 nicksloan joined #salt
21:17 akhter joined #salt
21:22 jas02 joined #salt
21:27 akhter joined #salt
21:31 akhter joined #salt
21:31 onlyanegg joined #salt
21:32 numkem joined #salt
21:32 ronnix joined #salt
21:38 akhter joined #salt
21:42 akhter joined #salt
21:47 akhter joined #salt
21:51 akhter joined #salt
21:55 akhter joined #salt
21:59 akhter joined #salt
22:09 jfelchner joined #salt
22:12 aarontc joined #salt
22:13 jas02 joined #salt
22:17 akhter joined #salt
22:22 akhter joined #salt
22:23 jas02 joined #salt
22:25 ssplatt joined #salt
22:32 akhter joined #salt
22:36 akhter joined #salt
22:36 XenophonF joined #salt
22:42 akhter joined #salt
22:45 cyborg-one joined #salt
22:49 DEger joined #salt
22:49 cyteen joined #salt
22:53 akhter joined #salt
22:55 cyteen_ joined #salt
22:56 iggy we have a grain that reads the service tag on Dell servers
23:01 akhter joined #salt
23:05 DEger joined #salt
23:11 cyteen joined #salt
23:14 jas02 joined #salt
23:15 onlyanegg joined #salt
23:21 writtenoff joined #salt
23:25 jas02 joined #salt
23:33 akhter joined #salt
23:34 justanotheruser joined #salt
23:41 prg3 joined #salt
23:42 wolfpackmars2 joined #salt
23:44 jkleckner joined #salt
23:46 wolfpackmars2 stuck on a permissions problem with git.latest
23:46 wolfpackmars2 http://pastebin.com/pZq5BfBm
23:47 jfelchner joined #salt
23:48 wolfpackmars2 as far as I can tell the permissions are correct
23:49 jeddi joined #salt
23:52 skullone does anyone use salt-cloud to set instance hostname/fqdns?
23:56 akhter joined #salt
23:59 akhter joined #salt

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