Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-06-10

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

All times shown according to UTC.

Time Nick Message
00:02 iggy ahammond: cherrypy and saltnado seem to be the best supported
00:02 iggy we use saltnado
00:04 murrdoc no regex in jinja right ?
00:06 rgarcia_ joined #salt
00:06 murrdoc ansible has jinja filters that let u regex
00:09 smcquay joined #salt
00:10 murrdoc1 joined #salt
00:12 ageorgop joined #salt
00:13 aqua^c joined #salt
00:16 moos3 joined #salt
00:22 murrdoc joined #salt
00:27 * iggy slowclaps
00:35 murrdoc ?
00:49 ITChap joined #salt
00:52 premera joined #salt
00:54 Nazca joined #salt
00:55 Berty__ joined #salt
01:00 murrdoc so salt-call blocks
01:01 murrdoc there salt-call event.fire run highstate
01:01 murrdoc is better
01:01 murrdoc then salt-call state.highstate
01:02 cheus joined #salt
01:04 moos3 joined #salt
01:04 ITChap Hi,
01:05 ITChap I am some issue with the file server is there anyway to troubleshoot this ?
01:05 ITChap using -l debug doesn't give a lot of info about what the file server part
01:05 ITChap is doing
01:07 ITChap It looks like the path used is good but the file that I try to push to the minion is not found
01:09 murrdoc joined #salt
01:09 otter768 joined #salt
01:10 murrdoc try -l trace
01:15 ITChap I get something weird
01:16 ITChap it looks like my file is renamed: http://pad.yohdah.com/331/e78e3ec3-1616-4908-8cb8-7d7a933b2717
01:17 ITChap what is the name field used for ?
01:18 toddnni joined #salt
01:21 david_an11 joined #salt
01:22 mdupont joined #salt
01:23 ITChap Any idea why a file could be "not found" when it actually is present and with the good rights ?
01:39 beauby joined #salt
01:45 TheoSLC joined #salt
01:45 TheoSLC joined #salt
01:45 tobie_ joined #salt
01:45 tobie_ howdy
01:45 TheoSLC joined #salt
01:45 toddnni joined #salt
01:46 tobie_ I was wondering if anyone knows of a salt module which allows me to do restful queries
01:46 TheoSLC joined #salt
01:46 tobie_ such as using the requests modules in the backend and I provide the url, http method, etc
01:46 mosen I thought maybe netapi had something resty
01:47 mosen sorry, not sure
01:47 TheoSLC joined #salt
01:47 tobie_ that I can use in a state?
01:47 mosen oh right
01:47 tobie_ does my question, make sense?
01:47 TheoSLC joined #salt
01:47 mosen so the state actually makes the REST request on the minion?
01:48 tobie_ so I have an external service that the minion has to notify via a restful call
01:48 TheoSLC joined #salt
01:48 mosen ok
01:49 TheoSLC joined #salt
01:49 tobie_ do not know if is a good idea for a module.. any thoughts?
01:49 tobie_ right now I pass a python script that basically does that and I just have the minion execute it
01:49 TheoSLC joined #salt
01:50 mosen you could easily write a state in python if you already have a python script :)
01:50 TheoSLC joined #salt
01:50 Not_ joined #salt
01:50 TheoSLC joined #salt
01:51 tobie_ k, I just wanted to know if there was one out there already  ;)
01:51 TheoSLC joined #salt
01:51 tobie_ but yea I will take it all the way to a state
01:51 tobie_ and see how practical it becomes
01:51 Aidin joined #salt
01:52 tobie_ maybe I can submit it as a proposed module...  :D
01:52 TheoSLC joined #salt
01:52 tobie_ Thanks mosen
01:52 mosen ahh not sure, can check the salt modules index
01:53 mosen http://docs.saltstack.com/en/latest/salt-modindex.html
01:53 mosen theres a http module
01:53 mosen that's all i can see
01:54 tobie_ awesome thanks for the link
01:54 tobie_ will look into the internals of it see how it goes
01:55 tobie_ yea looks promising
01:55 tobie_ salt '*' http.query http://somelink.com/ method=POST             data='<xml>somecontent</xml>'
01:56 CheKoLyN joined #salt
01:58 ChesFTC Can anybody recommend a module to handle editing xml files?
01:59 hasues joined #salt
02:00 hasues left #salt
02:04 mosen ChesFTC: nope, but XPath replace sounds like a good module idea :)
02:06 desposo joined #salt
02:08 beauby joined #salt
02:12 Twiglet joined #salt
02:13 ashp joined #salt
02:13 philpep joined #salt
02:13 johngrasty joined #salt
02:16 julez joined #salt
02:17 Furao joined #salt
02:17 iggy ChesFTC: augeas maybe?
02:18 ChesFTC iggy: That's not a bad idea
02:18 ChesFTC mosen: Maybe some other time when I'm less rushed - I've done a few PRs this year already :)
02:18 iggy there's an augeas module
02:18 ChesFTC Yup, I know - I just didn't think to look at it
02:18 iggy never used it personally
02:19 ChesFTC To be fair, augeas is not that googleable
02:19 ChesFTC When you're looking for salt+xml+file+editing
02:19 ChesFTC Thanks for the suggestions
02:21 clintberry1 joined #salt
02:23 favadi joined #salt
02:30 moos3 joined #salt
02:33 Aidin joined #salt
02:36 TyrfingMjolnir joined #salt
02:36 edulix joined #salt
02:40 mapu joined #salt
02:41 beauby joined #salt
02:49 timoguin joined #salt
03:07 Aidin joined #salt
03:09 beauby joined #salt
03:10 otter768 joined #salt
03:10 writtenoff joined #salt
03:12 ecerulm joined #salt
03:22 Aidin joined #salt
03:30 baweaver_ joined #salt
03:32 Aidin joined #salt
03:32 stoogenmeyer__ joined #salt
03:37 tzero joined #salt
03:50 cberndt joined #salt
03:57 AdobeTom joined #salt
04:01 moos3 joined #salt
04:02 TyrfingMjolnir joined #salt
04:05 joeto joined #salt
04:08 aqua^c joined #salt
04:16 DaveQB A question on pillars.....in the top.sls pillars file, once you target a minion you then point them to a file with the values. Can one not have the values directly in the top.sls file?
04:18 stanchan joined #salt
04:25 spookah joined #salt
04:34 forrest joined #salt
04:39 zer0def joined #salt
04:46 moos3 joined #salt
04:47 ramteid joined #salt
04:48 murrdoc joined #salt
04:49 murrdoc u know what i really need from salt
04:49 murrdoc a simple way to 'run this state, when u come back up'
04:49 murrdoc or even a run this event
04:49 cberndt joined #salt
04:53 epcim joined #salt
04:57 mosen murrdoc: when the minion reconnects to master?
04:58 borgstrom joined #salt
05:00 big_area joined #salt
05:03 hasues joined #salt
05:03 hasues left #salt
05:04 aqua^c joined #salt
05:06 big_area joined #salt
05:07 Not_ joined #salt
05:10 moos3 joined #salt
05:11 borgstrom joined #salt
05:11 otter768 joined #salt
05:15 big_area joined #salt
05:15 Not_ joined #salt
05:17 borgstrom joined #salt
05:20 saifi joined #salt
05:24 big_area joined #salt
05:29 aqua^c joined #salt
05:31 vandemar joined #salt
05:40 evle1 joined #salt
05:41 malinoff joined #salt
05:42 borgstrom joined #salt
05:43 big_area joined #salt
05:49 gladiatr joined #salt
05:54 favadi joined #salt
05:56 catpigger joined #salt
05:58 colttt joined #salt
06:02 aqua^c joined #salt
06:04 moos3 joined #salt
06:06 che-arne joined #salt
06:07 AndreasLutro joined #salt
06:07 Hipikat_ joined #salt
06:14 onorua joined #salt
06:16 aqua^c joined #salt
06:17 moos3 joined #salt
06:20 aqua^c joined #salt
06:22 viq joined #salt
06:22 aqua^c joined #salt
06:28 hasues joined #salt
06:28 hasues left #salt
06:30 DaveQB A question on pillars.....in the top.sls pillars file, once you target a minion you then point them to a file with the values. Can one not have the values directly in the top.sls file?
06:31 AndreasLutro DaveQB: no
06:32 DaveQB AndreasLutro: Thanks. Bugger :(
06:38 bhosmer_ joined #salt
06:39 sporkd2 joined #salt
06:39 collinanderson joined #salt
06:41 KermitTheFragger joined #salt
06:43 aberdine can pillars be dynamically modified? I'm using a formula and would like to be able to update config as new minions come online
06:44 stoogenmeyer__ joined #salt
06:44 aberdine or do I get the master to write out pillar data and include the new data that way?
06:49 mosen theres probably a few ways to do it
06:49 kawa2014 joined #salt
06:49 mosen pillars can use a non yaml backend that's writable.. or you can use salt mine functions to collect information that gets written back out to states
06:52 cberndt joined #salt
06:53 al joined #salt
06:59 thalleralexander joined #salt
07:01 Ztyx joined #salt
07:03 denys joined #salt
07:03 eseyman joined #salt
07:04 aqua^c joined #salt
07:04 aberdine thanks mosen - I'll look into mine first then the backend
07:07 mosen aberdine: I dont know anything about Reactor but maybe theres an event on the master for when a key becomes accepted? that might be a possibility
07:08 aberdine yes, that's a thought. What I want to do is when a salt minion comes online add a static dhcpd allocation via the dhcpd state - I just can't think of a way to git the data into pillar
07:12 otter768 joined #salt
07:12 DjDeaf joined #salt
07:13 aqua^c joined #salt
07:16 mosen aberdine: you could maybe collect the mac address via salt mine (and the hostname), then iterate through the mined minions to produce the static allocations. I'm making a lot of assumptions there :)
07:19 aberdine sounds like a good starting point mosen.
07:19 Romlok joined #salt
07:20 aberdine I'd like to keep things in salt as much as possible
07:20 mosen yeah there would be a lot of ways to collect the info outside of salt, and then bring it back in via salt
07:34 markm_ joined #salt
07:34 chiui joined #salt
07:38 linjan joined #salt
07:41 ndrei joined #salt
07:43 fredvd joined #salt
07:44 lb1a joined #salt
07:44 epcim joined #salt
07:47 fivmo joined #salt
07:53 baweaver joined #salt
07:57 saifi joined #salt
08:00 toddnni joined #salt
08:07 ndrei joined #salt
08:07 IanVorn joined #salt
08:10 IanVorn joined #salt
08:11 IanVorn joined #salt
08:13 s_kunk joined #salt
08:13 s_kunk joined #salt
08:14 ingslovak joined #salt
08:25 stoogenmeyer__ hey guys, is it possible for one state to require an entire state file to finish before executing ?
08:25 babilen it is
08:25 babilen require: - sls: ...
08:25 babilen (I consider that a code smell most of the time)
08:26 stoogenmeyer__ oh cool
08:26 stoogenmeyer__ what's code smell
08:26 stoogenmeyer__ as in a big no no ?
08:26 babilen No, not a big no no, but something that's, quite literally, fishy
08:27 babilen So, if you want to avoid people swinging stinky trouts at you, you'd rather spell out the *actual* requirements.
08:28 stoogenmeyer__ I dont know, it seems like a good way to abstract what would be going on in the required state
08:28 AndreasLutro I think it's far better to include the sls, then require the specific state(s) you depend on
08:29 babilen That's exactly what I'd recommend too
08:29 babilen But it really isn't a big no no. If you think it makes sense and allows for the right level of granularity then that's how it is.
08:32 stoogenmeyer__ ummm so what happens if I state.sls a state that includes another state? Would that implicitly state.sls the included state as well?
08:33 AndreasLutro yes
08:33 babilen (and with proper requirements in place you can even use state.sls_id)
08:34 AndreasLutro did not know about sls_id
08:34 AndreasLutro that is perfect!
08:34 stoogenmeyer__ yea that's new for me too
08:35 babilen I use it quite often, but it necessitates that you spell out the requirements of the state in toto
08:35 babilen Well, quite often is stretching it, but I do use it :)
08:35 stoogenmeyer__ ok one more, if I do a salt '<minion_id>' state.highstate would that also do a refresh of the grains and pillar before ?
08:37 lothiraldan joined #salt
08:37 Grokzen joined #salt
08:41 birdzhang joined #salt
08:41 birdzhang Hi
08:41 birdzhang Anybody use saltpad?
08:44 babilen stoogenmeyer__: It does, yeah
08:45 babilen birdzhang: Assume "yes" and ask your real question (unless that is your real question in which case: Assume "yes")
08:46 birdzhang yes
08:46 birdzhang https://github.com/tinyclues/saltpad/issues/60
08:46 birdzhang i post my issue here
08:48 moos3 joined #salt
08:51 babilen That looks like a genuine bug and probably needs to be looked at by a saltpad developer. You could check the git history for changes to saltpad/utils.py concerning the "result" handling. Maybe an earlier version works.
08:53 birdzhang Thanks,let me try
08:53 lothiraldan joined #salt
08:53 lothiraldan Hi @birdzhang we use it at tinyclues (I'm the creator of it)
08:54 lothiraldan I've seen your issue but didn't have time to answer it yet
08:55 birdzhang :)
08:55 lothiraldan Do you use a specific job cache? Or do you use the default local cache on master?
08:56 birdzhang local cache on master
08:57 lothiraldan Ok, I need to make a choice which job cache will I support on which version
08:57 lothiraldan Because the job cache selected influenced the API response format and data
08:58 stoogenmeyer__ (http://pastebin.com/zUX5jQi7) why does the permissions state doesn't get executed?
08:58 lothiraldan @birdzhang Could you please add on the ticket that you use the local cache on master?
09:07 bluenemo joined #salt
09:10 birdzhang i'm a freshman at salt :(
09:11 birdzhang how to add on the ticket ?
09:13 otter768 joined #salt
09:16 Berty_ joined #salt
09:21 babilen birdzhang: You should be able to edit your issue report (or just add a new comment if you can't find it)
09:22 julez joined #salt
09:23 impi joined #salt
09:33 linjan joined #salt
09:33 N-Mi joined #salt
09:33 N-Mi joined #salt
09:36 lothiraldan joined #salt
09:42 saltuser joined #salt
09:49 saltuser What would be the preferred place to keep minion-id? /etc/salt/minion file or /etc/salt/minion_id file?
09:50 fivmo joined #salt
09:52 losh joined #salt
09:57 moos3 joined #salt
10:08 lothiraldan joined #salt
10:11 babilen saltuser: Neither ;) -- I'd use https://github.com/saltstack-formulas/salt-formula and keep it in /etc/salt/minion.d/f_defaults.conf (cf. https://github.com/saltstack-formulas/salt-formula/blob/master/salt/files/minion.d/f_defaults.conf#L68 )
10:13 Aikar joined #salt
10:14 toddnni joined #salt
10:17 ndrei joined #salt
10:18 saifi joined #salt
10:18 saltuser babilen: As I understand that script puts the minion_id to /etc/salt/minion file
10:24 cheine_ joined #salt
10:27 babilen saltuser: How so?
10:28 gladiatr joined #salt
10:29 saltuser Well, this format id: {{ cfg_minion['id'] }}  goes for minion conf file
10:30 saltuser On the other hand, that script is more complicated than my brain capacity seems to handle :P
10:33 saltuser But still, as I understand, that state generates minion config file on the fly and it all seems to end up in /etc/salt/minion file
10:34 stoogenmeyer_ joined #salt
10:35 hopefulNick joined #salt
10:36 Edgan joined #salt
10:38 babilen saltuser: Yeah, but the file that is being managed there is /etc/salt/minion.d/f_defaults.conf not /etc/salt/minion. What is done is a "simple" file.recurse in https://github.com/saltstack-formulas/salt-formula/blob/master/salt/minion.sls#L11 which simply renders all templates in https://github.com/saltstack-formulas/salt-formula/tree/master/salt/files/minion.d to /etc/salt/minion.d on the minion
10:38 babilen The .d files override the otherws
10:42 cberndt joined #salt
10:43 scoates_ joined #salt
10:43 saltuser At first glance this way of configuration seems overly complicated
10:49 fivmo left #salt
10:51 keimlink joined #salt
10:53 giantlock joined #salt
10:58 aqua^c joined #salt
11:06 zer0def joined #salt
11:12 _JZ_ joined #salt
11:14 otter768 joined #salt
11:21 ndrei joined #salt
11:23 lothiraldan joined #salt
11:23 onorua joined #salt
11:28 zerthimon joined #salt
11:29 disaster123 joined #salt
11:30 disaster123 I have a command defined which watches a directory. via watch - file: dir - but this only works if a specify a require_in in the rule who adds a file to the directory. Is this fine?
11:35 disaster123 OK to answer myself it works with wildcards like *
11:36 rubenb Hi, I just ran a "salt-key -Dy", and noticed it lists all the keys twice at "Key for minion x deleted"
11:36 michelangelo joined #salt
11:38 rubenb s/keys/minion-ids/
11:39 premera joined #salt
11:41 hopefulNick joined #salt
11:41 CeBe joined #salt
11:42 Auroch joined #salt
11:44 puravida joined #salt
11:45 johndeo joined #salt
11:49 ndrei joined #salt
11:50 fivmo joined #salt
11:53 fivmo left #salt
11:54 klocek joined #salt
11:55 anotherZero joined #salt
11:56 ecerulm joined #salt
11:59 aqua^c joined #salt
11:59 denys joined #salt
12:00 ndrei joined #salt
12:01 dRiN joined #salt
12:02 moos3 joined #salt
12:02 slav0nic joined #salt
12:02 slav0nic joined #salt
12:06 elfixit joined #salt
12:08 elfixit joined #salt
12:09 DammitJim joined #salt
12:10 giantlock joined #salt
12:10 APLU joined #salt
12:12 benw joined #salt
12:19 hasues joined #salt
12:29 johndeo Is there a way to install a minion on windows from the saltmaster (linux) without internet connection on the minion?
12:30 badon_ joined #salt
12:33 johndeo I see there's this bootstrap_psexec way, but this would require having psexec available. Bootstrap_exec btw, gives this file not found error while I manually installed it. So now I'm left wondering where this error comes from. From not having found psexec on the filesystem, or the file not found error is not related the psexec location.
12:34 arount joined #salt
12:35 julez joined #salt
12:36 hasues left #salt
12:37 TooLmaN joined #salt
12:40 lothiraldan joined #salt
12:44 kawa2014 joined #salt
12:45 emaninpa joined #salt
12:46 TyrfingMjolnir joined #salt
12:47 saifi joined #salt
12:47 giantlock joined #salt
12:50 ndrei joined #salt
12:52 sporkd2 left #salt
12:53 hopefulNick joined #salt
12:59 cberndt joined #salt
13:01 subsignal joined #salt
13:03 stoogenmeyer_ hi, is there a way when doing an import from a map.jinja file to import everything and not have to write each entity I'm importing one by one ?
13:04 arount Hi, there is a way to use something like `salt '*' state.apply` but pointing to another file than the classic `top.sls` ?
13:05 Tecnico1931 joined #salt
13:07 AndreasLutro arount: salt '*' state.top custom_top.sls
13:08 arount AndreasLutro: thank you
13:08 tyler joined #salt
13:08 tyler Hello
13:08 arount AndreasLutro: where do you find that ? the usage display when doing --help: "Usage: salt [options] '<target>' <function> [arguments]"
13:09 Guest47186 Hello
13:09 arount displayed*
13:10 robothands arount: I think he means salt '*' state.sls custom_top.sls
13:10 AndreasLutro arount: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html
13:10 AndreasLutro robothands: no
13:11 Guest47186 I am trying to create a state file that I want to apply to a node group.
13:11 Guest47186 I have an id and target set in my top.sls
13:11 robothands AndreasLutro: is that changed in 2015.5?
13:11 Guest47186 debian:
13:11 Guest47186 'N@debian':
13:11 Guest47186 - debian_hfwad
13:11 hopefulNick joined #salt
13:11 arount AndreasLutro: thank you again
13:11 SheetiS1 joined #salt
13:11 AndreasLutro robothands: don't think so, the top function is available in 2014.1
13:12 Guest47186 there is a file called /srv/salt/debian/debian_hfwad.sls
13:12 robothands AndreasLutro: I see, I misunderstood what he was asking for...thanks for clearing it up
13:12 arount robothands: I confirm AndreasLutro answered, thanks too :)
13:12 Guest47186 When I run salt '*' state.highstate, it only applies base
13:12 Guest47186 What am I missing?
13:13 Guest47186 base:
13:13 Guest47186 '*':
13:13 Guest47186 - standard_files
13:13 AndreasLutro Guest47186: possibly, the minion is not part of the debian nodegroup?
13:14 Guest47186 It is
13:14 AndreasLutro also, don't you need - match: compound ?
13:14 * AndreasLutro looks it up
13:15 bhosmer joined #salt
13:15 AndreasLutro according to the docs, you should do base:\n debian:\n - match: nodegroup\n - debian_hfwad
13:15 otter768 joined #salt
13:15 ndrei joined #salt
13:15 hopefulNick joined #salt
13:16 fivmo joined #salt
13:16 stoogenmeyer_ joined #salt
13:18 dyasny joined #salt
13:19 jdesilet joined #salt
13:20 Guest47186 so can I do something like this then:
13:21 cberndt joined #salt
13:21 impi joined #salt
13:21 Guest47186 base:
13:21 Guest47186 '*':
13:21 Guest47186 - standard_files
13:21 Guest47186 debian:
13:21 Guest47186 - match: nodegroup
13:21 Guest47186 - some_state
13:21 Guest47186 rhd6:
13:21 Guest47186 - match: nodegroup
13:21 Guest47186 - some_other_state
13:22 hopefulNick joined #salt
13:22 sfxandy joined #salt
13:22 Guest47186 What I want to happen is standard_files to be applied to all minions. some_state to be applied to only the debian nodegroup and some_other_state to be appled to only the rhd6 nodegroup
13:23 _sfxandy hello everyone.  i have  question about salt mine.  been struggling with it for a couple of hours now....
13:24 AndreasLutro looks correct Guest47186 - use a pastebin next time :)
13:24 _sfxandy what it is, I'm trying to store in the salt mine the FQDN of certain minions that have a particular role assigned to them (as a grain).  but i cannot figure out what my mine_functions should look like....
13:26 bhosmer joined #salt
13:28 Guest47186 now i am getting this from my minions: No matching sls found for 'debian.debian_hfwad' in env 'base'
13:29 racooper joined #salt
13:29 Guest47186 I figured it out
13:30 Guest47186 I forgot to add the .sls to the end of the state file name... :(
13:30 Guest47186 thanks AndreasLutro
13:31 Andre-B joined #salt
13:34 AndreasLutro no problem
13:36 _sfxandy hi AndreasLutro - can you assist with my query?
13:37 AndreasLutro I don't use salt mine so can't really give good advice there, sorry
13:37 _sfxandy hmmm ok.  thanks
13:38 elfixit joined #salt
13:44 julez joined #salt
13:45 DjDeaf joined #salt
13:45 SheetiS joined #salt
13:46 disaster123 Does anybody know a way to render templates based on time or external command output (using date)?
13:47 aqua^c joined #salt
13:48 julez joined #salt
13:49 timoguin joined #salt
13:50 msciciel joined #salt
13:50 matthew-parlette joined #salt
13:50 ndrei joined #salt
13:55 mapu joined #salt
13:59 julez joined #salt
14:05 andrew_v joined #salt
14:13 amcorreia joined #salt
14:13 dopesong joined #salt
14:15 CeBe1 joined #salt
14:18 JDiPierro joined #salt
14:19 fivmo left #salt
14:20 JDiPierro Hey All. I'm looking into using the Reactor system and was just watching events flow through my production salt environment.. Is it normal to see tons of auth requests continually coming in? Another dev is highstating a bunch of hosts so it may be from that but I've seen 5,000 salt/auth events in like 2 or 3 minutes. We have about 500 minions.
14:24 tmclaugh[work] joined #salt
14:25 MTecknology Did we pick a location for saltconf16 yet? I wanna sign up and go!
14:25 MTecknology can we host it next month?
14:25 MTecknology JDiPierro: which salt version?
14:26 JDiPierro MTecknology: salt 2014.1.12 (Hydrogen)
14:28 tracphil joined #salt
14:28 MTecknology I don't know for sure, but I /think/ there's a new auth request every time the minions check for stuff. I /think/ some of that goes away with RAET (bleeding edge feature currently).
14:29 MTecknology again... not sure, but I'm sure if I'm wrong someone will correct me. :)
14:29 ange hi
14:29 ange if I have a state in foo/bar.sls , can't I refer to in a onfail as state: foo.bar ?
14:30 tracphil which is correct for a jinja template? {{ grains.nodename }} or {{ grains['nodename' }}
14:30 MTecknology ange: foo.bar is an sls file, not a state
14:30 tracphil {{ grains['nodename'] }}
14:31 MTecknology tracphil: salt['grains.get']('nodename')
14:32 MTecknology Unless you KNOW that key exists, then you can just use grains['nodename']
14:32 ange MTecknology: ok
14:33 tracphil MTecknology: Thanks!
14:34 ange MTecknology: would you have an example of calling a specific state locate in another file from an onfail requisite ?
14:36 giantlock joined #salt
14:36 MTecknology ange: "state locate"?
14:37 MTecknology You can just refer to whatever state it is that you're concerned about within the sls
14:38 ange *state located in another file
14:39 MTecknology just treat it like a state located in the same file. As long as it's part of the highstate, it'll work. If it's not part of the highstate, then the state you're searching for won't be found anyway.
14:40 MTecknology disaster123 left... I wanted to answer that one too. :(
14:40 ange ok, possibly part 2 explains the issue, thanks
14:43 msheiny joined #salt
14:46 slimmons I'm having problems creating a postgres db.  I have my state file here https://github.com/johnsimmons/salt_postgresql/blob/master/postgresql/init.sls
14:46 stoogenmeyer_ hey is there a problem asking for mine data inside of a pillar file ?
14:46 slimmons the error message I'm getting is in the readme
14:46 stoogenmeyer_ I get empty responses
14:46 slimmons Database has wrong parameters which couldn't be changed on fly.
14:48 jalbretsen joined #salt
14:48 catpig joined #salt
14:49 bhosmer joined #salt
14:49 Romlok slimmons: I also had an issue with creating a postgres database
14:49 Romlok the template database used in the creation wasn't compatible with utf-8
14:50 Romlok so I had to add "- template: template0" to the state
14:50 Romlok which is probably not ideal, but configuring template1 to be UTF8 is/was a bit beyond me
14:53 stoogenmeyer_ has anyone succeeded in using mine.get from inside a pillar file?
14:53 spiette joined #salt
14:54 conan_the_destro joined #salt
14:55 drawsmcgraw stoogenmeyer_: someone was in here just yesterday with the same issue :/
14:56 drawsmcgraw Worked on the CLI, worked in states, didn't work in Pillar
14:56 iggy JDiPierro: what MTecknology said is  correct(ish)... the minions re-auth _a_ _lot_ (I don't think it's every request, but it could be)
14:57 JDiPierro iggy: Thanks for backing that up. Good to know it's normal and I don't have anything configured wrong.
14:57 iggy tracphil: grains.nodename will work too, but for future proofness, better to use salt.grains.nodename
14:57 JDiPierro and thanks MTecknology for the original answer :)
14:57 stoogenmeyer_ drawsmcgraw: yea there's an open issue about it which I just found
14:57 stoogenmeyer_ but no word about it since may 201
14:57 stoogenmeyer_ 4
14:58 drawsmcgraw Ah... odd
14:58 iggy stoogenmeyer_: feel free to ping on it
14:58 stoogenmeyer_ iggy: I did. maybe ot circumvent it by using a grain
14:58 iggy I feel like that's something that should work or else we end up having to add explicit mine support to formulas
14:59 stoogenmeyer_ and calling the mine.get from the custom grain
14:59 tracphil iggy: Thanks for the info, it is very much appreciated!
15:00 murrdoc joined #salt
15:01 Brew joined #salt
15:03 KennethWilke joined #salt
15:03 bhosmer joined #salt
15:05 slimmons Romlok: Thanks, I'll try that
15:06 sdm24 joined #salt
15:07 mpanetta joined #salt
15:07 slimmons hmm, that didn't seem to do anything.  Getting the same error
15:10 onorua joined #salt
15:11 cpowell joined #salt
15:15 douglasssss joined #salt
15:15 otter768 joined #salt
15:16 debian112 joined #salt
15:16 slimmons Everything I'm reading ont his problem has the solution of adding runas:, which I've been told is depricated (and it doesn't work anyway)
15:17 dendazen joined #salt
15:18 bhosmer_ joined #salt
15:20 slimmons alright, so if I removed encoding: UTF-8, and removed the template: template0, and added the db_user: and db_password, it worked.
15:23 ndrei joined #salt
15:24 Brew joined #salt
15:25 bhosmer joined #salt
15:25 iggy slimmons: user is the new runas
15:26 murrdoc runas is so 2014
15:26 murrdoc (i think)
15:26 dyasny joined #salt
15:26 slimmons gotcha, thanks
15:27 murrdoc iggy:  does orchestrate so something like •salt '<servername>' system.reboot && salt-run state.event 'salt/minion/<servername>/start' count=1 quiet=True && salt '<servername>' state.highstate
15:28 iggy murrdoc: I believe orchestrate will wait for a minion to reappear if you tell the service to restart... I don't know about a full system restart
15:31 Deevolution joined #salt
15:35 che-arne joined #salt
15:36 conan_the_destro joined #salt
15:36 bhosmer_ joined #salt
15:36 aqua^c joined #salt
15:39 ksalman I always see these problems on multiple minions "The function "state.sls" is running as PID 9280 and was started at 2015, Jun 09 15:13:45.691024 with jid 20150609151345691024". Is there any fix for thsi?
15:39 murrdoc iggy:  sucs
15:40 murrdoc i ll have to use fabric to build servers
15:41 fivmo joined #salt
15:42 undefinednull joined #salt
15:42 iggy ksalman: it usually means you have multiple minion processes running or that you genuinely have some long running highstates
15:43 iggy murrdoc: you can't just key of the minion coming up event (after the reboot)?
15:43 iggy just put it on the back burner and make the new guy do it
15:46 murrdoc fucking new guys
15:46 ksalman iggy: okay, that multiple minion processes thing makes sense, and I do not have that long highstate. I do see multiple processes on many minions so i seemed to be plagued with those, then. Do other people see this issue as well?
15:46 murrdoc i cant actually
15:46 murrdoc i have to do trickery with 'startup state' to do it
15:46 ksalman I guess I'll have to write a cron job to make sure this isn't happening on the minions
15:47 ksalman by killing the extra (older) process
15:47 bhosmer joined #salt
15:49 bhosmer_ joined #salt
15:50 peters-tx I'm running a grains-based target command, and it *looks* like my Master is re-sending a job to one (or more??) of my minions, infinitely
15:50 peters-tx What in the heck is going on
15:52 peters-tx I *think* this started happening on 20150602, seemingly for no reason
15:52 SheetiS joined #salt
15:54 spiette joined #salt
15:54 andrew_v joined #salt
15:59 clintberry1 joined #salt
16:00 rm_jorge joined #salt
16:01 iggy ksalman: usually no, it can happen if you start the minion different ways (i.e. directly on the command line vs via the init script, etc.)
16:01 fivmo left #salt
16:02 iggy ksalman: also, be careful killing things... it's not abnormal for the minion to have a couple threads/processes running under the parent
16:03 ksalman okay. Now that I am looking at other minions there are minions with one process but highstate that's been hung, since April 4th
16:05 stoogenmeyer_ joined #salt
16:06 julez joined #salt
16:06 bhosmer joined #salt
16:09 quantumriff joined #salt
16:10 peters-tx joined #salt
16:11 iggy so... that could be something messed up the cache then
16:11 iggy in 2015.5 there's a function to clear the cache otherwise just stop salt-minion, rm -rf /var/cache/salt/ , start salt-minion
16:12 bluenemo joined #salt
16:12 xDamox joined #salt
16:14 forrest joined #salt
16:15 desposo joined #salt
16:22 samnmax joined #salt
16:25 stoogenmeyer_ joined #salt
16:26 kawa2014 joined #salt
16:27 amcorreia joined #salt
16:28 dopesong_ joined #salt
16:28 dopeson__ joined #salt
16:37 cruatta joined #salt
16:39 smcquay joined #salt
16:43 rgarcia_ joined #salt
16:43 baweaver joined #salt
16:44 writtenoff joined #salt
16:45 forrest joined #salt
16:46 thekabal joined #salt
16:47 thekabal I have several minions that have changed their hostname and been rebooted. cmd.run shows the new hostname, but an init.sls with {{hostname}} does not update with the new hostname. Why not, and what can I use instead?
16:49 linjan joined #salt
16:50 forrest joined #salt
16:51 iggy {{ hostname }} is that something you're setting?
16:53 timoguin joined #salt
16:55 theologian joined #salt
16:58 tracphil joined #salt
17:01 forrest iggy: sroegner is on board, he said he'll do PRs from now on.
17:02 JDiPierro joined #salt
17:02 chiui joined #salt
17:05 murrdoc go forrest
17:05 aparsons joined #salt
17:06 iggy Good. I mean I know it's annoying sometimes, but even on something as simple as the aptly formula, we do PRs for everything
17:06 forrest murrdoc: sroegner is a pretty rational guy, didn't take much convincing.
17:06 forrest iggy: Yeah I know, and that is how I explained it
17:07 iggy now if only we could get him to stop making hideous formulas ;)
17:07 tracphil joined #salt
17:07 iggy one of the guys here in the office copied one of his when we first started working with Salt
17:08 iggy was all proud of himself "This is what good formulas look like right?"
17:08 iggy granted at the time, more complex stuff wasn't widely covered
17:09 murrdoc all formulas should at least
17:09 murrdoc be as good as template formula
17:09 murrdoc amirite ?
17:10 * iggy no comments
17:10 murrdoc waaaa, i cleaned it up
17:10 murrdoc u no like it ?
17:10 murrdoc send pull
17:10 iggy aptly-formula doesn't really follow
17:10 iggy but then it's kind of distro specific
17:11 murrdoc aptly formula stinks
17:11 * murrdoc puts down canister of oil
17:12 murrdoc i did have to fix a lot of it
17:12 murrdoc but my use case is local ppa
17:12 murrdoc not mirror
17:12 murrdoc and i am using the rest api to add shit
17:13 tracphil joined #salt
17:13 forrest the fact aptly exists at all is pretty great. I wish the author would have retweeted it when I let him know we made it, but at least he added it to the extras page
17:13 forrest configuring aptly by hand is kinda lame
17:14 murrdoc faptly
17:20 cruatta_ joined #salt
17:23 stanchan joined #salt
17:24 spookah joined #salt
17:26 aqua^c joined #salt
17:27 aw110f joined #salt
17:27 kevin-wk i was using salt-api to preseed minions during kickstart, as described in https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html - but it stopped working and any /keys request gets a 401, after which cherrypy gives a 500 to everything until i restart it.  details https://gist.github.com/kevins9/a79123cfacd11e117fd1
17:28 kevin-wk i am having the same problem on multiple salt masters now
17:28 kevin-wk has anyone seen this before?
17:29 baweaver joined #salt
17:29 DammitJim joined #salt
17:31 cruatta__ joined #salt
17:34 xDamox joined #salt
17:37 bhosmer joined #salt
17:38 davisj Any salty folk attending devopsdays in DC?
17:41 ajw0100 joined #salt
17:42 blarghmatey joined #salt
17:43 blarghmatey Has the way that the salt-api gets started changed from 2014.7 to 2015.5?
17:43 blarghmatey I'm using rest_cherrypy and for some reason it's not starting anymore.
17:44 hatchetjack joined #salt
17:45 tracphil I am working on a new state for authenticating users with sssd. My configuration on a host is correct but I am wondering if you could share your thoughts on this state file to see if it looks good or could use improvments https://gist.github.com/tracphil/9437dc9495f25998b852
17:46 hatchetjack any of you guys installed saltstack on ubiquiti edgeOS?
17:49 iggy blarghmatey: make sure salt-api is set to start
17:50 iggy (and that the init script for it is still installed, your distro might have moved the init script)
17:50 tomh- joined #salt
17:51 blarghmatey Thanks iggy, had a brainfart. Been a few months since I did the initial work.
17:51 hoonetorg joined #salt
17:52 gladiatr joined #salt
17:55 forrest joined #salt
17:56 forrest tracphil: Looks okay to me, only thing I'd consider there is it isn't as modular as you might want it (service starting in the same file as files being managed, pam being in the same file, etc.)
17:57 forrest but I'm also a fan of include chains which can sometimes bite you in the ass.
17:58 tracphil forrest: Thanks. I am with your thinking but when I looked up the watch statement in the docs it gave the service example with the file.managed so I thought I would give it a shot :D
17:59 forrest tracphil: Nothing ays you can't still use the watch. You can always make a conf.sls which is included, then do a watch_in for the file :)
17:59 forrest I need to go, good luck!
17:59 tracphil on nice thinking, thanks!
17:59 rap424 joined #salt
17:59 chris_1723 joined #salt
18:00 denys joined #salt
18:02 chris_1723 Hi #salt.  I just upgraded my salt system from 2014.7.2 to 2015.5.0.  Running 2 windows minions with a RHEL master.  Since the upgrade, a call to the file.copy state which worked in 2014.7.2 is now failing with the message ""User root is not available Group root is not available".  Anyone know the root cause on this one?
18:03 murrdoc root cause
18:03 iggy file.copy tries to explicitly set permissions now
18:04 iggy so if you're copying on Windows, use Windows Users/Groups
18:04 blarghmatey left #salt
18:05 chris_1723 Got it.  So, letting salt try to make it the Minion user won't work? (docs claim if I don't specify a user, it tries to do the minion's user)
18:05 alfborge joined #salt
18:06 cruatta joined #salt
18:06 iggy I'm not entirely sure tbh, I know when it tries to copy from the master it tries to maintain perms
18:06 baweaver joined #salt
18:07 chris_1723 ...which would explain the error. Root owns the file on the master.  Okay, I'll tinker with parameters then.  Thanks !
18:07 hoonetorg hi
18:07 druonysus joined #salt
18:08 cruatta_ joined #salt
18:08 hoonetorg is there a way to simply write formula and templates which produce the same output with jinja_trim_blocks and jinja_lstrip_blocks both enabled or disabled/
18:08 hoonetorg ?
18:10 hoonetorg the background is, that https://github.com/CSSCorp/openstack-automation wants to enable these settings in /etc/salt/master, but it's really hard to do this in an existing environment.
18:12 hoonetorg So at the moment I try to fix all existing formula's in in use to actually do the same on the minions with jinja_trim_blocks and jinja_lstrip_blocks both enabled or disabled.
18:12 iggy lot's of -'s
18:12 moos3 joined #salt
18:12 hoonetorg iggy: yes :)
18:13 hoonetorg I always need hours for this, because it's still not completely understandable for me
18:13 iggy there's not a per sls jinja_opts setting
18:13 dRiN joined #salt
18:14 hoonetorg iggy: but this would be a good help
18:15 tiadobatima1 joined #salt
18:17 sdm24 Have you tried using Salt with a file.replace to change those settings in /etc/salt/master?
18:17 sdm24 if you have multiple masters I guess
18:17 iggy it shouldn't be required
18:17 sdm24 I thought it said /etc/salt/minion : /
18:18 iggy write your jinja correctly
18:19 DammitJim joined #salt
18:20 hoonetorg sdm24: and iggy: example https://gist.github.com/hoonetorg/e5373d8171937f95bb58
18:20 hoonetorg It took me hours to make it work with both cases
18:20 chiui joined #salt
18:20 jonlangemak joined #salt
18:21 sporkd2 joined #salt
18:21 hoonetorg sdm24: file.replace I don't know, probably I used before
18:21 hoonetorg but I can remember, that I used lines: - line1 \n - line2
18:22 hoonetorg this could solve this problem too
18:23 sdm24 I don't really know anything about that openstack automation, I just have also run into problems where I need to change config settings for all of my minions
18:23 sdm24 And offering my solution ;)
18:23 sdm24 *:)
18:25 druonysuse joined #salt
18:25 druonysuse joined #salt
18:26 hoonetorg sdm24: yeah I used something similar file.append with text: where lines are in an array
18:26 hoonetorg then it doesn't matter if there is an empty line more or less in the sls.
18:27 hoonetorg see https://gist.github.com/hoonetorg/462a82971f6328a9f715
18:27 somanyquestions joined #salt
18:27 kickerdog joined #salt
18:28 hoonetorg the sls is rendered differently with jinja_trim_blocks and jinja_lstrip_blocks  on or off, but the outcome is the same
18:29 hoonetorg but what do i do if I have a large config file where I only want to change a view settings by using a file template in combination with file.managed?
18:29 somanyquestions I need help w/ jinja syntax in a sls file (what is correct terminology for the sls file? salt state file?) ... pseudocode for what I'm trying to do is: if(pillar value contains string "xyz") then BLAH1 else if (pillar value contains string "jkl") then BLAH2 , etc. any suggestions? Thanks in advance!
18:30 hunmaat {% if "xyz" in pillar["value"] %}?
18:31 hoonetorg or even worse if I need to make huge existing formulas work with jinja_trim_blocks and jinja_lstrip_blocks
18:32 somanyquestions hunmaat: interesting, i've never seen that syntax before...  pillar["value"] is that same as salt['pillar.get']('value')?
18:32 hunmaat "in" is a python operator
18:33 hunmaat and jinja has a very similar set
18:33 hunmaat pillar.get is smarter
18:33 hunmaat pillar is a dict, while salt['pillar.get']() is a custom get method
18:34 hunmaat which handles hierarchy
18:35 hoonetorg somanyquestions: i'm slow, but something like this https://gist.github.com/hoonetorg/1203b09ab588dac9323e
18:35 hoonetorg ?
18:36 rgarcia_ joined #salt
18:36 hoonetorg I'm always using a 2liner, because I find it better readable
18:36 somanyquestions are there resources to help me understand the syntax and interplay between python operators salt stack and jinja? Thanks for suggestion hoonetorg, but your example uses '=' and I need something more similar to a regex match
18:36 Gareth hrm. so grains only update when the minion starts or is restarted.
18:36 nergdron joined #salt
18:36 somanyquestions so i guess the "in" python operator would be the way to go?
18:37 hoonetorg somanyquestions: never used regex for something like this
18:38 hoonetorg but good strategy to use regex
18:38 hoonetorg I will need this one day :)
18:38 aboe joined #salt
18:39 aboe I got a strange question, is it possible to include a full state with context into another state
18:39 murrdoc yeah
18:39 murrdoc salt['state.single'](params)
18:39 aboe I want to reuse the users-formula into a state that will automatically install a bashrc file if the user has shell '/bin/bash'
18:40 murrdoc or state.apply
18:40 hoonetorg anybody else a standard solution, tips, hints for writing formulas which are compatible with jinja_trim_blocks and jinja_lstrip_blocks either on or off?
18:43 Berty_ joined #salt
18:44 murrdoc not sure what that means
18:45 hoonetorg murrdoc: you mean what i ask?
18:45 nergdron I'm trying to figure out a way to basically do onlyif: state: someotherstate, to inject monitoring configs based on the other states defined (via upstream formulas) for a host. Does anyone have any suggestions on how to accomplish this?
18:46 linjan joined #salt
18:46 xDamox joined #salt
18:47 forrest joined #salt
18:48 sdm24 http://docs.saltstack.com/en/latest/ref/states/requisites.html#require-an-entire-sls-file
18:50 nergdron I'm not trying to require a file though, that's straightforward. I want to detect if a state has already been included elsewhere, and then apply something if it has.
18:50 nergdron like, if state: mysql, then apply monitoring.mysql.
18:52 Diaoul joined #salt
18:52 forrest iggy: Do you know if there were plans to get the beacon system into masterless systems?
18:53 KyleG joined #salt
18:53 KyleG joined #salt
18:53 gladiatr joined #salt
18:55 xDamox joined #salt
18:56 bhosmer joined #salt
18:57 hoonetorg nergdron: require: - sls: should be what you need
18:57 hoonetorg the state where you require an sls only runs, if this whole state ran successfully
18:58 hoonetorg isn't it this what you need?
18:58 nergdron I don't think so, no. like, the state I'm checking (say mysql) isn't guaranteed to run. it may or may not run.
18:58 nergdron and I want to conditionally run this other monitoring state based on whether or not the base state ran.
18:59 hoonetorg Oh I see
18:59 sdm24 exactly. and if it doesn't run when monitoring.mysql will run, then monitoring.mysql won't ruin either
18:59 nergdron doesn't require: in the monitoring state cause it to hard fail if the mysql state didn't run?
18:59 hoonetorg yes
18:59 nergdron I don't want to generate failures for things that aren't failure cases.
18:59 sdm24 oh
18:59 hoonetorg it fails
18:59 IanVorn118 joined #salt
18:59 nergdron like, that's expected behaviour, if mysql doesn't run, then we shouldn't even try to run monitoring.mysql.
18:59 coval3nce joined #salt
19:00 nergdron so I don't think require: is what I want.
19:00 sdm24 gotcha
19:00 coval3nce Anyone here use the salt-cloud ‘USE_KEYRING’ setting for password?
19:00 hoonetorg So you need to check if the mysql state is present in this run
19:00 nergdron like... onlyif, but with a state: check, instead of running a shell command.
19:00 sdm24 can you  do a watch : - sls?
19:00 nergdron hoonetorg: yeah, exactly.
19:00 forrest nergdron: Are there any situations where you would run the mysql state without needing the monitoring state
19:01 nergdron forrest: no, but the states I'm talking about are provided by formulas from an upstream source which I don't want to fork and modify to integrate my own custom monitoring.
19:01 forrest nergdron: I'd just use include to include the mysql state in the monitoring state, then apply that state to the matching box based on the top file.
19:01 nergdron yeah, we're doing that for the states we're writing ourselves.
19:01 forrest Ahh, so why if you always know the box will need both, are there chances the monitoring state won't run?
19:01 forrest you're using the top to apply the mysql install state right?
19:02 forrest via some form of matching?
19:02 nergdron yeah, instance tag matching in ec2, basically we just run whatever state is in a single tag.
19:02 forrest nergdron: So why can you not apply monitoring as well if that tag is matched?
19:02 nergdron we could just specify the monitoring states manually in there, for sure. I was just hoping there was an easy way to link them in salt so that the ec2 config spinup stuff could be simpler.
19:03 nergdron It sounds like that'll be nontrivial though, so we probably should just apply it in the tags.
19:03 forrest aren't the tags grains though
19:03 forrest like you import the tag as a grain after instance provisioning?
19:03 forrest or it gets set in the minion conf via the provisioning system
19:03 nergdron I'm not sure, that's a good question. you're right, if they're grains I can just query the grains.
19:04 forrest nergdron: When you provision your system, you drop the minion conf on via ec2 tools right?
19:04 forrest I assume via cloudformation or something
19:04 hoonetorg nergdron: i'm pretty hopeful there is a way to check if a state is present in the current run and then do an {% if sls('mysql') is defined %} <- that's obviously false :)
19:05 nergdron it's masterless, and we're pulling in the salt state files and stuff form s3 via cloud-init.sh. I didn't write that part, so I'm not super familiar with what's happening there.
19:05 ingslovak joined #salt
19:05 forrest nergdron: I see, we run masterless as well, but when we pull in our confs, they have grain data set, so something like this: https://github.com/gravyboat/demo-app-1/blob/master/salt/minion/demo_app_1#L15
19:05 hoonetorg followed by a require: - sls: mysql
19:05 forrest hoonetorg: he doesn
19:05 forrest 't want to modify the upstream ;)
19:06 nergdron forrest: I could easily put templating stuff like that into my monitoring state though, if there was a way to check state presense in jinja. that'd be fine.
19:06 nergdron but you're right, however salt is determining what roles to apply to the instance, I should be able to check that source. gotta dig through our code and see how we're doing that.
19:07 forrest nergdron: I'm just confused why the monitoring state can't just include the mysql state. Then you always run the mysql state, and then run the monitoring state. Is that just because the stuff already installs mysql and you can't modify?
19:07 nergdron it's because we don't always want the mysql state. that's just an example. sometimes we want the zookeeper state, or whatever.
19:08 forrest Setting the roles, and matching would be the easiest way (and probably the most clear) to do it, then you can easily add if needed.
19:08 IanVorn118 joined #salt
19:08 forrest nergdron: I see, yeah that matching should really be happening via grains/tags, and in the top.
19:08 nergdron yeah, I agree. I gotta dig through our code and see how we're doing the matching.
19:08 forrest Gotcha
19:08 forrest If you do this in the top it's gonna be hilariously easy.
19:08 nergdron yeah, for sure.
19:08 nergdron thanks for helping me think through the problem, I think it will simplify things for sure.
19:09 forrest iggy: Do you remember if you can do a jinja call to say if a state exists when a run occurs, to include another state?
19:09 forrest nergdron: Yeah np, asking iggy if he can think of the other way just in case. If it exists I've never done it for SLS files.
19:10 forrest meeting time, let me know if you figure out the check thing.
19:10 IanV0rn joined #salt
19:11 dopesong joined #salt
19:11 nergdron yeah, I think your approach is cleaner, but I'd definitely love to know if there is a way to do it in jinja anyway, just to improve my own knowledge.
19:13 rgarcia_ joined #salt
19:14 baweaver joined #salt
19:14 KennethWilke joined #salt
19:14 aqua^c joined #salt
19:14 druonysus joined #salt
19:15 iggy sadly, there's nothing like __context__ in jinja
19:15 iggy would be the way I'd do it
19:16 nergdron ok, so I didn't miss anything obvious anyway, that's good. I'll definitely put this into where we're doing the rest of the tag matching.
19:16 bhosmer joined #salt
19:17 FRANK_T joined #salt
19:17 soren joined #salt
19:18 hybridpollo joined #salt
19:18 ajw0100 joined #salt
19:20 dopesong_ joined #salt
19:20 ronrib joined #salt
19:22 iggy We had it easy where I am now, we started fresh with Salt, so it kind of influenced how we designed everything
19:22 coval3nce Hehe, so trying to use keyring for salt-cloud, bu default keyring uses a file provider backend, which needs a password to access.....chicken/egg
19:23 iggy so we just tie everything to roles and don't have to worry about existing state influencing things
19:26 jonlangemak joined #salt
19:27 ryuhei joined #salt
19:27 pullphinger joined #salt
19:27 ryuhei hello.. anyone familiar with digitalocean? I'm trying to change from api v1 to api v2 and I need help.
19:28 pullphinger joined #salt
19:31 iggy not a particularly extensive problem description, but in 2015.5 it "just works"
19:31 chiui joined #salt
19:33 murrdoc (tm)
19:34 spookah joined #salt
19:34 tracphil davisj: I might attend.
19:36 Ahlee apparently i'm dumber than I expected. I ran sudo add-apt-repository ppa:saltstack/salt, apt-get update, but still only show salt 0.17 on this ubuntu 14.04 host
19:36 Ahlee i maen, 0.17.x is near nad dear to my heart 'n all
19:36 Ahlee maybe it's just a sign
19:37 s_kunk joined #salt
19:37 s_kunk joined #salt
19:42 Steven- joined #salt
19:43 tiadobatima joined #salt
19:44 sporkd2 Ahlee: I use bootstrap script for everything, way easier
19:44 druonysus joined #salt
19:45 Ahlee i'm too old fashioned to not use packages that can be audited :)
19:47 baweaver joined #salt
19:48 Ahlee just an unfamiliarity iwth ubuntu, had to clear the cache
19:49 viq joined #salt
19:54 tkharju joined #salt
19:54 xDamox joined #salt
19:55 rgarcia_ joined #salt
19:57 giantlock joined #salt
20:00 druonysuse joined #salt
20:02 sfxandy joined #salt
20:03 davisj tracphil: undecided? I think the slots were all taken (except perhaps the ones reserved for .gov employees)
20:03 XenophonF joined #salt
20:04 XenophonF can i use jinja inside a file referenced by import_yaml?
20:05 XenophonF specifically, i'm following the defaults.yaml/map.jinja/init.sls pattern seen in many of the saltstack formulas, and i'd like to use the value of a grain as one of my default values
20:05 XenophonF specifically the "domain" grain
20:05 kickerdog joined #salt
20:05 tracphil davisj: I just saw that. I didn't even know it was here until you mentioned it. I  have a  .gov email address.
20:05 rgarcia_ joined #salt
20:07 davisj tracphil: I don't think it's open to contractors if that appies to you :(
20:07 tracphil ew, thats not good... it would apply.
20:08 davisj sad face
20:08 tracphil lol
20:09 XenophonF tracphil: i'm going to take a look at your sssd state in a sec
20:09 davisj Hopfully they will do it yealy - assuming it doesn't suck ;)
20:09 davisj ..yearly..
20:09 XenophonF tracphil: i was just about to start writing something similar so hopefully you've just saved me a ton of effort ;)
20:09 * davisj heads out
20:09 tracphil XenophonF: thanks, I am about to cut out of here for the day. You can comment on the gist though, that would be greate.
20:09 iggy XenophonF: no
20:10 tracphil XenophonF: I hope so, sssd on Jessie works like a charm.
20:10 XenophonF tracphil: will do. am using centos7 and ubuntu 15.04 here.
20:10 XenophonF thanks, iggy
20:11 tracphil they should work fine, on the previous release of debian sudo didn't use sssd but other than that it worked fine. I keep sudo in ldap.
20:12 Berty_ joined #salt
20:12 kickerdog joined #salt
20:12 kickerdog left #salt
20:13 kickerdog joined #salt
20:13 XenophonF tracphil: i'm a fellow beltway bandit hoping to use sssd with our bioinformatics hpc clusters, so this gist of yours showed up at the right time :)
20:14 tracphil very nice indeed. I need to start going to saltstack meetups around here
20:14 XenophonF tracphil: i have a slightly different approach to managed configs, but i'll put that in the comments
20:16 forrest joined #salt
20:18 undefinednull joined #salt
20:21 tracphil XenophonF: thanks!
20:21 XenophonF tracphil: np
20:22 IanV0rn joined #salt
20:24 sporkd2 is there a way for salt-cloud to detect the minion is already installed or does it always bootstrap by default?
20:24 jonlangemak joined #salt
20:25 ahammond apparently pygit2 demands the _public_ key to access git repos. I'm kind of at a loss as to why. Obviously it's gonna need a private key... but public?!?
20:26 nergdron well, ssh typically needs both, so I imagine so does pygit2?
20:27 ahammond uh, no... ssh only needs the private key to connect. the public key goes in github or stash or wherever the repo is...
20:28 nergdron right. No idea then, I guess check their code and see how they use it.
20:29 ahammond looks like GitPython fits what I'm doing better anyway.
20:30 sporkd2 sorry nvm, I found my answer
20:31 smcquay joined #salt
20:33 s_kunk joined #salt
20:34 loki___ joined #salt
20:34 loki___ Hi everyone
20:35 loki___ can anyone help me with changing my default grain name
20:36 iggy sporkd2: you can set a custom bootstrap script
20:39 loki___ @iggy :  i have two servers with same hostname in a cluster
20:39 loki___ he problem is .. the the key generated by both the minions are in same name
20:40 loki___ so the saltstack master is accepting only one server
20:40 spiette_ joined #salt
20:40 loki___ what should i do
20:40 loki___ please help me
20:41 rgarcia_ joined #salt
20:41 Blode- joined #salt
20:41 loki___ can anyone please guide me what to do?
20:41 gladiatr joined #salt
20:41 kevin-wk maybe you can stop the minion on server2, clear the keys, set /etc/salt/minion_id to a different value, restart the minion and accept the key on the master?
20:42 kevin-wk never tried it
20:42 kickerdog joined #salt
20:43 loki___ great but how to change the minion_id?
20:43 kevin-wk edit the file and put whatever name you want into it
20:44 loki___ great thanks kevin-wk
20:44 kevin-wk i think it should work
20:47 sroegner joined #salt
20:48 sroegner_ joined #salt
20:49 tiadobatima joined #salt
20:49 rgarcia_ joined #salt
20:53 iggy or quit naming servers the same thing
20:55 ahammond naming servers the same thing... yeah. I'd _love_ to not live in that world.
20:56 ahammond I'm implementing gitfs backend and see the following error message: [salt.loaded.int.fileserver.gitfs ][ERROR ][22372] Exception ''module' object has no attribute 'errors'' caught while fetching gitfs remote
20:56 ahammond any ideas what this is?
20:56 iggy missing module?
20:57 MTecknology I'm having an interesting issue with the latest salt version. "State 'file.sed' was not found in SLS 'sys.files.logrotate'"  Every single file.sed state fails. http://dpaste.com/3P31M7R
20:57 hal58th_1 joined #salt
20:57 hal58th_2 joined #salt
20:57 s_kunk joined #salt
20:57 hal58th_3 joined #salt
20:58 iggy file.sed was deprecated for a long time, it's probably just gone now
20:59 xDamox joined #salt
21:00 MTecknology iggy: oh... that would explain it!
21:00 MTecknology completely gone or replaced?
21:00 iggy file.replace
21:00 kickerdog Try http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.replace
21:00 iggy Deprecated since version 0.17.0: Use the file.replace state instead.
21:01 MTecknology perfect :D
21:01 MTecknology iggy: thanks!
21:01 iggy that's from the 2014.7 docs... it's gone completely from the 2015.2 docs
21:01 timoguin outta here
21:03 aqua^c joined #salt
21:06 subsigna_ joined #salt
21:10 peters-tx iggy, I think I figured out what my system(s) were doing
21:10 iggy what's that?
21:10 peters-tx iggy, I'm not sure I would expect Salt to do this
21:11 XenophonF left #salt
21:11 peters-tx iggy, If I run, just as a test, an unterminating thing via cmd.run, Salt seems to go off and make new Job IDs infinitely
21:11 peters-tx iggy, For instance, salt test_minion cmd.run 'cat'
21:11 baweaver joined #salt
21:12 peters-tx iggy, On test_minion, the log shows an every-5-second churn of new jid's
21:12 iggy sounds right
21:13 iggy salt is checking the job status until the job completes
21:13 peters-tx iggy, It is doing a "find_job" on a *new* JID though, not the one that was assigned to the cmd.run
21:14 peters-tx iggy, Oh wait, hmm, I think I get your meaning
21:14 iggy find_job is technically a job
21:14 peters-tx The NEW jid is Salt watching the non-terminating process
21:14 iggy so the new jid you are probably seeing is the jid of find_job (not of the cmd.run)
21:15 peters-tx iggy, Doesn't setting a timeout force a lifespan for the cmd.run though?
21:15 iggy no
21:16 MTecknology iggy: 2015.5 is looking pretty dang sexy :D
21:16 iggy timeout is how long the command line tools wait for the job (before going to the background and polling until it's done)
21:16 _JZ_ joined #salt
21:16 iggy MTecknology: it's solved a lot of problems for us (not without it's own set though)
21:16 iggy overall less annoying than 2014.1
21:18 peters-tx iggy, Hmm, so is there a way to specify a full lifespan time for cmd.run 's ?
21:18 p0rkbelly joined #salt
21:19 peters-tx iggy, I don't remember ever seeing anything for that
21:19 kickerdog joined #salt
21:19 iggy not that I know of
21:20 peters-tx wow
21:21 iggy don't run things that can run forever
21:21 kickerdog joined #salt
21:21 coval3nce found a bug in this bad boy https://github.com/saltstack/salt/blob/561d7b72bb8bb0d5fa5c4395db12425f27c26c1a/salt/cloud/clouds/openstack.py#L302
21:22 coval3nce will create and issue and submit the fix, super simple
21:22 MTecknology Nice! salt-run fileserver.update is *WAY* faster now!!
21:22 monkey66 joined #salt
21:23 rap424 joined #salt
21:29 forrest joined #salt
21:31 dalexander joined #salt
21:31 JDiPierro joined #salt
21:32 jonlangemak joined #salt
21:35 coval3nce https://github.com/saltstack/salt/issues/24583
21:44 Berty_ joined #salt
21:48 forrest joined #salt
21:56 gladiatr joined #salt
21:56 utahcon assume /srv/pypi/bin does not exist: http://pastebin.com/hscJReR8
21:56 forrest iggy: Do you know if there were plans to flesh out http://docs.saltstack.com/en/latest/topics/beacons/ ? They're not very thorough..
21:56 utahcon that should the run the command, right?
21:57 forrest utahcon: don't use cmd.run..
21:57 viderbit joined #salt
21:57 forrest utahcon: use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.virtualenv_mod.html
21:58 iggy forrest: none that I've heard of, but then it was all that could be talked about at saltconf, they may have forgotten they didn't write any of that down
21:58 utahcon forrest: is that availalble in Hydrogen?
21:58 forrest iggy: okay
21:58 murrdoc whats hydrogen
21:58 forrest utahcon: It's been around for a while, what's that . release?
21:58 forrest 2014.1?
21:58 forrest If so, yes
21:58 iggy yes
21:58 utahcon 2014.1.10
21:58 iggy horrendously old
21:59 utahcon I know
21:59 Ryan_Lane wasn't 2014.1 released like a year ago? :)
21:59 forrest basepi: Could you ask Jacob Hammons to hop into the IRC if he is around today?
22:00 basepi forrest: done.
22:00 forrest utahcon: Use the virtualenv stuff, way easier
22:00 forrest basepi: Thank you
22:01 IOMonster joined #salt
22:01 forrest iggy: You want to hear something really horrible?
22:01 utahcon confirmed, not in 2014.1.10
22:01 forrest I'm still running 0.17.5 for some of my personal masterless minion stuff
22:02 forrest I'm calling shennanigans utahcon
22:02 iggy I'm never talking to you again
22:02 forrest I am using it here: https://github.com/gravyboat/hungryadmin-sls/blob/master/salt/hungryadmin/app.sls#L27
22:02 forrest and that is on 0.17.5
22:02 forrest iggy: ;)
22:02 utahcon oh... nm I can't type
22:02 utahcon virtualenv != virtaulenv
22:02 forrest iggy: I can't remember how to get the ubuntu shit to update it, I confirmed the repo was added, but it says up to day
22:02 forrest *date
22:03 forrest I need to sit down and figure out the problem
22:03 forrest but was like 'meh fuck it
22:04 utahcon don't you have to get the ppa if you want ubuntu to get up-to-date?
22:04 forrest yeah I have it
22:04 forrest and it still says that 0.17.5 is the latest
22:04 forrest I'm thinking something is busted, but since it's just my personal stuff I don
22:04 utahcon meh... fuck it was right then
22:04 forrest 't care enough to fix it*
22:04 forrest Tempted to just reprovision the box
22:04 forrest and move to centos.
22:06 utahcon it'd be nice if features in the docs said what version they were added in...
22:07 iggy if they don't file a bug
22:08 forrest utahcon: They usually do, if it isn't as iggy said file a bug
22:09 forrest utahcon: That is usually very prevalent for features added after 0.16/7.
22:09 jlhammons joined #salt
22:10 jlhammons forrest: ping
22:11 forrest hey jlhammons
22:11 jlhammons hi
22:11 tmclaugh[work] joined #salt
22:12 KyleG joined #salt
22:12 KyleG joined #salt
22:13 KyleG joined #salt
22:13 KyleG joined #salt
22:13 forrest jlhammons: I messaged you in case the web client isn't showing it, not sure how you reply to PMs in that
22:14 jlhammons forrest: I keep getting an error when i try to reply
22:14 jlhammons let me try the other way
22:14 forrest laaame, maybe because it isn't authenticated and I have it set weird
22:14 forrest so non authed users can't message me or something, let me check
22:15 jlhammons ok
22:15 forrest man the freenode docs are bad, I'm trying to find the flag now
22:17 forrest jlhammons: Try ow
22:17 forrest *now
22:17 jlhammons forrest: still no go, maybe try it again?
22:18 jlhammons I can see the window just getting an error
22:18 forrest what is the exact error?
22:18 forrest I already confirmed -R is set
22:18 jlhammons Can't use this command in this window
22:26 bfoxwell joined #salt
22:28 monkey66 joined #salt
22:28 Norbell joined #salt
22:28 cberndt joined #salt
22:29 forrest joined #salt
22:33 rap424 joined #salt
22:44 baweaver joined #salt
22:47 hal58th joined #salt
22:48 hal58th_ joined #salt
22:48 hal58th__ joined #salt
22:51 monkey66 left #salt
22:51 monkey66 joined #salt
22:52 aqua^c joined #salt
22:55 racooper joined #salt
22:56 john5223 joined #salt
23:01 tmclaugh[work] joined #salt
23:07 tmclaugh[work] joined #salt
23:08 utahcon This will restart nginx when the second state executes, removing the default site in nginx, right?
23:08 utahcon right now, I don't see that happening
23:08 utahcon so I think I have something wrong
23:09 utahcon http://pastebin.com/wA1fq7Na
23:10 iggy you can't watch file globs
23:10 iggy I see that a lot and wonder where people are pulling that from
23:10 utahcon https://github.com/saltstack/salt/issues/663
23:11 iggy a watch takes a <module>: <sls_id>
23:11 iggy so you'd use `- file: remove-default-site`
23:11 utahcon oh
23:12 amcorreia joined #salt
23:13 iggy Yeah, that only works if your state id's are the file names
23:14 iggy it'll also match name's
23:15 murrdoc does the salt cli have an api interface
23:15 murrdoc like can i programmatically include something from salt and call stuff like salt 'minion' state.sls , salt-run , so on
23:15 iggy but you have the watch on /etc/nginx/sites-available and the file.absent is /etc/nginx/sites-enabled/default
23:15 murrdoc a python api interface
23:15 iggy i.e. sites-available vs sites-enabled
23:16 iggy murrdoc: should be able to (iiuc)
23:18 mosen joined #salt
23:19 murrdoc iiuc ?
23:20 iggy if I understand correctly
23:20 iggy i.e. I'm not sure I really get what you're trying to do
23:20 * iggy goes away
23:21 julez joined #salt
23:25 murrdoc have u seen it being used like
23:25 murrdoc ah damnit
23:25 jonlangemak joined #salt
23:25 xDamox joined #salt
23:27 gladiatr joined #salt
23:32 moos3 joined #salt
23:37 righdforsa joined #salt
23:39 forrest joined #salt
23:40 aqua^c joined #salt
23:45 murrdoc basepi:  you there
23:47 subsignal joined #salt
23:48 forrest iggy: https://github.com/orgs/improved-permissions?utm_source=github_site&amp;utm_medium=blog&amp;utm_campaign=organization-permissions had my hopes up for a minute until I realized it was only orgs :(
23:48 forrest It adds the functionality we need to modify a team to only be able to read a repo (and hopefully make PRs)
23:49 murrdoc HAH
23:49 righdforsa hi. if I've got a role-based config, say a managed file I've configured under "baremetal/init.sls", and the file should trigger a restart of a system service that's in another state file, in this case "default/nrpe.sls", what would be the appropriate way to make that happen? is it "include"?
23:49 jonlangemak joined #salt
23:51 forrest murrdoc, iggy: I tweeted at Seth to try and sign us up
23:51 murrdoc forrest:  do u know of a python api for the salt and salt-run cli tools
23:51 forrest would be amazing, if anyone from github hangs out in here, please sign us up for that, we'll test it.
23:52 forrest murrdoc: For the CLI tools? Not http://docs.saltstack.com/en/latest/topics/netapi/index.html ?
23:52 forrest does that not do what you want?
23:53 righdforsa ah, answered my own question. looks like "include" works
23:53 righdforsa for what I want
23:53 forrest righdforsa: Yes, do an include, and then a 'watch_in' in sls B, if you want the service in sls A to be restarted when sls B has file changes.
23:53 forrest righdforsa: Looks like you beat me to it.
23:54 righdforsa heh
23:54 righdforsa forrest: thanks anyway
23:54 mosen hiya murrdoc
23:54 forrest iggy: Seth already submitted the formulas org
23:54 forrest aww yeah
23:55 forrest righdforsa: Yeah np, you should also check out watch_in just as a side note, it's awesome
23:55 righdforsa yep, familiar with watch_in, but only in the same sls file, this is just getting a little harder now that we're using it more
23:56 righdforsa but it's slick
23:58 baweaver joined #salt

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