Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-06-01

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

All times shown according to UTC.

Time Nick Message
00:05 hashwagon joined #salt
00:08 __number5__ joined #salt
00:13 edrocks joined #salt
00:15 woodtablet left #salt
00:20 TooLmaN joined #salt
00:25 fracklen joined #salt
00:27 shanathon joined #salt
00:32 bast joined #salt
00:32 bast joined #salt
00:38 c_g joined #salt
00:38 zerocoolback joined #salt
00:38 c_g joined #salt
00:56 shred joined #salt
01:33 vishvendra joined #salt
01:33 druonysus joined #salt
01:38 Ashald left #salt
01:38 druonysus left #salt
01:39 druonysus joined #salt
01:40 dxiri joined #salt
01:46 druonysus left #salt
01:46 druonysus joined #salt
01:46 georgemarshall joined #salt
01:46 druonysus left #salt
01:46 druonysus 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/ <+> 1st Salt Cloud Working Group meeting June 1st, 2017 https://goo.gl/o2OK49 <+> 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
01:52 hosttor joined #salt
01:54 gnomethrower joined #salt
01:55 gnomethrower joined #salt
01:55 gnomethrower joined #salt
01:55 rmelero joined #salt
02:15 edrocks joined #salt
02:19 dxiri joined #salt
02:22 dxiri joined #salt
02:24 wangofett joined #salt
02:27 jas02 joined #salt
02:29 georgemarshall joined #salt
02:30 armguy joined #salt
02:32 dxiri joined #salt
02:42 wangofett joined #salt
02:48 shred joined #salt
02:50 skullone question - is salt-cloud not getting much future development?
02:50 evle joined #salt
02:50 skullone i saw this: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_ec2.html
02:51 hemebond skullone: It should be.
02:51 skullone seems to have all the features salt-cloud did
02:51 hemebond salt-cloud is and command-line interface to the cloud module that uses other modules.
02:51 hemebond salt-cloud is a command-line utility, like salt-call.
02:52 hemebond But there is a cloud module in Salt that does the work.
02:52 hemebond And modules under that, for each provider, that does the work.
02:52 hemebond *do the work
02:52 hemebond But also, yes, there are modules like boto_ec2 that provide other ways to access and manipulate stuff.
02:53 hemebond It's also possible that the ec2 cloud module uses the boto execution modules to do the work.
02:53 hemebond But I haven't checked.
02:55 wangofett joined #salt
02:56 hemebond Also, the boto states are done via a minion. Salt-cloud does it directly from the master.
02:56 hemebond Also, the boto state modules are a different workflow from the execution modules.
03:03 icebal joined #salt
03:05 wangofett joined #salt
03:06 icebal- joined #salt
03:07 pheonix991 joined #salt
03:11 wangofett joined #salt
03:17 wangofett joined #salt
03:17 shred joined #salt
03:24 c_g joined #salt
03:24 icebal joined #salt
03:24 pheonix991 joined #salt
03:25 whytewolf hemebond: just logged back in. first. no the salt-cloud stuff is almost compleatly seperate from the modules. and no the salt-cloud ec2 does not use anything in boto_*. boto_* came long after salt-cloud was built.
03:26 hemebond salt-cloud is completely separate from the modules? What do you mean?
03:26 whytewolf you can install salt-cloud on it's own server with out salt-master or salt-minion
03:27 hemebond Are you saying it doesn't use /salt/cloud/ ?
03:27 whytewolf no it defintly uses salt/cloud
03:27 hemebond That's what I mean by modules.
03:28 whytewolf but those are not dependent on salt-master or salt-minion
03:28 hemebond Right...
03:28 whytewolf as to the original question. there is a group that is about to embark on salt-cloud to start revamping it into something.. .. not sucky
03:29 hemebond But using boto definitely requires salt-minion
03:29 hemebond Do people think salt-cloud is sucky?
03:29 whytewolf a lot of people
03:30 whytewolf it's openstack support currently is shit. most of the drivers are falling into repair. and most features are not supported.
03:30 hemebond Ah. I've only used it for VirtualBox and EC2.
03:30 whytewolf and there are better platforms out there currently such as teraform
03:30 hemebond And there it's been pretty good except for a regression or two.
03:31 whytewolf https://groups.google.com/forum/#!forum/salt-cloud
03:33 hemebond >You cannot view this group's content because you are not currently a member.
03:33 hemebond boo
03:34 whytewolf https://groups.google.com/forum/#!topic/salt-users/b9xasYHnWn0
03:34 dxiri joined #salt
03:34 whytewolf that was the announcment
03:35 whytewolf also check out the conversation on the 25th here https://irclog.perlgeek.de/salt/search/?nick=ryan_lane&amp;q=
03:35 whytewolf for more detailed talk
03:36 whytewolf and for the record ryan_lane is the one who originaly wrote the boto_* modules, so it is prety much a 100% he knows what he is talking about
03:38 Tantagel joined #salt
03:40 shred joined #salt
03:49 Slimmons joined #salt
03:55 dxiri joined #salt
03:58 hemebond Hmm. I don't really understand what RL is asking for.
03:59 whytewolf it amounts to salt-cloud should be more flexiable. and that instead of focusing on salt-cloud all of the drivers should be built into more boto_* like modules/states.
03:59 dxiri joined #salt
04:00 whytewolf and salt-cloud should use those modules
04:11 SaucyElf joined #salt
04:17 edrocks joined #salt
04:18 jerrcs joined #salt
04:29 _JZ_ joined #salt
04:34 Ryan_Lane Yep. That :)
04:36 Ryan_Lane So that we can have extensive support for all clouds and also a basic abstraction layer over the top for folks that want that
04:37 skullone wonder if people use salt itself (not salt-cloud) to define state for VPC, security groups, ELB, etc like terraform
04:37 Ryan_Lane If the support for the major clouds was as good at the aws support (via the boto modules) it would be a proper competitor to terraform.
04:38 skullone id be interested in seeing some complete recipes, but havent seen much
04:38 Ryan_Lane I do
04:38 Ryan_Lane (I wrote most of the boto_* modules)
04:39 aldevar joined #salt
04:40 Ryan_Lane I should probably make some public examples
04:40 skullone oh, hi :)
04:40 skullone thank you for your contributions!
04:41 aldevar left #salt
04:42 Ryan_Lane Howdy :)
04:43 Ryan_Lane We (lyft) manage all of our aws infra with salt
04:43 skullone oh, very nice
04:43 Ryan_Lane Including managing github, pager duty and a bunch of other things
04:43 skullone (lyft user)
04:45 skullone i come from a traditional physical datacenter env, now at a new startup, but previously wrote a lot of my tooling around physical hardware, bootstrapping that from back of the truck, to bios/efi/firmware provisioning and OS/openstack/apps
04:46 skullone salt was the orchestration tool mostly, but after bootstrap, salt-cloud handled our openstack stuff... but now im 100% AWS based, trying to find the right place to define all the state
04:54 jerrcs joined #salt
04:54 Sarphram joined #salt
04:55 xMopxShell joined #salt
04:56 skullone you in bay area?
04:56 Sarph joined #salt
04:59 shred joined #salt
05:11 Bock joined #salt
05:22 rmelero joined #salt
05:27 MTecknology lyft isn't actually a thing, it's just a myth
05:29 wangofett joined #salt
05:30 _JZ_ joined #salt
05:38 wangofett joined #salt
05:53 felskrone joined #salt
05:55 wangofett joined #salt
06:00 masber joined #salt
06:00 sh123124213 joined #salt
06:01 wangofett joined #salt
06:12 wangofett joined #salt
06:18 edrocks joined #salt
06:18 wangofett joined #salt
06:23 impi joined #salt
06:24 karlthane joined #salt
06:25 wangofett joined #salt
06:43 blathijs What would be the recommended way to give each minion a secondary ID (or other per-minion data) to use in config file templates? The pillar seems to be intended for shared/global data. I can see you could create a separate pillar file for each minion, but then you'd have to also separately list each minion in the pillar top file, wich seems more overhead than I'd like.
06:44 hemebond blathijs: You can use jinja in the top.sls files.
06:44 hemebond Actually you don't even need Jinja for that.
06:45 blathijs It seems like this would be better suited to store as a grain? I can see you can add grains in the minion config file, but I want to administer this data on the salt master, so tey won't get lost when a minion crashes or otherwise gets lost.
06:45 Neighbour blathijs: Use grains for that, which you can use in the pillar/state topfiles to select minions with
06:46 hemebond blathijs: You can configure grains via pillars.
06:47 blathijs (sorry, my internet connetion is a bit flakey, so I'm responding a bit erratic)
06:47 hemebond But then, you might as well just apply the pillars.
06:47 hemebond What is it you think would be better as a grain?
06:47 hemebond A role?
06:47 blathijs hemebond: How would you suggest my pillar top file looks? Can I do something like *: {{ grains['id'] }} ?
06:48 hemebond Yeah, you could do that.
06:48 blathijs hemebond: It's not a role, it's a unique identifer per minion
06:48 blathijs hemebond: So the top files get re-evaluated for each minion separately? Convenient.
06:48 hemebond Okay, so you want to define a role.
06:48 hemebond Yes.
06:49 hemebond Pillar is not for data shared automatically across everything, it's secure data provided only if you explicitly allow it.
06:49 hemebond Unlike states.
06:49 blathijs A role sounds like something that multiple minions would potentially share, but perhaps you have a different concept of rol here :-)
06:49 hemebond No, that's what we call a role.
06:50 hemebond (you didn't mention roles in your first comment)
06:50 blathijs I wasn't aware I was talking about roles :-)
06:50 hemebond For my own minions, the name contains the role.
06:51 blathijs Which is a rol like "web" or "mail" etc?
06:51 hemebond Yeah.
06:52 Ricardo1000 joined #salt
06:53 blathijs In this case, my minion id is like mjs-gateway-1, the extra id I want to assign is a EUI-64 like 1dee0b64b020eec4
06:53 hemebond And where does this EUI come from?
06:55 wangofett joined #salt
06:56 sh123124213 joined #salt
06:57 Tantagel joined #salt
07:06 wangofett joined #salt
07:11 sh123124213 joined #salt
07:12 shred joined #salt
07:14 blathijs Sorry, had to changes trains :-)
07:14 hemebond And where does this EUI come from?
07:15 blathijs hemebond: This EUI is assigned by the manufacturer. Right now, it gets prewritten to a config file on the device when it is delivered, but I want to copy it into a central spot and then reinstall the device from scratch using salt.
07:16 afics joined #salt
07:18 toanju joined #salt
07:18 blathijs One other option I can see is to just have a single pillar file with an id: eui mapping for each minion and then just access the right part of that in the template. The euis aren't private, so that's not a concern. This probably doesn't scale well, but I wont have enough minions to see that.
07:18 _JZ_ joined #salt
07:21 * blathijs is off for a bit again
07:22 justan0theruser joined #salt
07:22 jas02 joined #salt
07:24 jas02 joined #salt
07:26 sybix joined #salt
07:54 haam3r joined #salt
07:56 mikecmpbll joined #salt
08:03 _JZ_ joined #salt
08:08 Rumbles joined #salt
08:08 fracklen joined #salt
08:09 SaltyVagrant joined #salt
08:10 oida_ joined #salt
08:35 om2 joined #salt
08:37 Mattch joined #salt
08:41 candyman88 joined #salt
08:45 impi joined #salt
08:49 spooky_ joined #salt
08:53 gmoro joined #salt
08:54 zulutango joined #salt
09:03 pbandark joined #salt
09:06 sh123124213 joined #salt
09:07 Hybrid joined #salt
09:08 bvcelari joined #salt
09:15 bvcelari Hi
09:15 bvcelari guys
09:15 bvcelari I am trying to use the mine module, in my pillars
09:16 bvcelari IE: I have my classic network_addrs function in my minions
09:16 bvcelari and I can get it using mine.get, so far, so good
09:16 bvcelari but if I try something like:
09:16 bvcelari {% set myd = salt['mine.get']('uniqueminion:server0', 'network_addrs', expr_form='grain').popitem() %}
09:17 bvcelari in my pillarto be able to use {{ myd }}
09:17 bvcelari is not working
09:17 hemebond bvcelari: I use this:
09:17 hemebond {%- set disk_usage = salt.saltutil.runner('mine.get', tgt='*', fun='disk.usage') %}
09:18 hemebond You then end up with a dict with minion IDs at the top level.
09:18 permalac joined #salt
09:18 bvcelari runner module will work by default?
09:18 hemebond Yup.
09:18 bvcelari not sure why I have to use runner
09:18 bvcelari ... I guess I am missing something here
09:18 hemebond Well, you're in the pillars, which are compiled on the master, so why not use the runner?
09:22 bvcelari will check runner then
09:22 wangofett joined #salt
09:23 bvcelari I only wanted to retrieve from mine the IP of a minion, based in a compound query
09:23 bvcelari of roles
09:23 hemebond You can do that with the runner.
09:23 bvcelari I am sure there should be an easier way
09:24 hemebond How is that not easy?
09:24 bvcelari will check the sintax, so far, is retrieveing "{}"
09:24 candyman88 joined #salt
09:24 jhauser joined #salt
09:24 hemebond What have you written?
09:25 bvcelari {%- set myd = salt.saltutil.runner('mine.get', tgt='tags:Names:myuniqueminion', fun='network_addrs') %}
09:26 bvcelari tags:Names, come from custom grain
09:26 hemebond You're missing the part that tells it to target using grains.
09:26 hemebond expr_form="grain"
09:29 bvcelari {%- set myd = salt.saltutil.runner('mine.get', tgt='ec2_tags:Names:myuniqueminion', fun='network_addrs',expr_form='grain') %}
09:29 bvcelari following keyword arguments are not valid: expr_form=grain
09:29 bvcelari :/
09:30 hemebond Maybe try with just the value, not the name.
09:30 hemebond 'grain'
09:30 hemebond Oh wait.
09:30 hemebond Try tgt_type
09:31 bvcelari where is the doc for this salt.saltutil.runner   ?
09:32 hemebond https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.mine.html
09:32 hemebond oh
09:32 hemebond https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mine.html#salt.modules.mine.get
09:34 ahrs joined #salt
09:38 bvcelari is not working... but I guess that now is with my grain function
09:38 bvcelari :S
09:38 bvcelari replace expr_form for tgt_type worked
09:40 wangofett joined #salt
09:48 bvcelari #hemebond I can test.ping my minion, using the '@Gtgt='ec2_tags:Names:myuniqueminion' but if I use the runner in a state
09:48 bvcelari minion complains
09:49 bvcelari Failed matching available minions with grain pattern: G@ec2_tags:Name:myuniqueminion
09:49 hemebond Well, that's compound matching.
09:49 hemebond Have you updated your tgt_type?
09:49 bvcelari Yep
09:49 bvcelari {%- set myd = salt.saltutil.runner('mine.get', tgt='G@ec2_tags:Name:myuniqueminion', fun='network_addrs',tgt_type='grain') %}
09:50 bvcelari and fixed my typo with Name, instead of Names
09:50 hemebond uh
09:50 hemebond You need tgt_type='compound'
09:50 bvcelari same result
09:51 bvcelari a... and without the G@
09:51 bvcelari obviuuusly
09:52 bvcelari and now works, but returns an empty dict {}ççççç
09:53 hemebond salt-run mine.get fun='network.ip_addrs' tgt='G@ec2:public_ipv4:*' tgt_type='compound'
09:53 hemebond That works for me.
09:53 hemebond network.ip_addrs is my mine function.
09:53 hemebond Any EC2 instance with a public IP is returned.
09:53 bvcelari I am getting private network ips
09:53 bvcelari but yes
09:54 hemebond salt-run mine.get fun='network.ip_addrs' tgt='G@ec2_tags:Name:db9slr01' tgt_type='compound'
09:54 hemebond That worked also.
09:54 hemebond Show me your code as it is now.
09:56 bvcelari {% set myd = salt.saltutil.runner('mine.get', tgt='ec2_tags:Name:myuniqueminion', fun='network_addrs',tgt_type='compound') %}
09:57 hemebond You're missing the G@
09:58 bvcelari and returns the empty dict
09:58 bvcelari :D
09:58 bvcelari :S
09:58 hemebond And it works from the command line like I've pasted above?
09:58 bvcelari I will check every step
09:58 bvcelari no, nothing come back either
09:59 hemebond Then you don't have anything matching that grain.
09:59 hemebond Or some other issue.
09:59 bvcelari I am using that compound in top.sls and is working
09:59 hemebond Did you say it worked with tgt_type='grain'?
10:00 hemebond Sure, but do you have the mine data for the matching minions?
10:00 bvcelari ok, this one works
10:00 bvcelari salt-run mine.get fun='network_addrs' tgt='ec2_tags:Name:myuniqueminion' tgt_type='grain'
10:02 bvcelari I think so,
10:03 bvcelari but the minion-id is not the same that the "myuniqueminion"
10:03 babilen If that works then tgt='G@ec2_tags:Name:myuniqueminion' tgt_type='compound' should work also
10:03 bvcelari "myuniqueminion" comes from ec2 tags
10:04 wangofett joined #salt
10:06 exegesis joined #salt
10:07 bvcelari I guess that mine cannot give me the info from my fun, as far as the minion id is not the same that the ec2_tag name,
10:07 bvcelari but I was expectign that searching for compound will retrieve the fun
10:08 candyman88 joined #salt
10:10 babilen You can retrieve whatever information is in the mine as long as you target the minion in some way
10:10 babilen You are essentially saying "Give me the cached information under alias 'foo' from all minions matched by tgt"
10:11 wangofett joined #salt
10:12 bvcelari weird thing is this:
10:12 bvcelari salt-run mine.get fun='network_addrs' tgt='ec2_tags:Name:myuniqueminion' tgt_type='grain'
10:12 bvcelari returns the IP
10:12 bvcelari {% set myd = salt.saltutil.runner('mine.get', tgt='ec2_tags:Name:myuniqueminion', fun='network_addrs', tgt_type='grain') %}
10:12 bvcelari {{ myd }}
10:12 bvcelari returns an empty dict
10:12 tbb_ joined #salt
10:13 babilen Where?
10:15 bvcelari in a simple state.sls file
10:15 hemebond Um.... it has to go in a pillar file.
10:16 hemebond You said you were getting the mine data for your pillar.
10:17 bvcelari yes
10:17 bvcelari and testing in a state.sls file
10:17 hemebond Can you paste your pillar and state code somewhere?
10:18 bvcelari sure,
10:18 bvcelari but still, in pillar, get
10:18 bvcelari Jinja error: 'popitem(): dictionary is empty'
10:18 bvcelari I forced popitem, to check the error
10:19 babilen You'd use the runner in the pillar, but would use the the execution module function 'mine.get' directly in the state SLS
10:20 bvcelari let me check my pillar again
10:22 bvcelari and... you are right
10:22 bvcelari in pillar works
10:22 edrocks joined #salt
10:22 bvcelari @hemebond, Really appreciate your help
10:22 bvcelari thx a lot
10:22 hemebond ????
10:24 bvcelari did not know about how to debug with slat-run
10:24 bvcelari reaaaaally usefull O:)
10:27 candyman88 joined #salt
10:28 DontGetSalty joined #salt
10:29 N-Mi joined #salt
10:29 N-Mi joined #salt
10:32 tbb_ left #salt
10:34 heyimawesome joined #salt
10:41 bruce331 joined #salt
10:42 bruce331 left #salt
10:42 bruce331 joined #salt
10:46 bruce331 left #salt
10:48 bruce33 joined #salt
10:48 bruce33 Hi, I'm using pillarstack and wanting to use include: - file. It appears I should use jinja for this include in pillarstack. This works. Is there a way to include using relative directories?
11:00 penguinpowernz joined #salt
11:01 jas02 joined #salt
11:04 sh123124213 joined #salt
11:08 HRH_H_Crab joined #salt
11:08 lordcirth_work joined #salt
11:20 tmilam joined #salt
11:23 tmilam i'm getting 'Jinja variable function object has no element Undefined' from this state file: https://pastebin.com/pnksTHHf with this pillar: https://pastebin.com/r77dR6gw
11:24 tmilam does anyone see what i'm doing wrong? i'm sure it's something stupid....
11:24 hemebond tmilam: standard_processes is a list, not a dict.
11:24 hemebond It has not items() method.
11:26 tmilam hemebond: should line 1 look like this? {% for process in salt['pillar.get']('datadog:standard_processes') %}
11:26 hemebond Yes
11:26 tmilam i was getting element undefined that way too
11:26 hemebond Have you applied your pillar correctly?
11:29 tmilam here's the pillar https://pastebin.com/r77dR6gw AFAIK yes, but my salt/jinja knowledge is very limited
11:30 hemebond salt myminion pillar.get 'datadog:standard_processes'
11:31 tmilam that returns this: https://pastebin.com/nMFgRv1q
11:31 hemebond Looks fine.
11:33 tmilam yeah, doesn't make any sense
11:33 hemebond Paste your updated state code.
11:34 tmilam https://pastebin.com/8uBMWraA
11:35 tmilam it works now
11:35 hemebond Well that looks fine. Do you get an error?
11:35 hemebond ah
11:35 tmilam i know what it was.... i had commented out some code at the bottom of the file and didn't include it in my paste
11:35 hemebond ah
11:35 tmilam the comment syntax i used was {# #}
11:36 Praematura joined #salt
11:36 HRH_H_Crab joined #salt
11:36 tmilam i guess salt saw the code and tried to render the jinja that was commented out?
11:37 hemebond Not if you have {# #} around it.
11:37 hemebond That's Jinja block quoting, Nothing inside will be rendered.
11:38 icebal joined #salt
11:38 tmilam hemebond: tyvm for your help
11:38 hemebond ????
11:41 DontGetSalty Hello guys, im stuck with a situation with salt-cloud  Google Cloud Engine and salt-minion installation on deploy( boot ). Is there anyone who deal with such issue ?
11:42 hemebond DontGetSalty: With Windows servers/minions, yeah?
11:42 DontGetSalty yes - windows servers
11:42 DontGetSalty yes - windows servers
11:43 hemebond I wonder if anyone has used salt-cloud to provision and install a Windows minion.
11:43 hemebond On any provider.
11:43 DontGetSalty on linux is working pretty fine
11:43 DontGetSalty I do :D lol
11:44 DontGetSalty im here for a bit help ;)
11:44 hemebond Yeah. salt-cloud will SSH onto the new server to install salt-minion. Not sure how that would work with Windows. Do the Windows instances have SSH enabled by default?
11:45 hemebond Do you know how to provision a Windows instance that runs a custom script on startup?
11:48 _KaszpiR_ joined #salt
11:58 sh123124213 joined #salt
12:06 HRH_H_Crab joined #salt
12:10 bvcelari joined #salt
12:11 Neighbour How is it, that when I use file.apply_template_on_contents to render a bit of text as jinja, a variable I supply in the context dict turns out to be unknown in the bit of text?
12:11 hemebond Neighbour: Can you paste the code?
12:13 Neighbour https://pastebin.com/4H7F4TJd
12:14 DontGetSalty - regarding windows - nope there is no ssh on windows, there should be winRM script executed, or especially for google cloud - predefined script where you can put all the commands in powershell. Service account runs it during the deploy
12:14 Neighbour I would expect the jinja variable 'henk' to be present in filename.j2.yml
12:19 Neighbour hemebond: Any thoughts? :)
12:23 jas02 joined #salt
12:27 sh123124213 joined #salt
12:27 wangofett joined #salt
12:29 jas02 joined #salt
12:33 JohnnyRun joined #salt
12:35 Neighbour it's odd though, because `salt-call file.apply_template_on_contents contents='{{ henk }}' template=jinja context='{"henk": "data"}' defaults='{}' saltenv='{}'` returns 'data' as I would expect
12:37 GMAzrael joined #salt
12:38 amcorreia joined #salt
12:40 jas02 joined #salt
12:40 wangofett joined #salt
12:41 Naresh joined #salt
12:43 thinkt4nk joined #salt
12:46 HRH_H_Crab joined #salt
12:47 wangofett joined #salt
12:48 edrocks joined #salt
12:49 hemebond The import_text definitely finds the j2.yml file?
12:51 hemebond DontGetSalty: There is a Powershell version of the salt bootstrap script.
12:51 hemebond You could use that to automatically install salt-minion.
12:52 Neighbour hemebond: Yes, I'm getting a "Jinja variable 'henk' is undefined"-error
12:52 Neighbour with a dump of the target j2.yml-file in the line (or the line after) the variable is referenced
12:54 hemebond Have you tried putting the context dict as a string?
12:54 Brew joined #salt
12:54 hemebond That's what you've done in your salt-call.
12:54 hemebond But in your states you are passing a dict, not a string.
12:54 XenophonF hemebond: for Windows minions, Salt Cloud can connect to them via WinRM or SMB
12:55 XenophonF on my FreeBSD master, I have it set up to use WinRM
12:56 hemebond DontGetSalty: https://docs.saltstack.com/en/latest/topics/cloud/windows.html
12:57 XenophonF on my CentOS master, I have it set up to use WinExe
12:58 XenophonF DontGetSalty: https://github.com/irtnog/salt-states/tree/production/salt/files
12:58 XenophonF in case you want to see a working config for AWS
12:58 DontGetSalty topic : windows minion -- i am still playing with this, but no user is created so no connection to windows can be done
12:58 edrocks joined #salt
12:58 HRH_H_Crab joined #salt
12:59 Neighbour hemebond: Here's a full example: https://pastebin.com/ni7Ld7s6
13:00 hemebond Neighbour: Have you tried passing context as a string instead of a dict?
13:00 hemebond context="{'henk': 'data'}"
13:00 Neighbour Just tried it..no change
13:02 nicksloan joined #salt
13:04 hemebond Defaults too?
13:04 c_g joined #salt
13:04 hemebond For some reason the example in the docs has "context={}" "defaults={'template': 'cool'}"
13:04 hemebond Which seems odd.
13:04 c_g joined #salt
13:05 Neighbour hemebond: Yep...same..which is weird, because in salt/modules/file.py the defaults first get copied to context_dict, and then context_dict gets updated with the supplied context
13:05 Neighbour so I don't get why it doesn't work in this specific case
13:05 hemebond What if you simplify your template further to just echo out henk?
13:07 Neighbour If I change the filename.j2.yml to only contain `foo: {{ henk }}`, it errors out on that line with the same error, namely that the jinja variable 'henk' is undefined
13:08 hemebond k
13:08 ssplatt joined #salt
13:10 AvengerMoJo joined #salt
13:10 Tantagel joined #salt
13:11 HRH_H_Crab joined #salt
13:11 AvengerMoJo joined #salt
13:14 hemebond Okay works when I use a string, but not when I use import_text to fetch it.
13:15 hemebond Okay, import_text is trying to render the file.
13:15 Neighbour If I log.debug the context in salt/utils/templates.py the function render_jinja_tmpl, it shows that the passed variable 'henk' is indeed not present in the context
13:15 Neighbour O_o...why is it doing that?
13:16 karlthane joined #salt
13:17 hemebond Seems to be default behaviour for some reason
13:17 hemebond I had to use {% raw %}{% endraw %}
13:17 hemebond In the template file.
13:18 hemebond Then it all works fine.
13:18 hemebond I guess that what the (1) means in the error: the first line.
13:18 hemebond Where you import it.
13:19 johnkeates joined #salt
13:19 Neighbour hmm, could very well be..
13:20 Neighbour Though I'm not quite sure how I could import unaltered data into a jinja var
13:20 jas02 joined #salt
13:20 Neighbour without any parsing whatsoever being attempted
13:20 fracklen joined #salt
13:21 _JZ_ joined #salt
13:21 hemebond {% set henk = 'data' %}{% load_yaml %}{% include "template.j2.yml" with context %}{% endload %}
13:22 hemebond load_yaml as blah
13:24 thinkt4nk joined #salt
13:24 hemebond I have a feeling there's a better solution to what you're trying to do with this.
13:24 fracklen joined #salt
13:25 Neighbour it's a variant of what pillarstack does..very similar, but a little more flexible
13:25 Neighbour (well, the complete thing of what I'm doing with this)
13:25 fracklen joined #salt
13:26 hemebond Accessing pillars within pillars?
13:26 cyborg-one joined #salt
13:27 Neighbour sort of...accessing, updating pillar within an orchestration run depending on grains/pillars/opts (everything you can access from within jinja) and then dispensing the resulting pillars to targeted states (from the orchestration)
13:27 Neighbour with the orchestration being started with a commandline-provided pillar as well :)
13:29 hemebond Sounds... more complex than it needs to be.
13:29 Neighbour depends what you're trying to do with it :)
13:29 hemebond But then I haven't done much orchestration yet.
13:29 bvcelari joined #salt
13:29 hemebond At one point I had recursive interpolation for my pillar files.
13:30 hemebond Then realised it was easier to just use Jinja.
13:31 Neighbour it's part of a "based-on-configuration-json"- deploy multiple (non-identical) cloud-based instances (ec2, rds), configure all related cloud-based services you want to use (from pillar templates based on roles passed in the commandline) and everything that comes after that (including per-minion role-based system initialization)
13:32 Neighbour which can include a variable amount of roles, a variable amount of instances per role, a variable amount of services, etc
13:32 shiin joined #salt
13:32 hemebond Sounds fairly straight-forward.
13:33 shiin I need to get the contents of rndc.key to another minion. I have never tried salt mine before. Would this be a good use case to copy the file to the master periodically and from there make it a file.managed?
13:34 Rumbles joined #salt
13:35 brousch__ joined #salt
13:38 Neighbour hemebond: In any case...thanks for figuring out that import_text was doing things I hadn't expectec
13:38 Neighbour expected*
13:38 dendazen joined #salt
13:38 Praematura joined #salt
13:38 hemebond ????
13:40 numkem joined #salt
13:42 SaucyElf joined #salt
13:45 SaucyElf_ joined #salt
13:47 shiin Is salt mine even made to copy files?
13:47 shiin the documentation seems very limited, and few examples exist on google
13:47 hemebond shiin: No, just collect data.
13:48 hemebond And share it between minions.
13:48 shiin then I'd rather copy the rndc.key value to the pillar and distribute it in jinja templates?
13:49 HRH_H_Crab joined #salt
13:49 hemebond Can do.
13:49 stomith joined #salt
13:49 hemebond Is the file large?
13:49 shiin No. 4 lines.
13:49 shiin there's a string secret in there
13:49 hemebond Then you could just read the data out of it.
13:49 shiin With the mine?
13:50 hemebond Well you could use something to put it into the mine, yes.
13:50 hemebond A custom mine function.
13:52 fracklen joined #salt
13:52 shiin I'll give that a try, out of curiosity.
13:53 SaucyElf joined #salt
13:56 hemebond I'm off to bed. gnight all.
13:57 johnkeates need me to tuck you in?
13:57 shiin nini
13:57 hemebond left #salt
13:58 numkem joined #salt
14:00 HRH_H_Crab joined #salt
14:05 saintpablo joined #salt
14:09 nicksloan joined #salt
14:09 xet7 joined #salt
14:09 HRH_H_Crab joined #salt
14:13 racooper joined #salt
14:14 mpanetta joined #salt
14:20 jas02 joined #salt
14:20 _KaszpiR_ joined #salt
14:21 PatrolDoom joined #salt
14:23 Neighbour Can you make a deepcopy of a data-struct in jinja?
14:25 shiin Mine is not what I want. Mine distributes the secret file contents to all other minions. That's silly.
14:28 edrocks joined #salt
14:29 HRH_H_Crab joined #salt
14:31 mpanetta joined #salt
14:34 mikecmpb_ joined #salt
14:36 pheonix991 joined #salt
14:37 _KaszpiR_ joined #salt
14:39 Rumbles joined #salt
14:42 nicksloan joined #salt
14:48 LondonAppDev joined #salt
14:49 wangofett joined #salt
14:49 shiin left #salt
14:50 mikecmpbll joined #salt
14:50 HRH_H_Crab joined #salt
14:54 Thana_ joined #salt
14:54 sarcasticadmin joined #salt
15:06 HRH_H_Crab joined #salt
15:08 matt11 joined #salt
15:16 dxiri joined #salt
15:17 Rumbles joined #salt
15:17 HRH_H_Crab joined #salt
15:17 sjorge joined #salt
15:26 cyborg-one joined #salt
15:27 evle1 joined #salt
15:35 dxiri joined #salt
15:39 om2 joined #salt
15:44 SalanderLives joined #salt
15:47 MajObviousman I want to run wheel.error from an orchestrate state. To do this, I designate the function salt.wheel and a name of error.error, but error.error expects an argument of name
15:47 MajObviousman I recall seeing something about this in the docs, but now I can't find it
15:50 dxiri joined #salt
15:51 sp0097 joined #salt
15:59 dxiri joined #salt
15:59 rmelero joined #salt
16:00 PatrolDoom joined #salt
16:00 woodtablet joined #salt
16:03 impi joined #salt
16:04 pcn Is the salt-cloud meeting going?
16:06 pcn Oh, it's not when I thought'
16:06 pcn OK
16:19 Praematura joined #salt
16:22 overyander joined #salt
16:26 numkem joined #salt
16:26 pcn Has anyone else seen this: scloud.full_query() not returning info on a minion that's up and running (e.g. responds to test.ping, cmd.run, etc.)?
16:27 pcn Is there a way to refresh/clear cche there?
16:27 pcn s/cche/cache
16:30 mikecmpbll joined #salt
16:36 Inveracity joined #salt
16:37 dxiri joined #salt
16:40 impi joined #salt
16:44 Lionel_Debroux joined #salt
16:44 pcn Looks like the instande never got tagged with a name.
16:48 major To what degree is salt a community driven project vs driven by the interests of SaltStack.com and Salt Enterprise?
16:52 matt11 major: I think it's more community driven, the enterprise basically just keeps it running and provides a means for the developers to continue to develop the product
16:53 matt11 major: Thomas had mentioned this in one of the videos I watched, but can't remember the video
16:53 druonysus joined #salt
16:55 bvcelari joined #salt
16:55 major hmmm
16:56 matt11 major: it would be similar in fashion to say RH
16:56 matt11 RHEL
16:59 major well .. RedHat Linux has been sort of long gone for a while .. though I remember when RH Linux and RHEL existed side-by-side
16:59 pcn I think it's much more community drive than RHEL, since they fought centos for a while, and had a diffident relationship with fedora for quite a while
16:59 dstensnes i hope it's not like RHEL
16:59 dxiri joined #salt
16:59 pcn It is close to it's neighbor chef: lots of community input and motivation.
16:59 major I wouldn't really call RHEL community driven at all... at least not ever since they abandoned RHL
17:00 dstensnes IMHO RHEL seems to be fixed on going their own ways at times
17:00 major well .. that is generally true of any group really
17:01 major but I personally feel RHEL is certainly driven by their customer interests more so than any community interest
17:02 major their recent flip-flop on how they approach CentOS is something of an anamoly given their past .. though I hope they continue to have a good working relationship in the future.
17:02 rebbdohr joined #salt
17:02 SaucyElf joined #salt
17:03 pcn I heard that their hope from the sales side was that they'd kill centos by buying them, but TBH that's their best sales funnel so someone there knows what they're doing
17:03 PatrolDoom joined #salt
17:05 PatrolDoom joined #salt
17:06 DoomPatrol joined #salt
17:06 wendall911 joined #salt
17:06 PatrolDoom joined #salt
17:09 major yah.. RH has some interesting issues recognizing friend from foe at times
17:09 major like .. killing centos doesn't really get them all the CentOS users .. it drives the CentOS users to Mint or Scientific or something else
17:11 shred joined #salt
17:12 MajObviousman major: I think the recent flip flop on CentOS was less about "doing the right thing" and more about "People are using CentOS and blaming us when things don't work properly. That's damaging our image considerably."
17:12 rebbdohr joined #salt
17:12 rebbdohr joined #salt
17:12 MajObviousman neither do I see them killing it. There's clearly a strong desire for a "free" RHEL clone
17:13 dstensnes MajObviousman: obvious fix would be to fix the problems though...
17:13 rebbdohr_ joined #salt
17:14 MajObviousman vulnerabilities are a good example. Let's say something pops up in sudo and it's been responsibly disclosed
17:14 shanth salt seems to be really slow when using the archive.extract module on a large .tar.gz - is there a state module to do an http transfer of a file to download it to the minion?
17:14 dxiri joined #salt
17:15 MajObviousman redhat corporate has assets ready to receive the news, hunt down the fix from upstream, patch in a timely fashion (before embargo is up), and they're good to go
17:15 sh123124213 how do I return an exit code from a module ?
17:15 MajObviousman CentOS being largely volunteer may not have all of those assets ready. Some things slip, including crucial things
17:15 MajObviousman it's happened before
17:16 major well .. ideally CentOS's base to work with is always against the most recent RHEL release
17:16 dstensnes true, but then why should people not complain
17:16 MajObviousman oh and there was that time back in the mid 2000s when CentOS just fell off the face of the earth
17:16 it_dude joined #salt
17:16 MajObviousman dstensnes: they should complain to CentOS. But instead, because "CentOS is merely a clone of RHEL", they complain to RedHat instead
17:16 major slurp down the SRPM's, process out the trademarked stuff (likely a special stack of insanity there for every release), and apply the CentOS dressing
17:16 major well .. it isn't a clone per se
17:17 MajObviousman yes, it is not merely a clone
17:17 major they download the RHEL source RPM's and recompile them with the RH trademarks removed
17:17 MajObviousman there's a perception problem surrounding CentOS, and that perception problem damages RedHat corporate
17:17 major well .. as it should in many ways
17:17 major it is redhats sources after all ;)
17:17 dstensnes exactly
17:17 dstensnes but yeah, people cannot complain to redhat about centos problems directly
17:18 MajObviousman RedHat corporate cannot be held responsible for hysteresis of downstream patches
17:18 om2 joined #salt
17:18 MajObviousman but that still happens
17:18 pcn So, is anyone aware of salt-cloud/salt.cloud not tagging ec2 instances with their Name when launching from a map?
17:18 dstensnes but if centos tries to follow redhat closely, and is unable to, because stuff redhat releases, then there is a problem with the model
17:18 major true .. but more often than not the probelms down stream are either related to that huge window of "damn .. RHEL released more patches .. time to rebuild our entire platform"
17:18 dstensnes which side is unknown to me yet
17:19 MajObviousman dstensnes, major: the timer in my head just went off for "We should migrate this conversation to offtopic"
17:19 dstensnes don't have much experience with centos
17:19 dstensnes :) probably
17:19 MajObviousman #self-offtopic
17:19 major by the time RHEL releases they have already done the build/testing/etc .. CentOS can't even start until after RHEL is out the door .. so the latency window is huge
17:19 dstensnes MajObviousman: you mean #salt-offtopic?
17:19 major heh
17:19 MajObviousman what did I write?
17:19 MajObviousman oh, yes, that
17:19 * MajObviousman mixes words
17:19 dstensnes honest programmer mistake :P
17:20 MajObviousman did you join the other channel?
17:20 dstensnes i joined #salt-offtopic
17:20 dstensnes because logic
17:20 dstensnes :)
17:20 MajObviousman major: join cause I wanna talk atcha more about this, but not in here
17:22 ssplatt i just tried runnign salt-bootstrap on a gentoo vm, and got an error saying i need to add “=app-admin/salt-2016.11.5 ~amd64” to my accept keywords.  shouldn’t the bootstrap script do that?
17:27 censorshipwreck joined #salt
17:27 ssplatt https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh#L6150   should automatically unmask it right? so the script shouldn’t faill out?
17:29 Trauma joined #salt
17:35 ssplatt i do see “autounmask files successfully written” right after that, but then i see “* IMPORTANT: 3 config files in '/etc/portage' need updating.” right after that and then it fails.
17:36 numkem joined #salt
17:36 bast joined #salt
17:38 bast joined #salt
17:39 bast joined #salt
17:39 bast joined #salt
17:39 Edgan gtmanfred: I might be able to help, but my co-workers could probably help more.
17:41 PatrolDoom joined #salt
17:46 druonysus_ joined #salt
17:52 edrocks joined #salt
17:52 cyteen joined #salt
17:52 brent- joined #salt
17:54 nixjdm joined #salt
17:58 drawsmcgraw joined #salt
18:01 SalanderLives joined #salt
18:01 dxiri joined #salt
18:01 ssplatt manually running `dispatch-conf` worked. but i don’t htink that’s supposed to be the way it works...
18:02 mikecmpbll joined #salt
18:03 ssplatt https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh#L6153-L6160 looks like it was written to spceifically deal with this. but isn’t working as intended.
18:06 mikea- joined #salt
18:06 mikea- left #salt
18:07 mikea joined #salt
18:07 ssplatt i guess i’ll open an issue. i’m not sure of the correct fix, i just happened to feel like testing gentoo.
18:07 mikea hey, I am having a problem with an external pillar
18:07 mikea it's working
18:08 gtmanfred that sounds like the opposite of a problem
18:08 gtmanfred :P
18:08 mikea but I'm getting an error complaining about missing sls files: Specified SLS 'vault_users' in environment 'base' is not available on the salt master
18:08 mikea what stupid thing have I done to cause this? :-)
18:08 gtmanfred hrm, that sounds like fun
18:09 mikea https://pastebin.com/11stxU2D
18:09 mikea there's the full output
18:09 gtmanfred can you use gist.github.com
18:09 mikea no passwords were harmed during the making of this pillar
18:09 gtmanfred pastebin.com is blocked in some offices, because it uses flash for its ads, and has had some ads in the past that were spreading cryptolocker
18:09 mikea k
18:09 mikea one sec
18:09 gtmanfred thanks
18:10 mikea https://gist.github.com/mikeadamz/cd84d89f02a7b070a431774eb0c9a911
18:11 sh123124213 joined #salt
18:11 gtmanfred mikea: do you have vault_users specified in /srv/pillar/top.sls?
18:11 mikea yes
18:12 mikea that's all that's in top.sls at the moment
18:12 gtmanfred and you have /srv/pillar/vault_users.sls or /srv/pillar/vault_users/init.sls?
18:12 mikea neither, it's an external pillar
18:12 gtmanfred if you do not have those files, then you do not need to put it in top.sls
18:12 gtmanfred the external pillar works outside of the top.sls file
18:12 gtmanfred top.sls is only for stuff in /srv/pillar/
18:12 major interesting
18:12 mikea ohh
18:12 * major takes notes.
18:13 mikea so that external pillar is applied to every minion regardless?
18:13 * dstensnes takes notes too
18:13 mikea yeah, that did it
18:14 mikea thanks
18:14 mikea I knew I was being specialed
18:14 mpanetta ext pillar is fun
18:14 gtmanfred :)
18:14 gtmanfred yeah they are
18:14 mpanetta I have it set up with consul in my personal salt playground.
18:14 major that does raise they question as to how you filter them down?
18:14 gtmanfred now, i gotta go fix this bug and get ready for a meeting o/
18:14 mpanetta major: Filter in what way?  By minion id?
18:14 gtmanfred major: the minion_id is passed to the request to get the pillars
18:14 mpanetta ^^^
18:14 major oh...
18:14 major durp
18:15 gtmanfred for consul_pillar, the role and environment grains can also be passed
18:15 major damn...
18:15 mpanetta Oh that is new, sweet
18:15 mpanetta I've not tried that yet
18:15 rebbdohr joined #salt
18:15 mpanetta I'm actually using consul to define the roles so...
18:15 mpanetta Can't match on role hah
18:16 sh123124213 joined #salt
18:16 rebbdohr_ joined #salt
18:17 ChubYann joined #salt
18:18 sh123124213 how would I be able to run cmd.run from a module and return the correct error code ? :) maybe cmd.run_all ?
18:18 wolfpackmars2 joined #salt
18:19 sh123124213 gtmanfred: ?
18:19 gtmanfred cmd.retcode will give you the error code
18:19 gtmanfred run_all might, but i don't know
18:20 nicksloan joined #salt
18:22 shanth besides cmd.run, is there a state module to download a file over http in a formula?
18:22 sh123124213 I'm running __salt__['cmd.run'](cmd) from a module and I would want to return the same retcode that cmd.run gave
18:22 bvcelari joined #salt
18:22 sh123124213 I saw some stuff that plastikos did with cmd.run_all, will try it out. thnx
18:25 shred joined #salt
18:26 whytewolf shred: you mean like file.manage?
18:27 whytewolf err shanth you mean like file.manage
18:28 drawsmcgraw joined #salt
18:29 whytewolf shanth: file.managed source can be a http url. just needs to have a source_hash or skip_verify
18:29 miruoy joined #salt
18:34 dxiri joined #salt
18:38 shanth i need to download a .tar.gz file that is 1GB whytewolf
18:39 shanth it's too slow to use archive.extracted because it is 2GB unpacked. it takes about 20 minutes
18:39 dstensnes in my salt-master log file i lots of these: "[salt.transport.ipc][ERROR   ][30797] Exception occurred while handling stream: [Errno 0] Success"
18:39 shanth but if the .tar.gz is local it only takes minutes
18:39 dstensnes anyone knows if i'm doing something wrong?
18:40 dstensnes to me, the "[ERROR]" followed by "[Errno 0] Success" hints at a problem within salt?
18:43 candyman88 joined #salt
18:43 nixjdm joined #salt
18:46 nixjdm_ joined #salt
18:55 hashwagon joined #salt
19:01 toanju joined #salt
19:02 dxiri joined #salt
19:04 candyman88 joined #salt
19:05 edrocks joined #salt
19:07 shanth is watch the right thing to use if i want cmd.run when a config file is placed for the first time?
19:07 shanth i set a watch statement and the cmd.run runs every time
19:07 whytewolf watch with cmd.run is useless. cmd.wait is for watch. but cmd.wait is dep. use onchanges
19:08 shanth so use onchanges?
19:08 whytewolf well what exactly are you doing?
19:08 shanth http://dpaste.com/35MVEP9
19:08 whytewolf onchanges [and watch] only activate if the other state changes]
19:09 whytewolf okay, then yes you want onchanges
19:09 shanth i dont plan on that file changing but, i really just want the cmd.run to run the one time after the file is set
19:09 shanth but i dont want it to run again if the file changes :(, do i just have to do it manually then?
19:10 whytewolf ahhh, then maybe creates would be better
19:10 shanth oh wow didn't know that was an option!
19:11 shanth i think that's what i need thanks
19:13 whytewolf creates isn't a requisite it is a part of the cmd state.
19:13 whytewolf https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html
19:13 shanth not sure if im just using it wrong but
19:13 om2 joined #salt
19:14 shanth if i delete one of these 4 files and salt has to replace it, the cmd.run still doesn't run
19:14 shanth http://dpaste.com/3HKED27
19:14 shanth do i have to make 4 separate cmd.runs, one for each file?
19:14 whytewolf it doesn't run because creates means the cmd.run creates the file so don't run if it exists
19:14 whytewolf so, have your cmd also create a file and tag that file
19:15 shanth wait what
19:15 shanth cmd.run has to create the file?
19:15 whytewolf yes
19:16 whytewolf creates is a way of stopping a cmd.run from overriting a file that exists.
19:16 shanth using touch? i don't get it
19:16 cyborg-one joined #salt
19:16 numkem joined #salt
19:17 whytewolf iirc creates will create a file if the cmd.run doesn't but i need to double check that
19:17 shanth oh i see it in the example, well dang that's not what i want
19:18 shanth i just want that format command to only run the one time after those files have been placed, but not again because it's going to format my data :(
19:18 shanth maybe i can just have cmd.run make a file, and if that file doesn't exist then run the other commands
19:19 whytewolf yes. you want a lock file that says hey this cmd.run has run
19:19 shanth hmmm
19:19 shanth yasss
19:19 shanth good thinking
19:20 shanth it works now!
19:20 shanth http://dpaste.com/2PVRM64
19:21 whytewolf i personally would have put the creating the lock after the format ... but that is me. "only lock if we are sure this compleated
19:22 shanth oh right hehe
19:28 dxiri joined #salt
19:36 impi joined #salt
19:39 brent| joined #salt
19:44 major Need someone at SaltStack HQ poked...
19:49 shanth can i run state.apply and specify a top file? i don't see how in the doc page https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.apply but i swear i've seen it before
19:49 drawsmcgraw shanth: I believe what you want is state.top
19:50 shanth do'h, thanks drawsmcgraw
19:51 drawsmcgraw yep!
19:51 drawsmcgraw There's a lot of modules. Can't be expected to remember 'em all
19:52 GMAzrael question, if I want to require a state id from another state file, how would I specify the require?
19:53 whytewolf GMAzrael: same way you do if it is in the same file. just need to make sure it is also run in the same run. either through include or the top file
19:54 GMAzrael whytwolf: I have it specified in the top file linuxlab.sls and student-user.sls
19:54 GMAzrael the require is calling linuxlab.sls
19:55 GMAzrael but if I do require: - firefox-desktop then i get a dictionary error
19:55 shanth i copied my top file by doing cp top.sls hadoop.sls and trimmed out the lines i didn't need. when i run state.top hadoop.sls it throws errors.     Too many functions declared in state 'minion4' in SLS 'hadoop'
19:55 shanth does state.top use different top logic?
19:56 GMAzrael whytewolf: ^^
19:57 whytewolf GMAzrael: dictionary error?
19:57 GMAzrael Requisite declaration set-default-background in SLS student-users is not formed as a single key dictionary
19:57 whytewolf what version of salt are you using?
19:58 GMAzrael 2016.11.5
19:58 whytewolf odd.
19:58 GMAzrael sorry, 2015.8.8
19:58 GMAzrael don't know how I got on that
19:59 whytewolf well that would be the problem then. 2015.8.8 didn't have not including the module in the require
19:59 shred joined #salt
19:59 whytewolf that was introduced in 2016.3
20:01 miruoy joined #salt
20:01 nixjdm joined #salt
20:04 stomith joined #salt
20:06 dxiri joined #salt
20:08 Lawrence_ joined #salt
20:17 kwilke joined #salt
20:18 whytewolf Gah, zoom does not like my mic in ubuntu
20:19 MajObviousman grr, I can't get salt to return prematurely when I cmd.run or cmd.shell
20:20 MajObviousman salt 'c6minion' cmd.shell 'nohup bash -c "echo $(date) && sleep 5 && echo $(date)" >out & disown'  still waits until nohup is completed
20:24 shred joined #salt
20:24 whytewolf humm. could be a quote escape issue. i know i have had issues with quotes and cmd.* in the past. but that was going from state to custom module that ran cmd.run
20:26 candyman88 joined #salt
20:27 MajObviousman if I run the same command by ssh, it drops immediately as expected and the one-liner keeps going
20:27 MajObviousman so it's a salt thing
20:27 whytewolf wasn't saying it wasn't a salt thing
20:27 whytewolf i meant the escaping in salt
20:29 shred joined #salt
20:29 MajObviousman oh
20:34 dxiri joined #salt
20:34 rav_ joined #salt
20:36 shred joined #salt
20:39 bvcelari joined #salt
20:40 MajObviousman https://gist.github.com/anonymous/31e8340d32923f5f32b73a76319de144  wild
20:41 MajObviousman no matter what I do, salt just doesn't want to declare the command is "done" until disconnected child processes are all cleaned up
20:41 MajObviousman pathologically so
20:41 shred joined #salt
20:44 GMAzrael is it possible to if grains.productname is like "Optiplex*"?
20:58 dendazen joined #salt
20:58 dxiri joined #salt
21:01 nixjdm joined #salt
21:02 rmelero {{ if "Optiplex" in grains.productname }} should do it
21:02 PatrolDoom joined #salt
21:02 shanth salt keeps yelling at me that   Too many functions declared in state 'minion5' in SLS 'hadoop'. there is no minion5 listed in the top file and i removed minion5 from the accepted keys
21:02 shanth what the heck
21:03 shanth that's when i run state.apply
21:03 Tantagel check yamllint
21:03 Tantagel that's syntax errors
21:04 GMAzrael rmelero: https://gist.github.com/anonymous/cefd8e8a245782db4a5aa2b82e6deb68
21:04 GMAzrael grain still isn't setting
21:09 rmelero that seems like something more fitted for the map.jinja https://docs.saltstack.com/en/latest/topics/best_practices.html#modularity-within-states
21:09 rmelero that way you don't have to handle the login the the sls
21:10 rmelero s/login/logic/
21:10 MTecknology ^ +1
21:10 GMAzrael not that advanced yet :(
21:11 rmelero it's basically just creating the map.jinja file and doing the import in the sls
21:12 matt11_ GMAZrael: take a look at some of the formulas, you can get an idea
21:12 MTecknology GMAzrael: you'll have an easier time doing it the right way the first time, guaranteed
21:12 major well .. be certain to get a rug and spend several hours meditating upon what you have read...
21:12 GMAzrael the idea is that the productname is already pulled in the default grains
21:12 shanth anything blatantly wrong with my top file? it keeps throwing errors about minion5 and data not compiled http://dpaste.com/19R6V61
21:12 MTecknology You could also write a custom grain
21:12 shanth there is no minion5 :(
21:12 GMAzrael I just want to do a search based on that grain
21:13 MTecknology shanth: line 7 is right
21:13 shanth what?
21:13 GMAzrael shanth: missing a - match: compound on line 15
21:13 shanth everything is good except for the hadoop minion4, if i remove that i have no issues, if i add it, data not compiled for
21:14 shanth ohhhh
21:14 shanth seems to work without it, weirdddddddddddd
21:15 whytewolf if match isn't there it defaults to blob. and trys running your compound through the blob function
21:15 matt11_ GMAZrael: https://github.com/saltstack-formulas/template-formula/blob/master/template/map.jinja
21:15 shanth added the compound part, still getting this http://dpaste.com/04DXTEW
21:16 jas02 joined #salt
21:16 matt11_ GMAZrael: then you can add a grain to those, so it will automatically apply them
21:16 whytewolf shanth: are you sure there isn't a state with an id of minion5 in your hadoop sls?
21:17 shanth there's not
21:17 rmelero do a grep in your formulas dir for minion5 to be sure
21:17 whytewolf can you post the full contents of hadoop.sls
21:18 shanth oooh wait a minute
21:18 shanth i see what happened lol. i had hadoop/init.sls and hadoop.sls
21:18 shanth x_x
21:18 major ...
21:18 MTecknology oops
21:18 shanth i lazily named hadoop.sls to run with state.top
21:18 shanth derp
21:19 dxiri joined #salt
21:19 rmelero might want to lose some weight. the fatter my fingers get, the more mistakes
21:19 shanth classic rookie mistake
21:19 sjorge joined #salt
21:19 rmelero doritos and mountain dew seem to crust up my mouse as well
21:24 MTecknology GMAzrael: You should actually consider writing a custom grain module (file|gitfs)_roots:_modules/modname.py for something like that. The map would work, but the custom grain would be your most salty way to solve it. (no harder than what you're trying to do now)
21:24 whytewolf MTecknology: close ... custom grain would go in _grains not _modules
21:24 whytewolf :P
21:24 MTecknology oops
21:27 major can't believe you just used salty like that..
21:27 whytewolf ... could have sowrn you have been in this channel a while major. it is salt pun centeral
21:27 mpanetta hah
21:28 major yah .. I know...
21:28 major I am a bit salty over the lack of restraint ;)
21:28 mpanetta major: I think you just added a little salt to the problem
21:28 whytewolf you just have to take everything said with a grain of salt
21:29 whytewolf after all we are the pillars of the community
21:29 mpanetta haha
21:29 shanth this is a very novel bug/issue but when you run salt-key -d to delete keys it says 'Key for minion minion3 deleteed.' deleted is misspelled :)
21:29 whytewolf i thought that typo was fixed... or was that an upcoming release
21:32 shred joined #salt
21:34 major I feel like someone is salting the wounds
21:34 MajObviousman whytewolf: I'm judging you for that pun
21:34 MajObviousman major: you too
21:36 whytewolf well as long as you don't a salt me
21:36 drawsmcgraw joined #salt
21:37 Tantagel taking a pill, ar you? if that happens whytewolf
21:38 Tantagel no pain no grain
21:38 whytewolf Na.
21:39 MTecknology I need a functional salt cloud!!! :@
21:39 * MajObviousman stands back and throws boxes of ice-cream-grade rock salt at whytewolf
21:39 MajObviousman no assault, just battery
21:39 mpanetta whytewolf: How subtle...
21:39 mpanetta lol Na
21:39 whytewolf hehe ;)
21:39 major was good though
21:49 edrocks joined #salt
21:51 dxiri joined #salt
21:52 hemebond joined #salt
21:58 bvcelari joined #salt
22:01 sp0097 joined #salt
22:01 nixjdm joined #salt
22:09 mschiff joined #salt
22:09 mschiff joined #salt
22:16 mikecmpbll joined #salt
22:18 Bryson joined #salt
22:23 mschiff joined #salt
22:23 mschiff joined #salt
22:28 darvon joined #salt
22:29 dxiri joined #salt
22:29 sp0097 joined #salt
22:37 stooj joined #salt
22:38 woodtablet joined #salt
22:43 whytewolf ugh, it is 15:43 and i just realized that i had 1 meal today. luckilly it was the most important meal. Coffee
22:43 Tantagel I had like 8 meals today
22:45 darvon joined #salt
22:55 dxiri joined #salt
22:57 ssplatt joined #salt
23:01 nixjdm joined #salt
23:01 MTecknology whytewolf: heheh, nice. I was tilting my head until I got to the punch line.
23:03 seanz joined #salt
23:24 dxiri joined #salt
23:38 tongpu_ joined #salt
23:50 dxiri joined #salt

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