Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-04-03

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

All times shown according to UTC.

Time Nick Message
00:08 iceyao joined #salt
00:11 cswang joined #salt
00:14 kliquori joined #salt
00:22 amcorreia joined #salt
00:27 justanotheruser joined #salt
00:31 oida joined #salt
00:45 iceyao joined #salt
00:47 kalessin joined #salt
00:48 CeBe joined #salt
00:56 ninjada joined #salt
01:02 kliquori joined #salt
01:07 quasiben joined #salt
01:15 RandyT_ joined #salt
01:20 oida joined #salt
01:23 ninjada joined #salt
01:25 scoates joined #salt
01:25 iceyao joined #salt
01:26 catpigger joined #salt
01:37 Ludo- joined #salt
01:39 Pie_Mage joined #salt
01:42 onlyanegg joined #salt
01:46 dayid joined #salt
01:56 darvon joined #salt
02:01 jeffspeff joined #salt
02:15 liqw joined #salt
02:18 ninjada joined #salt
02:20 onlyanegg joined #salt
02:23 beardedeagle has anyone else experienced *extreme* flakiness when using salt-vagrant-demo?
02:30 mavhq joined #salt
03:03 justanotheruser joined #salt
03:03 justanotheruser joined #salt
03:04 kliquori joined #salt
03:31 whatever_sb_ joined #salt
03:33 josuebrunel joined #salt
03:41 jeffspeff joined #salt
03:44 whatever_sd_ joined #salt
03:50 oida joined #salt
03:51 kliquori joined #salt
03:57 oida joined #salt
04:21 beardedeagle Opinion question: when using vagrant to test states/pillars do you feel it is best to do masterless or a traditional setup?
04:22 iggy depends what youa re trying to test
04:23 beardedeagle appliction installs will be 90%. I am just trying to provide a local dev env to my team, trying to decide which way to go.
04:23 beardedeagle application*
04:24 beardedeagle I personally use openstack and salt-cloud to test stuff.
04:33 mavhq joined #salt
04:36 oida joined #salt
04:42 mavhq joined #salt
04:43 brotatochip joined #salt
04:45 brotatochip joined #salt
04:49 spuder joined #salt
04:54 CampusD joined #salt
04:55 mavhq joined #salt
04:56 CampusD Hi all, quick question, how would use a jinja if statement for a multi valued grain ?
04:57 CampusD single value would be like " {% if grains['os'] == 'RedHat' %}"
04:57 teatime so, instead of a string, it has a list in it?
04:58 teatime I beleive you can fo {% if 'value' in grains['returnslist'] %} like in python
04:59 CampusD like  {% if 'syscall' in grains['cpu_flags'] %}
04:59 CampusD then true
05:00 CampusD that make sense
05:00 teatime http://jinja.pocoo.org/docs/dev/templates/#other-operators
05:01 teatime I'm not sure what happens if you do {% if 'a' in grains['somegrain'] %} if grains['somegrain'] happens to be a string like "abc"… that might be true.
05:14 brotatochip joined #salt
05:18 beardedeagle should work
05:18 beardedeagle I do if 'value' in grains['somegrain'] all over in my pillars
05:19 colegatron_ joined #salt
05:19 beardedeagle mainly testing hostnames and the such
05:23 CampusD it seems to work, trying to include pillar files based on whether a value is listed in a grain
05:23 beardedeagle yeah that will work fine
05:24 CampusD thanks teatime and beardedeagle
05:25 teatime beardedeagle: I was just thinking maybe you wouldn't want a string search when you were expecting a list to be returned, in which case you'd need to explicitly check if it was a list... I am overly paranoid :)
05:27 beardedeagle not really needed in my use case: {% if 'p3prp' in salt['grains.get']('master', {}) or 'p3prp' in salt['grains.get']('host', {}) %}
05:27 beardedeagle but I could see where that would present an issue
05:27 teatime right, you're explicitly expecting a string
05:27 beardedeagle I usually test for what I am tying to get prior to coding to spec for it.
05:28 beardedeagle that's ME being paranoid
05:28 teatime I was talking about thinking you were doing «if 'a' in ['a', 'b', 'c']» but unknowingly matching a case of «if 'a' in "foobar encountered an error."»
05:29 beardedeagle hrm...good point
05:30 beardedeagle I would do an or to grab explicitly grab that error, IF it were the only one returned
05:30 beardedeagle evaluate false in it's presence
05:30 beardedeagle sorry an 'and'
05:32 beardedeagle sudo code = 'if value and if not 'something' and if 'a' in [a, b, c]
05:50 teatime ehh, look for the specific error string?
05:50 teatime I'd rather {% if blah is list and 'a' in blah %}
05:50 beardedeagle look for error
05:50 beardedeagle the the entire string
05:50 teatime but I don't know the real jinja syntax for testing if something is a list
05:51 overyander joined #salt
05:51 beardedeagle mapping
05:51 beardedeagle http://jinja.pocoo.org/docs/dev/templates/#mapping
05:51 beardedeagle @teatime ^
05:52 teatime hrm, I don't think of a list as a mapping.
05:52 teatime good find though, didn't know that was there
05:52 teatime sequence() is probably closer
05:52 teatime the problem is strings are sequences in Python.
05:53 beardedeagle lol true. Sequences are variables that are iterable. that's a pretty big target
05:53 teatime I would really like to make some jinja extensions; I haven't gotten around to it.
05:53 kliquori joined #salt
05:53 teatime beardedeagle: the whole original problem occurs because strings are sequences ('in' works on sequences)
05:54 beardedeagle right, but I can iterate over a string, dict, list, tuple, you name it
05:54 teatime so you'd have to do {% if var is sequence and var is not string and 'a' in var %}
05:54 beardedeagle just saying it is kinda a catchall
05:54 teatime hrm, true...
05:54 evle joined #salt
05:54 teatime would rather restrict to lists/arrays/etc., or be able to explicitly say 'is a sequence of strings'
05:55 teatime dunno how to do that easily in python even.
05:56 beardedeagle well the cheapest (ie, noobiest) would be to iterate over it and isinstance('val', str) on each item
05:56 teatime but I guess a big takeaway is, if more validation is needed, do it upstream of jinja.
05:57 beardedeagle which is easy when using something like flask, but salt is a little different
05:58 beardedeagle thats why I was trying to switch to mako
05:58 beardedeagle but just ran into too many issue, with mako being a second class citizen and all
06:03 teatime I like limited-logic templating for web stuff, not sure it's exactly as applicable to salt states.
06:04 teatime although, the incentive to do logic and clean-up data at earlier stages is probably for the best, and py renderer is always available if one does need real logic.
06:05 teatime so I guess it's OK.  I def. need to get into jinja extensions, though... I bet I could come up w/ quite a few new tests/tags/fiilters/whatever that would be super useful for use w/ salt.
06:06 beardedeagle well I have always been curios if jinja meta works
06:09 beardedeagle which now I can't seem to find...was just looking at the jinja specification the other week and it had some interesting stuff in it. so does the yaml spec though.
06:10 ecemm joined #salt
06:12 ecemm joined #salt
06:12 ecemm joined #salt
06:12 ecemm joined #salt
06:13 ecemm joined #salt
06:13 ecemm joined #salt
06:13 teatime jinja meta?
06:13 ecemm joined #salt
06:14 teatime yaml spec has a lot of stuff in it, but it's also a PITA to read.  but I dunno if salt can easily support any tagged data types etc.
06:14 beardedeagle If I remember correctly salt only implements parts of the spec, not all
06:14 beardedeagle for yaml
06:19 xurong joined #salt
06:20 teatime heh, yes, I'm sure :)
06:20 teatime by "can easily support" I meant "can easily be added"
06:20 teatime I doubt much can easily be added.
06:22 anmol joined #salt
06:23 anmol joined #salt
06:25 mavhq joined #salt
06:37 mavhq joined #salt
06:37 ninjada joined #salt
06:40 kliquori joined #salt
06:42 keimlink joined #salt
06:47 mavhq joined #salt
07:05 cyborg-one joined #salt
07:08 alexlist joined #salt
07:09 flebel joined #salt
07:12 SheetiS1 joined #salt
07:12 AndreasLutro salt just uses pyyaml, so whatever it supports, salt supports
07:13 teatime sigh.
07:13 teatime AndreasLutro: not likely.
07:13 teatime salt uses a subset / specific configuration of pyyaml ('safe' subset of types)
07:14 mavhq joined #salt
07:18 iggy there's also the yamlex renderer
07:20 ivanjaros joined #salt
07:24 beardedeagle eff it, giving my team a docker file for a masterless minion and they can test their states that way
07:24 iggy what ever happened to the good old days of testing in production
07:26 beardedeagle I want them to test in dev with openstack, but they are intimidated by openstack for some reason.
07:26 beardedeagle basically they are all windows engineers, anything linux gets left to me.
07:40 beardedeagle thats why docker is a better choice imo, they download docker toolbox and this will work on my mac and their wincrap
07:43 dyasny joined #salt
07:49 kawa2014 joined #salt
07:52 mavhq joined #salt
08:01 ninjada joined #salt
08:03 Fiber^ joined #salt
08:03 mavhq joined #salt
08:13 slav0nic joined #salt
08:14 joe_n joined #salt
08:19 AndreasLutro why docker over vagrant? I couldn't figure out how to make a docker image that's somewhat representative of a production machine
08:20 AndreasLutro docker in my mind is for running a single binary, not an entire system
08:24 ninjada joined #salt
08:25 Lionel_Debroux joined #salt
08:30 beardedeagle idk, tbh I have a vagrant linux image, windows image, and docker image all in my repo
08:30 beardedeagle I kinda went crazy
08:30 mavhq joined #salt
08:30 beardedeagle all masterless
08:30 beardedeagle well, about to test the windows one at least.
08:31 Lionel_Debroux_ joined #salt
08:32 sagerdearia joined #salt
08:32 mavhq joined #salt
08:33 overyander joined #salt
08:41 mavhq joined #salt
08:42 kliquori joined #salt
08:45 iceyao joined #salt
08:46 xurong joined #salt
08:53 beardedeagle well it set up and installed salt...
09:01 josuebrunel joined #salt
09:04 ninjada joined #salt
09:05 beardedeagle woot
09:05 beardedeagle works
09:06 beardedeagle anyone know where windows stores the states and pillars?
09:07 oida joined #salt
09:07 elsmo joined #salt
09:25 ivanjaros joined #salt
09:28 kliquori joined #salt
09:34 ninjada joined #salt
09:39 eseyman joined #salt
09:43 cyberviking joined #salt
09:45 ninjada joined #salt
09:48 cyberviking joined #salt
10:00 ninjada joined #salt
10:14 mavhq joined #salt
10:20 stooj joined #salt
10:37 ktosiek joined #salt
10:42 whatevsz joined #salt
10:51 iceyao joined #salt
10:52 whatevsz_ joined #salt
11:08 dmaiocchi joined #salt
11:18 cyberviking joined #salt
11:19 dyasny joined #salt
11:24 west575 joined #salt
11:30 catpig joined #salt
11:30 kliquori joined #salt
11:47 harkx joined #salt
11:52 orion If I write a SLS file that begins with "!py" and put it in pillar, what is that called and where can I find documentation about it?
11:52 babilen It's simply rendered using the Python renderer: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.py.html
11:53 babilen You are expected to return a suitable dictionary from run()
11:53 orion babilen: How come though when I try to access __pillar__ I get an empty dict?
11:54 popfrogg joined #salt
11:59 babilen orion: You can't access pillar data when rendering pillars unless you use something like pillarstack
12:05 dayid joined #salt
12:16 kliquori joined #salt
12:22 ninjada joined #salt
12:29 whatevsz joined #salt
12:30 keimlink joined #salt
12:36 cyberviking joined #salt
12:37 nyx_ joined #salt
12:38 josuebrunel joined #salt
12:42 akhter_1 joined #salt
12:53 pcdummy joined #salt
13:01 sjorge joined #salt
13:01 sjorge joined #salt
13:02 xenoxaos joined #salt
13:06 mowntan joined #salt
13:19 catpig joined #salt
13:22 west575 joined #salt
13:26 SheetiS joined #salt
13:26 slav0nic joined #salt
13:31 SheetiS1 joined #salt
13:32 keimlink joined #salt
13:35 ageorgop joined #salt
13:39 catpig joined #salt
13:45 keimlink joined #salt
13:45 deus_ex joined #salt
13:47 MadHatter42 joined #salt
14:01 mavhq joined #salt
14:01 keimlink joined #salt
14:09 mavhq joined #salt
14:18 kliquori joined #salt
14:26 Muchoz joined #salt
14:33 mavhq joined #salt
14:47 eseyman joined #salt
14:48 keimlink joined #salt
14:52 spuder joined #salt
14:54 spankalish joined #salt
14:54 spankalish Hi can someone tell me how you delete a file of a server using salt?
14:54 spankalish Thanks
14:55 spankalish I've tried file.absent
14:55 spankalish Does not work
14:55 mavhq joined #salt
14:57 kidneb joined #salt
15:01 feliks spankalish: what was the command you used?
15:02 spankalish https://gist.github.com/Spankalish/24084ea4e734ead8a9a26811b29b2277
15:02 spankalish not 100% sure, just tried that
15:02 spankalish Not much documentation on it
15:04 kliquori joined #salt
15:06 keimlink_ joined #salt
15:09 rburkholder joined #salt
15:13 spuder_ joined #salt
15:16 feliks spankalish: http://pastebin.com/raw/p85Ur0gh
15:16 feliks does this work?
15:17 spankalish no
15:18 mavhq joined #salt
15:21 keimlink joined #salt
15:21 feliks oh, i think the : was missing
15:21 feliks http://pastebin.com/raw/uFp5fpVz
15:22 feliks spankalish: ^
15:22 spankalish https://gist.github.com/Spankalish/3f2ac8352cadf6b3795372c334b4aa4f
15:23 spankalish that works
15:23 spankalish same thing really
15:23 spankalish was missing the :
15:23 feliks :)
15:24 spankalish local:     Data failed to compile: ----------     The function "source salt://LAMP/virtual-hosts.conf.jinja" in state "/etc/apache2/sites-enabled" in SLS "LAMP" has whitespace, a function with whitespace is not supported, perhaps this is an argument that is missing a ":" ----------     Too many functions declared in state 'file' in SLS u'LAMP'
15:24 spankalish Getting this now
15:25 spankalish for this https://gist.github.com/Spankalish/d74569d4c2c10f2b30546286aaa72ccd
15:26 spankalish Figure tit
15:26 spankalish it
15:26 spankalish I'm a tit
15:26 spankalish :)
15:27 feliks heh. if you say so ;)
15:36 feliks does somebody know if its possible to install packages from the AUR when using an arch linux salt minion?
15:39 mavhq joined #salt
15:45 spankalish joined #salt
15:46 spankalish How do you declare a variable in a .sls file?
15:46 spankalish I want to make document_root = /vagrant
15:50 CampusD with jinja you can declare vars like {% set document_root = '/vagrant' %}
15:50 CampusD https://docs.saltstack.com/en/latest/topics/best_practices.html
15:54 eseyman joined #salt
15:59 ninjada joined #salt
16:03 spankalish joined #salt
16:07 pid1 joined #salt
16:22 ronnix joined #salt
16:30 Rumbles joined #salt
16:32 eseyman joined #salt
16:34 hightekvagabond joined #salt
16:45 ronnix joined #salt
16:47 mavhq joined #salt
16:50 nidr0x joined #salt
16:52 ivanjaros do i understand the "build in states" correctly in that I can just assign SALT.STATES.COMPOSER to a minion?
16:53 ivanjaros *built
17:01 ninjada joined #salt
17:06 kliquori joined #salt
17:07 babilen ivanjaros: You'd use composer.installed and composer.update in a SLS file that you target to the minion. Note that you would also have to include states that actually install it as documented on https://docs.saltstack.com/en/latest/ref/states/all/salt.states.composer.html
17:08 babilen There is a state for installing composer in the php-formula, might want to use that
17:08 ivanjaros ok, thanks
17:19 mavhq joined #salt
17:21 mavhq joined #salt
17:33 mavhq joined #salt
17:36 lungaro joined #salt
17:41 SheetiS joined #salt
17:41 pfallenop joined #salt
17:44 Lionel_Debroux joined #salt
17:51 flowstate joined #salt
17:51 kliquori joined #salt
17:54 ivanjaros Any idea why I'm getting  'dir' is an invalid keyword argument for 'composer.installed' ?
17:56 AndreasLutro ivanjaros: apparently the docs are wrong/out of date, there is no dir argument
17:57 AndreasLutro try using the "name" arg instead
17:57 ivanjaros the dir argument is in docs for dev and last two visible versions :(
17:58 johnkeates joined #salt
17:59 ivanjaros also 'branch' is an invalid keyword argument for 'git.latest'..i gues the docs are really useless
18:00 rylnd joined #salt
18:00 AndreasLutro that's not true. which version are you on
18:01 ivanjaros salt 2016.3.0-297-g320311a (Boron)
18:01 ivanjaros that's master
18:01 ivanjaros but i guess minions can be older, im on ubuntu 15.10 and i have just updated master. but not minions so that oculd be it
18:01 ivanjaros *could
18:02 AndreasLutro state/module functions are executed on the minion
18:02 ivanjaros yep, makes sense
18:02 AndreasLutro the branch arg was added in 2015.8
18:03 ivanjaros im new to salt. is there a way i can update minions to the latest possible verison from git or that would work only for official packages?
18:04 AndreasLutro how did you install the master?
18:04 johnkeates using pepper i bet
18:04 ivanjaros at first as apt-get install salt-master, then i have used the bootstrap script
18:04 ivanjaros to get the latest version
18:04 AndreasLutro you can do the same for minions
18:08 rmnuvg joined #salt
18:09 mavhq joined #salt
18:23 ronnix joined #salt
18:26 TyrfingMjolnir joined #salt
18:52 flowstate joined #salt
18:57 mavhq joined #salt
19:00 mavhq joined #salt
19:01 mavhq joined #salt
19:09 mavhq joined #salt
19:10 ninjada joined #salt
19:18 ivanjaros joined #salt
19:21 Rumbles joined #salt
19:24 cberndt joined #salt
19:25 akhter joined #salt
19:28 punkoivan joined #salt
19:35 jhauser joined #salt
19:35 mavhq joined #salt
19:35 invalidexception joined #salt
19:39 flowstate joined #salt
19:44 keimlink joined #salt
19:44 mavhq joined #salt
19:53 SheetiS joined #salt
19:53 kliquori joined #salt
19:58 zer0def joined #salt
20:06 ronnix joined #salt
20:11 kawa2014 joined #salt
20:18 punkoivan left #salt
20:23 josuebrunel joined #salt
20:24 nyx_ joined #salt
20:29 justanotheruser joined #salt
20:38 kliquori joined #salt
20:43 Netwizard joined #salt
20:48 jhauser joined #salt
20:51 flowstate joined #salt
20:54 mavhq joined #salt
21:14 rmnuvg joined #salt
21:14 Eugene I'm trying to find documentation about salt-cloud, like running a highstate
21:16 Eugene I've got a provider configured(Linode), and I can create a VM. I see that there's a key listed in salt-key, but it doesn't respond to `salt` commands
21:17 Eugene I can see that the minion didn't get automatically installed on the new VM; I'm confused why salt-key has a key then
21:17 Eugene Do I need to write my own bootstrap script?
21:18 guerby joined #salt
21:24 Eugene I can see what sure looks like the bootstrap running during provision(https://vomitb.in/4iy3cqQaSr)
21:26 Muchoz joined #salt
21:27 hemebond Eugene: Could salt-cloud be generating the key to put onto the minion?
21:27 hemebond (I've never used salt-cloud)
21:27 Eugene That's what it appears to be doing, but then it doesn't go anywhere with it
21:27 hemebond Does it put the key onto the minion?
21:28 Eugene There's a /tmp/.saltcloud-blah, but empty. I believe it's uploading the key(via SFTP), calling bootstrap, and then failing
21:28 Eugene I /think/ I just need to pass some script_args in my provider config, to be handed to bootstrap-salt
21:29 Eugene But I don't know that's what its doing either
21:29 mavhq joined #salt
21:33 Eugene This looks like what I need http://salt-cloud.readthedocs.org/en/latest/topics/deploy.html
21:34 joe_n joined #salt
21:40 Eugene I figured it out. The salt-cloud package doesn't include /etc/salt/cloud.deploy.d/bootstrap-salt.sh
21:40 mavhq joined #salt
21:41 Eugene And provision doesn't fail if that doesn't exist
21:42 mavhq joined #salt
21:50 mavhq joined #salt
21:51 iggy been fixed
21:51 flowstate joined #salt
21:52 alvinstarr joined #salt
21:53 mavhq joined #salt
21:53 iggy https://github.com/saltstack/salt/issues/32183
21:53 saltstackbot [#32183]title: Salt Cloud 2015.8.8 not installing salt minions on new nodes | ### Description of Issue/Question...
22:00 Eugene Awesome, thanks!
22:08 iggy that should be a saltstack blog entry or something as many people as have hit it
22:10 akhter joined #salt
22:11 Eugene Something something documentation
22:12 hoonetorg is it possible an orchestration state inside an orchestration state ?
22:24 oida joined #salt
22:30 titilambert joined #salt
22:31 euidzero joined #salt
22:39 zenlot6 joined #salt
22:40 kliquori joined #salt
22:42 hoonetorg https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.runner
22:42 hoonetorg how does this example work
22:43 hoonetorg if i try to call a runner state it says KeyError when name is the name of an state.orchestrate state
22:43 guanophobic joined #salt
22:52 flowstate joined #salt
23:02 nidr0x joined #salt
23:02 euidzero_ joined #salt
23:07 ivanjaros joined #salt
23:12 oida joined #salt
23:14 whatever_sd_ joined #salt
23:17 ninjada joined #salt
23:18 quix joined #salt
23:19 ninjada joined #salt
23:20 ronrib joined #salt
23:25 kliquori joined #salt
23:29 mosen joined #salt
23:31 hoonetorg somebody else (murrdoc and forrest) found out in 2015-07 (irc logs), that there are no good examples for https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.runner
23:31 hoonetorg anybody here got this to work?
23:33 hoonetorg also what is the difference between state.orchestrate state.orchestrate_high???
23:37 mavhq joined #salt
23:52 flowstate joined #salt
23:58 overyander joined #salt

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