Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-09-02

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

All times shown according to UTC.

Time Nick Message
00:00 Xopher joined #salt
00:00 Ztyx joined #salt
00:01 Ztyx joined #salt
00:01 ALLmightySPIFF joined #salt
00:05 sgargan joined #salt
00:10 Xopher joined #salt
00:18 jeadre joined #salt
00:20 baweaver joined #salt
00:23 timoguin joined #salt
00:26 bfoxwell joined #salt
00:28 Configio joined #salt
00:33 Rockj\ joined #salt
00:34 jdubinsky joined #salt
00:37 kbaikov_ joined #salt
00:37 kbaikov_ joined #salt
00:39 spark_ joined #salt
00:52 cheus joined #salt
00:56 lahwran joined #salt
00:58 vvoody joined #salt
01:05 pravka joined #salt
01:07 hasues joined #salt
01:09 hasues left #salt
01:12 jujumejik joined #salt
01:19 CeBe1 joined #salt
01:24 jeadre joined #salt
01:39 jeadre joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt | 2015.5.5 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:58 catpigger joined #salt
02:02 writtenoff joined #salt
02:13 nk joined #salt
02:16 pm90_ joined #salt
02:17 alexhayes joined #salt
02:24 aqua^c joined #salt
02:27 timoguin joined #salt
02:29 ALLmightySPIFF joined #salt
02:32 orion203 joined #salt
02:33 ajw0100 joined #salt
02:54 sunkist joined #salt
03:01 spark_ joined #salt
03:07 auzty joined #salt
03:07 ekristen joined #salt
03:10 zwi joined #salt
03:21 ggoZ joined #salt
03:28 zmalone joined #salt
03:28 jagguli joined #salt
03:28 jagguli hi .. im trying to use minionfs to collecfiles from windows minons and deploy to other minions
03:28 jagguli but salt seems to be choking on windows pathnames like D:\test.txt
03:28 jagguli i can see that the file is being pushed to the minon path on the master
03:28 jagguli but salt cp.get_file "salt://testminon/D:/test.txt" C:\\test.txt
03:28 jagguli dont work
03:28 jagguli i know this used to work .. may be a regression ?
03:33 XenophonF joined #salt
03:34 XenophonF does file.recurse copy the file system permissions of the source folder/contents?
03:37 jagguli looks like it bug with ':' in path
03:37 jagguli salt dev-vm0 cp.get_file_str salt://dev-vm0/D/test.txt
03:37 jagguli works
03:38 jagguli salt dev-vm0 cp.get_file_str salt://dev-vm0/D:/test.txt
03:38 jagguli does not work
03:38 jagguli the files are the same i just made a copy with no ':' in the path
03:39 clintberry joined #salt
03:41 djpain joined #salt
03:43 big_area joined #salt
03:44 denys joined #salt
03:45 djpain hey guys, has anyone had issues using cloud-salt when creating a vm on aliyun? it seems that it's not assigning the correct name to the vm I create and thus salt-cloud seems to think that it's not there.
03:45 djpain here is a snippet from the debug log https://gist.github.com/djpain/1ed028780606e953547f
03:46 borgstrom joined #salt
03:47 Furao joined #salt
03:51 TOoSmOotH joined #salt
03:53 clintberry joined #salt
04:00 charli joined #salt
04:03 zwi joined #salt
04:06 denys joined #salt
04:07 mosen joined #salt
04:08 eichiro joined #salt
04:09 ALLmightySPIFF joined #salt
04:31 evle joined #salt
04:35 subsignal joined #salt
04:46 vvoody joined #salt
04:47 ramteid joined #salt
04:50 orion203 joined #salt
04:52 onorua joined #salt
04:58 djpain joined #salt
05:00 jalbretsen joined #salt
05:01 spark_ joined #salt
05:01 zer0def joined #salt
05:05 dopesong joined #salt
05:08 jhauser joined #salt
05:12 aristedes joined #salt
05:23 rdas joined #salt
05:24 linjan joined #salt
05:35 NightMonkey joined #salt
05:37 rdas joined #salt
05:51 katyucha joined #salt
06:02 colttt joined #salt
06:02 NightMonkey joined #salt
06:08 danlsgiga joined #salt
06:10 danlsgiga The reactor sls files renders salt['grains.get'] or salt[pillars.get']? Or it only renders what comes inside the data dict?
06:14 anotherbofh2 joined #salt
06:15 jbrnds2 joined #salt
06:18 dopesong joined #salt
06:21 rdorgueil joined #salt
06:28 AndreasLutro joined #salt
06:37 ALLmightySPIFF joined #salt
06:44 joe_n joined #salt
06:44 dopesong_ joined #salt
06:48 Xopher joined #salt
06:51 onorua joined #salt
06:51 slav0nic joined #salt
06:52 lb1a joined #salt
06:53 KermitTheFragger joined #salt
06:56 joe_n joined #salt
06:58 ALLmightySPIFF joined #salt
07:02 eseyman joined #salt
07:04 spark_ joined #salt
07:04 laax joined #salt
07:11 kawa2014 joined #salt
07:12 NightMonkey joined #salt
07:15 zerthimon joined #salt
07:17 saffe joined #salt
07:22 pcdummy joined #salt
07:22 pcdummy joined #salt
07:26 colttt joined #salt
07:26 aberdine left #salt
07:27 pbrooko joined #salt
07:31 linjan joined #salt
07:44 stephanbuys joined #salt
07:44 stephanbuys left #salt
07:49 aqua^c joined #salt
07:54 linjan joined #salt
07:59 markm joined #salt
08:03 subsignal joined #salt
08:04 s_kunk joined #salt
08:04 keimlink joined #salt
08:06 mikeywaites joined #salt
08:08 GreatSnoopy joined #salt
08:14 Zytox joined #salt
08:21 shiriru joined #salt
08:22 losh joined #salt
08:27 ALLmightySPIFF joined #salt
08:30 chiui joined #salt
08:33 linjan joined #salt
08:43 aqua^c joined #salt
08:48 mfournier joined #salt
08:51 mfournier joined #salt
08:55 Xevian joined #salt
09:04 spark_ joined #salt
09:06 spark__ joined #salt
09:07 N-Mi joined #salt
09:08 subsignal joined #salt
09:16 pf_moore joined #salt
09:20 ssc If I run this file (https://bitbucket.org/mosaik/mosaik-api-python/src/tip/tests/test_api.py?at=default#test_api.py-82) with "py.test tests/test_api.py -k refused", the test passes.
09:21 ssc If I run the tests normaly with "py.test" or "py.test tests/test_api.py" the tests fails because "err" (what capsys.readouterr()) returned is empty.
09:22 ssc But py.test says in the error report that it captured the expected string from stderr.
09:22 jhauser joined #salt
09:22 Zytox joined #salt
09:22 ssc oh, sry.  I’m in the wrong chat room …
09:25 ssc left #salt
09:26 Ztyx joined #salt
09:28 SWA joined #salt
09:31 jhauser_ joined #salt
09:45 AndreasLutro joined #salt
09:46 Sesa joined #salt
10:02 Xopher joined #salt
10:07 ALLmightySPIFF joined #salt
10:07 fredvd joined #salt
10:07 shiin joined #salt
10:08 shiin I'm looking for a way to render a pillar to check it for syntax errors. Is there a command for that?
10:08 aristedes joined #salt
10:08 aristedes left #salt
10:09 David_B55 https://docs.saltstack.com/en/stage/ref/states/testing.html the commands on that page might help, assuming you run a state that requires that pillar
10:09 Grokzen joined #salt
10:11 fredvd joined #salt
10:17 Xopher joined #salt
10:31 Diaoul joined #salt
10:31 stephanbuys joined #salt
10:46 johtso joined #salt
10:49 joe_n joined #salt
10:51 illern joined #salt
10:53 mortis_ any idea how to reference an ext_pillar in pillar slses after setting ext_pillar_first to true? or is it even possible?
10:55 AndreasLutro mortis_: don't think you can ever reference pillar data inside a pillar
10:56 mortis_ AndreasLutro: i just read this
10:56 mortis_ http://devop.ninja/configuration%20management/2015/03/01/beyond-grains-roles-with-an-external-pillar/
10:56 mortis_ which says:
10:56 mortis_ "This time we do not have to worry aboout special reactors to run another highstate, or orchestrations that apply grains and then run a highstate. All of these things ‘just work’ under this model. One limitation currently exists however. If you wish to use ext_pillar data in your pillar sls files, that does not currently work. Salt 2015.2 is just around the corner though and adds a configuration option called ext_pillar_first that appears like it ...
10:56 mortis_ ... will solve for this limitation."
10:57 mortis_ so i had hopes
10:57 mortis_ doesnt seem like it works thos
10:57 mortis_ tho*
10:57 AndreasLutro https://github.com/saltstack/salt/blob/94217c546830d8253dd6ab98eb3afc261a277967/salt/pillar/__init__.py#L672-L683
10:57 mortis_ or im doing something wrong
10:58 mortis_ merges into pillar
10:58 AndreasLutro I think it's just the order in which things are merged
10:59 mortis_ "The ext_pillar_first option allows for external pillar sources to populate before file system pillar. This allows for targeting file system pillar from ext_pillar."
10:59 AndreasLutro without knowing what you're hoping to achieve (xy problem), you could either move data from ext_pillar to a yaml/jinja file which you then import in various pillar .sls files, or write a custom salt module that fetches data from your database or whatever, then use that in your pillars
10:59 mortis_ from this https://docs.saltstack.com/en/latest/ref/configuration/master.html
10:59 mortis_ i do have an ext_pillar module that fetches data
10:59 AndreasLutro indeed... but again I don't think it makes the pillar data available in the .sls template itself
11:00 mortis_ but i cant lookup that data inside pillar slses
11:00 mortis_ exactly
11:00 AndreasLutro https://github.com/saltstack/salt/issues/6955
11:00 AndreasLutro https://github.com/saltstack/salt/issues/23910
11:00 mortis_ yeah, read through all those :)
11:00 jagguli` joined #salt
11:01 AndreasLutro nothing more I can help with then!
11:01 joe_n joined #salt
11:03 faliarin joined #salt
11:04 mlanner joined #salt
11:07 awpti joined #salt
11:07 spark_ joined #salt
11:10 subsignal joined #salt
11:11 bhosmer joined #salt
11:14 saffe joined #salt
11:25 shiin joined #salt
11:26 shiin David_B55: Thank you. I found that salt '*' pillar.data renders the entire pillar and throws errors if there are any.
11:29 denys joined #salt
11:33 ecdhe joined #salt
11:35 spark_ joined #salt
11:38 goldbuick__ joined #salt
11:40 jeddi is there a recommended way to run a service restart that works on both systemd and init boxes equally well (both running debian)
11:42 TyrfingMjolnir joined #salt
11:43 AndreasLutro salt minion service.restart name-of-service
11:43 aqua^c joined #salt
11:43 jeddi or do i need to look at grains.  ... the init: item seems to give me a clue.  so i can jinja the thing in the state file.
11:43 AndreasLutro uuh you shouldn't need to template anythign
11:44 jeddi AndreasLutro: ah - but as a state.sls file?
11:44 jeddi annoyingly the service appears to be smbd now - on pre-jessie (debian) it was samba.service
11:44 AndreasLutro well that's easy to solve
11:45 jeddi sure - a wrapper for distro version ... i've got a few of those around for different debian release names.
11:45 AndreasLutro service.running: - name: {{ 'smdb' if grains.osrelease > '8.0' else 'samba.service' }}
11:45 AndreasLutro (assuming debian only)
11:45 jeddi AndreasLutro: this is my current paragraph for restarting:  http://rn0.me/show/bdQzKOODRG2CdVLQtKvI/
11:46 jeddi ooh - that's much nicer than i was thinking :)
11:46 jeddi yeah - occasionally some ubuntu or centos, but happy to deal with those when necessary.
11:46 AndreasLutro https://github.com/saltstack-formulas/samba-formula/blob/master/samba/map.jinja
11:46 AndreasLutro this is a common pattern used when dealing with many oses and versions
11:46 jeddi and i can do =>  to include 8.0?
11:47 AndreasLutro yeah it's just python operators
11:47 jeddi AndreasLutro: thank you.   some of the common stuff still esccapes me  :)
11:47 AndreasLutro open a python shell and mess around to see what works and doesn't
11:48 jeddi okay.   shall do.   the 8.0 is evaluated as a string there, by the looks of it.
11:48 jeddi (i know i basically just said i'd go look at it myself, then asked you ... but i'm feeling lazy)
11:48 AndreasLutro yeah - because grains.osrelease is a string
11:48 jeddi cool cool.
11:49 AndreasLutro >>> 8.0 >= '8.0'
11:49 AndreasLutro False
11:49 AndreasLutro >>> '8.0' >= '8.0'
11:49 AndreasLutro True
11:49 jeddi just running a state.sls against that one now.
11:49 impi joined #salt
11:50 jeddi Lovely!  Works a treat - thank you so much AndreasLutro
11:50 joe_n joined #salt
11:59 bhosmer joined #salt
12:11 subsignal joined #salt
12:13 irctc182 joined #salt
12:14 irctc182 Hi folks. I found 2015.8 branch in git. This is next stable release?
12:15 AndreasLutro irctc182: yes (though it will probably be renamed)
12:16 chiui joined #salt
12:17 irctc182 Any date of release?
12:17 AndreasLutro no
12:17 AndreasLutro the last release got delayed 2 months
12:17 kevinquinnyo joined #salt
12:17 AndreasLutro actually 3
12:19 irctc182 so on christmas community probably make a gift in the form of release?)
12:19 kawa2014 joined #salt
12:19 homeshlice joined #salt
12:20 AndreasLutro who knows ;)
12:21 irctc182 anyone use 2015.8 in production? Here is some changelog from 2015.5? I try to google this, but without success
12:22 jbrnds2 how can I add the current date/time from a jinja variable. The target is eg a jinja templated (conf) file.
12:22 jbrnds2 .. {{ datetime.now() }} or something like that I am guessing
12:22 AndreasLutro jbrnds2: bit of a jinja hack - {% set date = none | strftime('%Y-%m-%d') %}
12:24 AndreasLutro irctc182: I use it, but only with salt-ssh - I only know of some general infrastructure improvements, no huge features
12:24 AndreasLutro https://github.com/saltstack/salt/blob/develop/doc/topics/releases/2015.8.0.rst
12:25 Eureka703 joined #salt
12:28 llb42 joined #salt
12:33 emid joined #salt
12:34 unholycrab joined #salt
12:36 zwi joined #salt
12:38 clintberry joined #salt
12:39 clintberry joined #salt
12:40 xaviern joined #salt
12:42 dekozo joined #salt
12:43 whytewolf joined #salt
12:45 linjan joined #salt
12:47 subsignal joined #salt
12:49 jdubinsky joined #salt
12:59 stephanbuys1 joined #salt
13:01 hasues joined #salt
13:02 hasues left #salt
13:03 murrdoc joined #salt
13:07 rawb joined #salt
13:08 djpain joined #salt
13:09 cyborg-one joined #salt
13:10 JDiPierro joined #salt
13:10 ekristen joined #salt
13:11 amcorreia joined #salt
13:11 rawb Hello! I've been asked to look into SaltStack as a method of configuring new Debian servers on our network, but want to use a Masterless setup.
13:12 cpowell joined #salt
13:13 rawb I'm completely new to salt and all the official docs I've been seen, only seem to address masterless configs in passing.
13:13 rawb Anyone know where I can find a good tutorial/walkthrough specifically geared towards a masterless install/setup?
13:15 jdubinsky joined #salt
13:15 AndreasLutro rawb: everything is mostly the same, you just replace `salt minion-name` with `salt-call` when running salt from the command line
13:16 rawb What about installation and configuration? Do I install salt-master and ignore salt-minion? Do I install salt-minion and ignore salt-master? Is it some other package I need to install?
13:18 jeddi rawb: can we go back a bit - why do you want to use a masterless setup?
13:18 rawb Honestly? Because that's what my boss told me to look into. >.>
13:19 AndreasLutro rawb: I think salt-master is all you need
13:20 AndreasLutro but...
13:20 jeddi rawb: fairy nuff.   it seems a fairly arbitrary limitation.  are you guys looking into other provisioning / orchestration packages too?
13:20 AndreasLutro or maybe just salt-common
13:20 AndreasLutro probably salt-common!
13:21 pravka joined #salt
13:21 olevchyk joined #salt
13:21 jdesilet joined #salt
13:21 stephanbuys joined #salt
13:22 protoz joined #salt
13:23 rawb @jeddi: Not that I'm aware of. We use virtualization that allows us to start out with at least a partially configured server that we just finish setting up, depending on it's purpose (install MySQL, apache, etc.)
13:24 rawb Hrm, I'll have to look for salt-common. The docs thus far have only mentioned salt-master, salt-minion, and salt-syndic.
13:24 rawb I'm not really far into them yet though.
13:25 racooper joined #salt
13:25 AndreasLutro https://docs.saltstack.com/en/latest/topics/tutorials/quickstart.html
13:25 AndreasLutro if you're ok with running the shell script
13:26 mapu joined #salt
13:26 elfixit joined #salt
13:26 subsignal joined #salt
13:30 jeddi rawb: again, all reasonable.  i've had experience tryign to set puppet up masterless, but not salt - i was wondering what the rationale was behind avoiding a master or multiple masters with salt off the bat.  you still have to get the state files out to, or visible to, each server.
13:31 rawb @AndreasLutro I tried that, but kept running into issues with the minions. The script would fail with an error about not being able to copy files to the VM and not ever finish setting up the first minion.
13:32 rawb I think it might have been a VirtualBox issue, but I couldn't figure it out.
13:32 Nazca joined #salt
13:32 bhosmer joined #salt
13:34 rawb Actually, it could have been an issue with my copy of SCP... I was doing the setup on Windows. I have a bunch of unxi utils installed that don't run in Cygwin, etc.
13:34 rawb err unix
13:34 AndreasLutro didn't you run the script inside the vm?
13:35 jbrnds2 how can I extend a jinja list of l:[k1: {k:v}, k2:{l,w}] with another k3:{m,u}. I was looking at salt['grains.???']
13:36 AndreasLutro jbrnds2: {% do l.append({k3:{m,u}}) %}
13:36 rawb The VM wouldn't even finish it's setup. I could never get it to the point where they would even boot.
13:36 rawb I might try setting up Cygwin and see if that helps.
13:37 linjan joined #salt
13:37 rawb Also looks like salt-common is a dependency installed by both salt-master and salt-minion. So it might not matter which one I install.
13:38 AndreasLutro installing salt-master and salt-minion will set up a service for the master/minion, you may not want that
13:39 jbrnds2 AndreasLutro ok. so {% set list = list.append(salt['pillar.get']('list').items) %} with in the pillar file a list: [k3:{m,u}, k4:{n,x}] --- would that work?
13:39 irctc182 AndreasLutro, thanks!
13:40 irctc182 anyone know salt-cloud profile generator?
13:40 AndreasLutro jbrnds2: not {% set list = list.append
13:40 AndreasLutro jbrnds2: just {% do list.append
13:40 spark_ joined #salt
13:40 AndreasLutro also not sure if you want/need the .items at the end - if you do it should be .items()
13:41 Akhter joined #salt
13:41 jalbretsen joined #salt
13:42 jbrnds2 in the pillar file there is a list with dicts that I want to append to the list already defined in a default list. So do and items().. will test it out.
13:42 Akhter joined #salt
13:45 jdubinsky joined #salt
13:46 cyborg-one joined #salt
13:53 irctc182 and why salt-cloud rune twice deploy.sh?
13:53 irctc182 *run
13:53 jbrnds2 at times I see {%- instead of {% in jinja statements. What is the difference and when used?
13:55 ALLmightySPIFF joined #salt
13:56 AndreasLutro jbrnds: {%- removes any whitespace that may exist before the {
13:57 AndreasLutro -%} does the same but after the }
13:57 jbrnds why would you need to do that? To maintain proper identing?
13:58 babilen jbrnds: http://jinja.pocoo.org/docs/dev/templates/#whitespace-control
13:58 babilen jbrnds: Because you don't want empty lines all over the goddamn file?
13:58 DammitJim joined #salt
13:59 aqua^c joined #salt
14:00 jbrnds babilen pardon your French. thanks
14:02 pm90_ joined #salt
14:05 jdubinsky joined #salt
14:05 pm90__ joined #salt
14:05 andrew_v joined #salt
14:07 slav0nic joined #salt
14:08 zmalone joined #salt
14:09 sgargan joined #salt
14:09 rodio_ua joined #salt
14:09 rodio_ua left #salt
14:10 bluenemo joined #salt
14:12 murrdoc capt america over here
14:14 TyrfingMjolnir joined #salt
14:16 com48 joined #salt
14:17 com48 hi guys
14:17 stephanbuys1 joined #salt
14:18 com48 I'm trying to target some machines (render-01 to render-90)
14:18 zemm joined #salt
14:19 com48 salt "render-[01-90]" test.ping doesn't seem to work
14:21 jbrnds I have a list and I want to execute a statefile for each i in list using {% for i in list %}include:  - .install{% endfor %}. I get the error: Conflicting ID 'include'
14:22 hasues joined #salt
14:23 hasues left #salt
14:26 babilen com48: It works like shell globbing ([0-9] works while, say, [0-10] doesn't
14:27 babilen jbrnds: Move the "include: " out of the loop
14:27 freeone3000 left #salt
14:28 saffe joined #salt
14:28 jbrnds babilen how do I ensure that the final state of the statefile is reached for each item in the list?
14:28 tkharju joined #salt
14:28 com48 so there is no way to match with multiple digits?
14:29 babilen com48: No, the entirety of targetting options is detailed on https://docs.saltstack.com/en/latest/topics/targeting/
14:29 babilen jbrnds: You run the highstate
14:29 spark_ joined #salt
14:30 babilen (and check that you have no failed states)
14:30 com48 ok, thanks babilen
14:31 jbrnds hmm the idea is that the 'item' is a dict which I use in the 'install' state. eg: {{ item.filename }}:  file.touch
14:32 jbrnds maybe I have to move the loop into the state that I now include.
14:33 rdutch joined #salt
14:34 babilen jbrnds: Could you maybe start a bit earlier: What are you trying to achieve?
14:35 jbrnds i am trying to install a couple of django instances under a single apache wsgi server. The list contains settings such as git_repo/git_rev and appnames for each instance.
14:35 jbrnds each django instance has its own wsgi configuration though
14:36 jbrnds so in essence: for appdict in listofdict: git clone {{appdict.git_repo}} /path/{{appdict.appname}} .... and do much more naturally
14:37 pm90_ joined #salt
14:38 XenophonF does this pillar.get/merge look right? https://github.com/irtnog/shibboleth-formula/blob/master/shibboleth/idp/map.jinja#L14
14:38 pm90__ joined #salt
14:38 XenophonF for whatever reason the pillar data isn't actually getting merged with the variable
14:38 TyrfingMjolnir joined #salt
14:38 babilen jbrnds: I fail to see how "include: " is related to that
14:40 Salter joined #salt
14:40 babilen That sounds like an overly complex way of doing about what is, essentially, a simple loop over a pillar.
14:41 jbrnds babilen could be. essentially it is rerunning a formula based with different settings (dependend on the item in the list)
14:42 murrdoc joined #salt
14:42 viq joined #salt
14:42 Salter Hi, I am currently reading saltstack documentation and I am at https://docs.saltstack.com/en/latest/topics/targeting/grains.html#matching-grains-in-the-top-file and it is explained how to simplify a top.sls file using grains and Jinja2 templating system. I don't get the meaning of {{ self }} keyword.
14:43 nhe joined #salt
14:43 nhe Hello! any idea why 2 consecutives calls to salt filtered on grains/roles return different values? it doesn't seem deterministic: https://gist.github.com/nhe​rbaut/1659ef0e690c4c33f6c1
14:44 jbrnds i think my approach is somewhat flawed. I need to rethink this better. Possibly having a loop over a list with some states in there. To ensure no clashing occurs will parametrise the statenames (appname = unique)
14:44 Salter Here is my question in detail http://serverfault.com/questions/718567/what-is-self-in-jinja2-templating-system
14:44 XenophonF oh man - my minion and my master are running different versions of salt
14:44 XenophonF maybe that's the problem
14:44 stupidnic joined #salt
14:51 khaije1 joined #salt
14:51 nhe any idea why " salt -C 'G@roles:swift*' grains.get roles" sometimes return 1 element and sometime 2, at 1 sec interval?
14:51 babilen Salter: http://jinja.pocoo.org/docs/dev/templates/ has a bit on it. I'd consider it to be rather arcane.
14:52 khaije1 the latest I've seen is that salt-ssh rosters dont support targeting by systems other than glob and list ... any contradicting info?
14:55 Gareth o/
14:55 murrdoc Gareth:  \o
14:56 Heartsbane \o/
14:56 XenophonF i don't understand why the merge in map.jinja isn't work
14:56 XenophonF ing
14:56 murrdoc cos u did it wrong
14:56 murrdoc :P
14:56 murrdoc send gist
14:56 XenophonF https://github.com/irtnog/shibboleth-formula/blob/master/shibboleth/idp/map.jinja#L14
14:59 zsoftich joined #salt
15:00 jdubinsky joined #salt
15:00 Thecpat joined #salt
15:02 Thecpat left #salt
15:02 Nyks joined #salt
15:03 XenophonF nothing i've set in the shibboleth:idp pillar gets merged with the idp_settings dict
15:03 Salter @Nyks Hi
15:04 * Nyks slaps Salter around a bit with a large fishbot
15:05 RedundancyD joined #salt
15:05 markm_ joined #salt
15:05 djpain joined #salt
15:06 murrdoc XenophonF:  whats not merging
15:07 XenophonF there are a handful of keys that need to be set in pillar - shibboleth:idp:hostname, shibboleth:idp:entity_id, and so on
15:07 XenophonF https://github.com/irtnog/shibboleth-formula/blob/master/shibboleth/idp/defaults.yaml#L17 has the list
15:08 clintberry joined #salt
15:08 XenophonF none of those settings from defaults.yaml get overridden by what i know (via salt-call pillar.get shibboleth:idp) is set in pillar
15:09 murrdoc oh
15:10 zwi joined #salt
15:11 sdm24 joined #salt
15:12 murrdoc that makes no sense
15:14 XenophonF no it doesn't
15:15 freewheel joined #salt
15:16 kaptk2 joined #salt
15:22 sgargan joined #salt
15:23 Configio joined #salt
15:25 Brew joined #salt
15:31 spark_ joined #salt
15:33 kevinquinnyo joined #salt
15:34 godlike what is the MasterMinion for? Is it supposed to be a representation of a master or a minion?
15:35 joe__n joined #salt
15:37 babilen godlike: Which "MasterMinion" ?
15:38 godlike babilen: the one on salt/minion.py
15:38 godlike I know everything would point to it representing a minion, but I found a weird case where it calls up minion_config() with the path to the master config file
15:43 spiette joined #salt
15:44 babilen godlike: It seems to be used in the context of syndics
15:45 godlike babilen: interesting. if it's only used then, that would explain why I got this behaviour: https://github.com/saltstack/salt/issues/26825
15:46 babilen So this was all an elaborate ruse to ask for IRC support of that particular issue?
15:49 wendall911 joined #salt
15:49 jalbretsen joined #salt
15:52 godlike babilen: just trying to understand, the name confused me a bit. sorry
15:55 DammitJim joined #salt
15:58 monkey661 left #salt
16:03 mpanetta joined #salt
16:04 zmalone joined #salt
16:08 writtenoff joined #salt
16:10 cbrown2_ocf joined #salt
16:11 cbrown2_ocf Hello, I'd like to insert the salt master ip address into a config file. Any ideas on how to achieve this?
16:11 cbrown2_ocf I've looked at salt.master.ip.addr ? but am unsure how to call this in a config file
16:12 win_salt joined #salt
16:15 Configio joined #salt
16:16 rdutch cbrown2_ocf: if you mean the minion config file, it is located under /etc/salt and called minion, in there there is a section master, which is defaulted to salt, you can put the ip adress there
16:18 cbrown2_ocf rdutch, thanks but no, i'm running a service on the salt master so was wondering if I could define it's IP in the .conf file that gets deployed
16:19 Grokzen joined #salt
16:19 cbrown2_ocf Normally I'd just edit it in the jinja2 template but we are wanting to reuse this repeatedly
16:19 shaggy_surfer joined #salt
16:20 cbrown2_ocf so I could do with defining it as the salt masters IP address as this is where we will run this service
16:20 sdm24 cbrown2_ocf: theres a 'master' grain, maybe do a dig for {{grains['master'].yourdomain}}
16:22 shaggy_surfer joined #salt
16:22 sdm24 cbrown2_ocf: you can also use the mine, if your master also has salt-minion installed
16:23 cbrown2_ocf sdm24, mine?
16:24 sdm24 https://docs.saltstack.com/en/latest/topics/mine/index.html its used so minions can see other minion's data
16:24 sdm24 so you can, in a state file, have the target minion look up the ip grain of the master-minion and use that
16:26 cbrown2_ocf ah right, not sure we want a minion running on the master. I was hoping there was a way to reference it, might try the dig approach
16:27 nico___ joined #salt
16:27 nico___ hello, how to I pass arguments to funtion through the rest_cherrypy api?
16:27 nico___ like  curl -sSk https://192.168.236.60:8000             -b ~/cookies.txt             -H 'Accept: application/x-yaml'             -d client=local            -d tgt='*'             -d "fun=grains.get"
16:31 saffe joined #salt
16:31 pravka joined #salt
16:33 nico___ did i miss somethin?
16:34 XenophonF cbrown2_ocf: take a look at salt-formula, with which you can manage salt master and minion installations like any other piece of software
16:35 KyleG joined #salt
16:35 KyleG joined #salt
16:35 aparsons joined #salt
16:36 andrew_v_ joined #salt
16:36 XenophonF nico___: https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html#salt.netapi.rest_cherrypy.app.Minions
16:36 cberndt joined #salt
16:37 XenophonF nico___: your POST URL is wrong
16:38 nico___ XenophonF: really? it works well with -d "fun=test.ping"
16:38 * XenophonF shrugs.
16:38 XenophonF i'm just going by what the docs say - i could be wrong
16:39 zacdev joined #salt
16:40 sdm24 I don't know anything about rest_cherrypy, but grains.get will error if you don't pass an argument. test.ping doesn't require an arugment, so it will work. try -d "key=<yourgrain>"
16:42 druonysuse joined #salt
16:43 nico___ sdm24: thanks for the suggestion, but that doesn't work: 'TypeError encountered executing grains.get: get() takes at least 1 argument
16:43 sdm24 what does it say without that?
16:44 brahama joined #salt
16:44 nico___ it's the same, no difference with/without the -d "key=os"
16:44 capricorn_1 joined #salt
16:44 sdm24 hmm. maybe -d "os"?
16:44 whytewolf nico___: try -d "arg: key=os"
16:45 sdm24 Again, I know nothing about rest_cherrypy, I'm just guessing from examples
16:45 whytewolf err. I mean -d "arg: os"
16:46 nico___ -d "arg: key=os", -d "arg: os" and -d "os" show the same error :-(
16:46 X67r joined #salt
16:47 whytewolf try using a full json setup like the this example https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html#usage
16:47 Fiber^ joined #salt
16:48 sdm24 maybe -d "arguments: key=os" or -d "arguments: os"
16:48 jodv joined #salt
16:48 whytewolf oh wait arg is an json array -d 'arg: ["os"]'
16:49 sdm24 ooh oh -d fun_args
16:49 sdm24 -d "fun_args: key=os"
16:50 Akhter joined #salt
16:51 nico___ sdm24, whytewolf > sorry, none of this works... i'm going to try with json
16:51 impi joined #salt
16:51 sdm24 nico__: no worries, I was just looking through all the examples on the docs page. Good luck
16:53 nico___ sdm24, whytewolf> works great with json, as per the doc
16:56 whytewolf nico___: glad to hear it
16:59 aparsons joined #salt
17:02 pm90_ joined #salt
17:05 vim-zz joined #salt
17:06 sunkist joined #salt
17:07 murrdoc anyone here work with mod_aggregate
17:07 murrdoc need to write it up for apt
17:07 murrdoc wanted to get some opinions
17:10 Configio joined #salt
17:13 Gareth I've used it.  It works well with apt.
17:13 murrdoc oh word ?
17:13 murrdoc just turn it on ?
17:13 murrdoc i thought it only had pkg support
17:14 murrdoc by apt i meant pkgrepo
17:14 shaggy_surfer joined #salt
17:17 mapu joined #salt
17:17 Gareth oh. yeah. pkg and iptables have mod_aggregate support iirc.
17:20 Configio joined #salt
17:21 murrdoc so no on pkgrepo then
17:21 murrdoc damnit salt why u tease me
17:21 murrdoc did we get a reboot beacon yet ?
17:23 subsignal joined #salt
17:24 linjan joined #salt
17:25 Ph-x joined #salt
17:27 forrest joined #salt
17:31 Ahlee Theories on why I'd get repeated AttributeError, 'module' object has no attribute exceptions at https://github.com/saltstack/salt/blob/develop/salt/payload.py#L138
17:31 Ahlee https://gist.github.com/jalons/c28eff9281a158f06d92
17:32 aparsons joined #salt
17:32 Ahlee i have 10 days to complete the 2015.5.x upgrade, or we're just sticking with 0.17 ad infininum
17:34 whytewolf Ahlee: someone came in the other day asking about that. i think they were running with an older version of msgpack. that might have not have had exceptions. never got updated about the issue. to know if that was right though
17:35 Ahlee i'll look for an upgrade to python-msgpack-0.1.13-3.el6.x86_64
17:35 Ahlee thanks whytewolf
17:35 mapu joined #salt
17:35 Ahlee so obvious it hurts
17:35 zwi joined #salt
17:36 kermit joined #salt
17:37 dyasny joined #salt
17:38 whytewolf Ahlee: okay. finally found the msgpack repo. looks like anything older than 0.3.0 doesn't have exceptions
17:39 Ahlee whytewolf: awesome, upgrading to python-msgpack-0.4.5-1.el6.x86_64.rpm got me further. now seeing 'trying to tune in'
17:39 Ahlee so, will drop to trace and see hwat's happening
17:39 Ahlee thanks
17:40 whytewolf np
17:40 sgargan joined #salt
17:41 ajw0100 joined #salt
17:45 hoonetorg joined #salt
17:46 hoonetorg hi channel, i hv a question (oh wonder)
17:46 dendazen joined #salt
17:46 Setsuna666 joined #salt
17:46 sgargan joined #salt
17:47 hoonetorg how do you people manage data that occur more than once
17:47 Setsuna666 Anyone can confirm if RAET is table in the latest release of Salt ?
17:47 Setsuna666 stable*
17:47 Setsuna666 and feature complete*
17:48 hoonetorg ex. ip addr of a minion. need make pillar for netconfig, for dhcp server, for dns server ...
17:48 hoonetorg so i need to 3 pillar items with same content
17:48 iggy Setsuna666: I wouldn't bother with it unless you have a pretty compelling reason to try it
17:50 hoonetorg currently i use reclass, where i can define nodedata:<minionid>:ipaddresses:eth0 f.e. and then reference it for another pillar item
17:50 hoonetorg for dns server and dhcpserver i can loop over nodedata
17:50 Ztyx joined #salt
17:51 hoonetorg and ipaddress of <minionid> only needs to defined once.
17:51 Ztyx joined #salt
17:51 hoonetorg you guys get what I want to ask???
17:52 hoonetorg Is there a built in mechanism to manage data, that occur more than once???
17:54 Akhter joined #salt
17:54 KyleG1 joined #salt
17:55 Configio joined #salt
17:56 hoonetorg madduck: online?
17:58 drawsmcgraw Anyone have Salt pulling from Jenkins?
17:58 Edgan drawsmcgraw: pulling?
17:58 drawsmcgraw yes
17:58 drawsmcgraw sorry
17:58 drawsmcgraw Let me explain
17:59 drawsmcgraw Our Jenkins holds a number of .war files that we'd like to download & deploy
17:59 drawsmcgraw But my first crack at it looks like I'd have to authenticate to Jenkins before it will let me download anything.
17:59 Edgan drawsmcgraw: AWS?
17:59 drawsmcgraw I don't think that's a showstopper, but I'm asking for input before I go down that rabbit hole as I don't have a lot of familiarity with Jenkins
17:59 baweaver joined #salt
17:59 drawsmcgraw Edgan: on prem
17:59 drawsmcgraw VMs living in Openstack
17:59 Edgan drawsmcgraw: I would have jenkins put them somewhere else
18:00 drawsmcgraw hah. We had thought that as well...
18:00 drawsmcgraw I was thinking of Jenkins putting the warfiles on the Salt master
18:00 Setsuna666 joined #salt
18:00 drawsmcgraw I'd love to use something like S3 but we don't have that at the moment
18:00 Edgan drawsmcgraw: Better not to give jenkins that power
18:00 Edgan drawsmcgraw: that was my first thought
18:00 geekatcmu Uh, that's almost never the right answer.
18:01 drawsmcgraw geekatcmu: which one?
18:01 geekatcmu Archiva and Artifactory are *built* for what you're trying to do
18:01 Setsuna666 Anyone knows a rought idea of when the 2015.8 version will be released ?
18:01 drawsmcgraw ooo
18:01 geekatcmu Not least because every build (that's not a snapshot) ends up being non-overwritable, which means you can always get $VERSION unless someone gets stupid and wipes out the repo
18:01 Edgan geekatcmu: But are they clustered?
18:01 drawsmcgraw geekatcmu: So Jenkins could put the .war files into Archiva/Artifactory after successful builds?
18:02 geekatcmu drawsmcgraw: yes
18:02 geekatcmu Edgan: no idea
18:02 drawsmcgraw Edgan: clustered?
18:02 geekatcmu I haven't messed with either of them much
18:02 geekatcmu When I built Archiva services, it wasn't.
18:02 geekatcmu Artifactory can use S3 as a backend, so it's got *some* level of HA support built in.
18:02 Edgan drawsmcgraw: Are they designed for HA, or are they designed for a single VM. Then you have to hack around it with things like load balancers and file syncing.
18:03 drawsmcgraw Edgan: Oh, the apps running the .war files?
18:03 geekatcmu I'm reasonably sure you can do simple HA failover with Archiva since it's all filesystem (no db)
18:03 Edgan drawsmcgraw: no Archiva/Artifactory
18:03 drawsmcgraw ah
18:04 drawsmcgraw Edgan: I stand by geekatcmu's answer
18:04 Edgan drawsmcgraw: Here is another idea
18:04 drawsmcgraw I'm going to look at the available File Server backends as well
18:04 drawsmcgraw Edgan: I'm listening :)
18:04 Edgan drawsmcgraw: You are thinking of having salt in master mode deliver war files, right?
18:04 aparsons joined #salt
18:04 drawsmcgraw Edgan: correct
18:04 Edgan drawsmcgraw: that itself is a bad model
18:04 drawsmcgraw Doesn't *have* to be that way. Just the current idea
18:05 Edgan drawsmcgraw: I do it like this.
18:05 drawsmcgraw Edgan: because of app herds?
18:06 Edgan drawsmcgraw: salt in master mode is the provisioner and enforcer of state. It installs software, hold secrets, and creates configuration files.
18:06 Edgan drawsmcgraw: Jenkins is the compiler/code delivery. You start a job, and it compiles code/assets. It logs into the right machines and drops off the results.
18:06 Edgan drawsmcgraw: I have jenkins use salt-ssh for this.
18:07 whytewolf Archiva does not have HA, Artifactory does [in the pro version] comparison found here http://binary-repositories-comparison.github.io/
18:07 drawsmcgraw thanks whytewolf
18:07 Edgan drawsmcgraw: Then I use salt in masterless mode for setting up vagrant instances for development on developers laptops
18:07 Edgan drawsmcgraw: salt master and masterless share code
18:08 Edgan drawsmcgraw: salt-ssh, since it is just used for deployment is completely separate
18:08 drawsmcgraw Edgan: Interesting. So your net result is that a successful Jenkins build is a push to prod?
18:08 Edgan drawsmcgraw: beta, stage, preprod, prod
18:08 drawsmcgraw fair enough
18:08 Edgan drawsmcgraw: One grey area
18:09 XenophonF i think i tracked down my  problems will my shibboleth idp formula to an ABI bug in FreeBSD
18:09 Edgan drawsmcgraw: Lets say you are using ruby, and need a different version of ruby than the system ruby. Plus you might upgrade it at any time. You also don't want system ruby gem versions conflicting with your ruby app.
18:09 XenophonF packages for 10.2 are apparently not backwards compatible with 10.1
18:10 Edgan drawsmcgraw: You could have salt master install your rbenv and app ruby version
18:10 Edgan drawsmcgraw: but then a new deploy could need a newer version of ruby and you have to keep salt master mode in sync with your deploys
18:10 Edgan drawsmcgraw: So instead I installed the ruby versions on the jenkins's slave and make them part of the deploy
18:11 drawsmcgraw Edgan: I see... as in, making sure the environments keep in sync with what the apps need?
18:11 Edgan drawsmcgraw: yes
18:12 drawsmcgraw okay
18:12 drawsmcgraw So for a simple first iteration, what I'm hearing is "Have Jenkins build it, then put the artifact in a location that Salt can fetch it from".
18:13 drawsmcgraw Edgan: Woud that be a sane first approach?
18:13 drawsmcgraw I *really* wish I had set up Swift and S3.....
18:13 Edgan drawsmcgraw: If you do it my way, there would be no fetching it. It would be add salt-ssh to the jenkins job, and it would deploy it where ever you tell it
18:14 baweaver joined #salt
18:14 Edgan drawsmcgraw: It becomes less about keeping artifacts, and more about deploying whatever the latest deploy is
18:14 drawsmcgraw Edgan: Take out the middle man :)
18:14 Edgan drawsmcgraw: yes
18:15 drawsmcgraw Right now I'm more focusing on dev/test/staging
18:15 drawsmcgraw but yes, eventually, of course, it'll end up on prod
18:16 Edgan drawsmcgraw: using github?
18:16 drawsmcgraw Edgan: yes
18:17 drawsmcgraw Can/Should I wire up some web hooks such that, when someone pushes to a branch, that branch gets built by Jenkins?
18:18 Edgan drawsmcgraw: So I create a full user called something like machine-company-name-here, and give it read access to the repos. Then create a deployer user and setup it's authorized_keys via salt in master mode. Then jenkins has the deployer private ssh key
18:18 Edgan drawsmcgraw: yeah
18:18 Edgan drawsmcgraw: what IM do you use?
18:19 drawsmcgraw Edgan: I think we have something similar, an account for Salt in Git
18:19 drawsmcgraw IM? Like Pidgin?
18:19 Bryson joined #salt
18:19 Configio joined #salt
18:19 Edgan drawsmcgraw: hipchat? Slack? Lync? Jabber? OpenFire?
18:19 drawsmcgraw oh! Sorry. Hipchat
18:20 Edgan drawsmcgraw: you can have jenkins poke a web hook on jenkins job completion
18:20 Edgan drawsmcgraw: to keep people informed
18:20 drawsmcgraw Right. I've seen that in our current configs. (Jenkins was built and configured before I came onboard)
18:20 ageorgop joined #salt
18:21 Edgan drawsmcgraw: you can get way fancier, from what I know, with Slack. Which is what we use. We used HipChat before.
18:21 drawsmcgraw Yeah, I use Slack in some other areas but my dayjob is Hipchat
18:22 jeddi joined #salt
18:22 drawsmcgraw Edgan: Alright. A lot to think on and try out. Thanks a bunch for the pointers!
18:23 Edgan drawsmcgraw: In general you don't want salt master mode deploying big files, because you want to keep your salt runs as short as possible. It is also NOT a deployment tool. If it is your application code, you are doing a deployment.
18:23 Edgan drawsmcgraw: you are welcome :)
18:26 ggoZ joined #salt
18:26 ajw0100 joined #salt
18:29 GreatSnoopy joined #salt
18:29 andrew_v joined #salt
18:29 druonysus joined #salt
18:29 wuseldusel joined #salt
18:30 aparsons joined #salt
18:30 dopesong joined #salt
18:30 zerthimon what is the salt-way to distribute a large binary file to minions ?
18:32 Edgan zerthimon: I do all of that with packages, and a package repo
18:33 iggy salt's file server should be able to handle it
18:33 Edgan zerthimon: For corner case files, like binary ssl keys, I don't put them in pillar. I put them in a repo called e_files(external files), and then put that repo inside the salt repo on the salt master
18:34 zerthimon iggy: that means I can only serve such files from /srt/salt ?
18:34 Edgan iggy: salt is really crappy when it has to deal with thousands of files, and file.recurse. Which is actually a different problem.
18:35 geekatcmu salt's file server can do it, but really, you almost always want packages.
18:35 Edgan zerthimon: If you salt repo lives in git, DO NOT put these large files in the salt repo. I have seen people put rpm/debs in the salt repo. It is a bad idea. Git doesn't forget, and you don't want a 20gb salt repo
18:36 zwi joined #salt
18:36 iggy git can be told to forget
18:36 Edgan iggy: yes, but it is better not to have to ask
18:36 geekatcmu sure, at the cost of breaking EVERY fork out there, ever.
18:36 zerthimon unfortunately the file I need to deliver is not a package, just a large data file
18:37 Edgan zerthimon: you can make package SUPER easy with fpm
18:37 geekatcmu or https://joeyh.name/code/alien/
18:37 geekatcmu but fpm is a better idea
18:37 Edgan zerthimon: Feed it a directory or a tarball, and it will make you a deb/rpm
18:37 iggy or just not use packages
18:38 Edgan zerthimon: It can also do gems, python modules, node modules, etc with dependencies
18:38 iggy I don't think OP meant binary as in executable
18:38 iggy I think they just meant !text
18:38 Edgan zerthimon: If this data file is ever changing, or compiled, think about deployment
18:38 zerthimon yeah, I know, just checking is there is a straight way to copy files
18:39 Edgan zerthimon: AWS?
18:39 zerthimon Edgan: nah, not AWS
18:39 iggy you can use the normal file.* states just don't set template: jinja for !text files
18:40 zerthimon iggy: yeah also cp.get_file but all those only work with salt's file server
18:41 zerthimon iggy: i don't wanna put these file under salts file server though
18:41 Edgan Salt really needs a rsync state. file.recurse doesn't scale.
18:41 k00l joined #salt
18:41 k00l hey all, is anyone in today ?
18:41 k00l im back with the n00b questions again..
18:42 Edgan k00l: Don't tell us what you are going to tell us. Just ask.
18:42 iggy https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.rsync.html#module-salt.modules.rsync
18:42 Edgan iggy: yes, module, not state
18:42 k00l lol @ Edgan .. "just get to the F***in point
18:43 bhosmer_ joined #salt
18:43 k00l so im venturing into forumlas and when i added teh formula the formulas path to the root_file: portion of teh master file its started throwing this error
18:43 k00l Specified SLS php in saltenv base is not available on the salt master or through a configured fileserver
18:43 zerthimon iggy: salt.modules.rsync looks promising, I'll take a look, thanks
18:44 iggy k00l: file_roots? paste the relevant bits of the config to gist.github.com
18:44 iggy and your top file and the output of salt-call cp.list_master
18:45 salty-bastard joined #salt
18:45 Edgan k00l: and a "ls -alR" of /srv/salt
18:45 Configio joined #salt
18:45 k00l kk..
18:46 salty-bastard hi, i'm using salt.highstate to call a python script that does install type stuff. if i don't use this argument when calling high state: -v -t 60
18:46 k00l heres the bit of teh /etc/salt/master file http://pastebin.com/0eJH2AS7
18:46 salty-bastard the job returns "Minion did not return. [No response]", even though i can see still being run.
18:46 salty-bastard why does this happen?
18:47 iggy gist supports multiple files per paste
18:47 iggy and doesn't have a bunch of ads
18:47 Edgan salty-bastard: taking longer than 60 seconds
18:47 salty-bastard salt 2015.5.5 (Lithium)
18:47 k00l http://pastebin.com/6PCqddfZ <--- ls -alr
18:48 salty-bastard what if i don't want to timeout, i just want to wait?
18:48 whytewolf k00l: also. the drupal-formula as is. has a TON of dependencies
18:48 shaggy_surfer joined #salt
18:48 Edgan k00l: ls -alR, capital R is important here. does php have an init.sls?
18:49 k00l whytewolf: good to knwo, i fuigerd that i would fight through those errors once i got going but i fear that i am not understanding the instructions when they say to add that path
18:49 k00l negitive no init.sls
18:49 Edgan salty-bastard: drop -t 60
18:49 k00l ill do the cap R now
18:49 Edgan k00l: that would be your problem
18:50 salty-bastard Edgan, yup, i was initially running without the -t <value> but that's when it started misbehaving. ("Minion did not return. [No response]")
18:51 salty-bastard this behavior started after i upgraded the current version via pip. all my guys on on the same salt version.
18:51 whytewolf k00l: basicly. drupal includes php, your php state does not work like the formula that the drupal formula is trying to use. the file location info is fine.
18:51 k00l it was my understanding that as long as the folder has a sls file that is of the same name that the init.sls file was unnessarry
18:52 whytewolf k00l: init.sls is needed if you are using a directory
18:52 k00l noted!
18:52 denys joined #salt
18:52 k00l are there any special requirments for teh init.sls file ?
18:53 Edgan k00l: Best practice is it just references what other sls files to include
18:53 Edgan k00l: see drupal's init.sls
18:53 k00l ahh i see, so it is basiccly a top file in essence
18:53 Edgan k00l: yes
18:53 iggy I wouldn't say that's a best practice
18:54 iggy that might be what you do, but from what I've seen that's not a common thing
18:54 k00l ok, and so here the problem im currentlly experinceing is that the init.sls is missing from the php (and all folders for that matter)
18:54 wuseldusel left #salt
18:55 jhauser joined #salt
18:55 druonysus joined #salt
18:55 druonysus joined #salt
18:55 Edgan salty-bastard: zeromq or raet?
18:56 k00l iggy: how do you use the init.sls file
18:56 danlsgiga joined #salt
18:57 godlike k00l: declaring the directory name in the top.sls file will automatically call the init.sls file
18:57 godlike syntax and usage is the same as for any other sls file
18:57 iggy k00l: to get past the error you can touch php/init.sls
18:58 k00l godlike: curentlly im doing " php.php" to call the php.sls file from the php folder.
18:58 iggy I don't know enough about the drupal formula to know what all you actually need in there
18:58 whytewolf k00l: mv php/php.sls to php/init.sls and you can just call php
18:58 Edgan It may be expecting a certain third party php formula
18:58 danlsgiga hi everyone... I'm trying to grab grains and pillar from a reactor sls file, but it doesn't seem to work... Does it render salt['grains.get'] or salt['pillar.get'] dict variables? Or it just render the data dict variable?
18:59 dopesong joined #salt
18:59 whytewolf it is expecting a third party php formula. but it doens't use anything from it.
18:59 whytewolf just includes it at the start and it's done from there
18:59 Edgan whytewolf: But it expects it to things for it.
18:59 whytewolf Edgan: read the file. it doesn't
19:00 godlike danlsgiga: AFAIK reactor states don't have grains available to them, you can use the mine
19:01 whytewolf there is no reference to anything in a php formula [other than the includes.
19:02 whytewolf with drupal.drush there is
19:02 k00l hey gang , that fixed it .. thanks again for teh help..!!!
19:02 Brew1 joined #salt
19:03 Brew1 joined #salt
19:04 danlsgiga godlike: Ok, so salt['mine.get'] should work in a reactor sls?
19:05 danlsgiga godlike: What I'm trying to achieve is to have any gluster node signal the gluster master node to be attached to the server pool...
19:05 iggy danlsgiga: you realize the reactor runs in the master context, so any grains/pillars will be what is in the master
19:06 danlsgiga godlike: Currently I have an event sent by the minion with the cluster_name, then I want to have a reactor that executes a command in the gluster master and if it succeed add a grain in the minion that sent the event
19:08 sirex joined #salt
19:08 danlsgiga iggy: So, a salt['grains.get'] in a reactor will have access only to the grains assigned to the master?
19:08 godlike danlsgiga: when I tried to use grains, I wasn't even able to
19:08 godlike that's why I got into mine
19:09 godlike danlsgiga: see the bit right before "A complete example" here https://docs.saltstack.com/en/latest/topics/reactor/
19:09 danlsgiga godlike: That's what is happening to myself too
19:09 godlike you should be able to access the mine from the minion, yes
19:09 godlike danlsgiga: it's because of what iggy said, you don't have access to minions' grains/pillar in the reactor
19:10 iggy danlsgiga: add to that the fact that custom modules don't work in that context and you can see it's probably best to do your heavy lifting in a state that gets run by the reactor
19:11 johngrasty Hey. I've got a question for any salt developers. pkgin (the pkgsrc package manager) changed their output. It will be more parseable, but it's a big change. Would it be better to just split the module and have one for <0.7 and one for >0.7?
19:11 danlsgiga iggy: Perfect! Got it! So, the reactor would be basically calling the local.state.apply module and executing an specific state sls in the minion I specify, right?
19:11 Ztyx joined #salt
19:11 linjan joined #salt
19:11 iggy danlsgiga: that's how we do it
19:12 ajw0100 joined #salt
19:13 danlsgiga iggy: Ok... What I'm trying to achieve is to send an event from a minion, the event will fire a reactor sls that will connect to another minion to execute a command and if it succeed I want to add a grain to the minion that sent the event
19:14 danlsgiga iggy: Since the event is async, what I need to do is fire another event from the minion that executes the command?
19:14 iggy probably
19:14 baweaver joined #salt
19:14 unholycrab joined #salt
19:15 Configio joined #salt
19:15 sgargan joined #salt
19:16 danlsgiga iggy: Makes sense... I was struggling trying to use grains and pillars in a reactor with the assumption it'd possible to target any system using the salt['grains.get'] function
19:16 danlsgiga iggy: Thanks for the clarification
19:18 writtenoff joined #salt
19:19 keimlink joined #salt
19:19 laax joined #salt
19:21 Ztyx joined #salt
19:22 danlsgiga godlike: Thanks for your help! ;)
19:23 aqua^c joined #salt
19:23 danlsgiga godlike: One more question... are you passing data from your reactor to your state sls files? How are you doing this?
19:25 Configio joined #salt
19:25 SheetiS you can definitely pass data from the reactor.
19:25 danlsgiga SheetiS: Hmm... using the kwarg: pillar dict?
19:26 SheetiS I do it with a pillar kwarg, yeah: https://bpaste.net/show/edfa0e3184a2
19:26 SheetiS that is to an orchestration
19:26 SheetiS but it would be the same to a state.
19:26 baweaver joined #salt
19:28 rdorgueil joined #salt
19:28 danlsgiga SheetiS: Sweet! But will this be the only pillar dict available to the state sls or it will merge with the pillar already present in /srv/pillars for that specific minion?
19:29 jeddi joined #salt
19:30 SheetiS It will merge
19:30 DammitJim joined #salt
19:32 danlsgiga SheetiS: Perfect! :)
19:32 tehsu_ joined #salt
19:32 danlsgiga SheetiS: Thanks!
19:33 XenophonF left #salt
19:34 SheetiS no problem.
19:35 ventris joined #salt
19:38 ipmb joined #salt
19:38 andygabby joined #salt
19:39 mapu joined #salt
19:40 shiriru joined #salt
19:44 baweaver joined #salt
19:54 kaictl joined #salt
19:57 godlike iggy: about that previous question of mine in reactor... I just did a '{{salt ['mine.get'][(...)}}' inside my reactor sls file but it comes up as an empty dict. is that another thing that can't be done from the reactor?
19:58 tiadobatima joined #salt
19:58 iggy godlike: assuming that the same query works elsewhere, it could be
19:58 iggy I've never actually tried that
19:59 SheetiS I don't think you can do that from the reactor.
19:59 SheetiS what you would do is build the reaction to call a state that then mined the data.
19:59 godlike iggy: yes, 'salt <minion> mine.get [...]' from the CLI works actually
20:00 godlike SheetiS: thanks, I understand now. it actually does seem better to call another state instead of implementing dark magic on my reactor
20:00 Ztyx joined #salt
20:02 SheetiS I have some jinja logic in my reactors to parse the data dict and pass it on as appropriate, but that's about it.  Worst case you could always use an event to trigger another reactor, but I try and not go too crazy with that because I can hurt my brain trying to follow the logic in something like that.
20:04 godlike SheetiS: yes, reactor logic is a bit twisted if you're coming from plain states and stuff. also, this data in particular I am already tracking in grains so I saw no use in re-generating it on the event on the minion
20:04 godlike but yea, another state will do
20:04 druonysus joined #salt
20:04 RedundancyD joined #salt
20:08 PeterO joined #salt
20:08 PeterO left #salt
20:08 PeterO joined #salt
20:09 jodv joined #salt
20:09 sirex1 joined #salt
20:12 TyrfingMjolnir joined #salt
20:16 homeshlice joined #salt
20:16 Diaoul joined #salt
20:17 s_kunk joined #salt
20:21 shiriru joined #salt
20:25 Configio joined #salt
20:25 rdutch left #salt
20:31 opensource_ninja joined #salt
20:35 pm90__ joined #salt
20:36 homeshlice joined #salt
20:36 baweaver joined #salt
20:40 Configio joined #salt
20:41 ggoZ1 joined #salt
20:41 giantlock joined #salt
20:44 mrwboilers If I had a custom grain that gets the value of an environment variable on the minion, would the value of the grain change when the value of the environment variable changed? Or would I need to resync the grain to get it to update?
20:48 Brew joined #salt
20:49 iggy mrwboilers: the minion doesn't cache grains by default
20:51 mrwboilers iggy: thanks! Now I just need to figure out how to actually make a custom grain work! :)
20:51 iggy there are examples in salt-contrib
20:52 Ahlee iggy: you were hte one telling me about master returner, right?
20:52 iggy Ahlee: nein
20:55 Ahlee nice, looks like it' just setting master_job_cache and making sure hte master can do it
20:56 bluenemo joined #salt
20:57 jodv_ joined #salt
20:58 edrocks joined #salt
20:59 indispeq Hello, I just started using ext_pillar in order to bring in enrypted values into the pillar: I have a cmd_yaml that launches find command for all gpg-encrypted files and puts them into the pillar after decrypting.
21:00 indispeq The problem is, this data is now available to all minions
21:00 indispeq Is there a way to target an ext_pillar to only minions who need that pillar data?
21:01 iggy you'd need to handle that on your end
21:01 indispeq how though? with what tool can I then restrict the data?
21:02 indispeq or would I need to write a custom function that is like cmd_yaml, but more restricted?
21:02 pm90_ joined #salt
21:02 iggy the command is passed the minion_id
21:02 mrwboilers I'm sure this is a stupid question, but a custom grain should be shown when calling grains.items, right?
21:02 iggy you'd need to key off that and only return what you want for that minion
21:03 pm90__ joined #salt
21:03 iggy mrwboilers: yes (assuming you've put the python file in _grains and done a sync_all/etc)
21:03 mrwboilers It is in _grains, and it syncs
21:04 indispeq thanks iggy
21:04 mrwboilers It just doesn't return anything unfortunately
21:04 iggy mrwboilers: gist it?
21:04 godlike mrwboilers: can you gist the grain?
21:05 sgargan joined #salt
21:05 Brew joined #salt
21:08 mikeywaites joined #salt
21:08 mrwboilers I might have found the problem.
21:08 Ztyx joined #salt
21:08 mrwboilers I need to try it
21:09 druonysus joined #salt
21:12 druonysus joined #salt
21:12 druonysus joined #salt
21:14 pfallenop joined #salt
21:14 mrwboilers Still not working. Here's the gist with names changed:
21:14 mrwboilers https://gist.github.com/anonymous/87523de0b486d97b5f46
21:17 forrest joined #salt
21:18 mrwboilers then "salt '*' grains.get my_grain" should return the value of the environment variable, right?
21:19 dthorman joined #salt
21:21 mrwboilers Clearly I'm missing a step somewhere.
21:21 mikeywaites joined #salt
21:22 mrwboilers Even when I just modified the grain to be a static value "return {'my_grain':'abc123'}" it still doesn't return anything
21:22 mrwboilers Is there something else that needs to be done other than saltutil.sync?
21:23 ALLmightySPIFF joined #salt
21:24 mrwboilers Ok, so after saltutil.sync_grains, then a state.highstate, it started returning the static value.
21:24 mrwboilers But it still won't return the environment variable via salt.modules.environ.get
21:25 Configio joined #salt
21:25 mrwboilers I'll play around with it some more
21:26 iggy mrwboilers: it returns what? nothing?
21:26 iggy grains have access to __salt__
21:27 mrwboilers return{'my_grain':environ.get('MY_VARIABLE','')} returns nothing
21:27 iggy you should use __salt__['environ.get']('VAR')
21:27 mrwboilers Well, via salt it returns nothing
21:27 shiriru joined #salt
21:27 iggy or just use the normal python way
21:28 mrwboilers I tried os.environ.get first, but same result
21:30 iggy does it show the key in the return (and just not the value)?
21:30 mrwboilers If I just run it in python (call the function and then print the results) it works
21:30 iggy how are you setting the variable?
21:31 mrwboilers after syncing the grain and state.highstate, then trying to see it from grains.get, it doesn't return anything
21:31 mrwboilers It's an environment variable on the minion
21:31 iggy but how are you setting it?
21:31 mrwboilers it's set in /etc/bashrc
21:32 iggy my guess is that the minion doesn't have the env variable set
21:32 mrwboilers yeah, probably
21:32 iggy salt 'minion' cmd.run env
21:32 shaggy_surfer joined #salt
21:33 mrwboilers yeah, it's not there
21:33 mrwboilers Is there a better way to access an environment variable in salt?
21:33 mrwboilers The whole point of the grain is to be able to use this variable in a state
21:33 iggy I wouldn't try to use env variables
21:34 iggy they aren't guaranteed to be set for the minion
21:34 mrwboilers But it would make my life easier.
21:34 mrwboilers I'll figure something else out
21:34 iggy what are you trying to do with it?
21:36 mrwboilers Long story short: I'm trying to run a script via a state (cmd.run) This script requires the environment variable.
21:37 mrwboilers I can tell it what to use in the state, but the variable might not always be the same on each minion.
21:37 mrwboilers So I want to be able to use whatever it's set to on each minion
21:38 iggy what determines the env var on each minion?
21:39 mrwboilers It's determined by which version of some certain software is installed on it
21:41 iggy can you just set the env var (environ.setenv) based on that same version info?
21:42 mrwboilers Where would I do that?
21:42 baweaver joined #salt
21:42 iggy in the state just before the cmd.run?
21:43 mrwboilers That's how the state is configured now
21:43 jhauser joined #salt
21:43 mrwboilers But, in order for me to be able to run this in production, it has to be able to handle that value being different for different servers
21:44 mrwboilers Rather than me just saying use "xxxx" for every minion
21:44 mrwboilers I need something more dynamic
21:44 mrwboilers Salt might not be the best option for what I want to do.
21:45 mrwboilers I'll keep thinking about it though.
21:45 iggy right {% if salt.cmd.run('software --version') == "1.1.0" %}{% set env_var = "something" %}{% else %}{% set env_var = "something else" %}
21:45 Ryan_Lane there's https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.environ.html
21:46 mrwboilers I wish that would work in my case, but the whole situation isn't that sane
21:46 iggy mrwboilers: {% set env_var = salt.cmd.run('grep ENV_VAR /etc/bashrc') %}
21:46 mrwboilers The environment variable isn't an actual version. It's in a date format. It's fairly arbitrary.
21:47 mrwboilers Somethiing along those lines might work
21:48 murrdoc joined #salt
21:48 rockarolla joined #salt
21:50 Configio joined #salt
21:52 mrwboilers iggy: if that was in the state itself, would it use /etc/bashrc on the master, or on each minion?
21:53 iggy minion
21:54 iggy the only thing rendered on the master is (some) pillar data
21:55 mrwboilers iggy: cool. Thanks for your help again!
21:55 iggy good luck
21:56 mrwboilers iggy: thanks, I'll need it. I'm pretty new to salt (as if that isn't obvious)
21:58 protoz joined #salt
22:00 aparsons joined #salt
22:02 UForgotten so I'm having trouble getting node matching to work
22:02 UForgotten For example I want to match node02 through node 20 and node31 through node40. `salt -v -t 20 -C 'E@node0[2-9]* and E@node1[0-9]* and E@node20* and E@node3[1-9*] and E@node40*' test.ping` doesn't seem to work. What am I doing wrong?
22:03 druonysus joined #salt
22:03 whytewolf UForgotten: s/and/or
22:03 druonysus joined #salt
22:04 UForgotten if it was and/or woudln't it have matched at least the first set then?
22:04 whytewolf UForgotten: no. because no minion is matching all of those minionids
22:05 whytewolf it should be all or's
22:05 UForgotten aha. excellent.
22:05 aqua^c joined #salt
22:06 UForgotten thank you for clearing that up.
22:06 mikeywaites joined #salt
22:06 UForgotten now I'll see if I can use that in a nodegroup.
22:07 UForgotten actually
22:08 whytewolf nodegroups typically don't work with much
22:08 UForgotten it looks like its doing something strange. its matching nodes 21-29 with that . it should not
22:08 UForgotten and nodes 41-50
22:09 whytewolf UForgotten: also, you shouldn't need E@ [] and * both work in glob
22:10 mrwboilers left #salt
22:10 UForgotten any idea why it would match more nodes?
22:10 whytewolf honestly i do not see the reason for matching more nodes
22:11 jonlangemak joined #salt
22:11 baweaver joined #salt
22:12 whytewolf humm not sure about this one though. E@node3[1-9*]
22:15 Configio joined #salt
22:34 denys joined #salt
22:37 clintberry joined #salt
22:41 ekristen joined #salt
22:45 druonysus joined #salt
22:45 alainv joined #salt
22:50 Configio joined #salt
22:55 aristedes joined #salt
22:55 aristedes joined #salt
22:56 aristedes left #salt
22:57 joe_n joined #salt
23:01 druonysus joined #salt
23:03 PeterO Hi.. is it possible to chain states like a cmd.run?
23:05 kevinquinnyo joined #salt
23:08 joe_n joined #salt
23:12 Configio joined #salt
23:13 jdubinsky joined #salt
23:18 icflournoy joined #salt
23:18 bfoxwell joined #salt
23:21 ajw0100 joined #salt
23:21 scoates joined #salt
23:24 mosen joined #salt
23:27 pfallenop joined #salt
23:34 JDiPierro joined #salt
23:43 druonysus joined #salt
23:43 druonysus joined #salt
23:47 tafa2 joined #salt
23:49 aqua^c joined #salt
23:51 Configio joined #salt
23:55 bbbryson joined #salt

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