Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-05-12

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

All times shown according to UTC.

Time Nick Message
00:10 faldridge joined #salt
00:11 redondos joined #salt
00:11 redondos joined #salt
00:12 fllr joined #salt
00:14 RandalSchwartz for the top.sls, does the first match win?
00:14 RandalSchwartz or can I have a union of states?
00:15 tedski you can have a union
00:16 tedski for example, you could match '*' to push out your base states, then match individual roles for added functionality
00:16 RandalSchwartz awesome
00:16 RandalSchwartz doing that now
00:16 nkuttler hrm, why is there no state module for linux_acl?
00:17 nkuttler i must be missing something..
00:19 tedski nkuttler: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.linux_acl.html
00:19 nkuttler yeah, that's an execution module
00:19 tedski oh, you did say state module
00:19 tedski derp!
00:19 nkuttler :)
00:21 tedski you should file a feature request
00:22 nkuttler was just thinking about it.. but maybe i can just module.run it
00:22 nkuttler though it would be convenient
00:22 uestra joined #salt
00:23 tedski yeah, module.run or module.wait for now, but still file the feature request so we can add it
00:23 nkuttler will do
00:23 tedski thanks
00:23 RandalSchwartz how do I do the equivalent of: salt -C '* and not stretch.*' in top.sls
00:24 tedski RandalSchwartz: like so:
00:24 tedski '* and not stretch.*':
00:24 tedski - match: compound
00:24 RandalSchwartz awesome thanks
00:25 tedski see http://docs.saltstack.com/en/latest/ref/states/top.html#other-ways-of-targeting-minions
00:27 Nexus_x1__ joined #salt
00:30 RandalSchwartz this is kicking ass.
00:30 RandalSchwartz I have 4 boxes in one area, one in another
00:30 RandalSchwartz the boxes in the first area all needed the same /etc/resolv.conf
00:31 RandalSchwartz all five boxes needed to have timezone set, and some ssh root auths
00:31 RandalSchwartz it's coming together. :)
00:31 RandalSchwartz I really should define the 4 vs 1 with a grain though
00:31 RandalSchwartz does that go in pillar?
00:32 tedski no
00:32 tedski grains are python modules that are run on and by the minion
00:32 jnials joined #salt
00:32 tedski they are run at startup, when highstate is called, when sync_grains or sync_all is called, etc.
00:32 RandalSchwartz ok
00:33 RandalSchwartz so in pillar, can I define pillar['hosting'] as arp vs stretch using that compound thing from before?
00:36 Comradephate joined #salt
00:36 tedski RandalSchwartz: i'm not sure i understand your question... you can also match on pillar
00:36 tedski 'hosting:arp':
00:36 tedski - match: pillar
00:36 tedski - arp
00:37 tedski that sorta thing
00:37 RandalSchwartz right - so how do I define that pillar data
00:37 tedski or are you saying you want to include a pillar match in a compound match?
00:37 tedski RandalSchwartz: http://docs.saltstack.com/en/latest/topics/tutorials/pillar.html
00:37 tedski RandalSchwartz: that's the pillar walkthrough
00:38 RandalSchwartz reading now
00:38 tedski RandalSchwartz: to include pillar in your compound match, you could use '* and not stretch.* or I@hosting:arp'
00:38 tedski where I@ indicates a pillar key:val pair
00:38 jnials_laptop joined #salt
00:40 RandalSchwartz yeah... I'm starting to see this
00:41 robinsmidsrod joined #salt
00:42 obimod joined #salt
00:43 meteorfox joined #salt
00:43 crazysim joined #salt
00:44 meteorfox joined #salt
00:44 vbabiy joined #salt
00:44 luminous_ joined #salt
00:45 svx_ joined #salt
00:45 tamentis_ joined #salt
00:47 jnials joined #salt
00:47 JordanRinke joined #salt
00:48 rupsky_______ joined #salt
00:49 [M7] joined #salt
00:50 alainv_ joined #salt
00:50 ange_ joined #salt
00:50 jakubek_ joined #salt
00:50 ziirish_ joined #salt
00:50 logandg_ joined #salt
00:50 brucewang joined #salt
00:50 ninjabox1 joined #salt
00:51 btorch_ joined #salt
00:51 joehh2 joined #salt
00:51 bleh_ joined #salt
00:51 kula joined #salt
00:51 lpn joined #salt
00:51 chesty joined #salt
00:52 cewood joined #salt
00:52 ashb joined #salt
00:52 MaZ- joined #salt
00:52 vlcn joined #salt
00:52 JPaul joined #salt
00:53 joehh2 engblom: which os/release?
00:53 fllr joined #salt
00:54 joehh2 I think I do remember seeing it being "removed" at one point...
00:56 alunduil joined #salt
00:57 schimmy joined #salt
01:00 joehh though can't find  it "missing" anywhere in debian recently...
01:00 travisfischer joined #salt
01:03 MZAWeb_ joined #salt
01:03 jnials_laptop joined #salt
01:04 jnials joined #salt
01:05 fllr joined #salt
01:07 Luke joined #salt
01:10 masterkorp1 joined #salt
01:12 elfixit1 joined #salt
01:13 ashw7n joined #salt
01:14 ilako_ joined #salt
01:24 nkuttler bah... argument order matters for setfacl.. no module.run for me unless i abuse it..
01:24 nkuttler and no.. even then..
01:36 robawt joined #salt
01:41 RandalSchwartz I have a script that requires rsync be installed.  what's the best way to write that so that I don't have duplicate ID
01:42 RandalSchwartz I mean.. I'm thinking that maybe some other thing I'm installing also wants to require that
01:44 nkuttler RandalSchwartz: require the sls file
01:44 RandalSchwartz so make a separate sls just for rsync?
01:44 travisfischer joined #salt
01:44 nkuttler well, that's how i do it, yes
01:44 RandalSchwartz ok
01:44 manfred or, just include pkg.installed in the same state block, and just require it?
01:44 manfred RandalSchwartz: what is your current sls look like for deploying and running that script?
01:44 nkuttler oh right, that works as well. i work with sls files because i use multiple OSes and it's easier to manage
01:44 RandalSchwartz it's a file.managed
01:44 manfred RandalSchwartz: can you paste it somewhere so I can modify it?
01:44 RandalSchwartz path-to-script - file.managed: source; ... blah blah
01:44 RandalSchwartz ... http://pastebin.com/LbHL2pM9
01:45 jnials joined #salt
01:45 manfred RandalSchwartz: http://ix.io/cgh
01:46 manfred so the name: rsync, overrides the /path/to/file name that would be set if you didn't have the name: in the pkg.installed block
01:46 ckao joined #salt
01:46 RandalSchwartz testing now
01:47 Nexus_x1__ joined #salt
01:47 RandalSchwartz and thanks
01:47 manfred np
01:51 dh__ joined #salt
01:51 ashw7n_ joined #salt
01:51 LordOfLA|Weechat joined #salt
01:51 esogas_ joined #salt
01:51 eclectic joined #salt
01:51 patrek joined #salt
01:51 clone1018_ joined #salt
01:51 RandalSchwartz so glad I chose to be smart about salt instead of puppet :)
01:51 fejjerai joined #salt
01:51 DaveQB_ joined #salt
01:51 emilisto_ joined #salt
01:51 mik3_ joined #salt
01:51 _Flusher joined #salt
01:51 yml_ joined #salt
01:51 logandg joined #salt
01:52 pjcj_ joined #salt
01:52 artificialexit joined #salt
01:52 amontalb1n joined #salt
01:52 Bosch[] joined #salt
01:52 tonthon_ joined #salt
01:52 musinsky joined #salt
01:52 schimmy joined #salt
01:52 DenkBrettl joined #salt
01:52 nkuttler joined #salt
01:52 stevednd joined #salt
01:53 kamal_ joined #salt
01:53 codysoyland joined #salt
01:55 andredieb joined #salt
01:55 andredieb joined #salt
01:55 twinshadow joined #salt
01:55 magenbrot joined #salt
01:55 SaveTheRbtz joined #salt
01:55 sifusam joined #salt
01:55 jacksontj joined #salt
01:56 juice joined #salt
01:56 basepi joined #salt
01:56 keekz joined #salt
01:56 bashcoder joined #salt
01:59 fllr joined #salt
02:01 otter768 joined #salt
02:01 crazysim joined #salt
02:04 d3vz3r0 joined #salt
02:04 njs126 joined #salt
02:04 monokrome joined #salt
02:08 redondos joined #salt
02:08 oz_akan_ joined #salt
02:11 anuvrat joined #salt
02:11 obimod joined #salt
02:34 schimmy joined #salt
02:35 troyreadyyy joined #salt
02:36 anteaya joined #salt
02:43 ashw7n joined #salt
02:50 jnials_laptop joined #salt
02:53 jnials joined #salt
02:58 Tekni joined #salt
02:59 otter768 joined #salt
03:14 oz_akan_ joined #salt
03:20 ajolo joined #salt
03:22 ajolo_ joined #salt
03:24 zz_cro joined #salt
03:28 anuvrat joined #salt
03:29 travisfischer joined #salt
03:37 garthk joined #salt
03:47 mateoconfeugo joined #salt
03:48 oz_akan_ joined #salt
03:51 feiming joined #salt
03:57 catpigger joined #salt
04:02 n0c_ joined #salt
04:08 zirpu joined #salt
04:08 ashw7n joined #salt
04:11 ajolo_ joined #salt
04:15 Ryan_Lane joined #salt
04:22 Furao joined #salt
04:32 pydanny joined #salt
04:33 ravibhure joined #salt
04:37 cowyn joined #salt
04:40 picker joined #salt
04:43 n8n joined #salt
04:48 oz_akan_ joined #salt
04:50 kermit joined #salt
04:53 smcquay joined #salt
05:03 malinoff joined #salt
05:09 oz_akan_ joined #salt
05:09 anuvrat joined #salt
05:10 druonysus joined #salt
05:10 druonysus joined #salt
05:22 sfello joined #salt
05:22 sroegner joined #salt
05:29 jnials joined #salt
05:30 meteorfox joined #salt
05:38 fllr joined #salt
05:54 MrTango joined #salt
05:57 meteorfox joined #salt
06:04 skyion joined #salt
06:08 meteorfox joined #salt
06:09 opapo joined #salt
06:09 fllr joined #salt
06:09 oz_akan_ joined #salt
06:11 _fllr_ joined #salt
06:12 _fllr_ joined #salt
06:14 n8n joined #salt
06:20 Acid_Scorpion joined #salt
06:26 Yoda-BZH joined #salt
06:26 Yoda-BZH joined #salt
06:30 jnials joined #salt
06:30 Acid_Scorpion hillna_, can anybody help me to catch true/false after file.search?
06:30 Acid_Scorpion hi
06:31 malinoff Acid_Scorpion, hi, what's wrong?
06:31 Acid_Scorpion not so familiar with Python syntax
06:31 Acid_Scorpion well, I would like to check pattern in file and then perform other action
06:33 Acid_Scorpion can you show me right "if" expression?
06:33 Yufei joined #salt
06:34 malinoff Acid_Scorpion, do you want to do that is a .sls file with jinja template engine?
06:34 malinoff s/is/in
06:34 Acid_Scorpion yes
06:36 malinoff {% if __salt__['file.search']('path/to/file') is True %} blah {% endif %}
06:36 malinoff Or you can omit "is True" part
06:36 malinoff {% if __salt__['file.search']('path/to/file') %} blah {% endif %}
06:36 rupsky_______ joined #salt
06:37 schimmy joined #salt
06:38 Acid_Scorpion what about False? "is False" from first example?
06:38 malinoff Yes, or in a more pythonic way: {% if not __salt__['file.search']('path/to/file') %} blah {% endif %}
06:39 Acid_Scorpion cool! time to lean Python :)
06:39 Kenzor joined #salt
06:39 malinoff Acid_Scorpion, https://wiki.python.org/moin/BeginnersGuide
06:39 dh joined #salt
06:39 Acid_Scorpion malinoff, thanks a lot, will check now!
06:40 malinoff Acid_Scorpion, my pleasure :)
06:40 malinoff https://docs.python.org/2/tutorial/ - this is what I actually wanted to paste
06:44 Acid_Scorpion malinoff, thanks again, will take a look
06:51 ghartz joined #salt
06:55 Acid_Scorpion Rendering SLS "dev:network" failed: Jinja error: search() takes at least 2 arguments (1 given)
06:57 Acid_Scorpion but before I've already defined file.search with pattern
06:58 Acid_Scorpion or in case of "if" it doesn't make sense?
07:00 InAnimaTe joined #salt
07:02 it_dude joined #salt
07:08 Acid_Scorpion malinoff, ping?
07:10 oz_akan_ joined #salt
07:11 sroegner joined #salt
07:11 fllr joined #salt
07:11 harobed_ joined #salt
07:12 martoss joined #salt
07:13 slav0nic joined #salt
07:13 slav0nic joined #salt
07:13 faldridge joined #salt
07:23 Luke joined #salt
07:24 linjan joined #salt
07:28 siciliansun joined #salt
07:29 Acid_Scorpion guys, how to catch False/Trued in defined file.search?
07:30 siciliansun left #salt
07:31 jnials joined #salt
07:32 Flusher joined #salt
07:32 uestra joined #salt
07:34 think-free_ joined #salt
07:35 it_dude joined #salt
07:42 briner joined #salt
07:43 briner Hi, I do not know how to have an alias.present that is calculated from two pillar
07:44 briner my problem seems that jinja is not able to create a one line of element.
07:45 briner I know that I'm not really able to explain it well, that is the reason I've put a pastebin
07:45 briner http://pastebin.com/0tzRYXU4
07:46 briner any idea ?
07:48 toastedpenguin joined #salt
07:51 briner The question is more: how can I loop over a pillar, and that output is a list like: elem1, elem2
07:52 uestra joined #salt
07:53 anuvrat joined #salt
07:54 malinoff Acid_Scorpion, pong
07:57 malinoff Acid_Scorpion, http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.search
07:57 malinoff file.search needs 2 arguments - path and search pattern
07:59 Acid_Scorpion I already fix it, thanks, but how to deal, if I would like to use in search pattern variable? Looks like {{ variable }} doesn't work for me
07:59 malinoff Acid_Scorpion, can you pastebin your sls file?
07:59 Acid_Scorpion shure
08:03 darkelda joined #salt
08:04 Acid_Scorpion malinoff, http://fpaste.org/100968/81829139/
08:04 Acid_Scorpion this is draft, you know and doesn't work
08:05 malinoff Hm, strange...
08:05 Acid_Scorpion task is very easy: depends of fqdn, change IP and If IP changed, then run command
08:06 picker Any idea what might be causing > saltutil.clear_cache is not available
08:06 Acid_Scorpion if IP not changed, then do not run the command :)
08:06 malinoff Try to {% set pattern = 'address {{ network.ip }}' %}, and salt['file.search']('/home/dmitpe/test/etc/network/interfaces', {{ pattern }})
08:07 Acid_Scorpion ok
08:07 malinoff Acid_Scorpion, also, you can use "unless" in cmd.run
08:07 malinoff http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html?highlight=cmd.run#salt.states.cmd.run
08:08 Acid_Scorpion hmm... good idea. Can I use in "unless" predefined file.search?
08:11 malinoff Acid_Scorpion, no, there must be a shell command, for example 'unless: grep "address {{ network.ip }}" ~dmitpe/test/etc/network/interfaces'
08:11 oz_akan_ joined #salt
08:11 ramteid joined #salt
08:11 fllr joined #salt
08:13 oz_akan__ joined #salt
08:13 Acid_Scorpion great, also suitable for me
08:22 picker got 2014.1.3 master and 2014.1.0 minion
08:22 babilen How can I get a list of all currently present minions when rendering a configuration file with jinja? (present in the sense of salt/presence/present )
08:22 malinoff picker, bad for you :) You must use the same versions for master and minions
08:23 briner please could someone get a look at this pastebin: http://pastebin.com/0tzRYXU4
08:23 picker malinoff, Tried on that too!
08:23 malinoff babilen, {% for minion_id in __salt__['test.ping']('*') %}
08:24 babilen malinoff: Interesting approach, I'll ponder that.
08:24 babilen How would I go about maintaining such a list based on salt/presence/change events?
08:25 workingcats joined #salt
08:29 malinoff babilen, I dunno, dropped salt on v0.17.4 :)
08:30 babilen briner: You could loop over the list in lhost.sls and then access the lknown_user pillar with, say, "current user = known_users.get(loop_user, {})" and then "current_user.get("email", SOME_DEFAULT)
08:30 babilen malinoff: fair enough :)
08:31 ashw7n joined #salt
08:32 jnials joined #salt
08:32 mikkn malinoff: You stopped using salt? Or am I missreading that?
08:32 malinoff mikkn, no, your eyes are ok :)
08:33 mikkn Very interested in hearing why. :)
08:33 malinoff It can be described in a single abbreviation - RAET
08:33 mikkn You think it's a bad/horrible choice?
08:34 malinoff Yes, the worst thing that even could be
08:34 babilen briner: Even a "salt['pillar.get']('known_users:%s:email'|format(LOOP_USER), SOME_DEFAULT)" would probably do the trick
08:35 babilen malinoff: What are you using now? And: Are you serious?
08:35 mikkn malinoff: I don't have such strong feelings about it.. Seems like an experiment at this stage to me. Why did it make you stop using salt?
08:35 briner babilen, the worst it that I know how to get a list of users and how to get an email... but what I do not know is how to create a string, that list the email address. so that I can have something like "    - target: {{ ','.join(list_emails) }}""
08:36 TyrfingMjolnir joined #salt
08:36 malinoff babilen, Ansible for executions, deb/rpm packages + Jenkins for deployments. Also, I'm working on my own deployment tool based on celery
08:37 malinoff mikkn, experiments should be done by experimenters
08:37 babilen malinoff: Any particular reason you prefer ansible for execution?
08:37 malinoff There are many possible choices: rabbitmq (and amqp at all), redis etc
08:37 briner babilen, I'm not wanting to take all the user in known_users but only the one listed on host:lgapfaacets1:luser
08:37 malinoff babilen, it works and do not break things when a new version is released
08:38 babilen briner: Sure, which is why you loop over that list and then use the data (i.e. the current element in the loop) to access the other pillar
08:38 giantlock joined #salt
08:38 malinoff I'm very tried of regressions and bugs on every new version of salt
08:38 malinoff And this new version naming...
08:39 malinoff Looks like salt guys are sure they are never release a stable version (which they could name salt v1.0)
08:39 malinoff they will*
08:39 babilen briner: And you would want: http://paste.debian.net/98959/ if you have to define multiple addresses
08:41 malinoff Also, this article describes a lot of pain: http://madduck.net/blog/2013.02.01:a-botnet-for-configuration-management/
08:41 pressureman joined #salt
08:42 briner babilen, where in your statement do you specify that the target is a list of element separated by comma ??
08:42 pressureman joined #salt
08:43 babilen briner: I don't as I didn't know about your requirement at all. You should be able to use "some_list|join(',')" in jinja though -- http://jinja.pocoo.org/docs/templates/
08:43 Luke joined #salt
08:43 malinoff By the way, guys, could you please answer a couple of questions here: https://docs.google.com/forms/d/1-O3Md8o86jKIW9n5gNZeMHwgC0CWkIQvwjyXe9I2Z3g/viewform
08:43 malinoff Thanks!
08:45 linjan joined #salt
08:47 andrein joined #salt
08:47 briner babilen, you definetely put me back on the road.
08:47 babilen briner: Wonderful, have fun
08:48 briner babilen, I'll dig stronger jinja
08:57 topochan joined #salt
09:00 sroegner joined #salt
09:07 uestra joined #salt
09:09 faldridge joined #salt
09:11 fllr joined #salt
09:13 oz_akan_ joined #salt
09:19 linjan joined #salt
09:19 CeBe joined #salt
09:22 happytux_ joined #salt
09:26 irctc919 joined #salt
09:26 irctc919 left #salt
09:27 Macbeth joined #salt
09:28 Macbeth h
09:33 ashw7n joined #salt
09:37 albertid joined #salt
09:39 albertid Hi, I don't understand how I can have multiple git checkout target directories from the same source repository, due to the global unique ID constraint (because source repository = ID). What is the standard solution?
09:41 nkuttler albertid: you can use any id you like. iirc it's name for the repo
09:41 nkuttler yes, http://docs.saltstack.com/en/latest/ref/states/all/salt.states.git.html
09:46 albertid So I just choose a random ID and then add "name:" for the source URL?
09:47 albertid trying...
09:50 graingert is it possible to create phony states in salt?
09:51 graingert so I can create a state that requires {% if from_git %}git: project_installed{% else %} pkg: project_installed {% endif %}
09:51 graingert then require that state elsewhere
09:52 Kenzor joined #salt
09:52 pdayton joined #salt
09:56 uestra joined #salt
10:00 albertid nkuttler, ok worked, thx :)
10:00 viq graingert: phony states?
10:01 nkuttler i think he means states that are ignored unless specifically required?
10:02 viq Oh.
10:02 viq Currently the only way I can think of to do it is via conditional includes, but yeah, you could do that
10:02 nkuttler fwiw, if it's that.. i have resorted to building a dynamic include list
10:02 graingert nkuttler: no, states that are used just to collect requirements
10:03 nkuttler oh
10:03 graingert nkuttler: like I need to require something done, it could be via git or pkg or archive.extracted
10:03 graingert depending on where we're getting the software from. Ie in develpment it's from git
10:04 graingert in production it's from dpkg
10:04 nkuttler hm, not sure what the problem is tbh
10:04 graingert nkuttler: and we have a bunch of states that need the software installed
10:04 graingert but don't care how
10:04 nkuttler well, if you really want a state that only requires things, maybe use file.exists or something?
10:05 topochan joined #salt
10:05 graingert nkuttler: that's not really a nop
10:05 graingert noop*
10:05 nkuttler yeah..
10:05 graingert nkuttler: in salt everything is "how: what" and really most things only care about what
10:05 viq graingert: if in a single state file, then sure, you can chose what to do depending on "things".
10:05 graingert require:\n - how: what
10:06 sroegner joined #salt
10:07 viq graingert: example: you have a state called 'mysql', in which depending eg on a pillar you decide whether to compile from sources, or use a package, and have a buch of states in it describing how to do either, and you assign those depending on the value of the pillar
10:08 graingert viq: What do you mean?
10:08 viq graingert: with which part?
10:08 graingert viq: I have a state called cmd: mysql or pkg: mysql
10:09 graingert I can't name it just "mysql"
10:10 viq graingert: sounds like you're confused. you don't have state "named" pkg: mysql or cmd: mysql. You have a state named mysql, which uses function cmd, and/or uses function pkg
10:10 MZAWeb_ joined #salt
10:10 viq Or misunderstanding, or I am.
10:11 david_orbit joined #salt
10:11 fllr joined #salt
10:16 viq graingert: for example https://gist.github.com/viq/88fd866d89bbecd45fd0
10:19 dmorrow joined #salt
10:21 Darnoth joined #salt
10:25 elfixit1 joined #salt
10:34 ashw7n joined #salt
10:38 siciliansun1 joined #salt
10:50 tomtomtomtom joined #salt
10:51 ml_1 joined #salt
10:57 unicoletti joined #salt
11:07 jcsp joined #salt
11:08 aberdine joined #salt
11:10 ml_1 joined #salt
11:11 faldridge joined #salt
11:11 fllr joined #salt
11:14 babilen I can't use Python blocks in Jinja as I can with mako, can I?
11:15 * babilen would really like to use itertools in an SLS file
11:17 babilen I am essentially trying to do the equivalent of http://docs.ansible.com/playbooks_loops.html#looping-over-parallel-sets-of-data
11:17 babilen Sometimes I wonder if ansible would have been a better choice ...
11:18 CeBe joined #salt
11:23 babilen Guess I have to either use mako for that particular one (inconsistent though) or work my jinja-fu a bit more. All I need is itertools.izip + itertools.cycle though
11:24 jakubek_ is there any global summary for all hosts '*' agfter doing state.sls? it could be very hard to do it when you have 100 hosts and see what went wrong lets say on first host
11:24 babilen Haven't seen anything like that.
11:25 rupsky_______ joined #salt
11:26 malinoff jakubek_, http://docs.saltstack.com/en/latest/ref/output/all/index.html - probably, you will find one you need
11:26 babilen I typically set "state_output: changes" on my master which helps a little, but a global overview at the end would be nice (even if it had just "failed: minion1 (2), ....", "succeeded: ...")
11:26 malinoff Also, you can always implement the outputter you need
11:27 the_drow joined #salt
11:28 the_drow Is there a tool for salt that tests infrastructure changes like test-kitchen?
11:28 Makbeth joined #salt
11:28 babilen You can use test-kitchen: https://github.com/simonmcc/kitchen-salt
11:31 the_drow Oh nice!
11:31 the_drow But it's still Ruby :P
11:31 babilen sure, but you wanted test-kitchen
11:32 babilen Not that I am aware of a similar tool that is not Ruby
11:32 the_drow I said like test-kitchen
11:32 babilen *written in
11:32 babilen yeah, sorry :)
11:34 topochan joined #salt
11:34 jnials joined #salt
11:35 ashw7n joined #salt
11:35 cast joined #salt
11:37 ashw7n joined #salt
11:38 albertid joined #salt
11:39 jrdx joined #salt
11:40 viq the_drow: yes, and it's very much like test-kitchen ;)
11:40 feebee joined #salt
11:43 diegows joined #salt
11:44 babilen heh
11:44 babilen Is there *any* way I can use itertools when I render a pillar?
11:44 nkuttler babilen: you can probably write a jinja filter
11:45 babilen Please elaborate
11:45 nkuttler babilen: http://jinja.pocoo.org/docs/api/#custom-filters
11:46 nkuttler looks like salt does that itself, http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#filters
11:46 babilen How do I get those into salt?
11:46 malinoff nkuttler, the problem is you can't teach salt to use that custom filters ;]
11:46 nkuttler malinoff: there is no loading mechanism?
11:46 malinoff nope
11:46 nkuttler ...
11:46 malinoff Bazing
11:46 babilen *sigh*
11:47 babilen None?
11:47 nkuttler that seems like a big omission
11:47 malinoff :)
11:47 nkuttler i mean.. for me at least. i'm coming from a web dev background and think a lot in templates..
11:48 * nkuttler might stuff his module into the system jinja then...
11:49 babilen Okay, can I render pillars with mako then?
11:50 nkuttler babilen: http://docs.saltstack.com/en/latest/ref/renderers/
11:50 siciliansun1 left #salt
11:50 babilen Yes, but how do I use those for one particular pillar?
11:51 nkuttler the docs say #!mako
11:51 babilen Okay, so an ugly mix of jinja and mako templates it is then
11:51 nkuttler :)
11:52 babilen Not funny - my colleagues will hate me ("Why is this different?", "So Mako is clearly better?", "Should we use mako everywhere?", ...)
11:53 nkuttler "why haven't you written a patch for salt yet?"
11:53 nkuttler but i guess it can't be that easy if it hasn't been done..
11:54 aberdine what's the downside of using mako over jinja?
11:55 nkuttler well, using different template systems isn't consistent..
11:55 babilen So why jinja at all? ;)
11:55 aberdine is mako a better choice, in general then?
11:56 nkuttler isn't jinja simply.. like.. more popular?
11:56 aberdine I'm coming to salt from ansible and know jinja to a degree. I'm happy to throw that away too though :)
11:56 nkuttler that's probably why it's the default
11:56 aberdine mako is more flexible?
11:57 briner babilen, Sorry to come back with the same topic. But it seems that jinja is somehow a subset of what can python do. And I'm not able to do what I discussed to you before. I let you a pastebin http://pastebin.com/FueucMze .
11:57 viq aberdine: just curiousity, what brought you from ansible to salt?
11:57 aberdine limitations in data handling, partly
11:57 malinoff https://bitbucket.org/akorn/wheezy.template is my favorite
11:57 babilen aberdine: mako has inline python blocks and whitespace handling is not as awkward. I think one "advantage" of jinja is that you don't have to give your template designers access to the power of Python, but only to a very restricted set.
11:58 aberdine babilen Ah, ok so jinja is good for web designers?
11:58 aberdine viq I found that ansible isn't very flexible, it makes it very hard to write generic modules
11:59 aberdine salt struck me as a half way hours between ansible and puppet
11:59 viq aberdine: hm, interesting, didn't encounter that comment before
11:59 babilen aberdine: That's were it comes from
11:59 aberdine viq come from puppet & hiera to ansible I feel like i've had a lot of power removed from me
11:59 viq aberdine: "half way hours" ?
11:59 aberdine viq sorry, house not hours
12:00 viq ah
12:00 babilen Why not just "half way between ansible and puppet" ? :)
12:00 viq That one I can decipher ;)
12:00 nkuttler hm, yeah, thinking about it... a web-centered template language might not be the best choice
12:00 * babilen is constantly thinking "I know how to do this in Python, ... how can I teach jinja?"
12:01 nkuttler babilen: i'm really surprised about the custom modules not possible thing..
12:01 nkuttler i was simply assuming if i ever need more power i could have it..
12:01 babilen yeah, it doesn't make sense
12:01 viq I haven't had much prior experience with configuration management, dabbled a bit in puppet but it wasn't much
12:01 aberdine viq ansible('s author) is very opinionated about how things should be done, and I just disagree with it
12:01 nkuttler but now i'll reevaluate
12:01 aberdine it suits a lot of people
12:01 aberdine though I'm surprised devs like it so much given the limitations
12:02 babilen nkuttler: I mean it is the *only* feature that allows you to forgive the lack of "python blocks" in jinja ... without that it is just so much less powerful
12:02 viq aberdine: I played a tiny bit with ansible, so far I heard it's very simple to start with. Though I've encountered some issues with it as well.
12:02 babilen viq: such as?
12:03 babilen aberdine: What kind of limitations? I am currently considering investing some time into learning/using it too, but am not sure if it pays off
12:03 viq babilen: leaving ~60+ open ssh sessions to machines I ran it on, which made some of those quite limited OpenVZ containers fall over due to reaching resource limits
12:03 babilen viq: That is ... questionably
12:04 babilen *able
12:04 viq babilen: which part?
12:07 babilen viq: The fact that it leaves 60+ SSH sessions open
12:07 babilen But then you can, as I understood it, use different transports with ansible
12:07 viq ah. yeah. I didn't really try to debug it further, but that bit was... surprising
12:08 jakubek_ malinoff: thx
12:09 topochan joined #salt
12:11 bastion1704 joined #salt
12:11 fllr joined #salt
12:13 to_json joined #salt
12:16 orbit_darren joined #salt
12:19 graingert how do I enable salt.states.pkp.mod_aggregate?
12:22 unicoletti left #salt
12:23 zirpubolci joined #salt
12:27 aberdine viq babilen I found with ansible I hit it limits early on
12:28 aberdine as soon as you want to do anything more complicated you end up fighting it
12:28 aberdine and then getting told 'no we're not going to do that' on the mailing list
12:29 aberdine it's better than shell scripting, but it's not a great tool for writing high quality automation, IMHO
12:29 babilen nkuttler: https://groups.google.com/forum/#!topic/salt-users/BQpzBO5RopQ
12:29 babilen aberdine: Thank you for elaborating
12:31 aberdine np :)
12:32 babilen aberdine: Could you give an example about something you tried that wasn't possible? (just curious) -- OTOH I have a very positive impression of salt in that they are both responsive, knowledgeable and opinionated when needed, but always open for discussions
12:33 aberdine writing generic roles. I want to write a role to manage ssh. Debian and RHEL have different default needed for some params in the sshd_config. There is no way to set these defaults based on OS type and still allow the person using the role to override them
12:34 aberdine I think it's an oversimplification. It's _fine_ if you want to write project specific one time code, or code that works for a given release of specific OS.
12:35 jnials joined #salt
12:35 aberdine if you want to manage your systems the why AnsibleWorks thing you should, you're fine
12:35 aberdine I feel like I'm ranting now :)
12:36 aberdine I keep giving ansible a go, thinking it's just me not getting it, then I hit another wall
12:36 aberdine I'm hoping salt is better :)
12:36 mprymek joined #salt
12:37 ashw7n joined #salt
12:41 ipmb joined #salt
12:41 faldridge joined #salt
12:42 the_drow viq: What do you mean?
12:43 aberdine the_drow viq ansible leaves the SSH sessions open via the ControlMaster functionality?
12:43 ekristen joined #salt
12:44 mike25ro hey guys - i want to add user and group nagios to my system... .but i have the following( i am sure stupid) error: http://pastebin.com/zBWZxx64
12:44 mike25ro is anyone in the mood to take  a look?
12:46 jslatts joined #salt
12:48 stritz joined #salt
12:49 siciliansun joined #salt
12:49 picker salt minion cp.get_file salt://prod/config/configfile C:\\   This command fails to copy the destination file to minion.
12:49 picker * the source
12:50 nkuttler mike25ro: hmmm.. run the minion with -l debug and check the output
12:50 novastar2 joined #salt
12:50 mike25ro nkuttler: i will do that in a sec
12:52 mike25ro nkuttler:   Executing command 'usermod -G "" nagios' in directory '/root'   ...
12:52 mike25ro but there should be a group
12:53 colinbits joined #salt
12:53 acabrera joined #salt
12:54 nkuttler mike25ro: don't you miss a - present in your group def?
12:54 nkuttler oh no..
12:54 tessellare joined #salt
12:54 nkuttler bah.. coffee
12:54 mike25ro i have it
12:55 quist joined #salt
12:55 mike25ro this is weird... nkuttler
12:56 ghartz joined #salt
12:57 picker Nothing specific in debug logs is traced
12:59 viq the_drow: I mean that test-kitchen (well, kitchen-salt which is using test-kitchen) is very much so like test-kitchen ;)
12:59 viq aberdine: I didn't really try to debug this further
13:00 aberdine viq that probably what is it - it uses ControlMaster which keeps SSH sessions open to make it quicker next time around
13:01 viq aberdine: could be, though my laptop was rebooted since, IIRC
13:01 aberdine they timeout eventually
13:03 viq What kind of timeframe are we talking about? Because they were still there a couple days after
13:04 jaimed joined #salt
13:04 TyrfingMjolnir joined #salt
13:04 dmorro___ joined #salt
13:05 funzo joined #salt
13:05 siciliansun joined #salt
13:06 funzo joined #salt
13:07 gadams999 joined #salt
13:08 ScrumpyJack joined #salt
13:08 ScrumpyJack afternoon. anyone got salt stack running on SLES9? Thought I'd just ask before having a go
13:09 racooper joined #salt
13:11 fllr joined #salt
13:14 rojem joined #salt
13:15 resmike joined #salt
13:16 briner I'm lost... totally lost with jinja interacting with pillar.
13:17 briner get a look at my pastebin http://pastebin.com/tNvAiy21
13:18 briner babilen, As you can see in my code is that looping is quite difficult
13:19 briner it returns None.. very very strange.
13:20 briner target is a list of emails that it is used for the email server
13:21 briner when I put some {{  }} to debug, I got an email just after the set email.
13:22 davet joined #salt
13:22 stritz left #salt
13:22 faldridge joined #salt
13:24 toastedpenguin1 joined #salt
13:24 vbabiy joined #salt
13:25 faldridge joined #salt
13:25 kaptk2 joined #salt
13:30 rallytime joined #salt
13:32 briner I finnaly found that this is not working as the assignement made inside a scope for can not be used outside
13:32 andrein hi guys, my minion got the hostname wrong, I fixed the hostname and restarted the minion but the salt master still shows the old hostname under unaccepted keys. how can I fix this?
13:33 viq andrein: 'ssh-key -d wrong-key.name.com'
13:34 andrein that deleted it, but after restarting the minion it sent the same hostname. I think it's cached somewhere... any ideas?
13:35 ghartz andredieb, you can remove "minion.*" in /etc/salt/pki/minion
13:35 ghartz restart salt-minion and your master will have to accept new key
13:35 jnials joined #salt
13:35 cpowell joined #salt
13:36 andrein ghartz: i did that aswell, same host...
13:36 viq andrein: on minion check /etc/salt/minion_id
13:36 ghartz hmm
13:37 siciliansun left #salt
13:37 andrein viq: WIN! thanks a lot :)
13:38 ashw7n joined #salt
13:39 GradysGhost joined #salt
13:40 Kenzor joined #salt
13:41 briner target of alias.present can not be a list ! If so the output of target is a python list, when it should be a comma separated list
13:41 briner this seems like a bug
13:41 fllr joined #salt
13:43 _fllr_ joined #salt
13:44 harobed joined #salt
13:44 ajprog_laptop joined #salt
13:46 rallytime joined #salt
13:49 Networkn3rd joined #salt
13:49 briner help, I'm really stuck with my problem of email alias. The problem comes to the fact that target is an value and cannot be a list in the YAML description and also that jinja as some difficulties to create a list of comma separated of values from the construction of two nested loop.
13:50 briner please have a look at http://pastebin.com/tNvAiy21
13:51 briner which fail because an assignement made inside a loop can not be used
13:56 ziirish left #salt
13:58 jnials joined #salt
14:00 sandbender1512 joined #salt
14:01 lilmatt joined #salt
14:01 ggoZ joined #salt
14:04 rupsky_______ joined #salt
14:04 mprymek joined #salt
14:05 babilen briner: Why don't you do what I suggested earlier? Change lknown_user to use a list of mails (i.e. http://paste.debian.net/99034/ ) and then use "email|join(',')" in line 20
14:07 babilen briner: Well, I would have line 19 to "set emails ..." too -- Or am I misunderstanding what you are trying to do? Could you please do a favour and use a different pastebin (e.g. http://paste.debian.net or http://refheap.com or ...) and give an example of what the expected output should be for your input?
14:08 babilen *do me a favour
14:09 ggoZ left #salt
14:09 ggoZ joined #salt
14:10 BrendanGilmore joined #salt
14:11 ashw7n joined #salt
14:15 rallytime left #salt
14:16 ipmb joined #salt
14:17 briner babilen, the fact is that I want to say that a hostname could be managed by more than one user. So the idea is to have in one place all the information about users lknown_user, and in other place the information about host lknown_host. And in the lknown host, we will list the user to which we have to send emails to. So in my case, somehow I have too do two loop. The first to find the user of this host, and the other to find the email o
14:17 briner f the users found. And as said, target on alias does no take a list :(
14:17 briner http://paste.debian.net/99038/
14:18 babilen So, why can't you do what I suggested?
14:18 _mel_ joined #salt
14:20 briner I can change the email by giving a list instead of a value. But I do not understand, even if it do this change, what should I do so that it works.
14:20 babilen briner: Ah, so it is not that a user can have multiple email addresses and that you want to join all of those, but that you want to join the mail addresses of multiple users?
14:21 briner babilen, I'm okay to have a list of email for a user...
14:21 briner yes, I ant to join the mail addresses of multiple users
14:22 albertid joined #salt
14:23 Ahlee there a way to check environment: in pillar?
14:23 Ahlee i want to set specific variables based on environment, and don't want to break out file per environment
14:29 xerxas joined #salt
14:31 babilen briner: My jinja is not strong enough for that. You essentially want a list comprehension that builds a flattened list out of [pillar.get('lknown_user:{}:email'.format(user)) for user in salt['pillar.get']('lknown_host:{}:luser'.format(salt['grains.get']('fqdn', ''))] ..
14:31 14WACU57I joined #salt
14:31 babilen briner: Can't you define multiple "target: ..." ?
14:32 pydanny joined #salt
14:32 babilen briner: Or rather: Multiple "alias.present" (one for each target) ?
14:33 briner nope, it takes the last one.
14:33 babilen And you cannot define the list of aliases in one place?
14:34 thedodd joined #salt
14:34 briner We have some other things that are related, such as firewall per user, ssh_key per user ...
14:35 briner I will try to do this with a big list comprehension.
14:35 gothix joined #salt
14:35 gothix joined #salt
14:35 babilen briner: The alternative (unless https://groups.google.com/forum/#!topic/salt-users/BQpzBO5RopQ comes around) I can think of is to use the mako templating language which allows you to run arbitrary Python
14:35 viq briner: not sure if this helps any, but pillars can be constructed from LDAP queries...
14:36 babilen briner: I am not aware of a way to perform arbitrary list comprehensions in jinja -- are you?
14:36 viq Or stuff like reclass ot others
14:36 briner no, I just  discover jinja two days ago, with salt.
14:36 alunduil joined #salt
14:37 babilen briner: Sure, you have user specific settings, but would it really be that bad to list mail aliases for root explicitly rather than make it a "all users on the box" ?
14:37 stevednd basepi: is there any interest, or more work that would need to be done in pull request #12665 that I submitted last Friday?
14:38 briner I'll try to do something with list comprehension, and if it fails, I will certainly choose an other path :)
14:38 babilen briner: I understand why you might prefer your approach (and there really isn't a good reason why it shouldn't work), but apart from what I suggested I can only think of the "reorganisation" approach to solve that.
14:38 briner babilen, many thanks for your help. It is really appreciated.
14:41 babilen briner: fwiw, this is what I was referring to in mako: http://docs.makotemplates.org/en/latest/syntax.html#python-blocks
14:47 jalbretsen joined #salt
14:48 gothix can i have multiple roles defined in the top.sls file?
14:49 gothix seem like the system dont want to read anything after my base section
14:49 gothix well it will read the base section just no other section and mapping
14:50 uestra joined #salt
14:53 kermit joined #salt
15:02 jnials joined #salt
15:04 engblom joehh: master is jessie and minion is wheezy
15:05 skyion joined #salt
15:06 tyler-baker joined #salt
15:17 Ryan_Lane joined #salt
15:18 mgw joined #salt
15:19 harobed joined #salt
15:20 kermit joined #salt
15:20 fllr joined #salt
15:21 skyion joined #salt
15:22 ashw7n joined #salt
15:24 ashw7n_ joined #salt
15:26 mateoconfeugo joined #salt
15:28 elfixit joined #salt
15:28 uestra_ joined #salt
15:31 abe_music joined #salt
15:35 skyion joined #salt
15:37 basepi stevednd: looking
15:39 basepi stevednd: I'll let Tom make the final merging decision, but I like the looks of it.  And it looks like the linting errors are unrelated to your code
15:39 MZAWeb_ joined #salt
15:40 RandalSchwartz if I have pkg.installed, will it also auto update from the packaging system?
15:40 RandalSchwartz or do I need to do something special for that?
15:40 robawt joined #salt
15:41 resmike joined #salt
15:42 Ryan_Lane joined #salt
15:42 funzo joined #salt
15:43 RandalSchwartz ahh... need pkg.latest instead of pkg.installed
15:45 Ryan_Lane howdy. which salt folks are at the conference?
15:47 possibilities joined #salt
15:49 tligda joined #salt
15:49 resmike joined #salt
15:50 jimklo joined #salt
15:55 resmike joined #salt
15:56 [diecast] joined #salt
15:58 Gareth morning morning
16:02 jimklo joined #salt
16:02 eberg__ joined #salt
16:03 meteorfox joined #salt
16:03 bemehow joined #salt
16:03 ashw7n joined #salt
16:03 mr_chris joined #salt
16:04 giannello joined #salt
16:05 tharkun joined #salt
16:05 Ryan_Lane joined #salt
16:07 tharkun joined #salt
16:07 viq Hah, I'm still the most active user here according to http://bots.wmflabs.org/~wm-bot/dump/%23salt.htm ;)
16:07 Voziv Is there a way to debug what package is pulling in another package?
16:09 jimklo joined #salt
16:09 btorch_ so I started a batch run with -b 1 and -t 190 , it started on the first minion and then I had to ctrl-c
16:10 btorch_ that should be good right ? at least I don't see anything on jobs.active
16:10 tedski btorch_: correct, each batch run is a unique jid
16:10 btorch_ cool thanks
16:10 tedski and the jobs are submitted in serial
16:10 redondos joined #salt
16:10 redondos joined #salt
16:12 jimklo joined #salt
16:12 frasergraham joined #salt
16:13 KyleG joined #salt
16:13 KyleG joined #salt
16:13 jnials_laptop joined #salt
16:13 agend joined #salt
16:15 TyrfingMjolnir joined #salt
16:16 jimklo joined #salt
16:18 albertid Can Salt manage arbitrary non-service processes (ensure that they are running) or should I use supervisor or similar?
16:18 KennethWilke joined #salt
16:19 joehillen joined #salt
16:21 Joseph joined #salt
16:21 jcockhren albertid: salt can managed supervisor
16:21 Joseph i have successfully set up mysql to store returner data. How do i execute the returner mysql functions? http://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.mysql.html
16:21 jcockhren manage*
16:23 jaycedars joined #salt
16:23 albertid jcockhren, ok, you mean I should use salt.states.supervisord ?
16:25 jcockhren yep and the module
16:26 jcockhren that's the way I 'manage' arbitrary processes (to ensure they're always running)
16:27 smcquay joined #salt
16:27 tedski but, salt.states.supervisord doesn't manage the supervisor config file?
16:28 tedski i.e. a supervisord.running should first make sure its added to the config, no?
16:28 jcockhren one sec, let me pull up mine
16:29 stephas joined #salt
16:29 jcockhren here's the flow:
16:29 jcockhren you know what... I'll just gist it
16:30 jcockhren let me sanitize
16:31 Voziv Is there a way to pull the ip of a different minion? The use case being a mysql server setup and firewalling only allowing the web minions access via the firewall (In my case the private networking is shared among all the vps's and not just my own vps's)
16:32 otter768 joined #salt
16:32 N-Mi hi guys. I'm using the openssh formula, and I've defined some SSH keys for users. This works fine, but the state fails if I define an SSH key for a user that is not present on this server. How should I handle this ?
16:32 wendall911 joined #salt
16:33 tedski Voziv: salt mine
16:33 jcockhren https://gist.github.com/jcockhren/3231d715e24b17dc1be4
16:34 jcockhren albertid, tedski ^
16:34 jcockhren it kind of sucks
16:34 tedski n-mi: using jinja if conditions to test if the user is present
16:34 glenn___ joined #salt
16:34 Voziv tedski: Looking at that now
16:34 jcockhren but it did the needfyl good enough, until I started using an internal deb repo
16:35 otter768 joined #salt
16:35 tedski jcockhren: yeah, but for non-debianized things, supervisor still has a decent use case
16:36 tedski jcockhren: i think we should fix the state and module to populate the config file if necessary
16:36 schimmy joined #salt
16:36 ipalreadytaken joined #salt
16:37 faldridg_ joined #salt
16:37 jcockhren tedski: like supervisord.gen_config or something?
16:37 forrest joined #salt
16:37 tedski jcockhren: pretty much
16:38 danielbachhuber joined #salt
16:38 jcockhren I think that would work nicely with the 'watch' statements
16:39 jcockhren though, I wonder how much of the file.managed functionality would be duplicated
16:39 joehillen joined #salt
16:39 funzo joined #salt
16:39 Furao joined #salt
16:39 novastar2 joined #salt
16:39 jcockhren nm. state modules _can_ call other state modules. So we could use file.managed facilities directly
16:42 N-Mi tedski: thk. I'm trying to do this, but I don't find how to test if the user is present
16:43 schimmy joined #salt
16:44 mephx joined #salt
16:45 ashw7n joined #salt
16:48 tedski N-Mi: something along these lines: https://gist.github.com/tedski/67965ba33392fd5a566f
16:49 stephas joined #salt
16:51 bemehow joined #salt
16:52 rushm0r3 joined #salt
16:52 rushm0r3 left #salt
16:53 eriko joined #salt
16:55 N-Mi tedski: it's giving me an error (added as comment to your gist). is this kind of call usable in pillar ?
16:56 masterkorp Hello
16:56 masterkorp how do you run salt master under a non privilieg user ?
16:57 masterkorp all i want to its to have a local salt-master to try some code to a a machine
16:57 masterkorp and play with gitfs
16:57 tedski N-Mi: oh, right, you're using the formula
16:57 forrest masterkorp, http://docs.saltstack.com/en/latest/ref/configuration/nonroot.html
16:58 tedski N-Mi: hrmm... now i'm scratching my head...
16:58 tedski N-Mi: not sure of the most elegant approach, but using an external pillar for this is one way to solve it
16:58 tedski N-Mi: oh, nevermind
16:58 tedski wait
16:58 tedski i misread your comment
16:58 tedski and i have a typo in my gist
16:59 obimod joined #salt
16:59 tedski N-Mi: refresh the gist... i fixed the module call
16:59 tedski N-Mi: cmd.retcode, not cmd.ret_code
17:00 mpoole hey guys.. i'm running into this problem: The state "redis_log_directory" in sls rediscluster.server is not formed as a list
17:00 Rojematic joined #salt
17:01 n8n joined #salt
17:02 mpoole https://gist.github.com/reedox/d33e03585d707d01eaa9
17:03 N-Mi tedski: thanks a lot, that the solution (I just had to add a not to make it work)
17:03 druonysuse joined #salt
17:03 N-Mi here's the solution : {% if not salt['cmd.retcode']('id toto') %}
17:04 rupsky_______ joined #salt
17:05 travisfischer joined #salt
17:05 masterkorp forrest: thank you
17:07 druonysuse joined #salt
17:07 druonysuse joined #salt
17:08 rglen joined #salt
17:08 gmoro joined #salt
17:11 JesseCW joined #salt
17:13 faldridge joined #salt
17:14 vbabiy joined #salt
17:15 RandalSchwartz is there a {{ variable }} representing the name of the current file?
17:15 RandalSchwartz I'd like to say: "# this file is in salt at {{ somevar }}"
17:15 shaggy_surfer joined #salt
17:15 carmony *does a happy dance* I got the last group here to buy off on salt, we're moving away from the last remnants of puppet and going 100% salt :)
17:16 philipsd6 congratulations carmony, sadly my $company is sliding into Puppet-land despite all my efforts.
17:16 Joseph philipsd6>: i feel so bad for you.
17:17 shaggy_surfer Hi guys, I am trying to run a salt command from within a bash script and it keeps giving an error of :  Error:
17:17 shaggy_surfer Profile /etc/salt/cloud.profiles.d/ec2-uswest-ca-profile.conf is not defined, any ideas?  It runs fine from the bash command line.
17:17 Joseph shaggy_surfer: likely your shell environment is sourcing in environment variables that are not sourced in when the script runs. What's in yoru bashrc?
17:18 Joseph also, execute printenv in your terminal AND printenv in the script itself and then compare the two
17:19 shaggy_surfer the .bashrc is the standard for this user I have created called "build"
17:19 shaggy_surfer but i do do a sudo su - build
17:19 delkins RandalSchwartz: does {{ name }} give you want you want? it might depend on how/where file is called from
17:20 Joseph shaggy_surfer: "su" is evil...try doing a sudo bash
17:21 yusuket joined #salt
17:22 kermit joined #salt
17:22 RandalSchwartz I'll try that
17:23 smcquay_ joined #salt
17:28 racooper if you're wanting an elevated shell, sudo -i
17:29 uestra joined #salt
17:29 pssblts joined #salt
17:30 shaggy_surfer well, I am using amazon and created a build user, but need to execute the command in the script as sudo since salt is running as root.  If I run the script as root it works fine… but if I do sudo su - build , then ./scriptname and then I get the error saying it can't find the salt cloud profile
17:31 shaggy_surfer I initially logon to the box as ubuntu then become the build user….
17:31 RandalSchwartz no..  {{ name }} is where it is going to get installed
17:31 RandalSchwartz I want the jinja template name
17:32 Joseph its probably how sudo is setting the path...for security reasons sudo sets the path for a user when the user sudos
17:32 shaggy_surfer I did the printenv both as the root user and the build user and it appears the build user has a few more entries for my amazon env settings, but other than that they almost look identicle
17:33 Joseph well is it possible that the build user's env settings points to the /etc/salt/cloud.profiles.d/ec2-uswest-ca-profile.conf
17:33 shaggy_surfer what's strange is I can change the command to just "sudo salt-cloud —help" in the script and that works
17:33 shaggy_surfer so it must have something to do with how salt-cloud get's the profile file
17:33 anuvrat joined #salt
17:33 Joseph can you post the script that's being executed on gisthub?
17:34 shaggy_surfer I can post it, sure.
17:35 shaggy_surfer where on git hub do I post it?
17:35 Joseph https://gist.github.com/
17:36 Joseph just go to the link, paste in your code, and then select create gist
17:36 Joseph up to you if you want to make it private or public
17:36 shaggy_surfer https://gist.github.com/mf-collinhayden/d52fcae2e3e09f477094
17:37 mpoole hey anyone know why i'm getting parser errors with this? https://gist.github.com/reedox/d33e03585d707d01eaa9
17:37 manfred shaggy_surfer: salt-cloud -p <profile-name> p-uswest-ca-dev01.momentfeed.com
17:37 manfred not the file
17:37 mpoole "The state "redis_log_directory" in sls rediscluster.server is not formed as a list"
17:37 manfred shaggy_surfer: just the thing you named it in the top of the ec2-uswest-ca-profile.conf
17:39 shaggy_surfer sorry, my mistake, you are right, I changed it to: sudo salt-cloud -p /etc/salt/cloud.profiles.d/ec2-uswest-ca-profile p-uswest-ca-dev01.momentfeed.com
17:39 shaggy_surfer but still the same error
17:39 obimod joined #salt
17:40 RandalSchwartz is there anywhere in the code where I can see the list of variables passed to a jinja template?
17:40 manfred shaggy_surfer: what did you name the profile in /etc/salt/cloud.profiles.d/ec2-uswest-ca-profile.conf ?
17:40 shaggy_surfer https://gist.github.com/mf-collinhayden/358d25597d3fb5dd3b1f
17:40 manfred what did you name the profile in that file?
17:41 manfred shaggy_surfer: http://salt-cloud.readthedocs.org/en/latest/topics/aws.html#cloud-profiles
17:41 shaggy_surfer base_ec2_private:
17:41 n8n joined #salt
17:41 manfred then salt-cloud -p base_ec2_private p-uswest-ca-dev01.momentfeed.com
17:41 schmutz joined #salt
17:42 Joseph <mpoole>: is that the whole sls file?
17:43 shaggy_surfer my bad, sorry guys.  I ran the command on the command line prior and then trying to give it absolute path cuz it didn't work at first and I screwed it up by giving it the path to the file containing the profile
17:43 shaggy_surfer it's working now… thanks for the help.. sorry for the noise
17:43 manfred np :)
17:44 shaggy_surfer needs some coffee :)
17:45 pydanny joined #salt
17:46 zach joined #salt
17:47 jnials joined #salt
17:49 funzo joined #salt
17:52 Networkn3rd joined #salt
17:52 TheRealBill joined #salt
17:54 JordanRinke Morning
17:54 jaycedars joined #salt
17:56 jforest joined #salt
17:56 troyready joined #salt
17:57 tedski N-Mi: glad to help :)
17:57 MZAWeb_ joined #salt
17:59 picker joined #salt
17:59 Ahlee Does grain based mathcing not work in pillar top.sls?
18:02 Ahlee Nevermind, I'm dumb and didn't have the -match: grain
18:03 lineman60 joined #salt
18:04 rojem joined #salt
18:05 smcquay joined #salt
18:06 dude051 joined #salt
18:08 nineteeneightd joined #salt
18:09 picker How  to invoke states like this one manually which resides at /srv/salt/prod/webservice/deploy.sls?
18:10 tedski picker: use state.sls
18:11 Ahlee picker is prod your environment there?  if so, salt <target> state.sls webservice.deploy env=prod
18:11 tedski what Ahlee said is more thorough :)
18:11 forrest picker, salt 'target' state.sls prod.webservice.deploy if you aren't using envs.
18:11 obimod joined #salt
18:13 possibilities joined #salt
18:14 nineteeneightd I'm trying to inlcude some grains/pillars (not sure where this best goes) on certain machines. To get the data, I need to shell out to an executable that is only available on the machines I'm trying to tag.
18:15 Ahlee If you come up with a solution to that, I'd love to hear it.
18:16 Ahlee nineteeneightd: my solution to that was to have the executable drop data into a centralized data store, and I wrote external pillars to target the values
18:16 nineteeneightd When trying to use a custom grain in _grains, I get a key error on __salt__['cmd.run'] and when trying to template out a pillar sls that should only be included on the right machines that used salt['cmd.run'] /bin/sh doesn't find the executable leading me to believe it's not running on the machine I hoped it would
18:16 Ahlee the downside to that of course is moving parts and the lag between set/get and how dynamic the values are
18:17 Ahlee nineteeneightd: pillar runs on the master, a custom _grain is interesting if the value doesn't change, as my understanding is _grain/ are executed only once
18:17 picker Thanks guys, that helped
18:20 nineteeneightd Thanks for the info, Ahlee
18:23 Ahlee the key error is interesting
18:23 pdayton joined #salt
18:23 nineteeneightd I'll double check that, too
18:27 nineteeneightd Granted...that
18:27 nineteeneightd 's not the worst thing int he world, knowing that's actually being executed on the machine, I could always just import subprocess and go that route
18:27 Ahlee yeah
18:29 joehillen joined #salt
18:30 picker Calling innerstates raised error File "salt/state.py", line 2380, in render_highstate KeyError: 'prod' . Have set environment: prod in minion conf,is that causing to fail?
18:31 andrein hi, is there a way to run a state/command in stages using salt? for example, my webserver takes 30s to start up, if I were to update a configfile during highstate, all webservers would be down for 30s. I'd like to restart them 3 at a time for example
18:32 timoguin andrein: yea there's a batch argument
18:32 vlcn is there an easy way to kill all jobs?
18:32 Ahlee There's also orchestration: http://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html#states-overstate
18:33 Ahlee vlcn: i think the only way is to loop over the list of running jobs, and send a kill to each.
18:37 forrest joined #salt
18:40 jimklo joined #salt
18:42 picker My master and windows minion salt are on 2014.1.3
18:42 ashw7n joined #salt
18:43 stevednd basepi: thanks
18:44 Ryan_Lane joined #salt
18:44 basepi stevednd: np
18:44 jcristau joined #salt
18:46 stevednd basepi: what's the path for features making it into releases? I had a previous pull request that was accepted, and merged into develop to add support for ports with the saltify driver, but it hasn't come through with the latest releases.
18:46 AdamSewell joined #salt
18:46 AdamSewell joined #salt
18:47 basepi stevednd: we almost never put new features into dot releases (2014.1.3, 2014.1.4, etc).  All new features are generally held off for the next feature release (codenamed Helium, will probably be versioned 2014.5.0)
18:47 basepi Helium should have its first release candidate in a couple of weeks.
18:48 stevednd cool, I was just about to ask if there was a milestone/expected date for it
18:48 Ahlee oh man, it's following month dating?
18:49 basepi Ahlee: yep
18:49 Ahlee I don't like that one bit.
18:49 basepi for better or worse.  ;)
18:49 basepi Ahlee: why?
18:49 * basepi is curious
18:49 Ahlee well, Hydrogen slipped to februrary, right? so already the naming's wrong
18:49 basepi Yes, but the first release candidate was in January
18:50 * basepi shrugs
18:50 Ahlee also, now there's two arbitrary values to remember
18:50 Gareth We're following basepi's calendar...which starts with 0, not 1.
18:50 basepi hahaha
18:50 Ahlee it's like ubuntu naming, who actaully remembers what names the releases have?
18:51 Ahlee but, you see people online talking about a name, then have to google the name:number key value
18:51 basepi The codename thing is definitely not ideal.  But following the periodic table at least gives you a stable target to figure out the names
18:51 timoguin Ubuntu Jarjar Jinksie
18:51 Ahlee i mean, sure you can say 2014.5.x is larger than 2014.1.x
18:51 Ahlee assuming you follow US dates
18:52 basepi The theory was that we would never really use the codenames much outside of internal discussion, and once it was released the codename would die.
18:52 Ahlee so how you have 2014.5.1, which looks lioke a date, but is actually a version
18:52 Ahlee ah
18:52 Ahlee well, good in theory
18:52 basepi So I always try to refer to the actual version number once it's been released, I try to never say Hydrogen anymore
18:52 basepi But it still sticks around, which is unfortunate.
18:52 Ahlee Fair
18:53 timoguin another source of confusion is the versionadded directives in the documentation.
18:53 basepi Then again, I think there are advantages to having the release date in the version.  Though like you say, 2014.1 was actually released in February
18:53 timoguin you have to use the codename because we don't know what the actual release version will be
18:53 basepi timoguin: yep, they don't get changed in a timely manner once a new release comes out
18:53 timoguin and people see that and think, "what the hell is a Helium?"
18:53 rojem joined #salt
18:53 basepi timoguin: i want to go through and change them all once we actually have a version number
18:54 basepi for versionadded, if the feature release is not yet out, i kind of think we should stay away from codenames and instead use "next feature release"
18:54 basepi or something
18:54 basepi because you're right, codenames are confusing.
18:54 timoguin the newer docs index should help too, i.e., getting the old versions up on docs.saltstack.com too
18:54 basepi but at least if we get them changed to the version once we know it, that will help
18:54 timoguin basepi: if not a "next feature release," there should at least be a link to info about the release
18:54 timoguin yes
18:55 Ahlee i'd agree with you on next feature release
18:55 Ahlee there's always semver ;)
18:56 timoguin can't go back now!
18:57 Rojematic joined #salt
19:00 to_json joined #salt
19:00 zain joined #salt
19:01 rojem joined #salt
19:03 to_json1 joined #salt
19:09 oc joined #salt
19:10 to_json joined #salt
19:12 Ryan_Lane joined #salt
19:13 picker Calling one prod state is leading to error File "salt/state.py", line 2380, in render_highstate KeyError: 'prod' . Have set environment: prod in minion conf,is that causing to fail?
19:18 ThomasJ|d joined #salt
19:19 jimklo joined #salt
19:19 sroegner joined #salt
19:20 pydanny joined #salt
19:20 ghartz_ joined #salt
19:23 Networkn3rd joined #salt
19:30 _ruben joined #salt
19:30 kermit joined #salt
19:30 ekristen is there a way to run part of a state only if a package is installed?
19:32 saravanans joined #salt
19:32 picker check unless
19:32 saravanans hi all
19:32 saravanans i am trying to bootstrap windows minions from salt-cloud
19:33 saravanans i dont find any proper documentaton.
19:33 saravanans can you please point me to the right doc - for Windows minion installation - for ec2
19:34 saravanans Note: my linux salt minions are working great with ec2
19:34 picker basepi: Can we expect windows minion  with  next major release?
19:35 picker http://docs.saltstack.com/en/latest/topics/installation/windows.html#silent-installer-option
19:35 saravanans hello, is there a doc for ec2 - windows minion setup?
19:35 timoguin saravanans: http://docs.saltstack.com/en/latest/topics/cloud/windows.html
19:36 saravanans timoguin: have you looked into the link?
19:36 saravanans i did already, and no useful content there
19:36 timoguin you can't use the standard AMIs because they don't have port 445 open, so you'll have to use an alternate or create your own
19:36 mprymek joined #salt
19:36 saravanans timoguin: i believe it doesnt have to do with the ami - because 0 i will open 445 in my security group
19:36 saravanans am i right?
19:37 basepi picker: I don't know what you mean.  There is already Windows support.  Though that doc needs to be updated, it's still referencing 0.17.0
19:38 timoguin I'm not sure what services are running by default on the Windows AMIs. I've been working on creating my own AMI with the WinRM services running.
19:39 saravanans ok, the reason i wish not to create a new AMI is we are beta testing our product with aws free tier - which is only available with available amis
19:39 saravanans basepi: can i use the default ami from ec2 for windows minon installation?
19:40 timoguin saravanans: spin one up and see if SMB is running on port 445.
19:40 timoguin i don't think it is.
19:41 basepi saravanans: unsure.  i'm not very involved with the windows development.
19:41 saravanans thanks timoguin, basepi
19:41 saravanans i shall check the same.
19:42 saravanans meanwhile, i am very happy with salt - i have been using puppet before :)
19:42 timoguin always good to hear. :)
19:42 faldridge joined #salt
19:42 picker basepi: Basically I was checking saltutil.clear_cache for it and found it wasn't available in 2014.1.3
19:43 faldridge joined #salt
19:43 basepi picker: yes, it will be in the next major release (expecting release candidate in a couple of weeks).  windows and linux.
19:44 roca joined #salt
19:44 timoguin yay, clear_cache...
19:44 timoguin i've done that far too many times manually
19:45 picker with which build cp.get_dir should work, which I could test for windows
19:47 claytonk joined #salt
19:47 BigBear joined #salt
19:48 possibilities joined #salt
19:49 to_json joined #salt
19:51 rupsky________ joined #salt
19:55 rojem joined #salt
19:55 picker Anyone tried to  copy dir to minion? Unfortunately following docs wasn't getting expected result
19:56 ashw7n joined #salt
19:57 jimklo joined #salt
19:59 btorch I'm using the pip state module to install two pips, Flask and DBUtils ..it works fine on other boxes but this one system that already had it installed previously , salt always complains and returns a failed result
19:59 btorch is there a way to stop that ?
20:00 all_the_fisch joined #salt
20:02 lilmatt joined #salt
20:04 nineteeneightd Do I want/need a minion running on the same machine as my master?
20:05 GradysGhost nineteeneightd: It depends on what you're trying to accomplish exactly, but as long as you're using the master/minion model and you have a master server that's instructing other servers then yes, I'd suggest managing the master with salt and a minion.
20:05 kula I run one on my master, because my master is like any other machine and I like to configure it with salt.
20:05 GradysGhost what kula said
20:06 nineteeneightd Roger, thanks
20:09 picker Whats the possible cause for err: No sls found for xyz in env base ? It occurs even if I am lisiting xyz in top.sls file
20:10 GradysGhost picker: That could mean that your module lacks an init.sls (or whatever sls it's referencing)
20:10 GradysGhost It could also mean that your salt master configuration expects your salt modules to be in a place where they aren't.
20:10 forrest joined #salt
20:10 GradysGhost When in doubt, run your salt master and minion with the '-l debug' command line flag to get additional messaging about what could be wrong.
20:11 picker So is init.sls is a must?
20:11 GradysGhost Depends on how you're referencing it
20:12 GradysGhost Let's say you have a file at /srv/salt/modules/mymodule/mymodule.sls
20:12 GradysGhost In your top.sls, you could reference that directly with modules.mymodule.mymodule
20:12 GradysGhost But if you want to reference that with modules.mymodule, then yes, you need an init.sls
20:13 Ixan joined #salt
20:13 GradysGhost Assuming, of course, that your master looks in /srv/salt for its modules.
20:13 picker Ah ,gotcha
20:14 Ymage joined #salt
20:15 pssblts joined #salt
20:15 picker I have also filter the roles and env in grains as prod. aby idea whhat might be causing this error File "salt/state.py", line 2380, in render_highstate KeyError: 'prod
20:15 tedski basepi: got a minute to chat about #12679?
20:16 basepi tedski: sure
20:16 shaggy_surfer joined #salt
20:16 bhosmer joined #salt
20:16 tedski basepi: if saltstack were simply a configuration management system that only exposed states as the ui, i would agree with your latest comment.  however, as a remote execution utility, the mdadm module is just plain broken.
20:16 shaggy_surfer Hi all, trying this in a script:  sudo salt-cloud -p base_ec2_private ${HOSTNAME} --output=txt --output-file="${HOSTNAME}_instance_output.txt", but I don't see any output file getting created.  ideas?
20:17 GradysGhost picker: Honestly, that could be anything. I suggest starting with the '-l debug' flags, as this often clarifies salt's frequently nondescriptive errors.
20:18 basepi tedski: i haven't actually looked at the code for the module.  i suppose if we could get those arguments to use a syntax that doesn't conflict with our kwarg syntax, that would fix it nicely
20:18 basepi just haven't checked to see if that's feasible
20:18 tedski basepi: see my pull req... the module wasn't using kwargs
20:19 uestra joined #salt
20:19 tedski basepi: it was using args only and expected the args to include an equals sign, masqueraded as non-keyword args
20:19 tedski basepi: see the pull req i attached to the bug
20:19 picker GradysGhost: Thanks will trace in detail
20:19 basepi tedski: ah, perfect!
20:20 basepi sorry i didn't do my due diligence.  i think your fix is the correct one.
20:20 GradysGhost Sure, picker. If you keep having problems, let us know. Get us a hastebin of your output if you need to.
20:20 tedski basepi: note i also increased test coverage by adding unit tests for my changes
20:20 basepi tedski: even better!  =D
20:20 tedski basepi: but, they're the first unit tests i've written using salttesting, so i'd appreciate a code review of the tests
20:21 tedski basepi: but, 12680 is a *big* change... so, i think we might want thatch to chime in for approval
20:21 shaggy_surfer does the —output-file or -out-file work with salt-cloud?  I am trying it and it doesn't seem to output a file.
20:23 shaggy_surfer also trying to get raw or txt formatted output and it seems to only output json
20:24 basepi tedski: for sure.  it definitely breaks backwards compatibility, but that's a good thing i think in this instance.
20:25 tedski basepi: that was my thought, too
20:25 basepi i can't believe someone thought it was a good idea to write their own kwargs parsing.
20:25 tedski i can't believe their pull req was approved :P
20:25 smcquay joined #salt
20:25 basepi it was two years ago, so it doesn't surprise me
20:25 basepi much less process back then
20:25 tedski true
20:26 tedski so, if 12680 is approved, i plan to go back and improve the module to support all modes of mdadm usage (assemble, grow, etc.)
20:26 tedski and corresponding states where applicable
20:26 tedski and i also plan to give it 100% test coverage on the state and module
20:26 Luke__ joined #salt
20:27 tedski meeting time &
20:27 basepi tedski: cachedout says the tests look great, you did a really nice job.  (i asked him to review since I haven't worked with MagicMock yet)
20:28 nrgaway Quick question (I hope).  I am almost done writing a custom renderer named yamlscript.  It has two source files.  One is the renderer I put in _renderers and the other is a utility that is basicly a de-serialilizer.  Where do I put the de-serializer class so it get pushed to minions.  Currently I just also pop it in _renderers; but it does not seem right
20:28 nrgaway I dont want to combine them if I dont need to since they both already large source files
20:28 linjan joined #salt
20:29 nrgaway (one is 700 lines of code the other 1000 lines)
20:31 rojem joined #salt
20:31 Luke__ joined #salt
20:32 nrgaway https://groups.google.com/forum/#!topic/salt-users/m-Q3CKpregw contains a sample of what yamlscript looks like
20:33 basepi nrgaway: just asked around, and we don't have any mechanism for distributing these utilities.
20:34 basepi nrgaway: that said, i can think of a number of different hacky workarounds
20:34 basepi nrgaway: but you should definitely file a feature request.
20:34 nrgaway I do have a work-a-round
20:34 basepi nrgaway: what's your workaround?  curious
20:34 nrgaway try:
20:35 nrgaway import yamlscript_utils
20:35 nrgaway except ImportError:
20:35 nrgaway import os
20:35 nrgaway import salt.config
20:35 nrgaway minion_opts = salt.config.minion_config(
20:35 nrgaway os.environ.get('SALT_MINION_CONFIG', '/etc/salt/minion'))
20:35 nrgaway extmods_renderers = '{0}/renderers'.format(minion_opts['extension_modules'])
20:35 nrgaway sys.path.insert(0, extmods_renderers)
20:35 nrgaway import yamlscript_utils
20:35 basepi hehe, use a gist or pastebin next time.  =)
20:35 nrgaway I put in in the _renderers dir and have the renderer import like that
20:35 savvy-lizzard joined #salt
20:35 nrgaway sorry
20:36 basepi no worries.  ya, that was one workaround i was thinking about, relative imports.
20:36 abe_music if i'm running a pretty complicated overstate, what's the best way to determine which part is currently executing?
20:36 basepi please file an issue -- we should have a straightforward and clean way to distribute these kinds of utilities.
20:36 basepi nrgaway ^
20:37 nrgaway basepi, okay, I will; maybe I will just implement something with the issue since I want the custom renderer available to others
20:38 frasergr_ joined #salt
20:40 gothix if you have multiple environments how to you map states from one environment to another?
20:41 jrdx joined #salt
20:41 mgw joined #salt
20:46 gothix joined #salt
20:46 gothix joined #salt
20:47 ashw7n joined #salt
20:50 saravanans joined #salt
20:50 saravanans hi all,
20:50 saravanans i have a quick doubt,
20:50 snuffeluffegus joined #salt
20:50 Comradephate joined #salt
20:50 saravanans in salt-cloud command - i am able to launch new instances
20:50 saravanans and terminate (destroy) instances
20:50 saravanans but how do i stop (shut-down) instances
20:51 saravanans ?
20:51 saravanans in AWS EC2
20:51 dh joined #salt
20:51 ghartz_ joined #salt
20:51 snuffeluffegus joined #salt
20:53 dh joined #salt
20:54 abe_music saravanans: take a look at the -a argument to the salt-cloud command to perform actions
20:57 abe_music saravanans: i believe the docs are outdated, but this could help you: http://docs.saltstack.com/en/latest/topics/cloud/action.html
20:57 whiteinge saravanans: that is a provider-specific action so you need to use the ``-a`` flag
20:59 nrgaway basepi, Issue submitted -> https://github.com/saltstack/salt/issues/12712
21:00 nrgaway BTW, thanks for quick answer basepi
21:01 basepi nrgaway: no problem.
21:01 shaggy_surfer I cannot get the —output-file or —out-file to output anything with the salt-cloud command
21:01 basepi thanks for filing that
21:01 shaggy_surfer tried all different ways on the command line of passing it.  Behind, in front
21:02 shaggy_surfer should I just use >>ouput.txt
21:02 shaggy_surfer ?
21:03 ahammond joined #salt
21:05 TyrfingMjolnir joined #salt
21:05 Ryan_Lane joined #salt
21:10 uestra joined #salt
21:18 obimod joined #salt
21:20 uestra joined #salt
21:21 snuffeluffegus joined #salt
21:25 lilmatt_ joined #salt
21:26 saravanans joined #salt
21:27 CeBe joined #salt
21:28 TyrfingMjolnir joined #salt
21:29 travisfischer joined #salt
21:29 ashw7n joined #salt
21:33 eliasp any ideas how to get file.recurse to exclude all directories named "_svn"? I couldn't find any working "exclude_pat" pattern…
21:33 shaggy_surfer joined #salt
21:34 shaggy_surfer Hi all,  I am trying to get txt or raw output from the salt-cloud command to pass to my bash script… however, the —output= and —output-file= params don't seem to be working.
21:34 meteorfox joined #salt
21:34 shaggy_surfer I also reference the man page for salt-cloud, but it is outdated.
21:35 shaggy_surfer it appears that the salt-cloud —help has the correct options and they pass but I get json output and no file output
21:35 shaggy_surfer any ideas please?
21:35 ahammond is there a best practice around the handling of firewall rules? I'm on CentOS.
21:35 georgemarshall joined #salt
21:38 manfred ahammond: you have to do fun things like j: i: instead of --in-interface or --jump, because that is how iptables can match the iptables-save output to make sure it doesn't append the rule twice
21:38 Ryan_Lane joined #salt
21:38 manfred ahammond: it is a lot of trial and error, because centos 6 doesn't have -C with iptables
21:38 manfred -C does all teh checking and reordering of the rule, and check if that rule already exists
21:39 ahammond I'd strongly prefer to manipulate files and then trigger a reload
21:39 manfred that works, will also give you better control of them :P
21:39 manfred just jinja templating :)
21:39 ahammond iptables-save strikes me as evil. :)
21:41 ahammond manfred right. I guess what I'm looking for is how to have each formula have it's own firewall rules section. A conf.d approach to /etc/sysconfig/iptables
21:41 ahammond would be ideal.
21:41 manfred that i have no idea
21:41 shaggy_surfer should I report this as a bug?
21:42 manfred shaggy_surfer: did you check if it is working in develop?
21:42 shaggy_surfer I am using stable on ubuntu
21:42 manfred ahammond: that is one thing that I will give ubuntu for ufw, they allow you to provide config files, then you just ufw allow salt, and it knows what to enable
21:42 shaggy_surfer so no I have not.
21:42 manfred shaggy_surfer: see if it is fixed in develop before reporting
21:43 perfectsine_ joined #salt
21:43 ahammond manfred I hate the CentOS ghetto, but that's where we are at work and switching to Ubuntu isn't in the works for now.
21:43 shaggy_surfer I was looking through the bugs on salt-cloud and don't see one… but I will check in the release notes for development, that's the place to look correct?
21:43 manfred shaggy_surfer: don't look at salt-cloud
21:43 manfred shaggy_surfer: salt-cloud is now in salt propper
21:44 manfred http://github.com/saltstack/salt
21:44 manfred so anything you see for bugs should go there
21:44 shaggy_surfer ok thx
21:44 saravanans joined #salt
21:45 utahcon trying to kill a job I get the following error: OverflowError: long too big to convert
21:45 saravanans joined #salt
21:45 utahcon anyone seen that before?
21:45 kermit joined #salt
21:45 manfred utahcon: https://github.com/saltstack/salt/issues/12185
21:46 saravanans joined #salt
21:46 manfred should be fixed in develop
21:47 utahcon thanks manfred
21:47 manfred yw
21:47 mgarfias joined #salt
21:50 whiteinge !modules.file.managed
21:50 * whiteinge looks expectantly at wm-bot4
21:51 manfred wm-bot4: help
21:51 whiteinge hm. that may not be the right bot
21:52 whiteinge Ryan_Lane: ^^
21:52 whiteinge wm-bot5 has been fully seeded (i think)
21:52 Ryan_Lane they're all the same, I think
21:52 Ryan_Lane !help
21:52 wm-bot4 I'm a documentation bot. To control me, please use #salt-bot to avoid channel spam. See this URL for my commands: http://meta.wikimedia.org/wiki/WM-Bot
21:52 Ryan_Lane !wheel.pillar_roots.write
21:52 wm-bot4 http://docs.saltstack.com/en/latest/ref/wheel/all/salt.wheel.pillar_roots.html#salt.wheel.pillar_roots.write
21:52 shaggy_surfer I used the Label look up on github under salt proper and combed through the salt-cloud issues, I don't see any bug relating to output issues.
21:52 pssblts joined #salt
21:53 to_json joined #salt
21:53 manfred shaggy_surfer: did you try the same thing with salt-cloud from develop?
21:53 whiteinge !states.file.managed
21:53 wm-bot4 http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
21:53 * whiteinge facepalms
21:53 Ryan_Lane heh
21:53 manfred lol
21:54 shaggy_surfer I am here:  https://github.com/saltstack/salt  and I clicked on Issues of which there are 1286 of them
21:54 shaggy_surfer isn't this develop?
21:55 manfred did you install salt from teh develop branch and test the command?
21:55 manfred that is what I mean
21:55 shaggy_surfer no, I am using only the stable.
21:56 shaggy_surfer I will need to set aside some time to do that…. right now I am just trying to get the instance id output and pass it to a bash script for creating volumes for the instance.
21:56 Ryan_Lane @info
21:56 wm-bot4 http://bots.wmflabs.org/~wm-bot/dump/%23salt.htm
21:57 shaggy_surfer I am using aws api  since the salt-cloud can't do what I need yet
21:57 shaggy_surfer for volumes that is
21:58 manfred what are you trying to do?
21:58 Ryan_Lane hm. I haven't implemented volumes support for aws yet.
21:59 manfred Ryan_Lane: check the salt-cloud module, should just have to make sure that the driver functions match
21:59 shaggy_surfer I am creating 3 different volumes from snapshots and mounting them as /dev/sdj , /dev/sdk, /dev/sdi for example…. but I need it to do sanity checks and make sure if things fail that it bails
21:59 manfred they work with the openstack novaclient driver
21:59 Ryan_Lane manfred: ah. I've been implementing things as states/execution modules using boto
21:59 jdmc joined #salt
21:59 Ryan_Lane I haven't been linking salt-cloud in at all
21:59 manfred shaggy_surfer: salt-cloud -p ubuntu-8-nova test.gtmanfred.com --output=json
21:59 manfred shaggy_surfer: that works for me
22:00 manfred Ryan_Lane: i just added an extra_action command, to link everything through the salt CloudClient
22:00 shaggy_surfer do output=txt
22:00 elithrar joined #salt
22:00 manfred that works too
22:01 manfred puts it in a different format, just prints out all the json, but doesn't format it
22:01 shaggy_surfer I just want to pipe the output and get the instance id
22:02 shaggy_surfer I used cut and awk but I still have the single quotes around the instance id
22:02 saravanans joined #salt
22:02 shaggy_surfer I thought the txt output would be like raw text
22:02 manfred nope, it outputs like this test.gtmanfred.com: {'Error': 'test.gtmanfred.com already exists under test.gtmanfred.com:my-nova'}
22:02 shaggy_surfer but you're right it's json output differently
22:03 pydanny joined #salt
22:03 manfred shaggy_surfer: i would just write it in python, and use the simplejson library to parse it from stdin, then pass that back to bash
22:03 manfred cause parsing json in bash is a nightmare
22:03 JordanRinke joined #salt
22:03 manfred shaggy_surfer: my guess, is txt is just plaintext version of exactly what is returned by the api
22:04 shaggy_surfer does the output-file=  work for you manfred?
22:04 shaggy_surfer I see, sorry I was confused on what to expect
22:05 shaggy_surfer I was originally trying to save the output to a file w/o having to do cat file >>somefile.txt
22:05 shaggy_surfer then I could grep and pipe the output to get what I wanted later w/o having to keep turning up instances,…. since there doesn't appear to be a dry-run
22:06 smcquay joined #salt
22:06 shaggy_surfer hehe… I don't write much python yet… but I am comfortable in bash… guess it's time :)
22:07 TyrfingMjolnir joined #salt
22:08 tedski shaggy_surfer: you'll find the transition from bash to python to be laughably easy
22:08 shaggy_surfer really?
22:09 manfred yes
22:09 tedski shaggy_surfer: yeah... you can first think of python as a scripting language then move on to object oriented programming
22:09 tedski shaggy_surfer: and that transition path is stupid easy
22:09 possibilities joined #salt
22:09 manfred Ryan_Lane: looks like someone just added functions to the ec2 driver
22:09 shaggy_surfer what are the other output states to print, like "key" or pprint"
22:09 shaggy_surfer cool
22:09 l0x3py joined #salt
22:09 manfred but doesn't look like to boto
22:09 Ryan_Lane manfred: to which one? the boto ones I'm writing, or the salt-cloud ones?
22:10 manfred yeah not the boto ones
22:10 * Ryan_Lane nods
22:10 uestra joined #salt
22:10 Ryan_Lane I'm more than happy for boto functionality to slowly go away if it's replaced with ec2 calls. I think it'll be way quicker to implement everything via boto first, though
22:11 Ryan_Lane it takes me like an hour to a day per servic depending on the complexity of the service
22:11 manfred nevermind, that stuff has been in there for a while
22:11 Ryan_Lane ah. heh
22:12 ipalreadytaken joined #salt
22:12 manfred i don't use ec2, so no idea
22:12 manfred i think it still just needs to be added to work with the functions that are called from the cloud states, and then it should be all set to go to have volume_present and volume_attached
22:12 * Ryan_Lane nods
22:13 manfred if you check the how I called the nova.py driver ones, that is the one that works for openstack with cloud.volume_*
22:13 smcquay joined #salt
22:14 hunter joined #salt
22:15 ifnull joined #salt
22:16 ipalreadytaken joined #salt
22:18 ifnull Anyone get an "ERROR: Option does not exist : F" when trying to bootstrap?
22:18 ifnull https://gist.github.com/ifnull/cecb7e8c635cb92862ef
22:21 yusuket left #salt
22:22 happytux joined #salt
22:22 TyrfingMjolnir joined #salt
22:24 manfred ifnull: curl -F 'f:1=<-' ix.io < /tmp/bootstrap_salt.sh
22:25 ifnull looks like it is missing in the getopt
22:25 manfred ifnull: salt-cloud -u to get the newest bootstrap script
22:25 ifnull appears to be fixed in newer versions
22:25 manfred yar
22:25 ifnull salt-cloud: command not found
22:26 manfred oh, well if you bootstrap the server with salt-cloud, you could update the /etc/salt/cloud.deploy.d/bootstrap.sh with that commend
22:26 manfred command*
22:26 ifnull i'll look into it
22:26 ifnull I'm using vagrant
22:27 ifnull i think it is an issue with the version that is in the most recent build of vagrant
22:27 manfred curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh | sh -s -- -D -F ....
22:27 manfred maybe
22:29 lilmatt joined #salt
22:29 TyrfingMjolnir joined #salt
22:30 ifnull that worked
22:31 ifnull thanks
22:31 ashw7n joined #salt
22:32 manfred ifnull: shortened is http://bootstrap.saltstack.org ... eventually it will have ssl
22:34 ashw7n joined #salt
22:37 forrest meteorfox, are you around?
22:37 meteorfox yes
22:37 meteorfox forrest: ^^
22:38 che-arne joined #salt
22:39 obimod joined #salt
22:49 JordanRinke any of you run state.highstate and randomly get no results? the jobs seem to fire off the the cli doesn't return anything - it just exits
22:52 Gareth I've seen that.  Usually if I'm running the minion in debug mode in tmux and I'm looking back in the buffer.
22:55 rojem joined #salt
23:01 Luke__ joined #salt
23:01 mgw joined #salt
23:04 Luke__ joined #salt
23:06 ajprog_laptop joined #salt
23:08 hunter joined #salt
23:09 hunter_ joined #salt
23:10 Luke__ joined #salt
23:10 uestra joined #salt
23:12 smcquay joined #salt
23:14 david___ joined #salt
23:14 david___ hello
23:14 david___ I am having a issue getting a state to deploy on a minion
23:15 david___ this is my first time setting up salt and seem to be at a impasse as I see nothing in the logs that give me any direction
23:15 david___ I can execute a salt '*' test.ping and get a response
23:16 manfred did you run the state with salt-call state.sls <state> -l debug on the minion? I usually find the errors are more obvious there
23:16 david___ do I have to perform a salt-call
23:16 david___ I thought if I had a roles grain defined
23:16 david___ and in my top.sls had that role defined there that it should auto deploy
23:16 david___ is this a incorrect assumption?
23:17 manfred so
23:17 manfred salt-call is just the salt command to run the same thing from the minion
23:18 manfred salt 'web1.gtmanfred.com' state.highstate
23:18 manfred is the exact same as running salt-call state.highstate on my web1.gtmanfred.com minion
23:18 manfred but you get to see the error messages directly, with -l debug, because it grabs the stuff that would be put in /var/log/salt/minion on the minion, and allows you to override with the -l debug stuff
23:18 manfred so you get more info
23:20 david___ ok that is a interesting error
23:20 david___ Master hostname: salt not found
23:20 jslatts joined #salt
23:21 david___ nvm ran the command from the wrong server
23:21 david___ it appears to be functioning now
23:22 david___ so I do have to execute a command on either the minion or the master to get the states to deploy?  It doesn't do this automatically?
23:22 RandalSchwartz yes
23:23 forrest david___, it can do so automatically, take a look at: http://docs.saltstack.com/en/latest/topics/jobs/schedule.html
23:24 david___ understood
23:25 Outlander joined #salt
23:25 jimklo joined #salt
23:30 manfred can also just do a cronjob :P
23:32 younqcass joined #salt
23:32 vbabiy joined #salt
23:32 forrest yea if you live in manfred's ghetto I guess that's ok :P
23:33 manfred systemd.timer units ftw!
23:33 manfred I want it to run 15 minutes after the last run finishes
23:34 hunter_ joined #salt
23:39 manfred http://ix.io/chI
23:39 manfred systemctl enable salt.timer salt.service
23:39 manfred i guess
23:39 manfred http://ix.io/chJ After=network.target might be usefull
23:40 manfred magic!
23:53 wt joined #salt
23:53 wt hey, can a state file be in more than one level of subdirectory...
23:54 wt e.g. will a.b.blah resolve to salt://a/b/blah.sls?
23:54 wt I am just curious how it works.
23:54 RandalSchwartz I think that works
23:54 wt thx
23:55 anuvrat joined #salt
23:57 manfred it should work
23:57 wt Will that work when including pillar files also?
23:58 otter768 joined #salt
23:59 redondos joined #salt

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