Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-05-10

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

All times shown according to UTC.

Time Nick Message
00:01 ageorgop joined #salt
00:10 jimklo joined #salt
00:11 flowstate joined #salt
00:12 tristianc joined #salt
00:12 guanopho1ic joined #salt
00:15 cpowell joined #salt
00:19 ssplatt joined #salt
00:26 XenophonF aurynn: https://github.com/saltstack/salt/issues/27669
00:26 saltstackbot [#27669]title: Please support ProxyCommand in salt-ssh roster | According to the docs the ssh feature ProxyCommand is not available in roster:...
00:26 XenophonF check out the most recent update by @msummers42
00:26 aurynn XenophonF, thanks; I'd found that too. I'm currently digging through the source to see if I can get salt to pass a custom .ssh/config file in to the shell command
00:26 aurynn so that I can generate that live from some other things
00:33 guanopho1ic joined #salt
00:34 aurynn Looks like probably not
00:36 aurynn ssh does have a -F option, though - it could be a pretty straightforward patch
00:40 west575 joined #salt
00:44 noraatepernos joined #salt
00:45 noraatepernos Can a pillar sls get data from another pillar sls using {{ pillar[‘foo’][‘bar’] }} ?
00:46 aurynn hmm, looks like salt-ssh generates an inline config; may not be that straightforward
00:46 armguy joined #salt
00:54 guanopho1ic joined #salt
00:55 brianfeister joined #salt
01:01 al joined #salt
01:01 iceyao joined #salt
01:03 brianfeister joined #salt
01:05 iceyao_ joined #salt
01:12 flowstate joined #salt
01:13 pipps joined #salt
01:15 guanopho1ic joined #salt
01:19 subsignal joined #salt
01:26 nZac joined #salt
01:30 wangofett joined #salt
01:33 cpowell joined #salt
01:35 hasues left #salt
01:35 guanopho1ic joined #salt
01:37 quasiben joined #salt
01:39 catpigger joined #salt
01:41 aarontc joined #salt
01:46 kevinquinnyo joined #salt
01:46 Vishvendra joined #salt
01:56 guanopho1ic joined #salt
02:00 edrocks joined #salt
02:03 dustywusty joined #salt
02:07 sagerdearia joined #salt
02:13 flowstate joined #salt
02:14 sjorge joined #salt
02:17 guanopho1ic joined #salt
02:30 mage_ joined #salt
02:31 spuder joined #salt
02:34 cpowell joined #salt
02:38 guanopho1ic joined #salt
02:43 iggy noraatepernos: don't rely on it
02:44 jambulance left #salt
02:48 murrdoc joined #salt
02:48 kevinquinnyo djgerm: earlier you asked about gitlab -- there is an execution module and state module out there that wraps the gitlab python api
02:51 kevinquinnyo https://github.com/TotalServerSolutions/salt-state-gitlab  it's a fork from someone else, but he / she didn't accept the pull request.  i think i've added a lot to it sence then but haven't pushed up the changes
02:51 kevinquinnyo if you're still interested
02:52 ekristen joined #salt
02:53 Vishvendra joined #salt
02:53 kevinquinnyo the upstream is broken because gitlab seems to introduce regressions pretty often (or used to anyway)
02:54 armguy joined #salt
02:57 pipps joined #salt
02:57 mowntan joined #salt
02:59 guanopho1ic joined #salt
03:04 onlyanegg joined #salt
03:06 pipps joined #salt
03:12 flowstate joined #salt
03:17 armguy joined #salt
03:19 guanopho1ic joined #salt
03:26 _JZ_ joined #salt
03:26 wych joined #salt
03:28 ninjada joined #salt
03:30 favadi joined #salt
03:38 rem5 joined #salt
03:40 guanopho1ic joined #salt
03:55 spuder_ joined #salt
03:58 fracklen joined #salt
03:58 mowntan joined #salt
04:01 guanopho1ic joined #salt
04:01 hal58th joined #salt
04:02 spuder joined #salt
04:02 edrocks joined #salt
04:04 noraatepernos joined #salt
04:10 jhauser joined #salt
04:12 flowstate joined #salt
04:22 guanopho1ic joined #salt
04:31 evle1 joined #salt
04:33 rockworldmi joined #salt
04:34 estahn hi guys ... is it possible to include an sls with a parameter?
04:34 estahn e.g. set app_name = 'foo'    include: deploy.sls
04:35 rockworldmi hi guys how to push changes from bitbucket to salt server on ubuntu?
04:35 iceyao joined #salt
04:36 estahn rockworldmi i guess you need to use salt-api for that
04:36 cpowell joined #salt
04:36 rockworldmi estahn: ok...
04:36 rockworldmi i will read upon that
04:36 estahn in github you would set up a webhook which calls salt-api
04:36 estahn i guess bitbucket has something similar
04:36 rockworldmi okay..
04:37 estahn but you need to expose an endpoint (in this case salt-api) to the internet
04:37 estahn otherwise you do pull or something
04:38 rockworldmi salt-ssh will do trick ?
04:38 estahn rockworldmi maybe i dont understand what you want to achieve
04:38 estahn rockworldmi do you want to commit/push and it should update on saltmaster automatically?
04:39 rockworldmi estahn: i have one deployment on ubuntu server Django app i need to change one settings.py for increasing haystack timeout but it says this file managed by salt i dont want to mess it up..
04:39 rockworldmi meanwhile reading up on salt from scratch.. i am new to salt..
04:40 estahn ok ... it depends on how saltmaster is setup
04:40 estahn all your saltstates are in bitbucket?
04:41 rockworldmi yes salt states on bitbucket
04:41 estahn do you have a bunch of .sls files there?
04:41 rockworldmi yes
04:41 estahn ok on the saltmaster you need to find out how it pulls those files from bitbucket, either via gitfs, manually or whatsoever
04:42 rockworldmi estahn: even if you guide me to tutorial or documentation link i will read upon that ...
04:42 rockworldmi because of one setting i am unable to update index for elastisearch :)
04:42 ageorgop joined #salt
04:43 rihannon joined #salt
04:43 guanopho1ic joined #salt
04:43 estahn the set up is quite individual ... so you need to check how its being set up
04:43 rockworldmi okay.
04:43 estahn e.g. i'm not using gitfs since it never worked
04:43 estahn or i should say i didn't get it to work :)
04:44 rockworldmi :)
04:45 zenlot6 joined #salt
04:48 rihannon1 joined #salt
04:50 brianfeister joined #salt
04:54 TomJepp joined #salt
05:02 subsignal joined #salt
05:03 estahn is it possible to include an sls with a parameter?
05:03 guanopho1ic joined #salt
05:07 djgerm thanks kevinquinnyo! looks like I need to sharpen up my python skills to get to work for me.
05:10 rihannon joined #salt
05:13 flowstate joined #salt
05:15 mowntan joined #salt
05:19 sauvin joined #salt
05:24 guanopho1ic joined #salt
05:27 manji joined #salt
05:28 iceyao_ joined #salt
05:36 brianfeister joined #salt
05:39 msn joined #salt
05:40 jimklo joined #salt
05:45 guanopho1ic joined #salt
05:47 impi joined #salt
05:54 favadi joined #salt
06:01 garphy joined #salt
06:05 edrocks joined #salt
06:06 guanopho1ic joined #salt
06:11 rdas joined #salt
06:14 flowstate joined #salt
06:15 manji joined #salt
06:16 aw110f joined #salt
06:26 kshlm joined #salt
06:27 guanopho1ic joined #salt
06:27 haaj joined #salt
06:30 haaj_ joined #salt
06:33 iggy estahn: normally you'd use jinja includes with context for that
06:34 iggy https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#macros
06:36 duncanmv joined #salt
06:36 cpowell joined #salt
06:37 quasiben joined #salt
06:39 jimklo joined #salt
06:40 estahn iggy: great, thanks for the link
06:40 armguy joined #salt
06:43 kshlm joined #salt
06:46 fracklen joined #salt
06:47 guanopho1ic joined #salt
06:48 fracklen joined #salt
06:48 NG_ joined #salt
07:00 punkoivan joined #salt
07:01 mariusv joined #salt
07:01 mariusv joined #salt
07:05 subsignal joined #salt
07:06 favadi joined #salt
07:07 iceyao joined #salt
07:08 guanopho1ic joined #salt
07:11 flowstate joined #salt
07:12 KermitTheFragger joined #salt
07:14 jimklo joined #salt
07:16 ninjada_ joined #salt
07:18 guanopho1ic joined #salt
07:19 kshlm joined #salt
07:26 jor joined #salt
07:28 Joene joined #salt
07:32 Ayo joined #salt
07:33 Rumbles joined #salt
07:33 Joene_ joined #salt
07:33 bisleri joined #salt
07:34 dgutu joined #salt
07:35 josuebrunel joined #salt
07:39 SpX joined #salt
07:39 dmaiocchi joined #salt
07:44 rem5 joined #salt
07:45 BigBear joined #salt
07:46 dmaiocchi joined #salt
07:55 jhauser joined #salt
07:56 manji joined #salt
07:57 manji joined #salt
07:59 cpowell joined #salt
07:59 kawa2014 joined #salt
07:59 Miouge joined #salt
08:02 keimlink joined #salt
08:07 edrocks joined #salt
08:09 ivanjaros joined #salt
08:11 ravenx joined #salt
08:11 ravenx i have salt-minion 2015.5.3 and from my salt-master i'm getting npm.boostrap KeyErrors
08:11 ravenx anyone know why?
08:11 s_kunk joined #salt
08:13 garphy joined #salt
08:13 flowstate joined #salt
08:18 GreatSnoopy joined #salt
08:20 rem5 joined #salt
08:28 iceyao joined #salt
08:37 BigBear joined #salt
08:37 ivanjaros joined #salt
08:39 josue joined #salt
08:45 josuebrunel joined #salt
08:48 Joene_ joined #salt
08:49 slav0nic joined #salt
08:49 teatime I lol'd https://imgur.com/UPvQeEz
08:52 mowntan joined #salt
08:52 dmaiocchi joined #salt
08:53 rrei joined #salt
08:53 CeBe2 joined #salt
08:54 manji joined #salt
08:56 josuebrunel joined #salt
08:58 garphy joined #salt
09:01 dmaiocchi joined #salt
09:02 punkoivan joined #salt
09:04 RandyT joined #salt
09:05 haaj joined #salt
09:07 haaj joined #salt
09:07 subsignal joined #salt
09:09 leev joined #salt
09:13 Gabemo joined #salt
09:17 elsmo joined #salt
09:17 haaj joined #salt
09:17 elsmo Hi all - is there a timescale for supporting Ubuntu 16.04 in teh salt repo http://repo.saltstack.com/#ubuntu  ?
09:18 haaj joined #salt
09:19 josuebrunel joined #salt
09:23 jespada joined #salt
09:27 josuebrunel joined #salt
09:28 haaj joined #salt
09:30 mortis anyone know why salt-ssh fail in 2015.8.8 with this:
09:30 mortis [ERROR   ] An un-handled exception was caught by salt's global exception handler:
09:30 mortis LookupError: unknown encoding: -----BEGIN PGP SIGNATURE-----
09:30 mortis using the key with ssh works fine
09:31 mortis im doing: salt-ssh --priv=id_rsa --roster scan x.x.x.0/24 -i -r "/etc/init.d/salt-minion restart"
09:31 josuebrunel joined #salt
09:32 catpigger joined #salt
09:33 AndreasLutro does your id_rsa file actually begin with -----BEGIN PGP SIGNATURE----- ?
09:33 AndreasLutro do you use the pgp renderer in some pillar files or something?
09:36 mortis it begins -----BEGIN RSA PRIVATE KEY-----
09:36 mortis with*
09:37 mortis pgp renderer in some pillar? hmmm no ... havent noticed anyone doing that
09:38 norobot joined #salt
09:39 norobot Hi ! I want to know which host I am applying states to in the salt-states, do you know how you can I get this information ?
09:39 norobot Is there anything like `salt['host']` or else ?
09:40 mortis norobot: minion_id maybe?
09:40 mortis try a: salt-call grains.ls
09:40 mortis on the minion
09:41 mortis salt-call grains.item fqdn
09:41 norobot hum
09:41 norobot but how can I use it in the states ?
09:41 mortis salt['grains.get']('fqdn') ?
09:42 norobot erf
09:42 norobot I think this is it
09:42 norobot thank you :)
09:42 mortis np
09:42 fgimian joined #salt
09:44 norobot is there a document entry where I can retrieve all the variables in the salt dictionnary ?
09:44 norobot documentation entry*
09:45 norobot sry not very clear, where I can know which variables I can retrieve*
09:46 impi joined #salt
09:47 fracklen joined #salt
09:50 estahn joined #salt
09:50 k_sze[work] joined #salt
09:50 k_sze[work] Does salt.states.mount.mounted actually try to modify /etc/fstab?
09:51 iceyao_ joined #salt
09:53 fracklen joined #salt
09:58 pipps joined #salt
10:00 cpowell joined #salt
10:02 traph joined #salt
10:02 traph hi all
10:03 traph how does salt minion push mine info to the master? if you can point me to the place in the source I can check?
10:06 TyrfingMjolnir joined #salt
10:08 subsignal joined #salt
10:09 edrocks joined #salt
10:11 mowntan joined #salt
10:20 lorengordon joined #salt
10:35 pipps joined #salt
10:35 MadHatter42 joined #salt
10:36 Miouge joined #salt
10:36 haaj joined #salt
10:37 sroegner joined #salt
10:41 rdas joined #salt
10:49 fracklen joined #salt
10:49 Miouge joined #salt
10:49 jav joined #salt
10:50 DanyC joined #salt
10:53 fracklen joined #salt
10:54 ravenx is it possible to run multiple modules on one salt command
10:54 ravenx such as ` salt '*' git.describe git.current_branch /pathto/repo
10:58 fracklen joined #salt
11:02 garphy joined #salt
11:06 fracklen joined #salt
11:07 impi joined #salt
11:10 rmnuvg joined #salt
11:11 kbaikov joined #salt
11:11 fracklen joined #salt
11:13 teryx510 joined #salt
11:15 josuebrunel joined #salt
11:16 flowstate joined #salt
11:18 teryx510 joined #salt
11:18 richerVE joined #salt
11:20 richerVE Hello. Is there a way to specify a dependency between whole sls state files?
11:23 amcorreia joined #salt
11:23 dijit you can have a 'require' block which requires an sls file.
11:24 dijit google: salt ordering states
11:24 dijit there's a page on it.
11:33 jespada joined #salt
11:38 norobot richerVE: you could trick that with making a fake state that requires/watch everything in the sls file
11:39 norobot and require the fake states between sls files I guess
11:45 Rumbles_ joined #salt
11:48 Rumbles joined #salt
11:48 tuxx joined #salt
11:48 ninjada joined #salt
11:51 impi joined #salt
11:53 mage_ any idea how can I add pillar data for specific minions in a Reactor sls file?
11:54 mage_ in my case I'm creating jails on the fly and I would like to add a dns name, so I need to add the ip -> name on my local unbound server ..
11:55 richerVE dijit: Yes I read that, I'm thinking more about an sls requiring another sls. I tried it with the same syntax and it is not working
11:55 Joene_ joined #salt
11:56 richerVE norobot: that's exactly the main problem if I have an sls file with 10 states how can I "require" all of them?
11:57 norobot richerVE: without making more effort that a require_all ? I am not sure it is really possible, for me making a fake state would do the trick, but you would need to maintain the list of requirements for that fake state :/
11:57 richerVE What I'm doing right now is tracking the dependencies inside the sls files and another sls I'm including the main sls file and "extend" a require for the last state in the dependency chain
11:58 haaj joined #salt
11:59 norobot Yeah it's the same then if you have a dependency chain with a final state
11:59 josuebrunel joined #salt
11:59 richerVE For example in Puppet you can force a resource (state) or class (sls) to depend on another resource or class with an special syntax: class1 -> class2
12:00 norobot oh wait
12:00 norobot https://github.com/saltstack/salt/issues/33035
12:00 saltstackbot [#33035]title: What does it mean to "require an entire sls file"? | The [requisites documentation](https://docs.saltstack.com/en/latest/ref/states/requisites.html#require-an-entire-sls-file) says the following:...
12:00 norobot you can do that
12:00 norobot require an sls file
12:00 norobot but you need to include it before
12:01 norobot then in your requirement you can make : - sls: your_sls_file
12:01 richerVE norobot: yep but only with a require in a state not in a whole sls file. I mean an sls file, with all its states, require another sls file, with all its states
12:02 norobot hum
12:02 norobot I don't know if it's relevant
12:03 norobot but maybe if you make a fake state with the minimum order possible and the requirement to the other sls file
12:03 norobot maybe that could do the trick
12:04 norobot but i don't know if the order is local to the sls file or global
12:05 richerVE https://gist.github.com/richerve/4606ff764d08ac8f33cdd8213beb9c71
12:07 richerVE the main idea is to have the possibility to force order between sls files and not only between states or states and sls
12:08 richerVE in the Puppet example, they simply append a "require" in every resource (state) when the execution set is forming
12:09 norobot ok
12:09 norobot I don't know any solution for t hat in Salt :/
12:09 norobot what is the application in which you need that ?
12:09 norobot just for curiosity
12:11 richerVE It is not really a big deal for me, but it would be nice to have. I always try to create the formulas in a way that I can use every component (sls) in an independent way if possible
12:11 edrocks joined #salt
12:11 richerVE and then reuse that same components when I want to use the formula as a whole
12:12 richerVE for example I'm implementing an icinga2-formula that can handle the cluster communication with x509 certificates
12:13 tracphil joined #salt
12:13 dijit in jinja, if I have a value with a newline what's the cleanest way to strip that newline?
12:14 richerVE so I have a state icinga2.pki.ca, another icinga2.pki.cert and I want to create an icinga2.pki.master that first apply all the states in icinga2.pki.ca and then all the states on icinga2.pki.cert
12:14 dijit {{ var | replace("\n", "") }} ?
12:18 richerVE dijit: that is usually what I do
12:19 dijit hm, feels wrong, but sure!
12:19 dijit :)
12:19 dijit thanks for the feedback richerVE
12:19 west575 joined #salt
12:21 pdayton joined #salt
12:23 ferbla joined #salt
12:23 rem5 joined #salt
12:25 wendall911 joined #salt
12:26 jacksontj joined #salt
12:30 fracklen joined #salt
12:31 remyd1 joined #salt
12:32 remyd1 Hi. Is it possible to give argument to an orchestrate state https://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html ?
12:33 tuxx hey guys.. i removed an entry from my pillar file of a certain host but when i do pillar.items i still see it there
12:33 tuxx i grepped through all the files, its absolutely impossible that it cld still be there
12:33 mage_ tuxx: did you refresh pillar ?
12:33 tuxx mage_: yea i did
12:34 mage_ with: salt somehost saltutil.refresh_pillar ?
12:34 tuxx mage_: yea exactly
12:34 remyd1 tuxx: sync_all ?
12:34 tuxx remyd1: tried that too
12:34 fracklen_ joined #salt
12:34 tuxx it seems broken  :/
12:34 tuxx i'm going to remove the /var/cache/salt dir next
12:35 mage_ did you check external pillar too ?
12:35 tuxx mage_: not sure what that is?
12:36 tuxx from the looks of it, we are not using external pillars
12:36 mage_ check ext_pillar in your conf files
12:36 remyd1 tuxx: did you change the location of your pillars ?
12:36 tuxx remyd1: nope :/
12:37 tuxx http://www.pastebin.ca/3596144 <- i removed user1 from the pillar files but its still being shown aparently
12:37 tuxx remyd1: we're also using syndics .. but i get the same behaviour when logging into the syndic
12:37 mage_ tuxx:     - users.mylist vs 'pillar/users/list.sls':
12:37 mage_ (mylist vs list)
12:37 tuxx mage_: ah well.. its just a replication of my setup...
12:38 tuxx mage_: in the real setup that is correct
12:38 mage_ pastebin the "real" setup
12:39 patrek joined #salt
12:40 ssplatt joined #salt
12:42 teryx510 joined #salt
12:43 subsignal joined #salt
12:45 dendazen joined #salt
12:50 tracphil joined #salt
12:51 ninjada joined #salt
12:55 mowntan joined #salt
12:56 subsignal joined #salt
12:57 Joene_ joined #salt
13:00 scoates joined #salt
13:01 estahn joined #salt
13:04 MadHatter42 joined #salt
13:09 pdayton joined #salt
13:11 mage_ how can I do the following "when a state execute on machine A, add some pillar data in machine B, and execute state x" ?
13:12 mage_ I already fired a custom event on machine A but I wonder how could I add pillar data ..
13:12 remyd1 orchestrator
13:12 remyd1 mage_: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html
13:12 mage_ I wonder how
13:13 mage_ I've already read that one
13:13 traph can you use "py" as a templating engine?
13:13 mage_ I don't see how to pass some data from A to B's pillar
13:14 subsigna_ joined #salt
13:14 mage_ the documentation is very light :(
13:14 mage_ only basic examples are shown
13:15 edrocks joined #salt
13:18 remyd1 mage_: I had the same problem just one hour ago and I did not solve this through salt. I do not know how to do that either
13:18 ALLmightySPIFF joined #salt
13:18 remyd1 If you could set pillar exactly as you can set a grain it would be easy
13:19 remyd1 like this http://paste.debian.net/683216/
13:24 cpowell joined #salt
13:27 flowstate joined #salt
13:27 haaj joined #salt
13:31 josuebrunel joined #salt
13:36 quasiben1 joined #salt
13:36 zsoftich joined #salt
13:38 zsoftich I am trying to do state.apply and I keep getting pillar failed to render messages and that I should check the master log...the master log has no information. any ideas?
13:40 quasiben joined #salt
13:42 ivanjaros joined #salt
13:42 rrei run with '-ldebug' to inspect the rendering debug messages
13:42 kevinquinnyo joined #salt
13:42 rrei it was extremely helpful for me
13:43 haaj_ joined #salt
13:44 edrocks joined #salt
13:45 flowstate joined #salt
13:46 wangofet1 joined #salt
13:49 zsoftich hrmm...looks like it just wont run from the master. doing a salt-call state.sls seems to work
13:52 zsoftich so I'll need to do: salt '<tgt>' cmd.run 'salt-call state.sls <mystate>'
13:53 zmalone joined #salt
13:56 Rumbles joined #salt
13:59 zsoftich hrmm...it looks like it might have been related to my master being on 2015.8.8 and minion on 2015.5.5
13:59 flowstate joined #salt
14:00 zsoftich the state updates the salt-minion, and after it ran I can now do state.apply from the master
14:00 haaj joined #salt
14:00 jerredbell joined #salt
14:01 _JZ_ joined #salt
14:02 AdamSewell joined #salt
14:03 AdamSewell when using a state, like with the slack integration, is the "slack-message:" required for the state to work? https://docs.saltstack.com/en/latest/ref/states/all/salt.states.slack.html
14:06 far-blue joined #salt
14:06 iceyao joined #salt
14:07 far-blue Hi all, I'm just setting up saltstack and am I correct that if I setup a gitfs fileserver_backend then I can put the files usually in /srv/salt in the git repo instead?
14:07 zsoftich slack.post_message(name, channel, from_name, message, api_key=None) <-- no default so yes
14:07 zsoftich AdamSewell: ^^
14:10 ivanjaros joined #salt
14:10 hasues joined #salt
14:10 hasues left #salt
14:11 AdamSewell zsoftich, what do you mean no default?
14:11 mpanetta_ joined #salt
14:11 zsoftich like a python function...the first four arguments are positional and are required
14:12 zsoftich the fifth api_key has a default value of None and is optional
14:12 keltim joined #salt
14:13 flowstate joined #salt
14:13 zsoftich also in the docs it says "the following are required" and then lists the first four.
14:13 cyborg-one joined #salt
14:14 farblue joined #salt
14:15 farblue anyone able to tell me whether I’m correct in thinking I can put my topfile and other sls files in git and use the gitfs fileserver_backend?
14:15 tharkun joined #salt
14:15 evle1 joined #salt
14:15 knine joined #salt
14:16 farblue or is the git setup only for delivering template files etc. to minions?
14:17 zsoftich farblue: I had used teh gitfs backend a while back for my state files
14:18 farblue zsoftich: thanks :) And is there a way to ‘ls’ the files so I can see if Salt has been setup correctly?
14:19 ssplatt joined #salt
14:20 garphy joined #salt
14:20 zsoftich it looks like files are cached at /var/cache/salt/master/gitfs
14:20 farblue ah, cool :)
14:20 zsoftich but I don't know if there is a way to pre-cache the data
14:22 zsoftich looks like remote fileserver backends are updated every 60 seconds
14:22 farblue yeah, I saw that mentioned somewhere :)
14:22 traph has anyone used "py" as a templating engine for config files instead of jinja?
14:23 Knuta traph: yes.
14:23 gtmanfred traph: i don't think py is really meant to be a template renderer
14:23 fracklen joined #salt
14:24 zsoftich farblue: sudo salt-run fileserver.update <-- manual refresh
14:24 gtmanfred there are 2 kinds of renderers, template and structure
14:24 traph gtmanfred, well, it seems easier to write an advanced haproxy management state with py, using more of python, then with jinja
14:25 Rumbles joined #salt
14:26 gtmanfred i guess if all you return back is a string in the file, it might work
14:26 Knuta I use it for generating a config file
14:26 gtmanfred Knuta: do you have an example?
14:27 gtmanfred i guess you could just have a def run(): that returns the string you want to be the file
14:27 gtmanfred and that might work, i have never tried it, always found jinja to work just fine
14:28 Knuta gtmanfred: yes, that's basically what I do
14:28 gtmanfred interesting, so you are just using .format instead of using jinja templating
14:28 gtmanfred ?
14:30 flowstate joined #salt
14:30 Knuta https://gist.github.com/knuta/6958ccd023bbcde748c795d4cb3d414d is the salt config, https://gist.github.com/knuta/2a4112262c8ceff3fb93e7d29c883188 is the template
14:31 Knuta You'll notice that I have significantly more logic than formatting
14:32 jerredbell1 joined #salt
14:33 TooLmaN joined #salt
14:34 harkx joined #salt
14:34 gtmanfred sure, i was just speaking in general
14:34 Knuta that being said, gtmanfred appears to be right in that it's not meant for this, considering that https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed only lists jinja, mako, and wempy, not py as supported template languages
14:34 gtmanfred yeah, you can totally do what you are doing, it just isn't really a templating renderer
14:35 gtmanfred but if you can make it work, more power to you
14:35 sbueringer joined #salt
14:35 Knuta well, doing stuff that's not officially supported can also come back and bite you in future versions ;-)
14:35 zsoftich I've used the pyobj state renderer before to do all the heavy lifting and then just pass variables to jinja templating
14:38 gtmanfred i need to sit down and try the pyobj renderer, it just reminds me too much of chef :(
14:39 zsoftich I'm only using it for complex state files, ones where you end up doing things with jinja that you really shouldn't be doing
14:39 gtmanfred yeah
14:40 gtmanfred doing python in the .sls files instead of jinja is super appealing, i don't really have any jinja, and i removed all requires from my openstack deployment states
14:40 gtmanfred but, i still have this one state https://github.com/gtmanfred/openstack-salt-states/blob/liberty/keystone/setup.sls
14:41 zsoftich hehe...that certainly isn't terrible :)
14:41 gtmanfred i dislike it though :)
14:41 flowstate joined #salt
14:41 Ayo joined #salt
14:42 Knuta I have to support multiple architectures, and that really creates a mess
14:42 gtmanfred oh, booo
14:42 gtmanfred glad all my i686 is dead
14:43 Knuta "In this OS the package is called this, and the config files are here. In this other one they are completely different."
14:43 gtmanfred and most clouds don't have anything but x86_64
14:44 Knuta I have some ia64, some powerpc, some debian, some ubuntu, some freebsd and an OS X machine we haven't bothered setting up salt on yet ;-)
14:44 Knuta there's both i686 and amd64 as well, of course
14:44 gtmanfred the team did a bunch of work on osx for 2016.3
14:44 gtmanfred which could drop the last rc any day now... just a couple blockers left
14:45 Knuta not concerned about salt support, more that lots of our states were written for linux/bsd
14:45 gtmanfred yup, that will be fun
14:45 gtmanfred good luck :P
14:46 gtmanfred maybe make a seperate environment just for mac, that lives by itself. and doesn't require jinja for all the other thigns
14:46 gtmanfred i gotta go move some stuff out of my old apartment o/
14:46 adelcast joined #salt
14:46 simon_c joined #salt
14:47 Knuta I wish there was a more shorthand way of providing os-specific alternatives, but then again, I understand that that isn't a priority. These days people usually standardize on a single OS.
14:49 Knuta Back in the cfengine 1.x days it was quite normal to have both Solaris and Linux in the same environment, for example, so it was a priority to make that work in a shorthand way. Everything else in cfengine 1.x was a pain, though :-P
14:49 losh joined #salt
14:50 LotR Knuta: you should check out how formulas do the multi architecture/OS thing
14:50 Knuta formulas?
14:52 simon_c Knuta: https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html but don't ask me how they work. still trying to get my head around them.
14:52 hunmaat how do i update gitfs pillars? saltutil.refresh_pillar doesn't update the fs, i need the analogue of fileserver.update runner
14:52 LotR https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html and https://github.com/saltstack-formulas
14:52 flowstate joined #salt
14:52 hunmaat but the gitfs docs mentions filserver only
14:52 noraatepernos joined #salt
14:54 mapu joined #salt
14:54 hunmaat salt-run git_pillar.update
14:54 hunmaat found at https://codeclimate.com/github/saltstack/salt/salt/runners/git_pillar.py ...
14:54 utah joined #salt
14:56 Rumbles joined #salt
14:56 Knuta LotR: oh, that stuff. Yes, I know that, but it's just a lot more verbose than going "(ubuntu|debian)" above your thing, like cfengine did. I wasn't aware of base dictionaries, though, that makes things a little cleaner :-)
14:58 rihannon joined #salt
15:02 dfinn joined #salt
15:03 simon_c speaking of forumlas... I've got a local copy of the openssh one now, and added the directory to teh file_root, and on an test state file, got "include openssh". It applies OK with no pillar data defined. However, if I add some pillar data, (say, openssh:port:22 ) then it fails with "Rendering SLS 'base:openssh' failed: Jinja variable 'list object' has no attribute 'service'"
15:03 simon_c what am I not understanding about using pillars & formula ? (probably lots)
15:03 zmalone1 joined #salt
15:04 toastedpenguin joined #salt
15:05 Brew joined #salt
15:05 stooj joined #salt
15:06 west575 joined #salt
15:07 borgstrom joined #salt
15:07 Brew joined #salt
15:09 josuebrunel joined #salt
15:09 numkem joined #salt
15:10 gh34 joined #salt
15:14 bv185047 joined #salt
15:14 simon_c when using forumla, do I need to put *everything* from the pillar.example file into my pillar, or only the things that are different ?
15:14 djgerm left #salt
15:17 josuebrunel joined #salt
15:17 flowstate joined #salt
15:21 `chris joined #salt
15:23 ageorgop joined #salt
15:23 bv185047 Use the source, simon_c
15:24 bv185047 Does anyone else notice that running salt in masterless mode with many git remotes results in EXTREMELY slow execution time?  It seems that each git remote is being refreshed for each parsed .sls file.
15:25 simon_c bv185047: Dificult when I know no python. I'm trying to sue the docs, but they aren't clear in how to use forumla and pillars to break out config data from the states.
15:26 west575_ joined #salt
15:26 simon_c s/sue/use/
15:26 spuder joined #salt
15:27 jimklo joined #salt
15:29 XenophonF simon_c: i use pillar.example as a way to lint my formula
15:30 XenophonF so i give an example of every possible knob with suitable comments
15:30 XenophonF think of it as a way to explain to the uninitiated how to use your formula
15:30 XenophonF without them having to RTFS
15:30 XenophonF even though they should
15:32 londo joined #salt
15:32 simon_c XenophonF: I'm very happy to RTFM, but RTFS is (imho) for developers, not sys-admins :) If I wanted to learn another language I would probably have learned ruby and be using chef by now. Instead I picked up Puppet. But right now, I'm trying to convert my puppet setup to salt.
15:32 simon_c XenophonF: so, in theory I should just be able to put the pillar items I want into my pillar data, and ignore the rest of them that are in pillar.example ?
15:33 simon_c or does it depend on each formula ?
15:33 brotatochip joined #salt
15:35 bv185047 simon_c -- Unfortunately, documentation of salt (especially the contributed formulae) is woefully incomplete.  If you want something that "just works" in a fully documented manner, I think that saltstack is not your answer. At least, not yet.
15:35 gmoro joined #salt
15:36 pid1 joined #salt
15:36 kbyrne joined #salt
15:37 simon_c bv185047: yeh, I get the docs for forumla aren't always 100% (expecially the more esoteric forumla). At the moment I'm just trying to get to grips with the right way of splitting my data from my states, and *thought* looking at how forumla do it (like the openssh one) woudl be the right way. But, maybe not.....
15:38 simon_c :)
15:40 zsoftich this is driving me nuts: Invalid characters in peer name. u'glusterfs02.dal01.example.net' contains characters not supported by this cloud provider. Valid characters are: a-zA-Z0-9._-
15:40 zsoftich ^^ in glusterfs.peered
15:41 zsoftich 2015.8.8 for minion/master
15:42 flowstate joined #salt
15:42 simon_c bv185047: from my POV, it certainly needs a clear example of how to put your "default" data into pillars, and then override those defautls from specific nodes. Because that is what I'm struggling with at the most basic level (beofre even looking at how forumla are organised)
15:42 cyborg-one joined #salt
15:42 bv185047 I feel your pain.
15:47 bv185047 simon_c -- For sysadmins wishing to use newly-developed software, RTFS is absolutely a requirement.  (sorry)  I've been a sysadmin since 1989 and that's been fairly consistent throughout my entire career.
15:49 simon_c bv185047: fair point. And I guess it's about familiarity with the language the project is in. I have no probelm looking at complex bash & perl scripts. I took a quick look at python many years ago, and decided that any language that made whitespace syntatcically important wasn't going to go anywhere. (doh !!)
15:50 PeterO joined #salt
15:53 fxhp joined #salt
15:54 flowstate joined #salt
15:57 saiyen2002 joined #salt
15:58 gimpy2984 joined #salt
16:00 dezertol joined #salt
16:01 saiyen2002 I wish to update packages on minions that have a sepcific OS. I am thinking that i can do this with the grain information. Something along the lines of salt -G 'osfinger:Ubuntu-14.04' pkg.install openssh-server
16:01 WKNiGHT joined #salt
16:01 saiyen2002 could someone please tell me the correct syntax ?
16:01 simon_c left #salt
16:01 Brew1 joined #salt
16:03 artemz joined #salt
16:04 edrocks joined #salt
16:06 flowstate joined #salt
16:07 onlyanegg joined #salt
16:09 belak joined #salt
16:09 belak Is there a good way to ensure a file exists and create it with a command if it doesn't?
16:09 kevinqui1nyo file.managed ?
16:10 kevinquinnyo with 'makedirs: True' option to emulate mkdir -p
16:10 belak kevinquinnyo: I don't think you can use that to run a command...
16:10 belak I need to use fallocate
16:11 kevinquinnyo oh i see
16:12 kevinquinnyo i guess you could do a cmd.run with something like:  test -f /path/to/file || fallocate ...
16:13 belak Or using unless: test -f path
16:13 kevinquinnyo that works too
16:13 kevinquinnyo and maybe for you, test -s ?
16:13 kevinquinnyo since you're using fallocate
16:13 kevinquinnyo test the size of the file
16:13 belak Good call
16:13 belak It's for generating a swapfile on my DO boxes
16:15 Vishvendra joined #salt
16:18 punkoivan left #salt
16:19 alvinstarr joined #salt
16:19 flowstate joined #salt
16:21 adelcast left #salt
16:22 writtenoff joined #salt
16:25 brianfeister joined #salt
16:27 adelcast joined #salt
16:28 cableninja__ joined #salt
16:29 west575 joined #salt
16:30 ecdhe joined #salt
16:33 flowstate joined #salt
16:37 foundatron hello I was trying to use logic in a pillar that would test for a minion's subnet, and then set a value. but my test seems to only test the salt master's ip's subnet:  {% if salt['network.in_subnet']('10.16.0.0/12') %}
16:38 foundatron How do i write a test in pillar for the salt minion's subnet rather than the master's?
16:39 manji joined #salt
16:39 kevinquinnyo foundatron: sounds like a good job for the saltmine
16:40 DanyC joined #salt
16:40 foundatron Can you not do this type of test in a pillar?
16:41 kevinquinnyo i'm not sure -- anything i use with pillar is either just flat data, or complicated logic i have created an ext_pillar that calls an internal rest API to get it's values, so i've never tried to put anything complicated directly in a pillar file
16:41 kevinquinnyo someone else might know
16:41 flowstate joined #salt
16:41 foundatron here's a gist of what i was trying to do: https://gist.github.com/foundatron/beb01fe0d582d41fdac557c049eb6ff4
16:43 viq joined #salt
16:43 DanyC hi all, any idea if there been a change on latest v 2015.8.8 with regards to states rendering ? as i get "SLS x does not render to a dictionary" but over cli module get no error getting the output of pillar.items
16:44 kevinquinnyo foundatron: i wonder if it would be better to use the subnet matching option in your pillar's top.sls https://docs.saltstack.com/en/latest/topics/targeting/compound.html
16:44 foundatron kevinquinnyo: looking at the salt mine now, that seems like little bit of overkill for this problem
16:45 kevinquinnyo foundatron: yeah it probably is, your example file clarified that
16:46 cyborg-one joined #salt
16:46 kevinquinnyo sorry i use saltstack in such an atypical way i have trouble answering basic questions people have .  maybe someone else knows.  my instinct is that you should try to do the targeting on the cidr inside the top.sls
16:46 cyborglone joined #salt
16:47 CeBe joined #salt
16:47 foundatron the nice thing about doing it in the pillar ..or what i was thinging...was for when calling pillar items in jinja templates
16:48 cnk joined #salt
16:48 punkoivan joined #salt
16:50 brotatochip joined #salt
16:50 west575_ joined #salt
16:50 XenophonF simon_c: whether you need to specify everying listed in pillar.example depends on the formula
16:53 XenophonF oh i guess he left :(
16:54 XenophonF foundatron: a custom grain might be a better fit for you
16:54 foundatron is this test not possible to run on the minion?
16:55 XenophonF definitely!
16:55 XenophonF just not in pillar
16:55 foundatron bummer in the summer man
16:55 west575 joined #salt
16:55 XenophonF nah, you just have to use the right tool for the job
16:55 XenophonF pillars get rendered on the master before being sent to the minion
16:55 foundatron ok, I will move this logic to top file
16:56 XenophonF that's probably the right place to put it
16:56 XenophonF you can use jinja or mako or whatever in the top file to make the syntax a little happier
16:56 XenophonF or use a custom grain
16:57 foundatron le sigh
16:57 XenophonF e.g., you can write a "subnet" grain that returns "extranet" for one network range, "intranet" for another, and so on
16:57 foundatron I thought i was being soo clever
16:57 XenophonF hang on let me look at your gist
16:58 Joene_ joined #salt
16:58 XenophonF dude, custom grain
16:58 XenophonF it'll be easy
16:58 impi joined #salt
16:59 foundatron Never made one before
16:59 foundatron guess that's my next hour
16:59 pdayton joined #salt
16:59 XenophonF foundatron: here's one i wrote for windows, so a touch more complicated than what you need
16:59 XenophonF https://raw.githubusercontent.com/irtnog/active-directory-formula/master/_grains/windows_installation_type.py
17:00 ageorgop joined #salt
17:01 foundatron gracias
17:01 XenophonF now, when you write a grain, you can't rely on other grain data
17:01 XenophonF you have to DIY
17:01 XenophonF so here's the source code for the ipv4 grain
17:01 XenophonF https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L1575
17:02 XenophonF very simple, just a call to salt.utils.network.ip_addrs()
17:02 XenophonF same as above, but for the ipv6 grain
17:02 XenophonF https://github.com/saltstack/salt/blob/develop/salt/grains/core.py#L1605
17:03 pipps joined #salt
17:04 pdayton1 joined #salt
17:05 foundatron Thanks
17:05 XenophonF here, take a look at the source for salt.modules.network.ip_in_subnet(), too
17:05 XenophonF https://github.com/saltstack/salt/blob/develop/salt/modules/network.py#L826
17:06 foundatron This seems like a good long term solution
17:06 foundatron I'm going to do a the top file stuff right now to unblock my coworkers
17:06 foundatron and then go make that grain
17:06 XenophonF so you can very simply call salt.utils.network.ip_addrs(), followed by a call to salt.utils.network.in_subnet(), and return whatever values you want from there
17:07 XenophonF to deploy, put your custom grain into /usr/local/etc/salt/states/_grains/
17:07 XenophonF or whatever it is on linux
17:07 spuder_ joined #salt
17:07 mowntan joined #salt
17:08 XenophonF run saltutil.sync_grains
17:08 mowntan joined #salt
17:08 mowntan joined #salt
17:08 XenophonF or run a highstate
17:13 N-Mi joined #salt
17:13 fracklen joined #salt
17:16 flowstate joined #salt
17:16 keltim joined #salt
17:20 pdayton joined #salt
17:21 quasiben joined #salt
17:21 Adam__ joined #salt
17:22 flowstate joined #salt
17:24 cnk joined #salt
17:25 minot joined #salt
17:30 aw110f joined #salt
17:33 dmaiocchi joined #salt
17:36 pipps joined #salt
17:36 flowstate joined #salt
17:42 morissette joined #salt
17:43 jerredbell joined #salt
17:46 spuder joined #salt
17:47 kingscott joined #salt
17:49 flowstate joined #salt
17:51 west575 joined #salt
17:51 ALLmightySPIFF joined #salt
17:52 kingscott I'm trying to use the salt formula join-domain-formula. in file_roots i have "- /srv/formulas/join-domain-formula". and in /srv/salt/top.sls i have "- join-domain-formula" When i target the correct minion and run state.highstate i get the error. "no matching sls found for 'join-domain-formula' in env 'base'" Any thoughts?
17:53 ALLmight_ joined #salt
17:53 s_kunk joined #salt
17:54 nickfrez joined #salt
17:56 quasiben joined #salt
17:58 kingscott joined #salt
17:59 quasiben1 joined #salt
18:03 SpX joined #salt
18:03 kingscott joined #salt
18:03 kingscott I'm trying to use the salt formula join-domain-formula. in file_roots i have "- /srv/formulas/join-domain-formula". and in /srv/salt/top.sls i have "- join-domain-formula" When i target the correct minion and run state.highstate i get the error. "no matching sls found for 'join-domain-formula' in env 'base'" Any thoughts?
18:04 edrocks joined #salt
18:07 XenophonF did you restart salt-master after changing the file_roots setting?
18:07 XenophonF from a minion you could run cp.list_master to verify the contents of the base env
18:07 XenophonF "salt-call cp.list_master"
18:07 CeBe1 joined #salt
18:10 edrocks joined #salt
18:12 noraatepernos joined #salt
18:13 brianfeister joined #salt
18:15 Trauma joined #salt
18:15 jimklo_ joined #salt
18:17 punkoivan joined #salt
18:20 scottjk2 joined #salt
18:22 zmalone1 joined #salt
18:23 ssplatt how does the preseed key process work for salt-cloud?  i see the part in bootstrap.sh where it generates teh keys but i don’t see any code transfering the keys from the master to the minion.  does the minion just see that it’s keys are already there so it downloads them and doesn’t regenerate it’s own when it starts?
18:23 ageorgop joined #salt
18:24 mowntan joined #salt
18:29 jhauser joined #salt
18:29 flowstate joined #salt
18:32 punkoivan1 joined #salt
18:34 scottjk2 I'm trying to use the salt formula join-domain-formula. in file_roots i have "- /srv/formulas/join-domain-formula". and in /srv/salt/top.sls i have "- join-domain-formula" When i target the correct minion and run state.highstate i get the error. "no matching sls found for 'join-domain-formula' in env 'base'" Any thoughts?
18:34 GreatSnoopy joined #salt
18:36 brianfeister joined #salt
18:36 woodtablet joined #salt
18:37 keltim scottjk2, file_roots?
18:37 ssplatt hey scottjk2, could you post a gist or pastebin or something with more code?
18:37 keltim n/m
18:38 ssplatt show us your full file roots, and your top.sls
18:40 scottjk2 https://github.com/plus3it/join-domain-formula
18:40 scottjk2 following this.
18:40 scottjk2 When using a formula, once you clone it from git, do you need to copy the init.sls to /srv/salt?
18:42 nickfrez joined #salt
18:42 scottjk2 joined #salt
18:42 pipps joined #salt
18:43 honestly I clone all my formulas to /srv/saltstack/formulas and then symlink them in /srv/saltstack/states
18:44 honestly you generally need more than just the init.sls
18:45 bv185047 joined #salt
18:45 scottjk2 so you just run...? ln -s /srv/saltstack/formulas/(formula) /srv/saltstack/states?
18:46 honestly cd /srv/saltstack/states; ln -s ../formulas/$formula
18:47 scottjk2 thanks
18:47 honestly there's often a pillar.example if the formula uses pillar, copy that into your pillar obviously
18:47 ageorgop joined #salt
18:48 racooper joined #salt
18:48 scottjk2 do you change the pillar.example to $formula.sls?
18:48 scottjk2 in the /pillar directory?
18:48 bv185047 Does anyone use git for ext_pillar and gitfs_remotes?
18:49 bv185047 scottjk2 -- you can certainly copy the pillars.example into a pillar file, but you should then edit it.  The examples are rarely intended to be used as-is.
18:50 scottjk2 Thanks.
18:50 jimklo joined #salt
18:51 s_kunk joined #salt
18:51 s_kunk joined #salt
18:53 Jaremy joined #salt
18:54 Jaremy Curious why putting: salt-test:
18:54 punkoivan joined #salt
18:55 Jaremy salt-test: '10.0.10.0/24': - match: ipcidr -salt-test
18:55 Jaremy That in proper YAML formatting is not targeting those minions in the IP block and for the life of me cannot figure out why
18:56 aw110f joined #salt
18:59 subsignal joined #salt
19:00 PeterO joined #salt
19:04 ssplatt scottjk2: i’d bet what you need to do is restart the master after you add teh new file_root config
19:04 pipps joined #salt
19:05 sdemura joined #salt
19:06 bv185047 What does "Could not LazyLoad roots.init" mean?
19:11 kingscott joined #salt
19:20 peters-tx I've been trying and trying to create a custom Grain but can NOT seem to get it to work at all....
19:22 mapu joined #salt
19:22 pipps joined #salt
19:22 stooj joined #salt
19:23 flowstate joined #salt
19:24 peters-tx I've created a /srv/salt/_grains directory and placed a file in there, although I do not know how to get the file exec'ed by Salt
19:24 pdayton joined #salt
19:24 noraatepernos joined #salt
19:24 peters-tx I've followed the documentation at https://docs.saltstack.com/en/latest/topics/targeting/grains.html
19:26 peters-tx Under the section "Grains are easy to write, and only need to return a dictionary. A common approach would be code something similar to the following:"  There is no mention of what filename to use
19:26 peters-tx I've also configured the reactor that pushes updates for grains.  Nothing seems to work.  I guess it doesn't?
19:30 flowstat_ joined #salt
19:35 pipps joined #salt
19:35 peters-tx Ahh krap, I think I figured it out
19:36 peters-tx Running salt-call saltutil.sync_grains -l all    on a test minion, I *finally* got it to list a custom grain
19:36 peters-tx Had to name it *.py
19:36 peters-tx Otherwise it was invisible
19:36 peters-tx That was NOT mentioned anywhere in the docs.
19:37 Jaremy I figured it out, I missed the last # in the pillar_root :X
19:46 sdemura I'm having issues with gitfs remotes. I want to use the salt.gitfs.pygit2 stack formula. I created a saltstate that includes salt.gitfs.pygit2, and I set my top file to call my custom saltsate. When I run 'state.highstate' I get this: Specified SLS salt.gitfs.pygit2 in saltenv devel is not available on the salt master or through a configured fileserver
19:47 rem5 joined #salt
19:47 sdemura But if I did 'salt 'minion' state.apply salt.gitfs.pygit' it works fine.
19:47 viq joined #salt
19:50 flowstate joined #salt
19:51 giany left #salt
19:51 Jaremy sounds like its not in your top file or that env isnt defined in /etc/salt/master
19:52 Jaremy Just from what I experienced earlier with some things.
19:53 tracphil joined #salt
19:55 rem5 joined #salt
19:55 ferbla joined #salt
19:57 sdemura joined #salt
19:57 UtahDave joined #salt
20:00 pipps joined #salt
20:01 viq joined #salt
20:01 stooj joined #salt
20:01 flowstate joined #salt
20:03 cwyse joined #salt
20:04 brotatochip joined #salt
20:05 Ayo joined #salt
20:06 edrocks joined #salt
20:07 josuebrunel joined #salt
20:11 rem5 joined #salt
20:14 flowstate joined #salt
20:21 rem5 joined #salt
20:22 josuebrunel joined #salt
20:23 DammitJim joined #salt
20:23 punkoivan joined #salt
20:23 edrocks joined #salt
20:24 ajw0100 joined #salt
20:25 sdemura Is there a way to make a gitfs_remote repo available to all environments? For example I want https://github.com/saltstack-formulas available to my base and devel branches.
20:29 XenophonF sdemura: yes
20:29 XenophonF sdemura: for example see https://github.com/irtnog/salt-pillar-example/blob/master/salt/example/com/init.sls
20:30 XenophonF you can see that i'm using salt-formula to manage my salt master config
20:31 XenophonF to simplify things, i want the same set of formulas active in all environments
20:31 west575 joined #salt
20:31 keltim I wish there was support for writing grains in whatever language you wanted
20:31 XenophonF so i put the list of formulas into a variable, "formulas" at line 206
20:32 sdemura Thanks XenophonF. I will take a look!
20:32 XenophonF then i specify the list of environments + list of formulas at line 327
20:33 XenophonF salt-formula handles cloning the repos (or updating them as appropriate)
20:33 XenophonF and it inserts references to the cloned repos into file_roots as appropriate
20:33 XenophonF there are other ways to manage this, i'm sure
20:33 XenophonF but if you're already using salt-formula, this seems simplest
20:34 sdemura okay cool. lots of stuff in here!
20:35 XenophonF yeah if you're interested, check out the rest of https://github.com/irtnog/salt-states and https://github.com/irtnog/salt-pillar-example
20:36 XenophonF that's the mockup i use at home to develop salt states and whatnot for work
20:36 XenophonF unfortunate i wasn't given the go-ahead to publish our salt-state repo at work :(
20:37 ssplatt am i missing the state where i can mv or cp -R all files in a directory over to a new directory on the local filesystem?  i see file.copy but that complains when i try to do directories.  and i see file.recurse which only works from salt://.
20:37 XenophonF ssplatt: what's wrong with cmd.run?
20:37 ssplatt basically, i want to extract an archive then force it to overwrite another directory with its contents.
20:37 ssplatt cmd.run feels dirty.
20:37 XenophonF or archive.extracted?
20:38 ssplatt the archive outputs like thing-version, but i just want /thing/
20:38 ssplatt and /thing/ already exists, so a simple rename isn’t going to work,
20:39 XenophonF what format archive?
20:39 ssplatt i’m thinking the only way to do it is cmd.run.
20:39 ssplatt its a zip
20:40 ssplatt output from git.  i was tryign to make options in my state to do from_zip, from_git, or from_pkg
20:40 XenophonF hm
20:40 XenophonF Unix or Windows?
20:40 ssplatt nix
20:41 XenophonF unzip /opt/thingy-version, symlink /opt/thingy to /opt/thingy-version
20:41 XenophonF or at least that's how i've done it in the past
20:41 ssplatt .  /thing/ is actually a fs mount
20:42 ssplatt bleh i guess i’ll jsut cmd run
20:42 XenophonF sorry
20:43 XenophonF cmd.run + if_exists might DTRT
20:43 XenophonF or the unless kwarg
20:45 keimlink joined #salt
20:47 garphy joined #salt
20:50 urda joined #salt
20:52 noraatepernos joined #salt
20:54 jad_jay_work joined #salt
20:54 pipps joined #salt
20:55 manji joined #salt
20:56 dmaiocchi joined #salt
20:58 ALLmightySPIFF joined #salt
21:02 pipps joined #salt
21:02 subsignal joined #salt
21:03 rem5 joined #salt
21:03 rem5 joined #salt
21:05 woodtablet joined #salt
21:08 bVector how often are grains recalculated by default?
21:08 fracklen joined #salt
21:09 brianfeister joined #salt
21:09 UtahDave bVector: only when the minion is restarted or if you run  saltutil.refresh_grains
21:10 dezertol joined #salt
21:13 bVector I see that saltutil is a module, what is the recommended way to refresh grains as part of a state run?
21:14 bVector module.run seems like it would work, but may not be the best way
21:16 zmalone joined #salt
21:18 fracklen joined #salt
21:21 flowstate joined #salt
21:27 Kruge Anyone know if it's possible to set a route in a salt-cloud profile, please?
21:27 ajw0100 joined #salt
21:31 flowstate joined #salt
21:37 woodtablet1 joined #salt
21:52 jfroot joined #salt
21:53 armguy joined #salt
21:54 tracphil joined #salt
21:54 woodtablet joined #salt
21:57 subsignal joined #salt
22:03 pipps joined #salt
22:07 pipps joined #salt
22:18 teryx510 joined #salt
22:22 jmedinar joined #salt
22:23 jmedinar Hi guys I am trying to execute a state to send a message to #Slack but I am getting the following error....
22:23 jmedinar AttributeError: 'ReactWrap' object has no attribute 'slack'
22:24 jmedinar salt-master 2015.8.8.2 (Beryllium)
22:24 jmedinar salt-minion 2015.8.8.2 (Beryllium)
22:25 jmedinar and this is the state
22:25 jmedinar slack-message:
22:25 jmedinar slack.post_message:
22:25 jmedinar - channel: '#somechannel'
22:25 jmedinar - from_name: webhookbot
22:25 jmedinar - message: 'some message'
22:25 jmedinar - api_key: https://hooks.slack.com/services/XXXXXXXX/YYYYYYYYY/ZZZZZZZZZZZZZZZZZZZZZZZ
22:27 jmedinar actually this is a reactor not a state
22:27 kevinquinnyo1 joined #salt
22:29 pipps joined #salt
22:32 pipps joined #salt
22:34 woodtablet joined #salt
22:35 UtahDave jmedinar: let me get an example for you.     Also, next time try using a pastebin or gist for multiline code. It makes it easier for us to help
22:37 UtahDave change   slack.post_message    to   local.slack.post_message
22:37 UtahDave you'll also need a target since the slack module is an execution module that's run on a minion
22:38 zenlot joined #salt
22:38 jmedinar trying...
22:43 pipps joined #salt
22:45 woodtablet anyone see their salt-minions die alot ?
22:46 woodtablet i have a feeling that our firewall temporarily cut the connection between the minions and the master
22:47 woodtablet example error on the minion: http://pastebin.com/5VaJumJA
22:47 cilkay woodtablet: That'
22:47 cilkay s one of the reasons we use masterless minions.
22:48 woodtablet cilkay - but i like the remote control... alot
22:48 cilkay We don't have much control over the firewall policies of our customers.
22:48 cilkay We still have lots of control over the minions. We execute states via cron at 0410 every day and @reboot.
22:49 jmedinar UtahDave It seems to be working better now the problem I face is "invalid_auth" which I believe is related to my api_key
22:49 pipps joined #salt
22:49 jmedinar Only thing that I have from slack is the Hook URL provided but not sure how to get the Api
22:50 jmedinar thanks anyway will look into that !
22:50 woodtablet cilkay - i just used it to pull out which hosts needed a new rhel patch this morning and was able to prioritize their patching in a couple of lines. it was really simple and awesome, so i would like to retain it
22:50 woodtablet so is this a known problem if you lose temporary connections ?
22:51 cilkay I don't know since I've never deployed any other way other than masterless.
22:51 cilkay And the same thing you just did today with the RHEL patching can be done with masterless minions, too.
22:51 UtahDave woodtablet: have you tried modifying the keepalive settings in the master config?
22:52 ninjada joined #salt
22:53 woodtablet UtahDave: i have messed with settings on the minions like so: http://pastebin.com/E1QquEWp
22:53 woodtablet UtahDave: I have no keepalive settings on the master though
22:53 ninjada joined #salt
22:57 woodtablet UtahDave: oh, i just found out my coworker bounced the master. is there a way to auto-magically have my minions reconnect?
22:57 UtahDave woodtablet: the minions should reconnect after a few seconds
22:58 woodtablet UtahDave: about half did not, with the error in that original paste bin
22:58 woodtablet UtahDave: and that was about 4 hours ago
22:59 UtahDave hm. that's a normal message when the master rotates its AES key.  The minion should request a new AES key and the next command should work.
22:59 woodtablet UtahDave: suggestions ? on how to avoid this in the future ? (other than not rebooting the master
22:59 woodtablet UtahDave: oh
22:59 UtahDave woodtablet: what version of salt is your master and minions?
23:00 woodtablet UtahDave: salt-master - 2015:8.3 salt-minion: 2015.8.8
23:02 woodtablet UtahDave: ah, is it because my minion, auth_tries =1 ?
23:02 UtahDave Hm.  That should work.  The minions should reconnect after just a few seconds.   If you log into one of the minions what is it's state?
23:02 UtahDave woodtablet: very likely
23:03 woodtablet UtahDave: the minion says running, but the error in the logs is the one in the paste bin. Ok, ill try changing the auth_tries.
23:07 noraatepernos joined #salt
23:09 woodtablet UtahDave: thanks so much Dave =D
23:09 keimlink_ joined #salt
23:10 UtahDave woodtablet: did that work?
23:10 sagerdearia joined #salt
23:11 woodtablet UtahDave: i wont be able to tell until after i restart all my minions, but i am hopeful that it will work on future reboots, because right now even without a change a restart of a broken minion just works
23:12 UtahDave woodtablet: ok, good.  Let me know how that goes.
23:12 flowstate joined #salt
23:14 rhand joined #salt
23:16 bshelton2291 joined #salt
23:23 UtahDave left #salt
23:24 aqua^c joined #salt
23:27 dendazen joined #salt
23:27 ajw0100 joined #salt
23:30 PeterO joined #salt
23:31 pipps joined #salt
23:31 jghazally joined #salt
23:35 hasues joined #salt
23:35 hasues left #salt
23:45 ahammond what are people using for unified targeting? (categorizing machines for pillar/top.sls and salt/top.sls, commandline targeting, etc) And specifically how do people link this up with a cmdb?
23:52 sagerdearia joined #salt
23:53 AdamSewell joined #salt
23:54 ajw0100 joined #salt
23:54 hexa- joined #salt
23:54 cpowell joined #salt
23:55 darix joined #salt
23:57 ssplatt joined #salt

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