Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-08-29

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

All times shown according to UTC.

Time Nick Message
00:07 obimod joined #salt
00:08 Guest73 joined #salt
00:08 obimod hmm, can't seem to call w/in a jinja file: {{ salt['output.txt']('[BAD DNS] %s ' % dns_address) }} (trying to debug a list of dns addresses)
00:08 obimod looks like salt.modules.output is not a thing, is it required to be under the modules namespace to be accessible w/in jinja?
00:12 obimod i'll just do something else :)
00:13 hemebond obimod: You probably need to use module.run or something.
00:13 obimod @hemebond that works too! :D
00:13 obimod thanks!
00:13 hemebond Though are you just trying to print out a value?
00:13 obimod yup, a bit of a convoluted way to go about it
00:14 hemebond You know Jinja is a templating language, yeah?
00:14 obimod but it brought up the question about what salt namespaces are available w/in jinja :)
00:14 hemebond It's not a Salt thing, it's a Python templating engine.
00:14 obimod yea
00:14 obimod more logic, the better ;) jk
00:14 obimod cheetah is like python and it's a templating language ;) i love to bring that up just to play devils advocate to "no logic in templates" argument
00:15 obimod i think one could build a webserver with cheetah
00:15 obimod a bit extreme, but maybe?
00:15 hemebond Never used Cheetah.
00:16 obimod and when i said cheetah is like python i meant it allows python to be embedded
00:16 hemebond Yeah, I think I've seen it.
00:16 hemebond Just never used it.
00:24 johnj_ joined #salt
00:26 noobiedubie joined #salt
00:33 johnj_ joined #salt
00:37 shoemonkey joined #salt
00:41 dxiri joined #salt
00:45 wonko21 joined #salt
00:45 PFault joined #salt
00:46 Hazelesque joined #salt
00:46 mrud joined #salt
00:46 mrud joined #salt
00:47 Church- joined #salt
00:57 Church- joined #salt
00:57 jas02 joined #salt
01:02 masber joined #salt
01:05 leev joined #salt
01:07 hexa- joined #salt
01:13 GMAzrael joined #salt
01:13 charlien joined #salt
01:19 shred joined #salt
01:27 tiwula joined #salt
01:50 evle2 joined #salt
01:51 ilbot3 joined #salt
01:51 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.7, 2017.7.1 <+> 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
02:01 aleph- joined #salt
02:02 Church- joined #salt
02:05 jas02 joined #salt
02:08 LostSoul joined #salt
02:09 oida joined #salt
02:10 zerocool_ joined #salt
02:10 zerocoolback joined #salt
02:14 aleph- joined #salt
02:31 onlyanegg joined #salt
02:39 LostSoul joined #salt
02:47 dxiri joined #salt
02:53 charlien left #salt
02:55 shred joined #salt
03:10 LostSoul joined #salt
03:21 jas02 joined #salt
03:32 michelangelo joined #salt
03:32 shanth__ joined #salt
03:32 jessexoc joined #salt
03:38 omie888777 joined #salt
03:42 Frikkie_ joined #salt
03:46 dxiri joined #salt
03:48 oida_ joined #salt
03:52 Guest73 joined #salt
03:58 Frikkie_ login frikkie_
03:59 Frikkie_ Hi, I am dealing with KeyError: 'provider', using stable 2016.3, I compared the cloud.config and cloud.profiles with https://docs.saltstack.com/en/latest/topics/cloud/config.html#amazon-aws
03:59 Frikkie_ any suggestions for troubleshooting would be appreciated
04:00 Frikkie_ I assume this is a yaml parsing error, but I have tried every format I can come up with
04:00 hemebond Frikkie_: Can you show your profile and provider configs?
04:01 shanth_ joined #salt
04:01 Frikkie_ my_aws_account:   ssh_interface: public_ips   id: STUFFANDGOETERS   key: xxxxxxxxxxxxxxiuy8975jhlklll;;   keyname: AWS_DEV_KEY   securitygroup: default   private_key: /root/.ssh/AWS_DEV_KEY.pem   driver: ec2   location: us-west-1   script: bootstrap-salt   script_args: stable 2016.3   minion:       master: xxx.233.213.77
04:01 hemebond Not in here please.
04:01 Frikkie_ sorry, where can I provide it
04:01 hemebond Also include the file paths please.
04:01 hemebond pastebin.com ?
04:02 Frikkie_ will do
04:04 iggy !paste
04:04 hemebond ...
04:04 iggy hmm... must be broken :(
04:05 Frikkie_ https://pastebin.com/hfWkpdJw
04:07 hemebond Looks fine to me.
04:08 hemebond "my_aws_account" is "ic-aws-west"?
04:08 masber joined #salt
04:09 Frikkie_ the account user, or profile?
04:10 hemebond In the error you first pasted.
04:12 Frikkie_ yes, here is the command I run: salt-cloud -l debug -p base_ec2_micro_west prod-content1
04:12 saltstackbot joined #salt
04:12 Frikkie_ and I get https://pastebin.com/J4NtNC23
04:14 Frikkie_ I tested with a config that worked last week and still had no joy, it feels like something in a bad state more than a syntax error
04:17 hemebond Maybe move the profile into a file under cloud.profiles.d/ ?
04:19 Frikkie_ let me try
04:23 hoonetorg joined #salt
04:24 Frikkie_ Brilliant, much progress, complaininig about Profile base_ec2_micro_west is not defined
04:24 Frikkie_ That I can probably figure you, thank you very much
04:24 hemebond oh
04:24 hemebond Your command is incorrect.
04:24 hemebond No wait
04:24 hemebond It's fine.
04:24 hemebond I didn't see the space.
04:26 jas02 joined #salt
04:29 Frikkie_ mmm no it just got further because it did not see my profiles once I moved it to /etc/salt/cloud.profiles.d/cloud.profiles
04:30 Frikkie_ [DEBUG   ] Missing configuration file: /etc/salt/cloud.profiles
04:30 hemebond No
04:30 hemebond You still need cloud.profiles even if it's empty.
04:30 hemebond Move the profile config inside to cloud.profiles.d/myaws.conf
04:30 Frikkie_ ok, let me try
04:33 Frikkie_ yeah back to the original error:
04:33 Frikkie_ https://pastebin.com/t0wCtHvj
04:36 hemebond Which version of salt-cloud?
04:36 Frikkie_ NICE, I re-formatted cloud.profiles.d/myaws.conf and got a AMI does not exist, and that I can figure out, guessing the AMI is no longer in use
04:36 hemebond Reformatted?
04:36 Church- joined #salt
04:38 Frikkie_ I also had the same lines for aws-east instance above it, same information, just different name and ami. I removed that one
04:39 Frikkie_ The other profile still had the old driver: instead of provider, but because I was not uding it I could not see how it affected it
04:39 Frikkie_ must have cuased the parsing error
04:39 hemebond Did it have the same name?
04:39 hemebond Oh different.
04:39 hemebond Then yes, that would have been the problem.
04:40 hemebond Since it parses all providers and profiles.
04:40 dxiri joined #salt
04:40 Frikkie_ Sorry for the rabbit hole, but moving the configs isolated the issue, thanks for the help
04:43 _KaszpiR_ joined #salt
04:55 hemebond ????
04:57 _KaszpiR_ joined #salt
04:58 _aeris_ joined #salt
04:59 oida_ joined #salt
05:08 cyborg-one joined #salt
05:11 Bock joined #salt
05:26 _KaszpiR_ joined #salt
05:34 aleph- joined #salt
05:38 jas02 joined #salt
05:46 preludedrew joined #salt
05:52 sh123124213 joined #salt
05:53 impi joined #salt
06:18 jas02 joined #salt
06:26 felskrone joined #salt
06:44 GMAzrael joined #salt
06:44 Ricardo1000 joined #salt
06:55 johnj joined #salt
06:57 justanotheruser joined #salt
07:06 zerocoolback joined #salt
07:13 jas02 joined #salt
07:14 justanotheruser joined #salt
07:14 pipps joined #salt
07:19 Hybrid joined #salt
07:19 zulutango joined #salt
07:25 Trauma joined #salt
07:32 omie888777 joined #salt
07:37 Mogget joined #salt
07:40 ivanjaros joined #salt
07:42 Mogget joined #salt
07:46 schasi joined #salt
07:47 schasi Hi everyone
07:51 Trauma joined #salt
07:52 schasi I have a salt-cloud module where I get values via vm_.get('value'). These values are in the cloud.profile.d/test.conf. (How) can I get values from a state, like orch/test.sls?
07:52 schasi I tried config.get_cloud_config_value, but that didn't really work
07:53 schasi What I want to achieve is to have some values for salt-config vm creation per VM, not per profile. Like the MAC address, which is per profile right now.
07:56 johnj joined #salt
07:57 mikecmpbll joined #salt
08:06 coredumb joined #salt
08:07 pualj joined #salt
08:19 coredumb joined #salt
08:22 oida joined #salt
08:23 colegatron joined #salt
08:28 Trauma joined #salt
08:35 ahrs joined #salt
08:37 mike25de joined #salt
08:39 * mike25de hi all
08:45 GMAzrael joined #salt
08:55 Mattch joined #salt
08:55 Trauma joined #salt
08:57 johnj joined #salt
08:58 JohnnyRun joined #salt
09:02 schasi hi
09:10 johnj joined #salt
09:18 coredumb joined #salt
09:19 mavhq joined #salt
09:21 pualj joined #salt
09:23 _KaszpiR_ joined #salt
09:26 Trauma joined #salt
09:35 sh123124213 joined #salt
09:36 aldevar joined #salt
09:42 Trauma joined #salt
09:47 sh123124213 joined #salt
09:57 netcho joined #salt
09:59 ereslibre joined #salt
10:00 ereslibre hello! one question: is it possible to match a 'salt/run/*/ret' event tag in a reactor to react to an orchestration result for example? It looks to me like it's possible but it seems not to work, is this possible?
10:01 ereslibre (e.g. we have 'salt/job/*/ret/*' and we are getting highstate results just fine)
10:03 babilen Do you see the event if you listen on the event bus?
10:03 babilen Haven't tested it, but I'd say that if you have incoming events then you should be able to trigger reactions
10:03 ereslibre babilen: yes, I can see it as [DEBUG   ] Sending event: tag = salt/run/20170829094818047136/ret; data = {'fun_args': .....
10:04 aldevar joined #salt
10:04 babilen Run "salt-run state.event pretty=True" and see if it arrives :)
10:06 _KaszpiR_ joined #salt
10:06 ereslibre salt/run/20170829100515703876/ret{ and all its body beneath it
10:06 babilen But your reactor isn't triggered?
10:06 GMAzrael joined #salt
10:06 ereslibre nope, it isn't
10:06 babilen What happens?
10:07 ereslibre that's my main question :), I wasn't even sure if this is because this event is triggered in the master and thus ignored
10:07 ereslibre because other events like salt/job/*/ret/* are working just fine
10:08 babilen It might be - Haven't matched on that before, but would have - naïvely (?) - assumed, that you can react to all events on the event bus
10:08 ereslibre me too...
10:08 babilen Next step would be to run the master in debug mode (salt-master -l debug) and see what's going on. Maybe something useful is logged.
10:09 ereslibre babilen: is there a big difference with running the orchestration I'm reacting to with -l debug?
10:09 ereslibre maybe salt-master -l debug shows something more yeah... thanks, will try that
10:12 cyteen joined #salt
10:12 johnj joined #salt
10:13 zerocoolback joined #salt
10:21 nomasprime joined #salt
10:21 nomasprime Does anyone know how I could iterate over files in a directory and rename them to a specific format?
10:22 GMAzrael joined #salt
10:22 Naresh joined #salt
10:34 ereslibre babilen: also, interestingly enough `salt-run event.send 'salt/run/foo/ret' '{}'` does trigger the reactor :/
10:36 ereslibre (so I can discard a misconfiguration on the reactor side)
10:38 netcho Hi all
10:38 netcho i am having some issues with boto_ec2 .. can someone pls check my syntax/logic? am i doing something wrong here?
10:38 netcho https://hastebin.com/uweserilot.vbs
10:38 netcho trying to add aws machines behinfd load balancer
10:44 hammer joined #salt
10:50 netcho this one works
10:50 netcho https://hastebin.com/giqodosizi.bash
10:50 netcho so looks like i messed up somewhere
10:50 impi joined #salt
10:59 hammer065 joined #salt
10:59 schasi When using salt-cloud over salt.orchestration, where would instance specific data (like a MAC-address) go and how would it get to salt-cloud?
11:01 netcho schasi:  grains?
11:01 schasi netcho: Well, I want salt-cloud to set the MAC-Address :D
11:02 netcho cloud profile then?
11:03 schasi That is what I tried first, but it is not instance specific
11:03 schasi It would mean you can only create one VM per profile, if you set the MAC-Address there
11:03 netcho correct
11:04 schasi Which I could do, but that would not be the best solution imo. I would prefere to set it in the cloud.sls which is used by salt.orch
11:04 netcho you can have default profile and extend it for others with changing just MAC
11:05 schasi But haven't found a way to get that value into the salt-cloud module that actually interfaces with the hypervisor and creates the VMs and such
11:05 schasi That would do as a work around, I guess
11:05 schasi Thank you
11:08 ibro joined #salt
11:10 ibro Hi !
11:10 ibro I'm having some problems with SaltCloud with PyVmomi (VMWARE)
11:10 ibro [ERROR   ] There was a profile error: global name 'GetSi' is not defined
11:11 ibro anyone experiencing similar issues ?
11:13 johnj joined #salt
11:13 ibro > # salt-cloud -V | grep Python
11:13 ibro Python: 2.7.13 (default, Jul 12 2017, 17:32:34)
11:14 netcho can you paste your profile?
11:18 toanju joined #salt
11:19 msid joined #salt
11:20 ibro_ joined #salt
11:21 msid Are there any pros/cons when using extend vs {require,watch}_in (or vice versa)? Is one preferred over the other and why?
11:22 sh123124213 joined #salt
11:24 ibro_ here
11:24 babilen ereslibre: That's quite pesky
11:25 babilen ereslibre: Sounds as if those events are explicitly filtered :(
11:25 ibro_ https://pastebin.com/8U1ppBpW
11:25 ereslibre babilen: yeah... anyways, will keep looking. thank you!
11:25 ibro_ everything worked fine, until I've upgraded salt to latest version
11:28 skeezix-hf joined #salt
11:29 ibro_ https://pastebin.com/JvP2s6Li
11:29 ibro_ here is the complete error
11:33 Mogget left #salt
11:41 hamartin joined #salt
11:44 Trauma joined #salt
11:45 magz0r joined #salt
11:46 Mogget joined #salt
11:46 LostSoul joined #salt
11:53 netcho sorry ibro i have no clue
11:54 rpb joined #salt
11:55 colttt joined #salt
11:59 netcho can someone tell me what am i doing wrong here? :) obviously list/dic issue but i cannot figure out
11:59 netcho https://hastebin.com/korelipaga.vbs
12:00 netcho Passed invalid arguments to boto_elb.set_instances: unhashable type: 'list'
12:02 ibro @netcho: no problem, I'll try to figure it out
12:02 daemonkeeper joined #salt
12:05 LostSoul joined #salt
12:05 nomasprime joined #salt
12:08 zerocoolback joined #salt
12:10 usernkey joined #salt
12:11 Mogget joined #salt
12:11 dev_tea joined #salt
12:12 Nahual joined #salt
12:14 GMAzrael joined #salt
12:14 johnj joined #salt
12:15 colttt joined #salt
12:15 nku joined #salt
12:16 Nahual joined #salt
12:24 sfxandy joined #salt
12:24 sfxandy left #salt
12:24 sfxandy joined #salt
12:28 sfxandy hi everyone
12:28 sfxandy quick sanity check required please...
12:29 sfxandy whats the correct format for specifying a pillar.get call that retrieves a structure similar to foo:bar as part of a Salt mine function declaration...?
12:29 sfxandy have tried several different formats and the mine.get call comes back empty
12:30 sfxandy have ruled out obvious things like minion targetting and misspelt function names
12:30 babilen Could you show what you have?
12:30 sfxandy sure....
12:32 sfxandy babilen - https://gist.github.com/anonymous/11d12ef4d62b96a916ce473925314e20
12:33 babilen Ah! You sure that should work?
12:33 sfxandy well, this is it!
12:34 sfxandy no reason why it __shoudn;t__ work is there?
12:34 dstensnes joined #salt
12:34 dstensnes key -> key:  ?
12:34 dstensnes relevant?
12:35 babilen You can try "key: 'foo:bar'"
12:35 ssplatt joined #salt
12:35 gh34 joined #salt
12:35 babilen First should be equivalent though (arg vs kwarg)
12:36 sfxandy dstensnes: good question  however it fails with or without 'key'
12:36 sfxandy babilen, trying that now
12:36 dstensnes sfxandy: i was more thinking about missing ":"
12:36 dstensnes after "key" and before "foo"
12:36 sfxandy yeah i realised that
12:36 sfxandy i inadvertantly pasted an old version of the function definition.  i corrected the missing : a while ago
12:36 dstensnes might also have to quote "foo:bar"
12:37 dstensnes however, all my suggestions here are purely on the yaml level, and nothing about if it should work or anything... just a small disclaimer there
12:37 babilen sfxandy: So you tried: key: 'foo:bar' ?
12:38 sfxandy yes that failed
12:38 babilen And just to make sure, the equivalent salt-call pillar.get foo:bar works on the minion?
12:38 sfxandy yes works perfectly
12:38 babilen And you have updated the mine?
12:38 sfxandy yes
12:38 sfxandy several times
12:39 mchlumsky joined #salt
12:39 babilen Apart from other mistakes that aren't in your paste I don't see anything that I would change anymore
12:39 sfxandy ah! ok so out of desperation I tried a mine.flush first of all, then a refresh and it is now showing.
12:40 sfxandy the working format of the function definition is "- foo:bar"
12:40 sfxandy no "key" argument name present
12:40 sfxandy very odd
12:40 babilen So it does *not* work when you pass key?
12:40 babilen I would expect both to work
12:41 sfxandy trying that now
12:41 sfxandy no, with the key argument name passed and quoting the "foo:bar" it does not work
12:42 babilen Okay
12:42 babilen Ah, it's not a kwarg in the pillar.get signature
12:42 sfxandy ah ok, that explains it
12:42 mchlumsky joined #salt
12:43 dstensnes babilen: should have been maybe?
12:43 sfxandy so the only other question which i'm happy to leave as a rhetorical is why a mine.flush was needed?
12:44 dstensnes suppose rhetorical it is then :P
12:44 sfxandy am happy to accept things are the way they are at times...
12:44 dstensnes i really like to understand why usually
12:45 dstensnes occationally i will drill on those things for hours
12:50 numkem joined #salt
12:50 zerocoolback joined #salt
12:52 babilen sfxandy: A cache entry that said "I have this data already" is my only intuition
12:57 cgiroua joined #salt
13:00 GMAzrael joined #salt
13:03 pualj joined #salt
13:07 seffyroff joined #salt
13:09 hoonetorg joined #salt
13:11 nomasprime joined #salt
13:14 johnj joined #salt
13:18 sh123124213 joined #salt
13:21 Brew joined #salt
13:28 Sarphram joined #salt
13:29 nomasprime Is there a way to get file.readdir to ignore dot files/directories?
13:30 pualj_ joined #salt
13:34 Trauma joined #salt
13:35 wavded joined #salt
13:53 tapoxi joined #salt
13:58 GMAzrael joined #salt
13:59 keltim joined #salt
14:02 Trauma joined #salt
14:03 dxiri joined #salt
14:05 netcho jebe se tebi :D
14:05 netcho sorry, wrong chat
14:14 neil_ joined #salt
14:16 johnj joined #salt
14:23 bildz I am trying to reorganize our salt environment and make it modular between the multiple AWS regions I'm supporting.  I'm getting hung up on having multiple file_roots for base, stage, uat, production.  With regards to win-repo, will that need to exists in all file_roots, or can it just reside in base.  Base will be what I see being a standard install for all systems and then I will handle the web/app side
14:23 bildz within the stage/uat/prod directories.
14:24 k1412_ joined #salt
14:26 nomasprime Can someone tell me why salt['file.find']("/tmp/{0}-{1}".format(slspath, pillar.acbuild.version), ['print=name', 'type=f']) is returning absolute paths?
14:26 nomasprime When I run from the command line I get just the file name
14:29 noobiedubie joined #salt
14:29 tommyfun_ joined #salt
14:32 mikecmpb_ joined #salt
14:40 evle joined #salt
14:40 nomasprime nm
14:47 toanju joined #salt
14:47 k1412_ joined #salt
14:57 sarcasticadmin joined #salt
15:10 omie888777 joined #salt
15:11 noraatepernos joined #salt
15:11 ritz joined #salt
15:11 tiwula joined #salt
15:13 mikecmpbll joined #salt
15:14 maestropandy1 joined #salt
15:16 ekkelett joined #salt
15:16 maestropandy1 left #salt
15:17 johnj joined #salt
15:23 Nani_ joined #salt
15:25 Mattch joined #salt
15:30 maestropandy joined #salt
15:31 maestropandy2 joined #salt
15:33 k1412_ left #salt
15:39 shred joined #salt
15:39 noraatepernos Anyone here successfully gotten mariadb-server installed?  My problem is that connection_user and connection_pass cannot be used to create a usable admin user on Ubuntu 16.04.  It’s a horrible chicken or the egg mess.
15:40 DammitJim joined #salt
15:41 ereslibre babilen: so it turns out I catched all events on the reactor and the orchestration result looks like {"tag"=>"20170829152920635067", "event_data"=>{"_stamp"=>"2017-08-29T15:29:20.635574", "minions"=>["7cdf5860bd9f4489bbd1fca32a3dfd87", "admin", "18c31ac5fcc247478f61d00bc924aea2"]}, "orchestration"=>{"tag"=>"20170829152920635067", "event_data"=>{"_stamp"=>"2017-08-29T15:29:20.635574",
15:41 ereslibre "minions"=>["7cdf5860bd9f4489bbd1fca32a3dfd87", "admin", "18c31ac5fcc247478f61d00bc924aea2"]}}}
15:41 ereslibre babilen: tag is just the orchestration id :/
15:43 hemebond left #salt
15:47 Electron^- joined #salt
15:49 numkem joined #salt
15:50 wavded joined #salt
15:50 armyriad joined #salt
16:00 spuder joined #salt
16:01 spuder joined #salt
16:01 ritz joined #salt
16:05 whytewolf noraatepernos: connection_default_file=/etc/mysql/debian.cnf
16:06 nomasprime Does anyone know how to verify a file with gpg and asc?
16:08 GMAzrael joined #salt
16:09 lordcirth_work nomasprime, gpg --verify thing.asc
16:10 lordcirth_work Assuming you've added the keyds
16:10 lordcirth_work key*
16:11 nomasprime lordcirth_work: so just cmd.run or is there any bult-in support?
16:12 lordcirth_work nomasprime, well this gets you partway: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.gpg.html#module-salt.modules.gpg
16:12 lordcirth_work oh it has verify too
16:12 lordcirth_work Sorry, I didn't really look at the channel name before answering :P
16:14 nomasprime lordcirth_work: no probs, thanks :D Looks like can be pieced together until this feature gets merged (https://github.com/saltstack/salt/issues/40596)
16:17 johnj_ joined #salt
16:18 bcat joined #salt
16:20 lordcirth_work yeah that PR looks nice
16:20 noraatepernos whytewolf: I think you just uncovered my problem.  Where is connection_default_file set?
16:21 whytewolf noraatepernos: it is another connection arugment. how were you trying to set connection_user?
16:22 noraatepernos With connection_user and connection_pass.
16:22 whytewolf ...
16:23 whytewolf that didn't answer the question
16:23 noraatepernos Oh.  Setting it to root?
16:23 whytewolf is this a state? are you trying to do this on the cli?
16:23 noraatepernos state, yes.
16:24 nixjdm joined #salt
16:25 whytewolf https://gist.github.com/whytewolf/23e33d9f92abec8ae369d35d05720fca
16:25 Church- joined #salt
16:42 ivanjaros joined #salt
16:46 shred joined #salt
16:55 jas02 joined #salt
17:03 noraatepernos_ joined #salt
17:04 numkem joined #salt
17:05 pipps joined #salt
17:05 Trauma joined #salt
17:07 Shirkdog joined #salt
17:09 coredumb joined #salt
17:10 LostSoul joined #salt
17:13 pipps joined #salt
17:13 majuscule joined #salt
17:13 majuscule Does anyone here use the pip state, particularly with the pre_release flag?
17:13 majuscule trying to figure out if i'm missing something or if it's completely broken (https://github.com/saltstack/salt/issues/9939)
17:15 majuscule also, how is it possible for there to be 65 pages of "high severity" issues, *up to 5 years old without a response*
17:18 A_Person___ joined #salt
17:18 johnj_ joined #salt
17:22 MTecknology 27k closed PR's? holy crappers
17:22 MTecknology This saltstack thing might just catch on. :P
17:29 numkem joined #salt
17:33 GMAzrael joined #salt
17:34 swills joined #salt
17:34 nixjdm joined #salt
17:40 Church- joined #salt
17:43 coredumb joined #salt
17:59 maestropandy joined #salt
18:10 omie88877777 joined #salt
18:14 swills joined #salt
18:19 johnj_ joined #salt
18:28 cholcombe is it safe to use a gitfs remote salt formula in production?
18:29 cholcombe MTecknology: i hope it does
18:29 iggy cholcombe: the normal way of doing that is to fork the upstream formula under your own user/org and use that as your gitfs
18:29 Trauma joined #salt
18:29 cholcombe iggy: good idea
18:30 xet7 joined #salt
18:33 nidr0x joined #salt
18:34 nixjdm joined #salt
18:35 N-Mi joined #salt
18:35 N-Mi joined #salt
18:39 Electron^- joined #salt
18:42 wryfi i have a logging conundrum. we use a cloud logging service, and i'd like to send our master and minion logs there. easy enough via syslog, but this will inevitably leak infrastructure secrets to our cloud provider in file diffs. does anyone have any creative solutions that would avoid this security leak?
18:42 ry joined #salt
18:45 aleph- joined #salt
18:48 pipps joined #salt
18:49 shred joined #salt
18:51 pipps joined #salt
18:53 high_fiver joined #salt
18:56 _KaszpiR_ joined #salt
18:57 Guest73 joined #salt
18:59 pipps joined #salt
19:03 djinni` joined #salt
19:10 jas02 joined #salt
19:14 adam5 joined #salt
19:14 adam5 I'm looking for some marketing assistance with this material: try http://loch.reallyhim.com for some jedi mind trick #proof, http://bereshit.reallyhim.com to end world hunger with the magic of virtual reality, and http://jerusalem.reallyhim.com to see pre-crime here and now. also last of not least of importance, technocracy, here http://gate.reallyhim.com and then maybe some... magical sign in the sky: http://threetag.reallyhim.com
19:20 johnj_ joined #salt
19:23 cyborg-one joined #salt
19:32 pipps joined #salt
19:34 nixjdm joined #salt
19:35 toanju joined #salt
19:38 MTecknology adam5: I assume you're well aware that's not remotely close to on-topic for this channel. Please do not use #salt as your advertising platform.
19:40 justan0theruser joined #salt
19:43 justanotheruser joined #salt
19:45 Heartsbane joined #salt
19:45 Heartsbane joined #salt
19:50 Church- joined #salt
19:56 mikecmpbll joined #salt
20:01 Church- joined #salt
20:02 Eelis joined #salt
20:02 Eelis good evening, i'm confused by step 4 in https://docs.saltstack.com/en/latest/ref/states/writing.html#full-state-module-example . i expected the SLS to look like this: http://codepad.org/ZN93DCkx . any clues?
20:04 mechleg Eelis: a state module is something like pkg.installed that would go into salt states usually represented by YAML which is your second example
20:05 mechleg in your second example, the state module is my_custom_state.enforce_custom_thing
20:05 pipps joined #salt
20:06 Eelis wait, is pkg.installed really a state module? i thought "pkg" was the state module and "pkg.installed" was the state function
20:06 mechleg you are right, i misspoke
20:07 Eelis ok, and would it be wrong to say that /srv/salt/my_custom_state.sls declares a state?
20:07 mechleg that is the state file, which would call state modules
20:08 Eelis ok, but then i don't get why the "pkg.installed" state function in the "pkg" state module is called with different syntax than the "my_custom_state.enforce_custom_thing" state function in the "my_custom_state" state module
20:09 Eelis (when declaring a state by calling state functions)
20:10 whytewolf Eelis: pkg.installed is just a shortcut for pkg: -installed
20:10 whytewolf and yes you can use that shortcut with your own custom state
20:10 Eelis i see! is that a YAML rule or a salt stack rule?
20:11 whytewolf it is a saltstack thing
20:11 Eelis is the version i pasted then perhaps equivalent to the version in the documentation?
20:12 whytewolf yeap
20:12 Eelis where are these rewrite rules documented?
20:13 sjorge joined #salt
20:13 whytewolf look at the bottom of https://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html#moving-beyond-a-single-sls at both the examples and the note
20:14 Eelis hmm, intriguing. thanks!
20:15 wavded joined #salt
20:16 wonko21 joined #salt
20:16 jas02 joined #salt
20:21 johnj_ joined #salt
20:21 Eelis one last question: this shortcut does not operate on '.' characters that appear in the name part of a state declaration, right?
20:22 Eelis only in state function calls
20:23 Eelis as someone profoundly confused by this shortcut, i can't wait to find out how much typing it's gonna save me when i master it :)
20:24 Eelis it better be a LOT
20:25 whytewolf yes, it only effects the module section of the state dict
20:25 whytewolf [although dots can be problems else where]
20:25 Eelis perfect, thanks again
20:26 Eelis i'll have more questions later but i don't want to spend all my credit now ;)
20:27 whytewolf lol. I'm not a salt employee [yet]. so your credit is good here :P
20:27 Eelis hehehe
20:28 Eelis well, i'm reading about the possibility of putting all of one's nginx config in state files, relying on templates like https://github.com/saltstack-formulas/nginx-formula/blob/master/nginx/ng/files/server.conf to jinja-generate nginx's real config files
20:29 Eelis it looks really cool, but i wonder what the benefits are
20:29 Eelis because the obvious down side is that i'll never stand a chance debugging templates like the above
20:29 noobiedubie joined #salt
20:29 xet7 joined #salt
20:31 Eelis in other words, how do you decide how much config to try to put into state files?
20:31 whytewolf well i have a custom module that will help you debug highly jinja templates like that. https://github.com/whytewolf/salt-debug it does a render on a minion then returns the results back to you. also you can use cp.get_template to render the template on the minion to a file
20:31 iggy my first salt repo was almost 0 jinja
20:32 Eelis whytewolf: very interesting, thanks
20:32 whytewolf Eelis: it all comes down to how comfortable you are with your render engine of choice. [does not have to be jinja]
20:32 iggy it all depends on your needs... if you have one nginx config to worry about, no need to go overboard with jinja
20:32 whytewolf i would go so far to say with proper use of file.recurse you might not any jinja
20:32 iggy if you have 250 servers all with slightly different nginx configs, then you start adding in jinja
20:33 shanth_ joined #salt
20:33 Eelis ahh i see, that makes a lot of sense
20:33 iggy the tipping point is going to be different for each person
20:33 * whytewolf shivers thinking of things going wrong with 250 servers with different configs each
20:33 wonko21 joined #salt
20:33 nixjdm joined #salt
20:35 Eelis for an application that has a config file in json format, would it be reasonable to write the config directly in a sls as yaml and trivially generate the application config file from it?
20:36 whytewolf https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.serialize
20:36 iggy I've had template files that were a single line `{{ somedata | json }}`
20:38 Eelis right, makes sense, so then i wonder why, say, nginx, doesn't accept json as a config file format. that would make it natively salt stack friendly and would remove the need for complex translation
20:39 iggy json isn't exactly easy for humans to read/write (at least not something as complex as an nginx config could be)
20:39 iggy yaml would be more reasonable
20:39 Eelis true
20:39 iggy but nginx pre-dates the widespread use of json/yaml
20:44 Eelis one more question about https://docs.saltstack.com/en/latest/ref/states/writing.html#full-state-module-example : what would happen if you replaced the last two hyphens with spaces, making the second list element a dictionary of all 3 arguments?
20:45 Eelis do the arguments have to be passed in the weird "list of singleton dictionaries" way?
20:45 Eelis or is that a convention
20:46 evilet joined #salt
20:47 whytewolf it has to be a list. [not everything gets passed in as a dict.]
20:47 Eelis if you pass a dict with two elements, is it an error?
20:47 mechleg i think it has more to do with the function you are passing arguments to, whether it accepts the list or dict
20:48 Eelis interesting
20:48 whytewolf mechleg: we are talking about the module level of states. which always has to be a list
20:48 whytewolf arguments below that are dependent on the module
20:49 mechleg my mistake, i though he was refrencing the YAML state
20:52 pipps joined #salt
20:52 Eelis well i'm not talking about not having a list at all. more like replacing the   - name: a_value   and  - foo: Foo   lines with a single   - { name: a_value, foo: Foo }  line
20:53 iggy those aren't the same thing
20:53 iggy but yeah, valid yaml is valid yaml
20:53 pipps99 joined #salt
20:54 Eelis right, but i wonder if maybe the python implementation of the state function can't tell the difference
20:54 whytewolf they can
20:54 Eelis ok
20:54 iggy yeah, those aren't the same thing, so it's going to notice
20:56 vexati0n weird behavior in Syndic -- I use grains caching, which is fine and shows me everything I need *except* that it doesn't cache any grains from actual downstream masters themselves. why?
20:56 iggy but you can easily use something like `pkg.installed: [name: vim, arg2: whatever]`
20:56 Eelis hmmm, if i was implementing a state function, i wonder in what kind of scenario i would think  "instead of accepting parameters in a dict like {a:b, c:d}, i'll instead make the user pass a list of singleton dicts like [{a:b},{c:d}]
20:56 vexati0n I get a full cache from minions attached to downstream masters, but not for the masters
20:57 whytewolf i think that would be [{name:vim},{arg2:whatever}]
20:57 iggy Eelis: dicts aren't ordered, lists are
20:57 iggy there's another reason as well, but I can't remember exactly
20:57 whytewolf the main one being the original question asked
20:58 whytewolf module.function is a shortcut for module: - function
20:58 Eelis iggy: ahh, i see, so some state functions might actually accept [{a:b},{a:c}] and do something intelligent with both b and c?
20:59 iggy with both of them having a key of 'a' I don't think so
20:59 whytewolf ["function",{a:b},{d:e}]
20:59 Eelis yeah, what whytewolf said :)
20:59 iggy I think the state compiler would choke before the function got anything
21:00 iggy yeah, sorry, was free handing it running late for a meeting :/
21:00 Eelis if the python code implementing the state function really just gets to see the list, it could collect both b and c if it was given  - a: b  and  - a: c   items, right? just by iterating over the list of dicts
21:02 whytewolf it doesn't iterate over them. it wants to just pass everything into the function.
21:02 pipps joined #salt
21:03 whytewolf the list of dicts is just a big kwarg
21:03 Eelis hmm, i guess the semantics of state functions might be more closely related to the semantics of python argument passing than i thought
21:04 Eelis so i'll need to study kwargs then :)
21:06 Church- joined #salt
21:07 Eelis if it's turned into a kwarg, then does that mean that the state function won't be able to tell the difference between ["function", {a:b}, {c:d}] and ["function", {c:d}, {a:b}] ?
21:07 Eelis *into kwargs
21:07 whytewolf yes, order doesn't matter
21:08 Eelis right, so the ordered-ness of the list here only matters to get the non-keyword arguments to the front?
21:08 shanth_ anyone going to saltconf?
21:09 whytewolf shanth_: I am
21:09 whytewolf Eelis: pretty much yeah
21:09 shanth_ you doing a talk there whytewolf?
21:09 whytewolf shanth_: i am
21:09 shanth_ very nice
21:10 whytewolf [at least i hope to have my talk finished by then, stupid procrastination]
21:10 Eelis ok, then i'm beginning to see why they introduced the '.' shortcut. it sort of hides it a little that you're writing a list in the first place
21:10 Eelis so you can think of the "- x: y" entries as though they were 'just' keyword args
21:13 Eelis (i say "hides it a little" but in reality i only just noticed that i had been writing lists of singleton dicts in my sls files the whole time :p)
21:15 Eelis in saltstack, is there any technical difference between "state" and "formula"? or is "formula" basically "state written by someone else, usually with a lot of parameterization"?
21:16 whytewolf formulas are basicly a package of states
21:16 Eelis ahh
21:18 jas02 joined #salt
21:20 whytewolf there is a structure most of them follow.
21:21 whytewolf https://github.com/saltstack-formulas/template-formula
21:21 khaije1 joined #salt
21:22 johnj_ joined #salt
21:24 GMAzrael joined #salt
21:25 khaije1 Hi all, where should I report packaging issues?
21:27 whytewolf khaije1: if it is something on repos.saltstack.com then salt-pack project in github
21:28 khaije1 it is, thanks whytewolf
21:30 Eelis if state A includes state B (using "include") and A is applied to a minion, is it possible that only B is visible in the minion's highstate, and that the information that B was applied due to A being applied is lost?
21:34 nixjdm joined #salt
21:36 hemebond joined #salt
21:40 omie888777 joined #salt
21:42 justan0theruser joined #salt
21:44 justanotheruser joined #salt
21:47 sh123124213 joined #salt
21:54 darioleidi joined #salt
21:55 whytewolf salt isn't really stateful. it doesn't know if a state is applied until it is running its highstate and checks how the system is configured. so it doesn't know one state to the next
21:56 whytewolf that is actually a benifit. as it means you can setup things outside of salt. and add them to salt later with out it actually making changes.
21:56 whytewolf [although the cron states do add tag info to the cronjob and trys to impliment things statefully there]
22:00 * whytewolf really hopes his talk isn't at but crak in the morning
22:00 vexati0n yeah if you want "stateful" behavior from salt, you have to build some kind of framework around it and make salt just be the engine that enforces what you want. at least, that's what i have always done.
22:02 Eelis ah ok, that makes sense
22:03 Eelis i was writing a utility very similar to https://github.com/ceralena/salt-state-graph and was just seeing how much i could show
22:04 Eelis i guess i can just make my utility understand 'include'
22:04 debian112 joined #salt
22:05 omie888777 joined #salt
22:08 whytewolf humm, i wonder what that tool would do with my current project. also, i with there was a show_orchestration option. would be interesting to see it build out the orchestration info. as well as give a decent tool for orchestration debugging
22:09 Eelis i'll let you know when it's usable :)
22:10 CmndrSp0ck joined #salt
22:12 scooter joined #salt
22:13 pipps joined #salt
22:13 ECDHE_RSA_AES256 joined #salt
22:18 pipps joined #salt
22:23 johnj_ joined #salt
22:24 Electron^- joined #salt
22:24 jessexoc joined #salt
22:25 ssplatt joined #salt
22:28 jas02 joined #salt
22:30 sfxandy joined #salt
22:32 pipps joined #salt
22:34 pipps99 joined #salt
22:35 omie88877777 joined #salt
22:36 pipps_ joined #salt
22:45 dxiri_ joined #salt
22:58 ssplatt joined #salt
23:00 shred joined #salt
23:10 Deliant joined #salt
23:13 tacoboy joined #salt
23:18 GMAzrael joined #salt
23:23 johnj_ joined #salt
23:25 nixjdm joined #salt
23:35 jas02 joined #salt
23:40 pcgod joined #salt
23:42 CrummyGummy joined #salt
23:58 dragon788 joined #salt
23:59 daks_ joined #salt

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