Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-07-29

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

All times shown according to UTC.

Time Nick Message
00:04 jaybocc2 even with --state-output terse is not really enough
00:04 iggy I think outputter is a per state option (as well as global)
00:04 aqua^c joined #salt
00:04 jaybocc2 ok i'll see if it is
00:04 mapu joined #salt
00:05 iggy no_out
00:05 napsterX joined #salt
00:07 murrdoc joined #salt
00:19 b18 joined #salt
00:24 davidone joined #salt
00:24 cberndt joined #salt
00:26 ujjain joined #salt
00:26 ujjain joined #salt
00:26 cryptolukas joined #salt
00:37 breakingmatter joined #salt
00:37 otter768 joined #salt
00:38 smcquay joined #salt
00:39 omegamike joined #salt
00:41 smcquay joined #salt
00:44 breakingmatter joined #salt
00:45 smcquay joined #salt
00:48 smcquay joined #salt
00:49 zer0def joined #salt
00:56 bhosmer_ joined #salt
01:00 jodv joined #salt
01:01 jodv joined #salt
01:03 ayee iggy: how do I configure salt-api to allow auth from everywhere?
01:06 napsterX joined #salt
01:06 drawsmcgraw joined #salt
01:08 drawsmcgraw joined #salt
01:10 bhosmer_ joined #salt
01:18 jaybocc2 joined #salt
01:22 nzero joined #salt
01:28 beauby_ joined #salt
01:38 KyleG1 joined #salt
01:41 DammitJim joined #salt
01:42 beauby_ joined #salt
01:45 breakingmatter joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2015.5.2 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:50 djstorm joined #salt
01:56 cowpunk22 joined #salt
01:57 omegamike joined #salt
01:57 madpenguin joined #salt
02:03 beauby_ joined #salt
02:07 napsterX joined #salt
02:12 napsterX joined #salt
02:19 beauby_ joined #salt
02:23 sunkist joined #salt
02:33 beauby_ joined #salt
02:37 evle joined #salt
02:39 ageorgop joined #salt
02:47 beauby_ joined #salt
02:50 MatthewsFace joined #salt
02:52 Nazca__ joined #salt
02:57 Nazca joined #salt
03:00 Nazca__ joined #salt
03:02 beauby_ joined #salt
03:06 cberndt joined #salt
03:11 bhosmer_ joined #salt
03:18 hasues joined #salt
03:19 hasues left #salt
03:19 favadi joined #salt
03:39 Gabemo joined #salt
03:44 Gabemo joined #salt
03:52 ageorgop joined #salt
03:54 TyrfingMjolnir joined #salt
04:04 jaybocc2 joined #salt
04:07 troyreadyy joined #salt
04:13 flebel joined #salt
04:22 ITChap joined #salt
04:27 cberndt joined #salt
04:28 dankrs joined #salt
04:33 ajw0100 joined #salt
04:35 breakingmatter joined #salt
04:47 ramteid joined #salt
04:51 malinoff joined #salt
04:57 berserkir joined #salt
04:58 bhosmer_ joined #salt
05:00 markm_ joined #salt
05:00 jcockhren ayee: from? as in from any IP address?
05:02 jcockhren that'll be in your firewall settings and/or authorization settings if you have a web server (apache, nginx, etc) in front of salt-api
05:05 ageorgop joined #salt
05:31 catpigger joined #salt
05:33 napsterX joined #salt
05:33 omegamike joined #salt
05:37 cpowell joined #salt
05:38 stanchan joined #salt
05:43 whytewolf so not a fan of who ever decided to change the glance module. they broke backwords compatibility. auth changed. keywords changed. so much of a headache right now
05:43 otter768 joined #salt
05:45 dopesong joined #salt
05:48 joeto joined #salt
05:53 jaybocc2 joined #salt
06:01 khebbie_ joined #salt
06:01 Singularo joined #salt
06:01 TyrfingMjolnir joined #salt
06:04 seena joined #salt
06:04 Singularo Hey guys, is it possible to set grains in the roster file for salt-ssh?
06:05 trikke joined #salt
06:05 seena IIs there any way to check whether a particular user present or not ? . I am basically planning to write a module to backup user home
06:06 sirex joined #salt
06:09 clintberry joined #salt
06:12 gcfhvjbkn joined #salt
06:14 jaybocc2 joined #salt
06:17 AndreasLutro joined #salt
06:21 TyrfingMjolnir joined #salt
06:21 dopesong joined #salt
06:24 breakingmatter joined #salt
06:27 impi joined #salt
06:31 aliuy joined #salt
06:47 bregalad seena: there is the user.present state function
06:47 markm_ joined #salt
06:48 bregalad if you're writing an exec module, `__salt__['user.info'](user_name)` would probably be what you need
06:50 bregalad darn, he left
06:50 bregalad it's currently not possible to set custom grains for ssh minions: https://github.com/saltstack/salt/issues/25713
06:50 saltstackbot [#25713]title: salt-ssh missing custom grains | Due to a firewall snafu, some of my minions lost connectivity to the salt-master today, but I could still ssh from the master to the minion. So I tried to use salt-ssh but discovered that custom grains were missing....
06:52 stephanbuys joined #salt
06:53 AndreasLutro salt-ssh isn't quite meant as a replacement to a master/minion setup
06:53 AndreasLutro its functions are more limited
06:53 Ztyx joined #salt
07:02 bregalad that's true, but it is really great when you need something agentless
07:03 AndreasLutro for sure, I use salt-ssh primarily at the moment, and grains in /etc/salt/grains *would* be a useful thing, but if I were running a master/minion setup I'd probably steer away from using salt-ssh as a replacement
07:04 markm_ joined #salt
07:07 wvds-nl joined #salt
07:07 jaybocc2 joined #salt
07:08 eseyman joined #salt
07:12 Ztyx joined #salt
07:13 kawa2014 joined #salt
07:14 slav0nic joined #salt
07:16 wvds-nl joined #salt
07:21 stoogenmeyer_ joined #salt
07:22 omegamike joined #salt
07:24 Ztyx joined #salt
07:27 MaaT joined #salt
07:28 chiui joined #salt
07:28 MaaT Hi guys, can I use Pillar to identify minions using the command line, just like we do with Grains? For example: -C 'P@mysql.node:true' test.ping
07:28 MaaT ?
07:29 ildiroen joined #salt
07:29 zipkid MaaT: iirc yes, i just don't remember the flag...
07:29 irctc213 joined #salt
07:29 irctc213 how can we see error in the custom module ?
07:30 zipkid MaaT: search 'Compound matchers' (flag J or I)
07:34 Ztyx joined #salt
07:36 colegatron Good morning.
07:36 pcdummy joined #salt
07:36 colegatron Is it possible to set grains to only one minion? I want to set (for example) the minion_role: webserver, but seems I can only send that info to a specific minion though a pillar (matching it in /srv/salt/pillar/top.sls), but not a grain. Is that right or did I misunderstood something on the documentation?
07:36 gcfhvjbkn joined #salt
07:37 linjan joined #salt
07:38 AndreasLutro colegatron: http://docs.saltstack.com/en/latest/topics/targeting/grains.html#grains-in-the-minion-config
07:39 joeto joined #salt
07:40 colegatron AndreasLutro; that means there is no place in the master to set the minion grains and then push them running a state.highstate?
07:40 AndreasLutro colegatron: possibly through using these states http://docs.saltstack.com/en/latest/ref/states/all/salt.states.grains.html
07:42 colegatron oh, inside a state. thank you
07:44 otter768 joined #salt
07:45 Ztyx1 joined #salt
07:48 markm_ joined #salt
07:48 jaybocc2 joined #salt
07:51 irctc213 AndreasLutro: Is there any way to execute the custom salt module before sync
07:53 jmoreau joined #salt
07:55 AndreasLutro don't think so, syncing includes transferring custom modules
07:56 KermitTheFragger joined #salt
07:57 Ztyx joined #salt
08:06 c10b10 joined #salt
08:13 breakingmatter joined #salt
08:14 Ztyx joined #salt
08:15 Xevian joined #salt
08:15 supersheep joined #salt
08:20 markm_ joined #salt
08:22 permalac joined #salt
08:27 keimlink joined #salt
08:28 peters-tx joined #salt
08:34 Mate do you have an idea of automatically increasing the serial of a dns zone file with salt (the zone itself is also managed by salt, generated from pillar data)
08:34 Ztyx left #salt
08:36 Mate ?
08:39 losh joined #salt
08:43 Ztyx1 joined #salt
08:49 Ztyx1 left #salt
08:55 nexus someone has tried to run salt-minion  on solaris 11?
08:56 babilen Be the first!
08:56 nexus I've tried through the opencsw package but it fails
08:56 froztbyte what's a nice clean way to do pillar.get in loops?
08:56 nexus the version there is 0.14.0
08:57 froztbyte since a part of the pillar datapath will be changing, it gets into string manipulation country
08:57 babilen Mate: It would be easiest if you could simply manage the serial as well (as in: explicitly set it). Another idea would be to set the last one as grain, increment that and set the grain to the new value.
08:57 pcdummy joined #salt
08:57 babilen froztbyte: A for loop? http://jinja.pocoo.org/docs/dev/templates/#for
08:58 froztbyte no, like
08:58 froztbyte lemme make an example quickly
08:58 babilen What's wrong with a for loop?
08:58 babilen right, ... /me is patient
08:59 froztbyte https://gist.github.com/froztbyte/76c5681e4fd17a13781a
08:59 froztbyte let's say I had that
08:59 Mate babilen: i came up with the same alternatives
08:59 babilen Okay
08:59 froztbyte {%- for job in salt['pillar.get']('janitor:jobs', {}) %}
08:59 froztbyte {%-   set stuff = pillar['janitor']['jobs'][job] %}
09:00 froztbyte and I do ^ that
09:00 babilen Mate: You could even increase the grain in a state that uses onchanges on the file state ...
09:00 Mate yes, but i have to write the serial to the same place :S
09:00 Mate i.e. the file which changes
09:00 froztbyte now let's say I want to ensure that I do null checks on any sub-part of the pillar (so let's say someone writes a `rm` or whatever, and I want to ensure it doesn't have a dumb base path)
09:01 froztbyte salt['pillar.get']('janitor:jobs:an example:path', '/make/sure/this/exists') would work
09:01 babilen Mate: You would naturally reference the grain in the file.managed state. (make sure you don't get an off-by-one error in there and that you handle the first time the file is managed correctly)
09:01 froztbyte but if I'm iterating? now I need to mush some strings together?
09:02 Mate how would you change the grain? with a python state file?
09:03 babilen froztbyte: I'd iterate over the dictionaries in salt.pillar.get('jobs') and simply look at the value in 'path'
09:03 babilen Mate: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.grains.html (there's a state for that!)
09:03 Mate or grains.present: - value: {{grains["g"]+1}} - onchanged?
09:04 froztbyte babilen: and then just {%- if foo != '' %} type of thing?
09:04 babilen That's, more or less, the idea, yeah
09:04 davidone_ joined #salt
09:04 Mate thanks
09:04 froztbyte that's not too terrible but it feels like my eyes are reading perl glyph soup
09:04 babilen froztbyte: What are you *really* trying to do? What is this used in?
09:04 Mate and than I would have to re-write the serial in the zone file?
09:05 tiadobatima joined #salt
09:05 tachikoma joined #salt
09:05 babilen {%- for job in salt['pillar.get']('jobs', {}) %} .... job.get('path', DEFAULT_VALUE) ... ?
09:06 froztbyte do I get to use .get?
09:06 babilen Mate: No, you would set the serial in the zone file to grain_value + 1
09:06 froztbyte mmm
09:06 froztbyte that'd work far nicer
09:06 froztbyte I guess I do, since it's a dict
09:06 Mate but how would i ever get a clean state then
09:07 babilen You could also do something like {% if job.path is defined %}, but I have no idea what you are really trying to achieve
09:07 froztbyte ja
09:07 babilen Mate: To infinity and beyond!
09:07 Mate :)
09:07 babilen Mate: Good point :)
09:08 aqua^c joined #salt
09:08 froztbyte babilen: the actual problem behind this is a bit dumb
09:08 froztbyte babilen: it's in the direction of housekeeping type of stuff but it's basically a terrible problem to have
09:08 babilen Mate: Use http://docs.saltstack.com/en/latest/ref/states/requisites.html#prereq instead then
09:08 Mate hm
09:08 Mate i forgot about it
09:09 Mate thx
09:09 froztbyte babilen: anyway, thanks, will test those to see which fits nicest for me
09:10 jmoreau joined #salt
09:10 omegamike joined #salt
09:13 babilen froztbyte: If you like to explain we might be able to come up with a nice solution
09:14 Norrland What are the best practices for storing sensitive data in salt? tls-keys, ssh-private keys and so on.
09:14 stoogenmeyer_ joined #salt
09:15 babilen Norrland: You put them in your pillar (so that they are only available to the minions that should see them)
09:16 _JZ_ joined #salt
09:16 babilen For files I typically use a file.managed state with content_pillar set to the pillar in question
09:17 c10b10 joined #salt
09:18 Norrland babilen: mkay. But matching on minion-id or grains would not work as that's possible to exploit on the minion side. How would you suggest that one matches the pillar then?
09:18 mage_ do you guys handle database migrations with SaltStack.. or is it a bad idea ?
09:19 babilen Norrland: You match on minion id, that's perfectly safe (unlike grains)
09:20 babilen (the minion can't change the id without also invalidating its key)
09:21 babilen Or rather: If a minion would like to impersonate another it would also need the private key of that minion.
09:21 xf10e joined #salt
09:21 xf10e morning/tzag everyone
09:22 * babilen is enjoying elevenses!
09:22 Norrland babilen: yeah, trying to figure out how to solve that with minions launched by salt-cloud where I get the ec2 instance-id as minion-id.
09:26 N-Mi joined #salt
09:26 N-Mi joined #salt
09:29 Mate babilen: the idea seems to be nice, but i can't use grains.present, nor .append. they report "changed" status, but i see no traces of persistency between state runs
09:31 AirOnSkin joined #salt
09:32 babilen Mate: How are you setting the grain to begin with?
09:32 babilen And what does "i see no traces of persistency between state runs" actually mean?
09:32 Mate i see no effect of grains.present
09:33 Mate anywhere
09:33 Mate dns-current-serial: grains.append: - value: {{ grains.get("dns-current-serial", 1) + 1 }}
09:34 babilen Shouldn't that be grains.present rather than grains.append ?
09:34 Mate i tried both
09:34 babilen So, do you set other grains?
09:34 Mate no
09:35 toerb joined #salt
09:35 toerb what is the difference between saltstack enterprise and the salt which is on github?
09:36 AirOnSkin Heya. I have a list of roles in pillar for my hosts. Pillar output looks like this: http://hastebin.com/raw/ituvijizel ... In my state I have the following if: http://hastebin.com/raw/cowoporabu ... When I run a highstate with the if condition active the mysql state doesn't run. If I remove it it does run. Would someone know if there's anything wrong with the if condition?
09:37 ThomasJ toerb: It's essentially an older version of salt for stability. Enterprise 4 is around the corner though, based on 2015.5, + the new enterprise gui
09:38 ThomasJ http://saltstack.com/saltstack-enterprise-4-0-now-with-gui/
09:38 AirOnSkin The condition should check if the list is empty or not... because if it is empty, I wouldn't want anything to run (Salt would output an error anyway I think)
09:39 toerb ThomasJ: so its essentially the open source core forked + some proprietary code (the new gui)?
09:39 AndreasLutro AirOnSkin: you only have 1 role, which is not greater than 1?
09:40 ThomasJ toerb: From what I understand yes. + support and other enterprise benefits
09:41 toerb ThomasJ: okay thank you
09:41 ThomasJ http://saltstack.com/saltstack-enterprise-pricing/ gives a basic idea of what you get with enterprise, and http://saltstack.com/saltstack-enterprise-4-0/
09:42 toerb ThomasJ: i hate how companies are never clear of their enterprise things when they have open source in the background
09:42 AirOnSkin AndreasLutro: Hmm... that seems quite obvious (and makes me look stupid) oO ... Do you know if I can define >= in YAML? Otherwise I'll research it...
09:43 ThomasJ Yeah, I don't think there is a straight up comparison page for enterprise vs community
09:44 ThomasJ Aside from the GUI, i believe that enterprise is the same as the community edition of the equivalent version as far as saltstack itself goes
09:44 ThomasJ Think of it as the RHEL vs Fedora
09:45 ThomasJ RHEL is a proven, older version of fedora that remains stable and tested for a long time
09:45 AirOnSkin Oh, I think it's Jinja, not YAML
09:45 otter768 joined #salt
09:46 AndreasLutro AirOnSkin: if you have nothing between the if and the for loop, you don't need the if at all
09:46 AndreasLutro AirOnSkin: also you can just do {% if my_list %} you don't need to do |count
09:48 AirOnSkin AndreasLutro: You mean the for loop takes care of checking if there is something in the list?
09:49 AndreasLutro no, but there is nothing in the list so there will be no iterations
09:50 AirOnSkin Ah, that's what I meant. Wrong choice of words...
09:51 AirOnSkin I just tested it and you're right. The one if condition is obsolete...
09:54 AirOnSkin AndreasLutro: Thanks as always! You're a big help :)
09:55 aqua^c joined #salt
09:58 stephanbuys joined #salt
10:00 Cliph joined #salt
10:00 xf10e joined #salt
10:00 oeuftete joined #salt
10:00 Rkp joined #salt
10:00 IOMonster joined #salt
10:00 IOMonster joined #salt
10:00 honestly joined #salt
10:00 nocturn joined #salt
10:00 nocturn joined #salt
10:00 toerb joined #salt
10:00 tmmt joined #salt
10:00 viq joined #salt
10:01 trikke joined #salt
10:01 g3cko joined #salt
10:01 Dev0n_ joined #salt
10:01 aurynn joined #salt
10:01 MaZ- joined #salt
10:01 Jimlad joined #salt
10:02 breakingmatter joined #salt
10:03 impi joined #salt
10:05 eliasp_ joined #salt
10:06 zz_ashmckenzie joined #salt
10:06 N-Mi joined #salt
10:06 N-Mi joined #salt
10:08 nethershaw joined #salt
10:08 seenae joined #salt
10:08 seenae AndreasLutro: Are you familiar with s3 setup?
10:08 JPaul joined #salt
10:08 AndreasLutro seenae: no
10:10 cryptolukas joined #salt
10:10 NV joined #salt
10:11 ildiroen joined #salt
10:11 omegamike joined #salt
10:15 denys joined #salt
10:15 jaybocc2 joined #salt
10:16 slav0nic joined #salt
10:24 N-Mi joined #salt
10:30 Guest19182 joined #salt
10:30 joeto joined #salt
10:36 ingslovak joined #salt
10:36 soren joined #salt
10:36 Ztyx joined #salt
10:42 fgimian joined #salt
10:52 cryptolukas joined #salt
10:52 calvinh joined #salt
10:53 fredvd joined #salt
10:56 seenae Anyone familier with s3 setup in saltstack ?
10:59 aqua^c joined #salt
10:59 amcorreia joined #salt
11:00 SubOracle joined #salt
11:00 robinsmidsrod joined #salt
11:01 bhosmer joined #salt
11:02 evle1 joined #salt
11:06 permalac joined #salt
11:08 bhosmer joined #salt
11:08 aqua^c joined #salt
11:10 slav0nic joined #salt
11:13 stephanbuys joined #salt
11:14 stephanbuys1 joined #salt
11:14 bhosmer_ joined #salt
11:16 viq joined #salt
11:16 Ztyx joined #salt
11:22 stephanbuys joined #salt
11:26 aqua^c joined #salt
11:27 omegamike joined #salt
11:28 stephanbuys joined #salt
11:30 dkrae joined #salt
11:32 markm joined #salt
11:32 stephanbuys joined #salt
11:35 ladistwo joined #salt
11:36 aqua^c joined #salt
11:36 ladistwo joined #salt
11:37 ladistwo h
11:40 ladistwo joined #salt
11:42 stephanbuys1 joined #salt
11:45 ladistwo joined #salt
11:46 CeBe joined #salt
11:46 stephanbuys joined #salt
11:46 otter768 joined #salt
11:51 jaybocc2 joined #salt
11:52 breakingmatter joined #salt
11:52 omegamike joined #salt
11:53 stephanbuys joined #salt
11:54 epcim joined #salt
11:54 aqua^c joined #salt
12:04 saltuser joined #salt
12:06 fxhp joined #salt
12:06 jaybocc2 joined #salt
12:11 jmoreau joined #salt
12:11 Shirkdog joined #salt
12:12 aqua^c joined #salt
12:12 djdeaf joined #salt
12:14 djdeaf failhard for batch deploy is still not working, although it was released at 2105.2 - any ideas? The ability to stop batch deploy when a state fails
12:16 c10b10 joined #salt
12:21 scottpgallagher joined #salt
12:24 pdayton joined #salt
12:28 icflournoy joined #salt
12:28 xf10e djdeaf: are you talking about orchestration or just running `salt \* -b X ...`?
12:30 saltuser left #salt
12:30 wnkz joined #salt
12:34 xf10e whytewolf: ping
12:35 xf10e whytewolf: as you opened #25814 7 hours ago you're probably not awake anymore...
12:36 icflournoy joined #salt
12:39 supersheep joined #salt
12:39 lompik joined #salt
12:40 supersheep joined #salt
12:42 Niamkik Hi everyone, I use salt-api + cherrypy + reactor (and some custom sls files), I would know it's possible to return some information concerning jobs of events instead of '{"success": true}' standard return?
12:43 eliasp joined #salt
12:44 Niamkik (my question refer to this: http://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html#salt.netapi.rest_cherrypy.app.Webhook.POST)
12:50 ladistwo left #salt
12:52 jalbretsen joined #salt
12:58 DammitJim joined #salt
13:02 furrowedbrow joined #salt
13:02 toerb left #salt
13:05 calvinh_ joined #salt
13:05 TomJepp joined #salt
13:05 pcdummy joined #salt
13:06 racooper joined #salt
13:07 mike25de hi guys ... in a state i have some jinja magic.  i have a variable {%  set myVar=0 %}   and then a FOR loop follows. IS IT possible to update the myVar variable from inside the loop? depending on  acondition inside the loop ... to end up with myVar = 1 ... thanks guys
13:09 TC joined #salt
13:09 c10b10 joined #salt
13:11 calvinh joined #salt
13:12 breakingmatter joined #salt
13:12 TC Greetings All. I was hoping for a bit of assistance on targeting.. albeit a bit inverted from the documentation. I'd like to execute "salt '*' state.highstate", and execute my 'common' on all systems, and execute both 'common' and 'web' on the systems that match the glob rse-web-*
13:13 TC My top.sls file: http://pastebin.com/zX6Cq9TV
13:15 jaybocc2 joined #salt
13:15 AndreasLutro TC: what's the purpose of the "web1" env?
13:15 ThomasJ TC: Had rse-web-* been in the same environment as base, it would be included
13:15 AndreasLutro if you remove that your thing will work fine
13:16 TC @ThomasJ - rse-web-* are properly having common applied
13:16 anotherZero joined #salt
13:16 ThomasJ Ok, but not web then
13:16 TC but they aren't getting the 'web1' ...shall we say... "local" customizations
13:16 TC correct
13:17 ThomasJ I've not worked much with environments, but since you are using hostname matching, why not leave it in the base environment?
13:17 TC well, let's say that my environment is a DNS server and a webserver
13:17 TC I only want to install nginx/apache on the webserver, not the DNS server
13:18 TC but I want my user account on both - as an example
13:18 AndreasLutro why are those environments? you can achieve that with 1 environment and different states for different minions
13:18 jdesilet joined #salt
13:18 teryx510 joined #salt
13:19 ThomasJ Environments are normally used for separating things completely. Ie, production, development, qa
13:19 TC I'm very likely thinking about this wrong
13:19 TC okay, I see. My separation is in the wrong place
13:19 TC That definantly explains why it is behaving this way :)
13:19 ThomasJ Judging from your naming scheme, you want to just remove web1:  and it will work as you intend
13:20 ThomasJ Everything is in the base environment unless you specify it not to be, at which point anything under base: no longer would be applicable to said minion
13:21 ThomasJ If you have a solid naming scheme, hostname matching is all you are going to need
13:21 TC *sigh*
13:21 TC that is so obvious now....
13:21 ThomasJ For more unfortunate naming schemes, nodegroups would likely be a good way to go about it
13:21 TC thank you all
13:21 ThomasJ :)
13:21 bhosmer joined #salt
13:22 djdeaf joined #salt
13:22 djdeaf xf10e: just running salt
13:23 ThomasJ TC: http://pastebin.com/KVJ1DNzC is an example on how i use nodegroup matching
13:24 aqua^c joined #salt
13:24 ThomasJ An the fact that it says pillars on top is because I use the pillar top.sls as a unified top.sls essentially
13:26 madssj can I from the saltmaster list the contents of the salt mine?
13:27 gcfhvjbkn how came there is no way to target minions with pillar data?
13:28 AndreasLutro gcfhvjbkn: what makes you say there isn't?
13:28 gcfhvjbkn my ignorance i guess?
13:28 gcfhvjbkn at least i didn't find a way
13:28 xf10e djdeaf: huh, I thought s/t like this was only possible using orchestration... good to know
13:29 AndreasLutro gcfhvjbkn: http://docs.saltstack.com/en/latest/topics/targeting/compound.html
13:29 ThomasJ gcfhvjbkn: My entire top.sls for states targets only using pillars
13:29 Tecnico1931 joined #salt
13:29 gcfhvjbkn AndreasLutro: oh thanks
13:30 ThomasJ -match: pillar   can also be used for simple pillar matches
13:30 xf10e that's annoying: 2015.5.3 doesn't know about Nitrogen
13:30 perfectsine joined #salt
13:30 gcfhvjbkn ThomasJ: mine too actually, but i have been using jinja for this effect
13:31 jaybocc2 joined #salt
13:31 xf10e but I'm messing up release names again anyway... *sigh*
13:32 ThomasJ I'm planning to dynamically create top.sls from pillar data alone next, so there will only be a single top.sls file to manage and match, leaving everything pillar controlled
13:32 mike25de hi guys ... in a state i have some jinja magic.  i have a variable {%  set myVar=0 %}   and then a FOR loop follows. IS IT possible to update the myVar variable from inside the loop? depending on  acondition inside the loop ... to end up with myVar = 1 ... thanks guys
13:33 Mate why don't you try it?
13:33 xf10e mike25de: no, it's not. Jinja doesn't allow to change a set variable
13:33 mike25de i did .. but it doesn't work
13:33 mike25de ah damn it...
13:34 ThomasJ mike25de: Keep in mind you can use another renderer besides jinja
13:34 c10b10 joined #salt
13:34 xf10e you may want to use the py-renderer instead
13:34 xf10e or just restructure your code. you could set the variable depending on loop.last or something like this
13:34 madssj mike25de: you could try using the do action, that might be able to work. it's basically running the RHS as python
13:35 madssj {% do foo = 1 %}
13:35 madssj should work
13:36 mike25de madssj: thanks man
13:36 mike25de xf10e: thanks
13:37 madssj mike25de: you're welcome
13:37 mike25de madssj:  we used a dict instead of a variable ... so  set myVar = {'key': '0'}
13:38 mike25de and that can be changes seemingly
13:38 mike25de with myVar.update({'key': '1'})
13:38 mike25de thank you all guys
13:42 aqua^c joined #salt
13:43 lrojas joined #salt
13:43 TyrfingMjolnir joined #salt
13:44 scoates joined #salt
13:46 mike25de AndreasLutro: thanks for your comments on the onchanges_in issue i have raised.
13:47 otter768 joined #salt
13:47 mpanetta joined #salt
13:50 c10b10 joined #salt
13:52 aqua^c joined #salt
13:55 nebuchadnezzar joined #salt
13:58 drawsmcgraw joined #salt
13:59 pdayton joined #salt
14:01 aqua^c joined #salt
14:03 djdeaf joined #salt
14:05 nledez joined #salt
14:05 nledez joined #salt
14:06 dude051 joined #salt
14:06 ws2k3 joined #salt
14:06 edulix joined #salt
14:06 vincent_vdk joined #salt
14:07 kaptk2 joined #salt
14:07 dober joined #salt
14:07 dober joined #salt
14:07 beauby_ joined #salt
14:08 garphy`aw joined #salt
14:08 MadsRC joined #salt
14:09 llua joined #salt
14:09 llua joined #salt
14:10 aqua^c joined #salt
14:11 masterkorp hello
14:11 masterkorp how can i query a minion for its environment ?
14:11 Ymage joined #salt
14:12 Rkp joined #salt
14:12 sybix joined #salt
14:14 xf10e which env? like in a shell?
14:15 TooLmaN joined #salt
14:16 masterkorp xf10e: http://docs.saltstack.com/en/latest/ref/states/top.html#environments
14:16 masterkorp the one is set here
14:16 masterkorp i know that you can set the environment: dev on /etc/salt/minion
14:17 coderMe joined #salt
14:17 clintberry joined #salt
14:17 al joined #salt
14:20 pdayton joined #salt
14:21 coderMe_ joined #salt
14:21 tipiak joined #salt
14:22 Twiglet joined #salt
14:22 Heartsbane joined #salt
14:22 coderMe joined #salt
14:22 PrincessZoey joined #salt
14:22 favadi joined #salt
14:23 coderMe joined #salt
14:23 arthurlutz joined #salt
14:23 arthurlutz hi all
14:24 tanta joined #salt
14:24 arthurlutz once some hosts are defined in /etc/salt/roster and accessed by salt-ssh, could it be possible to have them implicitlly called by a master call such as salt '*' test.ping ?
14:24 madduck joined #salt
14:24 coderMe joined #salt
14:26 coderMe joined #salt
14:27 calvinh_ joined #salt
14:27 coderMe joined #salt
14:28 aqua^c joined #salt
14:28 coderMe joined #salt
14:29 kaiyou joined #salt
14:30 coderMe joined #salt
14:31 zmalone joined #salt
14:31 coderMe joined #salt
14:32 bhosmer joined #salt
14:32 coderMe joined #salt
14:33 drawsmcgraw masterkorp: Since 'environment' is just a minion config, you can query the minion for its config values
14:33 drawsmcgraw http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.config.html#salt.modules.config.get
14:33 drawsmcgraw e.g. salt my-minion config.get environment
14:33 chiui joined #salt
14:34 coderMe joined #salt
14:35 TyrfingMjolnir_ joined #salt
14:35 coderMe joined #salt
14:35 pcdummy joined #salt
14:36 cjbarnes18` joined #salt
14:36 coderMe joined #salt
14:37 drawsmcgraw joined #salt
14:37 coderMe joined #salt
14:38 masterkorp drawsmcgraw: going to check that out, thank you.
14:38 cjbarnes18` Hi all, am trying to use environments in my configuration, but am struggling to see how the environments are selected.  Documentation isnt quite diong it for me for some reason.
14:38 wnkz_ joined #salt
14:39 coderMe joined #salt
14:39 cjbarnes18` how do I declare that a given minion should use state files from the dev root
14:40 pcn cjbarnes18`: Did you read this? http://docs.saltstack.com/en/latest/ref/states/top.html
14:40 coderMe joined #salt
14:42 masterkorp drawsmcgraw: can you give me some practical examples, trying this without any success  https://www.zerobin.net/?e4e6700b637a4ea1#TOafXut6A9twW2GPvoz8W6WlAOPTG/GIA12kU/7yO5E=
14:42 coderMe joined #salt
14:43 drawsmcgraw masterkorp: The docs are verbose because they reflect the codebase. What you want is more like this -> salt config.get environment
14:43 favadi joined #salt
14:43 drawsmcgraw i.e. omit the 'salt.modules' part
14:43 drawsmcgraw Also, the error you're seeing is the (very unhelpful) error you see when you try to run a module that doesn't exist
14:43 coderMe joined #salt
14:44 drawsmcgraw It used to actually say something like 'salt.modules.config.get' is not available. Anyone know what happened there? That can be maddening for newbies.
14:44 drawsmcgraw Also masterkorp, you'll need to specify what config parameter you want
14:45 napsterX joined #salt
14:45 coderMe joined #salt
14:45 cjbarnes18` pcn: I have, but what is not clear to me is where the top belongs, it suggests that top files from each env ar joined, does this mean that I can have a top file in my dev root that only has the dev hosts in it?
14:46 masterkorp drawsmcgraw: thank you, that worked
14:46 khebbie joined #salt
14:46 * masterkorp notes that down on his salt quickies evernote note
14:46 drawsmcgraw Sure thing. Working with modules and states is a bit of an art sometimes
14:46 aqua^c joined #salt
14:46 coderMe joined #salt
14:47 drawsmcgraw Aim to be very familiar with those docs. Being able to navigate the state & module docs is a huge legup on using Salt
14:47 masterkorp yeah, placed links on the node
14:47 madssj soo, how would I get the minions ip address in a pillar file?
14:48 coderMe joined #salt
14:49 madssj If I just call salt['network.ip_addr'] I get the address of the master
14:49 coderMe joined #salt
14:50 jim__ joined #salt
14:51 CeBe joined #salt
14:51 coderMe joined #salt
14:52 cowpunk22 joined #salt
14:53 coderMe joined #salt
14:53 SVQTQ madssj, you could try to use the salt-mine to make your ip address available for others than the master
14:54 madssj SVQTQ: Sure, but I just want the minion's own address, but I guess the master, which renders the pillar doesn know that
14:54 madssj ew
14:55 madssj I guess I have to look it up in the mine
14:55 coderMe joined #salt
14:55 SVQTQ Hello guys. I deploy my minions with digitalocean, but my setup uses old api, which will soon be deprecated. I have my token for new api, but I am unsure whether I have to put 'Bearer' in front of the token just like when i make curl calls to new api with the -h option.
14:55 SVQTQ madssj, yes, that is a good approach.
14:56 Brew joined #salt
14:56 coderMe joined #salt
14:57 SVQTQ To answer my own question, no, Bearer should not be in the string.
14:57 debian112 joined #salt
14:57 monkey66 joined #salt
14:58 coderMe joined #salt
14:58 jondonas joined #salt
14:59 coderMe joined #salt
14:59 drawsmcgraw madssj: There's an 'ipv4' grain
15:00 drawsmcgraw And if you lookit the output of 'grains.items', there a a few other options for finding a minion's IP via grain
15:00 madssj drawsmcgraw: of course!
15:00 drawsmcgraw I had to think for a moment too :)
15:00 coderMe joined #salt
15:00 cjbarnes18` pcn: think I've figured out what I was doing wrong.  the top I was expecting wasnt read by master yet ;)
15:00 drawsmcgraw ip4_interfaces is another grain
15:01 madssj then I just have to figure out how to get the private address
15:01 madssj but cool, that is a lot less stupid than having to ask the mine
15:01 madssj now i like salt again
15:01 coderMe joined #salt
15:02 mapu joined #salt
15:02 perfectsine joined #salt
15:03 coderMe joined #salt
15:04 coderMe joined #salt
15:04 aqua^c joined #salt
15:06 coderMe joined #salt
15:06 sdm24 joined #salt
15:07 favadi joined #salt
15:07 coderMe joined #salt
15:08 cjbarnes18` if I have similar folder structures in alternate env, i.e apps/mail, in one and apps/code in another. only one of them is found regardless of the env used for the minion.
15:09 coderMe joined #salt
15:10 coderMe joined #salt
15:10 sdm24 whichever one is listed first in the file roots list
15:11 HappySlappy joined #salt
15:12 coderMe joined #salt
15:12 cjbarnes18` in this test case base only contains a top file, dev and prod have the similar folder structures, and the miniopn reports "No matchins sls found for 'apps.mail' in env 'base'"
15:13 coderMe joined #salt
15:14 cjbarnes18` Ive tried states from either env and none seem to be found
15:14 linjan_ joined #salt
15:14 sdm24 what is the 'base' env set to?
15:14 coderMe joined #salt
15:15 sdm24 try using dev.state or prod.state
15:15 sdm24 ie. salt '*' state.sls dev.ssh to use the ssh state in dev
15:15 sdm24 oh wait seems you are doing that
15:16 erazer joined #salt
15:16 coderMe joined #salt
15:16 cjbarnes18` I'm using salt-call state.sls
15:16 colegatron I am trying to set the highstate on a server but after come changes and pull out my hair I continue getting error "Data failed to compile: ID instalar_nginx in SLS frontal-web1-cfg is not a dictionary". I have a paste bin here: http://paste.ubuntu.com/11960153/ For sure it is something silly, but I can't see it... any clue is welcome
15:17 cjbarnes18` seems env only works for highstate
15:17 iggy colegatron: nginx what?
15:17 iggy colegatron: those are indeed not correct states
15:17 coderMe joined #salt
15:17 pdayton1 joined #salt
15:18 iggy cjbarnes18`: it's saltenv
15:18 colegatron nginx is a state inside nginx/init.sls, why it is not a correct state?
15:18 iggy colegatron: that's not how you include other states
15:18 sdm24 there is no command being sent for the instalar_nginx ID
15:19 coderMe joined #salt
15:20 coderMe joined #salt
15:20 erazer hi
15:21 cjbarnes18` iggy: awesome, thanks.
15:21 colegatron iggy, I'm looking on how to include it in the right way. tnx
15:21 favadi joined #salt
15:21 coderMe joined #salt
15:21 erazer how can i read the content of a config file into a salt variable? will file.get_managed work?
15:22 sdm24 http://docs.saltstack.com/en/latest/ref/states/include.html
15:23 aqua^c joined #salt
15:23 coderMe joined #salt
15:24 coderMe joined #salt
15:24 sdm24 erazer: file.managed will use a source file as a template, and copy over a version to the minion. It won't necessarily "read" the file
15:25 erazer yea thats why i wrote "get_managed"
15:25 iggy OOM
15:25 coderMe joined #salt
15:26 hasues joined #salt
15:26 erazer documentation says "returns the managed file data"
15:26 sdm24 wow I need my coffee this morning
15:26 hasues left #salt
15:27 erazer :)
15:28 sdm24 I'm not sure if {% set Var1 = salt['file.get_managed](/etc/foo/file salt://file ....) %} will work. I think it might theoretically
15:28 soren joined #salt
15:28 erazer file.accumulated can not be fed from a file or?
15:29 pdayton joined #salt
15:30 mikepea joined #salt
15:31 c10b10 joined #salt
15:32 aqua^c joined #salt
15:32 darix can you ask salt wether a file is managed by salt?
15:32 darix on the minion
15:32 iggy not that I know of
15:34 tanta you should put a standard comment block in every managed file
15:34 cjbarnes18` is it possible to put multiline content in states.file.managed contents? Docs ar not conclusive on this
15:35 sdm24 yes you can
15:35 iggy cjbarnes18`: if you mean multiline strings in yaml, yes
15:35 bhosmer joined #salt
15:35 riftman joined #salt
15:36 cjbarnes18` i'm using a varioant of this https://github.com/saltstack-formulas/exim-formula/blob/master/exim/init.sls but getting problems
15:36 ipmb joined #salt
15:36 goki joined #salt
15:36 cjbarnes18` is not formed as a single key dictionary
15:37 repl1cant joined #salt
15:37 DammitJim joined #salt
15:38 dopesong joined #salt
15:39 zsoftich1 joined #salt
15:39 c10b10 joined #salt
15:40 cjbarnes18` https://gist.github.com/CraigBarnesOpusVL/93759a0ff3bd57889516
15:41 iggy ugh, short dec style
15:42 c10b10 joined #salt
15:43 iggy commented
15:45 cjbarnes18` knew it would be something silly, thank you.
15:47 supermike__ joined #salt
15:48 otter768 joined #salt
15:48 [7hunderbird] joined #salt
15:49 whytewolf morning
15:49 whytewolf or what ever timeframe you are are
15:50 aqua^c joined #salt
15:50 khebbie joined #salt
15:50 erazer which datatypes are available in salt and what functions can be used on them, is there some documentation available?
15:52 alemeno22 joined #salt
15:53 xf10e hey whytewolf
15:56 xf10e newer versions of glance have more options than the copy_from one so this parameter will become more complicated in the future anyway
15:56 xf10e but for now I try to make sure the old interfaces will still work for 2015.8
15:58 CeBe joined #salt
16:02 iggy erazer: not sure I follow the question
16:03 erazer i think there are at least lists and dictionaries in salt are there?
16:04 xf10e erazer: anything you can specify in YAML and convert to some python datatype
16:04 iggy yaml, yeah
16:04 xf10e welllllll... you should stay away from dates/time. the YAML-parser chokes on those.
16:05 joeto joined #salt
16:06 erazer and how can i modify these datatypes?
16:07 xf10e modify?
16:07 erazer f.e. append something to a list or thelike
16:08 twodayslate joined #salt
16:08 aqua^c joined #salt
16:09 iggy the jinja docs would be a good start for that
16:09 akitada joined #salt
16:09 erazer ok
16:10 sdm24 erazer:  http://stackoverflow.com/questions/19161093/convert-integer-to-string-jinja would that help?
16:11 snaggleb joined #salt
16:11 snaggleb joined #salt
16:11 Bryson joined #salt
16:12 iggy also, feel free to ask specific questions, but it's hard to give a broad overview of multiple intertwined technologies over IRC
16:12 erazer ok
16:12 erazer thx for the jinja doc
16:12 abele joined #salt
16:13 erazer maybe i can use extension or block assignment for my needs:)
16:13 sdm24 np, I used that method before
16:13 iggy erazer: there are some jinja extensions that salt enables by default
16:14 iggy http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html
16:14 iggy that's some
16:15 iggy notably, salt enables the {% do %} extension
16:15 iggy http://jinja.pocoo.org/docs/dev/extensions/#expression-statement
16:16 iggy so you can use that to alter lists, etc.
16:16 snaggleb_ joined #salt
16:16 wendall9111 joined #salt
16:16 iggy {% for l1 in list1 %}{% do list2.append(l1) %}{% endfor %}
16:16 iggy or whatever
16:17 monkey661 joined #salt
16:19 xf10e whytewolf: I've probably have to fix some pylint-issues but then we'll have #25814 fixed and a state-module for glance in 2015.8!
16:19 whytewolf xf10e: yay!
16:21 moderation joined #salt
16:21 whytewolf xf10e: thank you so much for those changes.
16:21 Akhter joined #salt
16:22 ageorgop joined #salt
16:22 pdayton1 joined #salt
16:23 jaybocc2 joined #salt
16:23 wiqd joined #salt
16:23 OliverMT joined #salt
16:24 erazer ok thanks that is very helpful @ iggy
16:25 erazer i have one more question about file.accumulated
16:25 erazer using the text: |
16:25 erazer i can specify multiline text
16:26 rm_jorge joined #salt
16:26 aqua^c joined #salt
16:26 erazer does all lines need the same spacing in front?
16:27 CaptTofu__ joined #salt
16:27 erazer indents
16:27 sdm24 nope
16:27 sdm24 actually maybe
16:27 gcfhvjbkn joined #salt
16:27 sdm24 I think for my state I checked, the new line is just a long string from the first line
16:27 bbhoss joined #salt
16:28 sdm24 yeah each new line has the same indent
16:28 smcquay joined #salt
16:29 xf10e whytewolf: you're welcome, I have to add this stuff anyway to run tests on our openstack-formula: https://github.com/fraunhoferfokus/openstack-formula ;)
16:29 Heartsbane joined #salt
16:30 smcquay joined #salt
16:30 fllr joined #salt
16:30 JordanRinke joined #salt
16:30 doriftoshoes joined #salt
16:31 aparsons joined #salt
16:31 jodv joined #salt
16:32 vstoniest joined #salt
16:33 dharmab joined #salt
16:34 iggy erazer: yes, indent everything the same... if you are using a variable as the multiline literal, look at the indent filter
16:34 imanc joined #salt
16:34 erazer ok
16:34 erazer thx
16:35 erazer file.accumulated is working now:)
16:35 iggy erazer: ex:    text: |\n        {{ somemultlinevar|indent(8) }}
16:35 simonmcc joined #salt
16:36 kevinquinnyo joined #salt
16:37 erazer i will try that
16:37 gazarsgo joined #salt
16:38 dharmab I'm having an issue with Salt environments. I have a Git repo for my top file with a master branch only, a Git repo for a state with master/test/dev branches and pillar data on my salt master. I can apply the state in the base (salt 'myhost' state.apply mystate) and test (salt 'myhost' state.apply mystate saltenv=test) environments, but dev (salt 'myhost' state.apply mystate saltenv=dev) fails with 'No matching sls found for 'mystate'
16:39 dharmab Running the salt master in debug mode doesn't give any additional information, and I'm not sure why the test branch works but not the dev branch. Any ideas? Thanks
16:39 slav0nic any alternative for copy directory like salt.states.file.copy?
16:40 iggy file.recurse
16:40 iggy !salt states.file.recurse
16:40 saltstackbot http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.recurse
16:40 sdm24 dharmab: in your file roots, is the dev env set to the dev branch>
16:41 slav0nic iggy, ops, tnx missed this
16:41 codekobe joined #salt
16:42 shankar_ngs joined #salt
16:42 dharmab sdm24: I'm using GitFS, which according to the docs automatically maps branches and tags to environments. I haven't defined a test or dev environment in my master config.
16:42 slav0nic iggy, source can be only salt:// on salt-master :\
16:43 iggy I think there's a rsync module, but not a state
16:44 LyndsySimon joined #salt
16:44 aqua^c joined #salt
16:44 sdm24 dharmab: maybe check the gitfs whitelist and blacklist? http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#environment-whitelist-blacklist
16:45 sdm24 I just set up gitfs but I'm not having that issue. I do only have 2 branches though
16:45 fllr Anyone else having issues installing salt onto ubuntu 12.04?
16:45 fllr Using the bootstrap file?
16:46 masterkorp Quick question about environments
16:47 EWDurbin joined #salt
16:47 masterkorp When using gitfs, does salt try to use the master branch of the formula repository if the "dev" branch does to exist
16:47 masterkorp ?
16:47 jaybocc2 anyone know when salt 2015.5.3 will be packaged and released in the deb repos?
16:48 dharmab The whitelist and blacklist were not defined in the master config, and whitelisting base test and dev did not fix the issue.
16:48 bhosmer joined #salt
16:49 sdm24 jaybocc2: I am wondering the same thing. I checked yesterday and it seems master and upstream were updated. Hopefully that means its coming soon
16:50 snarfy joined #salt
16:51 sdm24 dharmab: on the master try "salt-run fileserver.files_list saltenv=test backend=git"
16:51 sdm24 http://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.fileserver.html#salt.runners.fileserver.file_list
16:52 dharmab sdm24: mystate/init.sls appears in the lists for both the test and dev environments
16:53 sdm24 so salt can at least see the file
16:56 _Cyclone_ joined #salt
16:58 OGuilherme joined #salt
16:58 xf10e another TODO to remove and then I'm done for today...
16:59 dharmab I'm going to head to lunch, but I'll pop back if I figure anything out
17:03 aqua^c joined #salt
17:05 tcolvin joined #salt
17:05 theologian joined #salt
17:07 jodv joined #salt
17:07 jalbretsen joined #salt
17:09 ashb joined #salt
17:11 ildiroen joined #salt
17:12 aqua^c joined #salt
17:12 iggy who is genuss?
17:12 aboe joined #salt
17:15 jness joined #salt
17:15 xf10e someone tasty I assume ^^ (Genuss is enjoyment or a treat in German)
17:16 jness hello everyone. I'm having a issue with the git.latest and 'rev' not checking out the branch.
17:19 markm joined #salt
17:19 pipps joined #salt
17:20 jaybocc2 try always_fetch? force?
17:21 aqua^c joined #salt
17:21 forrest joined #salt
17:21 jness I have '- always_fetch: True'
17:22 jness looks like this: https://gist.github.com/jness/04a6f66a282ae153420f
17:23 jness I've also tried deleting the path, and re-running the state.
17:23 jness always sets to the Github default branch
17:25 _JZ_ joined #salt
17:25 PredatorVI joined #salt
17:25 jness I'll give force a try.
17:26 jness '-force: True' is giving same results.
17:30 aqua^c joined #salt
17:30 ajw0100 joined #salt
17:32 ageorgop joined #salt
17:32 ekkelett joined #salt
17:32 ekkelett joined #salt
17:33 pdayton joined #salt
17:35 dopesong_ joined #salt
17:37 cowpunk22 joined #salt
17:37 N-Mi joined #salt
17:38 pdayton joined #salt
17:39 aqua^c joined #salt
17:40 jkleckner joined #salt
17:43 jkleckner joined #salt
17:45 FreeSpencer joined #salt
17:46 FreeSpencer Do I have to install additional dependencies if I want to use linux_sysctl?
17:46 FreeSpencer I keep on getting 'State linux_sysctl.persist found in sls secret is unavailable'
17:47 asoc So I am trying to get salt running on an AIX box. I got it all built and running but it doesn't seem to be connecting to the master. The logs show that it is attemping to authenticate with the salt master over and over but it never shows any errors nor does the master recognise that it is trying to connect.
17:47 asoc When using trace logging I get this as well. 'ip' could not be found in the following search path:
17:48 asoc Is that something that could be causing an issue when trying to connect?
17:48 xf10e FreeSpencer: I think you should just use `sysctl.persist` as that's the name of the virtual module linux_sysctl provides
17:48 druonysus joined #salt
17:48 druonysus joined #salt
17:48 asoc Network seems fine since I can ping and ssh to the salt master and there should be no other firewall anything between the two boxes.
17:49 otter768 joined #salt
17:49 FreeSpencer Nope :(
17:49 xf10e asoc: sounds like it's trying to exec the linux-binary `ip`
17:49 markm joined #salt
17:50 asoc xf10e: yea. There are a few other things like lspci and dmesg that aren't on AIX that affect grains accuracy
17:50 asoc do you know if having ip will affect some thing it does during connection?
17:50 asoc *not having*
17:51 xf10e FreeSpencer: I don't see a "linux_sysctl" in the dir salt/states: https://github.com/saltstack/salt/tree/2015.5/salt/states
17:51 asoc I was hoping that those messages would be similar to the ones about lspci in that they would just affect grains.
17:52 asoc But I am not sure.
17:52 FreeSpencer xf10e I was looking here http://docs.saltstack.com/en/latest/ref/states/all/index.html
17:52 xf10e asoc: I guess it's trying to figure something out, would need the file and line of the code to figure out what it's trying to do
17:52 pipps joined #salt
17:52 khebbie_ joined #salt
17:52 xf10e FreeSpencer: so you're running latest develop?
17:53 xf10e but there's also no 'linux_sysctl'...
17:53 lrojas clear
17:53 breakingmatter joined #salt
17:54 asoc Yea that is what I figured. Is there a good way to get that? I am not familiar with the connection/low level side of salt.
17:55 FreeSpencer I was looking in modules actually :p
17:55 FreeSpencer Thats why
17:55 xf10e FreeSpencer: maybe you want 'sysctl.present'? I guess the 'linux_sysctl' you're looking at is this exec-module: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.linux_sysctl.html#module-salt.modules.linux_sysctl
17:55 KyleG joined #salt
17:55 KyleG joined #salt
17:55 FreeSpencer Yeah thats what I was trying with no luck
17:56 supersheep joined #salt
17:56 xf10e asoc: well with log_level = trace you should get enough info to figure out where in the code it's looking for `ip`
17:57 xf10e FreeSpencer: on the commandline you can use sysctl.persist, in a state you need to use sysctl.present
17:57 djdeaf joined #salt
17:58 FreeSpencer Alright thanks xf10e! Im reading up more on the differences between execution and state modules
17:58 xf10e oh comon jenkins.saltstack.com... I just want to know wether my PR is acceptable and head home
17:58 xf10e FreeSpencer: good luck ;)
18:00 asoc xf10e: That is how I am running it. here is the log block that just repeats itself
18:00 xf10e an exec module you just tell "set X to Y!", a state module you tell "I want X to be set to Y (and report back if had to change something)"
18:00 asoc https://gist.github.com/AsocPro/a33cf3e7c56cea58fe4d
18:00 breakingmatter joined #salt
18:01 lrojas hi, can someone help me figure out why my vagrant environment being provisioned with salt is failing? here is my environment and error: http://pastebin.com/Nj29HvK7
18:02 FreeSpencer Just curious, why do they have the seperation from the execution and states? I couldnt find anything on the history of that
18:03 xf10e asoc: which version are you running?
18:03 asoc lrojas: 2015.5.0
18:03 lrojas asoc: ??
18:03 asoc I mean xf10e
18:03 asoc lrojas: sorry
18:03 lrojas hehe
18:04 lrojas still wont somebody take a look ? somebody must be using salt + vagrant here
18:04 xf10e FreeSpencer: mostly abstraction. you build state modules on top of exec modules. in the exec modules you handle all the low-level stuff like... figuring out what to do on OS foo
18:05 asoc lrojas: There is an option that you can add to your vagrantfile to add salt bootstrap options
18:05 asoc it looks like you would add a -P and it should do the trick
18:05 asoc Let me see if I can find it.
18:06 Corey I'm surprised we're still having to use Chris Lea's stuff for that.
18:06 asoc https://docs.vagrantup.com/v2/provisioning/salt.html
18:06 xf10e asoc: I think that's the function producing the TRACE logging: https://github.com/saltstack/salt/blob/v2015.5.0/salt/utils/__init__.py#L399
18:06 asoc lrojas: bootstrap_options is the option you would want
18:07 xf10e there: https://github.com/saltstack/salt/blob/v2015.5.0/salt/utils/__init__.py#L460
18:08 lrojas asoc: thanks
18:09 lrojas asoc: let me try it
18:09 tanta_g joined #salt
18:12 xf10e asoc: hm, your right, that's just something with grains... traced it back to https://github.com/saltstack/salt/blob/v2015.5.0/salt/loader.py#L426
18:12 aparsons joined #salt
18:13 xf10e can you telnet or nc 10.0.0.4:4506 ?
18:13 xf10e just to make sure TCP works?
18:13 CeBe joined #salt
18:13 asoc yea I tested that with nc
18:13 asoc it does connect
18:14 asoc you are faster at tracing it back than me. I was looking to see what called it as well.
18:16 xf10e the function running the log.trace() with your message was only called in one or to places so it was easy to follow ;)
18:16 fyb3r joined #salt
18:17 asoc I didn't know what to try to send with nc to see if I could get the master to respond with at least something
18:18 xf10e but I also had to wade through much more complicated OpenStack python code to figure strange things out
18:18 xf10e you probably can't just make up something to send via nc as it's ZMQ over an encrypted channel...
18:18 forrest openstuck you mean /troll
18:19 asoc Yea I have done very minimal python stuff. Working with Salt has been helping me get more used to it
18:19 asoc That makes sense.
18:19 xf10e asoc: same for me ^^
18:20 xf10e but I started digging into Salt ... 3 and a half years ago I think
18:20 arnoldB => feb 2012
18:21 asoc That is quite a bit longer than my probably three and a half months or so :-P
18:21 arnoldB xf10e: will you attend on the next cfg mgmt camp/ FOSDEM next year?
18:21 xf10e arnoldB: well, it was quite a bit before 2014-02 ^^
18:21 bhosmer joined #salt
18:21 xf10e next year? might be.
18:22 xf10e for this year it's SaltTraining in Paris and EuroBSDcon 2015
18:22 arnoldB xf10e: tom and dave were there, was quite nice to see them IRL :)
18:22 xf10e :)
18:23 jkleckner joined #salt
18:23 xf10e I don't think those jenkins job will finish today, I'm out
18:23 xf10e bye everyone
18:23 asoc xf10e: thanks for your help. I will see if I can find some other network something that can maybe show me some better info of what is going on.
18:23 xf10e asoc: good luck!
18:25 murrdoc joined #salt
18:25 aw110f joined #salt
18:33 aparsons_ joined #salt
18:34 DammitJim joined #salt
18:36 perfectsine joined #salt
18:36 lrojas sorry to be a pest...
18:36 lrojas can someone tell me why this is failing : http://pastebin.com/b78tmsBN
18:37 lrojas while doing bootstraping
18:38 X67r joined #salt
18:42 jaybocc2 jness: i want to say yaml booleans need to be TRUE or true, not sure if True is parsed, probably but ya never know.
18:44 MindDrive This is getting very irritating... I had one of my Salt masters that had exhausted the inodes in / (hundreds of thousands of files in /var/cache/salt/master), and after removing all the files and restarting the master, most of my 'salt' and 'salt-run' commands are not completing, but hanging indefinitely.
18:44 forrest lrojas: Here's an example of what my vagrantfile looks like: https://github.com/gravyboat/demo-app-1/blob/master/Vagrantfile
18:44 jaybocc2 jness: http://www.yaml.org/spec/1.2/spec.html#id2803629
18:44 MindDrive (I'll get some output, but then it will just sit there until I Ctrl-C the process.)
18:45 forrest Did you start the process in debug mode already MindDrive?
18:46 soren joined #salt
18:48 jaybocc2 lrojas: is your /Users/me/vagrant/project/salt/minion have appropriate permissions? are you using a custom vagrant box or a third party box?
18:51 MatthewsFace joined #salt
18:52 MindDrive forrest: Yes, and only thing unusual I'm seeing is an exception which can be seen here: http://paste.pound-python.org/show/qKxNCrgvhFOyFRFUvSd6/
18:53 forrest weird
18:53 MindDrive Something's wrong with the Salt master, because it's chewing through inodes again and it's the only one out of six masters doing so.
18:53 MindDrive I guess I could rebuild the host, but I'm not sure that will actually solve the problem.
18:54 tanta_g joined #salt
18:57 druonysus joined #salt
18:57 druonysus joined #salt
18:58 pdayton joined #salt
18:58 lrojas jaybocc2: apparently i stumbled uppon a bug -- https://github.com/mitchellh/vagrant/issues/5973
18:58 saltstackbot [#5973]title: Salt provisioner fails to upload minion config | Ran into a problem in 1.7.3 doing a vagrant up using a trusty64 box with a salt provisioner specifying a custom minion_config. This is the error:...
18:58 amcorreia joined #salt
18:59 pdayton1 joined #salt
18:59 bhosmer joined #salt
18:59 Matthews_ joined #salt
18:59 cowpunk22 joined #salt
19:04 pdayton joined #salt
19:06 pcn lrojas: 1.7.3 and 1.7.4 are broken for me
19:06 scoates joined #salt
19:06 pcn lrojas: have you tried 1.7.2 ?  That's the last version I can get through a salt provisioning session with.
19:07 phx is it possible to do a conditional state, like "if there's this service on the system, then disable it"
19:07 lrojas at the end of the bug thread there is a nice workaround
19:07 lrojas trying it right now
19:08 lrojas pcn: here is my current vagrantfile http://pastebin.com/eUFvJcSh
19:10 pcn The highstate runs for you?
19:11 napsterX joined #salt
19:12 lrojas i had a typo, trying again
19:12 lrojas will keep you posted
19:13 dthom91 joined #salt
19:13 kossy joined #salt
19:13 cberndt joined #salt
19:13 InAnimaTe joined #salt
19:15 supersheep joined #salt
19:15 pdayton1 joined #salt
19:16 FreeSpencer hrmmm now I get State mysql_user.present
19:17 FreeSpencer But that is a state
19:17 FreeSpencer found in sls secret is unavailable
19:17 kula joined #salt
19:19 pdayton joined #salt
19:19 lrojas hmm, i think i have a problem
19:20 lrojas the shell, inline: thing needs to be run after the salt minion is installed...
19:21 lrojas but i think the salt provisioner is trying to run with the default minion config file and that's causing the hightstate to hang
19:22 pdayton joined #salt
19:25 pdayton1 joined #salt
19:27 iggy phx: yes, but there are usually better ways to handle those situations
19:29 aboe joined #salt
19:32 pcn lrojas: would you consider 1.7.2?
19:36 pdayton joined #salt
19:37 phx iggy, like? it's a pretty twisted situation
19:38 sdm24 phx: are you just checking if a service is installed? or running?
19:38 iggy phx: i.e. you are targeting the minion to install the service somehow... use that same targeting to do the service operation
19:38 phx iggy, basically colleage has deployed puppet all over the place, including my sandbox where i'm playing with saltstack. and he's pushing config that's messing the whole sandbox up. so if there's a puppet, i have to disable the service
19:38 phx iggy, i do _not_ want to install it
19:39 iggy oh, yeah, moronic coworkers is a decent excuse for using dirty hacks
19:39 phx that's why i've asked for a conditional state :)
19:40 iggy {% if salt['file.exists']('/etc/init.d/puppet') %}.... your state .... {% endif %}
19:40 forrest phx: Just use salt to uninstall puppet, BOOM
19:40 iggy ^
19:40 murrdoc or
19:40 murrdoc execute puppet runs with salt
19:41 sdm24 or an -onlyif: test -d /etc/puppet or whatever directory puppet uses
19:41 forrest murrdoc: No way, overwrite the puppet executable with a symlink to salt.
19:41 napsterX joined #salt
19:41 forrest And tell him to get off your sandbox with his crotchety old garbage.
19:41 murrdoc forrest:  u crazy
19:41 murrdoc http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.puppet.html
19:41 forrest murrdoc: 0 fucks given, you enter my sandbox and overwrite what I'm working on? Be prepared to get your shit wrecked.
19:41 pdayton joined #salt
19:41 murrdoc what the fuck ?
19:42 murrdoc haha
19:42 forrest I'd repro the box and remove his access.
19:42 murrdoc i have no context
19:42 forrest get your own sandbox.
19:42 forrest phx was saying his coworker deployed puppet onto his sandbox and was screwing up his salt work
19:42 murrdoc oh
19:42 forrest murrdoc: ^
19:42 murrdoc OH
19:42 murrdoc yeah fuck him
19:42 forrest ++
19:42 forrest That's just rude
19:42 murrdoc salt '*' puppet.disable 'get your own Box'
19:43 MatthewsFace joined #salt
19:43 forrest lol
19:44 forrest I didn't even know that existed murrdoc, shows how often I work with puppet.
19:44 geekatcmu there is also salt.states.chef, but no salt.states.cfengine
19:44 forrest Did anyone ever work on a puppet -> salt converter?
19:45 forrest would be nice to have
19:47 phx thanks guys, wil check that after food
19:47 murrdoc forrest:  its not easy to do
19:47 forrest murrdoc: I know it isn't
19:47 forrest thus why I haven't done it
19:48 murrdoc its easier to re write into salt
19:48 lrojas pcn: i dont want to mess around with 1.7.2 but feel free to check my post ( that has the whole project ) on the github bug thread
19:48 forrest murrdoc: Oh yeah I agree, but it would be a nice selling point
19:50 otter768 joined #salt
19:52 iggy a rosetta stone kind of doc would be nice thought
19:52 iggy like how would you install nginx and set it to start on boot in salt, puppet, chef, etc.
19:55 bhosmer_ joined #salt
19:56 lrojas exit
19:56 pdayton1 joined #salt
19:58 CeBe joined #salt
20:01 twork +1 rosetta stone. speaking as someone who's done a lot with bcfg2, horsed areound with chef and (yuck) puppet, a lot of my trouble getting started on salt has been unwiring what i learned elsewhere. a translation cheat sheet would be wonderful.
20:02 twork chop chop.
20:03 twork i'll wait here.
20:05 aparsons joined #salt
20:05 jodv joined #salt
20:13 markm joined #salt
20:13 aqua^c joined #salt
20:14 jness thanks jaybocc2, I got it working with True (python booleans). had a issue with a stale NFS mount
20:14 bhosmer joined #salt
20:14 jaybocc2 nice
20:14 khebbie joined #salt
20:27 jodv joined #salt
20:27 lompik joined #salt
20:31 aqua^c joined #salt
20:32 bhosmer joined #salt
20:32 druonysus joined #salt
20:33 ahale joined #salt
20:35 dendazen joined #salt
20:41 napsterX joined #salt
20:42 murrdoc how do i call a runner ina  state
20:42 murrdoc please help
20:42 murrdoc <3
20:46 sdm24 if I am using one gitfs with a master branch and testing branch, how can I make my testing salt-master use the testing branch by default, while the production salt-master uses master?
20:47 sdm24 I guess just on the testing environment, set the git-base to testing
20:49 aqua^c joined #salt
20:50 sdm24 yep that did it. now it has "base" and "master" gitfs environments
20:51 iggy you can also set the default environment in the minion config
20:53 soren joined #salt
20:53 Brew joined #salt
20:54 babilen murrdoc: http://salt.readthedocs.org/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.runner
20:55 TyrfingMjolnir joined #salt
20:56 aparsons_ joined #salt
20:57 forrest readthedocs, booo
20:57 PredatorVI Can anyone shed some light on when to use 'prereq' vs 'onchanges'?  I'm trying to setup a state that will shutdown tomcat7, clean the old war/logs/work folders, update the war/config and restart tomcat, but ONLY IF the war file or config (properties) file changes.   Any pointers?
20:58 babilen forrest: Tell google :)
20:59 aqua^c joined #salt
20:59 forrest babilen: I'll add it to my 'work I do for free' list
20:59 forrest right underneath.... : All the work I already do
20:59 forrest babilen: ;)
20:59 babilen http://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html <- nicer, no RTD version :)
20:59 forrest I was really just joking babilen, sucks it is still there though
21:00 forrest But I'm also very anti-rtd
21:00 murrdoc so its
21:00 murrdoc salt.runner ?
21:00 jodv joined #salt
21:01 babilen saltmod.runner is the state
21:02 babilen so, i'm off .. see youtomorrow morning
21:02 murrdoc i mean there are no examples on the stupid docs page
21:02 murrdoc but it will be salt.runner
21:02 murrdoc rtfc ftw
21:04 forrest murrdoc: Once you figure it out you should add one
21:04 forrest or at least create an issue and paste one in so someone can add one
21:05 murrdoc stop making sense forrest
21:06 forrest Sorry
21:06 napsterX joined #salt
21:06 murrdoc :)
21:06 forrest I only have 97 issues, slacking
21:07 alemeno22 joined #salt
21:08 aqua^c joined #salt
21:10 pdayton joined #salt
21:12 repl1cant joined #salt
21:16 iggy !salt states.saltmod.runner
21:16 saltstackbot http://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.runner
21:17 aqua^c joined #salt
21:20 jalbretsen1 joined #salt
21:22 pcn The test script I mentioned last week is out there now: https://github.com/librato/salt-state-test
21:23 jmoreau joined #salt
21:23 jmoreau_ joined #salt
21:25 kevinquinnyo joined #salt
21:26 kevinquinnyo within an orchestration, if I target using a glob, like '*', is it possible to make the execution order procedural?  (one-by one) instead of concurrent?
21:27 kevinquinnyo i know i can do this if i target each one individually, but when matching a group, the state seems to execute concurrently on all server that match the tgt glob
21:28 pdayton1 joined #salt
21:30 whytewolf kevinquinnyo: https://github.com/saltstack/salt/issues/12556 an open issue about adding batch into orchestation. that might help. [still open so currently no it doens't work]
21:30 saltstackbot [#12556]title: [Feature Request] Batch mode in orchestrate runner | It would be good to have the batch mode in orchestrate runner's "state specifications"....
21:30 perfectsine joined #salt
21:31 kevinquinnyo whytewolf: ok will do -- i wonder, do you know of a good workaround?  The hosts in a particular cluster setup are not known at all times as the cluster is scaled horizontally
21:31 kevinquinnyo so i can't hardcode them all
21:33 whytewolf well. one of the sugestions in the ticket is to run everything through cmd.run on a minion on the master. with -b
21:33 whytewolf not ideal.
21:34 omegamike joined #salt
21:36 keimlink joined #salt
21:39 c10b10 joined #salt
21:40 c10b10_ joined #salt
21:41 c10b10 joined #salt
21:42 jmoreau joined #salt
21:45 twork i am confused. i have a mysql state, and i want it to restart the daemon when it changes something but not otherwise. i have: https://gist.github.com/mjinks/7f3049bb86de475d8937
21:45 twork currently, every time i call for highstate, it restarts its service.
21:46 twork i guess that's fine with something like mysql but the day will dawn when i really want restarts to happen only when necessary.
21:50 whytewolf twork, instead of mod_watch add a watch section to your service.running
21:50 whytewolf also you are not watching anything. your mod_watch is always returning true [hence the restart] you need sig to know what to watch for
21:50 twork '-watch: mysql'?
21:50 otter768 joined #salt
21:51 iggy yeah, that's the oddest state I've ever seen
21:51 twork well, it is guess work
21:51 iggy it shouldn't be
21:51 nzero joined #salt
21:51 twork i concur!
21:51 iggy there are _literally_ tons of examples of how to restart a service in response to something else
21:52 iggy what is running under service.running?
21:52 iggy I'm surprised Salt doesn't complain about that
21:52 whytewolf in our example twork, it would be - watch: \n    - pkg: mysql-server
21:52 twork what's running...? mysql is.
21:53 fgimian joined #salt
21:53 whytewolf twork shouldn't that be mysqld? [aka the name of the service]
21:53 iggy there is not a running arg to the service.running state
21:53 twork whytewolf: nope.
21:54 twork -rwxr-xr-x 1 root root 5437 Apr 17 16:50 /etc/init.d/mysql
21:54 whytewolf iggy. one of the benafits of kwargs that are never checked for extra flags.
21:54 fgimian joined #salt
21:55 iggy you probably want salt to manage the config file for you, then restart the service when the config file changes
21:56 whytewolf what gets me is the fact that there is an example at the top of the salt.states.service
21:56 iggy !salt states.service
21:56 saltstackbot http://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html
21:57 twork agh. i knew i'd seen such.
21:57 twork been looking most recently in modules. which i begin to understand is wrong.
21:58 whytewolf ahh the exacution modules vs the state modules. always throws so many people off
21:59 alemeno22 joined #salt
22:00 twork yeah, and i was pretty sure i'd gotten this right somewhere else, not so long ago...
22:01 whytewolf you will have it memorized by the time you write 20 or so states
22:02 twork getting there, on other fronts.
22:02 Bryson joined #salt
22:07 napsterX joined #salt
22:10 coval3nce joined #salt
22:11 basepi Salt Lake City SaltStack Meetup tomorrow! http://www.meetup.com/SaltStack-user-group-Salt-Lake-City/events/223996369/
22:12 coval3nce Does there happen to be a way to create a managed yaml file where its contents are completely managed in pillar data (and indent spacing of yaml is honored in the output)
22:14 coval3nce using “|yaml()” jinja filter seems to strip whitespaces from lists
22:15 twork so here's a pattern i've seen a couple times, and do not understand. in states.service, the entry "mod_watch" ...gets called as "-watch"?  i've got to be missing something.
22:16 twork also in that section, there's an example that refers to '- reload', but no description for it, and (it seems) other stuff that the entry doesn't cover.
22:19 iggy twork: I've been working with Salt for a while now and never used mod_watch directly (and never heard of anyone doing so either)
22:20 iggy mod_watch is a custom function for some states that overrides the default watch behavior
22:20 twork fair enough but from reading that entry how would i know that mod_watch is wrong, but watch is what i really want?
22:20 iggy reading what entry?
22:20 aqua^c joined #salt
22:21 iggy you mean the example in the docs that says absolutely nothing about mod_watch?
22:21 breakingmatter joined #salt
22:21 twork !salt states.service
22:21 saltstackbot http://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html
22:22 twork the one you linked
22:22 twork ...which, i've read before and been confused by
22:22 iggy I may sound a little snarky, but I'm genuinely trying to figure out how you came to the conclusion that mod_watch was what you wanted
22:23 twork no no, i really do believe that i'm being thick somehow.
22:24 sdm24 to be fair, 'watch' just has a small little section
22:24 iggy fwiw, there's a lot of stuff in the module reference docs that you can completely ignore
22:24 iggy http://docs.saltstack.com/en/latest/ref/states/requisites.html
22:25 iggy talks about watch/listen/etc
22:27 markm joined #salt
22:27 twork okay, there we go. i've been to that section before. thought i'd followed that "Requisites" link in the services entry and hit a dead end, but no, that's where i needed to go.
22:28 twork i am catching on that there's a lot in the refs that i can ignore but not quite how to tell which is which.
22:28 debian112 joined #salt
22:29 twork time.
22:29 iggy I hesitate to say this as it can go way overboard, but if there's not an example, ignore it
22:30 twork i've said previously that when there are examples, i wish there'd be more than one. it's hard to distinguish what's the info and what's filling in the space around the info, if that makes sense.
22:31 twork when i see 'foo', i know what that means. when i see, oh, 'apache', i don't necessarily.
22:32 sdm24 or like how every example for a service.running is watch: - file, but you don't know what other requisites/modules you can do
22:32 twork yes
22:35 iggy patches welcome
22:35 twork i keep promising myself that i will.
22:36 iggy salt is unfortunately at that point where once you get over the initial hurdles, you don't really have the ability to look back and think "what tripped me up"
22:36 twork we'll see, once i have something more than thrashing to contribute
22:36 iggy at least for me
22:36 twork yeah, so i perceive
22:37 tiadobatima joined #salt
22:38 twork it's also so vast, 'more than one way to do it', i get the impression that examples can expand like elephant meat
22:38 twork (the more you chew, the bigger it gets.)
22:38 iggy that's a strange idiom
22:39 jonher joined #salt
22:39 aqua^c joined #salt
22:39 iggy but yeah, you can easily get out of control with examples
22:39 iggy have you looked at the example states?
22:39 twork probably...
22:39 iggy https://github.com/SS-archive/salt-states
22:40 twork ...no!
22:40 twork thanks.
22:40 iggy not quite as complex as some of the formulas, but easier to understand
22:40 twork i've found a couple formulas really useful, but yeah, they are big.
22:41 twork and hard to bring down to earth sometimes. 'just tell me how to...'
22:41 iggy there are people that eschew formulas completely and just hard code all of their formulas
22:41 jaybocc2 every 5 minutes my salt-master runs salt \* state.highstate
22:42 jaybocc2 randomly, a code push will trigger a state.highstate against a targetted group of minions
22:42 sdm24 whats the schedule?
22:42 jaybocc2 occasionally they overlap and the build state.highstate will fail because jobs are already "running".  is there a way to queue up the state.highstate rather than just fail
22:43 jmoreau joined #salt
22:46 twork jaybocc2: stick a ...ack, term is slipping me... footprint file in your cron job, so it doesn't run if a previous instance hasn't concluded yet?
22:46 pdayton joined #salt
22:46 jaybocc2 lockfile? :)
22:46 twork gah. thank you.
22:47 twork it's been a long day.
22:47 PredatorVI Can anyone see anything wrong (or ways I can improve) this updateware state?  you can easily get out of control with examples
22:47 PredatorVI [16:39] *** aqua^c (~aqua@114.111.60.64
22:47 PredatorVI you can easily get out of control with examples
22:47 PredatorVI [16:39] *** aqua^c (~aqua@114.111.60.64
22:47 sdm24 check salt '*' config.get schedule and salt '*' pillar.item schedule, to see what is scheduling it every 5 minutes
22:47 PredatorVI https://gist.github.com/PredatorVI/de554f64f26f85ddce2c
22:48 jaybocc2 i think checking salt-run jobs.active and using a lockfile will suite our needs
22:48 PredatorVI The updatewar.sls state <gist link above> should stop tomcat, clean folders, update war and/or config and restart tomcat, but only if the war or config changes
22:48 markm joined #salt
22:49 ingslovak joined #salt
22:50 phx PredatorVI, you have required: tomcat7-cleanup, but the state is called tomcat7_cleanup, is that intentional?
22:52 PredatorVI phx: That is something I'm unsure about.  I have the 'file' portion of 'tomcat7_cleanup' require the 'service' portion.  I thought that was needed to make sure the service is stopped before cleaning the directories.
22:52 hblah joined #salt
22:52 phx PredatorVI, - VS _, you know
22:53 sdm24 PredatorVI: you can also do - service: tomcat7, since that's the 'name' parameter
22:53 supersheep joined #salt
22:54 PredatorVI sdm24:  where would that go?
22:54 PredatorVI <sorry>
22:54 sdm24 under the require for file.directory
22:55 sdm24 and even for the onchanges under tomcat7_cleanup, you could do - file: '/var/lib/tomcat7/webapps/{{ pillar.war.name }}.war'
22:55 PredatorVI sdm24: you mean instead of -service: tomcat7_cleanup
22:55 sdm24 yeah
22:55 napsterX joined #salt
22:56 PredatorVI I thought the value after the '- service: ' had to match the top-level target.
22:56 sdm24 nope, it can also match the  - name parameter
22:57 PredatorVI I have another state called tomcat7 that is getting imported.  Would that cause issues?
22:57 PredatorVI or included
22:57 sdm24 it might. In that case it is better to use the top-level ID
22:57 PredatorVI ok
22:57 sdm24 because service: tomcat7 can be ambiguous
22:58 sdm24 anyways I'm out for the day. good luck!
22:58 PredatorVI thx
22:59 pdayton1 joined #salt
23:02 PredatorVI phx: I just  realized what you were were asking...i changed '-' to '_'.  However, in my tomcat7_cleanup state, I'm still unsure if I need to require '- service: tomcat_cleanup' in order to get the ordering correct.
23:02 pdayton joined #salt
23:03 jaybocc2 if you need explicit ordering just add '- order: 100' '- order: 101' etc
23:04 PredatorVI I think I'm also needing to add a service.running so that it will restart after updating...is that accurate or will it happen implicitly?
23:05 quasiben joined #salt
23:05 fllr Anyone else having issues installing salt onto ubuntu 12.04 using the bootstrap file?
23:05 aqua^c joined #salt
23:06 quasiben joined #salt
23:07 iggy don't use order: unless you absolutely have to
23:07 iggy fllr: there was a bug about it at one point...
23:07 pdayton1 joined #salt
23:08 fllr iggy: Is it this: * ERROR: Failed to run install_ubuntu_stable_deps()!! ?
23:08 iggy fllr: yeah, I think there's some deps that are too old now or something
23:09 fllr Oh... Was it fixed, by any chance?
23:10 jalbretsen joined #salt
23:12 iggy apparently not if you're having issues ;)
23:12 iggy check the bug tracker for salt-bootstrap and see if you see anything
23:12 PredatorVI In a 'require' section, can I just specify something like '- cleanup_war' (a state i defined) or do I need to specify the specific operation like '-service: cleanup_war'?
23:13 iggy module: id
23:13 PredatorVI kk
23:13 iggy because an ID can have multiple functions under it
23:14 PredatorVI ok...was wondering if I just specify the id, if it would just do every function that is part of that id
23:14 fllr iggy: Yeah... I've been trying going there, but I can't find anything... :\
23:14 iggy the logic to check that apparently isn't worth it
23:14 fllr Oh, well... Creating bug report. -___-
23:15 mosen joined #salt
23:15 PredatorVI Another 'require' question.  If I specify multiple module: id pairs, will it perform them in the specified order?
23:16 iggy fllr: https://github.com/saltstack/salt-bootstrap/issues/637 see that one?
23:16 saltstackbot [#637]title: Bootstrapping fails on a newly installed Ubuntu 12.04 Precise Machine | I use Vagrant to provision (Ubuntu 12.04 Precise boxes)[https://atlas.hashicorp.com/ubuntu/boxes/precise64]. In this boxes the salt provisioner is used to confige the box. Since some days this bootstrapping action fails. After downloading and calling the bootstrap script I get the following output:...
23:17 iggy fllr: if you file a bug, make sure you include the full log (preferrably with -D)
23:17 fllr Ah! I had not! That is exactly the issue I had been running into! Thanks! :)
23:18 iggy PredatorVI: I believe so
23:18 iggy but that's a strange question
23:18 PredatorVI iggy:  my question is strange?  :)
23:20 iggy yes
23:20 iggy the require statement doesn't impact the order, only that those IDs have all run before the requiring state
23:21 PredatorVI iggy:  Okay...I'm just trying to better understand ordering do this update tomcat war file state properly
23:21 PredatorVI I'm still missing something
23:22 iggy update your gist with what you have now
23:23 InAnimaTe joined #salt
23:24 digitalhero joined #salt
23:24 PredatorVI iggy:  It's updated.
23:26 quasiben joined #salt
23:28 quasiben1 joined #salt
23:31 iggy tomcat7_cleanup:file.directory:names:/var/lib/tomcat7/webapps/{{ pillar.war.name }}
23:31 nzero joined #salt
23:31 iggy nvm, I think I see what you're doing
23:33 iggy did you try using prereq instead of all those onchanges?
23:34 iggy and that file looks bass ackwards
23:38 ronrib joined #salt
23:38 ajw0100 joined #salt
23:39 iggy I would probably write a custom state that did the stop, clean, replace files, start and just have that state prereq the file.managed states
23:41 PredatorVI I was using prereq in some cases, but @Basepi responded to a question on the mailing list and suggested a few things including mentioning onchanged.  thus my current state of confusion and desire to understand the right way to do it :)
23:41 PredatorVI any samples or links are appreciated as well
23:45 quasiben joined #salt
23:46 iggy sadly, headed out of the office for the day, if I get on later, I'll try to make some more suggestions
23:46 PredatorVI iggy: Thank you...I have to jet too
23:46 PredatorVI going to the meetup tomorrow! :)
23:47 aqua^c joined #salt
23:49 tkharju joined #salt
23:51 otter768 joined #salt
23:53 quasiben joined #salt
23:57 cberndt joined #salt
23:59 druonysus joined #salt
23:59 druonysus joined #salt

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