Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-08-06

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

All times shown according to UTC.

Time Nick Message
00:00 UtahDave Ryan_Lane: and then running it again a second time works?
00:00 Ryan_Lane yes
00:00 manfred ugh, grep cut grep
00:00 Ryan_Lane I think it's actually checking it out properly, but then checking the result poorly
00:01 UtahDave what version of salt are you on?
00:01 Ryan_Lane UtahDave: 2014.1.0-9092-g51f0b17
00:02 forrest gzcwnk, it comes back in yellow for you?? That doesn't happen for me at all
00:03 dmick forrest: your term has to support color; it's autosensed
00:04 Singularo joined #salt
00:04 forrest dmick, ahh yea
00:04 UtahDave Ryan_Lane: Hm. let me test here real quick on develop
00:07 Ryan_Lane UtahDave: I'm also specifying a different user for the git.latest
00:07 Ryan_Lane and a target
00:07 UtahDave ok, i had a target. I'll add a user.  But you're not changing the user between runs, right?  just the hash?
00:07 Ryan_Lane just the hash
00:08 * robawt highfives UtahDave
00:08 * UtahDave highfives robawt
00:09 forrest You've already moved up to 6th UtahDave
00:10 UtahDave lol, what's the link to that again, forrest?
00:10 UtahDave Ryan_Lane: I'm testing on the Salt git repo. it's downloading now
00:10 * Ryan_Lane nods
00:11 forrest UtahDave, http://bots.wmflabs.org/~wm-bot/dump/%23salt.htm
00:11 UtahDave ok, now changing revs
00:11 mosen forrest: are you competing on number of commits?
00:11 forrest mosen, no, IRC messages
00:12 forrest we're not even really competing
00:12 forrest it's more just for fun
00:12 UtahDave Ryan_Lane: OK, I've confirmed that exact same behavior on the very latest develop
00:12 KaaK can anyone point me to an example of deploying a ruby-on-rails application?
00:12 forrest I have considered going back through all the log files and crawling it to see how many messages I've put into the IRC  since I started participating just for stats.
00:12 Ryan_Lane UtahDave: that's causing me major annoyances :(
00:12 Ryan_Lane I'm having to workaround it by shelling out
00:12 UtahDave Yeah, I imagine.
00:13 Ryan_Lane clone + git fetch && git checkout -f <hash>
00:13 Ryan_Lane well, normal git.latest for clone
00:13 Ryan_Lane but the shell out is that
00:13 forrest kaak
00:13 forrest *in what sense?
00:13 forrest like setting up RVM or what?
00:14 UtahDave Ryan_Lane: What's interesting is that I'm getting [ERROR   ] Command 'git branch | grep "^*\\ " | cut -d " " -f 2 | grep -v "(detached"' failed with return code: 1  both times
00:14 UtahDave whether or not the salt call fails
00:14 Ryan_Lane it may not be that, then
00:14 Ryan_Lane I'm opening a bug
00:15 UtahDave Thanks, Ryan_Lane.
00:15 UtahDave I'm wondering if it actually is updating to the correct rev, even though it says it fails
00:15 KaaK forrest, just any examples of people deploying rails apps with salt. I'm not finding much ...
00:15 Ryan_Lane UtahDave: I think it is
00:15 KaaK currently I've got the environment setup just fine, apache, passenger, rvm, ect
00:15 mosen ok time to slog through the salt manual, that is a daunting piece of work :)
00:16 forrest KaaK, yea I didn't find anything really on google myself. Thus why I was asking how you do the deploy. I know if it was me, I'd probably just set up the RVM and drop everything in
00:16 KaaK i would just like to see what other poeple are doing
00:16 UtahDave Ryan_Lane: Yeah, I just confirmed that it is indeed updating the rev correctly.
00:16 forrest KaaK, fair enough
00:16 forrest KaaK, maybe you can be the first? :D
00:17 KaaK forrest, hah, if i get something i'm proud of, i'll make sure it gets up on github
00:18 forrest KaaK, awesome!
00:18 dancat Using salt are there ways to download packages via git?
00:18 Ryan_Lane UtahDave: https://github.com/saltstack/salt/issues/14775
00:18 mechanicalduck joined #salt
00:19 UtahDave thanks, Ryan_Lane
00:19 dancat instead of maintaining the packages locally
00:19 manfred dancat: sure?
00:19 manfred dancat: what kind of packages?
00:19 forrest get outta here manfred
00:19 manfred if you are just deploying git things... there is a git.latest state...
00:19 forrest go back to your 'FAMILY' and their 'events'
00:20 manfred if you are installing like an rpm, just set the sources: in the pkg.installed state
00:20 forrest does sources support git though?
00:20 forrest I've never tried it
00:20 manfred forrest: they support links to the raw link on github repos
00:20 forrest manfred, that's true
00:20 manfred because that is just an http link
00:20 forrest could just use the html link
00:20 forrest *http
00:20 forrest yes
00:20 dancat okay
00:20 manfred forrest: i saw a link about yall today
00:20 forrest ?
00:21 forrest for what
00:21 manfred http://www.reddit.com/r/sanantonio/comments/2coulq/councilman_suggests_rules_to_allow_lyft_and_uber/
00:21 manfred or is that Ryan_Lane ^^
00:21 manfred one of yall
00:21 forrest that's Ryan
00:21 manfred ahh
00:21 manfred i couldn't read it cause I refuse to make an account
00:21 forrest yea not interested in making accounts for news sites
00:22 forrest I just disable the code that prohibits me from reading instead, it's usually pretty easy :\
00:22 manfred i just disabled the webpage by closing it
00:22 manfred :P
00:22 forrest even better plan
00:22 dancat I'm needing to download packages which a vimrc uses and I do not want them locally I'd prefer to download them with wget or git clone
00:23 manfred dancat: git.latest or archive.extracted
00:23 manfred !states.git.latest | dancat
00:23 wm-bot4 dancat: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.git.html#salt.states.git.latest
00:23 manfred !states.archive.extracted | dancat
00:23 wm-bot4 dancat: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.archive.html#salt.states.archive.extracted
00:23 forrest dancat, ever consider just making a package repo?
00:24 dancat awesome!
00:24 dancat note yet???
00:24 manfred i just use git.latest, and pull down my whole vim git repo, including the submodules that are used by pathogen
00:24 forrest are they debs or rpms?
00:24 dancat nope
00:24 manfred http://code.gtmanfred.com/cgit/vim.git/tree/
00:25 Ryan_Lane what's going on with the RC?
00:25 Ryan_Lane has one been released?
00:25 Ryan_Lane it's over a month late :(
00:25 manfred https://github.com/gtmanfred/vim/tree/master/bundle
00:25 forrest Ryan_Lane, so impatient
00:25 Ryan_Lane well, I'm running against a develop branch, so yeah ;)
00:25 manfred Ryan_Lane: they said any second it will be tagged
00:25 Ryan_Lane cool
00:26 ingwaem joined #salt
00:26 Ryan_Lane well, I hope git.latest will get fixed before the full release :)
00:26 manfred Ryan_Lane: well i did this https://github.com/saltstack/salt/pull/14774
00:26 Ryan_Lane manfred: that fixes it?
00:26 manfred no
00:26 manfred it just stops using grep to see if something is detached
00:26 manfred because that is silly
00:26 Ryan_Lane heh
00:26 manfred git rev-parse exists for a reason
00:28 manfred Ryan_Lane: it might fix that ... maybe, cause it returns a retcode of 1 if your head is detached.
00:28 manfred Ryan_Lane: you are just changing the hash: of git.latest and it breaks on the next run?
00:29 Ryan_Lane yep
00:29 manfred kk one second.
00:29 Ryan_Lane I'm also using the user param, in case that changes anything
00:29 manfred sorry, changing the rev: option?
00:30 Ryan_Lane I'm not sure if that'll cause it to break or not
00:30 manfred kk, will check
00:30 UtahDave Ryan_Lane: I added a bunch of details to that issue you opened.
00:30 Ryan_Lane UtahDave: thanks :)
00:30 brendangilmor joined #salt
00:30 manfred link?
00:30 mosen how old is the stable branch generally? is it debian old?
00:30 Ryan_Lane manfred: https://github.com/saltstack/salt/issues/14775
00:31 Ryan_Lane mosen: 2014.1.7 (7 months old)
00:31 Ryan_Lane <year>.<month>.<point-release>
00:31 manfred 2014.1.10 was supposed to be announced today?
00:31 oncallsucks joined #salt
00:32 UtahDave Yeah, we were pretty much just waiting on packagers to catch up for 2014.1.10.
00:32 UtahDave RC should be really soon. I haven't heard the latest
00:33 dccc joined #salt
00:33 bezeee joined #salt
00:34 mosen no big deal, just setting up a master ill use the 2014.1
00:35 manfred Ryan_Lane: i fix the first error
00:35 manfred Ryan_Lane: for the , ret_code
00:35 manfred Ryan_Lane: but your actual error is this
00:35 manfred [ERROR   ] Command 'git config branch.v2014.1.9.remote' failed with return code: 1
00:36 jslatts joined #salt
00:36 dccc joined #salt
00:37 manfred but it switches the branch
00:37 manfred [root@salt salt.git]# git branch
00:37 manfred * (detached from v2014.1.10)
00:37 manfred well, that is when I switched it back
00:37 manfred but it works
00:54 TheThing joined #salt
00:54 rgarcia_ joined #salt
01:00 joehh !states.archive.extracted | joehh
01:00 wm-bot4 joehh: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.archive.html#salt.states.archive.extracted
01:00 Comradephate joined #salt
01:00 manfred Ryan_Lane: it is a command execution error on the config_get
01:00 manfred CommandExecutionError
01:01 manfred Error running 'git.config_get':
01:01 rgarcia_ joined #salt
01:08 dccc joined #salt
01:14 manfred Ryan_Lane: god, the salt module is soo poorly written for git
01:15 Ryan_Lane yeah, it's not good
01:15 manfred it runs everything through cmd.run_all
01:15 manfred and if it returns anything but 0, it exits
01:15 manfred 72         if retcode == 0:
01:15 manfred 73             return result['stdout']
01:15 manfred 74         else:
01:15 manfred 75             raise CommandExecutionError(result['stderr'])
01:16 manfred which causes the git state to go to the _fail() functino, which just sets the Result to false, and adds a comment, if it gets passed on
01:16 manfred https://github.com/saltstack/salt/blob/develop/salt/states/git.py#L272
01:18 manfred Ryan_Lane: your first error, when checking the branch, and it returns a 1, because grep doesn't find anything... because your rev commit is detached from HEAD, it will raise the CommandExecutionError,
01:18 manfred Ryan_Lane: that one is fixed by my patch
01:18 manfred Ryan_Lane: but it then runs into the error of git config branch.<rev>.remote
01:19 manfred whoever wrote this is evil
01:19 manfred ╘═???? git config branch.remove-grep.remote
01:20 manfred origin
01:20 manfred y
01:20 manfred it works fine if it actually is a branch
01:21 otter768 joined #salt
01:23 freelock joined #salt
01:34 manfred Ryan_Lane: i think I got it
01:34 Ryan_Lane \o/
01:35 rihannon joined #salt
01:35 manfred yup
01:35 manfred give me one second, addding one more to my pr
01:37 manfred Ryan_Lane: https://github.com/gtmanfred/salt/commit/372c2f35b2990476984f03ba305c04a2e0a590e8
01:37 manfred check that one
01:37 manfred the first commit fixes your first problem, then this one fixes what you would run into
01:37 manfred afterwards
01:37 manfred http://paste.gtmanfred.com/t6lg/
01:37 Ryan_Lane ah, excellent
01:39 manfred essentially could have added if len(branch) > 0, instead of branch != HEAD, but i fixed that part too :P
01:39 manfred yay for my hatred for piping to grep and cut :P
01:39 Ryan_Lane yeah, I also dislike that
01:40 Ryan_Lane python's ability to handle strings is better than via the shell, for the most part ;)
01:40 manfred yeah, but this one i was planning on just using awk, then I remembered rev-parse
01:45 jslatts joined #salt
01:45 cruatta i have an interesting question
01:45 cruatta i'm trying to match a pillar in top.sls if the grain on the minion doesn't exist
01:45 bhosmer joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2014.1.7 is the latest | 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:47 manfred hold on
01:47 cruatta where access is the grain i don't want the minion to have
01:47 manfred base:
01:47 manfred 'not G@access:* and I@website:Yes':
01:47 manfred - match: compound
01:47 manfred - something
01:48 cruatta ooh you can do a match: compound?
01:48 manfred should match anything were access:* grain is not matched, and the website pillar is set to Yes
01:48 manfred yeah
01:48 dmick yeah, that was a revelation for me too.  docs help needed.
01:48 manfred it is on the compoind targeting page...
01:48 manfred http://docs.saltstack.com/en/latest/topics/targeting/compound.html
01:48 manfred the second example
01:50 Ryan_Lane manfred: awesome work! thanks for the help :)
01:50 manfred Ryan_Lane: no problem :)
01:50 BrendanGilmore joined #salt
01:51 ingwaem hey guys, any one aware of how I should define profiles for esxi/vsphere? wondering how to create a vm at the moment and don’t know where to start :)
01:52 manfred ingwaem: you create them using the salt-run virt runner
01:52 manfred ingwaem: or using the salt-cloud profiles i guess http://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.vsphere.html
01:53 Luke joined #salt
01:53 ingwaem getting notices though saying Function 'virt' is unavailable
01:53 cruatta i tried   'not G@access:*': but no dice
01:53 helderco joined #salt
01:53 cruatta 'not G@access:*':
01:53 cruatta - match: compound
01:53 cruatta - access.default
01:54 cruatta but the minion is not getting access.default
01:54 ingwaem yea, checked out that documentation and have got as far as seeing data sources etc…but the create function says to use a dictionary…although no definition exists
01:54 ingwaem manfred: is there an additional config I shoudl be ensuring exists first?
01:54 pastacino joined #salt
01:54 manfred ingwaem: which method are you using? the salt virt runner?
01:55 manfred cruatta: check the docs
01:55 manfred cruatta: Note that a leading not is not supported in compound matches. Instead, something like the following must be done:
01:55 cruatta doh!
01:55 manfred cruatta: try '* and not G@access:*'
01:55 manfred or match your pillar first :P
01:56 cruatta i love you man
01:56 ingwaem manfred: yea had originally tried salt '*' virt.is_hyper….and that returned sdlcmaster001:
01:56 manfred
01:56 ingwaem 'virt.is_hyper' is not available….then jus tran the command as you gave it and also got Function 'virt' is unavailable
01:56 cruatta this is great
01:56 cruatta thanks!
01:56 manfred ingwaem: ok, one second
01:57 ingwaem manfred: np
01:57 manfred ingwaem: the virt module looks to be only used by libvirt, not vsphere/esxi
01:57 manfred ingwaem: https://github.com/saltstack/salt/blob/develop/salt/modules/virt.py#L24
01:57 manfred so you need to install the libvirt python module
01:58 manfred (which i believe can manager your vsphere/esxi)
01:59 manfred which makes sense, that is how it is able to manage different types of hypervisors
01:59 ingwaem manfred: i see…hmm, more digging to do then :) I had initially started looking at virt but I think with all the version number differences, it’s hard to know what’s released and what’s coming…ended up discovering cloud was going to support esxi
01:59 manfred ingwaem: you can use esxi/vsphere, it doesn't use them directly it looks like, it looks to be using them through libvirt
02:00 ingwaem manfred: thanks :) i’ll go check out the libvirt stuff…I think it’s installed, jsut got to figure out how to config it
02:01 manfred if you have it installed, and have the xml library installed, i don't think it should be throwing that error
02:01 dvestal joined #salt
02:01 manfred ingwaem: https://github.com/saltstack/salt/blob/develop/salt/modules/virt.py#L71
02:02 manfred yeah, you have to configure it in libvirt it appears
02:02 ingwaem ok cool :)
02:02 manfred ingwaem: if you get it working, can you try and help expand some of the SaltVirt documentation?
02:03 ingwaem manfred: definately
02:03 manfred ingwaem: good luck
02:04 ingwaem manfred: thanks :) I need it hehe
02:15 ingwaem manfred: still getting issues…I’ve installed salt_virt and libvirt using the salt-formulas and running salt ‘*’ virt.is_hyper just returns     'virt.is_hyper' is not available.
02:16 manfred can you jump on the minion and run salt-call virt.is_hyper -l debug
02:16 manfred and pastebin your output
02:17 shannonman joined #salt
02:18 to_json joined #salt
02:19 ingwaem sure thing
02:19 ingwaem http://pastebin.com/H5ETfPs6
02:20 manfred oh
02:20 manfred what version of salt are you on?
02:20 ingwaem 2014.7.0-405-g7cdaa50
02:21 manfred hrm, yeah should be in that
02:22 manfred so, if it is erroring somewhere else, it should throw something there
02:22 ingwaem yea I force upgraded to dev version because of the cloud vsphere module that has recently been added…says it was only available from 2014.7
02:22 manfred can you restart the salt minion service and try again?
02:22 manfred als salt-call sys.doc virt
02:23 manfred and see if it gives you anything
02:23 ingwaem root@sdlcmaster001:/srv/salt/salt_virt# salt-call sys.doc virt
02:23 ingwaem [INFO    ] Executing command '/sbin/zfs help || :' in directory '/root'
02:23 ingwaem local:
02:23 ingwaem ----------
02:24 ingwaem restarted, same outcome
02:24 manfred pip list | grep libvirt ?
02:25 ingwaem hmm, empty
02:25 manfred that might be ok
02:25 manfred python -c 'import libvirt;'
02:26 ingwaem errr…ImportError: No module named libvirt
02:26 manfred yar
02:26 manfred install the libvirt python module
02:26 manfred which os?
02:26 manfred distributino*
02:26 ingwaem which is weird, becuase I ran both formulas from the salt-formula site
02:26 manfred or i guess it is windows
02:26 ingwaem ubuntu
02:26 manfred oh
02:26 ingwaem latest version of server
02:27 ingwaem ID: libvirt
02:27 ingwaem Function: pkg.installed
02:27 manfred yeah
02:27 ingwaem libvirt
02:27 ingwaem Function: service.running
02:27 ingwaem Name: libvirt-bin
02:27 manfred but the package you want is python-libvirt
02:27 manfred for the library
02:27 manfred which formula?
02:28 ingwaem ip list | grep libvirt
02:28 ingwaem libvirt-python (1.2.2)
02:28 ingwaem was this formula https://github.com/saltstack-formulas/libvirt-formula
02:28 ingwaem and this one: https://github.com/saltstack-formulas/salt-virt-formula
02:28 ingwaem latter requires first
02:29 manfred yup, they don't install libvirt-python in those
02:29 manfred or python-libvirt for the package name
02:30 manfred it is noted here http://docs.saltstack.com/en/latest/topics/tutorials/cloud_controller.html#installing-hypervisor-software but that is redhat specific
02:30 ingwaem yup you’re right
02:31 manfred aight, I am going to watch the braves play, have fun :)
02:31 ingwaem manfred: thansk for all your help!
02:31 ingwaem much progress has been made
02:31 ingwaem salt-call virt.is_hyper
02:31 ingwaem [INFO    ] Executing command '/sbin/zfs help || :' in directory '/root'
02:31 ingwaem local:
02:31 ingwaem False
02:33 gzcwnk I seem to be going through a period of salt not working again  :(
02:34 fllr joined #salt
02:38 bhosmer joined #salt
02:43 delinquentme joined #salt
02:43 dancat if there is not a built in wget state call is there a way to call wget?
02:45 dancat I think I answered my question
02:46 Ryan_Lane1 joined #salt
02:46 ramishra joined #salt
02:50 BrendanGilmore joined #salt
02:50 mosen joined #salt
02:53 gzcwnk cmd.run if nothing else
02:57 bezeee joined #salt
03:00 gq45uaethdj26jw6 left #salt
03:03 UtahDave joined #salt
03:20 aquinas joined #salt
03:20 dancat is there a way to tell salt to create a directory structure if it does not already exist? (file.managed)
03:22 jY dancat: like add parent dirs if they don't exist up to a file?
03:22 dancat yes
03:23 jY - makedirs: True
03:23 delinquentme joined #salt
03:23 dancat jY: thanks
03:23 jY np
03:33 bhosmer joined #salt
03:39 malinoff joined #salt
03:42 jarm_ joined #salt
03:54 bezeee joined #salt
03:56 geekmush2 joined #salt
03:57 brunolambert joined #salt
04:02 jgelens joined #salt
04:10 kermit joined #salt
04:17 Comradephate joined #salt
04:17 davet joined #salt
04:29 shannonman joined #salt
04:29 geekmush joined #salt
04:30 MaZ- joined #salt
04:32 icebourg joined #salt
04:33 icebourg joined #salt
04:43 rgarcia_ joined #salt
04:49 napper joined #salt
04:50 badon joined #salt
04:53 jgelens joined #salt
04:54 bitmand joined #salt
04:58 jcristau joined #salt
04:58 tmmt joined #salt
05:06 thayne joined #salt
05:15 Sauvin joined #salt
05:15 Sauvin joined #salt
05:22 bhosmer joined #salt
05:23 bezeee joined #salt
05:23 badon joined #salt
05:33 Sauvin joined #salt
05:40 jalbretsen joined #salt
06:00 wangofett joined #salt
06:09 cym3try joined #salt
06:22 ixokai joined #salt
06:25 eightyeight well, i'm stuck
06:25 jalaziz joined #salt
06:25 eightyeight i upgraded an ubuntu 10.04 to 12.04, and salt-minion will not sart
06:25 eightyeight *start
06:25 eightyeight with python2.7, complains about 'zmq' not being available
06:25 eightyeight with python2.6, complains about 'salt.scripts' not being available
06:25 eightyeight help
06:26 eightyeight "NameError: global name 'zmq' is not defined"
06:26 eightyeight ^ python 2.7
06:28 eightyeight python-zmq is installed
06:28 eightyeight as is salt-common
06:29 eightyeight pastebin: http://ae7.st/p/080
06:41 Miouge joined #salt
06:50 gfa joined #salt
06:52 joehh eightyeight: assuming you are using the saltstack ppa
06:53 joehh can you do a "dpkg -l | grep salt
06:53 joehh ""
06:53 eightyeight http://ae7.st/p/18s
06:53 ajw0100 joined #salt
06:54 joehh interesting, what version is python-zmq?
06:55 joehh there are newer versions of those packages available at the ppa, but that is unlikely to be the problem
06:56 eightyeight hmm. interesting. 13.0.0-3lucid
06:58 joehh I would try installing the precise version of that from the saltstack ppa
06:58 joehh imaginatively named: 13.0.0-2precise
06:58 intellix joined #salt
06:59 eightyeight i grabbed http://mirrors.kernel.org/ubuntu/pool/universe/p/pyzmq/python-zmq_2.1.11-1_amd64.deb
06:59 eightyeight now it starts successfully, although with this warning:
06:59 eightyeight [WARNING ] You have a version of ZMQ less than ZMQ 3.2! There are known connection keep-alive issues with ZMQ < 3.2 which may result in loss of contact with minions. Please upgrade your ZMQ!
06:59 joehh you will want a newer version than that
07:00 eightyeight well, this is an intermedite step
07:00 joehh the warning is appropriate
07:00 eightyeight it's going to 14.04
07:00 joehh ahahh
07:00 joehh good move
07:00 eightyeight i'm on 'upgrade servers' duty tonight. :)
07:00 eightyeight but, as a good admin, i'm checking that everything is in order, before moving on
07:00 eightyeight :)
07:00 eightyeight joehh: thx for your help
07:01 joehh no worries
07:04 chiui joined #salt
07:04 lietu so apparently with grains['ip_intarfaces']['eth0'][0] I can output the IP of eth0 to a template, but how do I loop through all addresses of all available interfaces?
07:04 lietu *ip_interfaces
07:08 joehh lietu: something like http://paste.debian.net/113895/
07:08 lietu possibly with (jinja) {% for key, value in grains['ip_interfaces'] %} ?
07:09 shannonman joined #salt
07:09 joehh exactly
07:09 lietu excllent
07:09 lietu apparently I can't type, but yes .. thanks
07:09 joehh :)
07:10 slav0nic joined #salt
07:10 slav0nic joined #salt
07:10 bhosmer joined #salt
07:12 linjan joined #salt
07:15 auser joined #salt
07:17 alanpearce joined #salt
07:28 mattmtl joined #salt
07:35 kerncore joined #salt
07:42 david_a joined #salt
07:42 giannello joined #salt
07:42 ndrei joined #salt
07:44 goudale joined #salt
07:45 mosen can't find how to run highstate in test mode.. would it just be state.highstate test=True ?
07:46 istram joined #salt
07:46 ramishra joined #salt
07:46 ml_1 joined #salt
07:48 goudale mosen: yup
07:50 martoss joined #salt
07:51 jhauser joined #salt
07:52 mariusv joined #salt
07:52 mariusv joined #salt
07:54 matthiaswahl joined #salt
07:55 mosen goudale: thanks!
07:56 scoates_ joined #salt
07:56 ramishra joined #salt
07:57 pclermont_ joined #salt
07:57 _david_a joined #salt
07:57 SaveTheR0btz joined #salt
07:58 bluehawk1 joined #salt
07:59 keekz joined #salt
08:04 xintron If I in my top.sls run foo (foo/init.sls), how can I in foo specify that foo.bar should be executed?
08:05 Bryanstein joined #salt
08:15 Sypher xintron, you should include it in the init.sls
08:15 Sypher anyone using the vsphere driver for salt-cloud?
08:16 xintron Sypher, ah. Makes sense
08:16 xintron thanks
08:16 Sypher http://docs.saltstack.com/en/latest/ref/states/include.html
08:17 ggoZ joined #salt
08:23 intellix joined #salt
08:26 bitmand left #salt
08:27 Miouge How do you go about renaming a set of salt minions using salt ? Just changing the minion_id and restart the service ?
08:30 Sypher don't forget the keys on the master
08:33 Steve_J joined #salt
08:33 ninkotech__ joined #salt
08:33 xintron I have some issues with pkgrepo. I have a name specified and a file but each time I run the setup I get an error but the name is appended to the file as for each run.
08:33 lietu does salt have any automagic thingies available for fetching http://metadata/0.1/meta-data/network information in Google Compute Engine and making e.g. the external IP available in the grains?
08:34 xintron The name is: "deb <http-url> testing/". The trailing slash is not appended but is needed for this to work
08:34 xintron Any suggestions to how to solve this?
08:35 xintron I could use file.managed instead but then I can't use "require_in" etc
08:37 xintron (removing the trailing slash will make salt think it worked but apt will fail since it's not properly formatted without the trailing slash)
08:37 goudale xintron: doesnot it miss 'main' to the end ?
08:37 goudale 'deb <http-url> testing main' ?
08:37 xintron no
08:38 xintron " distribution can specify an exact path, in which case the components must be omitted and distribution
08:38 xintron must end with a slash (/)$
08:38 xintron so in that case the main component should be omitted
08:39 xintron So the problem I'm having is that no matter how I format the pkgrepo.manage.name it will remove my trailing slash
08:40 aw110f joined #salt
08:42 xintron hrmm.. it worked when I added the dist: testing/.
08:43 ramishra joined #salt
08:43 aw110f_ joined #salt
08:44 netzmonster joined #salt
08:47 robins joined #salt
08:47 intellix joined #salt
08:51 funzo_ joined #salt
08:52 jut_ joined #salt
08:52 johngrasty_ joined #salt
08:53 bretep joined #salt
08:53 ahale joined #salt
08:53 ifmw joined #salt
08:53 mugsie joined #salt
08:54 MTecknology joined #salt
08:54 mackstick joined #salt
08:54 timoguin joined #salt
08:54 wangofett joined #salt
08:54 Sauvin joined #salt
08:54 estherbester joined #salt
08:54 jforest joined #salt
08:54 sirtaj joined #salt
08:54 gfa joined #salt
08:54 sverrest joined #salt
08:54 Heggan joined #salt
08:54 Nazca__ joined #salt
08:54 lz-dylan joined #salt
08:54 syst3mw0rm joined #salt
08:54 baffle joined #salt
08:54 huleboer joined #salt
08:54 seb` joined #salt
08:54 Corey joined #salt
08:55 urtokk joined #salt
08:55 ClausA joined #salt
08:55 Sauvin joined #salt
08:56 Deevolution joined #salt
08:57 ahammond joined #salt
08:57 xintron Another issue is when there's extra info in the pkgrepo.managed.file. That extra data is not cleaned up (and I can't find an option to do so)
08:59 bhosmer joined #salt
09:00 shiin joined #salt
09:00 shiin is there a coding style guide for salt states?
09:16 MTecknology joined #salt
09:24 giantlock joined #salt
09:24 darkelda joined #salt
09:26 babilen xintron: Are you looking for consolidate?
09:26 xintron babilen, Gave it a go but didn't do anything to the file (still left obsolete lines in the file)
09:28 mechanicalduck joined #salt
09:32 istram shiin: I haven't seen one yet, however you can follow some good examples on net
09:32 martoss joined #salt
09:34 babilen xintron: Consolidate is a bit buggy, do you have an example of what is being left and could you paste that as well as the output of the state run to http://paste.debian.net or http://refheap.com ?
09:34 babilen istram: shiin /parted a while ago
09:34 istram babilen: noticed after while that I'm not able to autocomplete his nick...
09:35 lietu babilen: well, not strictly true .. they /quit
09:36 lietu though I am wondering what kind of a style guide does one need outside of PEP-8
09:36 goudale joined #salt
09:37 mndo joined #salt
09:39 babilen lietu: My meaning was rather: "shiini is no longer in the channel" rather than "shiini ran the /quit command in his/her IRC client", but I will try to cater to your OCD and be more precise in the future. It also looks as if shiini simply decided to suspend his/her computer which caused the client to quit, but that is mere speculation.
09:39 lietu babilen: I wasn't being very serious with my statement
09:40 babilen lietu: pep-8 does not say anything about salt states and http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html is the best I can think of
09:40 babilen We have internal style guides, but I'm not sure if some exist that one could cite within the channel
09:45 ramishra joined #salt
09:48 MrTango joined #salt
09:50 toddnni joined #salt
09:51 bhosmer joined #salt
09:51 shiin joined #salt
10:06 ramishra joined #salt
10:13 robinsmidsrod joined #salt
10:20 dvestal joined #salt
10:21 Miouge joined #salt
10:23 duncanmv joined #salt
10:24 bhosmer joined #salt
10:24 duncanmv is there another way to get salt events from the master using the python API? right now I am using salt-api websocket api
10:24 ramishra joined #salt
10:25 duncanmv (but the consumer is another python program, so I don't need websockets or go over the net-api)
10:27 thehaven joined #salt
10:27 toddnni joined #salt
10:29 viq duncanmv: I think there's a specific listener you can run
10:29 viq duncanmv: also look up salt-eventsd
10:29 duncanmv I think I just found something
10:29 duncanmv event = salt.utils.event.MasterEvent('/var/run/salt/master')
10:29 duncanmv for data in event.iter_events(tag='auth'):
10:29 ramishra_ joined #salt
10:30 __number5__ joined #salt
10:34 yomilk joined #salt
10:37 pjs joined #salt
10:40 alanpearce joined #salt
10:48 bhosmer_ joined #salt
10:54 martoss joined #salt
11:05 goudale Can't I say 'require: state:foostate' in another state ?
11:07 goudale Can't I say 'require: state:foostate' in another state ?
11:07 goudale oups wrong history, sorry
11:09 diegows joined #salt
11:15 mortis_ will the salt-api actually use the cached grains and pillars on the master if caching is turned on?
11:15 alanpearce joined #salt
11:15 shiin is there a coding style guide for salt states?
11:16 lopez hi.. can anyone help me? I have a sls defining several file states, but salt keeps telling me 'Too many functions declared in state "file" in sls ...' these are my states: http://pastebin.com/7NgKn2Hu anyone an idea about what i'm missing? tia for any hint..
11:16 mortis_ shiin: yeah there is a best practises http://docs.saltstack.com/en/latest/topics/best_practices.html
11:16 mortis_ might help i dunno
11:16 shiin mortis_: thanks
11:16 mortis_ np
11:16 goudale shiin: http://docs.saltstack.com/en/latest/topics/development/conventions/style.html ?
11:17 shiin goudale: thats for developing salt I believe.
11:17 goudale shiin: yep, I read after pasted
11:24 ninkotech__ joined #salt
11:33 jslatts joined #salt
11:34 whiteinge mortis_: salt-api uses most the same code paths as salt's cli. It does used cached grains& pillar
11:34 mortis_ whiteinge: allright, thanks :)
11:35 whiteinge Are you trying to access that data or are you wondering about behavior?
11:35 mortis_ yeah, im just wondering, since its a bit slow when some minions are down
11:37 whiteinge Previous to 2014.7 it used the old method that salt's cli use to use so the timeout behavior is different
11:38 mortis_ we are on .7
11:38 whiteinge Ah. It should be nearly identical then. What are you seeing?
11:40 mortis_ nah, im just making a flask-app that lists grains and pillars and it takes some time for it to timeout on the minions that are down
11:40 mortis_ i guess it tries to reach them if it doesnt have a cache for the specific minions
11:40 lopez hi. found the problem: i misstyped one node, that is, i wrote just 'makedirs' instead of 'makedirs: True' - that caused the weird Too many functions declared in state thing - if anyone happens to stumble upon a similar thing..
11:42 whiteinge mortis_: if you want to keep that query master-side you can call the cache runner instead of calling the minions themselves
11:43 mortis_ oooh
11:43 mortis_ riight
11:43 mortis_ *looks for documentation*
11:43 whiteinge !runners.cache.grains
11:43 wm-bot4 http://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.cache.html#salt.runners.cache.grains
11:43 mortis_ thanks whiteinge :D
11:45 whiteinge np :-)
11:46 mortis_ whiteinge: wow, now THAT was fast :D
11:47 whiteinge Hehe
11:48 mortis_ whiteinge: but that doesnt return json?
11:49 whiteinge Oh? It should... what does it return?
11:49 mortis_ leeets seee
11:50 Luke joined #salt
11:52 mortis_ oh, it does, its just empty values
11:52 mortis_ prolly my function :) sec
11:53 mortis_ cause via api its supposed to be client runner i suppose
11:53 mortis_ it works manage.status, but not with cache.grains
11:54 mortis_ weird
11:57 whiteinge Is it not returning anything?
11:57 mortis_ the api-call is exactly the same for manage.status and cache.grains
11:57 mortis_ yeah its returning the key for the key,value
11:57 mortis_ but value is {}
11:57 mortis_ hmm gonna see if its the same with pillar
11:58 whiteinge Doesn't return anything if you run it via the CLI with salt-run?
11:58 mortis_ it does
11:58 mortis_ looks correct there
11:58 whiteinge Odd
11:58 mortis_ same thing with pillar
11:58 mortis_ cache.pillar that is
11:59 mortis_ {'fun': 'cache.pillar', 'username': 'salt', 'password': 'lol', 'client': 'runner', 'eauth': 'pam'}
11:59 mortis_ fun=cache.pillar&username=salt&password=lol&client=runner&eauth=pam
11:59 mortis_ looks correct to me
11:59 istram joined #salt
11:59 whiteinge Yeah
12:01 whiteinge I'm not in front of a computer (on my phone). Will be in about 30. Let me try to reproduce. I'll ping you back.
12:01 mortis_ cool thing whiteinge
12:02 mortis_ whiteinge: another thing, do you know if we could run like ...grains.items in the scheduler in salt and have that fill the cache? :D
12:03 mortis_ its too hot in here now, im getting way too salthorny ....need to get fresh air -.-
12:04 whiteinge Lol
12:05 whiteinge The grains and pillar cache is populated when minions first connect to the master automatically
12:05 whiteinge If there are other data points you want to cache you can use salt mine for that. And access that through the cache runner as well
12:06 mortis_ ahhh yeah
12:06 mortis_ OK i will look into that
12:06 mortis_ now some air :)
12:06 mortis_ ttyl
12:08 amontalban Morning!
12:09 amontalban Anyone know if it is possible to require a module.run so I can do a file.manage after a module.run was made?
12:15 jas-__ joined #salt
12:15 goudale joined #salt
12:18 scott_w joined #salt
12:21 agend joined #salt
12:24 goudale I am trying to git files from a git repo hosted on github, but when running the state, I get
12:24 goudale Comment: State https://github.com/elasticsearch/kibana found in sls logstash is unavailable
12:24 goudale what should I understand ? this url is valid in my webbrowser
12:28 amontalban goudale: It seems that the URL is wrong
12:28 amontalban Try to add a .git at the end
12:28 amontalban Like the one in the docs: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.git.html
12:30 goudale it is already here
12:30 amontalban goudale: Can you pastebin the state?
12:31 goudale amontalban: sure : http://p.mufff.in/?0afef81401fd4a71#VwP358B5jx0XHAeW63qMdpZ3Tb/sFzqH8Y8FYok8lCw=
12:33 amontalban goudale: are you running it with masterless?
12:33 canci joined #salt
12:33 goudale masterless ?
12:34 amontalban goudale: Yeah, if you are just testing the state in a minion without master
12:34 amontalban Because you can debug that
12:34 amontalban It can be a networking issue or something
12:34 amontalban salt-call state.highstate --local -l all
12:34 goudale I didn't know that one, thanks
12:34 amontalban Should give youe
12:35 sinh joined #salt
12:35 goudale tried a bit more, removed the 'kibana' line, and modified dashes, and it work. I think it is mostly a syntax issue from my side
12:35 amontalban *Should give you tons of debug info, including the git commands when doing a checkout
12:36 amontalban Glad it worked
12:37 bhosmer joined #salt
12:38 Miouge joined #salt
12:41 ipmb joined #salt
12:45 TheThing joined #salt
12:51 BrendanGilmore joined #salt
12:52 badon_ joined #salt
12:53 jslatts joined #salt
12:54 mechanicalduck joined #salt
12:55 bhosmer joined #salt
12:58 darkelda joined #salt
12:58 darkelda joined #salt
12:59 ajprog_laptop1 joined #salt
13:01 shiin joined #salt
13:02 cpowell joined #salt
13:04 ericof joined #salt
13:07 helderco joined #salt
13:14 Comradephate joined #salt
13:15 thayne joined #salt
13:15 TheThing joined #salt
13:15 racooper joined #salt
13:16 nyx joined #salt
13:17 miqui joined #salt
13:19 xzarth_ joined #salt
13:19 yidhra joined #salt
13:20 CeBe joined #salt
13:22 laubosslink joined #salt
13:25 Shish I would guess that means you don't have the proxmox python module installed; never having used it myself I can't guess any more than that
13:28 davidnknight joined #salt
13:29 smcquay joined #salt
13:30 toastedpenguin joined #salt
13:30 Shish I would guess that they don't want to include the python modules for /every/ provider, so they just install the core and expect you to install whichever provider-specific modules you need?
13:37 che-arne joined #salt
13:48 Sacro Hmm, I just tried to install salt 2014.1.7 MSI over the top of 1.5 and now I'm getting ImportErrors
13:48 Sacro Ah
13:48 Sacro I installed a 64 bit 1.7 over 32 bit 1.5
13:48 Sacro there's my issue....
13:51 mateosik joined #salt
13:52 mateosik hello, I want to ask you about pillar refresh time on salt-ssh
13:52 thehaven joined #salt
13:52 mateosik right now i have to wait ~10 minutes in order to pick up changes
13:53 mateosik I am using "saltutil.refresh_pillar" to force refresh
14:04 helderco joined #salt
14:05 dude051 joined #salt
14:08 AviMarcus joined #salt
14:09 workingcats joined #salt
14:10 quantumriff joined #salt
14:10 housl joined #salt
14:12 linjan joined #salt
14:15 mateosik Is there way to synchronize pillar data immediately?
14:16 TyrfingMjolnir joined #salt
14:16 quickdry21 joined #salt
14:21 shannonman joined #salt
14:23 amontalban Anyone knows if I change minion config during highstate the changes will take place or I have to restart the minion?
14:23 amontalban If so, it will abort the current highstate?
14:25 foxx does anyone know if its acceptable to have a master salt instance maintain its own conf?
14:25 foxx e.g. can the master do highstate on itself?
14:25 jalbretsen joined #salt
14:27 mateosik does anyone know if there is a way to synchronize pillar data immediately?
14:27 Ozack1 joined #salt
14:35 ajprog_laptop1 joined #salt
14:37 Psi-Jack joined #salt
14:37 Psi-Jack Is it possible with mysql_grant to grant EXECUTE ON PROCEDURE, specifically?
14:38 rallytime joined #salt
14:42 wendall911 joined #salt
14:42 mechanicalduck_ joined #salt
14:42 AdamSewell joined #salt
14:47 skos joined #salt
14:52 thedodd joined #salt
14:53 shiin left #salt
14:58 mortis_ on github i see : +.. versionadded:: 2014.7.0
14:58 mortis_ is that a typo?
14:58 Ahlee_ foxx: yes, set a minion up on the master
14:58 dccc joined #salt
14:58 denstark joined #salt
14:59 scbunn joined #salt
14:59 funzo joined #salt
14:59 mechanicalduck joined #salt
14:59 foxx Ahlee_: yup figured as much, ty :)
15:00 denstark Hello! I'm curious about a response I get when I do a cmd.run on some of my machines. The command is: "cmd.run -G 'env:integ' 'id -u username'" (where username is the user I want to check is on all those machines). I get back: "id -u username is not available."
15:02 Ahlee_ denstark: You're expecting the username you specified to be present? and manual verification shows the user is on thos systems?
15:02 denstark Ahlee_: I'm using the salt command to find out if the user is on all those systems
15:02 denstark Or trying to at least ;)
15:02 robinsmidsrod joined #salt
15:03 Ahlee_ so salt -G env:integ cmd.run 'id -u foo'
15:03 Ahlee_ and that's not coming back as you expect? or you don't trust the output
15:04 denstark The output just says '"id -u username" is not available'
15:04 Ahlee_ and those systems have the id binary
15:04 Ahlee_ ?
15:04 denstark Which is not what id would return if the user was not present
15:04 denstark Correct
15:04 mechanicalduck joined #salt
15:05 denstark It should return "id: username: no such user"
15:05 kaptk2 joined #salt
15:06 khaije1 joined #salt
15:06 Ahlee_ huh.  I can't reproduce, my windows minions blow up saying no id, as expected, linux hosts return my uid for my username, no such user for non-existent
15:06 Gareth denstark: try running cmd.run_all 'id -u username' instead.  Sounds like the id might be returning a non-zero return code and salt is catching that, telling you the command isn't availalble.
15:07 Ahlee_ both for local users and users in AD
15:07 kballou joined #salt
15:07 denstark Gareth: Sure, I'll give that a try
15:07 denstark Oh.
15:07 denstark I'm an idiot.
15:07 Ahlee_ woah, run_all is pretty asesome
15:07 Ahlee_ thanks Gareth
15:07 denstark Thank you for the time. The error was my incompetence
15:07 Gareth Ahlee_: )
15:08 Gareth Ahlee_: :)
15:08 Ahlee_ that'd have been useful a few weeks ago, heh
15:09 taterbase joined #salt
15:10 beneggett joined #salt
15:12 AdamSewell joined #salt
15:13 smcquay hello folks. Despite cranking up the worker_threads to 32 I am still seeing minion failed to return job info for ... It's still running the command in the cases where I have been able to check logs, but there's no feedback for me to be able to check that it has run.
15:13 smcquay any thoughts?
15:14 UtahDave joined #salt
15:14 Ahlee_ smcquay: increase the timeout.  Salt is asyncronous
15:14 Ahlee_ smcquay: so, salt -v state.sls long_running_state
15:15 Ahlee_ then salt-run jobs.lookup_jid <job returned in the -v>
15:15 Ahlee_ or, salt -v -t 60 state.sls long_running_state
15:17 thayne joined #salt
15:17 mechanicalduck joined #salt
15:18 conan_the_destro joined #salt
15:20 FeatherKing joined #salt
15:22 icebourg joined #salt
15:22 FeatherKing can i use a pcre expression on a grain value? this doesnt seem to work: salt -E 'G@loadnum:[0-9][0-9]' test.ping
15:23 FeatherKing this would target a range from 00-99 for the grain loadnum
15:24 UtahDave You can, but you should use grains pcre   http://docs.saltstack.com/en/latest/topics/targeting/compound.html
15:25 mateosik does anyone know if there is a way to synchronize pillar data immediately?
15:25 goudale joined #salt
15:25 Ahlee_ i have two empty coffee mugs to my left, an empty coffee mug in front of me, and an empty coffee mug to my right.  This tells me I need more coffee.
15:25 FeatherKing UtahDave: ty just what i was looking for
15:25 repl1cant anyone know of an easy way to set the permissions on a specific file matched in a glob in a state? I'm trying to set the permissions on /var/www/*/*/restart/restart as the /*/*/ parts may change over time by our devs
15:25 Ahlee_ mateosik: define immediate.  salt \* saltutil.refresh_pillar will update, but it still has to process the values
15:25 blarghmatey joined #salt
15:26 srilyk repl1cant: can you use grains for that? Or is it more variable?
15:26 vbabiy joined #salt
15:27 repl1cant more variable
15:27 repl1cant hrm
15:27 repl1cant or I guess ya I could write a custom grain
15:27 mateosik I am using salt-ssh and after "saltutil.refresh_pillar" I have to wait quite a bit to get pillar refresh. I would like to change pillar data and have minions sync in <10 sec,
15:27 repl1cant the grain would just create the info for that dir
15:27 Ahlee_ Sorry, I have no experience with salt-ssh
15:27 repl1cant actually, i'm gonna try that. thanks for the idea!
15:28 srilyk repl1cant: good luck!
15:29 jamesog Hi. Is there any with the file.directory state's recurse to set the group and mode only for sub-directories and not for files? I want it to leave the files alone but can't see a way to do it
15:32 Gareth jamesog: dir_mode should do what you want I believe.
15:33 Gareth half of what you want.
15:33 mateosik So using typical master minion configuration, pillar data refreshes faster than 10 minutes after using saltutil.refresh_pillar? I want to use salt to deploy dockerized django apps and I want to put all data in pillar. And before new release I want to change revision variable inside pillar, and then push changes.
15:35 thedodd joined #salt
15:36 jamesog Gareth: It seems file_mode defaults to dir_mode when unset, so it doesn't :( And the group on the files still gets changed
15:39 Gareth jamesog: Sounds like a dir_group and dir_user might be needed.  Can you file an issue on github?
15:40 jamesog Sure
15:41 shannonman joined #salt
15:44 skos Hi,
15:44 robinsmidsrod joined #salt
15:45 skos is it possible to filter ext_pillars between minion_names and environments? (as it is possible for static pillars in top.sls)
15:45 ramishra joined #salt
15:45 robinsmidsrod joined #salt
15:45 adw_ joined #salt
15:47 ggoZ joined #salt
15:47 conan_the_destro joined #salt
15:52 shannonman joined #salt
15:55 tligda joined #salt
15:56 m1crofarmer joined #salt
15:57 TheThing joined #salt
15:58 badon_ joined #salt
16:00 troyready joined #salt
16:08 estherbester joined #salt
16:09 MTecknology Is it possible to have cmd.run use bash instead of sh?
16:10 Ahlee_ MTecknology: cmd.run '/bin/bash foo.sh'
16:10 MTecknology I need to run a long string of commands
16:10 UtahDave MTecknology: I believe there is a "shell" option to pick your shell
16:11 Ahlee_ there is
16:12 jslatts joined #salt
16:13 MTecknology perfect :D
16:13 robinsmidsrod joined #salt
16:14 quantumriff I have some files to deploy, but the directories don't exist until a manual install is done (I haven't found a good way to automate this yet). Is it possible to have a state wait until a directory or file exists, and then run?
16:14 quantumriff without showing that its a failure?
16:14 quantumriff right now, it fails because the directory doesn't exist.. but I wan't to change that to eliminate false alarms
16:15 MTecknology quantumriff: sounds like you want -require:
16:15 kermit joined #salt
16:15 robawt why not create the directory tree at the point of the salt state?
16:15 CF495677 joined #salt
16:15 quantumriff MTecknology: I thought -require was for ordering states
16:15 MTecknology oh, manual install
16:16 KyleG joined #salt
16:16 KyleG joined #salt
16:16 quantumriff robawt: mainly because the perms and directory tree are a bit of a pain in the rear.. and the installer gets unhappy if the files are already there.
16:17 quantumriff by pain in the rear.. we need to setup some volumes first, then mount them..  so part of the manual install is setup some new volumes on our SAN
16:17 quantumriff I do have the /etc/fstab done with salt, which is nice.. but we need to  setup the LUN's and add them, or else then they won't mount, since the directory mount pont would not be empty
16:17 MTecknology what is this software? (out of curiousity)
16:17 quantumriff Oracle
16:18 MTecknology you install oracle?...
16:18 quantumriff the worlds most IT friendly product..  (where is the gif with a gun to a head) :)
16:18 TheThing joined #salt
16:19 quantumriff yeah.. every db instance gets its own LUN, and they may be on different SAN's
16:19 Ahlee_ heh, I feel you quantumriff.  I installed via puppet and before that cfengine
16:19 AdamSewell joined #salt
16:19 MTecknology so you mean oracle database, not oracle?
16:19 quantumriff yes, sorry.. oracle db
16:19 Ahlee_ oracle: keeping IT stuck in the 80s
16:20 MTecknology +1
16:20 ecdhe I can't believe the heat salt is taking on it's own mailing list.
16:20 quantumriff but, if its possible to mix something like a cmd.wait, and a check if file exists, along with a file.managed..
16:21 MTecknology My desk currently smells like burning electronics...
16:21 Ahlee_ ecdhe: ?
16:21 MTecknology I can barely smell, but I can smell that and have no clue where it's coming from.
16:23 MTecknology ecdhe: have links?
16:23 herlo I am not sure if I recall this correctly, but I recall seeing a feature where I could put the word 'names' and then list the names of things, like users or something. Is that still a thing?
16:23 Ahlee_ oh the salt not ready for prime time topic?
16:24 UtahDave herlo: Yeah, names is still a thing.
16:24 herlo UtahDave: looking for an example.
16:25 ecdhe MTecknology,  one sec.
16:25 thayne joined #salt
16:26 ecdhe MTecknology, https://groups.google.com/forum/#!topic/salt-users/iZYzVGtKOqQ
16:26 active8 joined #salt
16:26 UtahDave herlo: https://gist.github.com/UtahDave/21326a28dd0295c17851
16:27 herlo UtahDave: thanks, it's hard to search 'saltstack names' and get something reasonable. :)
16:27 UtahDave herlo: definitely
16:27 herlo UtahDave: I assume that will work on pkg.installed, too?
16:27 UtahDave laubosslink: can you pastebin your sanitized proxmox provider file?
16:27 quantumriff ecdhe: to be fair.. My master seems to hang every 2 weeks or so.. It fails to stop the service, I have to kill all the processes.. but a cronjob to restart it weekly fixes the problem
16:27 herlo UtahDave: rather, selinux booleans. :)
16:28 UtahDave herlo: yeah, but there's a special one for the pkg state.  use  - pkgs  instead of - names
16:28 quantumriff and some of the stuff is a bit buggy.. like the iptables stuff apparently works well on ubuntu.. But not much at all on centos
16:28 herlo UtahDave: right, sorry. I did that already. :)
16:28 UtahDave - pkgs will install that list of packages with one call to your package manager
16:28 cym3try i have created a pillar for AWS EC2 disk layout (https://gist.github.com/jamesattard/2de009959554f6719a40) - how can i loop through the disks from a state file? I was trying to use {% for block_name in pillar.get('ec2disklayout',{}).items() %} but I just want the disks block
16:28 herlo UtahDave: selinux booleans, sorry.
16:28 MTecknology ecdhe: ah, ya.. it's still incredibly young and shows its age. There's also been massive leaps in progress with preventing a lot of issues. With how fast it's developed, it's not surprising that crap pops up.
16:29 UtahDave herlo: yeah, - names    happens in the Salt state compiler, so it works in any state where all the options apply to all the "names"
16:29 herlo UtahDave: great, thought so but wanted to doublecheck.
16:30 UtahDave MTecknology ecdhe There are legitimate complaints and we're working really hard to smooth out our release process. We have a director of QA (or some title like that) who starts on Monday.
16:31 UtahDave laubosslink: what version of salt are you on?
16:31 UtahDave ok, just a sec
16:31 Eugene joined #salt
16:31 ecdhe salt has been more than stable for me, perhaps because I avoid the bleeding edge.
16:32 UtahDave Yeah, it's definitely production worthy. It's in use in some of the largest environments in the world.  The problem is that when a bug stops you personally on a project, that's really painful.
16:33 Sacro Any admins around? I keep getting a 3.7KB Salt installer :(
16:33 UtahDave So we're putting a lot of resources toward improving quality
16:33 UtahDave Sacro: where?
16:34 Sacro UtahDave: downloading the Windows 2014.7.10 msi's
16:34 Sacro had it on 32 and 64 bit :(
16:34 Sacro first download hung, second was 3.7KB, 3rd worked
16:34 mpanetta joined #salt
16:34 Sacro I feel like Goldilocks
16:34 mateosik How much does minion need ram?
16:34 berto- I have an issue with mine data.  I’ve set mine_functions in a mine.sls pillar that is included in top.sls.  Seems like I have to restart the minion before I get any mine data populated, even if I explictly call mine.update.
16:35 notpeter_ joined #salt
16:35 Sacro mateosik: like a fish needs water
16:35 berto- I’m always scared to call salt ‘*’ cmd.run ‘restart salt-minion’ … ;)
16:36 mpanetta joined #salt
16:36 herlo berto-: be bold! :)
16:36 Ahlee_ oh god
16:36 Ahlee_ the last time I did that i wound up with a couple hundred dead minions.
16:36 Sacro berto-: i'm trying to upgrade Windows minions remotely
16:36 Sacro it's not easy :(
16:36 berto- herlo: Oh, I haven’t held back, but pushing the button has a distinct “oh $#!+” moment.  :)
16:37 UtahDave laubosslink: I have to run to a meeting.  I'll look deeper into this when I get back.  If you want to open an issue on this, that would be very helpful
16:37 Ahlee_ Sacro: I'm about to start down that path.  What method are you trying?
16:37 Sacro push msi, push ps1, push bat, run bat, hope that it calls ps1 to run iinstaller, sed host / port, restart service
16:37 Ahlee_ Sacro: I'm planning to run a state that installs the new version, then calling external to salt to all the windows boxes to restart via WMI calls
16:37 Sacro WMI would be useful but I don't know how to set it up!
16:37 Eugene joined #salt
16:38 mateosik Will minion run with 15mb ram :>?
16:38 berto- Still, feels like some sort of saltutil.sync_all + mine.update … anything should keep me from restarting the minion entirely.  Sledgehammer should not be necessary.
16:38 herlo berto-: hehe
16:38 Sacro if only salt msi could accept a non-standard port
16:38 Ahlee_ Sacro: Roll your own build
16:39 Ahlee_ Sacro: change hte config and push your own msi out with the chnages included
16:39 herlo berto-: I personally went with the minion only strategy. The minion doesn't even have to be running to perform tasks on my boxen. Instead, a cron job does a regular 'salt-call' for my nodes.
16:39 herlo berto-: but if you have more than say, 30 boxen, you'll need an easy way to deploy values those machines.
16:39 Sacro Ahlee_: how?
16:39 Sacro herlo: puppetesque
16:40 govg joined #salt
16:40 herlo berto-: if say, I were using salt on my production environment, I'd use the master -> syndic -> minion pattern.
16:40 berto- herlo: Getting there; this project is at 25 already and expecting to grow.  The minion running isn’t the problem.  I just want mine data to update as I assume it should.
16:40 herlo Sacro: somewhat. I do use puppet on our production environment now.
16:40 govg left #salt
16:41 herlo berto-: aye.
16:42 anotherZero joined #salt
16:42 Ahlee_ Sacro: http://docs.saltstack.com/en/latest/topics/installation/windows.html#setting-up-a-windows-build-environment
16:43 Sacro Ahlee_: not running Windows here
16:43 ujjain joined #salt
16:43 Ahlee_ but you clearly hve windows hosts
16:44 Sacro Ahlee_: yeah, true
16:46 berto- This seems similar to the problem I’m running into: https://github.com/saltstack/salt/issues/11501
16:47 schimmy joined #salt
16:48 thedodd joined #salt
16:48 cym3try If my pillar.items is https://gist.github.com/jamesattard/e88749a3bd863fab8e2d how can i access the disks list from jinja?
16:49 ramishra_ joined #salt
16:49 cym3try i tried {% for block_name in pillar.get('ec2disklayout:disks',[]) %} but it's not getting anywhere
16:50 babilen joehh: Thanks for your comments regarding packaging. I also completely agree with you. There might still be a good way to go about things and I would like to see a .10 upload to wheezy-backports, but I simply felt as if we have a perfectly adequate infrastructure already in Debian and don't necessarily have to replicate it.
16:50 ramishra_ joined #salt
16:51 berto- cym3try: try salt[‘pillar.get’]([...])
16:51 foxx does anyone know a way to get latest salt onto 14.04 using repo?
16:51 foxx uh
16:51 foxx onto 12.04*
16:51 berto- cym3try: with `pillar.get` you’re running the dictionary’s `get()`, to run pillar’s `get()` you need to call it via `salt[]`.
16:52 herlo foxx: repo as in the google tool?
16:52 cym3try berto-: but i want to run it from an .sls file for templating
16:52 herlo foxx: https://code.google.com/p/git-repo/
16:52 foxx herlo: sorry no, i mean being able to do apt-get install salt
16:52 berto- cym3try: % salt[‘pillar.get’]() %}
16:52 herlo foxx: why would apt-get not work?
16:52 berto- cym3try: oop … {% salt[‘pillar.get’]() %}
16:52 foxx because 12.04 installs an older version
16:52 herlo foxx: are you missing something in your sources.list?
16:52 foxx and the master is on 14.04
16:53 herlo foxx: ppa would be helpful probably.
16:53 foxx i guess i could just put 14.04 repo into the sources.list.d
16:53 foxx ppa forces 12.04 on 12.04 lol
16:53 herlo foxx: don't think that would work.
16:53 foxx herlo: yeah, nor me lol
16:53 berto- cym3try: and make sure your `file.managed` entry has `- template: jinja`
16:53 foxx but im going to try anyway
16:53 bhosmer joined #salt
16:53 herlo foxx: what version of salt do you want? I think that's what you need to get.
16:53 herlo foxx: probably not the latest, something stable maybe?
16:54 foxx hmmm
16:54 * herlo isn't an ubuntu user, but knows there are many ppas of salt out there. The other option is to use pypi.
16:54 foxx actually, i might be going crazy here
16:54 foxx apparently im running 2014.1.10
16:54 quickdry21 joined #salt
16:54 foxx but yesterday i was running 2014.7
16:54 foxx the fuck
16:54 foxx ignore everything i just said, i think sleep deprevation is messing with my mind heh
16:54 herlo okay, :)
16:54 herlo foxx: good luck.
16:55 ramishra joined #salt
16:58 Gareth 'lo
16:58 rap424 joined #salt
17:00 rap424 joined #salt
17:00 davet joined #salt
17:03 btorch is there an option to stop cmd.run state from displaying what it does ? I have tried using quiet: True and also output_loglevel: quiet
17:03 herlo Gareth: halo!
17:03 bezeee joined #salt
17:05 forrest joined #salt
17:08 Ryan_Lane joined #salt
17:09 bezeee joined #salt
17:11 aw110f joined #salt
17:11 saurabhs joined #salt
17:13 Gareth herlo: hows it going? :)
17:14 herlo Gareth: going alright. Still need to write up my bug from yesterda.
17:14 herlo yesterday, even.
17:14 herlo Gareth: making progress though, so that's good.
17:14 herlo Gareth: you doing pretty good today?
17:16 rgarcia_ joined #salt
17:16 foxx herlo: yup im dumb, it worked fine the whole time.
17:17 foxx lack of sleep is a powerful thing :/
17:17 herlo foxx: not dumb, just tired. :)
17:17 jslatts joined #salt
17:17 foxx *nods*
17:18 vlcn anyone have any ideas on the best way to determine if an integer is even or odd in jinja?
17:18 thayne joined #salt
17:18 Gareth herlo: day just starting here :)  about to continue working on some puppet manifests.
17:18 herlo Gareth: you work bankers hours or something?
17:19 herlo It's like 10am there. I love those hours. :)
17:19 Gareth herlo: usually 9:30am to 6ish.
17:19 Gareth herlo: I didn't jump on IRC right away. :)
17:20 herlo Gareth: riiiiiight.... :D
17:20 herlo Gareth: I think bankers are about the same hours, btw. hehe.
17:21 Gareth bankers finish earlier :)
17:22 forrest Gareth, you should use the salt puppet stuff :P
17:24 herlo Gareth: lol
17:24 wendall911 joined #salt
17:27 bhosmer joined #salt
17:31 rap424` joined #salt
17:31 Thiggy joined #salt
17:32 linjan joined #salt
17:33 bhosmer_ joined #salt
17:34 Ainieco joined #salt
17:34 Ainieco hello
17:34 forrest Ainieco, hello
17:37 pjs joined #salt
17:38 Ainieco i want to create some kind of init sls which will encapsulte different sls together so it's easy to include it in top.sls, how can i do it? i hope that paste will make it clearer http://vpaste.net/apd3M
17:38 Ainieco i mean what should i write in project.init to achieve that?
17:39 eightyeight i'me sure this had made the rounds already: http://ryandlane.com/blog/2014/08/04/moving-away-from-puppet-saltstack-or-ansible/
17:39 supplicant like 8 times
17:39 eightyeight then there's the 9th
17:40 Ainieco is it even possible to do what i want? please let me know if it's not clear what i'm on about
17:41 pjs Ainieco, you want to include a state file that includes other state files? Yes, it's possible
17:42 Ainieco pjs: how?
17:43 pjs Aineico, in top include your base state (I call mine "common").. in common, include the common packages you want.. I use pillars to populate the data and a macro to populate the state file
17:45 Ainieco pjs: thanks for tip!
17:47 jaimed joined #salt
17:50 wendall911 joined #salt
17:52 ckao joined #salt
17:52 intellix joined #salt
17:52 bastion1704 joined #salt
17:54 Ainieco how to get nested value from pillar? say i have http://vpaste.net/IjdbC how to get 1?
17:55 mapu joined #salt
17:56 Ainieco sorry for stupid questions, just starting out with salt
17:56 bastion1704 did someone tried the salt.modules.xmpp ?
17:56 bastion1704 from  minion :     'xmpp.send_msg' is not available.
17:57 cpowell joined #salt
17:58 forrest Ainieco, you can use {{ salt['pillar.get']('foo:bar', 'default') }}
17:59 Ainieco forrest: is it going to work if i'll write {{ pillar.get("foo:bar") }}?
18:00 dvestal joined #salt
18:05 kermit joined #salt
18:08 ramishra joined #salt
18:09 icebourg joined #salt
18:11 Ainieco nope
18:16 modafinil_ I'm having a lot of trouble setting up git_pillar -- keep getting crap like "fatal: unable to connect to git@github.com:"
18:16 modafinil_ (it's not a firewall or dns issue)
18:17 modafinil_ I've tried specifying the repo like: https://github.com/foo/bar.git + git://git@github.com/foo/bar.git -- get the same error regardless
18:17 modafinil_ I haven't had any problems getting my state files out of git (using a git+ssh://) -- but pillar just refuses to accept any format
18:17 modafinil_ any guess why it would be trying to look up "git@github.com" erroneously?
18:18 UtahDave modafinil_: can you pastebin your sanitized git_pillar section?
18:18 modafinil_ sure, one sec
18:19 Ainieco will cmd.run wait until user is created if i've cmd.run.user?
18:19 druonysus joined #salt
18:20 druonysus joined #salt
18:20 modafinil_ UtahDave: https://gist.github.com/jzellner/ed0d1191adb114075875
18:20 Ainieco or how to make it wait?
18:20 modafinil_ (i've also tried git+ssh://, 'git@github.com' or just 'github.com', etc.)
18:21 modafinil_ UtahDave: and this works for our states (different value of 'bar') https://gist.github.com/jzellner/b5abe56af8d3edfd107f
18:21 Ainieco probably i need to user cmd.wait.watch: my_user
18:22 Ainieco but i what that cmd to be executed only when user is created
18:22 Ainieco how can i do it?
18:23 UtahDave modafinil_: can you pastebin the output you're getting?
18:23 druonysuse joined #salt
18:23 druonysuse joined #salt
18:24 UtahDave modafinil_: I think that first configuration looks correct.  You'll need to make sure that your root user (or whatever user you're running Salt as) can checkout that repo
18:24 jaimed joined #salt
18:24 modafinil_ yeah, i can do it manually as root
18:25 modafinil_ https://gist.github.com/jzellner/4daf1721304abef167e7 errors
18:25 rojem joined #salt
18:25 modafinil_ (of note it *always* says 'git@github.com' even when I have 'https://github.com/' with no user specified, like it's considering that a dns host name)
18:29 modafinil_ https://gist.github.com/jzellner/958edbc764b1fdea95fc -- just reverified i can clone by hand as root, and fail in logs
18:30 Ainieco http://vpaste.net/H0YxF how to make it work?
18:30 Ainieco - require: - my_user is wrong but how to fix it?
18:30 beneggett joined #salt
18:31 modafinil_ Ainieco, I think you want 'watch: - my_user'
18:31 modafinil_ Ainieco http://docs.saltstack.com/en/latest/ref/states/requisites.html#watch <-- only on change
18:32 modafinil_ (looks like the docs suggest using 'onchanges' instead though, same effect)
18:34 bastion1704 UtahDave, is salt.modules.xmpp works ?
18:34 bastion1704 from  minion :     'xmpp.send_msg' is not available.
18:34 Ainieco modafinil_: well, what if there is no changes? user already created, then i'm adding that code and nothing happens because there is no changes
18:35 Ainieco i guess i need to require user home instead of user...
18:35 forrest Ainieco, sorry I had to hop on a call
18:35 modafinil_ Ainieco: right, that will only happen when the user is created (or changed) -- not sure how you'd handle it if the user is already created, maybe just running a state manually
18:35 Ainieco no problems
18:35 modafinil_ (or using an unless clause in the cmd)
18:36 modafinil_ if you can test to see if its already run
18:36 v0rtex I see in e.g. salt-formulas/apache where the apache-restart state is set up with module.wait (which I was unfamiliar with until today). Two questions: 1) Is there really a difference between that and using watch_in: -service: apache? 2) if not, would one way be considered a best practice over the other?
18:37 Ainieco yeah, i think best option here is just require file: /home/my_user and prevent multiple execution with unless.
18:37 modafinil_ Ainieco, sounds reasonable to me :)
18:38 forrest v0rtex, you know I'm not really sure as to why that is in there, whiteinge are you around?
18:39 Ryan_Lane joined #salt
18:40 v0rtex yeah, I was tempted to ping whiteinge about it - he seemed to be pretty in-the-know about the salt-formulas at the salt training I attended
18:40 jcl joined #salt
18:41 forrest v0rtex, yea, I'm just not sure what the reasoning is behind that
18:42 whiteinge v0rtex: that's in there to avoid hard-coding either reload or restart in the service state itself
18:42 jcl hi all, i'm having trouble installing the salt ppa on newly built ubuntu trusty servers. add-apt-repository ppa:saltstack/salt (which works on my precise systems) says it cannot add the ppa, please check that the ppa name or format is correct
18:42 icebourg joined #salt
18:44 forrest jcl, let me spin up an lxc real quick, hang on
18:47 v0rtex whiteinge: in my apache state I have service.running and my understanding is that watch has the additional behavior of restarting the service for you, correct?
18:47 jcl forrest, cool thanks! I've not used linux containers, I may have to give them a whirl.
18:47 modafinil_ jcl: add-apt-repository ppa:saltstack/salt works for me on trusty (i can try to repro for you tho)
18:48 jcl it is possible it's something in my server configuration, network acl, etc. but since i'm not sure yet, i thought it might help to at least rule it out here :)
18:49 jcl ah, it may be a proxy issue...
18:49 bhosmer__ joined #salt
18:49 bhosmer joined #salt
18:49 modafinil_ yeah, definitely works for me
18:50 jcl yup, my proxy wasn't configured to allow access to launchpad.net, sorry for bugging you all (but maybe good to know how this fails for future reference :)
18:51 jpaetzel joined #salt
18:53 jpaetzel joined #salt
18:54 whiteinge v0rtex: (sorry meatspace conversation going on) you are right about that
18:57 forrest jcl, no worries, on that note, trusty has some ODD proxy crap they do, so make sure if you need proxy access, you run as sudo -E
18:57 forrest jcl, otherwise commands requiring the proxy fail, why? I don't know, whoever made that decision should feel bad
18:58 smcquay Ahlee_: thanks, cranking it further up (was at 120
18:58 v0rtex whiteinge: np. I'm just trying to understand the overall behavioral differences between the way it's done in the apache formula and how I'm currently doing things
18:59 forrest whiteinge, is there anyway we could get around those being in the init? Could they go into another service.sls state or something? I can see how new users could be really confused since apache is a pretty common thing to install
19:00 transmutated joined #salt
19:01 bhosmer joined #salt
19:02 jcl forrest:: good to know. I'm actually running the commands as root (i know, i know...) so the sudo env isn't the issue. the problem in my case was that the squid proxy (which i also built and manage) just wasn't allowing access to launchpad.net like it was for ubuntu.com and canonical.com
19:02 forrest jcl, ahh
19:02 jcl which is weird because previous add-apt-repository commands had worked, at least on precise (which may be to your point)
19:03 transmutated I'm use cmd.run to add id=$hostname to my minion config. For some reason, the hostname variable always spits out the salt master hostname. Running hostname, it's the minion hostname.
19:03 transmutated Is this expected?
19:03 troyready joined #salt
19:04 dude051 joined #salt
19:04 v0rtex forrest: in my case I actually have my own apache states and it's more of a clarification/understanding point for me so I wouldn't say moving those would benefit me but if others get confused I understand
19:05 forrest v0rtex, totally
19:05 jcl hey, while i'm here, i have another question on good practices (well, lots of questions really but i'll stick to this one): how do you manage grains? i've added values to /etc/salt/grains on my minions but if i have to rebuild a server, i would need to recreate that grains file. is there a good way to manage those files?
19:06 forrest jcl, uhhh, not that I can think of other than just storing them in git or something, and then managing them with the master via git checkout
19:06 steveoliver joined #salt
19:07 dude051 joined #salt
19:07 jcl forrest: i'll have to think that over. we use perforce (not really an issue vs git) but i'll have to think about the workflow, e.g. editing /etc/salt/grains would require checking it out from version control, edit, submit, log on to server and p4 sync -- more complex than i'd like so i'll have to think about it more
19:09 forrest jcl, could you not create the grains during system provisioning?
19:09 forrest jcl, then you could drop them in, and the salt minion will pick them up on first run when you drop in the conf and start it
19:11 jcl I probably could, I'd just have to figure out an approach for that. I'd need to define in advance what grains should go on each system and have something (probably a Cobbler script) generate the appropriate file and have the server wget it...or something like that. I'm just now digging into cobbler's templating system, so maybe I'll find something in there to help out with this.
19:11 forrest jcl, gotcha
19:11 jcl I'd need to figure out where to define the per-system grains and have the build process pull from that source and generate the /etc/salt/grains files
19:12 v0rtex while it's on my mind, we added a bunch of our existing servers as salt minions recently and one of our IT guys had a concern I didn't know how to answer for him: he wants to be able to update packages on all the systems but confirm the list of packages for each before they update. I told him that when he runs the salt command it is run asynchronously but he wants some way to manually confirm on each server so he can make sure that certain package vers
19:12 v0rtex ions don't get installed due to known compatibility issues with our software.
19:12 v0rtex I don't know what approach I can offer him other than what he's doing now where he logs into each server and does it manually
19:14 forrest v0rtex, for situations like that, why not user the version option for pkg.installed? You can populate the version from pillar data, so just update pillar, run it across machines with test=True, and then run it if all looks good?
19:14 forrest v0rtex, unless you have a ridiculous amount of conflicts, it should be minimal work, and provide a good way to roll back in case of emergencies.
19:15 forrest v0rtex, unless you're just doing an 'update all' in which case, booooo
19:15 jcl ok another question: suddenly i am getting "Unable to render top file. No targets found." when running state.highstate on my minions. My /srv/salt/base/top.sls file looks okay.
19:15 Ainieco hm, i have this http://vpaste.net/xqvla but salt tells that it can't find  requisites "file: /home/dashport"
19:15 Ainieco s/dashport/my_user
19:16 peters-tx joined #salt
19:16 whiteinge v0rtex: you can modify the default 'watch' behavior of the service state by putting ``reload: True``. but if you do that if affects everything with a watch requistite. those two modules.wait states allow other states to either reload or restart depending on what behavior is desired
19:16 v0rtex forrest: I suspect he likes to just go in and do something akin to apt-get update && apt-get upgrade
19:16 Ainieco do i have to explicitly create sls with something like /home/my_user: - present?
19:17 Ainieco 'test -e /home/my_user && echo "ok"' returns "ok"
19:17 v0rtex whiteinge: that makes sense
19:17 bezeee joined #salt
19:22 whiteinge forrest: those two states in init.sls are inert. they're in init.sls because they're conceptually similar to working with the service state itself
19:22 berto- In the states’ top.sls file is it possible to use a regex match and then use the capture groups?
19:24 bhosmer_ joined #salt
19:25 bhosmer joined #salt
19:27 bastion1_ joined #salt
19:28 manfred berto-: there is not
19:28 berto- manfred: bummer.
19:30 Ainieco anyone?
19:31 manfred Ainieco: you need an actual state that is named /home/my_user
19:31 manfred like
19:31 manfred /home/my_user:
19:31 manfred file.directory
19:31 manfred that will be able to say, yes this directory exists
19:31 manfred saying file: /home/my_user doesn't create the state, it references another state that you need to include
19:32 Ainieco manfred: ah, thought so, thank you for poinying it out!
19:32 manfred !states.file.directory | Ainieco
19:32 wm-bot4 Ainieco: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.directory
19:32 manfred np
19:35 bezeee joined #salt
19:35 forrest whiteinge, yea, but does that create confusion?
19:35 forrest manfred, bored already?
19:38 ksalman is it going to be a problem if my custom grain function is called os_data()? Seeing as there is a os_data() in https://github.com/saltstack/salt/blob/2014.1/salt/grains/core.py
19:39 jcl i've started getting the error "Unable to render top file. No targets found." I've boiled my top file down to the bare minimum and run it against just the master and still seeing this. Any ideas? https://gist.github.com/Calygos/753ebb7cef93da8a553a
19:39 manfred forrest: waiting on my brother to pick me up to go to dinner
19:40 forrest manfred, dinner?? Isn't it only 4 there?
19:40 manfred forrest: it is 3:40, we gotta go pick up tuxedos and stuff first
19:40 forrest jcl, are you able to apply a highstate to a single system?
19:40 forrest manfred, oh I see
19:40 jcl forrest: no. And I was able to yesterday.
19:40 jcl but I can apply individual states
19:40 forrest jcl, ok, do any of the states fail?
19:41 jcl well nothing runs when i try highstate but individual states work, e.g. salt '*' state.sls ntp.client works fine
19:42 forrest jcl, ok, at this point then I'd suggest to review the changelog for each state, and run those that you know were modified from yesterday
19:42 forrest jcl, could be one of those has issues and it's trickling up
19:43 martoss joined #salt
19:43 jcl well...i haven't been modifying states exactly and I'd just started putting my states into version control (perforce) but more likely the culprit may have to do with how I was playing a bit with the file_roots structure. however, i've reverted everything (i think, as it all looks normal) but can't figure out what's breaking
19:44 jcl if you look at the gist i provided, it's very trivial
19:44 forrest yea I looked at it
19:44 TheThing joined #salt
19:44 forrest jcl, can you try salt '*' saltutil.clear_cache
19:44 forrest just to clear the minion cache
19:44 jcl thmm, never run that, i'll give it a go
19:44 forrest jcl, http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.clear_cache
19:44 forrest that's what it does
19:44 forrest I don't see WHY it would help
19:45 forrest is your master a minion as well?
19:45 jcl says it's not available?
19:45 forrest uhhh from the master?
19:45 jcl yep
19:45 forrest oh I forgot that's in 2014.7
19:45 forrest sigh
19:45 forrest there's even a version add
19:45 jcl i'm running 2014.1.7-1precise1
19:45 jcl on the master
19:45 forrest yea it won't be there then
19:45 forrest my bad
19:46 jcl i can upgrade
19:46 jcl i only have salt on like 5 systems (well 10 now with my newly built ones as of yesterday)
19:46 forrest jcl, it isn't out yet :P
19:46 jcl oh :)
19:46 forrest it's only in a release candidate clearly
19:46 jcl i'm still new to salt, so much to learn
19:46 forrest jcl, does it fail even when directly targeting a specific system with a state.highstate?
19:47 jcl yes, even targeting the master, as the gist shows
19:47 forrest let's try this, do the same command as before, but add -l debug
19:47 forrest then see what the debug logging has to say, if anything else
19:47 jcl it says "hey, i work now for no good reason!" o.O
19:48 _r00k joined #salt
19:48 forrest lol
19:48 jcl great, now they all work fine it seems
19:48 forrest even without the debug logging?
19:48 forrest or did you just try to run it again without that?
19:48 forrest someone is messing with you I think :P
19:48 jcl yep, it worked with the debug, so i removed that and it still worked
19:48 jcl i'm reverting back to my larger top.sls and testing that now
19:49 forrest cool
19:49 jcl well it's all looking happy now :P
19:49 jcl that was strange, but thank you for the help!
19:49 _r00k Anyone familiar with the problem of centos machines showing as localhost? the centos machine itself is configured correctly and knows its proper hostname, however in salt it appears as localhost. this isn't happening with my debian machines. I have the most basic of setups (installed, ran, done)
19:50 forrest jcl, always happy to do absolutely nothing!
19:51 jcl you sound like my colleagues j/k
19:51 forrest heh
19:51 jcl :)
19:52 forrest _r00k, there's a process that salt goes through where it tries 3 different methods to determine the hostname, I'm trying to find it.
19:52 _r00k forrest, thanks. I've been googling this for hours, but with so many generic IT terms it's been a pain to find anything useful.
19:52 forrest _roo
19:53 forrest _r00k, yea, I know one of them uses the python fqdn check
19:53 forrest _r00k, socket.getfqdn()
19:53 _r00k forrest, thanks, I'll see what I can find there
19:53 forrest _r00k, open a python shell, import socket, and see what that shows
19:53 forrest I know a while back this was a problem for someone else as well
19:54 forrest _r00k, sounds good
19:54 bastion1704 joined #salt
19:54 foxx is there any way to keep the minion from perm dying on error with ubuntu? e.g. if the service dies, make it auto restart?
19:55 _r00k forrest, python on the local centos machine knows its fqdn. looking up a way to check it over the network real quick (my python is a bit rusty =\)
19:56 forrest _r00k, it should be checking that when the minion starts. By default it uses that I believe, you haven't set the id value in the minion config right?
19:56 forrest because it's trying to send 'localhost' as the auth key to the master?
19:56 jcl foxx: it looks like the /etc/init/salt-minion.conf upstart job configuration disabled respawning, it's commented out in that file so you can try uncommenting it to see if it works for you
19:57 foxx jcl: oh shit, nice catch, thanks man
19:57 _r00k forrest, oh, that value gets generated by the minion and then sent when it connects? let me look at a couple things real quick (I'm using auto-accept=True while I get everything setup at first)
19:57 jcl foxx: you're welcome, glad i could finally provide some help here rather than just asking for it :)
19:57 foxx haha
19:57 foxx altho im guessing that "SaltClientError" causing the minion to hard crash is a bad thing
19:57 forrest _r00k, yea, so basically what happens is you start the minion service, and it creates the connection to the master, sending the data over. In a normal setup you'd then hop on the master, and accept the key if it looks good (either by checking name, or double checking the key itself matches)
19:59 occupant joined #salt
20:00 Ryan_Lane joined #salt
20:01 _r00k forrest, really strange. the centos box definitely knows its name, even with the python getfqdn function. i stopped the minion service, removed the key from the master and then started the minion service again to try and flush incorrect information out, but it comes right back as localhost
20:01 forrest _r00k, did you make sure to remove the key from the minion?
20:01 _r00k forrest, anyways, you gave me some good info to start with. i'll do some more research and hopefully be back with an answer a bit later. thanks :)
20:02 forrest _r00k, yea, there are other ways it uses if it can't find the fqdn with that function, but that should be the first way. I couldn't find the docs that show the other ways unfortunately
20:02 rojem joined #salt
20:02 savvy-lizard joined #salt
20:03 manfred forrest: aight I am out, don't go crazy
20:03 forrest manfred, have fun
20:04 forrest _r00k, the minion key should be down in /etc/salt/pki/minion. Try to trash all of those, then restart the service and see what happens
20:04 dude051 joined #salt
20:04 gildegoma joined #salt
20:05 _r00k forrest, that did it. not sure why it got in there as localhost in the first place, but when I removed the key on the master I didn't remove the key on the minion. I went back and axed everything on the minion, then removed the key on the master, started salt up again on the minion and everything is golden
20:05 forrest _r00k, ok, that seems to me then like the minion service is perhaps being started prior to hostname changes?
20:05 _r00k forrest, i wish i understood what happened in the first place, but i'll take working over not working any day. thanks for your help :)
20:05 forrest _r00k, yea np.
20:05 jaimed joined #salt
20:06 CF495677 is it possible to use minionfs in a state? all the examples here are just using the command line http://docs.saltstack.com/en/latest/topics/tutorials/minionfs.html
20:06 manfred CF495677: sure
20:06 manfred CF495677: just reference it with salt:// like normal
20:06 Ryan_Lane1 joined #salt
20:06 manfred forrest: and now I am logging off
20:07 FeatherKing weird nic
20:07 FeatherKing thanks manfred
20:09 goal joined #salt
20:13 jaimed joined #salt
20:14 icebourg joined #salt
20:14 jaimed joined #salt
20:15 icebourg joined #salt
20:16 bezeee joined #salt
20:19 ggoZ joined #salt
20:20 modafinil_ anybody else have any pillars-in-git ideas? still getting connection errors, really not sure whats going on
20:20 modafinil_ or even just a working config? :D
20:22 quantumriff I use this jinja function quite a bit in my states: {{ salt['pillar.get']('client', '')|first }}  is it okay to reuse multiple times? or is it prefered (and maybe faster) to resolve that once, and assign it to a variable?
20:23 modafinil_ quantumriff: i believe it would be faster to keep in a variable, but i also doubt its a huge performance hit doing it the other way, barring something really crazy
20:24 quantumriff thats what I'm figuring.. does the minion get sent all of its pillars at the start of a new job? or does it request from the master each time?
20:25 modafinil_ it does not request each call, i don't know the exact specifics and am basically making this up, but i'm pretty sure its cached within a job
20:25 * modafinil_ is a confident bullshitter
20:25 quantumriff modafinil_: thanks.. that was my thought too
20:28 shannonman joined #salt
20:29 modafinil_ ah-ha I think I've got something to go on re: pillars in git -- https://groups.google.com/forum/#!topic/salt-users/nmVlTSHalpY
20:29 modafinil_ cc UtahDave if you're interested in what I think was the problem
20:29 forrest modafinil_, he's been afk all day
20:29 icebourg joined #salt
20:29 modafinil_ no worries, he tried to help me earlier, just wanted to followup
20:29 modafinil_ ty though
20:29 forrest modafinil_, for sure, just didn't want you waiting around all day :P
20:35 jaimed joined #salt
20:35 scbunn joined #salt
20:36 modafinil_ welp, didn't work anyway boo
20:38 Ainieco is it possible to use jinja with pillar inside "source" of file?
20:38 Ainieco just what to use pillar info in config file
20:38 forrest Ainieco, you mean inside templated files that you drop on with file.managed right?
20:40 Ainieco forrest: i mean inside http://vpaste.net/nxt2e salt://my_file
20:40 forrest Ainieco, absolutely. add - template: jinja to the file.managed
20:40 forrest Ainieco, you should take a look at this blog post I wrote a while back about setting up a static blog: Ainieco, If that's what you mean, absolutely. just add - template: jinja to the file.managed section, and you can reference pillar like normal. Take a look at this blog post I
20:40 forrest wow copy pasta fail
20:40 forrest yes you can, use - template: jinja, take a look at this article http://hungryadmin.com/building-a-static-blog-and-deploying-it-with-saltstack.html
20:41 Ainieco forrest: it worked, thank you!
20:41 FeatherKing seems like everything i read on minionfs only uses cp.push as the mechanism. what i am trying to do is generate an ssh key on a slave and copy it up to the saltmaster so i can copy it around to other minions. Id like to do it in the init.sls for my server but there is no cp.push state
20:41 forrest Ainieco, np
20:42 beneggett joined #salt
20:45 ksalman is it going to be a problem if my custom grain function is called os_data()? Seeing as there is a os_data() in https://github.com/saltstack/salt/blob/2014.1/salt/grains/core.py
20:48 tligda joined #salt
20:48 rallytime joined #salt
20:49 modafinil_ okay, i have finally prevaild -- the problem was changing the git remote for pillars wasn't actually *correctly* changing the repo remotes on disk
20:50 modafinil_ i had to rm -rf it, and then it worked no problem
20:50 modafinil_ BOO
20:50 v0rtex does the 'sls' context variable contain anything while rendering state files through Jinja? Logically I'm thinking it wouldn't since it's still rendering the Jinja.
20:52 v0rtex ...my sleep-deprived brain is just thinking weird today so I wanted to make sure my logic is correct :)
20:58 madphoenix joined #salt
20:59 madphoenix Hi all, quick question.  The best practices guide in the salt documentation makes several references to the "slspath" variable, used (for example) when importing map.jinja files.  However when I try to use it, I get jinja compilation errors.  Is that actually a usable variable, or is it just a placeholder in the documentation?
21:01 viq joined #salt
21:01 btorch is there a way to have salt.states.file.replace delete a line where a search match happened ?
21:02 btorch do something like sed -i '/hwraid/ d'  /etc/file
21:02 Sauvin joined #salt
21:03 bezeee joined #salt
21:04 Linuturk UtahDave: so, for some reason the password still isn't being set via the api on Windows builds. RE https://github.com/saltstack/salt/pull/14748 << i tested this locally and no love. I think we might have used the wrong var. manfred
21:04 bezeee joined #salt
21:04 Linuturk and, maybe because that's first gen
21:04 Linuturk not openstack
21:04 Linuturk lol
21:05 Linuturk let me figure out the openstack one
21:08 whiteinge forrest: https://github.com/saltstack-formulas/apache-formula/blob/master/apache/init.sls#L12
21:08 whiteinge you're right
21:09 whiteinge v0rtex: ^^
21:11 occupant joined #salt
21:13 moreda joined #salt
21:14 moreda Hi. I'm revisiting the problem of the pkgrepo state module that requires a "require_in" in order to be effective
21:15 moreda is that still true? I mean: it's still true that a simple "require" in a pkg doesn't work as expected?
21:16 moreda :)
21:16 icebourg joined #salt
21:17 icebourg joined #salt
21:19 Ahlee_ woo I'm on the list to talk about salt at hte chicago devops summit
21:21 jemejones_ joined #salt
21:22 ksalman what does this error mean "Unable to determine upstream hash of source file settings/repo/sl.repo"
21:25 ksalman oh, i just forgot salt://
21:25 ksalman and it thought the file is sitting somewhere not locally, i guess
21:27 khaije1 is the parent directory's name available as a variable in a state file? (or perhaps it should be set using a map.jinja file?)
21:27 UtahDave Ahlee_: awesome!
21:27 forrest whiteinge, that's a good change, thanks!
21:28 Ahlee_ Does Rhett irc?
21:28 forrest Ahlee, nope
21:29 Ahlee didn't think so
21:29 forrest Ahlee, you can just email him though, that's what I usually do
21:29 Ahlee heathen
21:29 forrest or ask one of the Salt guys to throw something at him :P
21:29 kermit joined #salt
21:29 Ahlee hehe
21:29 Ahlee crap it's 4:30
21:30 forrest Ahlee, I wish
21:30 gmeno joined #salt
21:30 UtahDave Ahlee: do you have rhett's email?
21:30 Ahlee UtahDave: yes
21:31 bezeee joined #salt
21:31 rap424 joined #salt
21:33 * Gareth waves a hand in front of forrest
21:33 vexati0n UtahDave: can you help me with any insight into why it might be that some minions take approximately 18,000 years to ever return a result for "salt-call --local grains.items" ?
21:33 Gareth "It *is* 4:30pm"
21:33 forrest Gareth, lol
21:34 forrest Gareth, can you do that trick for my boss?
21:34 gzcwnk hehehe
21:34 Ryan_Lane1 vexati0n: do you have any custom grains?
21:34 gzcwnk a salt-call to the boss's PC springs to mind
21:34 UtahDave vexati0n: :)  How many times have you run that test to verify 18,000 years?  lol
21:34 Ryan_Lane1 vexati0n: one of the grains is likely blocking on something
21:35 UtahDave vexati0n: joking aside, yes
21:35 Gareth forrest: Sure.  Give me your boss's number...I'll guarantee you'll get to go home early :)
21:35 vexati0n Ryan_Lane1: we have grains that we have set in addition to the default ones, but they are always set with grains.setval and are just static values
21:35 gzcwnk wel just wait til he goes first...
21:35 dlam joined #salt
21:35 Ryan_Lane1 vexati0n: have you tried setting your log-level to debug, maybe it'll show you which grain it's blocking on
21:36 dlam is there a state to manage /etc/ssh/sshd_config?
21:36 gzcwnk dlam i use a script to add stuff
21:36 forrest Gareth, lol
21:36 vexati0n i've set it as far as trace, but it doesn't seem to say anything. it cycles through all the grains and sticks on "added opts.opts to grain" when the minion starts up, but there's no output when running grains.item(s)
21:37 gzcwnk but that would be nice
21:37 dlam script to add stuff?  oh like concatenate lines to it
21:37 gzcwnk yep, i use grep -v
21:37 gzcwnk i can post it if u want....its a bit crude
21:38 bezeee joined #salt
21:38 gzcwnk but i cant see a better way
21:39 gzcwnk i have to comply with security policy
21:39 forrest gzcwnk, why can't you treat it as a managed file?
21:39 gzcwnk yeah could do
21:40 gzcwnk oh
21:40 gzcwnk dun work if you change things it wont update
21:40 gzcwnk for some reason
21:40 forrest gzcwnk, ?
21:40 forrest dlam, is there any reason you can't just have a managed file for the sshd_config
21:41 gzcwnk Ive found that if I edit the file on the salt server and re-run the file.managed it wont update it
21:41 che-arne joined #salt
21:41 gzcwnk so i ended up using a script as that is more relaible
21:41 forrest gzcwnk, that should never be happening
21:41 gzcwnk well it does
21:41 forrest gzcwnk, if you modify the file source it is using, it should update the file.
21:41 forrest I'm not disagreeing
21:41 forrest just saying that's very odd
21:42 forrest what release are you on?
21:42 gzcwnk so either im doing something wrong, or the function doesnt work
21:42 gzcwnk salt-master-2014.1.7-3.el6.noarch
21:42 racooper can you get a log on the minion showing the behavior of the file not updating?
21:43 th3reverend joined #salt
21:43 racooper http://docs.saltstack.com/en/latest/topics/troubleshooting/
21:43 gzcwnk ive read that
21:44 gzcwnk currently trying to figure out why salt hangs
21:44 gzcwnk ive up'd sysctl settings
21:45 jaimed joined #salt
21:45 ecdhe joined #salt
21:48 scbunn joined #salt
21:51 dlam forrest:  haha yeah managed file seems wise
21:56 anotherZero joined #salt
21:56 forrest dlam, this is why I charge the big bucks!
21:56 dvestal joined #salt
22:00 occupant joined #salt
22:06 bhosmer joined #salt
22:12 * Gareth tosses forrest a quarter
22:12 forrest Gareth, woooooot
22:12 * herlo takes 15 cents as tax
22:12 forrest I think the minimum is 1 dollar for gittip though
22:13 ajprog_laptop1 joined #salt
22:14 Gareth looks like it is $0.25 :)
22:14 forrest shiiiiiiiiiiiiit
22:14 forrest well then screw that, not worth the extra tax paperwork :P
22:14 Gareth actually....minimum is $0.01 per week.
22:15 forrest lol
22:15 forrest how does that even get charged correctly for transactional fees?
22:15 herlo I suspect you have to at least pay some minimum, though.
22:15 Gareth But they charge your credit card a minimum of $10 and then just use that for future charges.
22:15 forrest ahh
22:18 * Gareth goes back to trudging through puppet manifest "code"
22:18 forrest I'm sorry Gareth
22:18 forrest so, so sorry
22:18 bmatt Gareth: don't do it! that way lies madness!
22:18 icebourg joined #salt
22:19 Gareth bmatt: an unfortunately necessity at the moment :)
22:21 Linuturk manfred: UtahDave https://github.com/saltstack/salt/issues/14808
22:22 brendangilmor joined #salt
22:23 Gareth forrest: could be worse :)
22:23 forrest true
22:24 jslatts joined #salt
22:31 herlo any reason I'm getting this? http://ur1.ca/hx8xk
22:31 herlo UtahDave: ^^
22:31 forrest looks like a typo to me, can you pastebin the httpd state?
22:31 UtahDave herlo: your sls file is malformed
22:31 forrest BatDave
22:32 UtahDave most likely you need a    :     after your id declaration
22:32 forrest hiding in the shadows, ready to strike
22:32 UtahDave lol    you never know when I'm going to barge in!
22:32 Comradephate joined #salt
22:32 herlo UtahDave: how?
22:32 herlo my id declaration?
22:32 herlo UtahDave: oh, dear god, this is going to suck
22:33 forrest herlo, ? Should take only a minute to find the error
22:33 forrest lol
22:33 forrest unless your state is insane
22:33 herlo UtahDave: you realize it looks like this: http://ur1.ca/hx8y0
22:33 herlo forrest: except I'm doing things all wrong, of course.
22:34 forrest herlo, :P
22:34 UtahDave herlo: pastebin the stanza where you're defining httpd
22:34 savvy-lizard joined #salt
22:34 Linuturk UtahDave: thanks for the comment :)
22:34 herlo UtahDave: http://ur1.ca/hx8y3
22:35 UtahDave herlo: contents of   httpd.sls please
22:35 herlo UtahDave: that's what the first paste was
22:35 forrest ?
22:35 forrest herlo, I thought that was your tpo
22:35 forrest *top
22:35 herlo UtahDave: http://ur1.ca/hx8xk
22:35 herlo forrest: 16:31 < herlo> any reason I'm getting this? http://ur1.ca/hx8xk
22:35 herlo forrest: that's the httpd.sls
22:35 UtahDave ah, remove the dash and space before pkg.installed
22:36 herlo huh, did that I thought...
22:36 forrest oh it was such a small stanza I overlooked it the first time, my bad
22:36 * herlo hates yaml sometimes.
22:36 forrest lol
22:36 forrest herlo, if you use pkg: \n   - installed maybe that would help?
22:36 herlo the rules vary so much depending on what you ar doing.
22:37 herlo forrest: no, probably not
22:37 herlo forrest: that's what throws me off. I can't recall which I'm supposed to do where. The rules seem ultimately arbitrary.
22:38 UtahDave herlo: I get confused with that, too.   basically it depends on whether you're creating a list or a dictionary
22:38 druonysus joined #salt
22:39 herlo UtahDave: yeah, I understand that, but in this case, pkg.installed is the same as pkg: \n  - installed. Isn't one is a list, the other a dictionary?
22:39 herlo and this goes for file.managed, and service.running, etc.
22:40 UtahDave the pkg part is a dictionary, I believe.    the .managed is a shortcut for  \n - managed
22:41 forrest thus why if you do \n  - managed, you avoid the confusion :P
22:42 carmony lol, so much confusion :P
22:45 mechanicalduck joined #salt
22:46 kballou joined #salt
22:47 herlo forrest: that is true, but it's not in many of the examples and I get lost easily, you know. :)
22:47 herlo carmony: shut it!
22:47 herlo haha
22:47 herlo carmony: go back to #uphpu, big jerk... :'(
22:47 carmony herlo: \n  user:\n    - absent
22:47 carmony :P
22:48 whiteinge you leave carmony alone!!1
22:48 herlo carmony: I'm sure it is on your systems. If it weren't, you would be Pwnd by now. :)
22:48 herlo whiteinge: you leave carmony alone!!1
22:49 herlo he was my friend first.
22:50 carmony guys... guys...
22:51 herlo carmony: didn't I already tell you to shut it. :D
22:51 carmony haha
22:51 * carmony hearts #salt
22:53 ramishra joined #salt
22:53 herlo :D
22:54 rojem joined #salt
23:00 falican joined #salt
23:01 rojem joined #salt
23:02 stevednd whiteinge: how's 2014.7 coming?
23:03 icebourg joined #salt
23:03 mosen joined #salt
23:04 icebourg joined #salt
23:04 forrest stevednd, you know those scenes from Spartacus where the guys are mining stone?
23:04 forrest that's whiteinge and the team right now
23:04 scoates joined #salt
23:04 whiteinge stevednd: we're teetering on the edge of tagging the RC. not sure exactly when it'll happen but soon
23:04 stevednd woohoo
23:04 stevednd I really wish I could just run off of develop
23:05 whiteinge we'll probably sit on the RC for a few weeks after that
23:05 whiteinge (would be nice to have packages of the RC too)
23:05 FeatherKing joined #salt
23:07 khaije1 when I try to use slspath to create a path to a local map.jinja file I'm  getting an error, EM:"Jinja variable 'slspath' is undefined" , any advice?
23:13 shannonman_ joined #salt
23:21 forrest khaije1, can you pastebin/gist an example?
23:21 smcquay joined #salt
23:21 herlo If I wanted to do file.absent but have a backup (mostly a rename), what would be the best way?
23:22 forrest herlo, I'd do a cmd.watch on a cmd.run which is a lookup
23:22 herlo I am thinking file.managed which is required by cmd.absent
23:22 scbunn joined #salt
23:22 herlo forrest: well I don't need it to check every time, just the once.
23:23 forrest herlo, you mean file.absent?
23:23 herlo er, yes
23:23 * herlo is tired now
23:23 forrest hmm, but you only want to back it up a single time?
23:23 herlo forrest: just want the original from the rpm but I don't want it in the current place
23:24 herlo it's ssl.conf which I want renamed to ssl.conf.bak
23:24 forrest herlo, ahh
23:24 herlo cobbler has a dependency on ssl, but I already have ssl managed by nss because I've setup FreeIPA.
23:24 herlo s/ssl/mod_ssl/
23:25 herlo I think I'm going with my way.
23:25 herlo forrest: so one other question. If I don't want to modify the content...
23:25 khaije1 sure forrest, though could you tell me if slspath is expected to be provided by Salt ? I may simply have the wrong assumption based on http://docs.saltstack.com/en/latest/topics/best_practices.html#modularity-within-states
23:26 forrest slspath is simply a standin that I used in those docs khaije1
23:26 david_a joined #salt
23:26 forrest so for - source: salt://{{ slspath }}/files/httpd.conf
23:27 forrest it's just taking the place of an actual path
23:27 khaije1 oh ok I get it, i dont suppose there is a variable that provides a path to the states dir that I might use?
23:27 forrest khaije1, not that I'm aware of, if it's a long path though, you can define one
23:28 forrest use {% set long_path = 'salt://path/through/tons/of/dirs/' %}
23:28 forrest then - source {{ long_path }}/apache/files/test.conf
23:28 khaije1 forrest: cool, np, I'll set it as needed... the testing I've done seems to show that salt:// is rooted at the environment root, correct?
23:29 forrest khaije1, yea
23:31 khaije1 so there's no simple way to include for a directory-local map.jinja file a'la %{ from './map.jinja' import foo %}  then?
23:31 khaije1 s/for/from/
23:32 forrest khaije1, you can totally do that, look at: https://github.com/saltstack-formulas/apache-formula/blob/master/apache/init.sls
23:33 forrest specifically the pkg installed section
23:33 forrest there it is using variables from the map.jinja
23:33 * khaije1 reads forrest 's link
23:33 forrest If I'm understanding your question correctly I think that explains it
23:34 mosen if i fork a formula and submit a PR, is there a small chance of acceptance? :)
23:34 forrest whiteinge, ultimate waffling on 12419 :P
23:34 forrest mosen, Yea of course, we try to accept as many PRs on the formulas as possible, just remember that they're meant for new users, so avoid doing things that are unique to your environment.
23:34 mosen forrest: of course!
23:35 khaije1 oh I should explain a bit more, I'm writing a state for each version of some local-brew software, but a lot of the config is shared so I was hoping to put the differentiating info (as much as possble) into the map.jinja for each
23:35 forrest even if there's a problem, we can always discuss it on the PR, and resolve whatever issues might exist
23:35 forrest khaije1, the config file itself?
23:35 mosen forrest: I am a new user in any case, so heavy testing is in order for the formula
23:35 khaije1 so foo_v4 and foo_v5 would sit next to each other
23:35 khaije1 forrest: yaup
23:36 forrest mosen, sounds good! Always happy to see more PRs
23:36 forrest khaije1, I see. how are you determining whether an app is v4 or v5?
23:36 mosen forrest: is there anything similar to the other guys wrt to vagrant testing of formulas?
23:36 forrest mosen, not as far as I'm aware
23:37 forrest I usually just spin up an LXC or a VM and test it out
23:37 khaije1 forrest: they are targeted to certain minions based on roles/nodegroups
23:37 mosen no problem, can always set that up .. yeah :)
23:37 forrest khaije1, ok so you are using a roles grain?
23:37 forrest khaije1, so each machine provides that?
23:37 mosen maybe i can even appropriate beaker and just replace with a salt minion
23:38 khaije1 forrest: no sorry, using nodegroups (I'm just thinking of them in terms of their roles to set that)
23:38 forrest khaije1, ahh ok, no worries. whiteinge do you have any examples where you target based on nodegroup inside of a templated file?
23:38 forrest I haven't tried to do that before
23:39 khaije1 but as you can imagine, it'd be nice to say only, use the local map.jinja instead of setting a path that would need to be changed in future with new versions of a particular state
23:40 forrest khaije1, yea absolutely. I'm trying to think of the best way to do that
23:40 forrest if you could target in the actual config (or in the map) based on nodegroup that would be cool
23:40 khaije1 in other words, %{ from 'relative/path/to/map.jinja' import foo %} where 'relative/path..' is what we'd normally think of as ./map.jinja
23:41 dlam hey i made a change to a file.managed state, but its not updating it with my new changes!  anyone know what to check?
23:41 khaije1 never considered that.. .that might be overall cleaner actually ... i could collapse these versioned states into a single one ... am I thinking in line with your thinking?
23:41 forrest khaije1, yea exactly
23:41 forrest khaije1, I don't know if it's possible though
23:42 kballou joined #salt
23:42 forrest you might have to do something where you do an if statement that works around it
23:42 forrest if nodegroups could be used in states... that would be awesome
23:43 herlo forrest: here's the question, I want to do "source: ''", will that work?
23:43 khaije1 I can do some testing and let you know, if it's not possible it's not a total loss, I'll just include the foo_v5 path as needed
23:43 forrest khaije1, I think your idea is good as well, you could probably do an {% if thing = 'blah %} \n {% set path_var = '/var/v5' %} \n {% endif %} or something
23:43 forrest khaije1, ok sounds good
23:43 forrest herlo, I don't think so
23:43 forrest herlo, but I've never tried.
23:43 khaije1 seems counter to modularity, which is why I wanted to be sure to check
23:44 forrest khaije1, yea the way I'm trying to think of it is reduced repetition.
23:44 forrest I just don't know if it's possible
23:44 herlo forrest: doesn't fail during the 'test=true' part
23:44 herlo let's see if it works. :)
23:44 forrest herlo, lol cool
23:44 dude051 joined #salt
23:45 herlo nope
23:45 smcquay joined #salt
23:46 dude051 joined #salt
23:47 claytron joined #salt
23:49 rihannon joined #salt
23:51 khaije1 forrest: I agree with your characterization btw
23:51 che-arne|2 joined #salt
23:52 forrest khaije1, ?
23:52 khaije1 unneeded repetition
23:52 forrest oh yea
23:52 forrest khaije1, as a heads up I created https://github.com/saltstack/salt/issues/14809
23:52 forrest I'll try to remember to think about it some tonight and rework it since I wrote that documentation originally
23:53 forrest if you have suggestions feel free to add a comment
23:53 jaimed joined #salt
23:53 forrest oh hmm
23:53 forrest those changes were added by steverweber...
23:53 forrest ok that makes me feel better.
23:53 khaije1 lol
23:54 forrest this person doesn't have a github account though
23:54 mosen hah
23:54 forrest ok, maybe I'll just revert this when I get home though
23:57 troyready joined #salt
23:58 forrest oh he does have an account

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