Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-09-26

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

All times shown according to UTC.

Time Nick Message
00:04 pfalleno1 joined #salt
00:05 jas02_ joined #salt
00:05 amontalban joined #salt
00:08 dandelo_ joined #salt
00:12 amcorreia joined #salt
00:14 pfallenop joined #salt
00:25 MTecknology Apparently cmd.run uses su for runas and I don't see any way to make it use sudo instead
00:30 amontalban joined #salt
00:30 amontalban joined #salt
00:30 mc-fi0n joined #salt
00:33 capn-morgan joined #salt
00:35 dandelo_ joined #salt
00:44 scoates joined #salt
00:47 jas02 joined #salt
00:51 dandelo_ joined #salt
01:04 systo joined #salt
01:07 John_Kang joined #salt
01:08 ashmckenzie joined #salt
01:13 rpb joined #salt
01:20 edrocks joined #salt
01:26 catpigger joined #salt
01:37 justanotheruser joined #salt
01:40 k_sze[work] joined #salt
01:41 sebastian-w joined #salt
01:46 amontalb1n joined #salt
01:47 jas02_ joined #salt
01:47 jas02 joined #salt
02:05 dandelo_ joined #salt
02:12 mpanetta joined #salt
02:15 lilvim joined #salt
02:19 om joined #salt
02:22 jas02_ joined #salt
02:29 sleblanc joined #salt
02:29 ALLmightySPIFF joined #salt
02:30 daxomati1 joined #salt
02:31 titilambert joined #salt
02:31 lubyou joined #salt
02:31 systo joined #salt
02:33 gpampara joined #salt
02:39 jimklo joined #salt
02:48 jas02 joined #salt
02:50 daxomati1 joined #salt
02:58 tiaz joined #salt
03:12 justanotheruser joined #salt
03:14 DEger joined #salt
03:16 armyriad joined #salt
03:22 edrocks joined #salt
03:32 systo joined #salt
03:41 bbbryson joined #salt
03:42 mosen joined #salt
03:49 jas02 joined #salt
03:49 jas02_ joined #salt
03:53 nidr0x joined #salt
04:02 nidr0x joined #salt
04:14 cyborg-one joined #salt
04:22 armyriad joined #salt
04:50 jas02 joined #salt
04:55 jas02_ joined #salt
05:04 DarkKnightCZ joined #salt
05:12 akw joined #salt
05:12 mohae_ joined #salt
05:12 robawt1 joined #salt
05:12 Shirkdog_ joined #salt
05:13 Sarph joined #salt
05:13 snaggleb_ joined #salt
05:13 systo joined #salt
05:13 leev_ joined #salt
05:13 d3c4f_ joined #salt
05:13 tcolvin_ joined #salt
05:14 jamesog_ joined #salt
05:14 aalmenar_ joined #salt
05:14 wryfi joined #salt
05:14 djinni`_ joined #salt
05:15 muep__ joined #salt
05:15 patrek joined #salt
05:15 pcdummy_ joined #salt
05:15 karlthane_ joined #salt
05:15 Antiarc_ joined #salt
05:16 aljosa_ joined #salt
05:16 tuxx__ joined #salt
05:16 saltsa_ joined #salt
05:16 simonmcc_ joined #salt
05:16 alias__ joined #salt
05:16 TyrfingM1olnir joined #salt
05:16 robbintt_ joined #salt
05:16 yidhra_ joined #salt
05:16 the_lale1u joined #salt
05:16 penguinp1wernz joined #salt
05:16 darvon_ joined #salt
05:16 mortis_ joined #salt
05:16 iggy___ joined #salt
05:16 iter_ joined #salt
05:16 jgelens_ joined #salt
05:16 stickmac1 joined #salt
05:16 Hazelesque_ joined #salt
05:16 tuxx___ joined #salt
05:16 psy0rz_ joined #salt
05:16 GothAck_ joined #salt
05:16 ange__ joined #salt
05:16 Steelpan_ joined #salt
05:16 babilen_ joined #salt
05:16 dunz0r_ joined #salt
05:16 __alex_ joined #salt
05:16 pprkut_ joined #salt
05:16 trent_ joined #salt
05:16 binocvla1 joined #salt
05:16 filippos_ joined #salt
05:16 asoc_ joined #salt
05:16 tru_tru_ joined #salt
05:17 lynxman_ joined #salt
05:17 rickflare2 joined #salt
05:17 Corey__ joined #salt
05:17 viq_ joined #salt
05:17 eichiro_ joined #salt
05:18 v0rtex_ joined #salt
05:18 futuredale[uf]_ joined #salt
05:19 ahammond_ joined #salt
05:19 carmony_ joined #salt
05:19 ToeSnacks_ joined #salt
05:19 twiedenbein_ joined #salt
05:19 ramblinpeck_ joined #salt
05:19 aberdine joined #salt
05:19 phtes__ joined #salt
05:19 Sketch_ joined #salt
05:19 LA-Clone joined #salt
05:19 TomJepp_ joined #salt
05:19 telxr joined #salt
05:20 Morrolan_ joined #salt
05:20 artemz- joined #salt
05:20 weylin- joined #salt
05:20 Xevian_ joined #salt
05:20 jerrcs_ joined #salt
05:20 gnord_ joined #salt
05:20 dober- joined #salt
05:20 emid_ joined #salt
05:20 stooj joined #salt
05:20 ccitizen joined #salt
05:20 Sub_Oracle joined #salt
05:20 njg joined #salt
05:21 RobertLaptop_ joined #salt
05:21 pocketprotector joined #salt
05:21 jxm_ joined #salt
05:21 TooLmaN joined #salt
05:21 ixs joined #salt
05:22 Gareth joined #salt
05:23 felskrone joined #salt
05:24 edrocks joined #salt
05:25 sjorge joined #salt
05:26 drags joined #salt
05:27 monokrome joined #salt
05:27 jas02_ joined #salt
05:27 dimeshake_ joined #salt
05:28 rdas joined #salt
05:28 pppingme joined #salt
05:28 jas02_ joined #salt
05:28 joshin1 joined #salt
05:28 joshin1 joined #salt
05:28 jesusaur joined #salt
05:28 AvengerMoJo joined #salt
05:28 darkalia joined #salt
05:29 kaak joined #salt
05:29 Ssquidly joined #salt
05:30 johtso joined #salt
05:30 wm-bot4 joined #salt
05:31 gazarsgo joined #salt
05:31 kutenai joined #salt
05:33 JamieH_ joined #salt
05:34 barmaley joined #salt
05:35 Awesomecase joined #salt
05:41 queso joined #salt
05:43 TyrfingMjolnir joined #salt
05:50 jas02 joined #salt
05:51 jas02_ joined #salt
05:51 jas02_ joined #salt
06:03 ivanjaros joined #salt
06:14 mpanetta joined #salt
06:19 systo joined #salt
06:21 subsignal joined #salt
06:21 narfology joined #salt
06:26 haam3r joined #salt
06:32 yuhlw__ joined #salt
06:33 yuhlw__ joined #salt
06:36 kusen joined #salt
06:41 rem5 joined #salt
06:51 jas02 joined #salt
06:51 free_beard joined #salt
06:57 CeBe joined #salt
06:59 sgo_ joined #salt
07:00 ivanjaros joined #salt
07:05 narfology how can I execute a formula locally? I have a git repo with the formula and I can reference it from master in top.sls, but I want to test it locally on a single node...
07:10 stotch joined #salt
07:13 __newb joined #salt
07:16 babilen_ narfology: Do you have a minion running on that node already?
07:16 narfology babilen_: yes
07:17 narfology it also works when i do salt 'minion_id' whatever
07:17 babilen_ It *might* be that you are looking for "salt-call state.apply test=True", but that depends on what you mean by "locally"
07:17 narfology locally = ssh into minion, run the same stuff locally instead of via salt
07:17 babilen_ As a salt run from the master would also run it "locally" on the minion (albeit orchestrated by the master)
07:17 narfology indeed
07:17 narfology ok
07:17 narfology thanks
07:18 babilen_ Yeah, then salt-call on the minion is what you are looking for. Use "salt-call -ldebug state.apply" for extra information
07:20 dariusjs joined #salt
07:21 synapse_ joined #salt
07:24 narfology Another question: I have an installer filename that is likely to change from time to time, but is currently used like 5 times during the install automation. how can I store this in a variable in an sls?
07:24 babilen I'd configure that in pillars and reference it throughout
07:25 babilen You can then use {% foo_installer = salt['pillar.get']('foo:installer_path') %} in your SLS
07:25 babilen err
07:25 babilen {% set foo_installer = salt['pillar.get']('foo:installer_path') %} that is
07:26 edrocks joined #salt
07:26 narfology ok
07:26 narfology thanks
07:27 babilen That way you can keep all of your "configuration" in the pillar and do not have to faff around with the states if something changes. See https://docs.saltstack.com/en/latest/topics/best_practices.html for some pointers on how to write idiomatic salt
07:29 narfology yeah I read that but I'm often confused. =/
07:29 keimlink joined #salt
07:29 narfology but your example looks like a good start
07:29 ntropy joined #salt
07:31 babilen Good :)
07:32 babilen The idea is to essentially write generic states and keep the "moving" bits in pillars or platform depended "os maps" (cf. map.jinja)
07:33 xmj maps++
07:34 narfology so now I got a foo_installer variable...how would I test it's existence or use it? I have this: {% if not salt['file.file_exists'] ('/absolute/path') %} ... {% endif %}.
07:34 narfology How would I insert the value of foo_installer?
07:35 babilen You can use foo_installer there, but I wouldn't do that. Write a state that manages the presence of that installed and require it in the states that use it.
07:35 keimlink_ joined #salt
07:36 babilen I wouldn't depend too much on local state on the minion, but rather ensure that it is how you want it to be
07:36 babilen If you want the installer to be present, write a state that ensures that it is
07:36 JohnnyRun joined #salt
07:38 ronnix joined #salt
07:52 jas02 joined #salt
07:56 haam3r1 joined #salt
08:00 netcho joined #salt
08:00 mikecmpbll joined #salt
08:05 narfology babilen: yes, but I don't want to copy it over the network everytime, so I need to check if it's there before I ensure it's there
08:06 babilen narfology: You'd do that as part of the state that places it there
08:06 babilen (e.g. "onlyif" or "unless" if not already supported by states such as file.managed or file.archive, ..)
08:06 narfology babilen: yes, but I thought that was what I was doing with the jinja snipped
08:07 babilen Yes, but that is not idiomatic and I wouldn't go down that route. Write a state that manages your installer and define requisites from other states that require the installer to be present
08:07 narfology ok
08:07 narfology thanks
08:07 lubyou joined #salt
08:07 narfology I'll try to adapt my sls
08:07 geomacy joined #salt
08:08 babilen That way you have STATE_A that'll manage your installer (how is this done in detail?) with suitable checks so that it is idempotent and not executed every time. The other states would then require that state and, if the former fails, would fail also as their requisites aren't met.
08:08 narfology so I would use the followiung?  - unless: test -f /tmp/something/ + foo_installer?
08:08 Reverend narfology: I use a test on mine. seems to do the job
08:08 Reverend I do it for an RPM file.
08:08 babilen It really depends how you get hold of the installer in the first place, but yeah, that would be one way
08:09 narfology I fetch it from artifactory and copy it to /tmp/something/foo_installer ;)
08:09 narfology so yeah
08:09 narfology thanks
08:09 babilen Note that it would be "- unless: test -f /tmp/something/{{ foo_installer }}"
08:10 krymzon joined #salt
08:10 narfology ok
08:10 narfology that's important ;)
08:10 babilen https://docs.saltstack.com/en/latest/ref/states/all/salt.states.artifactory.html you might want to use this however
08:10 Reverend narfology:
08:11 Reverend - onlyif: 'test ! -e /usr/lib64/varnish/vmods/libvmod_cookie.la'
08:11 babilen (which is why I asked about details)
08:11 Reverend that's how I do mine
08:11 narfology wow, nice
08:11 narfology thanks again!
08:19 s_kunk joined #salt
08:20 dariusjs joined #salt
08:20 systo joined #salt
08:23 subsignal joined #salt
08:26 sfxandy joined #salt
08:31 lero joined #salt
08:41 killuminati joined #salt
08:41 Couch joined #salt
08:41 killuminati Killuminati ! Banish secret societies like illuminati !!!!! Psychiatry is a FRAUD !!!!!!!!! Israel terrorist state want put me in psychiatric yard!!!!!! Come and destroy this country now!!!!!!!!!
08:41 rpb joined #salt
08:42 mage_ joined #salt
08:42 yuhlw__ joined #salt
08:43 Criggie killuminati: yeah and sometimes a cigar is just a cigar.
08:44 Rumbles joined #salt
08:44 killuminati Psychiatry is a fraud
08:44 killuminati !!!!!÷!÷!
08:45 Reverend what the fuck is wrong with you?
08:45 Reverend gtmanfred, jfindlay: do us a favor. :P
08:48 DarkKnightCZ joined #salt
08:52 ronnix_ joined #salt
08:53 jas02 joined #salt
09:01 Rumbles joined #salt
09:01 auzty joined #salt
09:04 averell joined #salt
09:08 haam3r joined #salt
09:11 fgimian_ joined #salt
09:13 fgimian joined #salt
09:24 dariusjs joined #salt
09:28 edrocks joined #salt
09:29 killuminati joined #salt
09:30 SWA joined #salt
09:31 __newb joined #salt
09:32 netcho joined #salt
09:35 ravenx joined #salt
09:35 ravenx i have my saltstates results returned to my slack channel using the returners of --return slack
09:35 ravenx however, they are in a format that is hard to read:
09:36 rdas joined #salt
09:36 ravenx https://paste.debian.net/841849/
09:36 ravenx how can i make them get posted to slack, but in the format that resembles the highstate one?
09:37 ravenx i tried putting:  salt 'server' test.versions_report --return slack --output=highstate,.....   BUT that highstate output only happens on my command line.
09:42 fredvd joined #salt
09:47 Reverend yo chaps - can you use a nodegroup as a variable in your sls?
09:47 dgorissen joined #salt
09:47 Reverend like you can with the minion id..
09:53 jas02 joined #salt
09:54 dgorissen hey folks
09:54 dgorissen anybody know what the require_reboot option on the network.system state actually does / means?
09:54 Reverend hi dgorissen
09:54 dgorissen documentation is scant
09:54 Reverend I'm gonna say that when the state does something, it'll reboot the box
09:54 Reverend at a guess.
09:56 Reverend in unix, networking config changes usually require a reboot to have 'full' effect. such as changing your hostname
09:56 Reverend you -can- do it on the fly..
09:56 Reverend but to make sure it's working, it's best to reboot the server. Hence why hostnames are one of the first things you do.
09:57 Reverend I'm sure someone will correct me if I'm wrong, but I'm fairly certain that is what it's for.
09:58 dgorissen that is my gut feeling as well, ie, when completed it will reboot the machine
09:58 Reverend https://github.com/saltstack/salt/issues/27716 - seems to suggest I'm right dgorissen
09:58 saltstackbot [#27716][OPEN] salt-ssh: require_reboot is ignored for network.system state | Problem Description...
09:58 dgorissen Im guessing salt wont continue afterwards though
09:58 Reverend thanks saltstackbot
09:58 dgorissen ?
09:58 Reverend dgorissen - I'm fairly sure it does.
09:58 Reverend AFAIK.
09:58 Reverend :S
09:59 babilen Are you using salt-ssh, dgorissen ?
09:59 dgorissen no, master/minion at this point
09:59 dgorissen I guess the thing is to just try and see what happens :)
10:00 dgorissen though the networking states could use some documentation love
10:04 gmoro joined #salt
10:05 killuminati joined #salt
10:07 Reverend babilen - I take it salt-ssh can continue the apply when it comes back up, whereas salt-minion cant?
10:08 Reverend or is it the other way around?
10:08 babilen I'd rather expect it the other way round :)
10:08 babilen (if at all)
10:13 dgorissen Reverend/babilen: just bringing up some VMs to test this now
10:14 Reverend hmm
10:14 Reverend sick. I love virtualisation.
10:14 Reverend makes me moist
10:14 Reverend got 5 HV's here, and all our infrastructure runs on Xen.
10:16 dgorissen ok, interestingly, applying a state with require_reboot: True prints out a warning about a reboot needed but does not actually reboot anything..
10:16 dgorissen this was run with salt-call though
10:17 Reverend kek
10:18 Reverend I'd use a system call to reboot the server with a watch on whatever file it is you're editting.
10:18 Reverend if you -need- a reboot.
10:18 dgorissen yup, not rebooting when called from the master
10:19 Reverend intruiging
10:19 dgorissen my use case is that salt changes the IP address of the minion (dhcp -> static)
10:20 dgorissen but doing that will hang things, requiring a manual reboot. I guess a watch is the best workaround and run the network states last
10:21 babilen dgorissen: Can't you use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event ?
10:24 jas02_ joined #salt
10:26 subsignal joined #salt
10:27 killuminati joined #salt
10:29 Reverend dgorissen - you might wnat to put a salt thingy in your crontab @reboot. I do that with mine so that when the box is span up it fetches the latest things to make sure it's up to date.
10:39 PalTale joined #salt
10:40 dgorissen joined #salt
10:42 dariusjs joined #salt
10:43 dgorissen Sorry, got dragged away.  @babilen: interesting not aware of this. So am I right the sequence of states would be: network state (that changes the ip), reboot state (that reboots the machine), wait state (that waits for the minion to come back up), all my other states
10:43 babilen Yeah
10:43 babilen Not sure how that behaves with "salt-call ..." on the minion tbh
10:43 dgorissen understood, but Im happy to trigger this from master
10:44 Reverend good.
10:44 Reverend I'm glad you're happy dgorissen
10:44 Reverend it makes me happy too.
10:44 dgorissen karma for everybody!
10:44 Reverend +1
10:44 Reverend +1
10:44 Reverend :P
10:44 dgorissen @Reverend: can you clarify what you mean with “salt thingy” :) ?
10:45 Reverend make a fetch from master and run your salt thingies
10:45 Reverend run your states so that it's up to date.
10:45 dgorissen gotcha
10:45 Reverend not necessary, but it saves hastle of having to run it when you add a new box to a cluster. If you're virtualising I guess you do that alot
10:46 Reverend so it saves hella time
10:48 N-Mi joined #salt
10:50 uubbccddefff joined #salt
10:51 uubbccddefff test.ping
10:51 uubbccddefff fasasdfasdf
10:51 uubbccddefff asdfasdf
10:51 uubbccddefff afdsasdf
10:51 uubbccddefff asfdas
10:51 uubbccddefff asdfasdf
10:51 Reverend wtf is wrong with you people
10:51 Reverend uubbccddefff - GTFO.
10:52 Reverend i think babilen needs @
10:52 babilen *shrug*
10:52 Reverend don't you shrug at me. you're a hero in here...
10:53 Reverend we need someone with the hammer of thor to beat stupid spambots to hell
10:53 Reverend :P
10:54 jas02 joined #salt
10:59 amcorreia joined #salt
11:02 narfology What am I doing wrong? https://gist.github.com/l3m/90f4b309e21408feec2fc518633c3646
11:02 Reverend what's your error?
11:03 narfology the download-{{ foo_installer }}: is not expanded
11:03 narfology seems that foo_installer is not set
11:03 narfology error is Conflicting ID 'download-'
11:04 netcho joined #salt
11:11 narfology doesn't replace the part in the second jinja line
11:13 Rumbles joined #salt
11:13 Reverend can you echo out your pillar? just do it on the CLI to see if those values exist
11:14 AndreasLutro you don't use {{ }} inside strings
11:14 AndreasLutro set foo_installer = salt['pillar.get']('foo_installer:' ~ foo_installer_part)
11:14 AndreasLutro ~ concatenates strings
11:14 Reverend yus
11:15 Reverend it's already jinja, just reference the variable with foo_installer_part
11:15 Reverend no need for ' & ' either end or it won't parse it properly
11:15 Reverend i don't think
11:15 Reverend " & " in most languages
11:17 narfology AndreasLutro: ok, great, thanks
11:17 Reverend or do what AndreasLutro suggests
11:17 narfology Didn't know that
11:17 Reverend that'd work too
11:20 narfology hmm still doesn't work
11:20 narfology I added the pillar into the gist
11:20 narfology (lower part)
11:20 DarkKnightCZ joined #salt
11:25 jespada joined #salt
11:27 dariusjs joined #salt
11:27 dgorissen @babilen: to pick up on your rebooting recommendations. Running the salt.function system.reboot fails with “Could not access /var/cache/salt/master. Path does not exist”
11:28 dgorissen Im confused as to why its looking for that on the minion
11:29 tru_tru joined #salt
11:30 edrocks joined #salt
11:35 narfology still doesn't work: https://gist.github.com/l3m/90f4b309e21408feec2fc518633c3646
11:36 AndreasLutro you don't have foo12_installer in your pillar
11:36 narfology I pasted the pillar below, and I verified with salt '*' pillar.items that the data is mapped
11:38 narfology even with that fixed, it doesn't replace the jinja snipped in download-{{ foo_installer }}:
11:38 narfology but instead complains about conflicting id 'download-'
11:40 AndreasLutro you say you "verified with salt '*' pillar.items" but you only need to verify on the specific host you're running against
11:41 narfology it's also on that specific host
11:41 toanju joined #salt
11:41 AndreasLutro try `salt 'minion' pillar.get foo_installer:1`
11:42 Reverend same error narfology ?
11:42 narfology ok we're on track
11:43 narfology it returns the values for 1 and 2 if I just ask for pillar.get foo_installer
11:43 narfology but nothing for pillar.get foo_installer:1
11:43 Reverend kek
11:43 AndreasLutro pillar.get probably doesn't work well with integer keys
11:43 AndreasLutro why don't you just make foo_installer a list?
11:43 narfology ok i'll try '1', etc
11:43 Reverend https://cdn.meme.am/instances/62564828.jpg
11:43 AndreasLutro no that won't make a difference
11:44 AndreasLutro probably
11:44 narfology maybe zip1?
11:44 Reverend pillars are dicts, so it's based on key: value mapping anyway. Can you not just use it's ACTUAL key?
11:45 AndreasLutro left you a comment narfology
11:45 AndreasLutro on the gist
11:45 narfology well it has _n_ installer parts
11:45 narfology oh thanks AndreasLutro
11:45 narfology that looks very reasonable :)
11:46 Reverend nice AndreasLutro. I like.
11:46 Reverend does jinja handle iterables very well?
11:46 narfology so you made it a list, and now I can just iterate through the list directly
11:46 narfology if I get it right
11:50 narfology yeah, that worked
11:50 narfology thanks again!
11:52 subsignal joined #salt
11:53 Rumbles joined #salt
11:55 jas02 joined #salt
11:55 Patch joined #salt
11:58 teryx510 joined #salt
12:02 numkem joined #salt
12:05 narfology is there a way to debug into a salt-call with a debugger like pycharm?
12:06 netcho joined #salt
12:08 nagri joined #salt
12:08 nagri hey guys
12:08 Patch joined #salt
12:08 nagri can I define variables in a salt folmulas inbetween the file.
12:10 nagri something like this http://pastebin.com/AzngcXYq
12:11 Deliant joined #salt
12:19 dgorissen joined #salt
12:21 ksk narfology: dont really know how to put pycharm in there, but you can always do "salt-call -l debug (or even trace, if you really want it..)
12:21 ksk "
12:23 leev_ joined #salt
12:24 ronnix joined #salt
12:26 leev_ joined #salt
12:27 XenophonF joined #salt
12:27 abonilla joined #salt
12:30 _JZ_ joined #salt
12:35 west575 joined #salt
12:36 cyborg-one joined #salt
12:36 daxomatic joined #salt
12:36 dariusjs joined #salt
12:47 pratch joined #salt
12:49 voxpop joined #salt
12:51 dyasny joined #salt
12:55 akhter joined #salt
12:56 jas02 joined #salt
12:56 subsignal joined #salt
12:58 akhter joined #salt
13:00 akhter_1 joined #salt
13:08 ronnix joined #salt
13:08 keimlink joined #salt
13:08 XenophonF I would much, much, much rather salt-api relied on the web server for authorization.
13:09 jas02_ joined #salt
13:09 XenophonF much
13:10 Brew joined #salt
13:15 akhter joined #salt
13:19 akhter joined #salt
13:21 babilen XenophonF: Can't you configure that?
13:28 felskrone can i match an undefined pillar in top.sls? the pillar 'testing' pillar may not be defined for a host and im having trouble checking if its undefined. it works fine if set to false.
13:29 felskrone I@testing:False works fine if defined, same goes for True. But I@testing:None does not match if its not defined at all
13:32 Reverend why don't you just false all things that are none?
13:32 Reverend :S
13:32 Reverend also - I have no idea.
13:32 edrocks joined #salt
13:32 Reverend someone else will though no doubt
13:32 Reverend im just interested
13:32 XenophonF babilen: it doesn't look like rest_whatever uses REMOTE_USER
13:33 felskrone Reverend: because i dont want to have to assign the role "not testing" to all minions explicitly, just the "testing" role to some
13:34 Ahlee joined #salt
13:35 babilen felskrone: Well, then you should use the "role" pillar and assign a list of roles ..
13:35 babilen That would allow you to Use I@roles:testing
13:35 babilen The way you do it you are, essentially, saying that all of your minions have a "testing" pillar, while only some do
13:35 Reverend felskrone: makes logic.
13:36 felskrone i guess a list of roles will do, checking...
13:36 abonilla joined #salt
13:36 babilen I think that would be easier in your case
13:37 dgorissen left #salt
13:37 tapoxi joined #salt
13:41 felskrone babilen: works as desired, thx
13:42 dariusjs joined #salt
13:43 17SAADTF8 joined #salt
13:44 XenophonF hm, i wonder what it would take to add SAML ECP support to the salt CLI...
13:46 amontalban joined #salt
13:46 amontalban joined #salt
13:47 mjimeneznet Hello, is any way to know why a "if 'full_fqdn" in grains['host']" is working? any way to debug that?
13:48 AndreasLutro there's not much to debug is there
13:49 racooper joined #salt
13:51 akhter joined #salt
13:52 mjimeneznet the problem is that this if doesn't work with one host only, for the other hosts works perfect
13:56 jas02 joined #salt
13:58 JohnnyRun joined #salt
13:58 AndreasLutro have you checked that the "host" grain is what you expect it to be
13:58 AndreasLutro ?
13:58 fredvd joined #salt
14:02 DEger joined #salt
14:04 jas02 joined #salt
14:08 zer0def quick question - is there a way to change the outputter from, say, a state call?
14:08 racooper joined #salt
14:13 akhter joined #salt
14:16 mjimeneznet AndreasLutro: Yes, I only have 3 servers and one of them is failing in this if
14:17 fxhp joined #salt
14:17 mjimeneznet nothing too complex
14:18 AndreasLutro mjimeneznet: you'll have to share more info, like `salt-call grains.get host` output and the sls you're running
14:20 mjimeneznet well the host doesn't have the hostname, just a randon number and letter
14:22 AndreasLutro okay, maybe the hostname got changed after the salt minion got started?
14:22 armonge joined #salt
14:23 mjimeneznet as example mysql01.com answers as 2f, mysql02.com (this one is working) answers as 2e
14:23 mjimeneznet but no one answer with the full host
14:24 mjimeneznet and mysql02.com works and mysql01.com doesn't work
14:24 mjimeneznet When I say that doesn't work is the "if" clause
14:25 angvp joined #salt
14:25 nicksloan joined #salt
14:28 moos3 left #salt
14:28 heaje joined #salt
14:29 averell joined #salt
14:34 binocvlar joined #salt
14:35 akhter joined #salt
14:38 armonge joined #salt
14:43 akhter joined #salt
14:43 debian112 joined #salt
14:43 DEger joined #salt
14:45 tiwula joined #salt
14:45 binocvlar joined #salt
14:46 nicksloan joined #salt
14:48 armonge joined #salt
14:51 concernedcitizen joined #salt
14:51 concernedcitizen joined #salt
14:51 Tanta joined #salt
14:53 viq Hm, can I use 'pillar.get' instead of 'grains.get' as mine_function to put stuff in mine?
14:54 spuder joined #salt
14:54 Rumbles anyone else noticed the ubuntu ppa for salt seems to have gone AWOL?
14:54 * viq tries
14:54 cmarzullo viq I've used cmd.run as a mine fuction. where the args is echo. So I suspect you can put just about anything in.
14:55 viq nice, let me see
14:55 Rumbles oh, launchpad is being updated :/
14:57 jas02 joined #salt
14:59 jas02_ joined #salt
15:00 jas02_ joined #salt
15:01 subsignal joined #salt
15:03 viq yup, it works :)
15:03 * viq is working on automating monitoring based on salt data
15:04 Rumbles what monitoring solution are you using?
15:06 viq right now putting icinga2 in place
15:07 Rumbles coo, that's a new one on me, we use shinken and I've used zabbix in the past
15:07 viq We had to bury our zabbix instance and decided it's a good moment to move to something nicer
15:09 Rumbles nicer than zabbix? wow, I always liked zabbix
15:10 hasues joined #salt
15:10 hasues left #salt
15:11 viq https://pbot.rmdir.de/E9oAF3EoYcEhIAwcEmV5mg   - any idea why I'm getting the result I'm getting, and how to fix that?
15:11 viq Rumbles: I don't :P
15:11 winsalt_ Would anyone know why __salt__ in a pillar file is referencing the masters grains, instead of the minions grains on 2016.3?
15:12 viq winsalt_: pillars are rendered on master
15:12 viq Which may or may not be an answer to your question...
15:13 rubenb joined #salt
15:14 cswang joined #salt
15:15 BlackMaria joined #salt
15:15 concernedcitizen joined #salt
15:15 concernedcitizen joined #salt
15:15 mikecmpb_ joined #salt
15:15 rubenb Hi, with states, is this valid syntax to run a state when the lvm module is presen: "{% if salt.get('lvm.pvpresent', False) %}"
15:17 rubenb (It works, just checking if this does nothing crazily inefficient)
15:18 jimklo joined #salt
15:23 akhter joined #salt
15:24 _aeris_ joined #salt
15:25 _aeris_ hello #salt !
15:25 _aeris_ is there any way to ensure about the content of a directory ?
15:26 nicksloan joined #salt
15:26 raspado joined #salt
15:26 _aeris_ for example, I deploy all my /etc/apt/sources.list.d with file.managed, but I want to be sure there is only the files I managed on sources.list.d
15:28 viq _aeris_: file.recurse with clean=True  ?
15:29 _aeris_ not really usable, i have multiple file.managed and deploy conditionnaly from grains :s
15:29 rubenb _aeris_: Put them in different folders?
15:29 Heartsbane joined #salt
15:30 viq 'require_in: - file: clean sources dir' in each of them
15:30 _aeris_ i don’t understand how it can work… :s
15:31 _aeris_ if I have sources.list.d/a.list and sources.list.d/b.list at the begining, and file.managed a.list and c.list, i want to have only a.list and c.list at the end
15:32 _aeris_ deploying with file.recurse will remove a when deploying c…
15:33 _aeris_ and if i deploy with file.managed only, b will remain at the end
15:33 viq _aeris_: "Make sure that only files that are set up by salt and required by this function are kept. If this option is set then everything in this directory will be deleted unless it is required."
15:33 whytewolf _aeris_: keep your file.manages. have them require a file.directory with clean: true and use exclude_pat to set a pattern
15:34 edrocks joined #salt
15:34 _aeris_ whytewolf > problem is my files are conditional to grains :s
15:34 viq So you have file.recurse on empty directory, and have each file.managed that's to be in there have require_in that empty file.recurse
15:34 whytewolf _aeris_: so setup several possable patterns that can also be controlled by grains"
15:34 _aeris_ so exclude_pat is dynamic and not known at the start of the state :s
15:36 _aeris_ whytewolf > hum… will try this
15:36 cscf joined #salt
15:37 whytewolf also viq is right. clean should ignore anything that is setup as require
15:37 whytewolf [although i would use file.directory not file.recurse]
15:38 viq Oh, right, I didn't see clean in directory when I was reading.
15:38 viq So yes, file.directory
15:38 cscf I have 2 states applied to a minion.  They need to run the right order.  What's the cleanest way?  If I just - require in one, it says the other is not found.
15:38 nicksloan joined #salt
15:39 whytewolf cscf: this sounds like they are in different sls files. if so then the one with the require statment needs to include the other sls
15:40 cscf whytewolf, ok.  Is it ok to include and also apply directly in top.sls, or will that conflict?
15:40 whytewolf humm, don't know never tried that. it should be fine ... in theory
15:41 whytewolf or it might detect the state twice and throw an error.
15:41 _aeris_ viq > seems working \o/
15:41 _aeris_ thanks !
15:41 _aeris_ but not very intuitive :P
15:42 viq I don't think you can 'include' in top.sls
15:42 ZachLanich joined #salt
15:43 whytewolf viq: i think he means include in the other sls while the included sls is also setup in top
15:43 viq ah
15:43 cscf correct
15:43 DarkKnightCZ joined #salt
15:44 cscf However, I think I just realized a better way to structure it
15:47 cscf require_in is probably cleaner.
15:47 Salander27 joined #salt
15:53 fxdgear joined #salt
15:57 viq https://pbot.rmdir.de/E9oAF3EoYcEhIAwcEmV5mg   - any idea why I'm getting the result I'm getting, and how to fix that?
15:58 jas02 joined #salt
16:01 mpanetta joined #salt
16:02 nicksloan joined #salt
16:02 mpanetta joined #salt
16:03 Trauma joined #salt
16:07 ageorgop joined #salt
16:08 perfectsine joined #salt
16:10 ageorgop joined #salt
16:11 mikecmpbll joined #salt
16:11 JohnnyRun joined #salt
16:12 cmarzullo what are you expecting? You want to deref the return from mine.get?
16:15 viq I'm getting vars.status = "{'elk.example.internal': 'dev'}"    I want to get vars.status = "dev"
16:15 cmarzullo gotta screw with jinja. So like {{ salt.mine.get | values | join }}
16:16 viq I'll get back to this tomorrow, time to go swimming ;)
16:16 cmarzullo <-- jelly
16:16 impi joined #salt
16:18 mikecmpb_ joined #salt
16:20 lero joined #salt
16:23 spuder_ joined #salt
16:25 sandro__ joined #salt
16:25 woodtablet joined #salt
16:27 pipps joined #salt
16:38 akhter joined #salt
16:45 MajObviousman so who here is using gitfs (if anyone), and could I tug on your ear for a minute about best practices
16:45 chrism joined #salt
16:48 scottcrooks joined #salt
16:48 Salander27 joined #salt
16:48 sc250024 Is anyone else having issues with reactor 'state.highstate' events after 2016.3.3 update?
16:49 ronnix joined #salt
16:49 jenastar joined #salt
16:50 Edgan_ joined #salt
16:50 subsignal joined #salt
16:51 subsigna_ joined #salt
16:56 akhter joined #salt
16:58 XenophonF MajObviousman: what are your questions?
16:59 jas02 joined #salt
16:59 dariusjs joined #salt
17:00 tapoxi joined #salt
17:01 lero joined #salt
17:02 mikecmpbll joined #salt
17:07 bfrog joined #salt
17:07 bfrog using salt-cloud -p myprofile my-new-host is there a nice way I could update dns records at that point?
17:08 bfrog maybe using a reactor with something like boto_route53
17:08 DammitJim joined #salt
17:08 bfrog or I guess I could do it also in the salt states, I'd just need to know the name of the minion perhaps
17:11 MajObviousman XenophonF: are there any functional differences between the providers pygit2, gitpython, and dulwich?
17:15 MajObviousman from the warnings on the gitfs tutorial, it seems pygit2 is full of possible fail
17:15 XenophonF MajObviousman: Functionally, they work pretty much the same.
17:15 XenophonF pygit2 has some limitations due to the fact that it uses libssh2 underneath.
17:16 MajObviousman so then the choice comes down to what's easiest to maintain
17:16 XenophonF I use GitPython to interface with both GitHub and AWS CodeCommit.
17:16 MajObviousman that's good to know
17:16 MajObviousman I have never heard of or touched Dulwich
17:16 MajObviousman so I'm leaning towards GitPython myself
17:16 XenophonF And I configure GitPython via users-formula (to push SSH keys and config to the salt-master service account).
17:17 MajObviousman interesting, you're self-managing the link with salt
17:17 XenophonF if you'd like to see a sample config that uses salt to configure a salt-master via salt-formula and users-formula, take a look at https://github.com/irtnog/salt-pillar-example/blob/master/salt/example/com/init.sls
17:17 MajObviousman I would, yes very much
17:17 MajObviousman thank you
17:17 XenophonF iirc users-formula can push git configs, too, if need be
17:18 MajObviousman are you versioning your pillar data too?
17:18 XenophonF yes
17:18 XenophonF i just migrated my pillar data to a private CodeCommit repo
17:18 MajObviousman so then, I'm assuming your bare repo is private--yep
17:18 XenophonF at the same time i started using the gpg renderer
17:18 XenophonF my state repo is public - https://github.com/irtnog/salt-states
17:19 XenophonF and i have a variety of my own formulas, also public
17:19 XenophonF look for the ones that aren't forks from saltstack-formulas
17:19 MajObviousman (+1) makes sense, thanks
17:19 XenophonF e.g., active-directory-formula, apache-formula, shibboleth-formula, tomcat-formula
17:19 MajObviousman do you have syndic or other more complicated setups in your background?
17:20 XenophonF no
17:20 XenophonF not right now, anyway
17:20 MajObviousman multiple repos seems like an interesting mechanic. I could have an intensely private, devops-eyes-only repo up first, then a more public one after it
17:20 XenophonF i'll probably end up deploying additional masters, since i need to manage multiple data centers that aren't interconnected
17:21 XenophonF the fact that my pillar data is on codecommit is because this is my home network config (which i use as a dev environment for work), and because codecommit is basically free for me
17:21 XenophonF at work, both our states and pillars are in private git repos
17:21 XenophonF er, github i mean
17:22 MajObviousman do I need to alter my state files to yank out salt:// in my URIs?
17:22 XenophonF no
17:22 XenophonF you need to add 'gitfs' to file_roots in the master config
17:22 XenophonF oh
17:22 watersoul joined #salt
17:22 XenophonF i'm actually using both roots, s3fs, and gitfs
17:22 MajObviousman aha I just got down to that part
17:22 MajObviousman yessss, that's exactly what I need
17:22 XenophonF and salt combines all three neatly for me
17:22 MajObviousman keep the big binaries out of my repos
17:22 XenophonF so large files (e.g., dists) live in s3
17:23 MajObviousman perfect
17:23 MajObviousman man, way to go salt, this is super useful and powerful
17:23 MajObviousman ok, great!
17:23 MajObviousman any pitfalls you've run into that I should be mindful of?
17:23 XenophonF um, i dont have my s3fs config posted
17:23 XenophonF i'll have to add it
17:23 XenophonF well,
17:24 XenophonF i use environments for states
17:24 XenophonF so i purposefully keep the base environment (== master branch in git) empty
17:24 XenophonF i just have a top.sls there and use it for targeting
17:24 MajObviousman makes sense
17:24 XenophonF then i assign environment/role in pillar, keyed off the minion ID
17:24 MajObviousman that can get confusing I bet, because github et all default to master branch
17:24 XenophonF other people use grains
17:24 XenophonF right
17:24 * MajObviousman will have to do some training
17:25 XenophonF and i set up my git repo special
17:25 XenophonF the master branch and the dev/test/stage/prod branches are separate
17:25 XenophonF i think i have a gist somewhere that shows the commands i used, hang on
17:25 MajObviousman we too are assigning environment/role/other factoids via pillar
17:26 XenophonF hang on a sec i'll be right back
17:26 MajObviousman I love this gitfs concept because it neatly solves the "How do we allow devs to carve out environments just for them" by letting them make branches
17:26 MajObviousman sure, thanks
17:26 * MajObviousman has a lot more reading to do
17:27 zer0def hell, i'll try again - anyone knows whether i can change the outputter outside of specifying `--out` on the cli?
17:27 MajObviousman ugly hack alert: shell alias?
17:28 drawsmcgraw joined #salt
17:28 MajObviousman oh hey, there's an option in /etc/salt/master
17:29 MajObviousman # Set the default outputter used by the salt command. The default is "nested". #output: nested
17:30 zer0def MajObviousman: yeah, obvious of that, too
17:30 zer0def erm, sorry; outside of that, too
17:30 * MajObviousman must live up to his namesake, after all
17:31 XenophonF ok i'm back
17:31 zer0def my intended use case is to change an outputter for an orchestrate call (or modules called inside) via api, without overriding default config
17:32 XenophonF MajObviousman: here's the command i used to init my salt states git repo
17:32 XenophonF https://gist.github.com/xenophonf/95357d87b6e0b5e2b0e6
17:32 XenophonF er, script i mean
17:32 XenophonF written against tcsh b/c i'm perverse
17:32 MajObviousman s/perverse/particular/
17:33 MajObviousman t'ain't no bad thing to know what you want
17:33 XenophonF so like i said, the dev branch is separate from master
17:33 XenophonF and then test branches from dev
17:33 XenophonF staging from test
17:33 XenophonF prod from staging
17:33 MajObviousman merges all the way down
17:33 XenophonF yup
17:34 * MajObviousman will have all of those branches, plus an audit branch, some devops playground ones, and the individual developer environment branches when we get that far
17:34 XenophonF and by keeping master and development separate, you don't get ugly "this branch is ahead/behind X commits" messages in github
17:34 MajObviousman I've been eyeballing how to maintain all these different environments without things going chaotically off a cliff
17:34 MajObviousman seems like gitfs is a really good solution
17:34 XenophonF yeah
17:34 XenophonF and then we (loosely) follow a github flow model, so we develop config states in the development branch
17:35 XenophonF merge them into testing (which we hope to semi-automate using jenkins or something)
17:35 XenophonF and then once things get tested to our satisfaction and we have CAB approval to make production changes, we merge testing to staging
17:35 ponyofdeath joined #salt
17:36 edrocks joined #salt
17:36 XenophonF we use state.sls/state.apply to push the new config states to production, then run user acceptance tests
17:36 XenophonF if those fail, backout is simply a matter of running a highstate in production, which restores configs from the production branch
17:36 XenophonF if we pass UAT, we merge staging to production
17:36 dyasny joined #salt
17:36 XenophonF the production branch always reflects what we're running today
17:37 MajObviousman me likes
17:37 XenophonF i'm debating on whether to apply a similar workflow to pillar data
17:37 XenophonF but currently, i don't
17:37 MajObviousman that's what we're heading for
17:38 XenophonF there's some ugliness - the dev branch has a lot of fixme commits
17:38 bfrog ok I think I can do it with just the salt state file, I see how to do it now
17:39 ponyofdeath hi, trying to figure out how to set a var in jinja use it again to join a string to another variable. ie set ldap_base= 'blah' ldap_base_dn = "blah1 lbah2 {{ ldap_base }}"
17:39 XenophonF i keep meaning to switch to developing states locally using vagrant etc.
17:40 XenophonF at work we're hosting our salt master in aws
17:40 XenophonF so we needed to bootstrap it from states/pillars stored in git
17:40 tbrb joined #salt
17:40 XenophonF er, github i mean
17:40 XenophonF so this is the script i wrote to bootstrap our salt-master
17:40 XenophonF https://gist.github.com/xenophonf/d8da7f47ea29d9ad46e7
17:41 XenophonF it's the old config, so again the s3fs stuff isn't in there
17:41 XenophonF i added that later
17:41 XenophonF so once bootstrapping's done, the salt-master manages itself
17:42 XenophonF er, does this answer your questions, MajObviousman?
17:42 dariusjs joined #salt
17:42 MajObviousman yes, very much so
17:42 MajObviousman you've been a tremendous help, thank you
17:42 XenophonF you're welcome
17:42 MajObviousman are these gists semi-permanent, or should I copy the contents out into my notes?
17:42 XenophonF you can fork the gists, but i don't plan on deleting them
17:42 MajObviousman sweet, thanks
17:43 nate_c joined #salt
17:43 XenophonF btw this is far from the only way to organize stuff
17:43 XenophonF other people like iggy or Ryan_Lane or babilen or AndreasLutro organize things differently
17:44 MajObviousman yes, I've been mildly overwhelmed with salt's flexilibity and all the things I _COULD_ do
17:44 XenophonF oh definitely
17:44 XenophonF same here
17:44 MajObviousman git flow and separated environmeents, merging changes down the line makes sense to me
17:44 MajObviousman so it'll be a good place to start
17:44 XenophonF cool!
17:44 MajObviousman and if it doesn't suit our needs, we'll make changes as we go
17:46 babilen MajObviousman: I use the salt-formula extensively and deploy it via salt-ssh initially on bare bone servers: https://github.com/saltstack-formula or trigger an "orchestration" run from the PXE install late script.
17:47 babilen We also use separate master per environment and don't let GitFS to the "auto branch" horror
17:47 babilen *do
17:47 iggy ^
17:47 iggy was just going to say that
17:48 chrism Is there an easy way to write a formula that can output a textfile of all other formulas involved in a highstate on a particular environment?
17:48 onlyanegg joined #salt
17:49 chrism e.g., web01.domain.com has the formulas "apache" and "mysql".  After a highstate, we'd automatically create something like /tmp/highstate.txt which contains "apache" and "mysql"
17:52 MTecknology I imagine you could easily use file.append to accomplish that
17:52 MTecknology with -watch, of course
17:52 dnull[m] joined #salt
17:53 chrism Sure, the thing that I don't get is how to get an accurate list of all formulas applied to a specific host during a highstate
17:54 iggy formulas aren't really a concept inherent in Salt... it's mostly just an informal way to format/package related states
17:54 * MTecknology refuses to use formulas
17:54 chrism right, call it states then
17:54 chrism =)
17:55 MTecknology you could just check what's present in the highstate structure
17:55 chrism I've used the term interchangebly tbqh, not sure if that's the "right" thing or not
17:55 schemanic joined #salt
17:55 iggy state.show_highstate
17:56 jas02 joined #salt
17:56 MTecknology if that's not granular enough, you could check lowstate, but life gets painful pretty quickly if you're not someone like iggy or tom
17:56 schemanic Hey, can anyone explain how boto states get run? Boto manages aws infrastructure that can't be salted, but because they are state modules,  they have to run on something.  Where are these states running?
17:56 dyasny joined #salt
17:56 chrism Right, but I'm missing how to source that data from within a state, if that makes sense
17:57 MTecknology there's a nice easy salty way to do it, but I can't remember what that is :(
17:58 chrism yeah that's what I'm looking for
17:58 iggy schemanic: anywhere (although I assume typically the master or some sort of utils box)
17:58 chrism I feel like there's a "right" way, and I just can't piece it together
17:58 MTecknology I've done something like that with lowstate data before, but it was years, and only for a one-time break-fix thing
17:58 iggy I've never heard of anything like that
17:58 iggy (aside from what's been mentioned)
17:59 nicksloan joined #salt
17:59 MTecknology I can't picture a sane use case, but that's not for me to worry about. :P
17:59 chrism aye this is for CI integration
17:59 chrism so like /srv/salt/<state>/tests/ can get pulled in and tests run for ~only~ the things on that image
18:00 chrism i dunno I can probably find a hacky way to do it, but meh
18:00 chrism hehe
18:00 iggy we have travis jobs that compare the lowstate between runs
18:00 MTecknology Why don't you just add a grains.present state that depends on the thing being installed?
18:01 chrism Aye, that would work
18:01 MTecknology I guess... grains.append
18:01 chrism I think I was just looking for something a bit cleaner if that makes sense, ya know?
18:01 __newb joined #salt
18:01 chrism well thanks, I appreciate the help. :)
18:02 MTecknology trying to maintain a text file log representing states being applied to a system doesn't really strike me as "cleaner"
18:03 chrism jenkins doesn't really read grains. :)
18:03 chrism nor does rspec
18:03 chrism w/o ducttape that is
18:04 Tanta jenkins can read yams
18:04 Tanta yaml
18:04 chrism yep
18:04 Tanta and can take custom HTTP triggers to fire jobs
18:04 chrism but something has to build the yaml
18:04 Tanta it can be integrated into a Salt workflow fairly easily
18:05 chrism aye, job triggering for us is done at the PR level
18:05 mikecmpbll joined #salt
18:05 hlub chrism: what about a returner?
18:05 chrism so branch is cut, work done, PR created, tests run, etc
18:06 chrism ya know i've never tinkered with the returners before
18:06 chrism the other annoying bit is I'm firing this via packer, so I need whatever is getting read to be local to the VM
18:06 chrism so if the returner could dump to the provisioned machine, that'd be great
18:06 wendall911 joined #salt
18:07 hlub isn't a returner still possible?
18:07 chrism honestly, I don't know, I'll do some reading
18:07 hlub haven't played with those either but thinkt that it could be
18:08 hlub anyway, the data of those jobs is saved and there are ways to query it afterwards.
18:08 chrism intersting, yeah I think I might be able to do it with a returner
18:08 chrism aye
18:09 sc250024 joined #salt
18:09 jrklein joined #salt
18:10 MTecknology 13:05 < chrism> aye, job triggering for us is done at the PR level
18:10 MTecknology chrism: pretty comman/standard practice is to have a git push trigger an event that the master reacts to
18:10 schemanic- joined #salt
18:10 MTecknology You could easily tie that into a PR
18:11 chrism the problem we've run into there is a push/commit against a branch changes the SHA triggering a CI run on every commit
18:11 teryx510 joined #salt
18:11 chrism which kills the git/jenkins boxes with a big team =)
18:11 MTecknology doesn't have to be triggered on a push
18:11 sc250024 anyone having issues with "salt/cloud/*/created" reactor events?
18:11 MTecknology and it's easy to build rate limiting into processes like that
18:11 chrism ehhhhh kinda
18:12 chrism depends on the test suite
18:12 * MTecknology sighs
18:12 MTecknology k, I gotta get back to replacing salt masters
18:12 __newb joined #salt
18:14 hlub chrism: you can't store the output of a highstate within that highstate, of course, but you can create a state that calls state.apply for the test sls. didn't check but state.apply may contain runner or outputter parameters...
18:15 chrism aye, I JUST found out that it'll dump the JID but nothing else
18:15 chrism hrm
18:15 chrism i'll poke around
18:15 chrism thank you for the pointers
18:15 sgo_ joined #salt
18:17 tapoxi joined #salt
18:25 akhter joined #salt
18:28 Trauma joined #salt
18:29 perfectsine_ joined #salt
18:31 mikecmpbll joined #salt
18:32 toastedpenguin joined #salt
18:34 winsalt_ does anyone have any insight on what has changed with the __salt__ object in 2016.3
18:34 ageorgop joined #salt
18:35 schemanic joined #salt
18:36 cliluw joined #salt
18:37 Salander27 joined #salt
18:40 ssplatt joined #salt
18:43 ssplatt is the mine shared between minions even under different syndics?
18:44 ssplatt my mind thinks it should be, but my tests are showing otherwise
18:45 iggy ssplatt: there are tickets open about that... it's expected not to work presently
18:45 iggy (which is one of the things that makes syndics less than perfect
18:45 ssplatt boo. kind of ruins the idea of making 1 central ca then
18:45 nicksloan is there a better option than grains_config in Vagrant for setting grain values dynamically on `vagrant up`?
18:47 nicksloan I have some data that I use in my Vagrantfile that I would love to make a grain, but the idea of having to create and maintain a new grains file for every team member is pretty unappealing.
18:48 cmarzullo I generally shy away from grains.
18:48 cmarzullo Most things can be done with pillar.
18:49 nicksloan cmarzullo: I want to use the value in a few different locations in the pillar
18:50 nicksloan maybe my only option is to specify it redundantly, but that is a bit of a bummer.
18:52 cmarzullo You can use jinja macros and stuff in pillar.
18:52 cmarzullo or import from a yaml file.
18:52 cmarzullo Or simply include another pillar in your pillar.
18:56 mohae joined #salt
18:57 jas02 joined #salt
18:57 nicksloan so I can pillar while I pillar?
18:58 babilen Qyou can't
19:01 regretio does the ansible roster actually work when sourcing from script that outputs json?
19:01 afics joined #salt
19:02 lumtnman joined #salt
19:05 lumtnman joined #salt
19:05 cmarzullo You can't pillar while in pillar. But you can include within pillar.
19:06 cmarzullo I often have my init.sls simply include various sub files.
19:08 regretio cmarzullo: doesn't the stack pillar allow pillar in pillar?
19:08 cscf Does /data need it's own .htaccess file?
19:09 cmarzullo I'm not sure what you mean. But I what doens't work is using {{ pillar.get }} inside pillar
19:09 cscf wrong channel
19:12 onlyanegg joined #salt
19:12 nixjdm joined #salt
19:14 nicksloan cmarzullo: I was just referencing the Xzibit meme because of your response. :-)
19:15 nicksloan including in pillars is a weird thing that I haven't quite grasped the use case for yet.
19:16 nicksloan like, I always think "Why not just add that to the top file, or put both in the same file?" I guess the argument is for tighter organization and smaller pillar SLS files.
19:17 netcho joined #salt
19:21 akhter joined #salt
19:23 teryx510 joined #salt
19:26 pipps joined #salt
19:31 ajw0100 joined #salt
19:37 edrocks joined #salt
19:38 akhter joined #salt
19:39 cmarzullo nicksloan: https://gist.github.com/anonymous/7c393efef8ce954e3c9ca16e7ce028ca
19:40 cmarzullo break pillars down into smaller reusable chunks.
19:40 nicksloan yeah
19:40 nicksloan makes sense
19:40 nicksloan I've handled that mostly with more explicit targeting, but that way would likely be better.
19:40 jas02 joined #salt
19:41 cmarzullo I do a mix really. Sometimes I have general defaults. Other times specific.
19:43 impi joined #salt
19:45 schemanic- joined #salt
19:48 dtsar joined #salt
19:49 schemanic joined #salt
19:53 schemanic- joined #salt
19:54 cscf I have a service.running for apache2, with a bunch of 'watch' and 'watch_in' statements to restart it.  But it doesn't seem to apply changes until I use systemctl to restart it.  Doesn't 'watch' make sure that it runs after all watched states?
19:55 cmarzullo are the watched states changing?
19:55 cscf cmarzullo, yes, 2 of them did.
19:55 cscf namely the cert and key.
19:56 cmarzullo odd. should go.
19:57 cscf Yeah, I'm puzzled.  it's worked fine for other things.
19:57 cscf I figured that maybe one was triggering it, and then the rest changed and didn't.
19:57 cscf But I don't think watch works like that.
19:58 jimklo joined #salt
19:59 cscf Just applied the change to an identical server, same thing, apache state says it didn't restart.
19:59 cmarzullo gist?
20:01 cscf cmarzullo, how much?  Just the apache state?  output?
20:01 cmarzullo just the apache state probably. So I could eyeball your global requsists
20:02 cmarzullo The one that's changing and the service thats supposed to change.
20:03 cscf cmarzullo, apache here: https://gist.github.com/anonymous/05ade021530df367a09b867d4aa7e47a
20:03 cscf cmarzullo, watch_in's here: https://gist.github.com/anonymous/fdae3133ca9eb889e1f8f47c88028d9e
20:04 cmarzullo - file: /etc/apache2/sites-available/ is wrong.
20:04 cscf cmarzullo, how so?
20:04 cmarzullo it should be - file: ennable_ssl or - file: enable_redirect
20:05 cmarzullo the global requsite is tied to the state id. not to the name of the state.
20:05 cmarzullo And it seems wierd that you are both 'watch' and 'watch_in'
20:05 cmarzullo should only need one.
20:06 cscf cmarzullo, Ah, you see, I have a file.recurse call /etc/apache2/sites-available/ , and I enable or disable them with the symlinks
20:06 cscf So if either files or symlinks change, I want to refresh.
20:08 cmarzullo the watch in should be sufficent.
20:09 lero joined #salt
20:10 cscf cmarzullo, if the underlying files change, why would the symlink trigger?
20:11 cscf The symlink doesn't care about the contents of the file it points to.
20:12 cmarzullo I mean a watch_in placed in whichever state is chaging.
20:14 cscf cmarzullo, well, multiple states changed and should have triggered their watch_in, but they didn't.
20:14 jenastar left #salt
20:14 cscf Does return order tell you what order the states ran in?
20:15 west575 joined #salt
20:15 cscf Oh, actually, while apache says nothing changed, it does say: Duration: 69.174 ms so it must have been restarted.
20:15 cscf Just restarted too soon, I think.
20:16 ssplatt cscf: the watch and watchin refer to actual state names, not random files on teh filesystem
20:16 cmarzullo seems unlikely.
20:16 ssplatt need to refer to...
20:16 cmarzullo you might be getting stuck with where your files are. If there aren't being included then they may not be in scope.
20:16 cscf ssplatt, yes, and the state names can be filenames, can they not?
20:16 ssplatt so you’d watch: enable_redirect
20:16 ssplatt file: enable_redirect
20:16 ssplatt watch: file: enable_redirect
20:17 ssplatt or watch: file: enable_ssl
20:17 cscf ssplatt, that is already covered by a watch_in in enable_redirect , etc
20:17 schemanic joined #salt
20:18 ssplatt you don’t have that in the links you posted above
20:18 ssplatt but a watch_in: service: apache2
20:18 ssplatt would work
20:18 cscf - watch_in: apache2   isn't enough?
20:18 cscf I have to specify service: ?
20:18 jimklo joined #salt
20:19 ssplatt i believe so yes
20:19 cscf Ok, I'll try that.  I thought this worked before, though.
20:19 ssplatt but this won’t work the way you have things configured right now: - file: /etc/apache2/sites-available/
20:19 ssplatt for the watch.
20:20 cscf ssplatt, why not?  there is a state called /etc/apache2/sites-available/ which is not pasted.
20:21 ssplatt oh well then that will only work if that specific state changes
20:21 ssplatt but thsoe symlinks won’t trigger it
20:21 cscf ssplatt, you can have multiple watches and watch_ins, cant you?
20:21 ssplatt yep
20:21 cscf That's why the symlinks have their own watch_ins
20:22 ssplatt ok well just double check that you are referencing the proper state names
20:23 cscf ssplatt, won't it crash if they don't exist?
20:23 ssplatt maybe?
20:23 cscf But I will check
20:23 ssplatt maybe they exist but they aren’t pointing to what you think they are
20:23 scubahubby joined #salt
20:24 cscf No, they are accurate.
20:24 cscf Apache is being restarted, you see, the problem is that it's restarting before all of the changes have been made (I think!)
20:25 jrklein joined #salt
20:25 whytewolf no, watches don't crash if they can't find the watched state. they just kind of don't do anything. but i do think the issue was found. watch_ins need the state module. not just the name. omitting the state module was added but that has no documentation for the _in versions.
20:25 scubahubby Hi all, looking for help using RunnerClient.  I have a reactor written in python that wants to execute a runner function, however when I try to use salt.runner.RunnerClient() I get an exception "AttributeError: runner"
20:26 cscf whytewolf, ah ok, thanks.  So that has probably fixed it.  Unfortunately I can't test right now without breaking the server again.  Once the 3rd is ready to set up I will try.
20:27 jimklo joined #salt
20:27 whytewolf yeah the _in versions of requisites are kind of tricky. you have to be very specific with them since they actaully put watchs in place so they need to know exactly what to place the watch in
20:27 whytewolf you also can't use - sls: with the _in versions
20:32 schemanic- joined #salt
20:32 Bryson joined #salt
20:33 schemanic joined #salt
20:37 akhter joined #salt
20:46 daxomatic joined #salt
20:48 om joined #salt
20:49 concernedcitizen joined #salt
20:49 concernedcitizen joined #salt
20:52 funk49 joined #salt
20:57 peters-tx joined #salt
21:02 schemanic- joined #salt
21:03 scubahubby Hi all, looking for help using RunnerClient.  I have a reactor written in python that wants to execute a runner function, however when I try to use salt.runner.RunnerClient() I get an exception "AttributeError: runner"
21:05 ferbla joined #salt
21:08 mrueg joined #salt
21:11 MTecknology HAHA!!!! I was just reading through docs trying to remember how it works, I saw "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "{{ data['id'] }}" '" and thought it sounded oddly familiar, then "and data['id'].startswith('ink') %}
21:11 MTecknology " and remembered... holy crap, *I* frick'n wrote this!
21:12 MTecknology It's been updated and improved, but just noticing that was awesome. I wrote the documentation for me in the future! :D
21:15 Criggie MTecknology: hehehe its like googling a problem, and the only answer was from 10 years ago, and you think "this is exactly my problem, and this guy sounds really smart.   HEH he has a server called caffeine, same as me"  and the answer fixes your problem.  Then you see that you wrote it years ago.
21:15 Criggie mythtv does that for me.
21:16 MTecknology Criggie: lol, exactly! it's gonna be the highlight of my day; I should probably just give up now. :P
21:17 Criggie sorry :))
21:18 pipps99 joined #salt
21:19 cryptolukas joined #salt
21:21 cryptolukas Hey, I use zsh as shell, additionally oh-my-zsh. The normal way is to execute 'sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"' At the moment I have a state that execute that via cmd.run. Is that the best way? Is there any other better solutions to do this?
21:22 winsalt_ you could probably break it into two parts, download and run
21:24 jas02 joined #salt
21:24 cryptolukas exist for thus an special state? I think to do this in two steps has no benefit.
21:24 cryptolukas exist for thus problem an special state?
21:26 winsalt_ whats the problem?
21:28 cryptolukas I need to pipe the output in a file sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" > /tmp/zshinstall When I don't do this i receive a expection in the highstate. The command generate a multiline output. My solution works, but it's dirty.
21:34 DaffyDuck joined #salt
21:34 winsalt_ thats why i said you could split it up, file.managed has a source_hash parameter as well so you know you are downloading what you think you are downloading
21:35 lero joined #salt
21:40 edrocks joined #salt
21:46 dps joined #salt
21:50 cryptolukas ah ok
21:51 N-Mi joined #salt
21:51 N-Mi joined #salt
21:53 mikecmpbll joined #salt
21:56 seanacais joined #salt
22:09 seanacais joined #salt
22:13 ektonull joined #salt
22:14 dps left #salt
22:15 dps joined #salt
22:18 spuder joined #salt
22:19 scubahubby Hi all, looking for help using RunnerClient.  I have a reactor written in python that wants to execute a runner function, however when I try to use salt.runner.RunnerClient() I get an exception "AttributeError: runner"
22:20 spuder_ joined #salt
22:22 egor joined #salt
22:22 pipps joined #salt
22:22 egor joined #salt
22:24 spuder_ joined #salt
22:24 jas02 joined #salt
22:25 pipps joined #salt
22:29 spuder joined #salt
22:31 pipps99 joined #salt
22:31 pfallenop joined #salt
22:33 bbbryson joined #salt
22:35 Heartsbane joined #salt
22:39 kusen joined #salt
22:39 pfallenop joined #salt
22:53 cyborg-one joined #salt
22:55 ahammond I'm looking at salt/payload and salt/transport/zeromq.py. I want to add something that reports the minion_id or the IP of the minion which is sending broken packets.
22:55 ahammond (We are switching back from the tcp transport to 0mq in desperate hopes of achieving some kind of stability)
22:56 ahammond I know I have a few minions which have not correctly switched back, I just don't know how to identify them.
22:57 ahammond so, my question is, how do I dig a minion_id or IP out of the zmqstream?
22:57 hemebond What's the process for closing issues on formulas?
22:59 hemebond I just realised the issues I commented on are many months old now and can be closed.
22:59 fxdgear joined #salt
22:59 hemebond But of course I don't control the particular formula.
23:00 fxdgear hey this is probably documented somewhere but I can't find :( Say I add a new VM to my cluster using salt-cloud. If that vm's salt-key name starts with `ucp` i want to dynamically add the IP of that machine to my pillar data is that something that is possible?
23:00 fxdgear basically I want a way to programatically add instances to HA proxy as they come up
23:01 hemebond fxdgear: Where is your Pillar data coming from?
23:01 hemebond fxdgear: Have a look at Salt Mine for that kind of thing.
23:01 fxdgear hemebond my pillar data is coming from salt-master `/srv/pillar`
23:01 fxdgear ahhh ok
23:01 hemebond You can have a reactor listen for new machines and then run a highstate on your load-balancer that checks Salt Mine for instances matching a particular criteria and add them.
23:03 pipps joined #salt
23:06 RandyT fxdgear: there is an example of doing something like? what you are trying to do here: https://docs.saltstack.com/en/latest/topics/mine/
23:06 RandyT more specifically on this tag: https://docs.saltstack.com/en/latest/topics/mine/#minions-targeting-with-mine
23:13 theblazehen joined #salt
23:17 iggy scubahubby: don't run runners recursively... fire off another event that has a reactor file that runs the runner
23:17 fxdgear thanks RandyT
23:19 RandyT np, salt mine is pretty handy if you have not used it
23:22 prg3_ joined #salt
23:23 iggy I can't speak to it's current state, but keep in mind it's not perfect
23:23 iggy we would frequently end up with data coming from the mine
23:23 iggy *coming and going
23:23 jacksontj joined #salt
23:24 iggy like 1 mine_refresh and we'd have 4 nodes, another one and there's be 5 this time
23:24 iggy no apparent rhyme or reason
23:24 iggy so... test it to make sure it does what you need it to
23:25 jas02 joined #salt
23:25 ssplatt joined #salt
23:42 toastedpenguin joined #salt
23:42 edrocks joined #salt
23:44 mpanetta joined #salt
23:44 akhter joined #salt
23:45 hemebond Alternatively, could you use a Reactor to directly add a node to the load-balancer?
23:46 hemebond Like call a custom module to tell the load-balancer to add a new node. Does the reactor get enough info about the new minion?
23:48 spuder joined #salt
23:57 scubahubby iggy, that is what I am doing.  I have an event that fires a reactor that is written in python, that reactor wants to execute a runner
23:57 pipps joined #salt
23:59 scubahubby when the reactor trys to create a runner client I get the assertion

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