Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-08-03

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

All times shown according to UTC.

Time Nick Message
00:14 pcdummy joined #salt
00:16 cbrich82 joined #salt
00:41 mamercad joined #salt
00:46 mamercad_ joined #salt
00:58 fersur3 joined #salt
01:01 amcorreia_ joined #salt
01:11 gwmngilfen joined #salt
01:25 digitalhero joined #salt
01:31 subsignal joined #salt
02:17 mamercad joined #salt
02:18 hasues joined #salt
02:19 hasues left #salt
02:22 mamercad joined #salt
02:28 evle joined #salt
02:30 dthom91 joined #salt
02:33 cbrich82 joined #salt
02:36 otter768 joined #salt
02:43 murrdoc joined #salt
03:00 favadi joined #salt
03:15 dthom91 joined #salt
03:20 mamercad joined #salt
03:27 ITChap joined #salt
03:28 digitalhero joined #salt
03:31 nikob joined #salt
03:35 digitalhero joined #salt
03:35 cbrich82 joined #salt
03:46 nikob joined #salt
03:47 glyf joined #salt
03:50 falican joined #salt
03:54 mohae_ joined #salt
04:09 rdas joined #salt
04:13 mamercad joined #salt
04:30 sinh joined #salt
04:40 sunkist joined #salt
04:42 stoogenmeyer joined #salt
04:46 kula joined #salt
04:48 anotherZero joined #salt
04:51 ramteid joined #salt
05:00 mamercad joined #salt
05:02 glyf joined #salt
05:03 primechuck joined #salt
05:08 alexhayes I'm trying to use https://bitbucket.org/mway-salt/salt-grunt-formula/src/34242b96a0ffe309f7f3b03241e16442fa0447de/grunt/init.sls?at=master but I get an error: Rendering SLS 'base:grunt' failed: Jinja variable 'salt.loader.LazyLoader object' has no attribute 'dict_utils.merge'
05:08 alexhayes Seems like https://bitbucket.org/mway-salt/salt-grunt-formula/src/34242b96a0ffe309f7f3b03241e16442fa0447de/grunt/settings.jinja?at=master uses salt['dict_utils.merge']
05:09 alexhayes But I can't find anything (of note) about salt['dict_utils.merge']
05:14 scoates joined #salt
05:15 mioli joined #salt
05:18 aqua^c joined #salt
05:25 catpigger joined #salt
05:29 calvinh joined #salt
05:30 otter768 joined #salt
05:49 malinoff joined #salt
05:50 _JZ_ joined #salt
06:01 napsterX joined #salt
06:04 sirex joined #salt
06:11 TyrfingMjolnir joined #salt
06:11 lb1a joined #salt
06:15 stoogenmeyer joined #salt
06:19 AndreasLutro joined #salt
06:28 whytewolf alexhayes: looks like that formula requires a _module called dict_utils with a merge function. which looks like it is here.  https://bitbucket.org/mway-salt/salt-modules/src/45ca921249715f96555cd0d07ef0c9d1662f5de8/_modules/dict_utils.py?at=master
06:29 dopesong joined #salt
06:37 favadi joined #salt
06:38 stoogenmeyer joined #salt
06:47 markm joined #salt
06:51 KermitTheFragger joined #salt
06:55 Fiber^ joined #salt
06:58 kawa2014 joined #salt
07:03 glyf joined #salt
07:11 digitalhero joined #salt
07:13 trikke joined #salt
07:15 Ztyx joined #salt
07:16 eseyman joined #salt
07:17 bezaban joined #salt
07:20 Ztyx left #salt
07:31 otter768 joined #salt
07:35 forrest joined #salt
07:45 forrest joined #salt
07:46 auzty joined #salt
07:47 auzty im new in salt, how to check the extracted archive in salt?
07:47 bmcorser joined #salt
07:47 auzty is salt always assuming the previous extracted file always success?
07:48 auzty i do the downloaded archive from specify url, and then extract it to /tmp/ , and it done, but when i delete some files inside the extracted location, salt didn't recognize and tell that folder already exist
07:49 Bryson joined #salt
07:49 ITChap joined #salt
07:55 babilen auzty: "the extracted archive" ?
07:55 impi joined #salt
07:59 malinoff joined #salt
08:00 linjan_ joined #salt
08:02 ingslovak joined #salt
08:08 auzty sorry, i mean, the result of archive :D
08:09 cptmashek joined #salt
08:22 dopesong_ joined #salt
08:22 babilen auzty: So, you use archive.extracted to extract a file and then delete a file in that archive? Could you paste your state(s) and whatever output you get that might exemplify the problem you have? (please use a pastebin such as http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … )
08:27 CeBe joined #salt
08:27 Qwazerty joined #salt
08:29 impi joined #salt
08:29 auzty sorry solved babilen , i add * to if_missing: /tmp/* and then the problem solved :D
08:29 auzty thanks babilen
08:29 auzty :D
08:30 babilen Ah, rubber duck debugging ... :)
08:33 digitalhero joined #salt
08:34 kbaikov joined #salt
08:35 digitalhero joined #salt
08:35 c10b10 joined #salt
08:35 jvblasco joined #salt
08:35 jvblasco_ joined #salt
08:37 evle What is recommended way to install develop branch (or probably RC)? Bootstrap script doesn't seem to have options for salt-cloud, salt-ssh and maybe some other stuff I'd like to use.
08:37 gcfhvjbkn joined #salt
08:37 thehaven joined #salt
08:39 kbaikov joined #salt
08:42 harkx joined #salt
08:44 AndreasLutro evle: I just git clone and pip install -e .
08:48 Horgix Hi everyone ! Quick question regarding packages : I have a state with a simple "vim: pkg.installed". On CentOS, the package corresponding to vim is vim-enhanced; however when doing a "yum install vim" by hands it finds vim-enhanced because of the "provides" field. Is there a way to tell salt to resolve such names ? It's easy to change to vim-enhanced but I wanted to understand why it isn't working with the same
08:48 Horgix name resolution than yum
08:49 Furao joined #salt
08:52 impi joined #salt
08:53 babilen Horgix: Use the vim-formula: https://github.com/saltstack-formulas/vim-formula -- it maintains different package names for you in https://github.com/saltstack-formulas/vim-formula/blob/master/vim/map.jinja so you don't have to think about it anymore
08:54 bitc01d joined #salt
08:55 Horgix I don't really mind having to think about it, and I solved it by checking distro and installing corresponding package
08:56 Horgix What I would like is understand why salt can't find something when yum can : isn't it just calling the package manager correspondig to the distro, with install and the given package name ?
08:56 AndreasLutro you can crawl through the yumpkg code and see all the different yum commands it's running if you feel like it - one of them doesn't work with package aliases or something along those lines
08:56 AndreasLutro salt does a lot lot lot more than just a simple yum install
08:57 nocturn joined #salt
08:59 babilen And I'd still recommend the map.jinja (well, grains.filter_by) approach .. if you write that yourself or use the formula is unimportant
09:00 babilen I wouldn't do a if grains .... else grains .... conditional collection though
09:03 chiui joined #salt
09:04 glyf joined #salt
09:04 N-Mi joined #salt
09:04 N-Mi joined #salt
09:06 Horgix babilen: thanks, I'll use that
09:06 Horgix AndreasLutro: after taking a look at it, it calls repoquery and install it with yum-utils if not found. https://github.com/saltstack/salt/blob/b3bed2d5d232710d80f218f28b69f52713f68be9/salt/modules/yumpkg.py#L108
09:07 Horgix Wouldn't it be better to add a "--whatprovides" option to the call to repoquery so it can resolve names as yum does ?
09:09 babilen One could add support for that, but I prefer it to fail if called with a package that doesn't exist
09:12 Horgix babilen: I could submit a pull request if that seems a good idea. The package doesn't technically exists, but is resolved by yum by default so I guess it would better fit the habits of people if salt resolved it too. Just my 2 cents, I can understand that it's not always a desired behavior :)
09:16 apofis_ joined #salt
09:20 AndreasLutro I bet there are github issues with discussion around the subject
09:20 arount joined #salt
09:20 arount Funny thing of the day: http://docs.saltstack.com/en/latest/topics/development/tests/unit.html
09:21 babilen Funny?
09:21 arount in list "preparing to write a unit test": "Test functions should be named test_<fcn>_<test-name>"
09:22 arount first example: "def test_fib(self)"
09:22 arount ...
09:22 AndreasLutro god forbid people put some actual thought into writing tests instead of just copy-pasting an example
09:23 arount (the good function name according to what is written 2 lines above is: test_fib_calculate)
09:24 aqua^c joined #salt
09:27 Horgix Looks like the --whatprovides is already used and that despite salt knowing that vim-enhanced is a possible match, it doesn't use it : https://gist.github.com/Horgix/dff02f9f8a459e0d4cc3
09:28 Horgix is there a way to tell salt to use possible matches ?
09:30 peterdemin joined #salt
09:31 ITChap joined #salt
09:31 ITChap Hi everyone
09:32 otter768 joined #salt
09:32 ITChap when using Jinja inside a file, is it possible to get the 'path' of the key in same time than the value
09:32 ITChap like {'properties': {'database': {'url': 'value'}}}
09:33 ITChap I would liek to have: properties.database.url and value
09:34 peterdemin So what's the problem?
09:39 digitalhero joined #salt
09:39 ITChap I want to display properties.database.url and value
09:39 ITChap but i can only display url and value
09:39 ITChap I don't really know how to explain it
09:40 ITChap I can only loop through the key and value but not display the "full" name of the key
09:41 peterdemin Basically there is no such thing as path in nested dicts. But you can implement one on your own, by storing keys in list.
09:44 ITChap I see
09:45 losh joined #salt
09:46 klocek joined #salt
09:48 peterdemin Maybe it is job for custom module
09:48 peterdemin Take a look, how Bernd solved similar problem: https://groups.google.com/forum/#!topic/salt-users/EUbnCGlroAA
09:59 c10b10 joined #salt
10:01 aparsons joined #salt
10:02 Ztyx joined #salt
10:02 scoates_ joined #salt
10:02 wnkz joined #salt
10:04 TyrfingMjolnir_ joined #salt
10:06 freelock_ joined #salt
10:06 amontalb1n joined #salt
10:07 jgelens_ joined #salt
10:08 FineTralfazz joined #salt
10:08 shnguyen_ joined #salt
10:08 stoogenmeyer joined #salt
10:09 Alan_S joined #salt
10:13 Aidin joined #salt
10:17 ITChap joined #salt
10:18 fgimian joined #salt
10:20 glyf joined #salt
10:22 c10b10 joined #salt
10:24 Aidin joined #salt
10:26 sirex joined #salt
10:29 Jahkeup joined #salt
10:34 unused_PhD joined #salt
10:44 trikke joined #salt
10:46 peterdemin I want to present my small project - slslint: https://github.com/peterdemin/slslint/
10:46 unused_PhD joined #salt
10:49 babilen Which coding guidelines does it adhere to?
10:49 babilen Ah, it just runs show_sls and checks for errors with that
10:49 scoates joined #salt
10:53 apofis joined #salt
10:54 evle joined #salt
10:56 Aidin joined #salt
11:02 peterdemin Right :-)
11:03 peterdemin Is there better way for checking SLS files without deploying solution?
11:03 AndreasLutro I just run with test=True
11:04 peterdemin I needed some fast check, that can be applied during Jenkins build process.
11:09 Norrland Is it possible to see where the 'nodename' grain has gotten it's value from?
11:12 unused_PhD joined #salt
11:13 babilen Norrland: https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L1031 + https://docs.python.org/2/library/platform.html
11:14 Norrland babilen: ah, thanks :)
11:14 babilen https://hg.python.org/cpython/file/2.7/Lib/platform.py#l1166 to be precise
11:14 Furao peterdemin: i build a test solution for that, it use jenkins to apply every .sls and then .absent  everything. all my formula have a test.sls that perform multiple checks, such as monitoring (to look if process run, ports are open, transactions occurs, etc), are metrics produces, are pillars keys documented, can all cronjobs run, etc etc
11:14 Furao a single test run for all my formulas is almost 2 days
11:15 dheeraj-gupta-4 joined #salt
11:15 _JZ_ joined #salt
11:16 supersheep joined #salt
11:17 peterdemin Furao: Looks like you are talking about complex integration testing scenario. My tool is linter, that runs several seconds for each sls file.
11:17 Furao ah yeah, i also have a lint too :)
11:17 peterdemin How do you lint SLS files?
11:18 Furao https://github.com/bclermont/states/blob/master/test/lint.py
11:20 glyf joined #salt
11:21 peterdemin Nice script, it would be great if you will extract it to separate repo (or pypi package) so everyone could use it.
11:24 Furao there is a lot of code specifics for the rest of that repo
11:25 Furao or our own rules
11:26 eSgr joined #salt
11:27 peterdemin Do you mind, if will copy it in my repo?
11:28 Furao yes go ahead, but you’ll have to change some code
11:29 Furao we have a pillar module proxy that is used to make sure all pillar keys are documented, that lint.py also make sure all pillar.get calls are done properly
11:30 glyf joined #salt
11:32 Aidin left #salt
11:33 otter768 joined #salt
11:33 monkey66 joined #salt
11:34 _JZ_ joined #salt
11:36 chiui joined #salt
11:36 monkey66 joined #salt
11:37 dimbulb joined #salt
11:38 dimbulb Okay, I'm used to "pound salt" being the channel where you get to say stupid things.   But apparently it has releases.   I'm pretty sure that means you're not into a stream of invective about how horrible my day was.
11:40 unused_PhD2 joined #salt
11:40 unused_PhD joined #salt
11:42 dimbulb is there any other kind?
11:42 AndreasLutro is the stream of invective related to salt?
11:42 AndreasLutro I had to look that word up
11:44 remzed_ joined #salt
11:44 remzed joined #salt
11:45 dimbulb I don't think it is.
11:45 dimbulb I think I've made a mistake.
11:45 * babilen is lost ..
11:45 dimbulb Getting in the way of actual things was not my aim.
11:45 babilen I honestly have no idea what you are talking about. Do you require help with salt?
11:46 * dimbulb is considering talking loudly about Windows 10 in ##debian until he gets kickbanned.
11:46 dimbulb See, it's been *that* kind of day.
11:46 babilen Thanks for warning me ..
11:46 dimbulb Nah.  I'm done.
11:48 ericof joined #salt
11:48 dimbulb left #salt
11:49 dthom91 joined #salt
11:50 babilen As a #debian op I'm quite sad that some people apparently see it as a legitimate channel for letting of steam ... :(
11:50 aqua^c joined #salt
11:56 VSpike Just bought up a new host not on AWS for the first time in quite a while. Wanted to install salt, so I downloaded the salt bootstrap script and ran it, and it's saying I need to allow it to use pip to install tornado >= 4.0
11:57 _JZ_ joined #salt
11:57 VSpike Is this a new thing? And is using the bootstrap the best way to do it? Or should I just add the PPA?
11:57 VSpike I kind of lazily assumed that woudl be more or less what the bootstrap did, once it had worked out which OS it was on
11:58 VSpike it seems to have installed a few PPAs in fact. chris-lea/python-chardet and chris-lea/python-requests
12:01 rideh joined #salt
12:02 AndreasLutro VSpike: I think it's new with 2015.8
12:02 rideh joined #salt
12:04 mamercad joined #salt
12:04 VSpike AndreasLutro: that's not released yet, though, is it?
12:04 VSpike I'm doing "sh install_salt.sh stable"
12:06 monkey66 left #salt
12:06 AndreasLutro VSpike: don't think so. maybe "stable" isn't a valid argument?
12:09 arount left #salt
12:14 tmclaugh[work] joined #salt
12:15 VSpike seems like "sh install_salt.sh stable 2015.5" works a lot better.
12:15 VSpike If you put a bad version in it prompts "Unknown stable version: 2015.5.2 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, 2015.8, latest)"
12:15 VSpike Suggests it defaults to 2015.8 as stable, which doesn't seem right
12:15 AndreasLutro mm
12:16 AndreasLutro yeah I dunno, seems odd
12:17 AndreasLutro I just install manually, don't want to depend on a 6k loc shell script
12:18 amcorreia_ joined #salt
12:18 VSpike yes, I'll probably do that next time :)
12:23 omegamike joined #salt
12:28 gcfhvjbkn joined #salt
12:30 fredvd joined #salt
12:30 bluenemo joined #salt
12:30 bluenemo hi guys. I'm trying to write some jinja templates and move macros for it to other files. I tried this with the jinja extends statement in the macro to extend the actual template file, but it wont work somehow: http://paste.debian.net/hidden/8c2421db/
12:32 bluenemo sorry had an error in the previous paste, please use this one http://paste.debian.net/hidden/35d40982/
12:33 stoogenmeyer_ joined #salt
12:33 impi joined #salt
12:34 scottpgallagher joined #salt
12:35 AndreasLutro bluenemo: very unclear what you're trying to achieve, but if you're making an abstract vhost template you should look into blocks in jinja
12:36 napsterX joined #salt
12:37 bluenemo AndreasLutro, just trying to write macros in other files and use those macros in templates
12:37 bluenemo {% from 'nginx/macros/typo3.jinja2' import 'foobar' %} seems to work, I'd like to import all in one run
12:37 AndreasLutro bluenemo: okay, if so you need to do {% from 'template_file.jinja' import mymacro %}
12:38 AndreasLutro mm not sure if jinja allows you to import all macros/variables from a file
12:38 AndreasLutro ah, you can do {% import 'my_template.jinja' as my_template %}
12:38 AndreasLutro then {{ my_template.my_macro() }}
12:39 bluenemo perfect, works, thank you AndreasLutro :)
12:41 DammitJim joined #salt
12:43 sunkist joined #salt
12:50 tkharju joined #salt
12:52 elfixit joined #salt
12:53 mapu joined #salt
12:55 Tecnico1931 joined #salt
12:56 Mstaaravin joined #salt
12:56 primechuck joined #salt
12:57 subsignal joined #salt
12:58 jdesilet joined #salt
13:00 otter768 joined #salt
13:01 omegamike joined #salt
13:03 DammitJim joined #salt
13:06 elfixit joined #salt
13:10 cpowell joined #salt
13:13 digitalhero joined #salt
13:13 pdayton joined #salt
13:14 ferbla joined #salt
13:15 racooper joined #salt
13:16 subsignal joined #salt
13:17 primechuck joined #salt
13:20 hasues joined #salt
13:21 hasues left #salt
13:21 trikke joined #salt
13:31 furrowedbrow joined #salt
13:33 drawsmcgraw joined #salt
13:35 bhosmer joined #salt
13:37 numkem joined #salt
13:38 SubOracle joined #salt
13:38 Deevolution joined #salt
13:44 mpanetta joined #salt
13:44 rhodgin joined #salt
13:44 subsigna_ joined #salt
13:45 supersheep joined #salt
13:49 DammitJim joined #salt
13:49 digitalhero joined #salt
13:49 bluenemo joined #salt
13:50 bluenemo hi guys. I'm trying to default-assign arguments in jinja macros. I want to assign a default to some var with the value of a previous var (without defaults): http://paste.debian.net/288675/
13:50 bluenemo this one is better sry http://paste.debian.net/288676/
13:50 drawsmcgraw joined #salt
13:51 bluenemo when I default server_name to generic_name, why wont it find l_generic_name?
13:51 bluenemo what does work is foobar=generic_name + 'blafoo'
13:52 bhosmer joined #salt
13:52 timoguin joined #salt
13:53 trikke joined #salt
13:54 viq joined #salt
13:55 bhosmer_ joined #salt
13:55 numkem joined #salt
13:57 bhosmer joined #salt
13:59 ekristen joined #salt
14:02 mamercad joined #salt
14:04 quasiben joined #salt
14:06 iggy jinja macros are the devil
14:06 andrew_v joined #salt
14:08 quasiben joined #salt
14:11 sunkist joined #salt
14:13 dthom91 joined #salt
14:13 mech422_ joined #salt
14:14 mech422_ Hi! Is there any way to see WHY a node matched selection criteria from within a state file? for instance, if you have multiple I.P's can you tell which one matched ?
14:15 bluenemo iggy, what do you use for those tasks? jinja makes me nuts too :(
14:16 bluenemo nah foobar=name + 'foobar' does not work either. wtf?
14:16 mage_ bluenemo: just use a custom module
14:17 bluenemo as in foobar=custom_module(generic_name) ?
14:18 murrdoc joined #salt
14:18 bluenemo thats kinda nutz. Whats better to use than jinja2 with saltstack for "advanced" templating? as in files with several indentation levels and so on?
14:18 bhosmer joined #salt
14:18 phoenix_fr joined #salt
14:18 mech422_ bluenemo: I came in late - but if I read you right: set foobar = '{0}foobar'.format(name) works for me
14:18 ALLmightySPIFF joined #salt
14:19 ALLmightySPIFF joined #salt
14:19 bluenemo what I'm currently trying to do is get some abstraction into nginx vhosts. What i want later is to say "wordpress" with some arguments in the pillars, and then get use macros for "wordpress" to template the vhost.
14:19 bluenemo mech422_, I want to default the argument to a jinja macro with it
14:19 bluenemo nut just set a string
14:19 mech422_ oh my bad - sorry
14:19 bluenemo mech422_, http://paste.debian.net/288676/
14:19 mage_ bluenemo: I use something like this https://gist.github.com/silenius/169321897f64363fd27a
14:20 bluenemo yeah thats python not jinja :) mage_
14:20 bluenemo ah ok now i get it, yes, custom modules..
14:20 bluenemo thought about that too now.
14:20 mage_ and my state file looks like https://gist.github.com/silenius/9d466e17c4a4e6f38ca4
14:20 bluenemo but just for defaulting some arguments to a macro? if jinja cant do that I need sth else than jinja imho :)
14:21 mage_ bluenemo: yeah, I just try to have "clean" templates
14:21 bluenemo ah thats nifty mage_. What I want is to have multiple "modules" that template one file together
14:21 bluenemo so I can later say I have a nginx vhosts for "php" or "rails"
14:21 bluenemo basically.. its an experiment :)
14:22 bluenemo mage_, you can return the whole object via - context: {{ foobar|json }}
14:22 bluenemo that might safe you some lines of code
14:22 bluenemo not return, but pass to file.managed. so you dont have to write the stuff agian in context
14:23 mage_ ah yes, thanks for the tip
14:25 kaptk2 joined #salt
14:26 djdeaf joined #salt
14:26 zmalone joined #salt
14:26 djdeaf sending custom pillars to salt-run orchestration?? I'm losing it
14:27 djdeaf Y U NO WORK????? salt-run --state-output=mixed state.orchestrate pillar="{CheckoutDir: '3557053a54db577e', buildID: '20150729.155'}" trackers.orc
14:28 mech422_ djdeaf: umm - quotes on keys in the pillar data ?
14:29 bluenemo so I could write a "pre-load-parse" macro that uses if statements to set those defaults
14:29 bluenemo thats ugly M)
14:29 phoenix_fr Hi there.  Is there a way to make salt-ssh remove its temporary directory after execution ? (ex : /tmp/.user1_db5868__salt). i'm just playing with it for now so not concerned about any performance issues that this modification could do)
14:30 bluenemo has anybody tried anything besides jinja from this list? http://docs.saltstack.com/en/latest/ref/renderers/all/
14:30 bluenemo if so, whats a good choice if I want sth more python-style?
14:30 VR-Jack2 djdeaf: I usually single quote the entire block and don't quote inside.
14:30 malinoff joined #salt
14:30 dthom91 joined #salt
14:30 bluenemo I just dunno if pyobjects is cool for temlating files..
14:30 mage_ Mako is great
14:31 djdeaf VR-Jack2: it seems like it's working for salt but not for salt-run
14:31 mage_ Jinja is an excellent template engine, but only for the web IMHO
14:31 djdeaf how can I even pass custom pillars into the sls? using salt-run of course
14:31 djdeaf I need orchestration for batch-fail hard feature
14:31 djdeaf I have it
14:31 mage_ it was a wrong choice to choose Jinja as the default template engine
14:31 djdeaf hate
14:31 Mstaaravin joined #salt
14:32 murrdoc jinja is awesome
14:32 mech422_ mage_: perhaps - but the she-bang for changing templating engines makes it pretty painless to pick another...
14:32 mech422_ that was a very pleasant surprise
14:32 Ztyx left #salt
14:32 VR-Jack2 djdeaf: sec. loading my salt vm
14:33 malinoff mech422_: it is painful since literally everybody is using jinja, all examples are in jinja etc
14:33 djdeaf VR-Jack2: awesome. thanks!
14:34 VR-Jack2 malinoff: python render is a little painful for the average person
14:34 malinoff VR-Jack2: except it's full of black magic...
14:35 VR-Jack2 djdeaf: here's what I run: salt-run -l debug state.orch orchestrate.bootstrap pillar='{hgroup: foo, node: bar}'
14:35 icflournoy joined #salt
14:35 murrdoc jinja lets you keep your states dumb
14:35 VR-Jack2 malinoff: true. It's expected that if you know python, you don't need excessive examples.
14:35 mage_ murrdoc: yep, but having to create a custom module just to use os.path.join is not very elegant
14:36 murrdoc and move all the logic to python states and modules
14:36 murrdoc whats your example
14:36 bhosmer joined #salt
14:37 malinoff murrdoc: i don't really get the point of implementing custom login in modules, filters or whatever else if you can simple implement this logic directly in state files by using plain python?
14:37 djdeaf VR-Jack2: Rendering SLS 'base:trackers' failed: Jinja variable 'dict' object has no attribute 'buildID'
14:37 djdeaf Shmock
14:37 malinoff custom logic*
14:37 murrdoc u ll like pyobjects then
14:37 malinoff no, i don't
14:37 Mstaaravin joined #salt
14:37 malinoff because it's full of black magic
14:37 murrdoc https://www.youtube.com/watch?v=Oc7kfpVWrM0
14:38 murrdoc then use the py renderer
14:39 murrdoc i have n number of roles , and have managed to keep it all jinja
14:39 murrdoc and am ok with it
14:39 bluenemo malinoff, what do you mean black magic? concerning pyobjects?
14:39 murrdoc if it doesnt work for u … try mako
14:39 VR-Jack2 djdeaf: I usually extract to jinja vars, so orchestrate/bootstrap.sls has {% set pnodename = pillar['node'] %} and works with that command I gave
14:39 bluenemo I just switched completely to writing my states in pyobjects, bad idea?
14:39 malinoff bluenemo: no, probably the best idea ever
14:39 bluenemo cool. thought so too, I really like it so far
14:39 VR-Jack2 djdeaf: I'm running 2014.7.5 still. not sure if it changed in the newer
14:40 malinoff i just think that sometimes boundaries are great
14:40 mage_ bluenemo: I just thinked to do the same
14:40 malinoff i had a bad time with salt, when almost everything was written in jinja and then we had to put some logic in states, so we switched to mako
14:40 malinoff and now we have 2 kinds of files to support
14:40 djdeaf VR-Jack2: What do you mean? Inside the orc.sls i run, i actually call another sls (init). how can I pass it? I mean, I can set the variables in the orch file, but how I pass them inside the yaml to the sls?
14:40 malinoff and to teach people
14:41 bluenemo hm that sucks, yes, malinoff
14:41 VR-Jack2 djdeaf: orchestrate requires you to pass on pillars to the state syou call
14:41 bluenemo I'm also thinking about rewriting all my formulas from jinja|yaml to pyobjects
14:41 murrdoc pretty much why i stuck with jinja
14:41 bluenemo but mostly one doesnt need the logic
14:41 VR-Jack2 So a salt.state will have a - pillar: stanza
14:42 malinoff i mean, why to introduce template engine (e.g. jinja) and a text format (e.g. yaml) if you can combine both in plain python from the beginning?
14:42 malinoff so you don't need customizable template engines and text formats
14:42 VR-Jack2 ie, you pass to orch from cmdline, then the orch sls passes it via - pillar: stanza into the actual state
14:43 bluenemo imho, for really basic stuff - as most states are just install package, manage config, restart service, I see no need there. For my Openvpn formula, wich creates servers, clients with certs and manages iptables, I need some logic :)
14:44 VR-Jack2 So far I've managed to pull off some pretty evil logic with jinja, but it's pretty scary. lol
14:44 djdeaf VR-Jack2: I think I get it. And how do I pass multiple stansaz? under one -pillar
14:44 malinoff bluenemo: for really basic stuff plain python will look like this: pkg.installed('something'), is it really so difficult to write/to understand?
14:45 VR-Jack2 djdeaf: it's - pillar: then indent on the lines below, one per line
14:45 malinoff i've spent more time dealing with yaml indentation and dashes
14:45 bluenemo malinoff, hm. Imho yaml looks simpler there. But basically you are correct, yes
14:45 mech422_ Hi! Is there any way to see WHY a node matched selection criteria from within a state file? for instance, if you have multiple I.P's can you tell which one matched ?
14:46 malinoff bluenemo: yaml has its own restrictions like if you want to install multiple packages, you'll have to give different ids to your tasks
14:46 mech422_ I'm starting to think I'll just say screw it and pass the criteria in as pillar data :-P
14:46 bluenemo mech422_, I dont get the question.
14:46 djdeaf VR-Jack2: Sorry for being slow, in the following example where would you put it? https://gist.github.com/DjxDeaf/d1ce5cd362da3767cf57
14:46 malinoff bluenemo: python will do multiple pkg.installed just fine
14:46 bluenemo malinoff, foobar: pkg.installed: - pkgs: - nmap - openssh-server
14:47 malinoff bluenemo: ok, file.present instead of pkg.installed
14:47 bluenemo malinoff, multiple pkg.installed inside one state id?
14:47 bluenemo thats possible with py?
14:47 bluenemo if so cool! :)
14:47 mech422_ bluenemo: if you are targeting a sub-set of minions, and a minion has multiple things that might have matched ( like multiple IPs or something) - is there anyway to tell which one actualy matched the criteria
14:47 bluenemo as in    foobar: file.mangaed: - name: /root/bla    file.managed: - name: /root/fo
14:47 malinoff bluenemo: i'm saying that if salt team would use plain python from the beginning, they wouldn't need such thing 'id'
14:47 malinoff you can't do that :)
14:48 bluenemo Hm. I like the ideas of IDs for the state output - which atm I mostly read and dont interpret right away again
14:48 bluenemo (interpret by program)
14:48 malinoff well, my 'ids' are mostly something like 'Make sure that package X is latest'
14:48 malinoff or installed
14:49 malinoff which can be easily generated programmatically
14:49 bluenemo mech422_, still dont get it. If for example you target a state with an if condition in jinja, say matching fqdn and ip. sth like this?
14:49 bluenemo Hm. mine are <name of formula>_<name of module in formula>_<description>
14:49 bluenemo I like it that way actually :)
14:49 VR-Jack2 djdeaf: something like this: https://gist.github.com/vr-jack/290bc3570914a744e952
14:49 malinoff bluenemo: so the volatile thing is only 'description'
14:50 malinoff don't you think the other part can be easily generated for you? :_
14:50 malinoff :)*
14:50 VR-Jack2 djdeaf: I updated that. I missed 2 spaces. - pillar: requires a double indent for some reason.
14:50 bluenemo not with jinja M)
14:50 bluenemo hahha :D
14:50 mech422_ bluenemo: no - if you want to use the same state with multiple 'options' - like 'install webserver on private ip' or 'install webserver on public ip'
14:50 malinoff not with current state system, you wanted to say
14:51 mech422_ bluenemo: in the state, I want to know which ip caused the minion to match
14:51 bluenemo hm. I usually make that the description then.
14:51 bluenemo mech422_, add a cmd.run state for debugging which does sth like echo {{ foobar }}
14:51 bluenemo I know thats hacky, thats how I mostly do it
14:52 bluenemo you can also use {{ foobar|pprint }} wich might help some
14:52 bluenemo there was a way to just print stuff with the #py renderer (without the fancy state output, as in just output a string) but i dunno how it worked anymore
14:52 digitalhero joined #salt
14:52 lrojas joined #salt
14:52 mech422_ bluenemo: I can do : salt 'I@foo:bar' state.sls somestate pillar={'provisioning_foo':'bar'}
14:52 Brew joined #salt
14:52 mech422_ but that seems pretty lame
14:53 bluenemo what does I@foo:bar do again
14:53 bluenemo ?
14:54 bluenemo Pillar foo is bar, then matched?
14:54 mech422_ just match minion by pillar['foo']='bar'
14:54 djdeaf VR-Jack2: You're awesome! Now the orchestration works
14:54 bluenemo ah ok
14:54 bluenemo hm and you want to know what matched this?
14:54 bluenemo if so use test.ping
14:54 dthom91 joined #salt
14:54 bluenemo salt 'I@foo:bar' test.ping
14:54 bluenemo no thats not what you asked..
14:54 bluenemo hm
14:54 VR-Jack2 djdeaf: orchestrate and a few other things (reactor) handle things different than normal. Takes some getting used to
14:55 mech422_ bluenode: no - in the state.sls I can just set blah = salt['pillar.get']('provisioning_foo')
14:55 mech422_ and then use that in the state
14:56 djdeaf VR-Jack2: Yeah i guess. BTW, i've switched to orchestration for failhard batch mechanism. and it doesn't work. The run fails at some step, (Failed=1, result=False) and it doesn't stop - any experience with that?
14:56 bluenemo hm. dont really have an answer, sorry :(
14:56 VR-Jack2 djdeaf: if you read in pillar data in the orchestrate file, keep in mind that the master server is usually referenced in pillar top.sls as minionid_master (minionid being the local minionid)
14:56 VR-Jack2 djdeaf: no. I haven't played with failhard.
14:57 lrojas hi all, i'm reading a book about learning salt and the guy talks about setting up in the file roots a base and development "catergories"
14:57 lrojas i sort of understand what is base, but what is development? is it a special state or is it just a label?
14:57 djdeaf VR-Jack2: Well, thanks for your help. Highly appreciated
14:58 VR-Jack2 lrojas; environment, and they are a pain to deal with
14:58 lrojas also, i have my base set to /srv/salt but in the book they point it to /opt/salt-cookbook/base
14:59 mech422_ bluenemo: no biggie - I'm just surprised no one has a better way.
14:59 mech422_ bluenemo: passing it as pillar data will work, if ugly
14:59 lrojas VR-Jack2: where can i read about them and why are they a pain?
14:59 supersheep joined #salt
14:59 VR-Jack2 lrojas: if you do environemtns, you would do /srv/salt/base and /srv/salt/dev and /srv/salt/otherenvironment
14:59 iggy bluenemo: #!py states or custom execution/state modules
15:01 mech422_ anyway - thanks all..off to work...
15:01 mech422_ left #salt
15:03 ajw0100 joined #salt
15:03 gfa joined #salt
15:04 clintberry joined #salt
15:05 bluenemo I think the idea of splitting up nginx vhosts in modules for $use_case works so far..
15:05 VR-Jack2 lrojas: other areas I'm sure, but http://docs.saltstack.com/en/latest/ref/states/top.html covers them to a degree
15:05 bluenemo maybe I might finally get happy with webserver config management :)
15:05 lrojas VR-Jack2: thanks
15:06 VR-Jack2 lrojas: there are lots of tricks with it. like specifying multiple file systems in the config for an environement and this creates and overlay effect which allows you to use one fs tree but override it on a file by file basis.
15:08 VR-Jack2 but then you have to specify what hosts are using what environment and I found that annoying. I just use different masters with DVS
15:09 mejiamariano joined #salt
15:12 bhosmer joined #salt
15:15 gfa joined #salt
15:16 stoogenmeyer_ joined #salt
15:16 Mstaaravi joined #salt
15:17 cowpunk22 joined #salt
15:17 rideh joined #salt
15:17 Mstaarav joined #salt
15:21 djdeaf joined #salt
15:23 djstorm joined #salt
15:26 freelock joined #salt
15:27 dopesong joined #salt
15:27 aqua^c joined #salt
15:27 phoenix_fr left #salt
15:27 dopeson__ joined #salt
15:28 tobias_ joined #salt
15:28 tobias_ howdy
15:28 tobias_ I have a question regarding salt-cloud and git
15:29 tobias_ as you guys may know we had a problem in salt-cloud bootstrap
15:29 tobias_ https://github.com/saltstack/salt/issues/25886
15:29 saltstackbot [#25886]title: Salt-cloud unable to bootstrap minions using COPR repo | This just started this morning using salt-cloud to bootstrap AWS minions:...
15:29 tobias_ yup
15:30 tobias_ so my question, is there any way to tell salt-cloud to use https to fetch for the the specified bootstrap version rather than ssh?
15:30 tobias_ from git
15:30 tobias_ *github*
15:30 tobias_ does my question make sense?
15:31 iggy I think you can set a custom git url, check the bootstrap docs for how to install from your own repo
15:32 iggy -g
15:32 iggy or -G
15:32 fxhp joined #salt
15:33 timoguin joined #salt
15:34 otter768 joined #salt
15:35 tobias_ awesome
15:35 tobias_ thanks
15:37 dthom911 joined #salt
15:37 catpig joined #salt
15:41 aparsons joined #salt
15:41 gcfhvjbkn joined #salt
15:41 digitalhero joined #salt
15:43 arapaho joined #salt
15:43 jalbretsen joined #salt
15:44 hasues joined #salt
15:44 hasues left #salt
15:45 digitalhero joined #salt
15:47 TooLmaN joined #salt
15:47 aparsons joined #salt
15:48 _JZ_ joined #salt
15:50 jim__ joined #salt
15:51 clintberry joined #salt
15:53 jim__ targeting minons is being a bit strange..
15:53 jim__ listing them doesn't seem to work
15:53 digitalhero joined #salt
15:54 jim__ trying to target pi7 and pi8 salt-run 'pi[7,8].dcs.gla.ac.uk' cmd.run "echo test
15:54 jim__ 'pi[7,8]' __virtual__ returned False
15:54 iggy salt-run doesn't take hosts
15:54 iggy runners all run in the master context
15:55 jim__ ah
15:55 jim__ I should have been using salt
15:55 jim__ I am ridiculous
15:56 conan_the_destro joined #salt
15:59 digitalhero joined #salt
16:01 pdayton joined #salt
16:02 hoonetorg joined #salt
16:02 alemeno22 joined #salt
16:05 mejiamar_ joined #salt
16:06 anotherZero joined #salt
16:06 hasues joined #salt
16:06 hasues left #salt
16:07 anotherZero why would salt be complaining about a state not rendering properly when I'm calling an entirely different state?
16:08 Sokel joined #salt
16:08 anotherZero `salt 'myhost' state.sls assign_roles` errors out with "Rendering SLS 'structure' failed. Please see master log for details."
16:10 hoonetorg hi anybody seen a pacemaker/corosync formula for saltstack
16:10 hoonetorg it's for my HA openstack automation
16:11 hoonetorg for now i want to configure the galera resource agent with it, more to come
16:13 VR-Jack2 hoonetorg: don't see one anywhere, but there are a variety of configs for that. I'd just do simple file.managed
16:13 zer0def joined #salt
16:13 dthom91 joined #salt
16:14 VR-Jack2 been awhile, but isn't a lot of the setup pacemaker commands that it stores in it's db?
16:14 dopesong joined #salt
16:14 mejiamariano joined #salt
16:15 hoonetorg VR-Jack2: yeah, that's what I will do for installation
16:15 hoonetorg but i also want to configure resources with it
16:15 icflournoy joined #salt
16:16 TyrfingMjolnir joined #salt
16:16 hoonetorg a long time as i used puppet :) there was/is a (bit limited) puppet module for configuring resources (with pcs, which is standard now in el7)
16:16 hoonetorg a long time ago as i used puppet :) there was/is a (bit limited) puppet module for configuring resources (with pcs, which is standard now in el7)
16:17 VR-Jack2 you can, of course, build your own module, or just run a series of commands. I like to do setup with orchestrate and order restraints, sometimes called via reactor
16:18 VR-Jack2 Can be especially useful when you are dealing with a cluster and order of setup matters
16:18 hoonetorg me too, actually i need to define one node from which i do the "pcs resource..." stuff.
16:20 VR-Jack2 what I often do is write a quick shell script that does what I want and use jinja for pillar info, then call the script via salt. it has a special cmd script option
16:20 hoonetorg i actually don't know how the puppet module does this, but it was so advanced, that i could run it on any of the cluster nodes without getting errors, i liked this and it's probably not thaaaat easy (that's why i hoped something exists).
16:21 VR-Jack2 it's actually what I use for creating my virtual machines in libvirt
16:23 hoonetorg VR-Jack2: thy, i will do this, if i don't find anything else
16:23 digitalhero joined #salt
16:24 digitalhero joined #salt
16:25 VR-Jack2 the pro and con of saltstack. module support is limited compared to puppet, but then you don't have 50 modules for one service to choose from.
16:25 zsoftich1 joined #salt
16:26 jaybocc2 joined #salt
16:28 bhosmer joined #salt
16:28 tiadobatima joined #salt
16:29 PredatorVI joined #salt
16:31 amcorreia_ joined #salt
16:32 otter768 joined #salt
16:35 rideh^ joined #salt
16:35 bhosmer_ joined #salt
16:37 anotherZero anyone have an idea why salt would be complaining about a state not rendering properly when I'm calling an entirely different state?
16:38 bhosmer joined #salt
16:39 PredatorVI anotherZero: Is it using requisites/includes/etc.?  Do you have a sample (via Gist)?
16:39 KyleG joined #salt
16:39 KyleG joined #salt
16:41 digitalhero joined #salt
16:41 digitalhero joined #salt
16:42 anotherZero PredatorVI: here's the state I'm trying to run. http://pastie.org/private/rnm1tm5pabppki1scpqla
16:44 anotherZero that's in /srv/salt/assign_roles/init.sls  and it's complaining that /srv/salt/structure/init.sls isn't compiling properly...
16:44 anotherZero cache of some kind?
16:45 anotherZero i tried to run a top file earlier and it failed
16:48 primechuck joined #salt
16:51 anotherZero ok, and it's still complaining about it after I remove all references and the directory structure
16:51 cedwards joined #salt
16:51 supersheep joined #salt
16:51 dthom911 joined #salt
16:52 cedwards I've run into a strange issue.. I've got a custom ext_pillar module that seems to be working as expected.
16:53 cedwards except I can't query the data using salt $target, only salt-call pillar.get
16:53 VSpike how would I call salt myserver cmd.run "somecmd" passing some env parameters? IOW https://bpaste.net/show/be4ed9bfc213 but on a single command line
16:53 VSpike I know I can do salt gr-dev-f-ngx-2 cmd.run "bash -c 'LC_ALL=en_US.UTF-8 apt-add-repository -y ppa:ondrej/php5'"
16:53 cedwards salt '*' pillar.get nested:key:value gives me back nothing, but salt-call pillar.get nested:key:value works fine.
16:54 bhosmer joined #salt
16:55 impi joined #salt
16:55 PredatorVI anotherZero:  Are you invoking that state directly?  like `salt 'yourminion' state.sls assign_roles`
16:56 anotherZero PredatorVI: from the master: `salt 'server' state.sls assign_roles
16:56 anotherZero yes
16:56 anotherZero it's like it's clinging to the failed topfile I tried to invoke earlier.
16:56 anotherZero I restarted the master and minion services...
16:58 PredatorVI anotherZero: This does seem odd...unless you have a duplicate state with that name somehow.  Do you have other 'roots' configured by chance?
16:58 anotherZero Let me double check.  I did mess with that yesterday, but I thought I put it back to default
16:59 quasiben joined #salt
17:00 anotherZero no roots modifications. /etc/salt/master is back to the default.  all the _roots sections are commented out still
17:00 anotherZero can I just wipe the /var/cache/salt/master dir or something?
17:02 anotherZero well... i got around it by manually assigning the roles that were causing the 'structure' state to fail...
17:02 venu0336 joined #salt
17:03 whytewolf morning,afternoon,evening everyone
17:04 anotherZero that state was looking for roles and it was failing because they weren't assigned to the minion yet.  ::shrug::
17:06 ageorgop joined #salt
17:14 murrdoc joined #salt
17:16 cpowell joined #salt
17:16 dthom91 joined #salt
17:17 theologian joined #salt
17:19 ajw0100 joined #salt
17:20 Ztyx1 joined #salt
17:20 Bryson joined #salt
17:20 forrest joined #salt
17:22 quasiben joined #salt
17:23 gcfhvjbkn joined #salt
17:25 murrdoc joined #salt
17:29 ALLmight_ joined #salt
17:32 baweaver joined #salt
17:33 ALLmightySPIFF joined #salt
17:35 _JZ_ joined #salt
17:37 cheus joined #salt
17:38 wendall911 joined #salt
17:38 ajw0100 joined #salt
17:41 KingJ joined #salt
17:44 nzero joined #salt
17:46 mapu joined #salt
17:46 alemeno22_ joined #salt
17:53 baweaver joined #salt
17:56 SheetiS joined #salt
17:57 druonysus joined #salt
18:01 XenophonF joined #salt
18:01 dude051 joined #salt
18:01 XenophonF i love salt but sometimes it drives me crazy, to wit: some file states have an argument named "content", while others have an argument named "contents"
18:02 iggy yeah, I cleared this up for someone once, let me try to remember how it went
18:03 sunkist joined #salt
18:04 iggy < iggy> content refers to the amount of something in something else, contents refers to the something
18:04 iggy < iggy> this drink has high alcohol content, the contents of this drink are vodka... and ice
18:05 icflournoy joined #salt
18:05 iggy if you still think you are right, file a bug
18:05 bhosmer joined #salt
18:07 baweaver joined #salt
18:09 aqua^c joined #salt
18:10 dude051 joined #salt
18:20 conan_the_destro joined #salt
18:20 digitalhero joined #salt
18:22 berserkir Anyone know if it's possible to specify the mongo.db name for a master_job_cache? Command line has this option: --return_config alternative . Not sure how to set it in master configuration
18:22 rideh joined #salt
18:22 berserkir I am using mongo for pillar data, would like to specify a different DB name for returner
18:27 iggy I think one of the other returners has an example
18:32 digitalhero joined #salt
18:33 XenophonF would someone give me a clue regarding a small bit of jinja?
18:33 berserkir Thanks iggy - will take a look
18:33 XenophonF i have an elif clause that isn't working - "elif value is sameas True or value is sameas False"
18:33 PredatorVI iggy (et.al.):  Any chance you could glance at my updatewar SLS and let me know if it is properly structured?  https://gist.github.com/PredatorVI/de554f64f26f85ddce2c
18:33 XenophonF https://github.com/irtnog/salt-states/blob/development/postfix/init.sls#L24 in context
18:34 XenophonF it comes down to me wanting to render something: True or something: False as "yes" or "no"
18:35 Sokel left #salt
18:35 XenophonF but fool-proof things such that the formula user can use a boolean or a string and get it right
18:35 iggy XenophonF: sameas does a memory comparison, if value is coming from pillar it'll be trueish not exactly true
18:35 XenophonF it's strange, Iggy - it's like "if value is string" ends up eval-ing true
18:36 XenophonF even though value should be True or False
18:36 XenophonF will "if value == True or value == False" do what i expect?
18:36 iggy PredatorVI: it doesn't look wrong, is it not working?
18:37 XenophonF hm, i'm going to re-order those tests and try it
18:37 iggy XenophonF: depends what you expect
18:37 PredatorVI Working on trying it now...I just refactored it from the one you said looked "bass ackwards" :) using your suggestion from last week.
18:38 XenophonF i only want that if clause to return true if value is a boolean type as opposed to a string type
18:38 iggy XenophonF: best I can suggest is test it... jinja is very pythonic, but it's not all directly mapped to python functionality
18:39 Lionel_Debroux joined #salt
18:39 iggy XenophonF: where is the value coming from?
18:39 XenophonF iggy: defaults.yaml, map.jinja, or pillar
18:39 iggy (this would be easier in a #!py sls file
18:39 XenophonF looks like run-time type checking beyond string/number doesn't come with jinja - https://github.com/mitsuhiko/jinja2/issues/358
18:39 saltstackbot [#358]title: No way to test type | We need a way to be able to test the type of an object is equal to one another. ...
18:40 TooLmaN joined #salt
18:40 XenophonF ok I'm going to try == and see where that gets me
18:44 forrest Did anyone encounter auth issues on 2015.5.2? I have a minion that is failing to auth against the master occasionally. There aren't even that many minions, let alone connecting at the same time, so this shouldn't be a problem
18:45 stevednd iggy: is there any way to require_in an sls file? I have some includes, and I don't want them to run until after the main part of the file
18:45 quasiben joined #salt
18:45 iggy stevednd: yes require: - sls: path.to.wholefile
18:46 stevednd iggy: yeah, 'require' works, but not 'require_in'
18:46 stevednd I tried partial and full path
18:46 iggy oh... um, no, probably not
18:47 slav0nic joined #salt
18:47 stevednd well damn
18:47 stevednd any way to force the includes to run after the rest of the states in a file?
18:48 stevednd I was trying to organize some bigger state files, and make subsections able to be run independently
18:49 stevednd but without that it's a no go
18:49 hemphill joined #salt
18:49 quasiben joined #salt
18:50 iggy I think it'd be best if you came up with an example
18:50 X67r joined #salt
18:51 subsignal joined #salt
18:51 fredvd joined #salt
18:52 murrdoc joined #salt
18:52 XenophonF ok, using == and testing for True/False first did the trick
18:54 stevednd https://gist.github.com/dnd/0b46b7ef0b29d94a4b7d
18:54 stevednd iggy:  ^^
18:54 iggy you know gist supports multiple files per paste right?
18:54 stevednd I do
18:54 quasiben joined #salt
18:54 venu0336 joined #salt
18:54 stevednd I was being lazy and didn't want to use the mouse
18:55 murrdoc i like this guy
18:55 murrdoc at least hes upfront about his laziness
18:55 digitalhero joined #salt
18:55 murrdoc guess u better pick up slack for him
18:55 murrdoc iggy
18:55 iggy sadly, the only thing I can think of off the top of my head is using order:
18:56 otter768 joined #salt
18:56 iggy and I'm going to have to flog myself later just for mentioning that in public
18:56 forrest iggy: Disguisting
18:56 forrest if you have to use order, you should rewrite your states
18:56 * murrdoc hands forrest bat
18:56 iggy he is rewriting them
18:57 iggy stevednd: just leave them together
18:57 PredatorVI I may have missed something but wouldn't 'onchanges' work for the includes?
18:57 hemphill No flogging required iggy, nothing wrong with ordering...
18:57 iggy or make sure the ordering is right in the top file and don't try to require stuff
18:58 stevednd forrest: how would you split them so that they can be properly ordered in one file using includes, or run individually
18:59 stevednd iggy: leaving them together is pretty much where I was left. Which annoys me because then I can't just run them piecemeal if needed
18:59 iggy hemphill: you dirty dirty human being
18:59 hemphill I know, being a realist is so messy...
18:59 iggy stevednd: split them up and just include everything in the top file (that's basically what we do here)
19:00 murrdoc hemphill:  been order free i have
19:00 iggy not out of necessity, that's just how I write states
19:01 hemphill there are use cases which don't require ordering, and then there are those that really really do
19:01 forrest stevednd: I don't get the structure. Why can't you just include the init in your users state? Then the init runs first, then the user state runs
19:02 hoonetorg more going on now: asking again: hi anybody seen a pacemaker/corosync formula for saltstack 16:10 it's for my HA openstack automation 16:11 for now i want to configure the galera resource agent with it, more to come
19:02 X67r_ joined #salt
19:04 forrest hoonetorg: I've never seen such a formula. If you're interested in writing one though we can create a repo for you to fork in the saltstack-formulas repo.
19:05 hoonetorg forrest: probably i need to
19:05 forrest There's only a single openstack formula as far as I know, that community doesn't work much outside of openstack unless paid to a lot of the time it seems :\
19:05 forrest hoonetorg: Let me know, I can make pacemaker-formula, and corosync-formula if you want.
19:05 hoonetorg actually i  need a pacemaker/corosync formula
19:05 murrdoc hemphill:  can i see some examples of stuff that needs to use the order keyword
19:05 murrdoc for science
19:06 hoonetorg to make (at least galera) HA in openstack
19:06 enator joined #salt
19:06 hoonetorg (solves the problem with cluster initialisation)
19:06 forrest hoonetorg: What about two repos, and then you can just include as needed? I'd prefer to keep them separate unless they are dependent on one another, I'm not familiar with either enough to say one way or the other.
19:06 iggy they aren't widely used without each other
19:07 iggy (as in outside of boredom or academic exercise)
19:07 hoonetorg my plan is to deploy openstack with a bunch of formulas, because it consists of many standard components (mysql, rabbitmq, ceph, haproxy, ......
19:07 venu0336 joined #salt
19:08 forrest iggy, hoonetorg: https://github.com/saltstack-formulas/pacemaker-corosync-formula
19:08 chiui joined #salt
19:08 iggy when you get to the ceph formula part, let me know
19:08 hoonetorg and then use (probably an existing) openstack formula for the real openstack stuff (keystone ...)
19:08 hemphill not saying they can't be gotten around in other ways but I have found it useful for things like mounting instance store drives in aws. I suppose I could just put a check into every single state to make sure the drives were mounted first, but that's just so tedious.
19:08 * iggy sends email to pester boss about release ceph formula
19:08 forrest There's already a ceph formula iggy
19:08 hoonetorg iggy: thx
19:08 iggy forrest: it's... empty
19:08 forrest iggy: shhhh
19:09 hoonetorg forrest: i have my own ceph formula (it's not very following best practices - i worked 1 year with saltstack without reading docs :ooops:
19:09 forrest iggy: You ready for something amazing? I'm seeing a salt master running 2014.1.0 connecting to a 2015.5.2 minion. I'm shocked it even works.
19:10 iggy we have one that (mostly) works for debian but needs some clean up
19:10 forrest hoonetorg, iggy: Nice
19:10 ajw0100 joined #salt
19:10 forrest hoonetorg: There were barely best practices a year ago
19:10 iggy forrest: should "work"
19:10 forrest I know because I wrote the original draft ;)
19:11 iggy (and of course you mean a 2015.2 minion connecting to a 2014.1 master)
19:11 stevednd does salt preserve the order of sls file in an include, or are those subject to reordering? Will sls: [.d, .c, .f] always run in the same order stated, or is every instance subject to change?
19:11 forrest iggy: Yeah
19:11 forrest stevednd: It's preserved as far as I'm aware.
19:11 iggy stevednd: I wouldn't count on it being maintained, but it's a list, so it should be
19:12 stevednd iggy, forrest: thanks for the insight
19:12 whytewolf the ordered is perserved as long as nothing changes.
19:12 forrest stevednd: Yeah np, thanks for the comment whytewolf
19:12 hoonetorg forrest,iggy: thx for the empty repo
19:13 forrest hoonetorg: You got it man, always happy to help people contribute
19:13 hoonetorg will send pr, when i have something
19:13 forrest hoonetorg: If you need, https://github.com/saltstack-formulas/template-formula
19:13 forrest hoonetorg: We're usually pretty easy going about the first PR into the repo though, because something > nothing
19:13 iggy speak for yourself
19:14 hoonetorg i already forked that, to test git flow, will try to work after that scheme
19:14 iggy I'm watching that shit like a hawk
19:14 * iggy runs
19:14 hoonetorg iggy: :rofl:
19:14 whytewolf I really wish i was better at python so i didn't have to argue about the merits of openstack that doesn't have a volume manager. and i could just fix this stupid bug.
19:16 forrest whytewolf: Well, just do like I do, get so pissed off that you learn it just to fix the problem
19:17 forrest that's what I did when I first started working on salt, was so mad at puppet I was like 'what can I do to make puppet burn?'
19:18 whytewolf lol. might come to that. if i can ever find the time.
19:18 _JZ_ joined #salt
19:25 PredatorVI n00b question debugging an SLS file that needs pillar data.  When running `salt 'minion' state.sls mystate` can I somehow force the desired pillar data to be loaded/used or is the only way to tweak the pillar top.sls?
19:26 digitalhero joined #salt
19:26 cowpunk22 joined #salt
19:26 overyander joined #salt
19:28 whytewolf PredatorVI: http://docs.saltstack.com/en/2014.7/topics/pillar/index.html#set-pillar-data-at-the-command-line
19:29 cbrich82 joined #salt
19:29 stevednd can you upgrade a master version previously using packages  to a git revision by using the bootstrap script the same as with minions? I'm assuming yes, but I don't feel like potentially borking everything at the moment
19:29 PredatorVI whytewolf: thanks, but I want to use a set of pillar SLS files.
19:30 iggy for the state system there's a way to set a custom top file, don't know about pillar
19:32 digitalhero joined #salt
19:33 xant_ joined #salt
19:33 whytewolf yeah for pillar i don't think such a thing exists. might be a decent feature request cause i know i can see that as handy.
19:35 xant_ left #salt
19:43 tkharju joined #salt
19:44 XenophonF god i really hate jinja
19:44 XenophonF there are tests for strings and sequences and interables and mappings and numbers but not for lists
19:44 baweaver joined #salt
19:45 iggy iterable and not mapping?
19:45 digitalhero joined #salt
19:45 XenophonF if value is iterable and not mapping and not string
19:45 XenophonF super freaking ugly
19:46 iggy you really shouldn't be testing type in jinja
19:46 XenophonF yeah, i need to rewrite this in python
19:49 digitalhero joined #salt
19:52 XenophonF hm yaml_encode or yaml_dquote, not sure which to use
19:52 XenophonF let's try yaml_encode first
19:53 alwaysatthenoc joined #salt
19:56 whiteinge joined #salt
19:59 cheus joined #salt
20:05 bhosmer joined #salt
20:05 cbrich82 joined #salt
20:14 whiteinge joined #salt
20:16 tercenya joined #salt
20:20 murrdoc joined #salt
20:20 twobitsprite are there any plans to update the salt packages for squeeze on the debian.saltstack.com repos?
20:21 zzzirk joined #salt
20:27 babilen I would be surprised if there are not, but doing the work takes time and we simply can't know when it'll be done
20:29 iggy but squeeze? really?
20:31 forrest I don't think the maintainer of the packages builds stuff for squeeze
20:31 baweaver joined #salt
20:31 forrest I'd ask, but joehh isn't in here it seems
20:31 PredatorVI There are places that keep up to date and there are places that if it ain't broke, put it in a closet and sheetrock around it.
20:31 forrest joehh1: Is this the real joehh?
20:34 druonysuse joined #salt
20:34 whytewolf I tend to find that the if it ain't broke mentality stems from a lack of knowing if it actually is broke
20:41 mapu joined #salt
20:44 PredatorVI In pillars, can I use other pillars to construct other pillar values?
20:45 Ztyx joined #salt
20:45 elektrix joined #salt
20:45 PredatorVI Trying {{ salt['pillar.get']('war:name') }}  where war:name is defined earlier in the pillar file but the value is empty in the final render.
20:46 iggy no(t reliably)
20:46 PredatorVI k
20:48 Ztyx joined #salt
20:48 kim0 joined #salt
20:48 kim0 hi folks .. I'm failing to run master/minion on IP6
20:49 supersheep joined #salt
20:50 herpoderp joined #salt
20:55 FeatherKing joined #salt
20:56 FeatherKing in a custom module can i use a file on the salt master?
20:56 otter768 joined #salt
20:57 iggy you can cp.cache_file(s) with a salt:// path and then access that
20:58 Heartsbane joined #salt
20:58 twobitsprite iggy, PredatorVI: squeeze is LTS
20:59 XenophonF hey all i'm kind of mystified by an archive.extracted state
20:59 XenophonF https://gist.github.com/xenophonf/8777be4371fa8cac1a18
20:59 XenophonF everything says it completed successfully, but the directory that's supposed to be extracted is empty
20:59 iggy twobitsprite: for a couple more months I guess... better start getting ready
21:00 FeatherKing iggy: cp.cache_file will copy it from master to minion, then i reference it under like /var/salt/cache on the minion? do you know of any examples where something like that is happening?
21:01 twobitsprite iggy: sure... but just seems like salt should support anything the OS vendor still supports...
21:01 iggy FeatherKing: modules.ssh modules.pip etc...
21:01 twobitsprite Or is it just an arbitrary decision to just drop support for OS versions?
21:03 kim0 I ended up opening bug https://github.com/saltstack/salt/issues/25980
21:03 saltstackbot [#25980]title: salt fails to start on ipv6 (on freebsd) | I'm trying to run a salt-master / salt-minion setup on a single machine (freebsd 9) using ipv6. This is continuously failing with "Invalid argument". ...
21:03 iggy twobitsprite: the packages aren't actually maintained by anyone at saltstack, so it's more a matter of time that the volunteer has than anything
21:08 Amit_ joined #salt
21:08 FeatherKing iggy: that worked perfect, thx iggy
21:08 peters-tx joined #salt
21:08 XenophonF i don't get it - i have an almost identical archive.extracted state in the same sls file, and it untars everything correctly
21:15 Ztyx1 joined #salt
21:15 cedwards joined #salt
21:16 Ztyx1 joined #salt
21:16 XenophonF can i have two archive.extracted states both with "name: /opt"?
21:16 XenophonF both in the same sls file?
21:16 subsignal joined #salt
21:18 bstaz joined #salt
21:20 Ztyx joined #salt
21:21 babilen XenophonF: As long as their id is different ... it might work.. :-/
21:21 babilen tias!
21:22 baweaver joined #salt
21:22 XenophonF ids are different but only the top-level dir gets extracted - not the rest of the tarfile :(
21:22 sunkist joined #salt
21:24 iggy no
21:25 iggy it looks for name to know if the archive is exctracted
21:27 dthom91 joined #salt
21:28 apofis joined #salt
21:32 rhodgin joined #salt
21:35 Ztyx1 joined #salt
21:36 omegamike joined #salt
21:37 nzero joined #salt
21:39 enator Question for you guys - how do you allow multiple teams using salt from stepping on each other's toes. For example, we have an infra team who uses salt to manage DNS, users, etc and a Release Engineering team who uses salt for configuration management and deployment
21:39 enator Is it possible to keep RM from running Infra's states and vice versa?
21:39 iggy you could use environments or separate masters
21:45 c10b10 joined #salt
21:54 nzero joined #salt
21:55 enator ok cool, i'll have to look into separate masters
21:57 babilen (or roll out changes automagically and simply give different teams access to different repositories ... there really shouldn't be that many people with direct master access)
21:59 enator babilen: we already are doing this, but it's becoming confusing when we get to shared files
22:00 enator babilen: though, it could be because the 3 of us working on salt are new to it. the one guy who set everything up left and didn't document much
22:03 babilen "I'm a team of one!"
22:03 babilen :)
22:04 druonysuse joined #salt
22:04 druonysuse joined #salt
22:07 digitalhero joined #salt
22:09 enator hah, sadly it's kind of like that where i'm at. we're 'one team' in technology, but all work in separate silos
22:15 whytewolf enator: huh, 'one team' in technology, but working in seperate silos. that sounds so much like IGT was.
22:17 zzzirk joined #salt
22:20 enator whytewolf: i feel you then, really annoying
22:23 PredatorVI iggy (et.al.):  My tomcat7 service isn't restarting.  Using 'onchanged_in' to reference the shared 'tomcat7_installer.service' state but it doesn't throw an error but doesn't start.  Am I using it wrong?  https://gist.github.com/PredatorVI/de554f64f26f85ddce2c (line 21,22)
22:32 whytewolf PredatorVI: the problem i see is that tomcat7_installer isn't the state that is changing. tomcat7_cleanup is.
22:33 druonysuse joined #salt
22:34 digitalhero joined #salt
22:36 digitalhero joined #salt
22:37 PredatorVI whytewolf: but isn't that what 'onchanges_in' does?  I understood that the '_in' is injecting the current module into the required state.
22:37 whytewolf PredatorVI: your correct. I was just rereading that. mentally blocked the _in for some odd reason.
22:37 whytewolf is the file.directory changing?
22:38 PredatorVI For my initial tests, I'm starting with a clean VM and everything is changing :)
22:39 PredatorVI It seems to stop tomcat, clean up, copy new files but just doesn't restart tomcat.
22:40 PredatorVI I'm wondering if because it started tomcat initially as part of the 'require' states, that it thinks it's already done it.
22:40 aqua^c joined #salt
22:40 whytewolf what are the contents of tomcat7_installer?
22:40 * iggy still thinks you should write a custom module/state to do all this
22:41 Corey Hmm. Someone have a decent salt-cloud example that stands up a VPC?
22:41 PredatorVI https://gist.github.com/PredatorVI/e29f2bee24f78fb3a02d
22:42 whytewolf ahh yeah. service.running is going to trigger off of the internal watch before it even gets to the other state
22:43 whytewolf since it already restarted it won't restart it again
22:43 PredatorVI So I can't reuse modules that have already run?
22:43 * PredatorVI dusts off a kitchen towel and slaps it at PredatorVI
22:45 whytewolf I agree with iggy. writing a custom module to do this cleanly would be a lot easier then trying to fight the ordering 8 ways to sunday
22:45 PredatorVI I missed iggy's previous recommendation for a custom module.  I'll start looking at that.
22:46 omegamike joined #salt
22:53 baweaver joined #salt
22:57 otter768 joined #salt
23:01 adelcast left #salt
23:09 mosen joined #salt
23:18 * PredatorVI wonders if there is a good tutorial on writing custom state modules
23:18 icflournoy joined #salt
23:18 mosen hey saltines
23:18 mosen yeah PredatorVI there's a short one in the docs
23:19 mosen http://docs.saltstack.com/en/latest/ref/states/writing.html
23:19 levlaz joined #salt
23:19 bfoxwell joined #salt
23:19 levlaz Hi friends! Does anyone have any good resources for doing testing on states?
23:20 armguy joined #salt
23:22 mosen levlaz: I'm not sure what the best way is.. the salt repo seems to have their own test suite that depends on salt-testing, but i have also seen that there is a kitchen-salt project for testing w/vagrant boxes
23:22 levlaz mosen: Thanks! all the docs I have seen seem to be focused around testing salt itself, not your states.
23:23 levlaz I will take a look at kitchen-salt :)
23:23 mosen levlaz: I hope someone here gives a better answer, because maybe theres a better way :)
23:24 levlaz I do unit testing for a living but am fairly new to salt, so if there is no better way we will make one. :) Thanks for the tip!
23:25 mosen levlaz: i tried to set up salt-testing but it was importing from salt itself, and i kinda got lost
23:25 levlaz I will come back and post my results soon hopefully it will help someone else :)
23:37 cowpunk22 joined #salt
23:46 bfoxwell joined #salt
23:47 omegamike joined #salt
23:49 aqua^c joined #salt
23:49 icflournoy joined #salt
23:56 jmreicha_ joined #salt
23:57 jmreich__ joined #salt
23:59 cowpunk22 joined #salt

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