Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-04-20

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

All times shown according to UTC.

Time Nick Message
00:02 scbunn joined #salt
00:05 CaptainMagnus joined #salt
00:07 codehotter joined #salt
00:09 g3cko joined #salt
00:14 MatthewsFace joined #salt
00:14 scbunn joined #salt
00:16 yomilk joined #salt
00:22 ajw0100 joined #salt
00:28 p0rkbelly joined #salt
00:39 fbettag joined #salt
00:40 brianfeister joined #salt
01:14 MatthewsFace joined #salt
01:24 primechuck joined #salt
01:29 bhosmer joined #salt
01:35 desposo joined #salt
01:42 edrocks joined #salt
01:47 MatthewsFace joined #salt
01:49 Furao joined #salt
01:52 mdupont joined #salt
01:52 ALLmightySPIFF joined #salt
01:53 dalexander joined #salt
01:55 dynamicudpate joined #salt
01:55 yexingok joined #salt
01:56 desposo joined #salt
01:56 favadi joined #salt
02:05 TyrfingMjolnir joined #salt
02:07 JoeHazzers joined #salt
02:08 scoates joined #salt
02:14 tmclaugh[work] joined #salt
02:22 scbunn joined #salt
02:30 TheOtherDude joined #salt
02:32 evle joined #salt
02:41 donmichelangelo joined #salt
02:42 tkharju joined #salt
02:45 malinoff joined #salt
02:52 thayne joined #salt
02:53 clintberry joined #salt
02:54 dalexander joined #salt
02:55 bhosmer joined #salt
03:10 hellerbarde joined #salt
03:13 CaptainMagnus joined #salt
03:18 g3cko joined #salt
03:29 ethX joined #salt
03:33 g3cko joined #salt
03:34 malinoff joined #salt
03:39 blacked joined #salt
03:43 g3cko joined #salt
03:47 malinoff joined #salt
03:50 echo joined #salt
03:55 dalexander joined #salt
04:03 otter768 joined #salt
04:04 Archwyrm joined #salt
04:08 ajw0100 joined #salt
04:09 Archwyrm Probably obvious and due to the late hour here, but what am I doing wrong here? I get a YAML parse error on the last line. http://pastie.org/10102339
04:09 Furao Archwyrm: add 2 spaces indentation to line 4:5
04:10 Archwyrm Furao: Yep, that fixed it. Thanks!
04:14 yomilk joined #salt
04:20 yidhra joined #salt
04:22 Not_ joined #salt
04:24 thayne joined #salt
04:30 DaveQB Is this legal? http://paste.ubuntu.com/10854572
04:30 DaveQB I read pillars can't be inside the files tree but does that mean the environments or the root?
04:36 yomilk joined #salt
04:38 dalexander joined #salt
04:39 joeto joined #salt
04:43 TyrfingMjolnir joined #salt
04:47 iggy that works
04:47 iggy the only thing accessible to the fileserver is /salt/{base,dev,tst,ply}
04:57 bhosmer joined #salt
05:00 ckao joined #salt
05:07 radd joined #salt
05:23 ALLmightySPIFF joined #salt
05:24 MaliutaLap joined #salt
05:24 MaliutaLap left #salt
05:40 favadi joined #salt
05:43 TyrfingMjolnir joined #salt
05:44 monkey66 joined #salt
05:46 MatthewsFace joined #salt
05:50 monkey66 joined #salt
05:55 Kelsar joined #salt
05:55 blacked joined #salt
05:56 stoogenmeyer joined #salt
06:00 colttt joined #salt
06:03 markm joined #salt
06:08 markm_ joined #salt
06:12 Aidanjl joined #salt
06:13 kzrl joined #salt
06:14 otter768 joined #salt
06:16 harkx joined #salt
06:18 viq joined #salt
06:37 krelo joined #salt
06:42 blacked joined #salt
06:45 thayne joined #salt
06:48 yidhra joined #salt
06:52 flyboy joined #salt
06:53 Auroch joined #salt
06:53 KermitTheFragger joined #salt
06:55 isodude_ joined #salt
07:00 bhosmer joined #salt
07:00 stoogenmeyer_ joined #salt
07:01 monkey661 joined #salt
07:02 hebz0rl joined #salt
07:04 eseyman joined #salt
07:08 circ-user-8qj3F joined #salt
07:11 badon joined #salt
07:23 isodude_ I though that file.directory would have a source parameter, but it doesn't. :( How do you sync a whole folder with states.file?
07:23 isodude_ Maybe I'm thinking about this the wrong way
07:29 kawa2014 joined #salt
07:30 krelo joined #salt
07:32 Romlok joined #salt
07:32 isodude_ lol, ok. RTFM, I need to use the recurse function.
07:35 MatthewsFace joined #salt
07:42 CeBe joined #salt
07:44 CedNantes joined #salt
07:44 CedNantes hello/hi/bonjour
07:53 lb1a joined #salt
07:53 cygnetix joined #salt
07:55 jrenner joined #salt
08:04 CedNantes I followed http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html and set ssh but if i'm trying to do "state.highstate" i get "No Top file or external nodes data matches found"
08:04 catpig joined #salt
08:05 krelo joined #salt
08:05 CedNantes There's indeed a top.sls file and it has data matching the minion ones
08:05 CedNantes Is anybody here using git+salt with ssh and has it working ?
08:05 babilen sure
08:06 babilen There is little we can do without seeing your actual configuration, commands and their output. Feel free to paste them to http://refheap.com
08:06 babilen Did you ssh into the box and accept the fingerprint already? (as the user salt runs as)
08:08 codehotter If I have some configuration to do an application server, and I have 10 apps running that, and then I need an 11th app that is very much like those other 10 but with some minor differences. What is the best way to capture that? Just copy and paste the previous configuration and make my edits? What's the way of minimum duplication?
08:08 babilen It would probably also be interesting to see debug output from the salt master. You could, for example, run it as "salt-master -ldebug" and then execute "salt-run fileserver.update". If there are problems cloning your repository if would be obvious from the error messages that are being logged. You might also want to take a look at /var/log/salt/master before checking out debug logs.
08:09 babilen codehotter: I typically generate configuration like those from pillar data and return slightly different data for the "speshul" box
08:09 CedNantes ok i'll try these thx
08:10 babilen codehotter: There are various ways to achieve that, but the "best" really depends on what you are trying to do. A simple "{% if grains['id'].startswith('foobar23') %}" in the pillar might be all you need (but that gets really ugly with more than, say, two special cases)
08:10 PI-Lloyd joined #salt
08:11 CedNantes Got [ERROR   ] Exception 'Unsupported URL protocol' caught while fetching gitfs remote git@bitbucket.org
08:11 babilen codehotter: The problem you have is that "11th" app is hard to measure as you would have to keep track of how many "apps" you have already running on your minions (or even elsewhere) to begin with.
08:12 CedNantes while in debug mode
08:12 CedNantes i'll try a different syntax
08:12 babilen CedNantes: Looks as if your git specification is b0rked
08:13 Kelsar joined #salt
08:13 CedNantes i added "  - git@bitbucket.org:myuser/mygit.git " under gitfs_remotes :
08:14 CedNantes maybe the git@ way is no good
08:14 babilen Try "git@bitbucket.org/myuser/mygit.git"
08:15 babilen Ah, no that should work :-/
08:15 babilen git+ssh@ might be an idea, which provider do you use?
08:16 CedNantes so my file looks like this : https://www.refheap.com/99814
08:16 Grokzen joined #salt
08:16 CedNantes i'm doing test with bitbucket if that what you were asking for.
08:19 babilen No, are you using gitpython, pygit2, dulwich ?
08:19 aquassaut joined #salt
08:20 babilen And I'd give "git@bitbucket.org/myuser/mygit.git" a try still
08:20 babilen brb
08:21 CedNantes if i run 'salt-run fileserver.update -l debug 2>&1|grep gitfs_provider' i get  [DEBUG   ] pygit2 gitfs_provider enabled
08:23 babilen https://github.com/saltstack/salt/issues/21979
08:31 dingo joined #salt
08:32 Auroch joined #salt
08:33 ktosiek joined #salt
08:35 N-Mi joined #salt
08:37 CedNantes i'll try with libgit2 v0.22.2, i have 0.22.0 installed
08:37 stoogenmeyer_ joined #salt
08:39 bluenemo joined #salt
08:39 bluenemo joined #salt
08:40 squig joined #salt
08:40 teogop_ joined #salt
08:41 Grokzen joined #salt
08:45 babilen CedNantes: The important bit is that it *has* to be compiled with ssh support
08:45 reabeginner joined #salt
08:47 CedNantes How could i make sure it was ?
08:47 CedNantes or wasn't :o
08:50 babilen How did you install it?
08:52 wnkz joined #salt
08:52 CedNantes I followed this : http://www.pygit2.org/install.html having pkg-config package installed before as they said
08:53 CedNantes I'm still new to the build/compile/make stuff so i may have made mistakes i guess
08:53 Kelsar joined #salt
08:53 iggy the salt-formula has support for installing pygit2
08:54 kbyrne joined #salt
08:54 Kelsar joined #salt
08:54 iggy but gitpython is probably more stable/well documented
08:54 squig so I am trying to use the env_present bit from http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cron.html but I have no idea how to structure a formula that does that
08:54 squig Infact unless I can find an example I am usually stuck writing a salt formula for the first time
08:54 squig are there docs some where, that help explain how to turn a function into a formula?
08:55 __gotcha joined #salt
08:56 Kelsar joined #salt
08:58 CedNantes i've installed/uninstalled so many things right now... i think i'll start again from scratch to be sure everything is fine thanks for the help anyway
09:01 yidhra joined #salt
09:01 Kelsar joined #salt
09:03 Kelsar joined #salt
09:06 Kelsar joined #salt
09:07 dramagods joined #salt
09:07 stoogenmeyer joined #salt
09:08 frankhanner left #salt
09:09 thehaven joined #salt
09:16 Kelsar joined #salt
09:19 dramagods joined #salt
09:23 __gotcha I am testing "salt-run state.orch"
09:23 blacked joined #salt
09:24 pf_moore joined #salt
09:24 __gotcha When running my orchestration sls, I get "Data failed to compile:" in the output
09:24 __gotcha Can anyone hint me about mistake I did ?
09:24 MatthewsFace joined #salt
09:24 __gotcha sls and out put are in https://gist.github.com/gotcha/28d5807861acfe0b316a
09:24 xf10e joined #salt
09:25 xf10e good morning (or TZAG if you like)
09:27 babilen __gotcha: Does either "grains.puppet" or "c4eb83059c62" ring a bell?
09:27 __gotcha babilen: c4eb83059c62 is a minion if
09:27 __gotcha id
09:27 malinoff __gotcha, extremely descriptive :)
09:28 __gotcha malinoff: what do you mean ?
09:28 __gotcha grains.puppet is the custom garin module that sync_grains is syncing
09:28 __gotcha iow the output shows that grains are properly synced
09:29 __gotcha nevertheless salt.function complains about the output from saltutil.sync_grains function
09:29 babilen __gotcha: Okay, so you obviously have a problem with your custom grain.
09:30 babilen (that is unfortunately missing from your paste)
09:31 __gotcha babilen: nope, after custom grain module has been synced, I am able to use the new grains when running salt
09:31 __gotcha what I am asking is why state.orch complains about the output of sync_grains even though sync_grains does work
09:33 __gotcha the sls file run by state.orch is supposed to run saltutil.sync_grains on all minions
09:35 __gotcha as far as I understand, salt-run state.orch enables me to group multiple remote executions
09:35 xf10e __gotcha: state.orch has the master's view of things like pillar. It probably doesn't see the minion's grains
09:35 __gotcha instead of running them one by one
09:36 dRiN joined #salt
09:36 __gotcha if I run "salt '*' saltutil.sync_grains", I get an output with the same minion ids and the name of the custom grain module
09:37 __gotcha if I use salt-run state.orch, I get the "Data failed to compile" even though sync happened properly
09:37 babilen Ah, so which command was the pasted content the output of?
09:38 __gotcha babilen: salt-run state.orch
09:39 __gotcha actually, salt-run state.orch orchestration.test
09:39 peters-tx joined #salt
09:39 babilen So, what's in orchestration.test ?
09:39 __gotcha where test.sls is in orchestration directory and holds the three first lines of the pasted content
09:39 __gotcha sorry four lines
09:43 __gotcha babilen: iow, I am trying to run saltutil.sync_grains through state.orch
09:49 cygnetix joined #salt
09:52 hvn joined #salt
09:56 echo joined #salt
09:57 matthew-parlette joined #salt
09:57 giantlock joined #salt
10:15 otter768 joined #salt
10:16 favadi joined #salt
10:30 denys joined #salt
10:31 gmoro joined #salt
10:33 giantlock joined #salt
10:34 drawsmcgraw joined #salt
10:34 Jouke joined #salt
10:35 Jouke I have a salt state with a svn.lastest. I want to use the svn revision of that state in a jinja variable. Could someone point me to a way to make this happen?
10:38 Romlok wow, the git.latest state sure does a lot of stuff when there's nothing to do
10:42 funzo joined #salt
10:52 Andre-B joined #salt
11:04 __gotcha joined #salt
11:10 babilen Romlok: such as?
11:13 MatthewsFace joined #salt
11:14 Romlok babilen: http://pastie.org/10103036
11:15 Romlok it gets the local and remote revs, which would be the same
11:15 babilen Romlok: Can you think of a better way to implement that?
11:16 Romlok then it resets, checkouts, and pulls
11:16 babilen Why would they be the same? (sorry, that might be obvious)
11:16 Romlok I mean, in this case they are
11:17 Romlok because no changes were made in the repo
11:17 babilen How could you know that before having tested it?
11:17 Romlok yeah, that's fine
11:17 Romlok but once it does test it, it does the reset, checkout and pull
11:17 Romlok when it just tested that it was already on the latest
11:18 babilen Okay, I see what you mean. Would you be interested in submitting a PR for that?
11:20 Romlok sadly, I already have too much other work
11:21 babilen You could get up an hour earlier each day ;)
11:21 Romlok ;_;
11:22 Romlok I'm also always hesitant to report stuff because I never know if it's been fixed since last stable
11:23 Romlok that, and it often takes me hours to write bug reports :/
11:25 bhosmer joined #salt
11:30 xf10e Romlok: "fixed since last stable" doesn't mean there's no reason for a backport is still supported versions have this bug, too
11:30 xf10e s/is/if/
11:32 qwazerty joined #salt
11:35 monkey66 joined #salt
11:40 favadi joined #salt
11:42 __gotcha joined #salt
11:49 daemonkeeper In a custom Python module called from a jinja template, what's the recommended way for error reporting/exception handling? http://docs.saltstack.com/en/latest/ref/modules/ does not seem to cope that
11:58 isodude_ joined #salt
11:59 masterkorp Guys I am trying to get a salt development environment working on my machine
11:59 masterkorp AttributeError: 'module' object has no attribute 'PKCS5_SALT_LEN'
11:59 masterkorp I get gretted by this when running ./setup.py test
12:04 nyx_ joined #salt
12:06 stoogenmeyer hi, would this work? http://pastebin.com/masm7GbD
12:06 stoogenmeyer its a state definition
12:09 xf10e daemonkeeper: execution or state module?
12:10 daemonkeeper execution module
12:13 redzaku joined #salt
12:16 otter768 joined #salt
12:18 amcorreia joined #salt
12:19 stoogenmeyer if i want to run a cmd after a different state has come up, would I use cmd.run and require with service and the name of the state?
12:19 stoogenmeyer or is there a better way
12:22 evle1 joined #salt
12:22 wnkz joined #salt
12:25 ndrei joined #salt
12:33 zer0def ok, looking for some advice - any way to touch a file only when git.latest changes?
12:33 zer0def not sure whether to use 'watch' or 'only_if'
12:35 radd joined #salt
12:36 stoogenmeyer can you watch for a state from another file?
12:37 zwi joined #salt
12:37 Romlok zer0def: I believe "watch" is what you want
12:38 Romlok stoogenmeyer: yes, but you need to "include:" it first
12:38 zer0def Romlok: via file.touch or cmd.run?
12:39 xf10e jinja sure can't handle this... there's no canonical way (yet) for telling the execution of a function failed besides raising an exception AFAIK
12:39 Romlok I'd imagine if you want to just touch a file, file.touch would be most appropriate
12:39 stoogenmeyer Romlok: but if i include, it'll be run again
12:40 xf10e daemonkeeper: (see above)
12:40 daemonkeeper I figured so. Raising an exception at least yields a useful comment on highstate
12:40 numkem good morning everyone, how would one be able to store some pillar data in mine? I'm trying to use pillar.get as the fucntion and it doesn't seem to be working
12:41 zer0def Romlok: but wouldn't a state with a watch still execute, even if the requisite didn't change?
12:41 elfixit1 joined #salt
12:41 xf10e daemonkeeper: yep. you can also re-raise your own, salt specific exception to include some useful information
12:42 Romlok stoogenmeyer: how can you watch it, if you don't want it to run?
12:42 zer0def Romlok: the watched state i DO want to run, but the watching state only when the watched state changes
12:43 stoogenmeyer Romlok, i incorrectly assumed that if it ran previously, then it'd be recognized
12:43 xf10e daemonkeeper: in a state function's return dict you can specify stuff failed but not in a execution function. if you want to use this in a state anyway you could add a stateful wrapper
12:43 Romlok zer0def: I believe the point of a watch is to only do things when other things change, otherwise you'd just use "require"
12:43 zer0def Romlok: ok, onchanges, forgot about that.
12:45 Romlok stoogenmeyer: by "previously" do you mean on an earlier highstate run?
12:46 stoogenmeyer Romlok: yes or a state.sls run
12:46 stoogenmeyer Romlok: I understand why it wouldn't work that way though
12:46 babilen daemonkeeper: You should normally simply return a sensible 'ret' dictionary from your state if you care about highstate output. 'comment', 'result' and 'changes' are probably the most interesting. In terms of execution modules look into salt.exceptions and raise, for example, CommandExecutionError.
12:46 Romlok ah right, yeah no, that would be magical indeed
12:48 ivarmedi joined #salt
12:49 ivarmedi hello! sorry for a nooby question. what would be a good way to do the following?
12:49 ivarmedi if grains['id'] == 'minion[3-4]'
12:51 pual joined #salt
12:51 babilen There is none - What are you *really* doing?
12:52 ivarmedi alright. just conditional stuff on those minions
12:52 ivarmedi or rather, setting variables based on the id
12:52 babilen Well, that much was obvious
12:53 ivarmedi so.. many if/else is the solution? or some form of regexp?
12:53 babilen You could use if, elif, else ... but there is little we can suggest without knowing more details
12:53 eliasp how are SLS requisites supposed to work? a simple "- sls: foo" works, but "- sls: foo.bar" will fail (Cannot extend ID 'foo.bar'. It is not part of the high state).
12:53 eliasp the SLS is included through "include:\n  - foo.bar"
12:54 eliasp am I doing something wrong? or does this look more like a bug?
12:54 ivarmedi babilen: not much more to share, really. it's just an if/else. We'll just have to extend it a bit. thanks for your help!
12:55 cmcmacken joined #salt
12:56 xf10e ivarmedi: what about solving this with normal targeting? you could set pillar's this way to assign a role or something. then you just can use {% if salt['pillar.get']('role') == foo %} in your jinja states
12:56 thinkwell joined #salt
12:56 xf10e ivarmedi: and for targetting you can use PCREs
12:56 babilen ivarmedi: I *really* hate if/elif/else blocks that contain more than, say, two cases. If that is okay for you in that case then "enjoy", but I typically prefer other approaches a lot more. Hard to suggest something without knowing what you are doing (where are you doing this? why are they different? how 'normal' is it for their settings to be different? how many settings does this affect? Is this in templates, states or pillar files? (and so on))
12:57 babilen There are simply too many ways to do this. Targeting might be one, dictionaries in your pillar another, explicit merging of data based on nodegroups/pillar data/grain/parsed minion id/whatever another ....
12:57 thinkwell planning a switch from Puppet to saltstack in 2015. Will the next saltstack release support python3? We're consolidating dev on python 3.4
12:58 babilen ivarmedi: But if you are happy with if/else/elif then .. be merry!
12:58 thinkwell and hope that saltstack supports python3 in the next release
12:58 babilen thinkwell: What do you mean by "support" ?
12:58 thinkwell will saltstack run in a python3 environment?
12:59 ivarmedi not exactly happy, but it will work. the targeting in pillars is of course one way to do it, but this is just for 5 pretty static hosts, so the if/else will work here
12:59 Hydrosine joined #salt
12:59 babilen ivarmedi: Provide snippets on, say, http://refheap.com if you'd like more hands-on help
13:00 babilen thinkwell: I wouldn't count on it, but I have no hard data about that. Won't you have Python 2.7 available?
13:00 ivarmedi I will try the stuff you suggested and see what we end up with! thanks everyone for the answers!
13:00 thinkwell python2.6 is available on all hosts, so i suppose that it's not a deal-breaker
13:01 thinkwell but was very much hoping to move away from python2 entirely
13:01 babilen thinkwell: A lot of work is being done in that area though. You might want to write to the saltstack users mailing list and ask about a specific timeline and/or plans regarding this
13:01 thinkwell great idea. will do. Thanks!
13:02 MatthewsFace joined #salt
13:03 babilen ivarmedi: For example: One approach I like is the "dictionary with exceptions" indexed by minion id (or something parsed) that is then being merged into a "default" one. Another I frequently use is to rely on smart merging of pillars and to define "override" SLS files that are targeted to specific boxes ...
13:04 babilen So many options, impossible to recommend one based on the information you provided :D
13:06 bhosmer_ joined #salt
13:06 cpowell joined #salt
13:06 huddy joined #salt
13:07 ivarmedi babilen: the dictionary approach is a great idea. just put in a pillar and fetch the info from there. cleaner and easier to read than the if/else-mess!
13:08 ivarmedi sorry for being so vague, but there really is not much more to it than that simple if/else. just wondering about good ways to separate settings on different hosts in general, I guess
13:08 ivarmedi which I got! so thanks again
13:09 babilen Well, I'm happy that I stubbornly kept on talking ;)
13:09 ivarmedi :)
13:11 fxhp joined #salt
13:15 jdesilet joined #salt
13:17 dyasny joined #salt
13:19 Auroch joined #salt
13:19 tmclaugh[work] joined #salt
13:19 lictor36 joined #salt
13:20 CedNantes hello again
13:20 fusionx86 joined #salt
13:21 stoogenmeyer_ joined #salt
13:22 Tecnico1931 joined #salt
13:22 CedNantes when using gitfs_passphrase do you need to use " " or ' ' if you have a password with a @ or something similar in it ?
13:22 CedNantes like gitfs_passphrase : 'myp@ssw0rd'
13:23 CedNantes Still trying to get salt+git working ;p
13:23 masterkorp http://docs.saltstack.com/en/latest/topics/development/tests/index.html
13:23 racooper joined #salt
13:24 isodude_ joined #salt
13:24 masterkorp is it me, or in this page the red letters are almost unreadable ?
13:24 masterkorp http://docs.saltstack.com/en/latest/topics/development/hacking.html
13:24 masterkorp in this page they are fine
13:24 CedNantes fine in both links for me
13:25 timoguin joined #salt
13:25 masterkorp http://i.imgur.com/vsEjDeI.png
13:26 jdesilet Red text looks fine to me as well. Using Firefox on OS X
13:26 masterkorp the tests page, the red letters apear likes this
13:26 masterkorp but *only* on the tests page
13:26 babilen That's specific to your setup, masterkorp
13:26 masterkorp the hacking page (and everywhere else is fine)
13:26 masterkorp babilen: what could be the problem ?
13:27 babilen masterkorp: I have no idea. Did you try different browsers, profiles, users, workstations or planets?
13:28 masterkorp i've tried diferent browsers and profiles
13:28 bhosmer joined #salt
13:28 masterkorp planets, no
13:28 masterkorp but i would not mind :p
13:28 masterkorp let me kill chromium
13:29 jdesilet what OS? I've had issues with X where I've had to reload it to get rid of odd rendering errors like what you're seeing.
13:30 masterkorp Arch Linux
13:30 masterkorp well chromium does have its deffects
13:30 masterkorp i have an annoying bug
13:31 masterkorp https://code.google.com/p/chromium/issues/detail?id=435538
13:31 masterkorp its been like this for months :(
13:31 davisj joined #salt
13:33 numkem How would one be able to store some pillar data in mine? I'm trying to use pillar.get as the fucntion and it doesn't seem to be working
13:39 Micromus joined #salt
13:40 zooz joined #salt
13:41 CedNantes no idea
13:41 bhosmer joined #salt
13:42 mpanetta joined #salt
13:42 CedNantes so... before i had "unsupported url protocol", now i gave "Failed to authenticate SSH session: Callback returned error" when salt try to connect to my repository
13:42 dalexander joined #salt
13:42 CedNantes i have not i gave
13:43 CedNantes typo
13:43 CedNantes anyway i'm heading to the right direction i guess but i'm still confused on how to make salt connect over ssh
13:46 Romlok hmm, so I'm having trouble seeing the point of using environments, over just using targeted pillars (which you'd need to use anyway)
13:46 Romlok I've seen a lot of words about how to use environments, but not so much about _why_ to use them
13:46 Romlok or when
13:47 eliasp Romlok: usually for a "dev → test → staging → prod" workflow
13:49 Romlok yeah, but what do environments bring, that pillars do not?
13:49 seshan joined #salt
13:50 eliasp Romlok: a separation on repository level… so only stuff which is merged to master will make it into base/production
13:50 xf10e Romlok: testing new states instead of having to use pillar to choose which version of those to use?
13:50 babilen CedNantes: Any particular reason why you aren't simply using gitpython?
13:51 babilen CedNantes: Can you clone that repository manually as the use salt runs as?
13:51 babilen *user
13:51 andrew_v joined #salt
13:52 Romlok eliasp, xf10e: ah hmm, makes sense
13:52 perfectsine joined #salt
13:55 davisj Is there a salty way to determine if un-managed configuration has crept onto a minion, i.e. If someone installs a package or creates a user that is not defined in any applicable state?
13:55 jtanner joined #salt
13:57 eliasp you'd have to use a deterministic base-OS like NixOS to really do something like that…
13:57 eliasp otherwise that's really hard to do
13:58 eliasp davisj: for some things you can work this way (e.g. managing users by defining all users through salt and overwriting any changes)
13:58 davisj eliasp: I see. Comming from bcfg2, that's one this I miss.
13:59 davisj eliasp: How would you overwrite the change? Template /etc/passwd?
13:59 eliasp davisj: mod_aggregate is the best way to tackle this: http://docs.saltstack.com/en/latest/ref/states/aggregate.html
14:00 eliasp but really running everything this way needs some changes/additions on the implementation level of most states
14:01 CedNantes <babilen>"With GitPython, only passphrase-less SSH public key authentication is supported." so if my boss want me to use a key with passphrase i'm screwed :p
14:02 davisj eliasp: Many thanks. Sounds like I have some thought process re-mapping to do :)
14:02 Brew joined #salt
14:03 c10b10 joined #salt
14:03 babilen CedNantes: ack
14:04 c10b10 hello :)
14:04 babilen davisj: It would also be a nightmare to account for user changes due to package installations or upgrades ...
14:05 c10b10 i have a question: when i include a state file, how do I make a variable from the including file available to the included file?
14:05 babilen You have done that already by including it
14:05 dariusjs joined #salt
14:07 davisj babilen: Yeah, if you have to do discovery manually. bcfg2 gave me that stuff out of the box.Guess I was spoiled ;)
14:08 babilen davisj: That's interesting. Could you point me to documentation about that?
14:08 c10b10 babilen: i'm getting "Rendering SLS 'base:core.dotfiles' failed: Jinja variable 'user' is undefined"
14:08 babilen c10b10: When you do what? Could you paste your files to http://refheap.com ?
14:09 eliasp babilen: in a perfect world, a package wouldn't create a user but instead declare this as a dependency… ;)
14:10 iggy davisj: bcfg2's way of handling changes outside of the cfg mgmt system is problematic in it's own right
14:11 babilen eliasp: Packages (rightfully IMHO) create users all the time, how else would you ensure that from a distribution point of view?
14:11 davisj babilen: Here's a 10,000 foot overview http://docs.bcfg2.org/architecture/goals.html
14:11 iggy CedNantes: use ssh config aliases for key auth
14:11 iggy CedNantes: (with gitpython)
14:11 sk_0 joined #salt
14:12 c10b10 babilen: https://www.refheap.com/2c19ae4e8b81715ae5e34f32b (and in the dotfiles.sls file i'm trying to reference user with {{ user }})
14:12 davisj iggy: It has it's issues. It seemed pretty good at detecting unmanaged entries in my experience though.
14:12 mapu joined #salt
14:12 dariusjs anyone know if its possible to get a variable read into a pillar.get  like so   "{% if salt['pillar.get']('key:{{ var }}:boolean') == True %}"
14:12 eliasp babilen: well, I said "in a perfect world" :)  Ã¢â‚¬Â¦ a user should be just a declarative resource which is provided by whatever resource implementing it
14:12 iggy only in it's (very limited) set of modules (and then only if they were written correctly)
14:13 iggy davisj: 'key:' ~ var ~ ':boolean'
14:13 babilen c10b10: Ah, you have no access to that variable in that context. It is only available in the scope of that SLS
14:13 iggy davisj: you don't need {{ }} inside of jinja tags
14:14 c10b10 babilen: any way to get access to it?
14:14 davisj iggy: re: vars, I guess you wanted dariusjs :)
14:14 iggy c10b10: include has to be the first line in an sls file
14:15 dariusjs davisj: np, im trying it now .... been at it the last hour trying salt['pillar.get'] and pillar.get to no avail
14:15 iggy davisj: yes, sorry
14:15 davisj iggy: re: set of modules: yes, to manage a lot of edge cases means writing it yourself.
14:15 dariusjs my variable is declared like so {% set host = grains['host'] %}
14:15 babilen c10b10: No, I'd simply include "core.dotfiles" in whatever SLS file that is *or* iterate over the 'users' pillar in core.dotfiles again. There is no need whatsover to tie those together *apart* from making sure that the user (and home directory!) has been created (for which you include the SLS and then define a requisite)
14:15 davisj where as salt seems to cover a lot more ground.
14:16 CedNantes iggy: It may be a noob question but... what do you mean by using ssh config aliases ?
14:16 * davisj tries to come up with a salt of the earth pun..  but fails
14:17 aparsons joined #salt
14:17 davisj Also forget about doing anything proceedural without much hoop jumping
14:17 otter768 joined #salt
14:17 iggy CedNantes: see the ssh docs for how to setup entries for specific hosts
14:18 babilen c10b10: You are aware of https://github.com/saltstack-formulas/users-formula/ aren't you?
14:20 iggy CedNantes: https://gist.github.com/iggy/bafe89ca3fe126ec9d1a  <-- something like that in /etc/ssh/ssh_config (or <salt_user_home>/.ssh/config )
14:20 WesleyTech joined #salt
14:21 bhosmer joined #salt
14:21 iggy then in your gitfs config, you use salt-states-github.com instead of github.com
14:21 c10b10 babilen: i undertand you perfectly up to you saying that i should include the sls and define a requisite. you mean that if i want to tie them i should include the core.users sls in the core.dotfiles sls, and define a requisite for that inclusion in the dotfiles sls?
14:21 c10b10 ty for the formula link
14:23 babilen c10b10: What is mean is: If you want to manage a file in /home/foo/ you have to ensure that that directory exists *before* trying to create a file in there. For that you would include the state that creates that directory (i.e. 'users' if using the formula) in core.dotfiles which allows you to define requisites (a "require: ...") to the states defined therein.
14:24 c10b10 got it, thanks
14:25 iggy and don't forget, include: as to be the first line in your sls file
14:25 phpdave11 joined #salt
14:26 Nebraskka joined #salt
14:26 babilen c10b10: The requisite in question would be "- require: - file: {{ user }}_user" -- That defines a requisite on the state created in https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L49
14:26 babilen (assuming you iterate over the same data)
14:27 capricorn_1 joined #salt
14:27 kaptk2 joined #salt
14:28 troyready joined #salt
14:28 crazysim joined #salt
14:28 FineTralfazz joined #salt
14:28 Romlok is there any way to pass an entire pillar dict to a file.managed template?
14:29 Alan_S joined #salt
14:29 iggy you can pass it as context or look it up directly in the template
14:30 dariusjs Romlok: Im not up to the whole terminologiy but  would "contents_pillar: key:value"  work, that seems to be part of file.managed
14:30 tobias3 joined #salt
14:30 iggy (I prefer looking up in the template directly as then it's more clear what data you're working with without going through other sls files looking for original pillar.get)
14:30 Romlok iggy: managed file templates automatically have access to the pillar, grains, etc. dicts?
14:30 iggy Romlok: they have access to everything sls files have
14:31 Romlok iggy: that's great then, ta
14:31 iggy Romlok: but see what dariusjs said... I didn't think about the fact you might have meant the question that way
14:31 dariusjs im actualy stuck on a problem right now related to it ...  like this pastebin http://pastebin.com/EumuEDrP
14:32 dariusjs everything works except the if statement when trying to determine the pillar based on hostname
14:32 dariusjs Romlok: could help you out, i dont know
14:32 Romlok nah, contents_pillar only dumps a single pillar value into the file; I want to reference various values in a template
14:32 dariusjs oh, are you sure
14:33 Romlok but I already had access to the values I needed, without knowing
14:33 iggy dariusjs: I told you how to do that (but I think I tab completed the wrong person)
14:34 dariusjs iggy: you did but it didnt work for me either :(
14:34 iggy {% if salt['pillar.get']('hostkeys:' ~ host ~ ':rsa') == True %}
14:34 dariusjs oh, will try that syntax
14:34 dariusjs i missed out ton the quotes
14:34 c10b10 babilen, iggy, ty
14:34 thedodd joined #salt
14:35 * iggy work
14:36 dariusjs iggy: that worked ... im an idiot, of course need to escape out of it to retrieve variables in code above
14:36 dariusjs ty
14:37 malinoff joined #salt
14:43 MatthewsFace joined #salt
14:44 zircote joined #salt
14:45 rm_jorge joined #salt
14:51 hobakill joined #salt
14:51 fusionx8_ joined #salt
14:53 fusionx8_ joined #salt
14:57 fusionx86 joined #salt
14:59 TheoSLC joined #salt
14:59 clintberry joined #salt
15:00 numkem Is it possible to store pillar data into mine or one is done after the other so it's not possible?
15:00 iggy it's generally not a good idea
15:01 numkem well id like to store things like services and roles in a way so that my nagios box can write all configuration files for each host
15:01 bersace joined #salt
15:01 numkem and by pillar data its "some" pillar data, very specific things
15:01 smcquay joined #salt
15:01 bersace basepi: hi. could you have an eye on https://github.com/saltstack/salt/pull/22850 ?
15:01 bersace regards :)
15:03 bluenemo joined #salt
15:03 bluenemo joined #salt
15:08 numkem I got it working, turns out its the way that you have to write the mine_functions, the doc states both way but it's not super clear. It's too bad the doc isn't super verbose on the mine system itself. It's very powerful
15:09 scbunn joined #salt
15:13 redzaku joined #salt
15:14 XenophonF joined #salt
15:14 runnyspot joined #salt
15:14 faust joined #salt
15:14 XenophonF hey all - how do i submit a formula for inclusion into saltstack-formulas?
15:15 XenophonF i created a simple one for the li.nux.ro RPM repositories similar to epel-formula
15:15 XenophonF the nux repo includes RPMs for packages used by salt-cloud, e.g., winexe
15:15 robawt joined #salt
15:17 numkem XenophonF: I would say to look into the github repo and do a pull request with your code
15:17 XenophonF there isn't an existing repo
15:18 XenophonF can i submit a pull request for a new repository?
15:18 numkem https://github.com/saltstack-formulas
15:18 numkem the top says to contact them and to refer to http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
15:19 iggy numkem: also of note... the mine docs aren't clear about what functionality was added when... so if you run into issues, go back and look at the docs for your version
15:19 gladiatr joined #salt
15:20 numkem iggy: I'll keep that in mind. Thank you. My bigguest problem is it's not super clear about what the mine_functions pillar data means in terms of what you want to do. I now see that a dict would be using kwards but a simple call would be a list.
15:20 Tecnico1931 joined #salt
15:20 numkem the example is nice to get a feel of what the mine can do but when you start digging you can get stuck like I was
15:21 lothiraldan joined #salt
15:21 XenophonF thanks numkem
15:21 anotherZero joined #salt
15:22 numkem XenophonF: no problems
15:23 XenophonF i wonder why "module.function" is the preferred convention
15:23 iggy because
15:23 numkem it makes sens as the output of said module becomes what mine keeps
15:24 numkem its as powefull as it can be since you could write your own modules to do specific things. Mine itself is awesome
15:25 hasues joined #salt
15:25 hasues left #salt
15:26 johnkeates joined #salt
15:27 basepi bersace: no worries, QA will help you with the test failures. They may be false positives, I didn't look very closely.
15:29 bersace basepi: ok, thanks. who is assigned to PR review ?
15:29 bersace how to tell it's a bug ?
15:30 basepi A number of people are. They'll know it's a bug since you linked to your issue.
15:30 bersace ok, thanks :)
15:35 debian112 joined #salt
15:36 Guest70 joined #salt
15:36 iggy basepi: while you're here... is there a reason there's a v2015.2 tag from Dec?
15:36 basepi iggy: yep. we tag when we branch. both so we can know when we branched, and for the develop version to use to generate its versions-report
15:36 CedNantes i'm leaving, thx iggy and babilen for your help, everything is working now
15:37 CedNantes have a nice day/end of day/depend on where you are leaving
15:38 iggy basepi: so how does that get updated when you release? or do you just do a new tag with .0 ?
15:38 thayne joined #salt
15:41 yidhra joined #salt
15:42 jespada joined #salt
15:47 jeddi joined #salt
15:51 ProT-0-TypE joined #salt
15:51 CeBe1 joined #salt
15:52 hasues joined #salt
15:52 hasues left #salt
15:53 ksalman Is there a log/page that shows what bugs was fixed between for each minor version, say 2014.7.2 and 2014.7.3?
15:54 ksalman Short of cloning the repo and looking at the checkins?
15:54 dramagods joined #salt
15:55 Aidanjl joined #salt
15:56 ALLmightySPIFF joined #salt
15:57 ALLmightySPIFF joined #salt
16:03 perfectsine joined #salt
16:04 Auroch joined #salt
16:05 iggy ksalman: there are release notes for each point release
16:05 ksalman iggy: thanks!
16:06 raygunsix joined #salt
16:06 iggy realistically, you should probably skip 2014.7.3
16:07 iggy (and it looks like 2014.7.5 is already tagged, so it should be out in a month or so
16:07 ksalman thanks for the pointer about 2014.7.3!
16:07 iggy http://docs.saltstack.com/en/latest/topics/releases/2014.7.3.html
16:07 iggy just change the numbers to see the other ones
16:07 ksalman cool
16:07 Jouke !whois 213.222.208.149
16:07 Jouke oops
16:07 Jouke sorry
16:07 Jouke left #salt
16:08 Guest70 interesting
16:09 favadi joined #salt
16:11 favadi left #salt
16:12 yidhra joined #salt
16:12 slav0nic joined #salt
16:13 bhosmer joined #salt
16:14 ndrei joined #salt
16:15 spookah joined #salt
16:16 writtenoff joined #salt
16:16 coval3nce joined #salt
16:17 coval3nce anyone happen to have any experience with the gpg renderer?
16:17 XenophonF is it possible to merge only selected change sets from one branch (e.g., development) to another (e.g., production) using gitfs?
16:17 iggy check the irc channel logs... lot's of people ask questions and generally end up answering them on their own
16:18 XenophonF i don't want to merge everything currently checked into the development environment
16:18 iggy XenophonF: cherry pick... but I'm not sure how that will react if you try to later merge the whole branch
16:18 otter768 joined #salt
16:19 XenophonF it'd be nice if i could just merge, say salt/files/* or apache/*
16:19 XenophonF but leave changes to sharepoint/* and wins/* unmerged
16:20 amcorreia joined #salt
16:20 XenophonF i'm reading through this at the moment - http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/
16:20 KyleG joined #salt
16:20 KyleG joined #salt
16:20 coval3nce can you just do the changes you don’t want to do on another branch?
16:21 coval3nce maybe commit what you want, git stash, bit branch, git checkout, git stash pop?
16:21 iggy it's going to get messy later on
16:21 MatthewsFace joined #salt
16:21 iggy avoid it if possible
16:21 basepi iggy: new tag, v2015.2.0
16:22 iggy basepi: figured, thanks for verifying... might be nice to document that all somewhere (assuming it's not going to change again in the next release ;)
16:23 jalbretsen joined #salt
16:23 basepi Hehehe. I thought we had it documented somewhere, but maybe it was only internally. In the next few months as we nail down a more consistent release schedule we'll probably get it all well-documented
16:24 lictor36 left #salt
16:24 Aidanjl joined #salt
16:26 iggy danke
16:27 yidhra joined #salt
16:28 toastedpenguin joined #salt
16:29 UtahDave joined #salt
16:29 rhodgin joined #salt
16:30 zircote joined #salt
16:30 XenophonF coval3nce: if we were doing traditional software development, using branches like that would absolutely be the right thing to do
16:31 XenophonF but the branches I'm talking about correspond to different salt environments, which in turn correspond with our SLAs (dev/test/stage/prod)
16:31 toastedpenguin joined #salt
16:32 XenophonF so setting up a new branch isn't trivial and involves a lot of retargeting and such that i can't easily do or explain to the rest of the team
16:32 XenophonF i'm also going to be integrating with our change management processes soon
16:32 XenophonF where all production changes would need to be prototyped in the development environment first
16:33 XenophonF i need to give my colleagues an easier way to merge changes to just the components they're working on
16:33 monkey66 left #salt
16:33 XenophonF it looks like the advice from the link i posted will work
16:34 tkharju joined #salt
16:34 iggy you could also break up their individual areas into other repos, so they can be responsible for all that merging themeselves
16:34 stoogenmeyer_ joined #salt
16:34 iggy that's what we do
16:35 XenophonF where i can run "git checkout testing" to switch branches, "git checkout development salt/files/cloud.maps.d/ec2.conf" to merge all of the changes to that file into the current branch, and "git commit -m ... && git push" to complete the merge
16:35 iggy I'm in charge of the bulk of the states, but one of the other guys does all the activemq/jboss/etc stuff and he has his own repo's for that
16:35 XenophonF i might do that down the line
16:35 bluenemo_ joined #salt
16:36 XenophonF but right now i'm the only one who knows the git stuff, and i'm worried about making it too complicated
16:36 XenophonF that's a really good idea, though
16:36 ajw0100 joined #salt
16:37 ksalman iggy: how does that work? is it like git repo inside a git repo?
16:37 XenophonF not sure how this procedure handles deletions, though
16:37 ksalman well, I guess i don't know why it wouldn't work
16:37 fusionx8_ joined #salt
16:38 XenophonF that i might need "git cherry-pick" for
16:38 fusionx8_ joined #salt
16:38 lictor36 joined #salt
16:41 Guest70 joined #salt
16:41 iggy ksalman: no, it's just multiple gitfs backends (technically 2 of them are actually formatted as (terrible) formulas)
16:41 FeatherKing joined #salt
16:42 wendall911 joined #salt
16:46 slav0nic joined #salt
16:46 slav0nic joined #salt
16:47 c10b10 is there any way to debug jinja statements from my states? (dump the contents of a variable for example)
16:48 XenophonF yup, to pick up deletions i'll need to use "git cherry-pick"
16:51 shaggy_surfer joined #salt
16:53 cpowell joined #salt
16:53 shaggy_surfer joined #salt
16:54 gladiatr joined #salt
16:58 iggy c10b10: some... depends what you're trying
17:02 jngd joined #salt
17:03 c10b10 iggy: trying to debug Jinja error: not all arguments converted during string formatting, i have this pillar loop, and i want to double check that it's done correctly by dumping the loop var
17:03 perfectsine joined #salt
17:03 enarciso joined #salt
17:03 iggy if it's a pillar or grain thing, you can see the "format" of the data with a pillar.get/grains.get on the command line
17:04 iggy http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#debugging
17:04 iggy salt-call -l debug state.sls module.state
17:05 iggy that'll show you the rendered jinja
17:07 theologian joined #salt
17:09 robawt joined #salt
17:12 tomh- joined #salt
17:12 shaggy_surfer joined #salt
17:14 c10b10 iggy, getting https://www.dropbox.com/s/hund1kv2iqy57t2/Screenshot%202015-04-20%2020.11.14.png?dl=0 for http://pastie.org/private/8wylmxfpmy1n6kfozxwuhw :|
17:14 timoguin joined #salt
17:15 blacked joined #salt
17:16 rap424 joined #salt
17:16 iggy don't write your sls files (or templates) in UTF-8
17:17 iggy python2 blows when it comes to UTF-8
17:19 thayne joined #salt
17:22 ALLmightySPIFF joined #salt
17:22 desposo joined #salt
17:23 c10b10 hm, i don't think i'm not using any utf-8 characters
17:23 jchen joined #salt
17:24 iggy is your editor set to write a BOM or anything?
17:24 iggy file /path/to/your.sls
17:25 jchen left #salt
17:25 bhosmer joined #salt
17:27 patrek joined #salt
17:30 slk joined #salt
17:31 gcm_ joined #salt
17:33 ajw0100 joined #salt
17:33 slk so, i just updated to 2014.7.4, and the iptables.append functionality is adding an unrecognized tag, --fun. which broke some of my iptables formulas. is this a known issue?
17:34 slk er s/tag/option
17:34 slk that is, the iptables command being run on the host is like iptables -A INPUT blahblah --fun -j REJECT, kind of thing
17:35 iggy sounds like a bug
17:35 slk yeah i was gonna submit a bug report, figured i'd do a quick ask first in IRC
17:37 iggy check the closed ones
17:37 nate_c joined #salt
17:37 c10b10 iggy: fyi, this is what worked: http://fernandoalex.com.br/2015/03/24/Howto-SaltStack/ O_O
17:38 iggy slk: https://github.com/saltstack/salt/issues?q=is%3Aissue+iptables.append+--fun+is%3Aclosed
17:39 iggy c10b10: I think newer versions of salt set them all to C
17:39 slk ah, word
17:39 slk thanks
17:41 iggy I really wish they'd stop backporting stuff like that to 2014.7
17:41 yidhra joined #salt
17:41 gchao joined #salt
17:41 spookah what is --fun?
17:41 druonysus joined #salt
17:41 druonysus joined #salt
17:42 slk dunno, but it's definitely not an iptables arg
17:42 iggy it's passing kwargs from the state to the `iptables`
17:42 slk or option or param
17:42 iggy fun is an internal salt kwarg
17:42 slk oh right
17:42 iggy (you can see it all over the source... basically short for function)
17:42 ajw0100 joined #salt
17:52 murrdoc joined #salt
17:53 Diaoul joined #salt
17:54 hellome joined #salt
17:57 hellome joined #salt
18:00 Vynce joined #salt
18:01 ndrei joined #salt
18:06 Fiber^ joined #salt
18:12 solidsnack joined #salt
18:12 solidsnack How do I list grains?
18:13 KyleG salt 'node' grains.ls
18:13 KyleG i think
18:13 KyleG or grains.items
18:14 KyleG http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.items
18:14 KyleG http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.ls
18:14 cptsupermrkt List all possible grains: salt 'box123' grains.ls
18:15 cptsupermrkt Query a grain value: salt 'box123' grains.item serialnumber
18:16 iggy grains.get mysql:databases  <--- does a recursive lookup using : as the separator
18:16 solidsnack cptsupermrkt: Thanks
18:16 solidsnack iggy: Is that `salt ''*" grains.get mysql:databases` ?
18:17 iggy or just a single node... yeah
18:17 solidsnack Oh, interesting.
18:17 iggy salt '*db*' grains.get mysql:database
18:17 iggy or whatever
18:19 solidsnack So if I want to list disks...
18:19 solidsnack ...what do?
18:19 otter768 joined #salt
18:19 buMPnet joined #salt
18:19 denys joined #salt
18:20 solidsnack There's `salt '*' grains.get SSDs` which is fine for my use case today but seems a little brittle to rely on going forward.
18:21 Not_ joined #salt
18:22 blacked joined #salt
18:23 iggy I don't think there's a grain that lists disk
18:23 solidsnack Interesting.
18:23 solidsnack Well, it's fine for now.
18:23 ekristen joined #salt
18:23 iggy salt.modules.disk.*
18:24 iggy salt '*' disk.blkid
18:25 iggy salt.modules.mount.* might be useful too... just depends what you're after
18:29 murrdoc joined #salt
18:31 timoguin joined #salt
18:31 Dev0n joined #salt
18:33 mephx joined #salt
18:46 paha joined #salt
18:52 ProT-0-TypE joined #salt
18:52 blacked1 joined #salt
18:52 robawt hey #salt, is it possible to use Python 3.x for runners?
18:53 UtahDave robawt: have you tried it?  I'm not sure.
18:54 _ikke_ Not sure if it's a salt question, or jinja, but I have defined some mine functions for each minion. Now I need to loop over the data from multiple functions. Is that possible?
18:54 c10b10 joined #salt
18:55 robawt UtahDave: i suppose i'll let you know :)
18:56 shaggy_surfer joined #salt
18:56 _ikke_ I see example to iterate over the data from one function, but I need the data from another function at the same time
18:56 UtahDave robawt: :) We've made a lot of progress towards python3. the main thing hold us back is still m2crypto, which I'm not sure the runner system uses.  So, it may work. I'm not sure
18:58 UtahDave _ikke_: can you pastebin what you've already tried?
19:00 _ikke_ I haven't tried that mutch yet, because I'm still looking into how to get it working. These are the functions: https://gist.github.com/Ikke/8c6776eade335580ec7c
19:00 _ikke_ The example is calling salt['mine.get'], and looping over the return values
19:01 _ikke_ salt['mine.get']('roles:web', 'network.ip_addrs', expr_form='grain').items() to be more precise
19:01 ajw0100 joined #salt
19:03 _ikke_ But what if I want to combine the ip address and the hostname?
19:08 zircote joined #salt
19:08 UtahDave could you loop over them separately and then combine the data?
19:10 _ikke_ UtahDave: I'm not sure how that works. I basically need the two value on the same line
19:10 _ikke_ values*
19:11 _ikke_ basically zip(fun1(), fun2())
19:15 lothiraldan joined #salt
19:16 clintberry joined #salt
19:23 bluenemo_ joined #salt
19:23 druonysus joined #salt
19:27 markm__ joined #salt
19:31 UtahDave _ikke_: sorry, I'm in a meeting right now. I'll look at this when I'm done.
19:32 solidsnack joined #salt
19:36 druonysuse joined #salt
19:37 _ikke_ UtahDave: right
19:38 isodude_ joined #salt
19:38 blacked1 is there right way to call module in pillar? - salt['consul.get']('redis', [])
19:38 VSpike joined #salt
19:39 blacked1 from salt state it works, but when i try to use it in pillar, it write:"render error:
19:39 blacked1 Jinja variable 'dict object' has no attribute 'consul.get'
19:40 wendall911 joined #salt
19:42 murrdoc cant use pillars in pillars
19:42 c10b10 joined #salt
19:45 solidsnack joined #salt
19:47 ksalman is "require" not supported for file.managed?
19:48 druonysuse joined #salt
19:50 ksalman nvm
19:53 lb1a joined #salt
19:55 Chuck_ joined #salt
19:56 _ikke_ UtahDave: I solved it by looking over the ip_addrs values, and in each loop, requesting the get_hostname data for that specific host
19:56 Chuck_ Hello, I am working with Python Client API and I am trying to return highstate output such as which packages have been installed or not to a web interface. I am using  client.cmd_async to get a job id and  client.get_cli_returns to try and return the data. But I am having no luck, can someone help in this matter?
20:00 jhauser joined #salt
20:00 andrew_v joined #salt
20:01 manfred salt really needs it's own stack overflow site
20:02 manfred that would be a perfect question for something like that.
20:02 Chuck_ seems the info is being saved to generator object get_cli_returns at 0x7f4201c13d70, i tried tin iterate through but i receive errors.
20:03 aravind joined #salt
20:06 JDiPierro joined #salt
20:07 JDiPierro Hey guys. I'm using git as a fileserver backend. If salt was having problems updating the fileserver would that show up in /var/log/salt/master or somewhere else?
20:10 stanchan joined #salt
20:12 evilrob joined #salt
20:13 jcockhren Ryan_Lane: dude you rock
20:13 jcockhren http://ryandlane.com/blog/2015/04/13/grafana-dashboard-orchestration-using-saltstack/
20:13 Ryan_Lane jcockhren: :)
20:13 Ryan_Lane do you use pagerduty? if so you'll really love us soon
20:14 jcockhren nah. I don't use pagerduty
20:14 * Ryan_Lane is reviewing something awesome right now
20:14 * Ryan_Lane nods
20:14 jcockhren hmmm
20:14 bmccormick joined #salt
20:14 jcockhren so you're saying ya'll going to give me a reason to switch?
20:14 kaictl joined #salt
20:14 KyleG I use PagerDuty!
20:15 KyleG I bought the apple watch mainly because of PagerDuty, I'm really hoping I can manage my alerts on the watch :D
20:15 JDiPierro joined #salt
20:15 spookah omg that sounds horrible
20:19 evilrob grumble... duplicate IDs... grumble
20:20 otter768 joined #salt
20:20 aquassaut joined #salt
20:21 evilrob so in one state file I have a user defined, and in another state file I defined members of the group of the same name as the first user.  I'm getting a dupe ID error,
20:22 evilrob only thing I can think is that it's implicitly declaring the group with the user declaration.  and when I explicitly declare the group present with a list of members later it's generating the dupe
20:25 FeatherKing joined #salt
20:28 nzero joined #salt
20:28 bruce_s joined #salt
20:29 _ikke_ UtahDave: This is my solution, if you have any suggestions or improvements, I'd like to know: https://gist.github.com/Ikke/8c6776eade335580ec7c
20:29 Ryan_Lane jcockhren: heh. yeah. our support is going to be nice
20:29 Ryan_Lane KyleG: cool. we'll have something incoming soon
20:31 jonlangemak joined #salt
20:38 druonysuse joined #salt
20:38 mansquid joined #salt
20:39 JDiPierro joined #salt
20:40 shaggy_surfer joined #salt
20:40 iggy evilrob: paste code man.... that's way too vague
20:40 Ryan_Lane evilrob: are you doing the short form thing, where you use the id as the name?
20:41 Ryan_Lane evilrob: like this? https://gist.github.com/ryan-lane/17f4218e22f3be462078
20:45 evilrob yes, short form: https://pastee.org/mes4z
20:46 Ryan_Lane short form is a bad pattern. I wish it would be removed from all the docs
20:46 alemeno214 joined #salt
20:46 Ryan_Lane you must have unique IDs, but you can have non-unique names
20:46 Ryan_Lane use the name attribute
20:46 Ryan_Lane and make the id unique
20:46 timoguin joined #salt
20:47 LtLefse I ran into the same thing. it's how the tutorials tell you to do it
20:47 alemeno214 Does anyone here use test kitchen with Salt??
20:48 thayne joined #salt
20:48 jonlangemak left #salt
20:50 nesv joined #salt
20:51 evilrob Ryan_Lane: that made it give me a different error.  Now useradd is throwing an error because the group already exists.  But I can work with that.
20:51 brandon joined #salt
20:54 evilrob is there not a way to specify a default group other than the name of the user?
20:54 Ryan_Lane evilrob: gid argument
20:56 evilrob ok, I see that now in the doc.  what if someone wanted to specify both a different default groupname and a specific group id?
20:57 iggy _ikke_: {% for name, ip in salt['mine.get']('*', 'network.ip_addrs').iteritems() %}
20:59 JDiPierro joined #salt
21:08 pacopablo joined #salt
21:11 mohae joined #salt
21:12 MatthewsFace joined #salt
21:15 hasues joined #salt
21:16 hasues left #salt
21:20 evilrob Ryan_Lane: thanks, that helped me fix my problem.  I still think overloading a parameter like that (gid) is a bad idea.
21:20 Ryan_Lane how's gid overloaded?
21:21 Ryan_Lane it's primary gid and can either be a name or number. I think if a name is used the group must exist first, right?
21:22 iggy sounds right
21:22 iggy I know there are circumstances where that's true
21:28 dendazen joined #salt
21:28 dendazen i get this error
21:28 dendazen Comment: The following requisites were not found:
21:28 dendazen require:
21:28 dendazen pkg: sudo
21:28 dendazen but i got
21:28 dendazen rpm -qa | grep sudo
21:28 dendazen sudo-1.8.6p3-15.el6.x86_64
21:28 iggy you should really pastebin that
21:28 manfred you need a pkg.installed for sudo
21:29 manfred even if it is installed, you still need the state
21:30 dendazen pkg.installed? where that would be?
21:30 manfred another state
21:30 riftman joined #salt
21:30 manfred you need a pkg.installed: name: sudo
21:30 iggy or the same state
21:31 manfred or the same state file*
21:31 manfred some days I want to go through and just relabel everything to nonsensical words… they may not make sense, but at least you would know which state or module I am talking about
21:31 manfred runner canoes
21:31 manfred reactor volcanos
21:32 manfred event trucks
21:32 manfred execution hammers
21:32 spookah joined #salt
21:32 iggy state = file, stanza = section of a file
21:33 manfred yes
21:33 manfred but
21:33 manfred nginx:
21:33 manfred pkg.installed
21:33 manfred that is a stanza in a state file that represents a… state...
21:33 manfred and uses a state module!
21:34 c10b10 joined #salt
21:34 ndrei joined #salt
21:34 thayne joined #salt
21:34 hal58th_ Yes, that is one of my complaints. Reuse of same word in a lot of areas
21:34 iggy I never really had a problem with that stuff... more so with wanting to write python state/module files for everything (the bcfg2 way!)
21:35 giantlock joined #salt
21:35 manfred I have never had a problem with it… but explaining the concepts to someone that hasn't used it before becomes infuriating
21:35 btorch is there a way for  salt to run a state routinely ? like if I wanted to run a state called common.sshd.files every night
21:35 iggy scheduler
21:35 manfred is that spelled right? infuriating… http://www.urbandictionary.com/define.php?term=furiated
21:36 btorch iggy: cool I'll check that out .. that would run on the master ?
21:36 manfred btorch:  on the minion
21:36 manfred or in pillars
21:36 manfred which i found out the other day, and was like 'neat!'
21:37 btorch cool
21:38 Vynce manfred: they're already nonsensical words. pillar?  highstate?  grain?
21:39 manfred pillar and grain are references to salt pillars and a grain of salt
21:39 dendazen Also can i run 2 states with this?
21:39 iggy pillar and grain at least are salty words
21:39 dendazen salt-call state.sls
21:39 manfred dendazen:  you can
21:39 Vynce yes.  nonsensical words chosen because they imply a pun or reference are still nonsensical
21:39 manfred comma seperated
21:39 dendazen Oh, Thanks.
21:39 manfred Vynce: I want more nonsensical
21:40 iggy I don't think it's any worse than most other cfg mgmt systems really
21:40 iggy facter... wtf does that mean... nothing, made up
21:40 manfred i am surprised that they haven't made something called salt flats yet…
21:41 manfred i think they decided we would all kill them if they did too many puns
21:41 manfred like chef… and freakin' food critic… dumb chef recipe linter...
21:42 iggy I was going to call my web gui Mrs Dash (get it dashboard...)
21:42 manfred nice
21:42 manfred i like that one
21:42 iggy but figured I'd probably get a C&D pretty quick
21:43 manfred corporations sueing small time individuals that are just having a small laugh… don't be ridiculous, that would be insane
21:43 iggy ikr, unheard of
21:44 Vynce as for re-use: https://salt.readthedocs.org/en/latest/salt-modindex.html#cap-m i rest your case
21:44 dendazen So i have pkg installed stanza in other state which is init.sls in /packages/sudo where i had /packages/sudo/init.sls and /packages/sudo/user_group.sls. So pkg.installed was in init.sls, before i would just run ‘salt-call state.highstate’ and everything would get installed, but this time i have tried to run ‘salt-call state.sls packages.sudo.user_group’ and it failed with that error, but now when i ran ‘salt-call stat
21:44 dendazen packages.sudo,packages.sudo.user_group’ everything worked.
21:45 iggy include packages.sudo in packages.sudo.user_group and then add the dep
21:45 manfred oh oh oh, i just had a good one… dammit
21:45 manfred it came and went really quickly
21:46 dendazen iggy, would that be a more correct way to do it?
21:46 iggy dendazen: yes
21:46 dendazen Ok, Thanks.
21:47 iggy dendazen: because if you ever have other require's/etc that reorder those files not in that order, you'll have the same errors
21:47 manfred meh, i am going to go watch shooty hoops, o/
21:47 dendazen oh, i see.
21:47 Vynce (the words meaning nothing liek what they mean in english is actually a big problem in making the mental model. a grain — the smallest unit of salt - sounds like it should be a single command or state-assertion.  a pillar should be a collection of state assertions or commands or something. a salt mine should be … i dunno, the online archive of useful reusable bits? etc. if you're going to use words implying a metaphor, USE the meta
21:48 furball365 joined #salt
21:50 robawt oh now you tell us Vynce
21:50 robawt well shoot, back to drawing board ;)
21:51 Vynce robawt: i keep telling people, run all the big naming and UI ideas by me first.  nobody listens. ( :
21:55 iggy you also have to remember a lot of these names were thought up when things like the mine, pillars, scheduler, reactor, etc didn't even exist
21:55 amcorreia joined #salt
21:56 iggy sure, if you could go back and rename everything now (and not alienate all of your users), you could probably do a more consistent job of it
22:06 kunit joined #salt
22:06 randomuser joined #salt
22:07 MatthewsFace joined #salt
22:21 otter768 joined #salt
22:21 fusionx86 joined #salt
22:22 MatthewsFace joined #salt
22:22 desposo joined #salt
22:28 perfectsine joined #salt
22:39 echo joined #salt
22:50 chrisportman joined #salt
22:51 c10b10 joined #salt
22:51 chrisportman Hi All, using salt for remote execution along side Puppet for config management.   Has anyone attempted to use the puppet certs for salt minion authentication?
22:51 iggy I doubt they are compatible
22:54 cygnetix joined #salt
22:55 druonysus joined #salt
22:57 UtahDave chrisportman: I think Ryan_Lane made an attempt to get that to work, I'm not sure how far he got with that, though
22:57 solidsnack joined #salt
22:57 * robawt highfives UtahDave
22:57 spicyWith joined #salt
22:58 UtahDave _ikke_: that seems like a reasonable solution
22:58 solidsnack Can the master be configured to automatically reconfigure instances every so often, or on (a) instance attach and (b) state repository update.
22:58 solidsnack ?
22:58 UtahDave yo, robawt!
22:58 chrisportman hmmm... i thought that might be the case.  Alternatively, is there a way to clean the minion cert from the master, from the minion?
22:58 otter768 joined #salt
22:58 chrisportman UtahDave: interesting, Ill see if he responds
22:58 UtahDave chrisportman: yeah, there's a saltutil function where the minion can request to be deauthenticated.
22:59 UtahDave chrisportman: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.revoke_auth
22:59 iggy solidsnack: yes, there are examples in the reactor docs
23:00 chrisportman UtahDave: Nice! I'll check it out
23:02 yomilk joined #salt
23:04 pacopablo so, ran into a problem with docker-py.  at least on ubuntu, the docker-py install via pip.installed pulls in a new version of requests
23:04 pacopablo that goes into /usr/local/lib/python2.7/dist-packages
23:04 pacopablo which then screws up the system's python-pip package
23:05 chrisportman UtahDave: i see all the examples show `salt '*' ...` however the salt exe seems to come from the master package.  Is there another way of invoking it?
23:06 pacopablo is creating a deb of docker-py, instead of using pip, the best option for avoiding this problem?
23:07 blacked joined #salt
23:07 UtahDave pacopablo: possibly. unless docker-py MUST have a new version that your system packager provides
23:07 UtahDave pacopablo: you could use a virtualenv
23:08 UtahDave chrisportman: the `salt '*' ...` is how you invoke the salt-master from the cli
23:08 Vynce joined #salt
23:09 Vynce joined #salt
23:09 Vynce1 joined #salt
23:10 blacked1 joined #salt
23:11 rhodgin joined #salt
23:12 dendazen joined #salt
23:12 mosen joined #salt
23:12 pacopablo UtahDave: if I used a virtualenv and installed docker-py in that, is there a way to get the salt.states.dockerio module to use the virtualenv?
23:12 blacked joined #salt
23:12 chrisportman UtahDave: yeah, I was looking for something to be able to invoke from the client
23:13 UtahDave chrisportman: yeah, salt-call is what you would use from the client side
23:13 timoguin joined #salt
23:14 chrisportman ahhh ok, ill gitve it a go.  Thanks
23:16 UtahDave pacopablo: I'm not sure.  whiteinge, do you know how pacopablo can get around this problem?
23:16 pacopablo the other option would be to just not use the system python-pip and install pip using the get-pip.py script, I guess
23:17 iggy did you uninstall the python-requests package after you installed it via pip? Did you restart salt after that?
23:18 mosen hiya salties
23:20 spookah how did salt get its name?
23:20 pacopablo iggy: yeah. it's a conflict between the requests 2.6.0 that is installed as part of docker-py and the system pip install
23:21 Singularo joined #salt
23:21 pacopablo if you remove /usr/local/lib/python2.7/dist-packages/request* then pip works again
23:21 pacopablo but you can't use pip to remove the requests that pip installed because the requests borks the pip install
23:22 iggy pacopablo: did you search the issue tracker? something like this sounds familiar
23:22 pacopablo I don't know if docker-py will fail with the older requests version
23:22 pacopablo it was an ubuntu bug
23:22 pacopablo and there are various other posts about it out there
23:22 pacopablo though I haven't found anything salt specific
23:23 pacopablo ansible bascially says to isntall pip from get-pip.py over the system python-pip
23:25 iggy tried downgrading docker-py and requests?
23:27 pacopablo I don't know that I can.  it looks like there is only one docker-py version released
23:27 __number5__ spookah: salt lake city
23:28 iggy __number5__: I'm not sure if that's right actually
23:29 iggy or at the very least there a more interesting, equally plausible story
23:29 Vynce joined #salt
23:29 Vynce1 joined #salt
23:30 thedodd joined #salt
23:30 pacopablo thatch was a salt addict as a kid and thus named it after his favorite condiment becuase everyone needs salt
23:31 * pacopablo tries to start rumors about the origin of the salt name
23:36 murrdoc joined #salt
23:37 gdm85 joined #salt
23:44 __number5__ iggy: I know that's at least part of it, from very early salt-air video
23:48 zircote joined #salt
23:51 bfoxwell joined #salt
23:56 UtahDave It's a Lord of the Rings reference
23:56 UtahDave "Salted pork!"
23:56 iggy there you go
23:57 scarcry joined #salt
23:57 iggy I knew I remembered a bad accent somewhere in the story
23:57 UtahDave https://www.youtube.com/watch?v=-_4MWeR_vCI
23:57 amcorreia joined #salt
23:59 Not_ joined #salt

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