Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-12-27

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

All times shown according to UTC.

Time Nick Message
00:12 eThaD joined #salt
00:15 keimlink joined #salt
00:19 aarontc joined #salt
00:31 filippos joined #salt
00:36 mavhq joined #salt
00:46 myraft joined #salt
00:47 justanotheruser joined #salt
00:53 eThaD joined #salt
00:57 netcho joined #salt
00:58 nerdsville Hello, I ended up setting up salt from the develop branch and it still seems to not find the libvirt drivers for salt-cloud... I am using version salt-cloud 2016.11.1-1639-g8c70cc9 (Carbon)
00:59 nerdsville [WARNING ] The cloud driver, 'libvirt', configured under the 'kvm-us-1-01' cloud provider alias, could not be loaded. Please check your provider configuration files and ensure all required dependencies are installed for the 'libvirt' driver.
01:04 nerdsville Any help would be greatly appreciated :)
01:14 sh123124213 joined #salt
01:19 jeddi joined #salt
01:21 Sarphram joined #salt
01:24 jeddi joined #salt
01:55 madboxs joined #salt
02:03 AdamSewell joined #salt
02:41 sebastian-w joined #salt
02:41 whytewolf nerdsville: do you have the python library loaded for libvert? [ie can you from the same python that salt runs as 'import libvert' as well as 'from libvirt import libvertError']
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.4, 2016.11.0 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
02:49 catpiggest joined #salt
03:12 onlyanegg joined #salt
03:15 sh123124213 joined #salt
03:42 AdamSewell joined #salt
03:45 netcho joined #salt
03:48 bastiandg joined #salt
04:00 armguy joined #salt
04:00 evle joined #salt
04:04 justanotheruser joined #salt
04:04 DEger joined #salt
05:05 eThaD joined #salt
05:16 cyborg-one joined #salt
05:17 sh123124213 joined #salt
05:27 eThaD joined #salt
05:38 jeddi joined #salt
06:01 SpX joined #salt
06:04 preludedrew joined #salt
06:04 sp0097 joined #salt
06:07 DoomPatrol joined #salt
06:09 eThaD joined #salt
06:25 icebal joined #salt
06:36 ivanjaros3916 joined #salt
06:38 DoomPatrol joined #salt
06:50 aarontc joined #salt
07:04 DEger joined #salt
07:05 sh123124213 joined #salt
07:09 madboxs joined #salt
07:17 PatrolDoom joined #salt
07:19 PatrolDoom joined #salt
07:20 DoomPatrol joined #salt
07:33 oaklndr1 joined #salt
07:47 DoomPatrol joined #salt
07:54 darioleidi joined #salt
08:08 JohnnyRun joined #salt
08:15 nerdsville whytewolf: testing now, sorry about the delay I fell asleep
08:15 eThaD joined #salt
08:20 teclator_ joined #salt
08:21 PatrolDoom joined #salt
08:25 nerdsville whytewolf: that got us closer! but now I get an error that the qemu path is not set which is odd because it is prompting for SSH login for the provider, it is also giving me a KeyError
08:25 nerdsville KeyError: 'fqdn'
08:25 nerdsville Failed to create VM test-clone. Configuration value 'fqdn' needs to be set
08:25 nerdsville internal error: no QEMU URI path given, try qemu:///system
08:27 samodid joined #salt
08:27 nerdsville Fixed the qemu path, was missing /system from the URI :)
08:29 Armadillo joined #salt
08:31 DoomPatrol joined #salt
08:32 DoomPatrol joined #salt
08:35 nerdsville Getting this now :( AttributeError: 'NoneType' object has no attribute 'text'
08:37 eThaD joined #salt
08:39 nerdsville Hmm... so I fixed the issue and it is because the parsing requires the "description" xml value to be set, I don't believe this should be required, if this is the case, I don't mind fixing this issue and making a PR :) let me know
08:40 Trauma joined #salt
08:52 sh123124213 joined #salt
08:56 sh123124213 joined #salt
08:57 cyteen joined #salt
08:57 madboxs joined #salt
08:57 eThaD joined #salt
09:17 preludedrew joined #salt
09:26 keimlink joined #salt
09:30 ruxu joined #salt
09:32 mirko hey guys, anybody of yout at the 33c3 in Hamburg, Germany?
09:43 PatrolDoom joined #salt
09:55 jf_ joined #salt
09:55 jf_ can somebody help me with configuring the boto_ec2 execution module?
09:56 jf_ https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.boto_ec2.html says to define stuff in a pillar... which I do, but I still get
09:56 jf_ ERROR executing 'boto_ec2.get_id': No authentication credentials found when attempting to make boto ec2 connection to region "us-east-1".
09:59 jf_ I'm actually not sure about how to define those 2 things in the pillar, but in my pillar file, I've got http://pastebin.com/qxfy0K3A
09:59 jf_ what am I doing wrong?
10:06 jf_ joined #salt
10:07 jf_ can somebody help me with configuring the boto_ec2 execution module?
10:07 jf_ https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.boto_ec2.html says to define stuff in a pillar... which I do, but I still get
10:08 jf_ ERROR executing 'boto_ec2.get_id': No authentication credentials found when attempting to make boto ec2 connection to region "us-east-1".
10:08 jf_ I'm actually not sure about how to define those 2 things in the pillar, but in my pillar file, I've got http://pastebin.com/qxfy0K3A
10:08 jf_ what am I doing wrong?
10:12 samodid Hi there,
10:13 samodid i have quiestion about reactors
10:13 samodid https://docs.saltstack.com/en/latest/topics/reactor/#mapping-events-to-reactor-sls-files
10:14 samodid do reactor run async or sync ?
10:15 samodid if i define several sls files for some event
10:16 samodid do they run one by one or independ ?
10:18 madboxs joined #salt
10:18 madboxs joined #salt
10:34 sh123124213 joined #salt
10:38 netcho joined #salt
10:40 PatrolDoom joined #salt
10:40 madboxs joined #salt
10:48 DoomPatrol joined #salt
10:53 DoomPatrol joined #salt
10:57 PatrolDoom joined #salt
11:01 madboxs joined #salt
11:05 DoomPatrol joined #salt
11:15 lasseknudsen joined #salt
11:19 lasseknudsen2 joined #salt
11:22 madboxs joined #salt
11:23 sh123124213 joined #salt
11:29 sh123124213 joined #salt
11:34 sh123124213 joined #salt
11:34 lasseknudsen joined #salt
11:37 abednarik joined #salt
11:41 sh123124213 joined #salt
11:43 madboxs joined #salt
11:45 ivanjaros joined #salt
11:45 sh123124213 joined #salt
11:53 lasseknudsen2 joined #salt
11:58 lasseknudsen joined #salt
12:01 lasseknudsen2 joined #salt
12:01 ruxu joined #salt
12:04 madboxs joined #salt
12:05 lasseknudsen joined #salt
12:12 lasseknudsen2 joined #salt
12:19 xet7 joined #salt
12:22 sh123124213 joined #salt
12:25 madboxs joined #salt
12:28 sh123124213 joined #salt
12:46 madboxs joined #salt
12:51 DEger joined #salt
12:52 lasseknudsen joined #salt
13:06 madboxs joined #salt
13:11 netcho joined #salt
13:14 DEger joined #salt
13:24 sh123124213 joined #salt
13:27 madboxs joined #salt
13:36 AdamSewell joined #salt
13:37 netcho joined #salt
13:39 sebastian-w joined #salt
13:51 lasseknudsen joined #salt
13:59 Mandorath joined #salt
14:02 sh123124213 joined #salt
14:05 Mandorath I'm reading the manual on 'Storing Static data in the Pillar' and was wondering if I can also use a pillar key:value pair in a pillar top file to match certian pillar files to minions, like in a state top file? I can find only one line mentioning this behavior and am not sure if it is possible.
14:05 lasseknudsen joined #salt
14:08 madboxs joined #salt
14:09 TyrfingMjolnir joined #salt
14:13 cyteen joined #salt
14:30 saintpablo joined #salt
14:30 madboxs joined #salt
14:40 Witol joined #salt
14:44 UForgotten joined #salt
14:44 cmarzullo not entirely sure what you mean but you can use jinja in your pillar files. So it'll pick the pillar apprpriate for that minion.
14:44 afics joined #salt
14:45 Zaunei joined #salt
14:45 cmarzullo 'my_minion*': ['generic_pillar', 'generic_pillar{{grains.get['id']}}']
14:45 cmarzullo 'my_minion*': ['generic_pillar', 'generic_pillar.{{ grains['id'] }}' ]
14:45 cmarzullo second one a littl ebtter.
14:51 madboxs joined #salt
14:53 jf_ joined #salt
14:53 tkharju joined #salt
14:53 jf_ can somebody help me with configuring the boto_ec2 execution module?
14:53 jf_ https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.boto_ec2.html says to define stuff in a pillar... which I do, but I still get
14:53 jf_ ERROR executing 'boto_ec2.get_id': No authentication credentials found when attempting to make boto ec2 connection to region "us-east-1".
14:53 jf_ I'm actually not sure about how to define those 2 things in the pillar, but in my pillar file, I've got http://pastebin.com/qxfy0K3A
14:53 jf_ what am I doing wrong?
14:56 Mandorath cmarzullo: Within a state top file you can use a pillar to match sls files --> base: 'pillar_key:pillar_value': - dirone.stateone <-- I was wondering if this was also possible in a pillar top file. It looks illogical but there was one line mentioning this in the manual i mentioned.
15:00 cmarzullo So like using pillar in pillar? I am pretty sure you can't do that. Since the whole thing is 'compiled' it'd have to have completed before you can use the values.
15:01 cmarzullo Other times it's comes up people use jinja to import a file as yaml.
15:03 froztbyte joined #salt
15:04 mschiff joined #salt
15:04 mschiff joined #salt
15:14 Sripathi joined #salt
15:17 abednarik joined #salt
15:21 DEger joined #salt
15:23 DEger joined #salt
15:27 rojem joined #salt
15:30 Sripathi joined #salt
15:32 madboxs joined #salt
15:33 mpanetta_ joined #salt
15:33 shoemonkey joined #salt
15:34 mpanetta_ joined #salt
15:35 Trauma joined #salt
15:39 Salander27_ joined #salt
15:43 theblazehen joined #salt
15:50 jf_ hello?
15:52 DEger joined #salt
15:53 madboxs joined #salt
16:02 Trauma joined #salt
16:07 netcho joined #salt
16:08 yawniek joined #salt
16:08 yawniek should my pillars from git not be cloned automatically on start of the salt-master ?
16:13 catpigger joined #salt
16:20 whytewolf jf_: did you make sure the pillar is actually on the minion? with pillar.items.
16:21 mswart left #salt
16:23 johnkeates joined #salt
16:28 whytewolf yawniek: no they are not. they get updated about 60 seconds later. this is to keep from refreshing to often which can be an issue. if you want to force an update you can use salt-run git_pillar.update
16:29 stanchan joined #salt
16:29 SamYaple im not seeing if there is a way to do this exactly, but how would you check grains for other hosts inside of a sls
16:30 whytewolf SamYaple: you would use the salt mine functions.
16:30 yawniek whytewolf: ok thanks. i'm trying to change to the new config format: https://gist.github.com/yannick/9c52bb64ba07bd86bcad91f06682c12f but this fails somehow
16:30 yawniek beforehand i had a entry in my .ssh/config that added the identity files
16:31 SamYaple whytewolf: even for a grain set in a previous state run?
16:32 whytewolf SamYaple: you asked about grains being read from one host to another.
16:33 whytewolf SamYaple: since grains are not shared data. the only way to get that data is to setup a mine.
16:34 whytewolf yawniek: that looks right. what exactly is the error you get?
16:35 jf_ joined #salt
16:35 yawniek whytewolf: GitError: ERROR: Repository not found.  as if i try to clone without keys
16:35 jf_ whytewolf: yes I did
16:37 whytewolf yawniek: in the master config file set 'log_level_logfile: debug' restart the master then issue a salt-run git_pillar.update and check the logs.
16:37 jf_ but like I said - I dont know if I'm even setting it up correctly (see http://pastebin.com/qxfy0K3A). I mean, is it literally "ec2.keyid: SOME KEYID"... or is it "keyid:" under "ec2"?
16:37 SamYaple whytewolf: that makes sense. I can make that work. however im not sure thats the best way to do what im trying to do then
16:38 whytewolf jf_: both are right [kind of] one is default keys if no profile is passed to your state the other is a profile.
16:38 yawniek whytewolf: i already had that form debug, but here are the rest: https://gist.github.com/yannick/fc56194b6bc40e4cb12b67f0c0b31320
16:39 yawniek it seems not to sue the keys
16:39 yawniek i'm on 2016.11.1-1
16:40 promorphus joined #salt
16:42 whytewolf i wonder if the spacing in your config might be throwing it odd
16:42 whytewolf off
16:45 whytewolf yawniek: this is what i have as you can see it isn't much different then what you have https://gist.github.com/whytewolf/089963a4cd551fefc24d1ac89858fae0
16:45 yawniek which spacing do you mean?
16:45 whytewolf the spaceing after pubkey and privkey
16:46 whytewolf it shouldn't matter of coarse
16:47 whytewolf but there are a lot of shouldn'ts that do in this industry
16:48 yawniek nope its not that
16:48 ernescz joined #salt
16:49 sh123124213 joined #salt
16:49 yawniek ok PBKAC, wrong key files
16:50 whytewolf well, that would be a problem
16:50 whytewolf :b
16:51 debian112 joined #salt
16:51 yawniek copy paste fail
16:53 jf_ whytewolf: so if I set up the values in the minion config, the minion picks it up, but not if I set them up in pillars?
16:54 jf_ (although the values do show up when I check for pillar.items)
16:54 oida joined #salt
16:54 whytewolf jf_: when something says it can be setup in the config file or in pillar the function used internally to see the value is https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.config.html#salt.modules.config.get
16:55 iggy pillar.items and pillar.get don't always show the same thing
16:55 iggy did you do a refresh_pillar?
16:55 madboxs joined #salt
16:56 jf_ sorry, but nope. Not actually aware that I need to
16:56 jf_ how do I do a refresh_pillar? (sorry)
16:57 iggy salt-call saltutil.refresh_pillar
16:57 whytewolf salt 'minion' saltutil.pillar_refresh
16:57 iggy both should work
16:57 ruxu joined #salt
16:57 jf_ I see. Will try
16:58 whytewolf btw, i never fully answered your question about ec2.keyid vs ec2: keyid. ec2.keyid = default no profile. ec2: keyid = profile named ec2
16:59 jf_ ok it seems like I had to do the 2nd form. I suppose the first form would have worked, but for calling it on the minion
17:00 whytewolf and i think i need coffee. i normally am better about the pillar.get vs pillar.items thing
17:00 esharpmajor_ joined #salt
17:01 jf_ well thanks for your help anyway! I finally have it set up now. Thanks, whytewolf and iggy
17:04 iggy yeah, salt-call is run from the minion
17:04 anotherzero joined #salt
17:06 abednarik joined #salt
17:08 oaklndr1 joined #salt
17:10 jf_ that makes sense. I was just logged in on the master
17:11 lws joined #salt
17:20 anotherzero joined #salt
17:21 lws joined #salt
17:28 abednarik joined #salt
17:29 ernescz Hey guys! Is it possible to avoid salt-cloud's bootstrap deploy.sh script from printing itself after successful deployment? I mean the 'some-minion:deploy_kwargs:script' output.
17:30 ernescz passing '-q' option doesn't seem to have any effect on that.
17:32 Vaelatern joined #salt
17:36 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.4, 2016.11.0 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
17:36 svg left #salt
17:36 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.4, 2016.11.1 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
17:38 gtmanfred ernescz:you can set display_ssh_output: False to hide all ssh output from salt-cloud
17:38 gtmanfred https://docs.saltstack.com/en/latest/topics/cloud/misc.html#hide-output-from-minion-install
17:38 sh123124213 joined #salt
17:38 whytewolf hey gtmanfred happy holidays
17:39 gtmanfred hi :)
17:39 gtmanfred happy holidays
17:39 gtmanfred I got engaged over the break :D so that was exciting
17:39 whytewolf nice! congratz!
17:39 gtmanfred thanks :)
17:40 oida joined #salt
17:42 ernescz gtmanfred: thanks, this might help. Though it hides all the output... I'll try my luck with the '--out-file' of salt-cloud. And congrats! :)
17:42 gtmanfred yeah, that is one way to do it, you might also try passing --quiet, it should make some output quieter, but not remove it all
17:45 ernescz great! thanks for the hint!
17:46 wangofett Is there a better way to get a single file from the minion to the master than doing `cmd.run "cat /path/to/file"`?
17:47 wangofett I know you can enable [pushing](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.push)
17:47 wangofett but I don't really want to do that, as it's pretty much a one-off need
17:48 wangofett cmd.run would basically work if it could output just the result of the command and not the minion: \n<indented output>
17:49 whytewolf that pretty much it
17:49 ponyofdeath whytewolf: hi, trying to follow ur example here https://github.com/whytewolf/salt-phase0-states/blob/master/mysql/users.sls to transform my pillar data to work with contents_pillar: but when i use {% set users = salt.pillar.get(users,{}) %} i get users is undefined even tho i have users: in my pillar.items output.
17:50 whytewolf ponyofdeath: check pillar.get users
17:50 ponyofdeath whytewolf: yup that works
17:50 whytewolf also would need to see your code
17:50 DEger joined #salt
17:51 whytewolf cause if you just took my code line for line it uses a lookup table to iterate over a list of dicts that should be looked up
17:51 ponyofdeath whytewolf: https://gist.github.com/evilbulgarian/95d880a1130af5a3b8ebcc5a66daaa1c
17:54 Trauma joined #salt
17:54 whytewolf well you still are using a list instead of a dict.
17:55 whytewolf although that should at least iterate over it
17:55 whytewolf not sure why it isn't
17:56 Edgan joined #salt
17:56 Brew joined #salt
17:58 madboxs joined #salt
18:03 hwtt joined #salt
18:03 cyborg-one joined #salt
18:05 ponyofdeath whytewolf: how can i structure my pillar so that i iterate over dict instead of list?
18:07 whytewolf ponyofdeath: the header of my example has a user structure that is dict based.
18:07 wendall911 joined #salt
18:09 whytewolf ponyofdeath: https://gist.github.com/whytewolf/73c22b8cd81666e57ec9218fa321599f
18:09 ponyofdeath tyx
18:09 ponyofdeath thx :)
18:13 Trauma joined #salt
18:34 netcho joined #salt
18:38 cyteen joined #salt
18:39 madboxs joined #salt
18:46 Heartsbane joined #salt
18:46 Heartsbane joined #salt
18:56 DEger joined #salt
18:59 Praematura joined #salt
19:00 onlyanegg joined #salt
19:00 madboxs joined #salt
19:01 nidr0x joined #salt
19:04 shoemonkey joined #salt
19:09 bfrog_ joined #salt
19:09 bfrog_ is there a way to actually update mine data? mine.update doesn't seem to do anything useful
19:09 bfrog_ even if I do salt '*' mine.flush first
19:10 ponyofdeath whytewolf: is there a good way to debug these data structures as i am trying to visualise them?
19:10 ponyofdeath whytewolf: something like pretty print inside the jinja :)
19:11 whytewolf i typically use my debug.render and use {{ data }} to output it
19:11 aw110f joined #salt
19:12 dj_goku joined #salt
19:12 dj_goku I am trying to copy a file on the file system of the salt master to a minion is this possible with file.copy
19:14 whytewolf dj_goku: read the note on file.copy
19:14 whytewolf "The copy function accepts paths that are local to the Salt minion. This function does not support salt://, http://,"
19:14 whytewolf you want file.managed
19:15 bfrog_ ok I had to saltutil.cache_clear and service.restart salt-minion, now things look good
19:15 bfrog_ kind of annoying but whatever
19:16 ivanjaros joined #salt
19:17 dj_goku whytewolf: hmm ok, I'll just scp the file over.
19:20 fracklen joined #salt
19:23 ponyofdeath whytewolf: so debug.render is something you wrote in python or?
19:23 whytewolf ponyofdeath: https://github.com/whytewolf/salt-debug
19:24 ponyofdeath whytewolf: ty
19:25 dj_goku whytewolf: I guess it does make sense to use file.managed since I'll have to do this on a few hundred minions.
19:25 dj_goku whytewolf: thanks
19:31 hwtt joined #salt
19:34 netcho joined #salt
19:42 NeoXiD joined #salt
19:42 rawzone joined #salt
19:47 keimlink joined #salt
19:50 promorphus Can a custom grain reference a value in a pillar? If so, how? I'm specifically trying to pass in the access key / secret key to a minion that's retrieving information about the vm it's on via amazon's api, and want to pull those from a pillar because it's environment specific.
19:55 babilen promorphus: Grains are rendered before pillars .. I'd write them to the minion configuration file (in a .d dir) and manage that with pillars. You can use the salt formula to do so.
19:55 netcho joined #salt
19:57 babilen For development purposes it's also nice to be able to read them from env vars
19:58 promorphus right, what im asking is, when i 'query' the grain, can the grain itself use pillar data to gather and return information?
19:58 babilen no
19:58 promorphus dangit
19:58 promorphus ok, thank you, much appreciatted
19:58 fracklen joined #salt
19:59 babilen https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html#pillar
20:03 oaklndr1 joined #salt
20:03 madboxs joined #salt
20:04 theblazehen71 joined #salt
20:05 aarontc joined #salt
20:20 onlyanegg joined #salt
20:24 madboxs joined #salt
20:24 nickabbey joined #salt
20:33 raspado joined #salt
20:33 hwtt joined #salt
20:33 Praematura joined #salt
20:41 anotherzero joined #salt
20:41 Praematura joined #salt
20:41 ivanjaros joined #salt
20:45 madboxs joined #salt
21:01 adelcast joined #salt
21:05 shoemonkey joined #salt
21:05 madboxs joined #salt
21:14 ruxu joined #salt
21:20 jeddi joined #salt
21:25 rojem joined #salt
21:26 madboxs joined #salt
21:28 nickabbey joined #salt
21:29 nickabbey joined #salt
21:29 nickabbey joined #salt
21:30 nickabbey joined #salt
21:30 DEger joined #salt
21:31 nickabbey joined #salt
21:35 sp0097 joined #salt
21:39 gladiatr joined #salt
21:44 MTecknology gtmanfred: Merry after christmas!!! :D)->-<
21:46 netcho joined #salt
21:49 Rumbles joined #salt
22:02 Vaelatern joined #salt
22:07 sh123124213 joined #salt
22:07 madboxs joined #salt
22:18 oaklndr1 joined #salt
22:19 mswart joined #salt
22:25 iggy bfrog: that's one reason, I don't really mess with mine any more
22:27 prg3 joined #salt
22:29 madboxs joined #salt
22:34 hwtt joined #salt
22:35 DoomPatrol joined #salt
22:40 cliluw joined #salt
22:42 keimlink joined #salt
22:44 DoomPatrol joined #salt
22:46 swalladge anyone know how to get the state's id from code in the state module?
22:46 swalladge i've found 'state.show_lowstate', but that returns info on all the states
22:47 whytewolf the state id from code? not sure how that would work. as the state isn't ran until after the jinja is already rendered.
22:49 gnord joined #salt
22:49 madboxs joined #salt
22:53 whytewolf iggy: if your not using mine anymore are you using consol something else?
22:53 anotherzero joined #salt
22:53 swalladge whytewolf: why would that be a problem?
22:54 swalladge it looks like you can access other state id's, but surely there would be a function/variable containing the current state's id?
22:54 whytewolf huh
22:54 whytewolf swalladge: how are you planning on using this?
22:55 swalladge https://github.com/saltstack/salt/issues/30685
22:55 saltstackbot [#30685][OPEN] cron.present uses "name" as a default identifier, rather than the state id | https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cron.html states that cron.present should use the state id as the identifying tag, but if the state id does not match the name that is defined, and identifier isn't defined, id is set to be equal to name.  The name is frequently unsuitable for this, as it will change more often then the state id, leavin
22:59 whytewolf ohhh... custom module ...
23:02 gtmanfred MTecknology: you too!
23:02 nebuchadnezzar joined #salt
23:05 whytewolf swalladge: I'm trying to think of any states that do the behavour your describing and can't think of any
23:06 whytewolf normally if name: isn't passed in the state id is passed in as the name. but that isn't what you are asking for
23:06 shoemonkey joined #salt
23:10 iggy whytewolf: "waiting for someone else to solve the problem" basically
23:10 iggy keeping it in pillar data until then
23:12 whytewolf fair nuff
23:17 SamYaple im having trouble with a custom salt-mine thing. `salt '*' mine.get '*' mymodule.function` and its not working.
23:17 SamYaple I did sync my _modules around, but it doesnt seem to report anything
23:17 whytewolf lets see the config
23:17 whytewolf wait _modules?
23:17 Rumbles joined #salt
23:18 whytewolf lots more spliagnin needs to be done
23:18 SamYaple whytewolf: yes. but given your question ive clearly done something wrong :)
23:18 SamYaple im willing to read docs, but ive misunderstood things
23:18 SamYaple so lonks would be appreciated
23:18 whytewolf what have you done
23:19 whytewolf I would like to see what you have tried. it might not be a total failure
23:19 SamYaple i have a simple function (for testing) in a file in /srv/salt/_modules/mymodule.py
23:19 SamYaple it just returns True if a file exists
23:19 whytewolf ok
23:20 whytewolf and it works if you call it from salt? such as salt 'minion' mymodule.function?
23:21 SamYaple ... mo. thats returning an error "'module' object has no attribute '__getitem__'"
23:21 SamYaple so the module must not be correct
23:21 whytewolf well that would be the first hurdle
23:21 whytewolf the module should work from salt
23:22 SamYaple agreed.
23:23 babilen Could you paste the code?
23:23 SamYaple babilen: yea. but this is basic code im just using for testing
23:23 whytewolf well your test is failing so lets see if we can help you get it to pass ;)
23:24 babilen Something is obviously wrong :)
23:24 whytewolf I would say the dunder __getitem__ not existing would be the something wrong
23:24 whytewolf but there could be a lot more
23:26 SamYaple https://pastebin.mozilla.org/8956802
23:26 SamYaple babilen: whytewolf ^
23:26 SamYaple just playing with my first module/salt.mine thing
23:26 whytewolf salt.mine has nothing to do with the module ... that is compleatly seperate issue.
23:27 SamYaple fair enough
23:27 whytewolf first ... you don't need to lead python. the module will already be inside of another python system.
23:28 whytewolf [it doesn't hurt, since it is commented, but just isn't needed]
23:29 SamYaple whytewolf: thats mostly for other tools anyway
23:29 whytewolf next in a module you should use __salt__ no salt
23:29 whytewolf s/no/not
23:31 oida joined #salt
23:31 madboxs joined #salt
23:33 whytewolf actually ... thats it. pretty simple test. "return not bool(salt['cmd.retcode']('test -f /file'))" should be "return not bool(__salt__['cmd.retcode']('test -f /file'))"
23:38 DEger joined #salt
23:39 RandyT joined #salt
23:41 Rumbles joined #salt
23:41 whytewolf SamYaple: once you get the module working, here is how i setup a mine to access it in my test system https://gist.github.com/whytewolf/7324bbd04cbffa30ae2739de490d102b
23:42 abednarik joined #salt
23:42 whytewolf and here is the tutorial https://docs.saltstack.com/en/2015.8/topics/mine/index.html
23:43 SamYaple whytewolf: got it! thanks
23:43 SamYaple whytewolf: i got the moulde working
23:44 SamYaple took me a few minutes because i forgot to sync :)
23:45 whytewolf that happens to me every now and then. I also forget to push my git to origin sometimes
23:46 SamYaple whytewolf: its all working as expected now. simply missing the __salt__
23:46 SamYaple whytewolf: you had me worried like I was doing something_really_ wrong :)
23:48 whytewolf well technically you don't need a module for what you have there... you could do that in the mine with out a module
23:49 whytewolf but eh, you are learning and i can't fault that
23:50 SamYaple whytewolf: well this is a test module :) and actually, i think i may. ill post why in a bit
23:50 SamYaple i have a bootstraping thing that is pretty delicate and i think this will help
23:50 SamYaple but you are right, im learning. all of this will refactor and/or change eventually
23:52 madboxs joined #salt

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