Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-06-11

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

All times shown according to UTC.

Time Nick Message
00:02 matrix3000 http://pastebin.com/T84BgMuw
00:02 matrix3000 what if that was possible
00:03 matrix3000 it required a lot less code
00:03 matrix3000 but how do you have a template look that up from the top.sls
00:04 JasonSwindle_AFK joined #salt
00:04 matrix3000 now within the salt state of zabbix you can define what zabbix needs, then what agent needs
00:04 matrix3000 and values of agent are populated
00:04 conan_the_destro joined #salt
00:05 matrix3000 in 1 file not in top and in pillar files
00:05 babilen matrix3000: You don't set it in top.sls, but typically either in pillars or grains. With pillars you target specific hosts or make sure that each host gets the correct pillar data by including additional logic in the pillar. The file that should include that setting would then reference the pillar or the grain.
00:06 babilen matrix3000: http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html explains that approach
00:06 babilen matrix3000: But what are you *really* trying to do? (specifically?)
00:07 matrix3000 that pastebin, basically
00:07 babilen matrix3000: So use a zabbix.agent state that renders whatever configuration file includes server with jinja and populate that from the value set in the pillar.
00:08 matrix3000 so far the only way i have found to do this is using multiple pillar files to identify the properties
00:08 fragamus joined #salt
00:09 matrix3000 im just trying to minimize the amount of file edits cause in the end i will have an infinite number of independent environments
00:10 matrix3000 so we can go from 3 to 30 environments and back to 10, up to 40, down to 20
00:11 Shenril joined #salt
00:11 matrix3000 every developers dream is to have his/her own environment and it should be achievable
00:11 babilen matrix3000: No, you just present different data based on, say, the minion-id. That's logic you can easily express in jinja and would look like {% if grains['id'] == 'host1' %} \n - server: otherServerValue {% else %} ...
00:12 babilen matrix3000: I will, from now on assume that you read the template designers guide and, in particular, http://jinja.pocoo.org/docs/templates/#if
00:12 moos3 joined #salt
00:13 rojem joined #salt
00:14 babilen If you have groups of servers I'd either set a grain locally *or* use Python and work with sets of minion ids (or some other invariant)
00:15 matrix3000 so far the easiest way is adding more and more to the templates
00:15 matrix3000 to use grains etc
00:15 forrest well, you can't use a for loop, because not all your servers use the same values
00:16 matrix3000 yep, unfortunately
00:17 matrix3000 i can for an array of values right
00:17 babilen matrix3000: What is the actual problem you have with the outlined approach? It enables you to do *exactly* what you pasted. Either your paste was an incomplete specification of the problem or there is some other problem that I don't see.
00:17 matrix3000 no, you answered it
00:18 babilen matrix3000: You are welcome
00:18 * babilen hands forrest some cake too
00:18 bhosmer joined #salt
00:19 matrix3000 thank you guys, babilen forrest
00:19 forrest NO CAKE, MORE PROTEIN SHAKES
00:19 rojem joined #salt
00:19 matrix3000 someone is trying to bulk up
00:19 matrix3000 they are doing the american ninja warrior tour right now i believe
00:20 forrest heh
00:25 TyrfingMjolnir joined #salt
00:26 shaggy_surfer joined #salt
00:27 ajolo__ joined #salt
00:27 speed145a joined #salt
00:37 googolhash joined #salt
00:37 20WAABW1C joined #salt
00:44 matrix3000 left #salt
00:46 fragamus joined #salt
00:50 therealGent joined #salt
00:51 mgw joined #salt
00:56 jonbrefe joined #salt
00:58 jeffrey4l joined #salt
01:01 aw110f I have set a schedule to run highstate in pillar, but it doesn't look like it runs any pointers?
01:01 jab416171 joined #salt
01:01 InAnimaTe joined #salt
01:02 aw110f http://pastebin.com/zfQadPVn
01:02 CeBe1 joined #salt
01:06 redondos joined #salt
01:08 xDamox joined #salt
01:09 malinoff joined #salt
01:16 elfixit joined #salt
01:17 ap_ joined #salt
01:19 sunkist joined #salt
01:21 shaggy_surfer joined #salt
01:26 ajolo joined #salt
01:30 speed145a joined #salt
01:33 n8n joined #salt
01:34 bhosmer_ joined #salt
01:40 elfixit joined #salt
01:48 miqui joined #salt
01:59 bhosmer joined #salt
01:59 jrcresawn joined #salt
02:07 l0x3py joined #salt
02:08 aw110f joined #salt
02:14 aw110f_ joined #salt
02:17 schimmy joined #salt
02:17 TyrfingMjolnir Are there any salt scripts for creating new user in MacOS X?
02:19 malinoff TyrfingMjolnir, http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mac_user.html
02:20 schimmy1 joined #salt
02:23 mafrosis joined #salt
02:23 mafrosis lo
02:23 TyrfingMjolnir salt.modules.mac_user.add(name, uid=None, gid=None, groups=None, home=None, shell=None, fullname=None, createhome=True, **kwargs)
02:23 TyrfingMjolnir and
02:23 TyrfingMjolnir salt.modules.mac_user.chfullname(name, fullname)
02:24 TyrfingMjolnir Will I have access to AppleEvents?
02:24 mafrosis been having a bit of trouble with salt-cloud today. I get intermittent “EauthAuthenticationError: Failed to authenticate” errors.
02:24 TyrfingMjolnir Will I be able to launch AppleScripts?
02:24 malinoff TyrfingMjolnir, don't know - I have no Mac to check
02:24 mosen TyrfingMjolnir: im working on mac native salt modules
02:25 mafrosis my “user [is] permitted to execute commands”, since this only happens 1 in 3 times
02:25 TyrfingMjolnir mosen:
02:25 TyrfingMjolnir How can I help?
02:25 mafrosis anyone familiar with the inner machinations of that process?
02:26 mosen TyrfingMjolnir: what kind of functionality are you looking for? ive only done plist and launchd support
02:26 TyrfingMjolnir I would like to make 1 script
02:26 mosen and a really silly wallpaper changing module
02:26 mosen hehe
02:26 TyrfingMjolnir That will be able to add a user
02:26 TyrfingMjolnir and set up printer and email
02:26 TyrfingMjolnir for that one user
02:27 ajolo joined #salt
02:27 TyrfingMjolnir It would also be beneficial if the script could add configuration for Microsoft Remote Desktop, Citrix and Aqua Connect
02:27 mosen TyrfingMjolnir: mac_user just adds the user.. printers can be done through cups but im not sure if theres a salt module for that. Which email client?
02:28 TyrfingMjolnir mail.app
02:28 TyrfingMjolnir But I already have an applescript for adding user for a new user
02:28 TyrfingMjolnir So executing an applescript would be sufficient
02:28 mosen TyrfingMjolnir: ms RDP is sandboxed, not sure about its own config
02:29 TyrfingMjolnir AppleScript can set that up
02:29 TyrfingMjolnir Using AppleEvents
02:29 mosen TyrfingMjolnir: but directory binding and profile maanger are not possible?
02:29 TyrfingMjolnir Is there a way for saltstack to start an AppleScript?
02:30 TyrfingMjolnir It's unsafe to alter the plist files
02:30 mosen TyrfingMjolnir: i think you could make a saltstack execution module to run osascript, its not great but could work
02:31 TyrfingMjolnir At least that would give immediate access to field and buttons in any application
02:33 mosen its a bit of a convoluted way of doing it
02:33 arthabaska joined #salt
02:33 TyrfingMjolnir Of course direct access to AppleEvents via salt would be ideal
02:34 mosen im playing around with that to make a logout/sleep execution module. for fun
02:34 mosen but i think some of those things could more easily be configured through MDM
02:35 TyrfingMjolnir How are you making these things?
02:35 mosen pyobjc, objective-c bridge for Python
02:37 aw110f I have this simple schedule set in pillar but it won't run, : http://pastebin.com/zfQadPVn
02:37 mosen sorry TyrfingMjolnir, bbl in 1hr
02:37 malinoff TyrfingMjolnir, this may be helpful for you: https://docs.python.org/2/library/macosa.html
02:37 TyrfingMjolnir saltstack is written in python?
02:37 malinoff yes
02:38 hoodow joined #salt
02:41 TyrfingMjolnir This should be it: https://docs.python.org/2/library/aetypes.html
02:42 malinoff yep
02:52 schimmy joined #salt
02:54 shaggy_surfer joined #salt
02:56 mateoconfeugo joined #salt
02:56 schimmy1 joined #salt
02:58 dsolsona joined #salt
03:01 mateoconfeugo joined #salt
03:04 mateoconfeugo joined #salt
03:05 dsolsona joined #salt
03:07 smcquay joined #salt
03:14 jonbrefe joined #salt
03:22 bhosmer joined #salt
03:27 kedo39 joined #salt
03:27 ajolo_ joined #salt
03:34 hoodow joined #salt
03:36 travisfischer joined #salt
03:59 ajw0100 joined #salt
04:20 mosen joined #salt
04:27 ipalreadytaken joined #salt
04:28 ajolo_ joined #salt
04:33 sunkist joined #salt
04:43 Ssquidly joined #salt
04:50 hoodow joined #salt
04:55 mafrosis joined #salt
04:56 mafrosis lo
04:58 MZAWeb joined #salt
05:02 jalbretsen joined #salt
05:07 timc3 joined #salt
05:11 bhosmer joined #salt
05:15 harkx joined #salt
05:22 marnom what would be a good way to determine compatible cloud providers with salt cloud? Having a hard time finding a provider with a DC in the Netherlands
05:27 ajolo_ joined #salt
05:34 anuvrat joined #salt
05:35 redondos joined #salt
05:35 redondos joined #salt
05:35 picker joined #salt
05:44 schimmy joined #salt
05:48 jalbretsen joined #salt
05:49 schimmy joined #salt
05:52 gatuus joined #salt
05:52 gatuus run a command on different minion?
05:53 gatuus xample:  'machine02.host.com':  cmd.run:  -name: df -h
05:53 gatuus but it runs on  machine01 =(
06:01 ndrei joined #salt
06:14 ggoZ joined #salt
06:15 TyrfingMjolnir joined #salt
06:21 TyrfingMjolnir joined #salt
06:27 ajolo__ joined #salt
06:30 timc3 joined #salt
06:34 anuvrat joined #salt
06:34 redondos joined #salt
06:37 agh Hello,
06:37 agh i've a question on "file" state
06:37 agh it's possible to do : file.managed: source: salt://whatever
06:38 agh or
06:38 harkx joined #salt
06:38 agh file.managed: source: http://whatever
06:38 agh nut
06:38 snoozer joined #salt
06:38 agh but*
06:38 agh is it possible to do : file.managed: source: ssh://somebody@whatever/myfile ?
06:41 happytux joined #salt
07:00 bhosmer joined #salt
07:06 linjan_ joined #salt
07:16 briner joined #salt
07:18 briner hello, I'm having a pillar that does not compile. I've modified the yaml file to remove this error. But it keeps to show me a previous version when failing. Is there a way to clear the cache of pillar
07:18 agh briner: restart the minion ?
07:18 ndrei joined #salt
07:21 bones050 joined #salt
07:28 ajolo joined #salt
07:29 ajw0100 joined #salt
07:33 ml_1 joined #salt
07:35 slav0nic joined #salt
07:35 slav0nic joined #salt
07:43 felskrone joined #salt
07:44 mortis briner: refresh pillars?
07:47 elfixit joined #salt
07:49 babilen briner: "salt '*' saltutil.refresh_pillar" is probably what mortis is referring to.
07:51 blurg joined #salt
07:54 blurg Hi
07:55 blurg salty friends
07:56 Lomithrani joined #salt
07:56 lpn left #salt
07:57 Nexpro1 joined #salt
07:57 douardda joined #salt
08:04 anuvrat joined #salt
08:04 blurg got a question. I have created a packages.sls file
08:05 blurg on top is the pkg.upgrade: module.run
08:06 blurg en then there is a list of packages under my pkg s: pkg.installed pkgs: [list of packages]
08:06 douardda whiteinge: any reason there are no debian packages for salt-api on debian.saltstack.com?
08:06 blurg Is this also done in this order?
08:06 blurg I first want to have it update and upgrade of course, before installing my list of packages
08:07 alanpearce joined #salt
08:08 douardda blurg: if there is a "strong" dependency on your states, you must express it with the state requisites
08:09 blurg ah yes
08:09 douardda adding a "-require:" (or similar) requisite statement in your sls file
08:09 * blurg could have thought of that
08:09 blurg Thanks douardda
08:11 davidone good morning
08:11 davidone if I have a cmd.run state (let's call it a-state) and another state that requires the a-state
08:11 davidone the fact the the a-state uses a cmd.run, it will return always True, right?
08:13 blurg douardda: what would it look like then? What would be the argument of require?
08:13 baffle davidone: Depends on the exit-code of your command?
08:13 blurg - require:        - pkg: pkg.upgrade   ?
08:14 baffle davidone: If exit code != true, then it wasn't successful.
08:14 baffle davidone: != 0 I mean. :)
08:15 douardda blurg: dunno without a glance at your sls file
08:15 timc3 joined #salt
08:16 blurg http://pastebin.com/f51zMRev
08:22 blurg douardda: there it is
08:27 ajolo_ joined #salt
08:28 darkelda joined #salt
08:28 douardda blurg: why don't you just add a "- refresh: True" to your "my pkg s" state
08:29 blurg ehm, what does that do
08:29 blurg sorry, just a beginner
08:30 blurg to the whole my pkg s state?
08:30 malinoff blurg, http://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html
08:30 blurg malinoff: I read that, there is nothing about refresh in that article
08:31 malinoff blurg, just wanted to be sure you read that
08:31 malinoff http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html?highlight=pkg.installed#salt.states.pkg.installed
08:31 ipalreadytaken joined #salt
08:31 malinoff Read about "refresh" argument
08:31 blurg malinoff: okay, thanks!
08:33 mgarfias joined #salt
08:36 thehaven joined #salt
08:37 blurg So, pkg.upgrade is doing an apt-get update and an apt-get upgrade. Then, installing those packages will be done, after and apt-get update, by adding that refresh. Right?
08:38 malinoff refresh argument tells salt that apt-get update should be run before apt-get install <package>
08:40 malinoff blurg, also, are you sure you need module pkg.upgrade? It does apt-get dist-upgrade http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.upgrade
08:40 douardda humm I didn't notice there is no initscript in salt-api repo (only systemd ans upstart)
08:41 douardda so the debian package should have a "Require: systemd" for it work on Debian (wheezy)
08:45 davidone baffle: you are right
08:45 jdmf joined #salt
08:46 davidone so I am trying to understand how to execute an action if a fs is NOT mounted: http://pastebin.com/3YBSU7en
08:49 bhosmer joined #salt
08:50 bhosmer_ joined #salt
08:53 davidone oh ok
08:53 davidone the state is correct
08:54 davidone but in this case the cmd.run isn't executed
08:54 davidone but it return True anyway
08:54 davidone is there any way to change this behavious?
08:54 davidone s/ous/our?
08:56 kermit joined #salt
08:57 giantlock joined #salt
08:58 briner babilen, mortis, agh, thanks a lot for your help. It did work
09:04 Katafalkas joined #salt
09:05 TyrfingMjolnir joined #salt
09:09 d3vz3r0 joined #salt
09:14 dsolsona joined #salt
09:17 blurg joined #salt
09:17 blurg malinoff: no, don't want a dist-upgrade. hmm
09:22 blurg salt.modules.aptpkg.upgrade(refresh=True, dist_upgrade=False
09:23 blurg that must be it
09:25 blurg is the module aptpkg and pkg the same?
09:27 ajolo__ joined #salt
09:38 blurg g'morning dstanek
09:42 ninkotech joined #salt
09:54 superted666 joined #salt
09:57 blurg and good night again
09:59 nvmme joined #salt
10:00 superted666 Night? Morning here :)
10:12 chiui joined #salt
10:15 _mel_ joined #salt
10:28 ajolo__ joined #salt
10:33 nvmu joined #salt
10:34 ndrei joined #salt
10:37 bhosmer joined #salt
10:39 orbit_darren joined #salt
10:40 Luke joined #salt
10:48 dsolsona joined #salt
10:49 derelm joined #salt
10:51 zain_ joined #salt
10:59 blurg if something is defined in a ssh: ID declaration
10:59 blurg like if the service is running
10:59 blurg should there be a require under service: if that is already in ssh:  ?
11:02 blurg http://pastebin.com/NbFhaygh
11:02 dwfreed joined #salt
11:05 blurg http://pastebin.com/yv5LNB3i
11:05 blurg please check the last one
11:09 arapaho_ joined #salt
11:09 viq blurg: yes, it's better to have the require there
11:10 viq Otherwise the ordering could be arbitrary and it could try to start the service before the package hot installed
11:10 blurg okay, makes sense
11:10 workingcats_ joined #salt
11:11 blurg althought it looks ugly
11:11 blurg because it is within the ssh: ID declaration already
11:11 bVector joined #salt
11:11 viq Yes, but you have a couple things within it, and it defines dependencies between them
11:12 ghartz_ joined #salt
11:14 ashb_ joined #salt
11:14 bhosmer joined #salt
11:14 douardda joined #salt
11:15 jjasinski joined #salt
11:18 Jarus joined #salt
11:19 gmoro joined #salt
11:23 TyrfingMjolnir joined #salt
11:28 anotherZero joined #salt
11:28 ajolo joined #salt
11:29 TyrfingMjolnir joined #salt
11:29 jrdx joined #salt
11:30 Lomithrani joined #salt
11:31 lyddonb_ joined #salt
11:31 ndrei joined #salt
11:31 MrTango joined #salt
11:32 Ymage_ joined #salt
11:35 mortis__ joined #salt
11:36 jcristau joined #salt
11:41 diegows joined #salt
11:45 gmoro joined #salt
11:54 bigl0af joined #salt
11:55 the_lalelu joined #salt
11:55 Nazzy_ joined #salt
11:55 Nazzy_ joined #salt
11:57 Kelsar joined #salt
11:58 the_lalelu joined #salt
12:00 MrTango joined #salt
12:00 kula joined #salt
12:01 TyrfingMjolnir joined #salt
12:04 aberdine joined #salt
12:04 happytux joined #salt
12:05 totte joined #salt
12:09 chiui joined #salt
12:09 vbabiy joined #salt
12:11 babilen Is http://paste.debian.net/104439/ due to a bug in python-apt or should salt's "has something changed" function be altered to compare sets of comps (or sorted lists)
12:13 pfallenop joined #salt
12:13 bhosmer joined #salt
12:15 sverrest joined #salt
12:15 happytux joined #salt
12:16 elfixit joined #salt
12:19 kedo39 joined #salt
12:23 jbub joined #salt
12:26 bhosmer joined #salt
12:28 ajw0100 joined #salt
12:28 ajolo_ joined #salt
12:32 Jarus joined #salt
12:32 mgw joined #salt
12:37 happytux_ joined #salt
12:40 anteaya joined #salt
12:44 bhosmer joined #salt
12:46 happytux joined #salt
12:47 jaycedars joined #salt
12:49 Kelsar_ joined #salt
12:49 jcristau_ joined #salt
12:52 jslatts joined #salt
12:52 bhosmer_ joined #salt
12:52 goki joined #salt
12:53 speed145a joined #salt
12:56 eagen joined #salt
12:58 JeroenH_ joined #salt
13:01 simonmcc joined #salt
13:06 scalability-junk joined #salt
13:07 jaycedars left #salt
13:07 resmike joined #salt
13:11 wm-bot4 joined #salt
13:12 dstanek blurg: morning
13:13 racooper joined #salt
13:14 ndrei joined #salt
13:15 MZAWeb joined #salt
13:21 dude051 joined #salt
13:22 blurg Hi
13:23 blurg What is the most secure setup for salt? I heard about the insecureness of minions and the master
13:23 logix812 joined #salt
13:27 mgw joined #salt
13:28 ajolo_ joined #salt
13:31 toastedpenguin joined #salt
13:32 repl1cant blurg: what exactly did you hear?
13:33 dstanek blurg: i don't know of any security issues
13:35 AdamSewell joined #salt
13:35 AdamSewell joined #salt
13:37 rawzone joined #salt
13:37 eagen_ joined #salt
13:37 eagen joined #salt
13:40 ajprog_laptop joined #salt
13:41 jbub joined #salt
13:42 eagen joined #salt
13:43 superted666 Server/Client is a very common model. I'm not aware of any secuirty issues with the salt master/minion that would label it insecure?
13:43 superted666 It can operate over SSH if you prefer though, that said ssh also has vulnrabilities etc..
13:45 repl1cant overhead on ssh is the big kicker, doesn't scale well
13:46 blurg there is a EAS implementation or something
13:46 blurg hm, where did I read about it.
13:46 blurg let me se
13:46 blurg see
13:48 micah_chatt joined #salt
13:49 dangra joined #salt
13:53 TheThing joined #salt
13:57 quickdry21 joined #salt
13:58 Dattas joined #salt
14:03 kaptk2 joined #salt
14:06 jdmf joined #salt
14:10 Nazca joined #salt
14:12 Lomithrani joined #salt
14:12 resmike joined #salt
14:20 vejdmn joined #salt
14:23 vejdmn joined #salt
14:23 mgw1 joined #salt
14:24 pdayton joined #salt
14:27 dude051 joined #salt
14:28 ajolo__ joined #salt
14:33 ecdhe Does anyone tune their tcp stack with salt?
14:33 JasonSwindle joined #salt
14:34 GradysGhost joined #salt
14:35 ronaldo joined #salt
14:35 ronaldo howdy,
14:36 ronaldo is there a module that alerts master when an event happens, say a file has been created?
14:36 Ahlee ecdhe: I modify sysctl settings, yes
14:37 Ahlee ecdhe: I also apply BIOS firmware and reboot through salt to disable hyperthreading if I ever come across a server that has it enabled
14:37 ecdhe Ahlee, why disable HT?
14:37 Ahlee ecdhe: It's slow.
14:38 elfixit joined #salt
14:38 Ahlee it's hard to measure at the nano level, but we believe we see ~4-5 nano latency with HT enbaled
14:38 tedski Using the contents argument in file.managed, I'm trying to include a multi-line string using the pipe character.  However, when I apply the state, the resulting file doesn't include any contents.  See http://pastebin.com/ewXWYUcw
14:39 jcsp joined #salt
14:39 ecdhe Ahlee, wow, I wouldn't expect that.  Perhaps I'll refer to it as Halted Threading from now on.
14:40 conan_the_destro joined #salt
14:40 ecdhe Ahlee, what's your strategy for sysctl?
14:41 taterbase joined #salt
14:41 teskew joined #salt
14:41 micah_chatt_ joined #salt
14:41 Ahlee ecdhe: file.managed with cmd.wait with sysctl -p
14:41 dannnnnn joined #salt
14:43 dannnnnn hi all, I'm looking for some help with setting up the RestAPI for salt. So far I have generated keys (with openssl), added the rest_cherrypy configuration to my master config file and restarted the service. It doesn't look as though it is starting up the rest service though
14:44 dannnnnn I have also made sure cherrypy is installed
14:44 Ahlee dannnnnn: the rest api (salt-api) is a seperate binary
14:44 Ahlee /usr/bin/salt-api
14:44 dannnnnn ah
14:45 dannnnnn that might be why! I just attempted to start it and got a python error "AttributeError: 'module' object has no attribute 'logging'"
14:45 tedski ahh, i see the issue... the colons are being parsed as yaml
14:46 timc3 joined #salt
14:47 tedski http://pastebin.com/B6dcsfEm
14:47 Ahlee dannnnnn: sadly, I remember fighting that at one time too, but I don't recall what I did to resolve it.
14:49 darkelda joined #salt
14:50 dannnnnn just had a quick google, im running salt-api-0.8.2-0.el6.noarch some people said you need salt-api v0.8.3+
14:50 dannnnnn could that be what you had to do?
14:51 jalbretsen joined #salt
14:51 JasonSwindle .8?  Holy old software
14:52 tedski JasonSwindle: 0.8.4 is latest for salt-api
14:52 JasonSwindle oh, salt api. yes
14:52 JasonSwindle Too early for me
14:52 MrTango joined #salt
14:52 viq ronaldo: look up reactor system, and there is some external software with "do this if file changes" functionality
14:52 dannnnnn problem is I'm using centos so the latest package is 0.8.2
14:53 Luke joined #salt
14:53 tedski does anyone know how to properly escape colons in multi-line yaml strings?
14:54 jcsp joined #salt
14:54 tedski see http://pastebin.com/ewXWYUcw and http://pastebin.com/B6dcsfEm
14:54 babilen If only people would use a more beautiful pastebin with less cruft </dream>
14:54 tedski suggest one
14:55 viq pbot.rmdir.de
14:55 viq as plain as it gets ;)
14:55 ipmb joined #salt
14:55 tedski i can never remember the names of the nicer looking ones
14:56 viq there's also http://paste.openstack.org/ and http://paste.debian.net/ that I see used a lot
14:56 babilen tedski: http://refheap.com http://www.pastie.org http://paste.ubuntu.com http://paste.debian.net
14:56 tedski thanks
14:58 tedski so, given an sls http://pastie.org/9280365 with a multi-line string containing colons, the colons are parsed as yaml indicator characters as seen in http://pastie.org/9280367
14:58 tedski babilen: better? :)
14:58 dannnnnn seems like I fixed it with 'pip install --upgrade salt-api
14:59 babilen tedski: Yes, thank you. Not sure, but turning those into lists that you keep in a pillar and then generate in a loop in 99-repoutil.conf.jinja would be one workaround
14:59 viq tedski: how about enclosing each line with '' ?
14:59 babilen tedski: It might also work if you make that an explicit string by ...
14:59 tedski babilen: yeah, plenty of workarounds... i'm wondering if there is a yaml-proper way of doing it
14:59 babilen doing what viw suggested
14:59 babilen *vi
14:59 babilen sigh
14:59 viq :P
14:59 viq vi:q ;)
15:00 babilen haha, very good :)
15:00 viq Sadly, illegal character on IRC ;)
15:01 tyler-baker joined #salt
15:01 tedski hrmmph
15:01 tedski the hard quotes are kept that  way
15:01 tedski {'file.managed': { '-contents': "'module.var1: var1'\n'module.var2: var2'\n"}}}
15:01 siciliansun joined #salt
15:02 viq tedski: \:  ?
15:02 babilen Ah, the pleasure of YAML. JSON ftw!
15:02 tedski that results in 'module.var1\\': 'var1'
15:02 babilen I am actually quite surprised that I have not encountered that issue yet (or solved it)
15:02 viq babilen: IIRC JSON is valid YAML ;)
15:02 jonbrefe joined #salt
15:03 jforest indeed
15:03 tedski if i use doublequotes, the load fails :/
15:03 tedski *stab*
15:04 tedski if i doublequote the entire thing, the newlines are left behind
15:04 tedski haha
15:04 babilen http://pyyaml.org/wiki/YAMLColonInFlowContext
15:05 platforms joined #salt
15:06 jonbrefe1 joined #salt
15:07 tedski i'm aborting this mess and i'll set pillar data
15:07 dude051 joined #salt
15:07 tedski actually, shit, that won't work... because i'm importing from a map.jinja for defaults
15:08 tedski i'll have to do a templated file
15:08 babilen tedski: yeah
15:08 tedski which is precisely what i wanted to avoid
15:08 Ahlee dannnnnn: likely.  I'm also on centos, but i just reroll my own RPMs
15:09 cnelsonsic joined #salt
15:10 dannnnnn Ahlee: upgrading via pip sorted the issue for me :)
15:10 briner hello, my top.sls does not react as expected. I do have a minion which is a redhat. the salt node grains.items tells me that os : RedHat. I had a section 'os:RedHat': to the top.sls. And it did not work. I've tested the state independentely salt note state.sls uuidd and it works. I even tried to use 'azurite2.unige.ch': instead of 'os:RedHat' and it works. What am I missing
15:11 timoguin briner: paste
15:11 platforms joined #salt
15:11 dannnnnn Ahlee: I have one other question, all requests to the rest API seem to have to be done via HTTP, is there a python wrapper for this already Implemented (kinda like salt.client.LocalClient() ?)
15:11 timoguin briner: I'm guessing you don't have the match section specifying that it's a grains match
15:11 briner http://pastebin.com/XsEVBKBf
15:11 timoguin by default the top.sls uses glob
15:12 timoguin yep, you mean - match: grain right under the pattern
15:12 timoguin *you need
15:12 viq dannnnnn: https://github.com/saltstack/pepper ?
15:12 briner timoguin, what do you mean ?
15:12 dannnnnn viq: nice one
15:13 timoguin briner: http://docs.saltstack.com/en/latest/ref/states/top.html#other-ways-of-targeting-minions
15:13 timoguin if you use any matching aside from minion id globs you have to specify
15:14 babilen tedski: http://paste.debian.net/104480/ works on https://yaml-online-parser.appspot.com/ (note extra leading space)
15:14 tedski babilen: ohhh
15:14 tedski let me try that
15:14 rigor789 joined #salt
15:17 tedski babilen: perfect.
15:17 tedski babilen: works in the yaml loader too
15:17 babilen tedski: I have no idea why the additional indentation makes a difference, so I guess it essentially boils down to the parser implementation (which do not seem to implement the spec perfectly)
15:18 tedski which means it'll break that the most inopportune time
15:18 babilen How hard can it be to write a parser if you have the grammar? I mean seriously, use a proper parser generator and give it the EBNF in the spec and you are done.
15:19 babilen I was under the impression that ": |" or ": >" starts a multi-line string which simply had to have to be indentically indented
15:19 tedski you and i both :)
15:19 babilen .oO( I always wanted to play some more with https://github.com/Engelberg/instaparse )
15:20 tedski and that works in practice, too... minion config properly loaded
15:21 babilen tedski: You might still want to consider a more robust approach rather than relying on some yaml parser implementation detail that is not in line with the yaml specification
15:21 tedski yup
15:21 babilen tedski: But then ... yay!
15:21 XenophonF joined #salt
15:26 xDamox joined #salt
15:27 briner timoguin, thanks a lot for your precious hel
15:28 UtahDave joined #salt
15:29 ajolo joined #salt
15:35 happytux_ joined #salt
15:38 harkx joined #salt
15:39 Luke joined #salt
15:40 wendall911 joined #salt
15:40 layer3switch joined #salt
15:40 tligda joined #salt
15:42 rgarcia__ joined #salt
15:44 jaimed joined #salt
15:49 layer3switch joined #salt
15:49 Katafalkas joined #salt
15:53 saru11 joined #salt
15:54 vejdmn joined #salt
15:56 gatuus joined #salt
15:56 mateoconfeugo joined #salt
15:56 gatuus cmd.run on a different minion?
15:56 ipalreadytaken joined #salt
15:59 ccase joined #salt
16:00 alanpearce joined #salt
16:00 saru11 hello, I'm struggling a bit with how to access multidimensional dictionaries from Jinja template
16:01 saru11 would you mind looking at this code? http://pastebin.com/ErPqkxfk
16:01 SaltnPeppah joined #salt
16:02 saru11 I'm looping through the dict, the key is in the  variable 'name' but how to access the dictionary the key is pointing to?
16:03 SaltnPeppah Hello fine fellows of the salt community
16:03 SaltnPeppah it seems that the https://media.readthedocs.org/pdf/salt/latest/salt.pdf is corrupted. Can any one verify ?
16:03 peters-tx SaltnPeppah: I was about to post about that
16:03 peters-tx SaltnPeppah: Well, it's broken for me as well for what it is worth
16:04 SaltnPeppah Good to know I was not about to pull my hair for no reason
16:04 KyleG joined #salt
16:04 KyleG joined #salt
16:04 peters-tx whiteinge: https://media.readthedocs.org/pdf/salt/latest/salt.pdf appears to be broken
16:05 harkx joined #salt
16:05 saru11 or do you know about some good document about similar topic?!?
16:06 SaltnPeppah do they have a mirror ?
16:06 peters-tx SaltnPeppah: It gets compiled regularly; the compile probably just broke temporarily
16:07 SaltnPeppah peters-tx: Since yesterday ...
16:08 layer3switch joined #salt
16:10 gatuus Hello, I lost connection, can you tell me if I can make a cmd.run on a different minion while running on one?
16:12 forrest joined #salt
16:13 gatuus =(
16:13 jimklo joined #salt
16:13 UtahDave whiteinge: is teaching a Salt training class today.  I think he's aware of the pdf breakage, but I'll make sure
16:13 gatuus cmd.run on a specific minion
16:13 m1crofarmer joined #salt
16:13 gatuus on a template
16:13 gatuus sls
16:14 gatuus or wahtever
16:19 smcquay joined #salt
16:19 redondos joined #salt
16:19 redondos joined #salt
16:20 troyready joined #salt
16:23 jimklo joined #salt
16:24 Networkn3rd joined #salt
16:24 gatuus change target?
16:24 jalaziz joined #salt
16:25 jrcresawn_ joined #salt
16:25 Lomithrani is there a log of this irc tchat ? I'm looking for something I wrote here a week ago or so and I can't remember precisely what
16:26 timoguin http://irclog.perlgeek.de/salt/
16:28 possibilities joined #salt
16:28 mephx joined #salt
16:28 ajolo joined #salt
16:29 jrcresawn_ joined #salt
16:33 geekmush joined #salt
16:36 xDamox joined #salt
16:37 shaggy_surfer joined #salt
16:40 schimmy joined #salt
16:40 craque joined #salt
16:40 irve joined #salt
16:40 micah_chatt joined #salt
16:41 bhosmer_ joined #salt
16:41 eightyeight getting the following error on a couple of servers: http://ae7.st/p/74y
16:41 carmony UtahDave: So our devop is over there getting t
16:41 carmony training
16:41 eightyeight any ideas where it's coming from, and how to fix it?
16:42 UtahDave carmony: nice! I'm, going to be there in a little bit.
16:42 mgw joined #salt
16:42 UtahDave eightyeight: looking
16:43 carmony my fire-from-the-hip guess would be a versioning issue between master and slaves, UtahDave would know more
16:43 UtahDave eightyeight: yeah, what version are your master and minions?  I know you upgraded your minion yesterday, right?
16:43 Lomithrani Token            : (invoke with -T/--tokens to see all 256 tokens)
16:43 Lomithrani ID               : 36f5d7e6-1b2d-4a16-aa07-ae91410c754c
16:43 Lomithrani Gossip active    : true
16:43 Lomithrani Thrift active    : true
16:43 Lomithrani Native Transport active: true
16:43 Lomithrani Load             : 46.03 KB
16:43 Lomithrani Generation No    : 1402498576
16:43 Lomithrani Uptime (seconds) : 6458
16:43 Lomithrani Heap Memory (MB) : 28,98 / 124,81
16:43 Lomithrani Data Center      : datacenter1
16:43 Lomithrani Rack             : rack1
16:43 Lomithrani Exceptions       : 0
16:43 Lomithrani Key Cache        : size 440 (bytes), capacity 6291456 (bytes), 16 hits, 21 requests, 0,762 recent hit rate, 14400 save period in seconds
16:43 Lomithrani Row Cache        : size 0 (bytes), capacity 0 (bytes), 0 hits, 0 requests, NaN recent hit rate, 0 save period in seconds
16:43 eightyeight Lomithrani: pastebin please
16:43 forrest Lomithrani, you'll get kicked from the IRC automatically for 'spamming'
16:43 Lomithrani miss tab sorry :( was for private message
16:43 eightyeight UtahDave: both the master and the minion is 2014.1.4
16:44 forrest no worries, just don't want you to get removed
16:44 schimmy joined #salt
16:44 micah_chatt_ joined #salt
16:44 eightyeight Lomithrani: a good rule of thumb, for pm and channels, is if the paste is > 3 lines, use a pastebin. then accidents like this don't happen. :)
16:44 UtahDave eightyeight: Do you get that error regardless of the command you put in there?
16:45 forrest carmony, where are you located? I can't remember
16:45 eightyeight UtahDave: if you mean using 'cmd.run', yes
16:45 schimmy1 joined #salt
16:45 Ahlee UtahDave: Before I open a ticket, can you peek at https://gist.github.com/jalons/30ef32e756cb388d876c and give thoughts for what this might be? windows, 0.17.5-something
16:45 UtahDave eightyeight: yeah like     salt 'minionid' cmd.run  'ls /tmp'
16:46 Ahlee it's popped up on a few minions, this one still works, but another salt-minion process is just stuck in a restart loop
16:46 eightyeight UtahDave: yeah. same error regardless of the command executed on the minion
16:46 eightyeight UtahDave: i have nailed it down to a common thread though
16:46 eightyeight it seems to be applying only to 'server.foo.example.com' where 'foo' is in the subdomain
16:46 UtahDave Ahlee: what do you have in your /srv/salt/_modules/      ?
16:47 eightyeight so, possibly something wrong with my top.sls, or an init.sls
16:47 mogman1 joined #salt
16:47 Ahlee UtahDave: couple of custom modules
16:47 eightyeight IE: server1.foo.example.com, server2.foo.example.com, server3.foo.example.com
16:47 scoates could someone please point me to the docs that might explain how I can include a sls state from within a state module?
16:47 eightyeight but not on "server1.example.com", server2.example.com, etc
16:48 craque left #salt
16:48 UtahDave eightyeight: that's really odd. I haven't seen that one before.  Yeah, you might doublecheck your top.sls
16:48 forrest scoates, you mean in the actual state module code?
16:48 mogman1 left #salt
16:48 Ahlee should I be more defensive and due checks for like try: import WMI and if found, exit on those?
16:48 scoates forrest: yeah. I have python code. I effectively want to 'include: - nginx' from within my module.
16:48 forrest I'm... confused
16:49 forrest what do you mean from within the module? You mean the actual state.sls?
16:49 forrest or in an actual custom state module
16:49 carmony forrest: SLC
16:49 UtahDave Ahlee: is there a top.sls in your _modules directory?
16:49 forrest carmony, lame
16:49 carmony forrest: your AZ? I can't remember either :P
16:49 forrest Seattle now
16:49 Ahlee UtahDave: no.
16:49 forrest I was hoping to find some people out here to attend the doc sprint next month
16:49 schmutz joined #salt
16:49 Ahlee but, checking
16:50 MZAWeb joined #salt
16:50 irve I want to write some Jinja magic: is it possible to use a list of minions, which have some specific state such as "backup.this" declared, in Jinja? I'd like to add this clause to configure both client and server but I have exhausted my imagination. Is this possible?
16:50 UtahDave Ahlee: do you have external top files configured?
16:50 forrest scoates, https://github.com/saltstack/salt/blob/develop/salt/states/file.py I think you just import salt.utils?
16:50 forrest you're getting into spaghetti territory
16:51 Ahlee UtahDave: hrm, C:\salt\var\cache\salt\minion\files\Staging does have a top.sls file
16:51 Ahlee but...how.
16:52 Ahlee UtahDave: I don't believe so? First i've heard of external top files
16:52 eightyeight UtahDave: got it. needed to restart the salt-minion (i thought red hat would do this for me upgrading init scripts)
16:53 scoates forrest: pardon my ignorance, but I don't see where that actually makes a call to include another state.
16:53 UtahDave eightyeight: ah, ok.
16:53 forrest scoates, that's what I'm saying, you don't see it including the module either right?
16:53 bhosmer joined #salt
16:53 forrest I THINK that somehow happens from salt.utils
16:53 Ahlee ok, so they have top.sls in Staging, but not base, and this minion doens't have environment=Staging set
16:53 * scoates nods
16:53 scoates confused. as usual. (-:
16:54 forrest scoates, yea
16:54 forrest I'm not even sure if you can include one state module in another state module
16:54 anuvrat joined #salt
16:54 Theo-SLC joined #salt
16:54 bhosmer_ joined #salt
16:55 scoates I don't even really necessarily want to include it so much as tell highstate to include it
16:55 TheThing so weird question. Is there a way to loop through root pillar to find data that match certain... regex name or .beginsWith()?
16:55 forrest scoates, I'm confused, why would you need to include a state module in that fashion?
16:55 scoates maybe I'm just thinking about this entirely wrongly
16:55 forrest scoates, let's discuss your end goal, what do you want to accomplish
16:56 TheThing|work oh wait
16:56 TheThing|work I know how I can do this
16:56 ekristen joined #salt
16:57 smcquay_ joined #salt
16:57 scoates main end goal: we have a bunch of web apps that have a similar structure. I'd like to configure those in pillar and in my roots do something like 'haven: fkapp.installed' ; fkapp is my custom state module. We also have a nginx state in sls. I'd like fkapp to be able to reuse the declaration in the nginx sls.
16:57 Ahlee setting environment didn't resolve, no _modules sync'd to this minion so i'm out of ideas
16:58 ekristen hello
16:58 Theo-SLC I need helping using ssh_auth.  My goal is to sent keys to minions so that they can get code from github.  I've created deploy keys on github.  How do I pass this key into the ssh_auth state?
16:58 chrisjones joined #salt
16:59 anotherZero joined #salt
16:59 scoates forrest: ^ does that make sense?
17:00 forrest scoates, so are you doing any matching in your top?
17:01 scoates forrest: I think I'd have something like `-*.vm.haven.fictivevon.com: -include: fkapp.haven` yeah
17:01 scoates erm
17:01 scoates forrest: I think I'd have something like `-*.vm.haven.fictivevon.com: -include: apps.haven` yeah
17:01 forrest so what is keeping you from matching these on a more 'global' scale for the nginx
17:02 UtahDave scoates: I don't think you need to include the nginx in your custom state module directly.  in your sls file just include the nginx sls you already have
17:02 forrest yea that would be the easiest way
17:02 * scoates nods
17:02 forrest I do that for a bunch of our apps
17:02 pdayton1 joined #salt
17:03 scoates was hoping to do it from within the python code
17:03 scoates mostly because I over-simplified above. we have python apps and php apps. and they have different requirements.
17:03 layer3switch joined #salt
17:03 forrest so I have my 'base' nginx formula, and I just install the service with that, then I have nginx.config which drops in the main config. Then each formula has an nginx file which just includes nginx, and nginx.config, and it drops in the sites-enabled files.
17:04 forrest scoates, so you have a formula for the php app, and a formula for the python app right?
17:04 forrest and what is configured differently for them? The actual nginx config?
17:04 scoates forrest: I was hoping to just have fkapp.appname and appname has an associated config in pillar. but I guess I can separate them.
17:04 TheThing|work Theo-SLC: Why not something like this? https://github.com/nfp-projects/salt-states/blob/master/ssh/init.sls
17:05 Theo-SLC nevermind, I see that ssh_auth is for managing the authorized keys file.
17:05 scoates would be so much cleaner if I didn't have to specify the stuff in so many places
17:05 Theo-SLC TheThing|work: checking your link..
17:05 TheThing|work it's how I deploy my github ssh key to all minions
17:06 kermit joined #salt
17:06 fragamus joined #salt
17:10 Theo-SLC TheThing|work:  I see.  that will work.  Thanks.
17:10 thedodd joined #salt
17:10 pdayton joined #salt
17:10 Ryan_Lane joined #salt
17:10 Lomithrani left #salt
17:11 forrest sorry about the spam on that email Ryan_Lane
17:12 forrest scoates,
17:12 forrest https://gist.github.com/gravyboat/5b29084984af8fa7769e
17:12 forrest scoates, will something like that not work for you?
17:13 Ryan_Lane forrest: heh. no worries
17:13 Dinde joined #salt
17:13 Ryan_Lane I'm talking about multiple ppa additions
17:13 scoates forrest: it will work, yeah. I was just hoping to do most of that declaration inside of the python state module so that the sls wouldn't have to care if an app is PHP or Python
17:13 possibilities joined #salt
17:13 forrest scoates, ahh
17:13 Ryan_Lane if we aggregate them, it's possible to avoid needing that module call I'm doing
17:15 forrest whiteinge, if you have time today since we have the locations ready to rock, can you get Rhett on creating th event on eventbrite and starting to do a small media push for the sprint?
17:15 forrest wow I can't type
17:16 forrest *can you get Rhett to create the event
17:16 forrest jeez
17:16 timoguin when's the next one again?
17:16 scoates might be able to hack something up with pillar + a jinja-driven `-include`
17:16 forrest 10th of july timoguin
17:16 timoguin sweet
17:16 forrest we'll have two locations, one in Seattle, one in SF
17:16 forrest there will also be a hangout for remote contributors
17:17 timoguin well that's good, cause i don't think i can make it across the country. :)
17:17 ndrei joined #salt
17:18 vejdmn joined #salt
17:18 forrest timoguin, you totally could
17:19 racooper joined #salt
17:20 resmike joined #salt
17:21 scoates there's still no way to make one pillar append to a list in another pillar, right?
17:21 ramteid joined #salt
17:23 sygibson joined #salt
17:25 MrTango joined #salt
17:28 ajolo_ joined #salt
17:28 steveoliver salt['grains.get'])'
17:28 steveoliver woops.. sorry
17:30 steveoliver is this the right form for drilling into nested grains values ?  salt['grains.get']('level1', [])('level2', [])('level3', []) ?
17:30 yetAnotherZero joined #salt
17:30 steveoliver Google/ Salt docs sites lagging for me right now
17:31 layer3switch joined #salt
17:31 steveoliver Will that syntax return an empty dict if the entire level1.level2.level3 doesn't exist?
17:31 timoguin steveoliver: you need this: salt['grains.get']('level1:level2:level3')
17:32 steveoliver ah-ha!
17:32 timoguin grains are one big dict
17:32 steveoliver thx
17:33 marco joined #salt
17:33 marco howdy
17:34 Guest79617 trying to use cp. push in my python script
17:34 Guest79617 local.cmd('c_node*', 'cp.push' ['/tmp/update.txt'] )  -- what is wrong with my syntax
17:35 resmike joined #salt
17:36 logix812 joined #salt
17:37 druonysus joined #salt
17:37 druonysus joined #salt
17:37 jnials_laptop joined #salt
17:39 cwyse joined #salt
17:41 travisfischer joined #salt
17:41 timoguin Guest79617: you're missing a comma after 'cp.push'
17:41 timoguin the args/kwargs for the module should be the third argument to LocalClient()
17:42 _mel_ joined #salt
17:42 mgw1 joined #salt
17:42 kballou joined #salt
17:43 malinoff joined #salt
17:44 n8n joined #salt
17:46 rlarkin I should have bookmarked it, I can't find an example of using saltenv on the command line.
17:46 shaggy_surfer joined #salt
17:46 rlarkin I saw it used as a parameter with a question mark , url style
17:49 XenophonF left #salt
17:50 resmike joined #salt
17:52 TheThing|work Whoo, finally figured out a solution for configuring iptables \o/
17:53 kula Oh, what's that?
17:53 babilen A firewall
17:53 babilen TheThing|work: How do you do it now?
17:53 kula No, I mean, what's the solution?
17:53 babilen oh, sorry :)
17:54 TheThing|work I'm about to finish configuring it
17:54 TheThing|work it's a really ugly solution but I can cleanly define iptables rules in pillar though which is a plus
17:54 TheThing|work I'll highlight you once I've finished pushing it
17:54 * Theo-SLC applauses for TheThing|work
17:56 MZAWeb joined #salt
17:58 thedodd joined #salt
17:59 antwon joined #salt
18:00 felskrone joined #salt
18:01 brandon_ joined #salt
18:02 alanpearce joined #salt
18:02 kermit joined #salt
18:03 redondos joined #salt
18:03 redondos joined #salt
18:05 resmike joined #salt
18:05 vejdmn joined #salt
18:07 Ahlee sa
18:08 TheThing|work okay babilen and kula, this is how I define the rules in pillar (you could just have it define ports instead of the actual lines but this is my solution): https://github.com/nfp-projects/salt-pillars/tree/master/iptables
18:08 dlam joined #salt
18:08 djaime joined #salt
18:08 TheThing|work and this is how I generate the config file: https://github.com/nfp-projects/salt-states/blob/master/iptables/firewall
18:08 dlam hmm i got like 6 application servers, and i only want to run this command on ONE of em:   anyone know the way to do that?!
18:09 TheThing|work I can now generate new and new iptables rules all over the pillars
18:09 TheThing|work and everything will be sorted out in the generation
18:10 TheThing|work it pulls any pillar['iptables.*'] and combines the rule-set together
18:10 TheThing|work so you could theoretically have the service pillars define the ports that should be open
18:12 TheThing|work Just my work-around the issue on how pillar data do not extend :<
18:13 n8n joined #salt
18:15 smcquay joined #salt
18:19 anuvrat joined #salt
18:19 arthabaska joined #salt
18:19 smcquay joined #salt
18:20 resmike joined #salt
18:21 Katafalkas joined #salt
18:24 tyler-baker left #salt
18:27 TheThing|work Also not ideal situation if the pillar data grows very large in size xD
18:29 ajolo_ joined #salt
18:31 picker joined #salt
18:32 agliodbs joined #salt
18:34 agliodbs I have a single salt repo which I want to use to configure 3 separate server pools: dev, prod, and an alternate prod.  it's fairly important that when highstate runs, it runs only on servers in the current environments.  However, I'm discovering that I don't quite understand how environments work and what's required to set them up, and I'm not finding the right information in the docs.  Anyone got a hint/link for me?
18:35 resmike joined #salt
18:36 TheThing|work agliodbs: You define the environments in pillar/top.sls
18:37 TheThing|work http://docs.saltstack.com/en/latest/topics/pillar/#declaring-the-master-pillar <--- see here
18:37 TheThing|work in the second example, it defines a "dev" enviroment by matching grain data
18:38 agliodbs ah, ok!
18:38 agliodbs then I have a separate set of pillars for each environment?
18:38 TheThing|work then in your salt/top.init you simply define states that should be run for each enviroment
18:38 TheThing|work http://docs.saltstack.com/en/latest/ref/states/top.html#environments <--- see here
18:39 topologygrl joined #salt
18:39 agliodbs yeah, I got it in the states, I missed the pillar stuff though
18:39 TheThing|work :)
18:39 TheThing|work good luck
18:40 agliodbs how do I call the higstate for an environment instead of for a server?
18:41 babilen TheThing|work: ta
18:42 TheThing|work agliodbs, do you have some pillar data that defines that it's a dev machine?
18:42 TheThing|work if so you can use that to target it like this:
18:42 TheThing|work salt -I 'env:dev'
18:42 topologygrl_ joined #salt
18:42 TheThing|work assuming you have pillar data being set to machines called "env" with the value "dev" :)
18:42 agliodbs well, I can identify dev/prod/alt via the fqdns
18:42 mgw joined #salt
18:44 TheThing|work so like: salt '*.dev.something.com' state.highstate ?
18:44 ml_1 joined #salt
18:44 mateocon_ joined #salt
18:45 agliodbs just to make sure I'm approching this right: one of the issues I'm dealing with is that each server group has its own proxy pool, which get configured as a group.  But I don't want salt to put all the proxies in one big pool, I want three separate pools.  Also, salt highstate wouldn't be run for all 3 groups at the same time anyway.
18:45 agliodbs that sounds like environments to me, but I want ot make sure
18:45 forrest agliodbs, http://docs.saltstack.com/en/latest/ref/cli/#node-group-targeting
18:45 forrest seems like you just need node groups
18:46 blarghmatey joined #salt
18:48 londo__ joined #salt
18:50 mogman1 joined #salt
18:51 possibilities joined #salt
18:51 JasonSwindle-AFK joined #salt
18:58 TheThing|work For those looking for an (ugly) solution to extending pillar data can read about it here: http://jonatan.nilsson.is/extending-pillar-data-in-saltstack/ (I know at least some of you were looking for info on it)
18:58 agliodbs TheThing|work: thanks
18:59 agliodbs forrest: huh, that might be what I want ... how do I *call* node groups though?
18:59 Networkn3rd joined #salt
19:00 londo__ joined #salt
19:00 dsolsona joined #salt
19:00 TheThing|work use: salt -N 'node_group_name'
19:00 blarghmatey Is it possible to execute arbitrary python code inside a yaml_jinja sls file?
19:03 bhosmer_ joined #salt
19:03 alanpearce joined #salt
19:03 Debolaz joined #salt
19:03 Debolaz joined #salt
19:03 forrest agliodbs, http://docs.saltstack.com/en/latest/topics/targeting/nodegroups.html
19:03 ecdhe thanks for the link, TheThing|work
19:04 blarghmatey I'm trying to do something like this:
19:04 blarghmatey {% set redis_pass = salt['pillar.get']('redis:password',
19:04 blarghmatey salt['cmd.run']('python -c "from hashlib import sha512;import uuid;print(sha512(str(uuid.uuid4()).encode('utf8')).hexdigest())"')) %}
19:04 vejdmn joined #salt
19:05 agliodbs if I omit the -N, salt will run against everything though, no?
19:05 babilen TheThing|work: What made it necessary to revert to this ugly solution in the case of salt? Why couldn't you generate a suitable iptables-save like file without it?
19:05 babilen TheThing|work: Just trying to understand what it was that made it necessary
19:05 forrest agliodbs, yea, that's the whole point of compound matchers
19:06 forrest agliodbs, http://docs.saltstack.com/en/latest/topics/targeting/compound.html
19:06 forrest there are a bunch of ways to target
19:06 TheThing|work Because now I can define iptables rules anywhere in the pillars
19:06 TheThing|work for example, nginx pillar can define the ports it needs
19:06 TheThing|work the node.js service pillar can define the ports it needs
19:06 agliodbs forrest: I'm thinking environments makes more sense though, because I'd *like* to have different pillar data for each
19:06 timoguin blarghmatey: i'm assuming that would work if you use two {% set = %} blocks
19:06 TheThing|work and all the iptables rules will be collected and run
19:07 agliodbs I'm just missing a good primer on how to use environments ... how to put all the pieces together
19:07 blarghmatey timoguin thanks, I'll try that
19:07 Katafalk_ joined #salt
19:07 harkx joined #salt
19:08 Katafalk_ joined #salt
19:09 TheThing|work the format on how I manage iptables is probably something I'll change to be less... iptables-save-like
19:09 babilen TheThing|work: Ack, that makes a lot of sense. Would it, maybe, have been easier to simply define a certain directory, say /etc/iptables.d/ in which other states can drop files? You could then generate the end result by combining all those files and use it as input to iptables-restore.
19:09 TheThing|work I saw that solution posted here
19:09 TheThing|work the other day
19:09 babilen Which solution?
19:10 gatuus joined #salt
19:10 forrest has anyone been getting this all morning on github? Script: https://assets-cdn.github.com/assets/frameworks-c044173f1e759e8299dbe414ec8ed23e4405bdc5.js:2
19:10 troyready joined #salt
19:10 TheThing|work Having different iptables rules being saved into files on /etc/iptables.d/ and then collect them together
19:10 TheThing|work I believe it was mentioned yesterday
19:10 babilen TheThing|work: Oh, really? I just thought of that :)
19:10 babilen Must be the Debian influence
19:10 TheThing|work That might be a workaround for iptables-specific solution but doesn't really solve our initial problem of "extending" :b
19:10 TheThing|work hehe
19:11 TheThing|work I just don't like it for no reason :)
19:11 TheThing|work Guess I haven't been using debian too much :b
19:12 babilen Okay, I am quite fond of .d directories. I just think that it would be easier to come up with some nice DSL to define iptables rules eventually that would then be "rendered"/dropped in unique files in that directory before being handed to iptables-restore.
19:13 gatuus help, how can I run a command on a remote server(is a minion) but its on a sls template
19:13 gatuus help me.. I cant make cmd.run on another minion
19:13 gatuus than the running one
19:13 babilen gatuus: Why can't you use cmd.run on all minions that are online?
19:14 gatuus let me paste my code... wait
19:14 XenophonF joined #salt
19:15 babilen (please also include the errors and don't use pastebin.com)
19:16 forrest what's wrong with pastebin
19:16 gatuus http://pastebin.com/Nbw6CdNy
19:16 timoguin gatuus: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html
19:16 gatuus :S
19:16 timoguin that's typically used in a runner on the master
19:17 timoguin if you want to trigger something on another minion from one minion you'll either need to open up cmd.run (or any other module) via the peer system. which probably isn't great security wise.
19:18 timoguin or you could have the SLS fire an event that the master reacts to
19:18 babilen forrest: pastebin.com mangles input, takes forever to load, often makes you enter a CAPTCHA to see your paste and fills the screen with ads. There simply are many much nicer ones such as http://paste.ubuntu.com http://paste.debian.net http://pastie.org http://refheap.com (and so on)
19:18 gatuus http://chopapp.com/#v25cg8wg
19:18 forrest babilen, fair enough
19:18 forrest I usually just use gist :\
19:19 babilen forrest: You really don't want your pastebin to do more than display the paste in an easy to read and, if possible, nicely syntax coloured manner. pastebin.com is far from optimal and is simply a money-making device that lives of the fact that people google "pastebin"
19:19 bhosmer joined #salt
19:20 bhosmer joined #salt
19:22 anuvrat joined #salt
19:24 Guest79617 clear
19:24 Guest79617 sorry..
19:25 gatuus Can you please watch my choapp paste please?
19:25 gatuus http://chopapp.com/#v25cg8wg
19:27 xDamox joined #salt
19:27 timoguin gatuus: look at the link i sent you.
19:27 gatuus ok timoguin
19:28 agliodbs so the salt docs talk about having different server roots for each environment.  Do I *have* to have different server roots?
19:28 forrest if you want different files to be used yes.
19:29 forrest like nginx/init.sls in dvev, versus the init in prod
19:29 Guest79617 can I permanently set a env variable using cmd.run? I ran salt 'webser2' cmd.run "export server=web". But it does not work
19:29 ajolo__ joined #salt
19:30 Guest79617 is there something wrong with my syntax>
19:32 TheThing|work Guest79617: exported environment variables are only active for the current running shell
19:32 TheThing|work IIRC
19:32 babilen yeah
19:32 babilen Guest79617: What exactly needs that environment variable set? How is *that* program started?
19:32 TheThing|work dammit guys, haven't managed to get any work done while being online here :<
19:32 TheThing|work gonna go now o/ thank for all the help
19:33 elfixit joined #salt
19:33 babilen TheThing|work: Yes, we lure you in with great answers and then you stay because helping others is fun :)
19:36 Theo-SLC How do I grab pillar data in my templated files?  is it {{ pillar['key']['subkeyk
19:37 Theo-SLC {{ pillar['key']['subkey'] }}
19:37 Theo-SLC ?
19:37 timoguin pillar.get('key:subkey')
19:37 Theo-SLC timoguin: thanks
19:37 babilen Or "salt['pillar.get']('something', DEFAULT)"
19:37 * timoguin nods
19:38 babilen 'something:subkey' also works with that.
19:39 scalability-junk joined #salt
19:39 babilen http://docs.saltstack.com/en/latest/topics/pillar/#pillar-get-function discusses all three approaches and their respective shortcomings and advantages.
19:39 babilen I typically use salt['pillar.get'](foo, bar)
19:40 babilen I wasn't aware that pillar.get('key:subkey') worked. :-/
19:42 Theo-SLC i'll find out shortly.  pillar['key']['subkey'] didn't work.
19:43 Theo-SLC Do I still need to specify jinja templating for the file?
19:43 babilen sure
19:43 babilen (and enclose t in {{ ... }})
19:44 Theo-SLC gave me the same error.  perhaps it's not related.  "Cannot extend ID /var/www/site/js/local-conf.js in "base:api-admin". It is not part of the high state."
19:44 cro_ joined #salt
19:44 Theo-SLC Anybody know what that error means?
19:45 mattmtl joined #salt
19:47 Networkn3rd joined #salt
19:47 kickerdog joined #salt
19:47 babilen it means that you are trying to extend a state that is not found (included or even available at all)
19:48 chrisjones joined #salt
19:49 ndrei joined #salt
19:49 Theo-SLC babilen: I don't know what is meant by "extend".  the state in question is just part of my sls file with all of my other working states.
19:50 Theo-SLC The highstate worked when I removed 'template: jinja' from the file.managed.
19:51 babilen Mind showing that together with, say, "grep -C10 -re "local-conf" ." in the root directory in which you keep your states?
19:52 UtahDave joined #salt
19:53 Theo-SLC babilen: sure, thanks http://pastebin.com/YfQgyfLz
19:54 babilen sigh
19:55 babilen Theo-SLC: pillar.get('local-conf''spritz_redirectUri') can't work, please use salt['pillar.get']('local-conf:spritz_redirectUri')
19:55 UtahDave Theo-SLC: don't you need a comma between your arguments in your pillar.get()?
19:56 KyleG joined #salt
19:56 babilen yeah, assuming you want "spritz_redirectUri" to be the default value if "local-conf" is not being found. (I assumed that spritz_redirectUri is a subkey)
19:56 KyleG joined #salt
19:56 UtahDave ah, true.
19:56 Katafalkas joined #salt
19:57 Theo-SLC I know have ...   {{ salt['pillar.get']('local-conf''spritz_base_url') }}
19:57 babilen no
19:58 babilen 'local-conf:spritz_base_url' (url or uri?)
19:58 babilen Ah, nevermind
19:58 Theo-SLC one sec.  need to turn off emotions on my irc client.
19:59 babilen yes, not a good idea to have those enabled. Did you read the link to the salt documentation I gave you earlier in which the usage of salt['pillar.get'[() is being discussed?
20:00 Theo-SLC babilen: I did, but I sed the other method.
20:00 babilen It would probably also help to see the entirety of api-admin.sls (in the state that causes the problem) and the entire error message. Please also make the internet a better place, by using a better pastebin than pastebin.com (e.g. http://refheap.com or http://paste.debian.net )
20:01 babilen Theo-SLC: IIRC you cannot use subkeys with pillar.get(...) -- And you have to use : between the keys and not just have two strings next to each other (that's a syntax error)
20:01 babilen Theo-SLC: So please fix those errors and then try again. if that still fails paste the entire file and error
20:01 Katafalkas joined #salt
20:03 shaggy_surfer joined #salt
20:03 UtahDave Theo-SLC: there's a difference between   pillar.get()    and      salt['pillar.get']()
20:04 alanpearce joined #salt
20:04 UtahDave pillar.get() is just Python's default .get() method.   salt['pillar.get']()   is a Salt execution module that allows you to easily drill down through N number of subkeys
20:05 Theo-SLC babilen: I'm working. thanks
20:05 druonysuse joined #salt
20:05 druonysuse joined #salt
20:06 Ryan_Lane1 joined #salt
20:06 Theo-SLC UtahDave: I'll use salt['pillar.get']() now.  I just haven't used pillar data in template files yet.
20:06 UtahDave cool
20:06 jrdx joined #salt
20:07 babilen it's the same everywhere
20:07 rigor789 joined #salt
20:07 possibilities joined #salt
20:10 happytux joined #salt
20:10 ccase joined #salt
20:11 eightyeight i'm following http://docs.saltstack.com/en/latest/topics/tutorials/halite.html to install halite
20:12 eightyeight i've installed all the necessary prereqs, and have made the necessary config, and restarted the salt-master
20:12 eightyeight however, i do not see port 8080 bound with 'nestat -taupen'
20:12 eightyeight something i'm missing?
20:13 forrest eightyeight, you might want to see if there are updated notes on the readme: https://github.com/saltstack/halite
20:16 eightyeight nothing i see
20:16 smcquay joined #salt
20:16 eightyeight the README even points you to the doc i linked
20:18 JasonSwindle joined #salt
20:20 pass_by_value joined #salt
20:20 KyleG joined #salt
20:20 KyleG joined #salt
20:21 babilen Theo-SLC: Did that work out?
20:22 pass_by_value eightyeight: if you open the python console and type import halite, do you get any import errors?
20:22 shaggy_surfer joined #salt
20:25 eightyeight checking
20:27 eightyeight no
20:27 dstokes is it normal for salt minions to buffer their output when running states from salt master? not seeing any minion output until all minions have finished.
20:27 eightyeight pass_by_value: what should the 'testuser' or 'myusername' be in that auth? just any user in /etc/passwd?
20:27 pass_by_value cool, any errors in the salt-master log?
20:28 pass_by_value eightyeight: that should be an existing non root user on your system
20:28 eightyeight no errors in /var/log/salt/master
20:29 ajolo__ joined #salt
20:29 eightyeight replacing 'myusername' with a valid user, and restarting the master daemon, still is not binding to port 8080
20:29 pass_by_value could you pasetbin the halite section of your salt master config file please eightyeight?
20:29 eightyeight sure
20:31 racooper I'm looking at two issues on github: #2006 and #12652. These seem to be requesting the same thing. #2006 was closed saying it works, but as of #12652 (and the current docs) that does not appear to be the case. any more info on this?
20:31 jnials joined #salt
20:32 rigor789|away joined #salt
20:32 stoffell joined #salt
20:33 eightyeight pass_by_value: http://ae7.st/p/2zv
20:34 eightyeight i have also tried binding to the external ip with 'host:', to no avail
20:34 pass_by_value eightyeight: I think that config is missing the halite section described http://docs.saltstack.com/en/latest/topics/tutorials/halite.html#configuring-halite-settings
20:35 pass_by_value your external auth looks good
20:35 eightyeight it's at the bottom of the config
20:35 eightyeight lines 40 through 48
20:36 pass_by_value ah sorry, I didn't catch that
20:36 pass_by_value hmm what version of cherrypy eightyeight?
20:37 pass_by_value u can import cherrypy
20:37 eightyeight 2.3.0
20:37 pass_by_value and cherrypy.__version__
20:37 * eightyeight checks
20:37 eightyeight >>> cherrypy.__version__
20:37 eightyeight '2.3.0'
20:38 pass_by_value hmm so does the salt master log have something that says halite starting?
20:39 eightyeight no. all i have is:
20:39 eightyeight 2014-06-11 14:29:06,233 [salt.master      ][WARNING ] Caught signal 15, stopping the Salt Master
20:39 btorch joined #salt
20:39 Bosch[] joined #salt
20:40 AnswerGuy joined #salt
20:40 andabata joined #salt
20:40 ay joined #salt
20:40 clone1018 joined #salt
20:40 faulkner joined #salt
20:40 t0rrant joined #salt
20:40 Flusher joined #salt
20:40 uzomg joined #salt
20:40 SaveTheRbtz joined #salt
20:40 rmnuvg joined #salt
20:40 brewmaster joined #salt
20:40 artificialexit joined #salt
20:40 lude joined #salt
20:40 bejer joined #salt
20:40 nicksloan joined #salt
20:40 lazybear joined #salt
20:40 zekoZeko joined #salt
20:40 jeffrubic joined #salt
20:40 nicksloan joined #salt
20:40 jY joined #salt
20:40 EWDurbin joined #salt
20:40 masterkorp joined #salt
20:40 philipsd6 joined #salt
20:40 rcsheets joined #salt
20:40 ecdhe joined #salt
20:40 AirOnSkin joined #salt
20:40 rcsheets joined #salt
20:40 timoguin joined #salt
20:40 munhitsu_ joined #salt
20:40 UForgotten joined #salt
20:40 individuwill joined #salt
20:40 pass_by_value hmm so when you did the netstat was the salt master still running eightyeight?
20:40 grep_away joined #salt
20:40 DanGarthwaite joined #salt
20:40 patarr joined #salt
20:40 eightyeight yes
20:40 steveoliver joined #salt
20:40 DanGarthwaite Hi all.
20:40 gwmngilfen joined #salt
20:41 vejdmn joined #salt
20:41 Valdo joined #salt
20:41 patarr joined #salt
20:41 eightyeight pass_by_value: http://ae7.st/p/407
20:43 patarr joined #salt
20:43 eightyeight ah. found it
20:44 eightyeight ImportError: cannot import name wsgiserver
20:44 CeBe joined #salt
20:45 eightyeight (found by running manually)
20:45 babilen Theo-SLC: Nothing?
20:45 pass_by_value good catch eightyeight
20:45 patarr joined #salt
20:46 eightyeight looks like i need cherrypy 3.x installed
20:46 eightyeight the docs should probably reflect that
20:46 mnaser joined #salt
20:47 pass_by_value I'd try 3.2.3 if you face issues with the latest 3.3 eightyeight
20:47 patarr joined #salt
20:48 eightyeight looks like i have 3.2.2 installed
20:48 eightyeight seeing where that takes me
20:49 vejdmn joined #salt
20:49 eightyeight le sigh: http://ae7.st/p/2n3
20:49 * eightyeight tries something other than cherrypy
20:49 kvbik joined #salt
20:49 patarr joined #salt
20:50 MatthewsFace joined #salt
20:50 pass_by_value I use cherrypy 3.2.3 for dev usually
20:50 patarr joined #salt
20:51 eightyeight i can't get it to run
20:51 repl1cant lighttpd + rest_wsgi works fine for me :-)
20:51 eightyeight paste your config?
20:52 pass_by_value hmm when you got that no socket could be created message, could it have been something else listening on 8080?
20:52 patarr joined #salt
20:52 eightyeight pass_by_value: nothing at all is listening on 8080
20:52 jaimed hello guys, quick question, does salt provide a way to "group" output from a command? For example, if I do a cmd.run of md5sum /foo/file is there away to group all the hosts that had the same output?
20:53 patarr joined #salt
20:53 DanGarthwaite Not that I know of.  I usually add --out yaml | grep something to parse that out
20:53 eightyeight heh
20:54 eightyeight i can run the server manually with paste, but not when in the /etc/salt/master config
20:54 * eightyeight takes a deep breath
20:54 DanGarthwaite cmd.run md5sum /tmp/foo --out yaml | sort -k2 | uniq -c
20:54 DanGarthwaite testing
20:54 pass_by_value what user is running salt eightyeight?
20:54 eightyeight root
20:55 Katafalk_ joined #salt
20:55 patarr joined #salt
20:55 pass_by_value hmm with paste your keys will need to be in one single pem file
20:55 eightyeight ok. i can do that
20:55 jaimed thanks DanGarthwaite
20:56 pass_by_value I'm gonna try with cherrypy 3.2.2 myself
20:56 patarr joined #salt
20:56 jaimed i'll try that... I mentioned md5sum but that's not really the only command i need to run in a group of hosts, but i'll give it a shot
20:56 eightyeight pass_by_value: i forget. key first, then crt, or other way?
20:56 * eightyeight recalls openssl being picky about this
20:56 jaimed if you ever used pdsh, what I mean i piping the output through dshbak -C
20:57 DanGarthwaite jaimed: Skip the |uniq -c bit, it doesn't work but the sort is good enough
20:57 pass_by_value its cert and key
20:57 pass_by_value afaik
20:57 patarr joined #salt
20:57 eightyeight ooh. that might have workde
20:57 eightyeight s/de$/ed/
20:57 patarr joined #salt
20:58 ckao joined #salt
20:58 eightyeight well, a blank web page. :)
20:58 eightyeight more progress than before
20:58 eightyeight heh
20:58 pass_by_value how did u install halite?
20:58 patarr joined #salt
20:58 eightyeight git-clone(1)
20:59 eightyeight then created a symbolic link in /usr/local/lib/python2.7/dist-packages/halite/ to point to the cloned repo
20:59 patarr joined #salt
20:59 eightyeight so i could 'import halite' successfully
20:59 pass_by_value ah, are you planning to use the dev version?
20:59 eightyeight yeah. we're not planning on relying on it for day-to-day, but test driving it
21:00 eightyeight possibly submitting feedback, bugs, patches, if possible
21:00 patarr joined #salt
21:01 pass_by_value If that is the case then you will have to build stuff in the halite repo using ./prep_dist
21:01 patarr joined #salt
21:01 pass_by_value otherwise you can just pip install halite
21:02 eightyeight my only issue with a 'pip install', is knowing fully where everything gets installed
21:02 * eightyeight hates files scattered all over my filesystem that aren't managed by dpkg(8)
21:02 eightyeight i'll run ./prep_dist
21:03 zz_cro joined #salt
21:03 patarr joined #salt
21:04 patarr joined #salt
21:05 alanpearce joined #salt
21:07 patarr joined #salt
21:09 patarr joined #salt
21:10 TyrfingMjolnir joined #salt
21:11 patarr joined #salt
21:11 ilako joined #salt
21:11 shaggy_surfer joined #salt
21:13 patarr joined #salt
21:13 cliffstah joined #salt
21:14 patarr joined #salt
21:14 patarr joined #salt
21:15 dlam in a pillar, can i reference an earlier value in the file?
21:15 UtahDave dlam: nope. not yet.
21:15 patarr joined #salt
21:15 dlam doh, haha thx thx
21:15 TyrfingMjolnir joined #salt
21:16 patarr joined #salt
21:17 patarr joined #salt
21:18 drags joined #salt
21:18 renoirb joined #salt
21:18 nadley joined #salt
21:18 modafinil_ joined #salt
21:18 copelco joined #salt
21:18 rlarkin joined #salt
21:18 twinshadow joined #salt
21:19 flebel joined #salt
21:19 torrancew joined #salt
21:19 basepi joined #salt
21:19 gamingrobot joined #salt
21:19 patarr joined #salt
21:21 TyrfingMjolnir joined #salt
21:21 kermit joined #salt
21:22 patarr joined #salt
21:22 patarr joined #salt
21:23 scoates joined #salt
21:23 homelinen joined #salt
21:24 patarr joined #salt
21:24 ramers joined #salt
21:24 ramers left #salt
21:26 TheThing|work joined #salt
21:26 TheThing|work babilen: TheThing|work: Yes, we lure you in with great answers and then you stay because helping others is fun :) <-- haha, yeah :D
21:26 timc3 Why wouldn’t this work: sudo salt ‘servername’ state.pkg remove mypackage
21:26 patarr joined #salt
21:26 timc3 Its a number of arguments error, but I have no idea what the other argument would be
21:27 anuvrat joined #salt
21:28 patarr joined #salt
21:29 ajolo joined #salt
21:30 patarr joined #salt
21:30 UtahDave timc3: sudo salt 'servername' pkg.remove mypackage
21:30 TheThing uhh, shouldn't that be: salt 'servername' pkgs.remove packagae
21:30 patarr joined #salt
21:31 TheThing ahh, pkg
21:31 timc3 Thanks. Was just digging through sys.doc < very useful. ;-)
21:31 UtahDave yep!
21:32 patarr joined #salt
21:32 jrdx joined #salt
21:33 conan_the_destro joined #salt
21:33 jcsp1 joined #salt
21:33 MTecknology joined #salt
21:33 jforest joined #salt
21:33 timc3 Is there a command for removing a salt state?
21:34 patarr joined #salt
21:34 timc3 Or do I have to create a state to remove what was added in the state?
21:34 UtahDave timc3: what do you mean by remove a salt state?
21:34 UtahDave Oh, ok.  Yeah, you need to create a state to undo what the other state does.
21:36 patarr joined #salt
21:37 patarr joined #salt
21:39 patarr joined #salt
21:40 patarr joined #salt
21:42 KyleG joined #salt
21:42 KyleG joined #salt
21:42 patarr joined #salt
21:42 ilako joined #salt
21:43 Katafalkas joined #salt
21:43 patarr joined #salt
21:45 patarr joined #salt
21:45 jergerber joined #salt
21:46 drags question about docker port mappings: I'm using the correct indentation on the port_bindings hash, and my `docker.io ps` output looks correct (0.0.0.0:27910->27910/udp), but netstat/ss show no listening udp ports, and I can't connect to the service
21:47 patarr joined #salt
21:48 drags if I configure the port by hand (docker.io run -p 27910:27910/udp) I get the same docker.io ps output, but there is an entry in netstat and I can connect to the service
21:49 patarr joined #salt
21:49 drags service config: https://gist.github.com/drags/04dc1e873aca790cb717
21:50 patarr joined #salt
21:52 patarr joined #salt
21:52 drags to phrase it as a question as Trebek would say: has anyone seen this, or got any pointers?
21:52 patarr joined #salt
21:54 forrest drags, I'm confused, is salt configuring the ports incorrectly?
21:55 patarr joined #salt
21:56 drags forrest: they appear configured correctly from the output of `docker.io ps`, however there is not an entry in the netstat output and the service is unavailable on that port
21:56 patarr joined #salt
21:56 drags I then went on to say that if I run docker by hand (opposed to using the dockerio state) I get the same `docker ps` output, but it works
21:56 drags so, it looks like it's doing everything ok, but it's hiccuping somewhere on the way to actually opening the socket
21:57 patarr joined #salt
21:57 Katafalkas joined #salt
21:58 Brady joined #salt
21:58 Brady Hi I am looking for capabilities comparison of salt enterprise vs salt open source
21:59 patarr joined #salt
21:59 Brady I look through documentation but couldn't find such easy to understand comparison. can anybody please point me in right direction
21:59 forrest Brady, well you have support, and there are some extra security items, and I *believe* that some changes will be back ported? Maybe UtahDave can point you at some better docs
22:00 Brady Thanks Forest! yeah there is support. What are some of the extra security items?
22:01 patarr joined #salt
22:01 forrest Brady, I'm not really sure to be honest with you, last time this was discussed was about 6 months ago.
22:01 tyler-baker joined #salt
22:01 forrest so I don't keep up on the enterprise edition much.
22:02 chrisjones joined #salt
22:02 Brady I see no worries. we can find out together.
22:02 forrest Brady, can you explain your situation, and maybe we can discuss what your best options are?
22:03 rjc joined #salt
22:03 patarr joined #salt
22:05 Brady I work as information analyst and we need to hop on to the config mgmt trend. So, at this point, I am trying to understand if I go to enterprise route, what do I get for paying money.
22:05 patarr joined #salt
22:05 forrest Brady, cool, are you guys a python shop?
22:05 forrest and what size is your organization (number of machines)
22:06 jimklo joined #salt
22:06 jdmf joined #salt
22:06 Brady We have few hundred machines that we manage. We are not python shop. Frankly our org is not great with programming stuff. So, that's why I am looking very seriously at salt
22:07 patarr joined #salt
22:07 forrest Brady, yea for sure, is it all linux systems? Or a mix of linux and other operating systems?
22:08 patarr joined #salt
22:08 Brady We have linux, solaris, and windows machines
22:08 patarr joined #salt
22:09 forrest Brady, ahh ok cool
22:09 Brady We are converting mainly solaris to linux now.
22:09 UtahDave hey, Brady, I responded to your PM.
22:09 forrest Yea that's a good plan, that was where my old org was
22:09 patarr joined #salt
22:11 jab416171 how do I specify the version with pkg.install?
22:11 patarr joined #salt
22:11 forrest jab416171, on the command line or in a state?
22:11 jab416171 forrest, command line
22:13 forrest jab416171, did you already try salt 'minion' pkg.install package_name version=1.2 ?
22:13 jab416171 no
22:13 jab416171 I didn't know the syntax
22:14 forrest well, I'm not 100% sure that's right either
22:14 forrest but if it isn't, it will fail out :P
22:18 JeroenH_ joined #salt
22:19 jab416171 forrest, looks like that worked, thanks!
22:19 forrest jab416171, yea np, I will create an issue as well so we get those docs updated. Were you reviewing any docs before you asked by chance?
22:20 jab416171 forrest, there aren't any docs that I could find that explain how the command line works, just state files, unless I'm looking in the wrong place
22:20 forrest ahh yea, so you can resolve that by searching module in google with whatever
22:20 forrest jab416171, http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pkg.html
22:20 forrest see how that URL is formatted?
22:21 forrest it's a bit confusing I know
22:21 TheThing well, there was mention that you could pass addition arguments using name=value and it will be passed like that to the python function
22:21 TheThing but I think it was briefly mentioned
22:21 forrest TheThing, right, it supports kwargs
22:21 forrest we need to clean up the package module docs though
22:21 forrest there's a bunch of them right now and it's confusing to users.
22:22 TheThing the package module docs are the best for info on commands but it is formatted in a slightly unusual way, yeah
22:22 TheThing takes a little bit to get used to and be able to read them
22:22 forrest right, and it shows all the different results, which don't affect most people
22:22 forrest yea I don't want people to have to get used to reading them
22:22 forrest :P
22:22 TheThing :D
22:22 forrest if you have to get used to reading the docs, we've failed at that portion of the docs
22:23 TheThing Yeah
22:23 TheThing But then again, I do love how you guys split your docs to different pages. I really hate those single-page documents. They really mess up my google searching
22:23 Katafalk_ joined #salt
22:24 forrest TheThing, Yea whiteinge and a couple of the other guys are to thank for that
22:26 elfixit joined #salt
22:27 TheThing whiteinge and couple of other guys: Thank you so much /o/ \o\
22:27 anuvrat joined #salt
22:28 jeffrubic left #salt
22:32 blarghmatey joined #salt
22:32 Theo-SLC joined #salt
22:34 drags forrest: figured out my issue, I didn't have the port listed under the 'ports' attr to the docker.installed resource
22:34 forrest drags, ahh yea that would do it
22:41 ecdhe I wish I could search for "salt states" and land on a page that lists the states.
22:41 ecdhe I don't want the modules, I want the states.
22:41 ecdhe Instead, I get the company.
22:41 ecdhe Or the modules.
22:41 manfred ecdhe: http://docs.saltstack.com/en/latest/ref/states/all/
22:41 ecdhe Or old docs on  rtfm.org...
22:41 bmatt https://www.google.com/?gws_rd=ssl#q=%22full+list+of+salt+states%22
22:41 manfred http://docs.saltstack.com/en/latest/ref/modules/all/
22:41 dsolsona joined #salt
22:42 Ryan_Lane1 I wish the docs auto-generated for states and modules I add
22:42 forrest Ryan_Lane1, ?
22:42 Ryan_Lane1 because now I have a couple states/modules that have no docs
22:42 forrest they do
22:42 Ryan_Lane1 the HTML
22:42 forrest locally you mean
22:43 Ryan_Lane1 no, remotely
22:43 bmatt hahah
22:43 forrest they will build when the docs update
22:43 manfred they do on docs.saltstack.com...
22:43 Ryan_Lane1 you need to run something, then check in the html
22:43 forrest ?
22:43 forrest the html files are in _build/html
22:43 Ryan_Lane1 notice that boto_elasticache doesn't exist
22:43 forrest which is specifically ignored in the .gitignore
22:43 Ryan_Lane1 but the module is checked-in
22:43 Ryan_Lane1 and the state as well
22:44 forrest when was it checked in?
22:44 dlam on a minion can i just print out the value of some pillar variable?  like `salt.call pillar.printvariable ...`
22:44 Ryan_Lane1 ages ago
22:44 UtahDave Ryan_Lane1: hm. those should be in the docs.
22:44 manfred dlam: salt-call pillar.get
22:44 UtahDave I'll go smack whiteinge
22:44 Ryan_Lane1 I needed to do something on my side to make this show up for the other boto_ modules/states
22:44 Ryan_Lane1 and check it in
22:44 manfred dlam: salt-call sys.doc pillar
22:45 Ryan_Lane1 see: https://github.com/saltstack/salt/pull/12923
22:45 forrest Ryan_Lane1, hmm, I thought it picked them up automatically for some reason
22:46 rojem joined #salt
22:46 mosen joined #salt
22:48 ecdhe Has anyone ever given salt a more searchable codename?  Like chef has a helper tool called 'berkshelf' instead of 'bookshelf'...
22:49 ecdhe Relevant salt documentation, blogs, etc would be easier to use if we could give it a nickname.
22:49 TheThing lol
22:50 UtahDave ecdhe: try searching with saltstack
22:50 TheThing ^
22:50 TheThing it's what I use
22:50 forrest I also use that
22:50 forrest since all the doc data has saltstack in there, you should have no issue with salt being the first/second entry usually in google
22:50 Ryan_Lane1 saltstack works perfectly for me
22:51 JasonSwindle joined #salt
22:51 ecdhe You're right it helps.
22:51 Ryan_Lane1 now a totally unsearchable project: diamond :)
22:52 Ryan_Lane1 how can I pass the environment into salt-call from the cli?
22:52 forrest yea, or something terrible like trebuchet right Ryan_Lane1 :P
22:52 Ryan_Lane1 :D
22:52 TheThing Please, try searching for "Bottle"
22:52 manfred Ryan_Lane1: saltenv= ?
22:53 jnials joined #salt
22:53 Ryan_Lane1 # salt-call pillar.data saltenv=test
22:53 Ryan_Lane1 The following keyword arguments are not valid: {'saltenv': 'test'}
22:53 manfred oh, no idea for pillar
22:53 manfred but for the state module it is saltenv=
22:53 Ryan_Lane1 it's per module?
22:53 Ryan_Lane1 ah. ok
22:53 manfred pretty certain it is saltenv
22:54 mosen hiya saltines
22:54 manfred yeah
22:54 manfred Ryan_Lane1: https://github.com/saltstack/salt/blob/develop/salt/modules/state.py#L270
22:54 Katafalkas joined #salt
22:54 TheThing >saltines
22:54 TheThing I prefer to be called "slave" :b
22:54 ecdhe saltines--now THEREs a searchable phrase!
22:55 TheThing lol
22:55 manfred TheThing: django reference?
22:55 Ryan_Lane1 manfred: that doesn't work for state.sls
22:55 TheThing Nah
22:55 manfred TheThing: https://github.com/django/django/pull/2692
22:55 TheThing hahaha, that is awesome
22:55 ecdhe TheThing, how about "shakers"?
22:56 mosen TheThing: minon?
22:56 forrest someone already started on a tool called salt shaker
22:56 manfred libpepper
22:56 Ryan_Lane1 is there a way for me to access environment variables from inside of a state?
22:56 TheThing I love when people try so hard to be polically correct (I think that's what this is called (mind you I'm an Icelander so don't have this problem))
22:56 TheThing lol forrest
22:56 Katafalkas joined #salt
22:56 ajolo_ joined #salt
22:56 Ryan_Lane1 if I wanted to set an environment variable, call salt-call state.sls, and have it use the environment var?
22:56 TheThing now there's a term that would be hard to search for
22:57 ecdhe TheThing, politically correct is more for when you reword something to avoid causing offense.
22:57 forrest TheThing, http://shaker.readthedocs.org/en/latest/
22:57 manfred TheThing: https://issues.apache.org/jira/browse/COUCHDB-2248
22:57 TheThing Wasn't that the case with master/slave => Leader/follower?
22:58 forrest Can we not get onto that topic in here?
22:58 TheThing That's really cool forrest
22:58 ecdhe sorry forrest.
22:58 forrest It really has been discussed to death, and we don't need to discuss it here further.
22:58 forrest it's all good
22:58 forrest I just don't think we need to discuss it again :)
22:58 manfred DEATH TO THE INFIDELS!
22:59 forrest thanks for your show of support manfred
22:59 TheThing I just meant in a non-technology term that I prefer being called "slave" :)
22:59 TheThing that was all
23:00 manfred I prefere to be called Daniel, but that is just my name...
23:02 Ryan_Lane1 so, state.sls says I can provide saltenv as a flag
23:02 Ryan_Lane1 but when I use it I get a key error
23:02 TheThing I read that as "...can provide saltenv as a fag"... I really should spend less time on the internet
23:05 Ryan_Lane1 is there any way for me to do something conditionally in a state based on something passed in from the cli?
23:06 Ryan_Lane1 for the life of me I can't figure out how
23:06 allanparsons joined #salt
23:07 forrest I don't think so Ryan_Lane1, or at least not that I've ever seen
23:08 TheThing states are usually run from top.sls
23:08 TheThing and not from command lines
23:09 TheThing ergo, it's not something you would ever wanna do (and don't think you CAN do)
23:09 manfred TheThing: state.highstate
23:09 Ryan_Lane1 state.sls?
23:09 manfred TheThing: or state.sls...
23:09 Ryan_Lane1 state.id?
23:09 Ryan_Lane1 there's lots of ways to not use the top file
23:09 manfred overstate files
23:09 manfred salt-run state.orch
23:09 Ryan_Lane1 forrest: is there any way for me to read environment variables from inside a state?
23:09 TheThing state.highstate pretty much just runs top.sls
23:09 manfred yes
23:09 manfred but that isn't the only way to run states
23:10 manfred by far
23:10 TheThing no but it's the primary ( ¬‿¬)
23:10 manfred maybe for you
23:10 manfred i use salt-run state.over more
23:12 Ryan_Lane1 here we go: https://gist.github.com/ryan-lane/67f1d66cef7a0d6d5cef
23:13 forrest Ryan_Lane1, can you update that gist with the command you are running?
23:13 dsolsona joined #salt
23:14 Ryan_Lane1 forrest: updated
23:15 forrest thanks
23:15 forrest we should add a page that talks about that Ryan_Lane1
23:15 blarghmatey Ryan_Lane1: I've been wondering about how to do that myself. Thank you for getting that figured out.
23:15 forrest I don't think one exists right now
23:15 Ryan_Lane1 forrest: yes, please :)
23:15 forrest Ryan_Lane1, you wanna make the issue or do you want me to?
23:15 mosen joined #salt
23:17 bhosmer joined #salt
23:17 Ryan_Lane1 you can
23:17 Ryan_Lane1 ok. I updated that with a better example
23:18 forrest cool
23:18 toastedpenguin joined #salt
23:19 forrest Ryan_Lane1, https://github.com/saltstack/salt/issues/13407
23:20 Ryan_Lane1 is there a way for me to make a state fail purposely?
23:20 Ryan_Lane1 I'd like to fail if an environment var isn't passed in
23:20 rpotucek joined #salt
23:20 manfred do you want it to fail, or just not run?
23:20 XenophonF left #salt
23:21 Ryan_Lane1 either or
23:21 manfred on develop, every state has unless onlyif: and check_cmd:
23:21 manfred so
23:21 rpotucek I found s3.get ... is there a way to use this as source in an sls file ... like so: source s3:// ... more to the point ... where / how would you supply the credentials?
23:21 Ryan_Lane1 I'd really like it to fail hard
23:21 manfred just a module.run state that checks if the environment exists
23:21 manfred and if the variable doesn't, then don't do the state
23:22 manfred require:
23:22 blarghmatey There's a config in the minion.conf that will tell the states to fail hard if any state fails.
23:22 rgarcia_ joined #salt
23:23 blarghmatey Ryan_Lane1: Interestingly enough, it's called failhard
23:23 blarghmatey It takes a boolean
23:23 Ryan_Lane1 yeah. I don't use a minion config
23:23 rgarcia_ joined #salt
23:23 Ryan_Lane1 I'm a rebel
23:23 blarghmatey It's set in the master
23:23 manfred /usr/bin/test -n VARIABLE in the check_cmd
23:23 blarghmatey 21.8.4.5. failhard
23:23 manfred Ryan_Lane1: just do an onlyif: /usr/bin/test -n VARIABLE in your state
23:24 manfred and it won't run if the variable doesn't exist
23:24 Ryan_Lane1 http://docs.saltstack.cn/ref/states/all/salt.states.test.html#salt.states.test.fail_without_changes
23:25 TyrfingMjolnir joined #salt
23:28 agliodbs joined #salt
23:29 agliodbs hey, I'm running into an issue that when I have an error in a jinja template, the error salt gives me about the bug reports a line which is upto 15 lines away from the actual location of the error.  Has anyone seen this?
23:30 agliodbs hmm, make that up to 25 lines
23:30 hardwire joined #salt
23:31 manfred agliodbs: did it say the line in the file? or the line in that state?
23:31 carmony whiteinge: how did the training go today? I had one of my DevOps there :)
23:31 manfred like, it might say line 3, but it is the third line from the beginning of the function?
23:31 agliodbs manfred: it was a "variable is not defined" error, only the error message points to a different variable
23:31 manfred oh
23:31 manfred ¯\(°_o)/¯
23:32 agliodbs there is an actual error in the file, but it's in a very differnt location
23:32 agliodbs this is not the first time I've seen this.  It could also be an issue with jinja, of course
23:36 agliodbs manfred: do that's a new one on you?
23:36 jimklo joined #salt
23:36 manfred nah i have seen it before, i don't know what I did the last time though
23:37 jimklo joined #salt
23:38 shaggy_surfer joined #salt
23:38 agliodbs manfred: bingo!  https://github.com/saltstack/salt/pull/8475
23:38 agliodbs hasn't been merged for some reason
23:39 layer3switch joined #salt
23:39 manfred agliodbs: it has been
23:39 manfred thatch45 merged commit 7b47323 into saltstack:develop from terminalmage:issue8418 on Nov 13, 2013
23:39 manfred agliodbs: 2014.1 came way after that and would have included it
23:39 agliodbs manfred: I should reopen the bug then, because I just got that error on 2014.1.4
23:39 manfred agliodbs: https://github.com/saltstack/salt/pull/8364 that is the bug
23:40 agliodbs right, it was merged into salt:develop, but was it ever merged into a release?
23:40 manfred agliodbs: develop is master
23:40 manfred and yes
23:41 manfred 2014.1 was tagged in january this year
23:41 manfred 2014 year, 1 month
23:41 manfred and that was merged into develop
23:42 Ryan_Lane1 damn. environ.get is helium+
23:43 jbirdman joined #salt
23:43 forrest yea there is a lot of cool stuff in helium
23:43 forrest gonna be a great release if all goes well
23:45 agliodbs manfred: ok, new issue opened.  apparently that pull request didn't fix the underlying bug
23:46 manfred cool
23:47 manfred agliodbs: can you provide the full file that error is from, and salt --versions-report ?
23:47 forrest If anyone has friends in Seattle who are interested in contributing to salt please let them know about the upcoming sprint!
23:47 ml_1 joined #salt
23:47 agliodbs manfred: I'll need to sanitize it
23:47 * Eugene is in Seattle
23:48 forrest Eugene, do you work downtown?
23:48 manfred agliodbs: that would work :)
23:48 Eugene No, I'm currently unemployed. :-p
23:48 forrest well even better!
23:48 forrest lol
23:48 Eugene I live out on Vashon; ferry ride away
23:48 manfred forrest: i inquired for yall
23:48 forrest thanks manfred
23:48 forrest Eugene, cool, we'll be in downtown seattle, I think it's just going to be the afternoon
23:48 Eugene When / where?
23:48 forrest there should be an eventbrite page going up in the next couple of days
23:49 jonbrefe joined #salt
23:49 forrest it will be at the flowroute offices in downtown seattle, (2nd and seneca or so), July 10th
23:49 forrest I believe the current planned schedule is 1-5, any updates on that Ryan_Lane1 ?
23:49 Ryan_Lane1 yep. 1-5
23:49 * Eugene adds to calendar
23:49 forrest cool
23:49 forrest As I said, there should be an actual eventbrite event coming out soon
23:50 forrest so you can RSVP there easily
23:50 Eugene Ya, just gotta write it down or it'll be gone from RAM in an hour
23:51 * Eugene has a bug with persistent storage
23:51 manfred forrest: what day is it?
23:51 forrest July 10th
23:51 forrest Thursday
23:51 forrest well, A Thursday
23:51 manfred cool
23:51 forrest yea, I think we'll have room in our conference area for like 10-12 people
23:52 manfred i am starting a thing where my boss is loaning me out to other teams one day a week to help them speed up their cloud knowledge... and wanted to make sure that it wouldn't be the same day of the week :P
23:52 forrest haha cool
23:52 forrest are you going to remotely work with us?
23:52 dsolsona joined #salt
23:52 forrest Ryan_Lane1, will have a google hangout up I believe
23:52 manfred forrest: that is the plan I thought
23:52 agliodbs manfred: how do I upload a text file to github issues?  There doesn't seem to be a way
23:53 forrest manfred, cool
23:53 forrest agliodbs, you can't
23:53 manfred agliodbs: i would just put it in a gist, or just put it in exactly like your code block you already did
23:53 forrest agliodbs, paste it into a gist, and link the gist, or put the text straight in
23:53 jonbrefe1 joined #salt
23:53 forrest bah manfred beat me to it
23:53 * manfred takes a lap
23:53 agliodbs hmmm.  can I email it to someone?  I'll need ot get the client's permission to do it as a public gist
23:53 agliodbs since those are forever
23:54 forrest agliodbs, can you just paste the error to start?
23:54 manfred forrest: he already did
23:54 agliodbs forrest: it did that already
23:54 forrest and then update the issue later once you have the client's permission
23:54 manfred forrest: https://github.com/saltstack/salt/issues/13408
23:54 forrest ahh ok
23:54 forrest cooll
23:54 forrest *cool
23:54 manfred forrest: but the problem is, that without seeing where the actual error was..., i have no idea :P
23:54 forrest oh I didn't realize agliodbs was Josh, I liked the costumes you guys had at pycon this year.
23:55 forrest manfred, yarg
23:55 agliodbs forrest: thanks!
23:55 agliodbs I can email it right now if I can send it to someone
23:55 manfred YAR! WE BE NEEDING THE STATE FILE FOR BETTER TROUBLESHOOTING! THEN WE BE FINDING THE BOOTY!
23:56 Shenril joined #salt
23:56 manfred agliodbs: pastebin.com lets you delete pastes iirc?
23:56 agliodbs oh, hmmm.  you need the state file too ...?
23:56 manfred agliodbs: idk, i was just being silly
23:56 manfred whichever file was the one with the error
23:57 agliodbs manfred: here: http://salt.privatepaste.com/9a776ed727
23:57 agliodbs that expires in a week
23:57 agliodbs the actual error is this line: handyrep_db= {{ hr_db }}
23:58 forrest agliodbs, you might also want to delete that when we are done as the salt irc is logged.
23:59 agliodbs forrest: since the file goes away in a week, I won't worry about it
23:59 manfred agliodbs: yeah i have no idea about it, but I told terminalmage about it
23:59 ajolo__ joined #salt
23:59 agliodbs ok, thanks

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