Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-12-12

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

All times shown according to UTC.

Time Nick Message
00:00 murrdoc -l debug doesnt point to any errors
00:00 murrdoc i yaml linted the salt master config, the pillars
00:00 iggy tried cutting out parts of the pillars (or cutting them all out completely)?
00:01 murrdoc yeah
00:01 murrdoc next option is reinstall
00:01 iggy and you're doing something that would kick off a pillar sync? (highstate, refresh_pillar, etc.)
00:02 murrdoc yeah
00:02 iwishiwerearobot joined #salt
00:02 murrdoc i turned off pillar_opts
00:02 murrdoc so i only get pillars i set
00:05 UtahDave joined #salt
00:05 murrdoc the part i really dont understand is why the log file is empty
00:06 jagardaniel joined #salt
00:06 karimb joined #salt
00:06 jalbretsen joined #salt
00:07 iggy shut down the master and see if there are phantom master's running?
00:07 murrdoc hmm
00:07 aw110f iggy: {% if "foo" not in bar %}
00:08 aw110f "is not" does not
00:08 aw110f iggy: thanks
00:08 iggy that's probably not exactly what you want (but it might work in your case)
00:09 iggy that does substring matching
00:09 iggy so if bar is "foo2", it'll match
00:10 esogas_ joined #salt
00:10 aw110f time to find the jinja irc or mailing list I suppose?
00:11 eliasp Jinja IRC is in #pocoo
00:11 eliasp Jinja is a Pocoo subproject
00:12 aw110f thanks eliasp:
00:12 debian112 is it possible to use a star with include:
00:12 debian112 http://paste.debian.net/136097/
00:12 Diaoul UtahDave: done: https://github.com/saltstack/salt/issues/18943
00:13 support joined #salt
00:13 debian112 I am looking to get ever .sls under that directory
00:13 UtahDave thanks, Diaoul!
00:13 UtahDave I'll be back online a little later tonight.
00:13 UtahDave left #salt
00:15 esogas_ joined #salt
00:16 iggy debian112: pretty sure no (like 96%)
00:16 debian112 dang
00:16 debian112 iggy: that will be nice to have
00:16 iggy aw110f: try? {% if ( bar != "foo") %}
00:19 alexhayes Is there any reason why I'd be getting 'State 'file.check_perms' found in SLS 'thing.thing' is unavailable'?
00:19 iggy debian112: I wouldn't count on it... you might be able to do some python/jinja trickery include:\n{% for sub in glob.glob('path/') %}\n  - {{ sub }}\n{% endfor %}
00:19 iggy or something
00:20 rojem joined #salt
00:20 debian112 ok thanks iggy!
00:20 iggy alexhayes: because that's not a state
00:20 forrest joined #salt
00:23 aw110f iggy: bingo, parens did it!
00:23 alexhayes iggy: I'm attempting to do something like this
00:23 alexhayes https://github.com/saltstack/salt/issues/756
00:24 glyf joined #salt
00:25 alexhayes albeit, with file.check_perms, not file.directory
00:25 iggy alexhayes: file.check_perms isn't a state
00:25 iggy http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#module-salt.states.file
00:26 iggy states don't generally "check" things
00:26 conan_the_destro joined #salt
00:26 alexhayes Ah, thanks, I was reading http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html
00:26 iggy they set things, move things, copy things, delete things, etc.
00:27 alexhayes yes, I was wondering why there were no state examples... onwards and upwards, thx
00:27 iggy alexhayes: what are you _really_ trying to do
00:27 bhosmer__ joined #salt
00:27 iggy I mean I could think of a few things you might be trying, but I'll reserve suggestions without more info on what your end goal is
00:29 alexhayes I'm just trying to recursively chown. All cool, it was in the docs you pointed to, I was just looking in the wrong docs, all working now.
00:29 alexhayes thx!
00:30 iggy awesome
00:30 * iggy adds another checkbox in the problems solved column
00:30 esogas_ joined #salt
00:30 istram joined #salt
00:30 iggy alexhayes: pro tip: http://docs.saltstack.com/en/latest/salt-modindex.html
00:33 xsteadfastx joined #salt
00:38 alexhayes iggy: Yes, I have much reading to do and no where near enough time :P the usual
00:41 foulou joined #salt
00:44 yomilk joined #salt
00:45 Ryan_Lane joined #salt
00:55 hopthrisC left #salt
00:59 MorbusIff joined #salt
01:01 aqua^mac joined #salt
01:02 aparsons joined #salt
01:06 nitti joined #salt
01:06 austin987 joined #salt
01:09 otter768 joined #salt
01:13 genediazjr joined #salt
01:15 Singularo joined #salt
01:15 active8 joined #salt
01:28 rap424 joined #salt
01:35 dooshtuRabbit joined #salt
01:37 LordOfLA joined #salt
01:51 iwishiwerearobot joined #salt
01:54 JlRd joined #salt
02:00 eXistenZNL joined #salt
02:04 orion_ joined #salt
02:08 genediazjr joined #salt
02:09 yomilk joined #salt
02:11 genediazjr joined #salt
02:23 capricorn_1 joined #salt
02:30 malinoff joined #salt
02:36 Hipikat joined #salt
02:43 ajolo joined #salt
02:47 genediazjr joined #salt
02:49 xenoxaos joined #salt
03:04 ipmb joined #salt
03:06 aparsons joined #salt
03:09 atbell joined #salt
03:10 otter768 joined #salt
03:40 iwishiwerearobot joined #salt
03:54 TheThing joined #salt
03:59 genediazjr joined #salt
04:11 budman joined #salt
04:12 Ryan_Lane joined #salt
04:17 dude051 joined #salt
04:17 _JZ_ joined #salt
04:19 nitti joined #salt
04:22 badon joined #salt
04:29 budman joined #salt
04:33 goki______ joined #salt
04:33 CaptTofu joined #salt
04:35 ujjain joined #salt
04:35 hal58th joined #salt
04:37 jalbretsen joined #salt
04:40 jonbrefe joined #salt
04:40 Singularo joined #salt
04:50 genediazjr joined #salt
04:50 _ikke_ joined #salt
04:51 bluenemo joined #salt
04:54 TheThing joined #salt
04:55 bluenemo hi guys. I'm want to get started on salt virt. I got one machine that was auto detected and is shown in virt.hyper_info, and another that sadly isnt. I've installed all the packages I think - python-libvirt as well.
05:04 bluenemo ah go it
05:04 bluenemo got
05:11 otter768 joined #salt
05:29 iwishiwerearobot joined #salt
05:50 genediazjr joined #salt
05:51 ramteid joined #salt
05:54 aw110f joined #salt
06:01 TyrfingMjolnir joined #salt
06:07 smcquay_ joined #salt
06:07 aqua^mac joined #salt
06:10 aqua^mac joined #salt
06:11 aqua^mac_ joined #salt
06:15 genediazjr joined #salt
06:30 bhosmer_ joined #salt
06:33 linjan joined #salt
06:34 aqua^mac joined #salt
06:50 felskrone joined #salt
06:52 catpigger joined #salt
06:53 MorbusIff joined #salt
06:53 seshan joined #salt
06:53 seshan --
06:54 seshan Has anybody tried to push files from minion to master (http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.push) using python API ??
06:54 seshan with the CLI it works, but with the python api ?
06:59 orion_ joined #salt
06:59 viq joined #salt
07:00 Furao joined #salt
07:00 glyf joined #salt
07:03 seshan__ joined #salt
07:05 seshan__ http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.push
07:05 seshan__ has anybody tried this using a python api ?
07:12 oyvjel joined #salt
07:12 otter768 joined #salt
07:14 karimb joined #salt
07:15 Furao a lot
07:15 seshan__ Furao, ??
07:15 Furao python api
07:15 Furao I wrote a salt formula testing framework with it (include pillar validation)
07:16 seshan__ I am just tying to learn, but was not able to get it working ?
07:16 seshan__ will post the codes for ref., just hold a min
07:16 Furao for each *.sls it create a unittest2.TesttCase
07:17 Furao paste your code, yeah
07:17 ginger_tone joined #salt
07:17 iwishiwerearobot joined #salt
07:18 seshan__ https://www.refheap.com/94784
07:18 seshan__ I am a more newbie, so tying with basic python codes
07:19 Furao oh no that won’t work
07:19 Furao try 1 i mean
07:19 Furao you can’t import directly a module or states
07:20 Furao salt inject magic __salt__ __grains__ and __opts__ into namespace
07:20 Furao it kind of eval(open(‘bleh.py’))
07:21 Furao eval(open(‘bleh.py’).read())
07:21 Furao try 2 is the only way
07:22 Furao http://docs.saltstack.com/en/latest/ref/clients/index.html
07:22 seshan__ ya , but that is not pythonic right ??
07:23 Furao no it’s not pythonic, some cried with usage of __salt__ as __X__ is reserved to python
07:25 seshan__ :(
07:27 Furao but it’s not that bad :) I had been a salt user for > 2 years and i never needed fancy python client usage, using reactor and module.run you can automate a lot
07:27 seshan__ so i think I am not given a choice ...
07:28 Furao your cp.push /var/log/syslog can be turned into a .sls
07:28 seshan__ can you also incase if you have opensourced your formula, can you share the code ??
07:28 seshan__ No we wanted it to be a python, since we are integrating that into a django project
07:28 seshan__ so let me get back
07:28 Furao my formulas are opensource (BSD) but I give acces to them trough my company
07:29 Furao ah ok I built an inventory in django to manage some aspect of salt
07:29 seshan__ okies :)
07:29 seshan__ we are writing a django to manage a complete data store
07:29 seshan__ or atleast somehting kinda this
07:29 seshan__ :P
07:30 Furao we had been working for years on them :) like 5 human years
07:30 Furao you can use ext_pillars to inject into salt pillars data from your django apps
07:31 seshan__ thats interesting :)
07:31 seshan__ hey got a meeting, will get back soon :)
07:32 Furao all that code is actually opensource outside my product, i can share more of this, i guess, i need to ask a client first
07:33 Furao but here https://github.com/bclermont/states i got an old ancestor of what I have today
07:33 maxd_ joined #salt
07:40 aquinas joined #salt
07:42 flyboy joined #salt
07:43 douardda joined #salt
07:48 slafs joined #salt
07:48 slafs left #salt
07:49 genediazjr joined #salt
07:50 glyf joined #salt
07:51 gildegoma joined #salt
07:52 trikke joined #salt
07:57 Auroch joined #salt
07:58 tomspur joined #salt
08:00 Auroch joined #salt
08:01 rtuin joined #salt
08:06 mattjb_ joined #salt
08:07 repl1can1 joined #salt
08:08 Jimlad_ joined #salt
08:08 user158 joined #salt
08:09 Heartsbane_ joined #salt
08:11 mpoole_ joined #salt
08:13 Diaoul_ joined #salt
08:17 wvds-nl joined #salt
08:17 lb1a joined #salt
08:20 ]V[ hi chan
08:21 ]V[ anyone familliar with installing salt-minion on a xen-server
08:21 ]V[ ?
08:25 akafred joined #salt
08:26 funzo joined #salt
08:27 erimar77 joined #salt
08:32 Andre-B joined #salt
08:35 wpot joined #salt
08:40 felskrone1 joined #salt
08:46 monkey661 joined #salt
08:49 dunz0r joined #salt
08:56 genediazjr joined #salt
08:58 martoss joined #salt
09:01 babilen ]V[: No difference between that and other installations
09:01 babilen (and yes, there are definitely people who are familiar with that)
09:01 Furao EC2 is custom xen
09:02 Furao well xen guest VM no the server itself
09:04 oyvjel joined #salt
09:05 snuffeluffegus joined #salt
09:06 iwishiwerearobot joined #salt
09:06 goudale joined #salt
09:07 kawa2014 joined #salt
09:08 genediazjr joined #salt
09:08 ginger_tone joined #salt
09:09 ginger_tone am installing some packages using states file name : /srv/salt/somename.sls
09:09 ginger_tone to install am using salt '*' state.highstate
09:10 ginger_tone its getting installed.
09:10 intellix joined #salt
09:10 genediazjr joined #salt
09:12 ginger_tone If I want to install another set of samr packages but with differnt version how do i do that ?
09:13 otter768 joined #salt
09:14 seshan__ joined #salt
09:16 ginger_tone Hi some one there ?
09:23 mindfab hi, you can specify a version by setting -version: XXX in the sls for your pkg state
09:24 mindfab however, beeing able to install different versions of the same package at the same time depends on the underlying package management system
09:26 jhauser joined #salt
09:37 genediazjr joined #salt
09:38 ]V[ thanks, so i'll just follow the bootstrap procedure? only had debian boxes so far
09:39 oyvjel joined #salt
09:41 Dw_Sn joined #salt
09:43 N-Mi joined #salt
09:44 goudale joined #salt
09:46 ginger_tone mindfab: thats cool
09:47 ginger_tone inside the sls file I can specify..
09:47 ginger_tone ok
09:49 mindfab ginger_tone: yes, inside the sls see also http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html
09:50 fredvd joined #salt
09:52 ginger_tone mindfab: Tats good.
09:52 ginger_tone mindfab: But say I have two files v1.sls and v2.sls
09:53 ginger_tone pointing to version1  set of packages and later pointing to version2 set of packages.
09:54 ginger_tone when using state 'hostname' state.highstate command how do I specify only to execute v2.sls
09:55 ginger_tone state '*' state.highstate ?<execute only version2>
09:55 mindfab depends on what you actually want to do, you could change your top.sls to point only to v2.sls or you could run the state directly via state.sls
09:56 mindfab or you could also manage the version itself with pillars etc... many ways to go
09:58 mindfab e.g., salt '*' state.sls v2
09:58 terinjokes joined #salt
09:59 genediazjr joined #salt
10:00 yidhra joined #salt
10:02 paha joined #salt
10:05 rhand joined #salt
10:05 ITChap joined #salt
10:09 oyvjel joined #salt
10:11 Andre-B_ joined #salt
10:12 sieve joined #salt
10:16 Steeltip joined #salt
10:16 Steeltip hi @ all
10:17 glyf joined #salt
10:20 aqua^mac joined #salt
10:26 seshan__ lets say instead of top.sls i have custom.sls, how do i say salt to use custom.sls
10:26 seshan__ i have read before we can do this, just not getting the correct syntax
10:27 iwishiwerearobot joined #salt
10:31 bdols joined #salt
10:31 agj joined #salt
10:34 malinoff joined #salt
10:43 babilen seshan__: http://docs.saltstack.com/en/latest/ref/configuration/master.html#state-top
10:46 seshan__ babilen, this will not work for me., we are going to be having versions of top.sls, like top_v1.sls top_v2.sls, and based on the user input the whole salt stack is going to happen
10:46 seshan__ i remember something like state.highstate top_v1.sls state.sls something like this
10:49 babilen http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.top
10:52 seshan__ i should run a state.top and then state.highstate is it ?
10:53 seshan__ babilen, got it working :)
10:53 seshan__ thanks a lot :)
10:53 seshan__ babilen, another coffee :P
10:53 seshan__ for you
10:53 babilen hooray :)
11:00 TheThing joined #salt
11:00 raistlin_majere joined #salt
11:01 Dw_Sn joined #salt
11:09 monkey66 joined #salt
11:10 diegows joined #salt
11:12 monkey661 joined #salt
11:14 otter768 joined #salt
11:16 giantlock joined #salt
11:19 zlhgo joined #salt
11:27 QiQe joined #salt
11:28 intellix joined #salt
11:28 cm_rider joined #salt
11:29 QiQe guys, today suddenly my bootstrap process stopped to work with the following error:
11:29 QiQe Writing /usr/lib/python2.6/site-packages/salt-2014.1.13-py2.6.egg-info module.logstash1.aws_instance.minion (remote-exec):  *  INFO: Running install_centos_git_post() module.logstash1.aws_instance.minion (remote-exec): cp: cannot create regular file `/usr/lib/systemd/system/': No such file or directory module.logstash1.aws_instance.minion (remote-exec): /tmp/install_salt.sh: line 2738: /bin/systemctl: No such file or directory module.lo
11:30 ninkotech joined #salt
11:30 QiQe Im using CentOS 6.5 trying to provision a EC2 instance
11:30 QiQe git method v2014.1.13
11:31 QiQe It was working fine the last 2 months
11:32 Furao joined #salt
11:32 QiQe http://pastebin.com/EmDdFPNr
11:34 Deshke joined #salt
11:37 babilen Looks as if it is expecting you to use systemd (or at least have it installed), but fails because you do not have it installed
11:42 ale__ joined #salt
11:43 istram joined #salt
11:43 PiratMetl joined #salt
11:43 PiratMetl hey there
11:45 glyf joined #salt
11:46 gildegoma joined #salt
11:47 hojgaard joined #salt
11:47 ale joined #salt
11:48 bhosmer joined #salt
11:54 mick3y joined #salt
11:54 QiQe babilen: something seems to be wrong around line 2732 on bootstrap-salt.sh
11:55 QiQe those if I think
11:55 QiQe I need to debug
11:57 giantlock joined #salt
12:13 mick3y joined #salt
12:16 QiQe acctually if I comment that if part on line 2732, everything is fine
12:16 seanz joined #salt
12:16 QiQe I will create an issue
12:20 QiQe ah ok. it already created, mental note: check issues before ask on salt IRC next time
12:20 QiQe https://github.com/saltstack/salt-bootstrap/issues/515
12:20 Cottser|away joined #salt
12:23 hobakill joined #salt
12:25 lb1a joined #salt
12:30 fredvd joined #salt
12:30 CeBe joined #salt
12:31 genediazjr joined #salt
12:33 wnkz joined #salt
12:40 jaimed joined #salt
12:47 mindfab is there anybody here who is familiar with salt and chef?
12:47 viq mindfab: you have a specific question, or just conducting a survey? ;)
12:48 mindfab question: is there any equivalent like a validation key which is used in chef ?
12:48 JlRd joined #salt
12:49 viq IIRC you have to give validation key to client so it would be able to authenticate to server, correct?
12:50 mindfab the validation key is used initially to distribute client keys (initially, one time) in chef... i would like to have something similar in salt
12:51 viq In salt minions and master have their own public keys, upon connection minions cache master's key, and on master you have to manually accept minion's key before communication will be allowed, though there are ways around it
12:52 viq I believe you can auto-accept minion ids in a specified format, and/or you can pre-populate them somehow, which I believe salt-cloud uses, but I can't tell you more about it. Sorry, I don't know enough about chef to really compare.
12:52 mindfab well, the problem is that i dont want to accept the keys globally, that i cannot pre-seed the keys and that i also dont want to accept the keys manually...
12:53 viq mindfab: how are you deploying new machines?
12:53 mindfab viq: you are right, i auto-accept partially using the minion_id with a salt reactor
12:54 mindfab however, for my use case, i dont trust the site that wants to connect to the salt master
12:55 mindfab so, i want to restrict the config space based on the minion_id, which cannot be changed without having a correct validator (thats the idea :) )
12:55 viq I believe minions have access to everything in file_roots on master once they are accepted
12:56 mindfab sure?
12:56 mindfab however, i think you can at least restrict pillar data ...
12:56 viq Stuff you want secure you put in pillars, and limit by ID, because grains can be spoofed. But yes, I am quite sure that with a bit of trying any minion can acces anything under file_roots
12:57 mindfab yes thats the goal
12:58 viq food time
12:58 mindfab enjoy :)
13:01 glyf joined #salt
13:05 gildegoma joined #salt
13:10 badon joined #salt
13:11 bhosmer joined #salt
13:12 dunz0r My pillar fails to render, salt tells me to look in the log... but the log is empty... what can I be missing?
13:12 dunz0r I think there's some error in my pillar config, but salt won't tell me what it is :/
13:15 otter768 joined #salt
13:16 Furao look in master logs, run in debug
13:16 Furao salt-master -l all
13:17 thawes joined #salt
13:22 intellix joined #salt
13:22 dunz0r Furao: Oh, thanks man. This was just what I was looking for :)
13:23 dunz0r God damn it... didn't make me any smarter...
13:23 dunz0r "return': ['Pillar failed to render with the following messages:', "Rendering SLS 'packages' failed. Please see master log for details."]"
13:23 dunz0r And the logs empty...
13:23 Furao at least you know that it’s packages.sls
13:25 dunz0r Yep... better check my syntax :)
13:26 dunz0r Hm... I don't seem to actually have a file named packages.sls... Now I'm more confused. I need to reread the documentation or something
13:29 * dunz0r restarted the salt-minion... now things work properly
13:30 glyf joined #salt
13:31 bhosmer joined #salt
13:31 ericof joined #salt
13:34 glyf joined #salt
13:35 dunz0r Wohoo! I made a state \o/
13:35 ajolo joined #salt
13:38 muep joined #salt
13:43 Furao a  _states/$mystate.py ?
13:44 younqcass joined #salt
13:47 dunz0r No, just a regular state.sls-thingie
13:48 Furao here are some very old one i made a few years ago if you need example https://github.com/bclermont/states
13:51 dunz0r It's always good to see some "real world" examples, thanks man :)
13:52 TheThing joined #salt
13:53 babilen dunz0r: You might, in time, try to understand the patterns and idioms found in https://github.com/saltstack-formulas/ -- http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
13:54 dunz0r I plan to manage all my servers with salt... so yeah probably :)
13:54 dunz0r So far I've created an ssh and a sudo state. Since all machines should have that setup
13:55 fredvd joined #salt
13:55 toastedpenguin joined #salt
13:55 Furao you guys write doc for your states?
13:57 Furao like pillar keys
13:58 clubanderson joined #salt
13:59 babilen Where applicable, yeah
14:01 clubanderson_ joined #salt
14:01 Furao we have a pillar.py proxy that check if default value of pillar.get is always the same and that pillar are documented, if not test in jenkins fail
14:01 Furao but that is a bit overkill
14:02 Furao what is great about states is that they kind of document themselves
14:03 babilen like code?
14:03 clubanderson i am using Gerrit for code review - with git.  Because of this I do not use more than a master branch to hold my tagged releases.
14:04 babilen You still need documentation, but I tend to document the "larger picture" and pillars rather than single states.
14:04 clubanderson I need to use something like a gitfs to pull different versions of code from the same branch
14:04 Furao find . -type f -name '*.rst' | xargs cat | wc -l
14:04 Furao 34893
14:04 clubanderson to line up with prod, dev, base, etc
14:04 Furao almost 35 k of LoC of doc hehe
14:04 Furao thats why it take so much to build it
14:04 clubanderson with gitfs, i only see a way to do this within one project with multiple branches
14:05 clubanderson i rigged r10k to do something that I think works.
14:05 clubanderson does anyone out there have experience with Gerrit and Salt working together?
14:05 Furao different version of code from same branch?
14:05 clubanderson yes
14:05 Jahkeup joined #salt
14:06 clubanderson dev would be tag .01
14:06 Furao ah ok multiple tag in the same branch
14:06 clubanderson and prod would be tagged release or something
14:06 clubanderson etc
14:06 clubanderson tags instead of branches
14:06 Furao gitfs checkout all tags and branches in /var/cache/salt/minion/gitfs/
14:06 cpowell joined #salt
14:06 Furao specify the branch or tag in your top.sls
14:07 clubanderson so combine them all into base in top.sls
14:07 Furao I have a pillar key to specify the branch name
14:07 clubanderson oh - ok
14:08 clubanderson so, in the master config - i would specify the /var/cache/…gitfs path for prod: dev: and base:
14:08 Furao https://gist.github.com/bclermont/586caee8c6bf0749353d
14:08 clubanderson and then in top.sls I would specify tags?
14:08 Furao well that is a bit… complex
14:08 clubanderson how would you do it?
14:08 Furao i just post my top.sls
14:08 clubanderson i see it
14:09 Furao it cover roles and branches
14:09 Furao support local mode
14:09 clubanderson ok
14:09 Furao as gitfs dont work in salt-call --local
14:09 clubanderson im a noobie - let me see if i can get this via steps
14:10 clubanderson 1. turn on local mode in master config
14:10 Furao local mode is a minion setting
14:10 clubanderson ok
14:10 Furao wait let me do  a newbie version of that top.sls
14:10 clubanderson ok
14:10 clubanderson ty
14:11 gngsk joined #salt
14:11 sieve joined #salt
14:12 sieve joined #salt
14:12 genediazjr joined #salt
14:13 Furao https://gist.github.com/bclermont/586caee8c6bf0749353d#file-simple
14:15 clubanderson i know that much - yes - this looks like what i have so far.
14:15 clubanderson i am using tags, not branches - does this still apply?
14:16 clubanderson sorry if these are stupid questions
14:16 rtuin_ joined #salt
14:17 Furao yes its the same for gitfs
14:17 clubanderson ok - so gitfs works in conjunction with this top.sls?
14:18 rtuin_ joined #salt
14:20 clubanderson yes - i saw it
14:21 clubanderson what does your master config look like?  can you post that?
14:21 clubanderson maybe that would help me understand how gitfs is configured
14:22 giantlock joined #salt
14:25 _JZ_ joined #salt
14:25 dooshtuRabbit joined #salt
14:27 rtuin joined #salt
14:29 babilen clubanderson: You just set gitfs_remotes in there in which you reference your repositories
14:30 racooper joined #salt
14:32 clubanderson Thank you - how do i reference tags, not branches - in the master config for gitfs?
14:33 babilen You don't, branches are environments ... I don't know how you would use tags in that regard
14:33 clubanderson right - thats the issue here
14:34 clubanderson we use gerrit for code review
14:34 clubanderson we use the master branch only
14:34 clubanderson all code is reviewed on merge back to master
14:34 clubanderson i did not do this for puppet - i used branches and that worked well
14:34 clubanderson this is a different way of doing it -
14:34 babilen Well, you cannot use branches as environments then (I always thought that it is far from ideal to conflate that anyway)
14:35 clubanderson yeah - agreed - a bit much in the way of overhead
14:35 clubanderson so, i rigged r10k to deploy to my salt states
14:35 clubanderson path
14:35 babilen But then a tag is something immutable. You would *always* use exactly the same code in your environments.
14:35 clubanderson and then i point config states to the corresponding modules paths
14:36 clubanderson yes - unless the tag is changed to point at a different part of the tree - no?
14:36 babilen You do *not* change tags
14:37 clubanderson right
14:38 thawes joined #salt
14:39 Slimmons joined #salt
14:39 babilen Which is why different branches make sense (in git). I mean GitFS also turns your tags into an environments, but then you would have to adjust your top.sls constantly if you want to deploy against the newest tag.
14:40 babilen Please also note that if you use branches in git that you do not want to manage your top.sls in one of those branches (but in another repository) as top.sls files are merged across branches and managing them would make normal git branching workflows impossible.
14:40 jaimed joined #salt
14:41 Slimmons I know the saltstack documentation says it's encrypted, but I just wanted to make sure that it is by default and there's no settings I need to set up for that.  I have a minion on Amazon AWS, and my master is at another location (home).  It's default is to have it as AES encryption correct, and I can feel safe(ish)?
14:43 ekristen joined #salt
14:43 babilen Slimmons: The communication between the master and its minion is encrypted, yeah.
14:44 linjan joined #salt
14:45 maxd joined #salt
14:47 FRANK_I joined #salt
14:47 _JZ_ joined #salt
14:47 kaptk2 joined #salt
14:49 __JZ__ joined #salt
14:49 mpanetta joined #salt
14:49 nitti joined #salt
14:50 sieve joined #salt
14:51 sieve joined #salt
14:52 sgate1 Is there a possibility too include a pillar file if an other pillar value is set?
14:54 sgate1 example: if minion has role:test then use pillar test
14:54 ndrei joined #salt
14:55 racingferret joined #salt
14:57 clubanderson babilen: yes - i see that
14:58 glyf joined #salt
14:59 clubanderson_ joined #salt
14:59 housl joined #salt
15:00 kermit joined #salt
15:03 dude051 joined #salt
15:12 intellix joined #salt
15:16 otter768 joined #salt
15:20 CeBe joined #salt
15:21 iggy sgate1: if role is a pillar, no
15:25 bhosmer joined #salt
15:26 Dw_Sn joined #salt
15:29 Auroch joined #salt
15:29 rickh563 joined #salt
15:31 sieve left #salt
15:31 patarr joined #salt
15:31 patarr joined #salt
15:34 jeffrubic joined #salt
15:35 bhosmer joined #salt
15:36 rtuin joined #salt
15:37 eriko joined #salt
15:39 alexbst joined #salt
15:39 thawes joined #salt
15:40 KennethWilke joined #salt
15:43 intellix joined #salt
15:47 rtuin_ joined #salt
15:53 ad4m joined #salt
15:53 ericof joined #salt
15:56 dooshtuRabbit joined #salt
15:57 fredvd joined #salt
15:58 ndrei joined #salt
15:58 dark_helmet joined #salt
16:00 REdOG joined #salt
16:05 active8 joined #salt
16:09 StDiluted joined #salt
16:11 nitti joined #salt
16:11 TheThing joined #salt
16:15 melinda87_2 joined #salt
16:17 conan_the_destro joined #salt
16:19 RedundancyD joined #salt
16:20 war2 joined #salt
16:22 Andre-B joined #salt
16:23 thedodd joined #salt
16:24 twobitsprite left #salt
16:26 SheetiS joined #salt
16:26 babilen +1 for Oxford comma
16:27 rawkode joined #salt
16:28 Heartsbane joined #salt
16:28 Heartsbane joined #salt
16:29 perfectsine joined #salt
16:29 rawkode Hi folks - is it possible to get the job identifier from within a state?
16:31 ndrei joined #salt
16:33 babilen jid you mean?
16:37 rawkode babilen: yeah, the jid
16:38 iggy for what purpose?
16:40 rawkode We use an "onfail" to send a HipChat notification that our deployment process failed and I'd like to add the jid, for easier job lookups
16:40 sjlu joined #salt
16:40 sjlu is there a way to symlink a folder? sometihng similar to ln -s /some/folder /otherfolder/
16:41 iggy rawkode: I'd think you could do  that with the reactor (vs onfail)
16:41 iggy and reactor definitely has the jid
16:42 babilen sjlu: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.symlink
16:42 sjlu doesn't do it properly for directories
16:42 mtanski joined #salt
16:42 sjlu like the symlink should show up as /otherfolder/folder
16:42 mtanski Is there a way of referencing a pillar from a pillar?
16:43 sjlu but is complianing Directory exists where the symlink /otherfolder/ should be
16:43 babilen sjlu: and imporperly is not good enough? (aka: "what is happening and what did you expect to happen?")
16:43 babilen mtanski: No
16:43 mtanski For example I have a pillar that specifys zookeeper node names (which is great), but then I have another pillar that specify arguments to app inside a docker containers, and one of those arguments is the list of zookeeper nodes
16:44 sjlu expecting /some/folder to symlink to /otherfolder/folder
16:44 mtanski It would be nice not to repeat myself, mostly so if we migrate hosts I don’t have to update it many times
16:44 rawkode iggy: Okay, I'll start reading the event documentation and work on a reactor. Thanks for the tip
16:44 babilen sjlu: Could you paste your state and the outcome of its application to http://refheap.com ?
16:44 babilen mtanski: You could reference the same pillar in both
16:44 mr_chris I'm trying to get my head around how map.jinja works. I see that grains.filter_by accepts pillar data to merge from.
16:45 iggy rawkode: when you get something rolling, you should definitely blog that (or post to the mailing list or reddit or...)
16:45 mr_chris Does the merge override all values and become the default?
16:45 iggy I imagine a lot of people would like to see something like that working
16:45 kbyrne joined #salt
16:46 iggy mr_chris: it allows users to override what the map sets using pillars, so yeah, anything you set in pillar will overwrite the map
16:46 rawkode iggy: I'm working on a blog post about how we (TeamRock) use SaltStack reactors for automated provisioning of our AutoScaling instances - so it'll make a good addition to the end of that :)
16:46 iggy nice
16:46 sjlu babilen: https://www.refheap.com/94804
16:46 babilen mr_chris: So, normally, you will safe os_family specific and rather static data in your map.jinja (stuff like package or service names). In order to allow users to customise entries in this "lookup table" most map.jinja files are setup in such a way that values from foo:lookup are merged. That is, if they are defined, the values in the map.jinja will be overridden by the values in the pillar
16:46 mpanetta rawkode: Would definitely like to see that blog post when you are done :)
16:47 sjlu oops: output https://www.refheap.com/94805
16:48 rawkode mpanetta: I'll ping you when it's out in the wild :)
16:48 mr_chris iggy, babilen So take the apache example. You have a lookup for debian and redhat. If I merge in an apache pillar the sets "server" to "foobar", it completely overrides the values for debian and redhat.
16:48 mr_chris Is that the expected behavior?
16:48 jonatas_oliveira joined #salt
16:48 babilen sjlu: /logs exists already. Remove that or add "force: True" to your state
16:48 mpanetta rawkode: Thanks!
16:48 iggy sjlu: /logs/{{ salt['pillar.get']('deploy:logs').split('/') }}
16:48 iggy err
16:48 iggy sjlu: /logs/{{ salt['pillar.get']('deploy:logs').split('/')[-1] }}
16:49 iggy something like that
16:49 sjlu yeah
16:49 sjlu thanks iggy
16:49 sjlu just what i was looking for
16:49 babilen sjlu: So you want "/logs → /home/nodejs/app/log/app" as symlink?
16:49 babilen (because that is what you have written there)
16:49 sjlu i wanted /logs/app -> /home/nodejs/app/log/app
16:50 babilen You will have to pass "- name: /logs/apps" rather than "- name: /logs/" in that case.
16:50 iggy mr_chris: yes, what would you expect it to do?
16:50 sjlu gotcha, I was hoping there was a way to arbitrarily ref that - name
16:50 sjlu but the .split('/') method will do for me
16:50 babilen mr_chris: Users shouldn't set the pillar if they don't mean to override entries in the lookup table
16:51 babilen sjlu: So you want this to be more generic?
16:51 sjlu yeah
16:52 babilen Well, then do something along the lines of sjlu suggestion
16:52 mr_chris iggy, No expectations. Just trying to understand how it works. The documentation doesn't make it very clear.
16:52 mr_chris babilen, Understood.
16:52 sjlu no worries though. I guess I was thinking more in the lines of /app/logs/* -> /logs/*
16:52 sjlu or something like that
16:52 babilen symlinks don't work like that
16:54 babilen You could, as suggested earlier, naturally create a symlink from /app/logs to /logs (which would cause all directories/files in /app/logs to also "appear" in /logs.
16:54 mtanski babilen: thanks
16:54 sjlu yup :), works for me
16:55 babilen sjlu: The problem with that is that you cannot create a symlink /logs if /logs already exists
16:55 babilen (so either force it or delete that directory/file prior to creating a symlink)
16:56 babilen Creating specific (per-app) symlinks *beneath* /logs to their respective log dir does naturally work
16:57 kbyrne joined #salt
16:59 troyready joined #salt
17:00 bigl0af_ joined #salt
17:00 smcquay joined #salt
17:02 KyleG joined #salt
17:02 KyleG joined #salt
17:04 miqui_ joined #salt
17:07 bluenemo joined #salt
17:07 theologian joined #salt
17:08 bluenemo hi guys. I'm experimenting with salt.virt, and I'm not clear on what the use of salt.runners.virt.init seed= and install= is exactly from the doc. what does salt do when its seeding a new virtual machine? and how would it install a salt-minion on that vm before it is spun up the first time?
17:12 slk_ joined #salt
17:12 rawzone joined #salt
17:13 jaimed joined #salt
17:13 slk_ on ubuntu, should the salt minions be able to use the modules installed by the salt-common package? using just a basic config, with little modification, i can't run "salt '*' saltutil.pillar_refresh", it returns an error "'saltutil.pillar_refresh' is not available."
17:15 Tahm joined #salt
17:16 zlhgo joined #salt
17:17 otter768 joined #salt
17:18 spookah joined #salt
17:19 ericof joined #salt
17:20 cwright_ i'm having trouble using __salt__('cmd.run') from within a custom module, and would like some help
17:20 cwright_ the line that is giving me trouble is:
17:20 cwright_ megacli_output = __salt__['cmd.run']('/usr/local/sbin/MegaCli -CfgDsply -a0', python_shell=False)
17:21 cwright_ i'll post a full output, but here is a partial:
17:21 cwright_ ERROR: Unable to run command "/usr/local/sbin/MegaCli -CfgDsply -a0"
17:21 cwright_ reason: [Errno 2] No such file or directory
17:23 iggy I hate to ask, but that file does exist right? (on the minion)
17:24 cwright_ https://gist.github.com/corywright/aacdbcc46a9d028c8ee8
17:24 cwright_ yes, it exists
17:24 Andy___ joined #salt
17:25 Andy___ left #salt
17:25 cwright the part that concerns me is in the command it shows:  'shell': False
17:25 clubanderson joined #salt
17:29 seanz joined #salt
17:32 Deevolution Is there a builtin salt state module for Windows scheduled tasks?
17:33 conan_the_destro joined #salt
17:33 iggy Deevolution: salt has it's own scheduler
17:34 iggy is there a reason you want to use Windows' over salt's?
17:35 lgsilva joined #salt
17:36 lgsilva hello. is there any script that read salt log files (return from minions running highstate) and display it back in color?
17:36 Deevolution iggy: Potentially several reasons:  Built-in functions within the Windows scheduler, setting run-as once with the job rather then having to set it (including the password) on each run primarily.
17:36 Deevolution iggy:  I suppose I'll see if the built-in scheduler will work for this purpose.
17:40 clubanderson the built in salt state for artifactory is missing for me
17:40 clubanderson i am running the latest
17:41 jalbretsen joined #salt
17:43 iggy clubanderson: it's only in develop (not 2014.7 which is the latest _release_)
17:43 clubanderson oh
17:43 clubanderson gotcha
17:43 ericof joined #salt
17:44 clubanderson what could i use instead?  I am using url of package (hosted in artifactory) as a source for my pkg.installed.
17:44 clubanderson is that recommended?
17:45 iggy you could try copying the state src file (from git) to /srv/salt/_states (or wherever your states are)
17:45 iggy sometimes that works if the code doesn't have many cross dependencies
17:45 murrdoc joined #salt
17:46 ekristen joined #salt
17:46 Jahkeup joined #salt
17:46 clubanderson cool - i was wondering where that stuff was {(states)
17:47 iggy that's where you put _custom_ states
17:47 iggy the installed ones are going to be somewhere like /usr/lib/python2.7/dist-packages/salt/ or something
17:49 aparsons joined #salt
17:53 StDiluted Anyone made a system configuration policy with Salt as the mechanism for PCI compliance?
17:53 Dw_Sn joined #salt
18:06 orion__ joined #salt
18:07 aw110f joined #salt
18:10 wendall911 joined #salt
18:10 UtahDave joined #salt
18:12 murrdoc joined #salt
18:13 jY StDiluted: we used salt in a pci level 1 compliant company
18:14 rap424 joined #salt
18:15 jaimed joined #salt
18:16 forrest joined #salt
18:18 ericof_ joined #salt
18:19 elfixit joined #salt
18:20 linjan joined #salt
18:21 orion___ joined #salt
18:23 desposo joined #salt
18:23 schimmy1 joined #salt
18:29 bhosmer joined #salt
18:30 Ryan_Lane joined #salt
18:31 shaggy_surfer joined #salt
18:32 jalaziz joined #salt
18:36 glyf joined #salt
18:38 mr_chris In https://raw.githubusercontent.com/saltstack-formulas/redis-formula/master/redis/pillar.example, https://raw.githubusercontent.com/saltstack-formulas/redis-formula/master/redis/map.jinja is merging in https://raw.githubusercontent.com/saltstack-formulas/redis-formula/master/redis/pillar.example.
18:38 mr_chris In all cases, no matter what os_family is, svc_name is always "redis" because of the merge.
18:39 tristianc joined #salt
18:39 schlueter joined #salt
18:39 mr_chris So why is it overwriting that value with a mere if it's supposed to change the service based on the os_family grain?
18:39 mr_chris Or am I still just not getting this?
18:42 iggy mr_chris: the merge is for the pillar redis:lookup
18:42 iggy in the example pillar, there is no redis:lookup key/value
18:43 mr_chris https://github.com/saltstack-formulas/redis-formula/blob/master/redis/pillar.example
18:43 iggy oh wait, there is
18:43 mr_chris Yes there is.
18:43 murrdoc joined #salt
18:43 iggy the top level pillar does not
18:43 war2 joined #salt
18:43 iggy I don't even know why there are 2 pillar.examples in that repo
18:44 iggy ignore https://github.com/saltstack-formulas/redis-formula/blob/master/redis/pillar.example
18:44 mr_chris OK.
18:44 iggy look at https://github.com/saltstack-formulas/redis-formula/blob/master/pillar.example
18:44 iggy if I used redis, I'd totally fix that
18:45 mr_chris OK. Just so I'm absolutely clear, then, anything defined in the merge overrides any value defined in grains.filter_by. Correct?
18:46 iggy yes
18:46 mr_chris iggy, Great. Thanks again.
18:47 iggy but if you look at other formulas, most use the <module>:lookup form, but don't have lookup stuff in their pillar.example
18:47 iggy the redis-formula is a bad example of the merge/lookup pattern
18:50 younqcass joined #salt
18:53 ndrei joined #salt
18:54 mr_chris iggy, Why would they not have lookup stuff, then. Is that just saying it's optional if you want it?
18:55 glyf joined #salt
18:58 cpowell joined #salt
19:04 iggy it's more saying "You really shouldn't need this if we did our job right, but just in case"
19:04 FRANK_I Is any way that I can track execution time. for example I am trying to migrate all the poppet manifest that we use to Saltstack, but I will like to know how long it takes to install my packages list.
19:05 mordonez joined #salt
19:07 diegows is there a special reason why I'm able to use {{ salt.mymodules.myfunc() }} in a sls file but not in a file template ?
19:07 diegows I mean, a file.managed template
19:11 viq joined #salt
19:12 UtahDave diegows: you can if you add   - template: jinja     to your file.managed state
19:13 diegows I know
19:13 diegows it works for pillar, grains
19:13 davesque joined #salt
19:13 diegows but no for my modules
19:14 davesque what’s the most straight-forward way to check if you are in a dev or production environment from within a jinja template used as a file.managed source?
19:15 druonysus joined #salt
19:15 druonysus joined #salt
19:15 jalaziz joined #salt
19:15 spookah joined #salt
19:17 bhosmer_ joined #salt
19:18 otter768 joined #salt
19:18 davesque any thoughts?
19:22 forcer joined #salt
19:24 jeremyr joined #salt
19:25 diegows davesque, I use grains
19:26 davesque diegows: so it would be something like {% if grains[‘environment’] == ‘development’ %} ?
19:26 diegows right
19:26 davesque is ‘environment’ the actual key?
19:29 forcer What is the best way of getting the current host's IP address? I do know there is only one non-localhost one, but I do not know the exact interface name. grains["ipv4"] has a list, but that seems alphabetically ordered and might have localhost as the first element.
19:29 Gareth morning morning
19:29 anotherZero ok, can someone help me with the syntax for installing a pre made crontab for a user?
19:31 diegows davesque, you define it
19:31 diegows forcer, fqdn_ip4
19:33 anotherZero I'm only able to get crontab to install the topmost line (such as superscript > /tmp/crontest) into the crontab, rather than using a -source: statement
19:35 shaggy_surfer joined #salt
19:39 shaggy_surfer Hi guys, I have noticed that I sometimes get:  "Minion did not return. [No response]"  even though I have tried using the -t 20 (i.e. here is for 20 seconds to wait)  ….. I remember reading about a bug about AES encryption key rotation every 24 hours and I did the suggested tweak in the salt master config file.  However, I still see this issue, any recommendations.?
19:39 forcer diegows: Thank you!
19:40 forcer Is there some kind of reference for the semantics of the default grains? :-)
19:40 philipsd6 anotherZero: Have you looked at this state? http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cron.html
19:40 thedodd joined #salt
19:40 shaggy_surfer I followed this:  https://github.com/saltstack/salt/issues/16518
19:40 diegows forcer, introspection :)
19:40 diegows salt node grains.items :)
19:41 philipsd6 anotherZero: Looks like salt.states.cron.file will do what you want.
19:41 forcer diegows: I know how to look at them, but I do not know what they mean, usually. For example, I did not know for fqdn_ip4 whether that is always a non-local IP, or how it is chosen.
19:42 diegows it depends on the /etc/hosts properly configured and the hostname properly set
19:42 shaggy_surfer I am using jenkins to push deployments with fabric calling salt states.  The issue is that the shell will return success even though the salt-minion to did not return.  However the actual salt.state is executed properly if I review the log on the minion
19:42 anotherZero philipsd6: I replaced the top line with my salt://filename reference and it seems to be working :)
19:42 diegows forcer, hostname and hostname -f
19:43 diegows should return hostname and FQDN, if not... /etc/hosts is wrong
19:43 diegows and fqdn_ip4 will be wron too
19:43 forcer diegows: Ok.
19:44 shaggy_surfer @basepi any suggestion?  I know that you were working with this bug
19:44 forcer So, is there some kind of reference for how the default grains are retrieved, or what they are meant to mean? Outside of reading the source? :-)
19:45 BigBear joined #salt
19:46 shaggy_surfer basepi:  any suggestions, I know that you were working with this bug?
19:47 schimmy joined #salt
19:49 schimmy2 joined #salt
19:54 iggy forcer: source
19:54 forcer iggy: Ok, thanks
19:54 iggy and it's really not easy to read
19:57 shaggy_surfer joined #salt
19:57 simmel joined #salt
19:57 jalaziz joined #salt
19:58 shaggy_surfer chirp chirp (cricket sounds)
19:59 jaimed joined #salt
20:00 Ozack1 joined #salt
20:02 desposo joined #salt
20:05 otter768 joined #salt
20:11 desposo joined #salt
20:12 pr_wilson joined #salt
20:16 thedodd joined #salt
20:25 sschwartz_ee joined #salt
20:25 sschwartz_ee Anyone here used salt-api plugin for Jenkins?
20:38 jalaziz joined #salt
20:39 schlueter joined #salt
20:42 faust joined #salt
20:42 faust joined #salt
20:43 slk_ should i be seeing this when i run salt '*' saltutil.pillar_refresh ? 'saltutil.pillar_refresh' is not available.
20:45 CatPlusPlus It's called refresh_pillar
20:45 slk_ ah ok derp
20:45 slk_ yep even a CLI example of it in the docs :P
20:48 jalaziz joined #salt
20:50 sschwartz_ee Is there a good way to downgrade from helium back to 2014.1, or do I have to do a clean install?
20:50 ndrei joined #salt
20:51 bhosmer_ joined #salt
20:56 forcer If I have a bunch of states that add repositories to the system using pkgrepo.managed, what is the best way of running apt-get -q update only once after all of them ran?
20:57 StDiluted joined #salt
20:58 P0bailey joined #salt
20:58 P0bailey joined #salt
20:59 otter768 joined #salt
21:00 kawa2014 joined #salt
21:00 kawa2014 joined #salt
21:02 WillPlatnick forcer: I believe they included something in 2014.7 for that...but that would mess up the requisite system quite a bit if it did that by default
21:04 WillPlatnick forcer: This is what I was thinking of: http://salt.readthedocs.org/en/latest/ref/states/aggregate.html
21:04 ndrei joined #salt
21:04 forcer WillPlatnick: Thank you!
21:04 FRANK_I How can I replace a file from master to minion?
21:04 FRANK_I It is not clear for me the documentation
21:05 WillPlatnick FRANK_I: From the master to the minion you would use the file.managed state
21:05 FRANK_I http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#operations-on-regular-files-special-files-directories-and-symlinks
21:05 FRANK_I I don't get it :(
21:06 WillPlatnick FRANK_I: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
21:06 FRANK_I :)
21:06 FRANK_I Thank you~!
21:08 WillPlatnick FRANK_I: https://gist.github.com/WillPlatnick/ff037be2f18b7e3a2ea7 <-- That would create a file at /usr/local/bin/test using the test file stored in the teststate directory. Make sense?
21:12 FRANK_I WillPlatnick looking @ it
21:12 rocket joined #salt
21:14 otter768 joined #salt
21:16 FRANK_I WillPlatnick please look @ the github comment
21:17 mapu joined #salt
21:17 shaggy_surfer joined #salt
21:17 peters-tx joined #salt
21:18 debian112 helllo ALL
21:18 WillPlatnick FRANK_I: commented
21:19 WillPlatnick debian112: greetings
21:20 debian112 looking to use *. in and include
21:20 debian112 http://paste.debian.net/136259/
21:20 dude051 joined #salt
21:20 debian112 is that possible?
21:20 debian112 check the link to see what I am talking about
21:21 ndrei joined #salt
21:24 FRANK_I WillPlatnick you're the man!!!!! Thank you.
21:24 WillPlatnick FRANK_I: no problem
21:24 FRANK_I ls
21:25 penguin_dan joined #salt
21:25 dude051 joined #salt
21:26 FRANK_I WillPlatnick Another question if I copy the file from the master Root always will be the owner of the file?
21:26 mapu joined #salt
21:26 WillPlatnick FRANK_I: If you take a look at the docs I sent, you can see what you can pass in. You can add user: whoever to make it owned by that user
21:27 FRANK_I Got it thanks
21:27 WillPlatnick FRANK_I: there's all kinds of other things you can change, so definitely check that documentation out
21:27 WillPlatnick debian112: good question, I've never had the need to do this before
21:28 jalaziz joined #salt
21:29 debian112 WillPlatnick how do you pull many files?
21:29 debian112 like this: http://paste.debian.net/136260/
21:30 debian112 each of my servers have a file with data in them
21:30 sschwartz_ee OK. trying again -- is there a viable rollback procedure from Helium back to 2014.1?
21:31 WillPlatnick sschwartz_ee: Nothing should stop you from using the same method you used to upgrade, I had to roll back initially and did so without issue, what problem are you running into?
21:31 nethershaw Here's something peculiar. When I provision instances (minions), I generate the minion's keypair on the master-of-masters and push the public key to the minion's zone master so that the zone master accepts it when the minion comes up. For reasons I do not understand, the minion expresses its public key with an extra line break after the "END PUBLIC KEY" line, and this causes the zone master to reject it.
21:32 nethershaw Either (a) the zone master is doing something wrong in considering this linebreak to be part of the public key or (b) the minion is doing something wrong in appending it.
21:32 WillPlatnick debian112: What's in those files you're referencing?
21:32 sschwartz_ee I did a yum upgrade, and wasn't sure if I could do a yum install over it.  (It's broken the salt-api connecto on Jenkins.)
21:32 debian112 http://paste.debian.net/136262/
21:32 UtahDave nethershaw: how are you copying down the keys?
21:32 nethershaw rsync.
21:32 debian112 WillPlanick: http://paste.debian.net/136262/
21:33 nethershaw The line break appears in the public key that isn't copied to the new minion; the minion gets the private key and generates its public key from it.
21:33 WillPlatnick sschwartz_ee: I use debian, and I grabbed the deb and installed it, I'd try doing the same with the rpm?
21:34 sschwartz_ee OK.
21:34 nethershaw It seems silly, but for the moment I'm able to force the match by munging the private key, adding a line break, before I rsync it to the zone master. This, astonishingly, works. It should not.
21:34 WillPlatnick debian112: are you trying to assign pillar values to a specific host?
21:35 Singularo joined #salt
21:35 nethershaw Stuff after the "END PUBLIC KEY" line should most emphatically _not_ be considered part of the key.
21:36 nethershaw Er, above, I meant to say "munging the public key"
21:36 nethershaw Not the private key (of course)
21:37 debian112 WillPlatnick that is the goal yeah, but for right now I am trying to grab all the pillar files in one include line, instead of add each server.sls under the include
21:37 debian112 this can become crazy we you have 300+ servers
21:39 WillPlatnick debian112: Yeah, that's why you would use grains matching and globs :)
21:39 ckao joined #salt
21:40 WillPlatnick debian112: I don't know of any way to do what you're looking to do programatically, not that you can't, I just don't know
21:40 WillPlatnick debian112: and it's not something you'll ever see done in any documentation...take from that what you want :)
21:43 debian112 WillPlatnick: So if I have many pillar files how would I active them all? If there is another way. In python I can do this: http://paste.debian.net/136265/
21:43 debian112 and it works
21:43 debian112 but not in salt?
21:44 Jahkeup joined #salt
21:44 shaggy_surfer joined #salt
21:44 WillPlatnick Well, you're breaking out into jinja, not pure python in {{ }}
21:45 Andre-B joined #salt
21:45 smcquay joined #salt
21:46 debian112 my pillar top file: http://paste.debian.net/136267/
21:46 StDiluted joined #salt
21:47 marv__ joined #salt
21:48 WillPlatnick debian112: so you're trying to have a pillar data that contains network info for every host in the network?
21:48 debian112 that and more
21:49 Singularo joined #salt
21:50 WillPlatnick debian112: There's always the Python renderer rather than yaml+jinja - http://docs.saltstack.com/en/latest/ref/renderers/
21:50 WillPlatnick then you could write it in pure python if you want :)
21:51 glyf joined #salt
21:51 WillPlatnick debian112: but like I said, I don't know of a way to dynamically iterate through a filesystem within jinja
21:53 debian112 ok thanks - WillPlatnick I will looking into the renderering
22:13 cads joined #salt
22:14 shaggy_surfer joined #salt
22:16 skyler joined #salt
22:17 jeddi joined #salt
22:18 giantlock joined #salt
22:21 glyf joined #salt
22:22 pr_wilson joined #salt
22:27 perfectsine joined #salt
22:35 mordonez joined #salt
22:38 iggy wow, I haven't tried to run salt-master with -l debug in quite a while... it's effectively useless with as complex as our config is here now
22:52 dude051 joined #salt
22:52 kermit joined #salt
22:55 shaggy_surfer joined #salt
23:01 anotherZero what do I need to know about a minion not making any changes sometimes?  is there a caching of the states going on?
23:02 iggy there is some caching, but it's usually invalidated by a highstate (or some other functions)
23:03 anotherZero hmm... I'm just trying to run salt 'target' state.sls codebase and it's not returning any output
23:03 kawa2014 joined #salt
23:03 iggy -l debug ?
23:03 anotherZero not even saying there were successes or failures.  ok let me try that
23:03 iggy that usually means that the state takes too long to return
23:04 iggy try changing th e timeout
23:04 anotherZero perfect!  thanks iggy.  my firewall rules (recently updated by salt ;) were getting in the way
23:05 * iggy adds another checkbox in the problems solved column
23:08 forcer In a file.managed with template: jinja, can the file use jinja's {% include %} statement to include a file? If so, what path does that use?
23:08 forcer The example I found in the docs only talks about the actual .sls file, and does not mention the include path.
23:09 UtahDave iggy++
23:10 UtahDave forcer: I believe the jinja include is based off the file_roots setting.  You can also do relative includes, I believe
23:10 iggy forcer: it can, I'm pretty sure it's relative to the file doing the include'ing
23:10 forcer Let me try some paths ...
23:10 iggy try it and tell us
23:11 iggy ;)
23:11 otter768 joined #salt
23:12 forcer Can't use relative include, but an absolute include from the file_roots directory works. Hah.
23:12 forcer (I tried this initially, but I had a type :o))
23:12 forcer *typo
23:14 * iggy takes note
23:18 forcer Maybe I should try and avoid and x/y problem. I create logcheck ignore rules from a variety of places (e.g. the munin sls creates munin ignore rules). These rules all use a whole bunch of variables to make writing the regular expressions less painful. Now I'm trying to set these variables only once. My first idea was to have a .jinja2 file I am including/importing from the variables template files. Is there a better way with salt? :-)
23:19 forcer Hm. I guess I could define it as a pillar and pass it via file.managed's context argument.
23:22 forcer Hah! That worked nicely on the first try.
23:23 forcer In case it wasn't obvious, I started learning salt only today and am experimenting with all sorts of things. :-)
23:26 iggy you appearing to be doing well for being a day into it
23:27 iggy previous python, jinja, etc experience?
23:27 forcer Yes. And I am porting an ansible playbook, the concepts are also quite similar.
23:30 jnials joined #salt
23:36 nitti joined #salt
23:38 kriberg joined #salt
23:42 StDiluted joined #salt
23:50 forcer Haha. I'm lost in a maze of escape sequences, all alike. My pillar file now has {% set ... %} statements which require escaping of backslashes, which are then used in the file itself. So I need \\\\w to get \w in the salt '*' pillar.items output. With fewer it errors out, because "\w" is invalid yaml. But with \\\\w, the final file that this generates ends up with \\w instead of \w. :-D
23:52 forcer Apparently, this is a known bug but the ticket was not reopened when the bug was re-reported? https://github.com/saltstack/salt/issues/6435
23:55 decrypted joined #salt
23:55 decrypted Hey folks is there a way to make a default local script to run when a minion executes?

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