Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-11-01

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

All times shown according to UTC.

Time Nick Message
00:00 sagerdearia joined #salt
00:05 subsignal joined #salt
00:07 netcho joined #salt
00:14 numkem joined #salt
00:18 west575 joined #salt
00:18 watersoul_ joined #salt
00:18 nebuchad` joined #salt
00:19 feld joined #salt
00:20 tristianc joined #salt
00:21 all joined #salt
00:21 Rubin joined #salt
00:21 baikal joined #salt
00:22 simmel joined #salt
00:30 leugene joined #salt
00:30 promorphus joined #salt
00:31 leugene \help
00:45 netcho joined #salt
00:45 fannet joined #salt
00:51 Klas joined #salt
00:53 Rumbles_ joined #salt
01:01 jas02_ joined #salt
01:04 edrocks joined #salt
01:05 f4_ joined #salt
01:08 systo joined #salt
01:11 f4_ joined #salt
01:12 f4_ joined #salt
01:12 f4_ joined #salt
01:12 f4_ joined #salt
01:13 f4_ joined #salt
01:13 fracklen joined #salt
01:18 rismoney1 joined #salt
01:19 rismoney1 do people use salt to manage vmware guest creation/deletion?
01:19 gtmanfred yup
01:20 gtmanfred you can do it through salt-cloud, or you could use the vmware proxy minion
01:20 rismoney1 can it handle 1000s of guests?
01:21 gtmanfred sure? there are people running 30k minions on one master
01:21 gtmanfred (it is a beefy server)
01:22 gtmanfred but you can also use salt syndic to scale out masters
01:22 gtmanfred https://docs.saltstack.com/en/carbon/topics/topology/syndic.html
01:29 MTecknology I remember when I once built out a system so that I have four syndic servers and minions would connect to two of them.
01:29 rismoney1 is it wasy to model out shared parameters, say HD sizes, cpu, etc, and simply have an easy node list to work from?
01:30 spuder joined #salt
01:31 MTecknology I got a cksum of the minion id, modulas division against the number of hosts-1, the remainder is the first minion it'll connect to, then hosts+1 was the second
01:31 MTecknology or something like that... I turned it into pillar data so minions would dynamically re-allocate themselves if I added syndics
01:32 gtmanfred rismoney1: you mean like salt-cloud profiles?
01:32 gtmanfred rismoney1: https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.vmware.html
01:34 rismoney1 i think that will work.  could i run it agentless in a CI tool like jenkins or bamboo against a gitrepo, or does it need a minion on the vcenters?
01:34 sagerdearia joined #salt
01:35 gtmanfred yeah, salt-cloud cli or salt.cloud.CloudClient doesn't require anything else
01:35 gtmanfred it only requires you to accept the salt minion key after the fact on your master
01:35 gtmanfred you could also use the salt-api and write a plugin to jenkins or bamboo to build the server using the cloudclient, the cloud runner or the cloud module
01:36 gtmanfred https://wiki.jenkins-ci.org/display/JENKINS/saltstack-plugin
01:38 gtmanfred someone just posted a saltstack runbook to the salt-users google group
01:40 Eugene joined #salt
01:41 iggy do renderers other than jinja have the same rendering pipeline? i.e. if I have some variable that I set based off a module call, but the module isn't enabled yet, I get errors in the jinja renderer when I try to use said variable
01:41 iggy is that true of other renderers as well?
01:42 Eugene joined #salt
01:42 rismoney1 i think i am going to give this a whirl.  i wonder if i could use infoblox to ip them.
01:42 gtmanfred rismoney1: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.infoblox.html
01:48 rismoney1 if the ip is not traditional dhcp, but instead retrieved through a resful api, could that be injected?
01:48 gtmanfred it could be injected in the salt-cloud profile or a cloud map i think
01:49 rismoney1 btw- gtmanfred, you have been extremely helpful.  i am required to avoid puppet, and the chef repos are a mess, and i figured saltstack could do the job, as terraform is not a good fit for future logic
01:49 gtmanfred :)
01:57 jas02 joined #salt
02:03 DammitJim joined #salt
02:05 DammitJim how does one go about performing the same action to different VMs in vSphere through salt?
02:05 DammitJim I want to take snapshots of multiple VMs before I apply some states to those VMs
02:07 anotherzero joined #salt
02:10 swa_work joined #salt
02:14 voxpop joined #salt
02:15 RandyT joined #salt
02:15 netcho joined #salt
02:18 gtmanfred do it through an orchestrate function, then you can call the cloud module first and take the snapshot, and then once the snapshot has finished, you can trigger the minion to do something
02:19 gtmanfred https://docs.saltstack.com/en/latest/topics/orchestrate/orchestrate_runner.html#orchestrate-runner
02:23 DammitJim there gtmanfred !
02:23 DammitJim where are you anyways?
02:23 gtmanfred San Antonio, texas :) i just happened to be on
02:23 gtmanfred doing something else
02:24 DammitJim how do I apply that orchestrate function to a targeted list of VMs, though?
02:26 gtmanfred welp, the runner can pass in pillars
02:26 gtmanfred so you could use jinja to iterate over that pillar
02:26 gtmanfred salt-run state.orch deploy pillar='{"servers": ["one", "two", "three"]}'
02:27 gtmanfred or you could write your own small script to kick off the Runner client in python and make your own way to pass in the variables
02:27 gtmanfred but still pass them in through pillar, just make the cli call nicer
02:31 DammitJim hhhmmmm
02:32 DammitJim and I can do this with 2015.8?
02:35 gtmanfred sure
02:35 gtmanfred salt-run state.orchestrate and the python clients have been around for a while
02:36 DammitJim orchestrate performs the actions sequentially, right?
02:36 DammitJim what are you working on?
02:36 gtmanfred it does the same thing as it does in other state files
02:37 gtmanfred there are also require: and other requisites
02:37 gtmanfred but if you don't include any, it does top down
02:37 DammitJim I mean, it won't take all snap shots at the same time, right?
02:37 ninjada joined #salt
02:37 gtmanfred it won't you would have to do `- names: {{pillar.services}}` and it will do each one in that list one at a time
02:39 DammitJim cool
02:40 DammitJim how ghetto is it to mix bash with salt?
02:40 DammitJim and pass the different servers from a file to bash?
02:40 sebastian-w joined #salt
02:41 gtmanfred i mean, you could totally do that, but it wouldn't be that much harder to pass it in, and just pull it from sys.argv
02:41 gtmanfred and use the python client api
02:41 DammitJim I thought I couldn't do that with this older version of salt?
02:42 gtmanfred you can do that with any version of salt
02:46 DammitJim oh
02:46 gtmanfred the client apis have been around for a long time
02:46 catpigger joined #salt
02:46 gtmanfred https://docs.saltstack.com/en/2015.8/ref/clients/
02:46 gtmanfred here is the runner one https://docs.saltstack.com/en/2015.8/ref/clients/#runnerclient
02:46 evle joined #salt
02:46 DammitJim ok, so we are talking about runnerclient
02:46 DammitJim thanks
02:47 ilbot3 joined #salt
02:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.8.12, 2016.3.3 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
02:48 spuder joined #salt
02:49 DammitJim oh, I have to execute runner client with the same user that salt is running on the master?
02:50 gtmanfred that or you can use publisher_acl
02:50 gtmanfred https://docs.saltstack.com/en/latest/ref/publisheracl.html
02:54 gtmanfred actually, DammitJim you are on 2015.8, so you would want client_acl so https://docs.saltstack.com/en/2015.8/ref/clientacl.html
02:54 gtmanfred but that might not work with the runnerclient, I am not sure
02:55 gtmanfred and it looks like the publisher acl might not work with the runner either
02:55 DammitJim that's alright.. I'm going to take it easy and just write a bash script for now
02:56 gtmanfred kk
02:56 gtmanfred i am out for the rest of the evening, good luck o/
02:58 anotherzero joined #salt
02:59 DammitJim thanks!
03:00 DammitJim have a great evening
03:01 fannet joined #salt
03:19 bastiandg joined #salt
03:25 nawwmz joined #salt
03:34 pipps joined #salt
03:59 jas02 joined #salt
04:04 jas02_ joined #salt
04:06 edrocks joined #salt
04:06 subsignal joined #salt
04:09 k_sze[work] I don't understand pillar.
04:11 k_sze[work] why does `salt alice pillar.ls` show a "roles" key, but `salt alice pillar.get roles` returns nothing?
04:11 hemebond k_sze[work]: Could be that the pillars aren't synchronised properly.
04:11 hemebond Try
04:11 hemebond salt alice saltutil.refresh_pillar
04:11 hemebond or pillars
04:12 k_sze[work] And salt's command line autocomplete is completely unusable.
04:12 hemebond What do you mean?
04:13 k_sze[work] I have no idea why it somehow triggers a salt job, and then it get stuck for almost a minute.
04:13 hemebond It has to talk to the minion to get a list of available commands.
04:18 lompik joined #salt
04:27 spuder joined #salt
04:47 systo joined #salt
04:51 cryptolukas joined #salt
05:00 jas02 joined #salt
05:00 sean__ joined #salt
05:02 Ni3mm4nd joined #salt
05:15 iggy I didn't even know it had completion
05:22 impi joined #salt
05:24 netcho joined #salt
05:29 jeddi joined #salt
05:42 akhter joined #salt
05:43 systo joined #salt
05:50 akhter joined #salt
05:59 TOoSmOotH joined #salt
06:01 ninjada_ joined #salt
06:01 jas02 joined #salt
06:09 zulutango joined #salt
06:12 samodid joined #salt
06:14 fracklen joined #salt
06:21 promorphus joined #salt
06:27 ninjada joined #salt
06:50 demize joined #salt
06:51 fannet joined #salt
06:53 _aeris_ joined #salt
06:55 fracklen joined #salt
06:58 bocaneri joined #salt
07:02 jas02 joined #salt
07:02 pipps joined #salt
07:05 ivanjaros joined #salt
07:06 Elsmorian joined #salt
07:07 tristianc joined #salt
07:08 edrocks joined #salt
07:11 onlyanegg joined #salt
07:26 netcho joined #salt
07:27 jhauser joined #salt
07:30 sh123124213 joined #salt
07:32 haam3r joined #salt
07:37 jas02 joined #salt
07:42 fracklen_ joined #salt
07:43 sh123124213 joined #salt
07:45 impi joined #salt
07:48 yuhlw____ joined #salt
07:49 xet7 joined #salt
07:55 fracklen joined #salt
07:55 fracklen_ joined #salt
07:56 ivanjaros3916 joined #salt
08:02 Trauma joined #salt
08:03 jas02_ joined #salt
08:03 ivanjaros joined #salt
08:05 dariusjs joined #salt
08:20 pcdummy joined #salt
08:22 samodid joined #salt
08:22 promorphus joined #salt
08:31 Elsmorian joined #salt
08:35 samodid joined #salt
08:38 felskrone joined #salt
08:38 geomacy joined #salt
08:46 dariusjs_ joined #salt
08:49 keimlink joined #salt
09:00 mpanetta_ joined #salt
09:03 toanju joined #salt
09:04 mikecmpbll joined #salt
09:06 akhter joined #salt
09:20 sjorge joined #salt
09:20 sjorge joined #salt
09:23 AirOnSkin joined #salt
09:26 sjorge joined #salt
09:26 sjorge joined #salt
09:35 Ni3mm4nd_ joined #salt
09:40 fannet joined #salt
09:47 ronnix joined #salt
09:51 SaltyVagrant_ joined #salt
09:54 sebastian-w joined #salt
09:54 netcho joined #salt
09:56 jhauser joined #salt
09:56 LiamMon joined #salt
10:04 jas02_ joined #salt
10:11 edrocks joined #salt
10:11 geomacy joined #salt
10:16 amcorreia joined #salt
10:20 greyeax joined #salt
10:21 Elsmorian joined #salt
10:23 dps joined #salt
10:23 nidr0x joined #salt
10:24 promorphus joined #salt
10:25 dps_ joined #salt
10:26 mavhq joined #salt
10:48 M-liberdiko joined #salt
10:53 Rumbles joined #salt
10:56 akhter joined #salt
10:59 dnull[m] joined #salt
10:59 freelock[m] joined #salt
10:59 saintaquinas[m] joined #salt
10:59 jerrykan[m] joined #salt
10:59 ThomasJ|m joined #salt
10:59 M-MadsRC joined #salt
11:01 Trauma joined #salt
11:03 bmcorser joined #salt
11:05 abednarik joined #salt
11:07 mohae joined #salt
11:09 dariusjs joined #salt
11:12 scoates joined #salt
11:18 M-liberdiko joined #salt
11:18 sh123124213 joined #salt
11:18 sh123124213 joined #salt
11:25 Ni3mm4nd joined #salt
11:27 keimlink joined #salt
11:29 Mads[m] joined #salt
11:29 dnull[m] joined #salt
11:29 M-MadsRC joined #salt
11:29 ThomasJ|m joined #salt
11:29 saintaquinas[m] joined #salt
11:29 jerrykan[m] joined #salt
11:29 freelock[m] joined #salt
11:33 XenophonF omg using jinja to template xml for a java spring-based app suuuuuuuuuuuuuucks
11:34 spoxaka joined #salt
11:35 amontalban joined #salt
11:38 honestly XenophonF you can always use a py renderer
11:39 akhter joined #salt
11:39 XenophonF that's actually worse
11:40 AndreasLutro rendering xml sucks regardless of what you use
11:41 athaller joined #salt
11:48 spoxaka left #salt
11:51 GreatSnoopy joined #salt
11:52 akhter joined #salt
11:55 Sketch s/rendering//
11:56 xmj s/xml/computing
11:58 XenophonF what makes this even more awful is spring
11:58 XenophonF there's a bunch of xml that's in reality a java dsl
11:59 XenophonF and in one case there's a completely different programming language embedded, SpEL, that isn't markup-safe
11:59 LotR java makes everything worse? ;)
11:59 amontalban joined #salt
12:04 XenophonF ikr?
12:05 XenophonF the last time i touched j2ee was about 15 years ago
12:05 XenophonF the good news is that i've gotten really good at jinja templates, which means I should revisit djangoCMS some time soon
12:06 jas02_ joined #salt
12:11 mede joined #salt
12:11 * mede hi all
12:12 mede guys it seems i have an issue running salt-api ... i can not run it because i get an error: Not loading 'salt.loaded.int.netapi.rest_cherrypy'. 'port' not specified in config  BUT in my /etc/salt/master i have rest_cherrypy: entry with port 8000
12:13 Reverend hey chaps :) anyone know why "marker_end" isn't adding a carriage return in beforehand? :(
12:21 edrocks joined #salt
12:22 mede anyone ... any idea ? :)
12:24 Reverend mede: give us a config excerpt please
12:25 impi joined #salt
12:26 promorphus joined #salt
12:27 mede Reverend: https://gist.github.com/anonymous/c8419b7e9e2622703d57c57884ce48cb    thanks man
12:28 CEH joined #salt
12:28 Reverend huh.... weird.
12:28 Reverend sec
12:29 Reverend you've restarted master right?
12:29 mede Reverend:  and the error i get is Not loading 'salt.loaded.int.netapi.rest_cherrypy'. 'port' not specified in config
12:29 mede yeah restarted master and rebooted the vm :)
12:29 Reverend shit
12:29 Reverend far out
12:29 mede it worked 2 days ago... i did the same setup... i copied the file from the old salt-master
12:30 Reverend is it a different version?
12:30 mede nope
12:30 * Reverend shrugs
12:30 mede there is nothing listening on port 8000
12:30 Reverend I've never used the salt api :/ soo yeah
12:31 Reverend one of teh guys here will most likely be able to help... but you'll have to wait for them to wake up
12:31 Reverend they get sleepy with all this thinking business
12:31 mede ah right :)
12:31 mede thanks man
12:32 babilen I take it that you restarted the master?
12:33 Reverend ^ see... the Almight has arrived. All hail Babilen.
12:33 mede babilen: yes of course
12:33 mede babilen: it is weird... i just yum removed salt-api... i will try to add it again... .
12:35 mede i am comparing the salt --versions-report between the working and not working copy ... they are identical
12:35 babilen Are you running the master as a different user?
12:35 mede root
12:36 babilen Is that the only message you get? I guess we'll just have to see a little bit more .. try running things in debug mode (-l debug)
12:36 mede the working salt-master has also salt-minion installed...
12:37 mede https://gist.github.com/anonymous/4ad80e1c3c20cb8bbf8c949607fd8f6b   babilen
12:37 nicksloan joined #salt
12:37 mede and of course there is nothing listening on 8000
12:42 mede i am running on centos in AWS
12:42 Tanta joined #salt
12:42 mede same vm type (AMI)
12:42 mede but more cpus and ram
12:43 Reverend CentOS <3
12:44 dariusjs joined #salt
12:45 babilen mede: Could you edit netapi/rest_cherrypy/__init__.py and add "logger.error('%s', mod_opts)" before "if mod_opts", please?
12:46 babilen mede: Run again and show the output. Does it work if you do *not* specify the port?
12:46 mede where is netapi folder?
12:47 babilen On Debian it would be /usr/lib/python2.7/dist-packages/salt/netapi/rest_cherrypy/__init__.py
12:49 mede let me ... find it
12:50 mede centos is /usr/lib/python2.7/site-packages/salt/netapi
12:50 ozux joined #salt
12:51 babilen Yeah, dist-packages is a Debianism
12:51 netcho joined #salt
12:52 numkem joined #salt
12:52 mede babilen: [ERROR   ] {u'\xa0ssl_crt': '/etc/pki/tls/certs/localhost.crt', u'\xa0port': 8080, u'\xa0ssl_key': '/etc/pki/tls/certs/localhost.key'}
12:52 babilen mede: You have some lovely unicode snafu in there
12:52 mede how did it get there? :)
12:52 mede is a new vm... nothing running on it..
12:53 babilen Well, you did copy it from another system, didn't you?
12:53 mede hmm true...
12:53 mede damn ... i can't believe this is the reason
12:54 babilen You should make sure to use actual spaces -- making whitespace visible in your editor might be a good idea
12:54 mede oh yeah ... i know IT WORKS
12:54 mede damn... babilen thanks a lot mate ... i really owe you a big lunch
12:54 babilen http://www.fileformat.info/info/unicode/char/a0/index.htm
12:55 dariusjs_ joined #salt
12:55 babilen You are welcome! Just out of curiosity: How did you copy it?
12:56 mede babilen: i thought from the vim
12:57 babilen So you copy and pasted the configuration file in vim?
12:57 mede but it seems i copied from my google docs - where i keep track
12:57 DammitJim joined #salt
12:57 babilen Ah, google docs .. that would explain it
12:57 mede babilen: the copy paste from vim works fine... just tested it now
12:57 mede i think i copied from web browser google docs where i keep my documentation steps - i like to be thorough :D
12:58 mede babilen:  again - MANY thanks... if you are ever in Frankfurt let me know and i will buy you a proper meal :P
12:59 babilen Can do .. ping if you make it to Berlin or Edinburgh
12:59 * LotR hands mede markdown, so he can ditch google docs ;)
12:59 mede babilen: berlin i might come... so i will chat with you then
13:00 babilen It is probably obvious and you will almost certainly have done it already, but: Make sure to undo your change to /usr/lib/python2.7/site-packages/salt/netapi/rest_cherrypy/__init__.py :)
13:02 babilen It might also be a good idea to set list and listchars in vim so that whitespace is being made explicit
13:03 babilen (or at least trigger :list and :nolist)
13:03 babilen Whitespace problems are the worst
13:03 babilen "It looks right!"
13:03 jas02_ joined #salt
13:05 jas02__ joined #salt
13:07 jas02 joined #salt
13:08 racooper joined #salt
13:10 sean__ joined #salt
13:12 edrocks joined #salt
13:17 LotR babilen: this is why I prefer languages with braces :)
13:19 mede babilen: yeah ... i have in vim the tab converted to 2 spaces :)
13:23 fracklen joined #salt
13:25 akhter joined #salt
13:26 subsignal joined #salt
13:29 XenophonF y'all gotta admit that it's kind of funny to be living in the future and still running into 8-bit cleanliness issues
13:30 akhter joined #salt
13:33 LostSoul joined #salt
13:36 gtmanfred good morning
13:38 billykv joined #salt
13:39 subsignal joined #salt
13:40 Trauma joined #salt
13:40 fracklen joined #salt
13:41 XenophonF hiya gtmanfred
13:41 gtmanfred mmmm coffee
13:46 anotherzero joined #salt
13:47 akhter joined #salt
13:49 mapu joined #salt
13:50 ernescz joined #salt
13:50 bmac2 joined #salt
13:55 ernescz Hello everyone! I was wondering - is there a way I can cause a state run to "trigger" another state to be run on other minions?
13:55 gtmanfred yes
13:56 gtmanfred you can use the publish.publish module, or you can do an event.send to trigger an event on the reactor
13:56 gtmanfred https://docs.saltstack.com/en/latest/ref/peer.html
13:56 gtmanfred ernescz: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.event.html
13:57 ernescz for example, deploying a new server with salt-cloud and a state there that deploys some service.  That would cause other minions to run e.g. firewall state and open ports for this new minion.
13:57 ernescz gtmanfred: ok, thanks - will look into it
13:58 gtmanfred :)
13:59 ernescz great! 'salt.states.event' seems to be what I was looking for :)
14:00 gtmanfred dope
14:00 ernescz many thanks!
14:00 gtmanfred no problem!
14:00 fracklen joined #salt
14:00 promorphus joined #salt
14:02 jas02 joined #salt
14:05 felskrone joined #salt
14:08 CrummyGummy joined #salt
14:08 CrummyGummy_ joined #salt
14:09 jas02_ joined #salt
14:14 dyasny_ joined #salt
14:15 jas02 joined #salt
14:17 KingOfFools If one orchestration state is running on master, should I queue second one or something if i want to one more?
14:18 KingOfFools Cause I'm getting error in log: Data passed to highstate outputter is not a valid highstate return: {'master': ['The function "state.orchestrate" is running as PID 23892 and was started at 2016, Nov 01 17:03:25.160057 with jid 20161101170325160057'], 'retcode': 1}
14:19 KingOfFools want to run one more*
14:19 spuder joined #salt
14:23 spuder_ joined #salt
14:26 dps joined #salt
14:28 gtmanfred you would need to wait for the first one to finish before you can run another one.
14:30 KingOfFools gtmanfred: but if i have one orchestration scheduled and second one is running whenever some minion goes online? :/
14:32 Reverend how does one call a formula once it's installed? O_O
14:32 sjorge joined #salt
14:32 sjorge joined #salt
14:32 honestly Reverend: you add it to your highstate, or you use salt.sls function
14:33 honestly err, state.sls
14:33 Reverend syntax / docs ? :(
14:33 honestly salt '*' state.sls foo
14:33 Reverend oh
14:33 Reverend okay :) haha
14:33 Reverend thanks
14:33 * Reverend expected that to be harder
14:33 Reverend ^ inb4 that's what she said
14:34 babilen m(
14:34 Reverend ? O.o
14:36 wangofett joined #salt
14:37 tapoxi joined #salt
14:38 flowstate joined #salt
14:39 keltim joined #salt
14:40 gtmanfred KingOfFools: you could check salt-run jobs.active and make sure nothing is running?
14:42 KingOfFools gtmanfred: and? What should I do, for example, if i'm running different orchestrations by sending events through API?
14:42 KingOfFools gtmanfred: and they coming automaticaly from different places?
14:43 nawwmz joined #salt
14:43 gtmanfred That is a problem that I am not aware of a solution for yet
14:47 keimlink joined #salt
14:47 todor_ joined #salt
14:48 fleaz joined #salt
14:48 DanyC joined #salt
14:50 spuder joined #salt
14:52 keekz left #salt
14:52 Reverend is there any way to get pkg to resolve deps automagically? :/
14:53 gheistbane joined #salt
14:53 pipps joined #salt
14:53 gtmanfred pkg just uses the system package manager
14:54 DanyC left #salt
14:54 gtmanfred so if the package is packaged with all the correct dependencies then it should resolve them automagically
14:54 Reverend hmmm
14:54 Reverend okay
14:54 hasues joined #salt
14:55 Ni3mm4nd joined #salt
14:55 Reverend i think it's because one of my deps has a dep
14:55 Reverend >_<
14:56 XenophonF Reverend: if you want to call multiple states, you can
14:56 XenophonF e.g., `salt-call state.apply state1,state2,state3 saltenv=myenvironment`
14:56 XenophonF I get a lot of mileage out of that pattern, esp. in development.
14:56 XenophonF If I find myself doing that a lot, I might write a SLS that glues things together for me.
14:57 XenophonF e.g., https://github.com/irtnog/tomcat-formula/blob/master/tomcat/shibboleth-idp.sls
14:57 XenophonF If I didn't use the `include` directive, I would have to do something like:
14:58 XenophonF `salt-call state.apply shibboleth.idp,tomcat,tomcat.shibboleth-idp`
14:58 XenophonF every time I wanted to make changes to Shibboleth that needed to trigger a Tomcat restart
14:58 XenophonF but with the `include` directive, I just need to run the tomcat.shibboleth-idp SLS
15:00 XenophonF Outside of these very special glue SLSes, I don't ever reference requisites from one SLS in a different one, even within the same hierarchy.
15:00 Reverend gtmanfred - it's because I'm using the
15:00 Reverend 'fromrepo' optoin... its basically doing a --disablerepo=* --enablerepo=remi
15:00 XenophonF That means I can individually call the shibboleth.idp or tomcat SLSes without encountering errors.
15:01 Reverend and those packages aren't available in the remi repo
15:01 Reverend >_<
15:01 ozux joined #salt
15:01 scoates joined #salt
15:02 Reverend lol. fixed it with `- fromrepo: 'remi,base'`
15:02 rherna joined #salt
15:02 gtmanfred Reverend: that would do it
15:03 gtmanfred also, remi repo is meh, he likes to do a bunch of random updates to stuff in my experience, I much prefer IUS cause I can yell at carl and ben if they break my things
15:04 gheistbane I am getting a "salt://scripts is not na absolute path for file.recursive  I am not sure why...
15:05 gheistbane saltstackbot://scripts is relative to the start of my salt file_roots...
15:05 gheistbane should I specify the entire path instead?
15:05 AndreasLutro show your sls
15:06 gheistbane cis_copy_scripts:
15:06 gheistbane file:
15:06 gheistbane - recurse
15:06 gheistbane - name: salt://cis/scripts
15:06 gheistbane - source: salt://cis/scripts
15:06 gheistbane - file_mode: 755
15:06 gheistbane - dir_mode: 700
15:06 gheistbane - template: jinja
15:06 gheistbane - clean: True
15:06 AndreasLutro why is name and source the same?
15:06 gheistbane I didnt write it... not sure.
15:06 AndreasLutro what are you expecting to happen?
15:06 AndreasLutro look up the documentation for file.recurse then
15:06 gheistbane yeah I just was.
15:06 gheistbane thought I would ask
15:06 gtmanfred gheistbane: name needs to be /path/on/minion where you want the directory to be dropped
15:07 gheistbane you mean, name: should be that right?
15:07 systo joined #salt
15:08 gheistbane I think I see what is wrong. thanks.
15:08 whitenoise joined #salt
15:10 gheistbane this makes no sense.
15:10 felskrone joined #salt
15:10 ecdhe joined #salt
15:11 gheistbane why does this try to copy files, then it references the salt://cis/scripts in all of the functions below that in the state.
15:11 gheistbane I dont think I even need this.
15:11 gheistbane I will remove it and see if the rest works.
15:12 Reverend gtmanfred - but.... i like the monkey :P
15:12 jas02_ joined #salt
15:13 fracklen joined #salt
15:13 m4rx joined #salt
15:15 patarr joined #salt
15:16 gtmanfred heh
15:18 flowstate joined #salt
15:21 mavhq joined #salt
15:22 cscf What are the most likely causes of state.apply never returning?  It seems to have done the job...
15:22 gtmanfred KingOfFools: you could dump all the jobs that need to run in to the salt queue system, and then just have a scheduled job that pops one event off ever minute, and if something is still running when that event pops off, instead of tryihng to run it, send another event to dump it back into the queue
15:22 gtmanfred You would have stuff running slightly out of order, but if you can work around that, it would work
15:24 KingOfFools gtmanfred: sounds too complicated, i'm surprised actually that i can't run multiple orchestrations simultaneously
15:24 gtmanfred yeah, the state system has a blocking mechanism
15:24 fracklen joined #salt
15:25 gtmanfred so you can only run one set at a time, and that includes orchestrate
15:25 gtmanfred same way that each minion can only run one state.sls or state.highstate at a time
15:29 akhter joined #salt
15:31 mikecmpb_ joined #salt
15:36 patarr_ joined #salt
15:39 spuder joined #salt
15:40 keltim_ joined #salt
15:41 gheistbane to run a script on a minion, would you use cmd.run or something else?
15:42 gheistbane this state is calling cmd.run and then referencing a script on the master, which I dont think will work.
15:42 whytewolf cmd.script
15:42 gheistbane thats what I thought.
15:42 gheistbane I will have to convert these.
15:43 gheistbane thanks.
15:43 Reverend looking at running an RPM import on my boxes... best way of doing that? `rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch`
15:43 Reverend also inb4 elasticsearch formula. we need a crazy old version for some sites we do here.
15:44 Reverend <3
15:44 impi joined #salt
15:45 whytewolf rpm import? are you adding a repo? why not use pkgrepo? which has a gpgpkey item that you can point at the key
15:45 gtmanfred Reverend: you can do it in the pkgrepo
15:45 Reverend ahhh okay
15:50 akhter joined #salt
15:56 johnkeates joined #salt
15:56 akhter joined #salt
15:57 Brew joined #salt
15:58 sgo_ joined #salt
15:59 DanyC joined #salt
16:00 akhter joined #salt
16:05 akhter joined #salt
16:07 ProT-0-TypE joined #salt
16:08 ProT-0-TypE is it possible to use file.copy to copy a whole directory? in case what's the syntax?
16:08 gtmanfred if you do it in a state, you could use file.recurse
16:08 BattleChicken joined #salt
16:08 gtmanfred i am not sure about file.copy on the cli
16:09 gtmanfred but if you check how the file.recurse does it in the state, you could copy that way on the commandline
16:09 cmarzullo joined #salt
16:09 felskrone joined #salt
16:09 sknebel joined #salt
16:09 gtmanfred ProT-0-TypE: if you just want to copy a directory from the master to the minions, you could use salt-cp
16:09 ProT-0-TypE @gtmanfred I didn't specify one thing: the source directory is already in the minion
16:10 gtmanfred ahh
16:10 ProT-0-TypE :D
16:10 gtmanfred then i don't think file.copy will work, because it attempts to copy from the master to the minion
16:10 gtmanfred so anything you reference in the source on the command would be on the master
16:10 M-liberdiko joined #salt
16:10 rideh joined #salt
16:10 JPaul joined #salt
16:10 skeezix-hf joined #salt
16:11 ProT-0-TypE no file.copy copies a file that is already inside the minion (this works). But I can't make it work with a directory as a source
16:11 Tanta unless you're using file_client: local ?
16:11 gtmanfred ahh ok
16:11 Tanta you want file.recurse if you want to mirror a directory
16:11 cyteen joined #salt
16:12 ProT-0-TypE "The copy function accepts paths that are local to the Salt minion"
16:12 gtmanfred ahh the file.copy state
16:12 Tanta https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.recurse
16:12 ProT-0-TypE @Tanta can I use file.recurse to copy a directory from different paths inside the minion?
16:12 gtmanfred Tanta: there is a file.copy state
16:13 Tanta yes
16:13 Tanta "The source directory, this directory is located on the salt master file server and is specified with the salt:// protocol. If the directory is located on the master in the directory named spam, and is called eggs, the source string is salt://spam/eggs"
16:13 Tanta directly on the page I just linked
16:13 ProT-0-TypE so basically I'd like to do a "cp -a" from a state...
16:13 jas02_ joined #salt
16:13 Tanta actually I'm not sure if that will work with a local path, you would have to test
16:14 gtmanfred it won't recurse only pulls from the master, so even if you did /path/to/dir, it would try to pull the directory from the master
16:14 gtmanfred not copy like ProT-0-TypE wants on the minion
16:14 Tanta what's wrong with cmd.shell rsync -az /path1/* /path2 ?
16:15 Tanta it's not exactly the cleanest but it offers a robust 'sync' capability
16:15 ProT-0-TypE I'll do that if the file.copy state doesn't work with a directory as source
16:17 av_ joined #salt
16:18 pipps joined #salt
16:18 pipps joined #salt
16:19 pipps joined #salt
16:19 adongy joined #salt
16:19 ProT-0-TypE actually I've just noticed the state.rsync
16:23 DammitJim joined #salt
16:23 ProT-0-TypE that crashes... awesome
16:26 promorphus joined #salt
16:26 ozux__ joined #salt
16:29 tracphil joined #salt
16:30 abednarik joined #salt
16:31 tracphil Hi all. I create my own saltstack formula. I am rewriting them and trying to use defaults.yaml and map.jinja in the rewrite. My question is, is what I am doing here valid?  https://gist.github.com/tracphil/713f85f024343c397c7ca9da070d68a3
16:36 pipps joined #salt
16:36 kutenai joined #salt
16:36 Trauma joined #salt
16:36 pipps joined #salt
16:38 PerilousApricot joined #salt
16:40 flowstate joined #salt
16:48 edrocks joined #salt
16:53 Edgan joined #salt
16:53 nicksloan joined #salt
16:54 fredrick joined #salt
16:54 toanju joined #salt
16:56 stanchan joined #salt
16:57 keimlink joined #salt
16:58 danlsgiga joined #salt
17:00 danlsgiga joined #salt
17:03 DanyC joined #salt
17:04 cscf Is there a way to print info about configured gitfs's ? I cant get it working
17:12 tracphil cscf: can you paste your configuration, I use gitfs
17:14 DanyC joined #salt
17:15 cscf tracphil, http://paste.ubuntu.com/23412441/
17:15 cscf systemctl status salt-master shows 'Exception ''Error when fetching: fatal: Could not read from remote repository.'
17:17 cscf Trying now with the official repo
17:17 tracphil can you do a git clone from that box?
17:18 cscf Yes I have.  Works with the main one.  I think I just got the URL format wrong
17:18 fredrick How do you use a grain item in a stat?
17:18 fredrick state.
17:18 stack joined #salt
17:19 tracphil this is how I have my remotes setup https://gist.github.com/tracphil/56b7e18f31c2e37a8d91a118af8c357b which works if you structure your formula like the template-formula
17:19 cscf fredrick, {{ grains['fqdn'] }}
17:19 stack hi, to allow only one master to control a minion, is enough setting master_fingerprint in the minion config to a known value?
17:20 tracphil cscf you need a colon at the end of line 12
17:20 cscf tracphil, the ssh line?
17:20 tracphil yes
17:21 fredrick can I do {{salt['pillar.get']({{grains['fqdn']}}:'value')
17:21 cscf https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#tutorial-gitfs doesn't have that
17:21 tracphil pretty sure that has bitten me before
17:21 mavhq joined #salt
17:21 cscf tracphil, nope, failed to load gitfs now
17:21 tracphil You are correct, maybe I do because of the way I structure my remotes
17:21 intr1nsic joined #salt
17:22 tracphil do a `tree` command in your repo so I can see the structure and paste it.
17:23 rhand joined #salt
17:23 n1x0n joined #salt
17:24 abednarik joined #salt
17:24 cscf it's a clone of the saltformula for shorewall
17:25 cscf https://github.com/saltstack-formulas/shorewall-formula
17:25 tracphil see if you can do it like my comment here https://gist.github.com/tracphil/56b7e18f31c2e37a8d91a118af8c357b
17:25 cscf I had the wrong URL, fixed that, still nothing
17:26 UtahDave joined #salt
17:27 cscf tracphil, ok, did that, still the same error
17:28 impi joined #salt
17:28 stooj joined #salt
17:29 cscf Just changed the project to public, no change, so it's not an auth problem
17:29 wangofett joined #salt
17:30 tracphil I am not familiar with lines 19-24, but everything else looks correct
17:31 cscf Doing a git clone manually with the same URI to debug
17:31 tracphil as the root user?
17:31 cscf Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
17:31 pipps99 joined #salt
17:32 tracphil ahh
17:32 tracphil do you have ssh keys setup for root?
17:32 cscf I do
17:32 cscf I manage my /srv/ dir in git to the same git server and account
17:33 DanyC joined #salt
17:33 tracphil odd
17:33 cscf And I cloned the same repo using https syntax just fine earlier, I'll try again
17:35 tracphil shouldn't that be ssh://git@git.uwaterloo..... instead of nfish@
17:35 cscf works on Public, but when Private, it prompts for username, which makes sense.  That's why I wanted ssh syntax, because I already have ssh keys
17:35 cscf the docs say <user>@
17:35 tracphil try git
17:36 cscf didn't work, gitlab works
17:36 cscf No errors on restart now
17:37 cscf Yeah it works now!
17:37 tracphil fantastic!
17:37 cscf tracphil, thanks for the help
17:37 tracphil Now look into reclass so you don't have to keep pillar data in /srv/
17:38 tracphil If you need help with that, email me at my username @gmail.com
17:39 Reverend can you do a 'for' with cmd.run somehow? jinja would be the best way maybe?
17:39 Reverend that's my only thinks.
17:39 cscf Reverend, yeah, you can generate cmd.run with jinja.  Sounds messy tho
17:39 Reverend don't ask
17:40 cscf or a bash for, depending
17:40 * Reverend is resorting to hacky workarounds to make shitty old versions of software work
17:41 DanyC left #salt
17:41 BattleChicken1 joined #salt
17:43 James_Wells joined #salt
17:45 sgo_ joined #salt
17:47 James_Wells Greetings folx.  Have a random question I have not found an answer to...  Is there a mechanism already in place to allow Salt to skip / execute specific states based on being mastered or masterless?
17:48 gtmanfred there is not
17:48 gtmanfred but you could wrap it in a jinja that checks if it is masterless
17:49 James_Wells What would you check for that?
17:49 gtmanfred local: True
17:49 gtmanfred file_client: local
17:49 gtmanfred master_type: disable
17:50 gtmanfred any of those three could mean it is a masterless minion
17:51 CEH joined #salt
17:51 James_Wells Great, thank you very much.
17:54 Rubin is there a way to iterate over 2 lists in jinja?
17:54 Rubin like i have a list a and a list b, and some tasks need run for both, but some for just one or the other
17:54 Rubin some kind of list joining syntax?
17:55 James_Wells In jinja you can merge the lists with '{% set foo = a|list + b|list %}
17:55 Rubin thanks
17:57 BattleChicken joined #salt
17:59 pipps joined #salt
17:59 samodid joined #salt
18:03 pipps joined #salt
18:05 BattleChicken left #salt
18:06 nineteen joined #salt
18:08 pipps joined #salt
18:09 jacksontj joined #salt
18:09 pipps joined #salt
18:09 fredrick will this work? {{salt['pillar.get']({{grains['fqdn']}}:'value')
18:09 gtmanfred no
18:10 gtmanfred {{salt['pillar.get']('%s:value'|format(grains['fqdn']))}}
18:10 gtmanfred dont need to wrap grains in {{}}, it is already inside some
18:10 fredrick Thanks I knew I did it in more a python way last time..
18:11 gtmanfred :)
18:11 flowstate joined #salt
18:15 jas02_ joined #salt
18:16 Lionel_Debroux_ joined #salt
18:22 mapu joined #salt
18:23 netcho joined #salt
18:25 sh123124213 joined #salt
18:25 jhauser_ joined #salt
18:26 sean__ joined #salt
18:26 fracklen joined #salt
18:27 promorphus joined #salt
18:28 flowstate joined #salt
18:31 druonysus joined #salt
18:33 dps joined #salt
18:38 akhter joined #salt
18:41 ivanjaros joined #salt
18:41 davidhoude joined #salt
18:42 davidhoude Does anyone know of an easy way to restore deleted minion keys? The master has not been restarted and the minions are all responding still.
18:42 davidhoude I supposed I could issue a salt-minion restart to * and hope they can be re-accepted by the master, but I assume there may be an easier way
18:43 scooby2 joined #salt
18:45 davidhoude that actually worked perfectly, 352 out of 353 hosts
18:46 davidhoude sweeet
18:52 akhter joined #salt
18:54 fracklen joined #salt
18:54 fxdgear joined #salt
18:54 MConceicao joined #salt
18:54 nineteen joined #salt
18:55 fxdgear hey folks.... I'm struggling to find if there's a "best" way to do something.
18:55 fxdgear my situation is this: I want to create a new VM and use a reactor to start highstate.
18:56 fxdgear after highstate has finished (that one time) i want to ffire an event to tell the server it's now time to do something else.
18:56 fxdgear I don't want this to happen after EVERY highstate. just the first one.
18:56 fxdgear I'm running into a race condition right now. Where I have my command setupand it's running and it currently `requires` highstate
18:56 fxdgear but it attempts to run before highstate has completed
18:56 fxdgear and as such it errors cause there's missing files
18:57 sp0097 joined #salt
18:58 fxdgear here is an example of my orch file: https://gist.github.com/fxdgear/771fca6151aeb91d7ec1ddb9fa302851
19:00 lorengordon joined #salt
19:00 lorengordon any salt devs on?
19:01 cyraxjoe joined #salt
19:01 cscf lorengordon, don't ask to ask, ask the real question
19:01 pipps joined #salt
19:02 lorengordon lol, yeah yeah, decided to research first
19:02 gtmanfred >.>
19:02 lorengordon saw the release notice for 2016.3.4, couldn't find the download for windows
19:02 gtmanfred they are packaging it today
19:02 lorengordon +1
19:02 lorengordon tks
19:03 johnkeates joined #salt
19:03 gtmanfred technically it isn't released yet https://pypi.python.org/pypi/salt/2016.3.3
19:03 gtmanfred watch salt-announce google group for the announcement that it is actually released
19:04 lorengordon oh was it just tagged? i thought i got an email with the release notes
19:04 gtmanfred i mean it is up on pypi, https://pypi.python.org/pypi/salt/2016.3.4
19:04 thomas_ joined #salt
19:04 gtmanfred and we updated the release nots in github
19:06 lorengordon gotcha, must have been jumping the gun, sorry for the noise
19:06 gtmanfred :)
19:07 gtmanfred probably will be out by thursday
19:07 lorengordon cool, yeah, i need the fix for the bad osrelease grain on windows servers, so i'm a bit antsy :)
19:09 _two_ joined #salt
19:09 mikecmpbll joined #salt
19:10 onlyanegg joined #salt
19:12 jas02_ joined #salt
19:13 sh123124213 gtmanfred: would it make sense to have checksum in cp.push & cp.push_folder ?
19:14 johnkeates joined #salt
19:17 edrocks joined #salt
19:18 hasues left #salt
19:19 nrezinorn joined #salt
19:19 toanju joined #salt
19:21 asoc_ joined #salt
19:25 GreatSnoopy joined #salt
19:25 akhter_1 joined #salt
19:29 jimklo joined #salt
19:33 akhter joined #salt
19:34 mapu joined #salt
19:37 fracklen_ joined #salt
19:37 Renich joined #salt
19:39 frackle__ joined #salt
19:44 ozux joined #salt
19:45 felskrone joined #salt
19:48 angvp omg BitchX .. I haven't seen that client in ages
19:49 bltmiller joined #salt
19:50 llua joined #salt
19:53 PerilousApricot joined #salt
19:54 DammitJim joined #salt
19:55 DammitJim is there a reason why I can't test.ping a nodegroup that has nodegroups inside it?
19:55 DammitJim I get Minion did not return. [No response]
20:00 pipps99 joined #salt
20:00 DammitJim this is so strange
20:01 hemebond DammitJim: https://github.com/saltstack/salt/issues/33950
20:01 saltstackbot [#33950][OPEN] Minions are not responsive when targeted with nested nodegroups | Description of issue...
20:07 domd joined #salt
20:07 ronnix joined #salt
20:07 DammitJim so, is that only for test.ping?
20:08 hemebond I would imagine it applies to all jobs.
20:09 DammitJim dammit, so what's the point of nested nodegroups? :P
20:09 hemebond There's no difference between test.ping and other jobs.
20:09 hemebond Well, reading the issue, it appears it does work for some.
20:09 DammitJim I guess I'll just create a large nodegroup
20:10 whytewolf interesting i just tested. and shortly after restarting the salt-master and it failed. but after a couple of tests it started working fine
20:10 whytewolf like a cache was being updated
20:12 DammitJim wuut?
20:12 whytewolf DammitJim: hemebond: https://gist.github.com/whytewolf/24ebe4dd6fed01a4a8d28c6adcad8357
20:12 DammitJim restarting
20:15 toanju joined #salt
20:17 DammitJim I am not that lucky
20:17 DammitJim thanks though
20:17 akhter joined #salt
20:18 whytewolf well, i didn't restart
20:18 whytewolf it took a couple of min after a restart to catch up and running the command a couple of times
20:18 jas02_ joined #salt
20:19 whytewolf also a single large group might just be faster for you
20:19 subsignal joined #salt
20:21 DammitJim yes, I think I'm going that route for a project I have tomorrow
20:21 DammitJim there is truly an art for targeting
20:22 DammitJim I also just realized that it is a lot easier to read a group when using multiple lines
20:23 sean__ hey guys - i'm having trouble understanding where to put the minion_blackout directive in pillar? using top.sls doesn't seem to get my minion to pick it up
20:25 hemebond sean__: Any pillar file that is applied to the minions.
20:25 sean__ i put the following in /srv/pillar/top.sls -- 'mx.scj.net': minion_blackout: True then saltutil.refresh_pillar
20:25 hemebond No
20:26 hemebond top.sls is for applying pillar files
20:26 hemebond You need a pillar file (mypillarstuff.sls) that contains the minion_blackout property.
20:26 sean__ do i make a separate sls file for that minion?
20:26 whytewolf minion_blackout is a pillar item. you pass it like you do any other pillar.
20:26 hemebond If you don't have any pillar files being applied to that minion, yes.
20:27 whytewolf https://gist.github.com/whytewolf/16f574de240cbf715508a6397166ed62
20:28 promorphus joined #salt
20:29 fxdgear joined #salt
20:30 sean__ ok i got it to pick up now - thanks
20:30 whytewolf i do find it interesting the blackout is so compleate that it blacks out saltutil.pillar_refresh which is just an alias of saltutil.refresh_pillar
20:33 cscf so if you have minions in blackout, and you run a '*' state.apply, does nothing happen to them?  Do they return failure?
20:34 whytewolf ERROR executing 'saltutil.pillar_refresh': Minion in blackout mode. Set 'minion_blackout' to False in pillar to resume operations. Only saltutil.refresh_pillar allowed in blackout mode.
20:34 cscf Oh ok.  Interesting
20:35 whytewolf with '* it will still run fine on the minions that do not have blackout. just pop up an error like that above for the blacked out minions
20:36 Tanta this is why I hang out here. I just learned something cool
20:37 sean__ hmmm ok still not yet lol ...state.apply does not give failure it executes the state
20:38 akhter joined #salt
20:38 whytewolf don't forget to update your pillars
20:39 sean__ i updated the pillar refresh if that's what you mean...then ran pillar.items which shows the minion blackout param on all machines? is that normal?
20:40 whytewolf wait it showed the actual item not the an error?
20:40 sean__ Sean-Lighthouse:
20:40 sean__ ----------
20:40 sean__ editor:
20:40 sean__ vim
20:40 sean__ minion_blackout_whitelist:
20:40 sean__ - test.ping
20:40 sean__ - pillar.items
20:40 sean__ - grains.items
20:40 sean__ mx.scj.net:
20:40 sean__ ----------
20:40 sean__ minion_blackout:
20:41 sean__ True
20:41 sean__ pkgs:
20:41 sean__ None
20:41 sean__ this is not the machine to blackout but it has the items?
20:41 Tanta that looks like it's just compiling the top.sls
20:41 Tanta is that the very first step?
20:42 sean__ i created blackout.sls put in the directive then added -blackout to the top.sls file
20:42 whytewolf where did you find that config option? minion_blacklist pillar is either true or false there isn't a item list that i can find
20:42 sean__ should i not add it to top.sls?
20:42 DammitJim gosh, this is worse than I thought
20:42 DammitJim nodegroups are bad
20:43 whytewolf sean__: https://docs.saltstack.com/en/latest/topics/blackout/
20:43 sean__ i have minion_blackout: True
20:43 DammitJim blackout? sounds scary
20:43 DammitJim like Halloween scary
20:43 sean__ i've read that but it just doesn't spell it out enough for my newbieness lol
20:43 ninjada joined #salt
20:44 whytewolf ahh i see the issue. minion_blackout needs to not be inside a list
20:44 whytewolf you have it inside mx.scj.net:
20:45 whytewolf same level as minion_blackout_whitelist
20:47 sean__ so if i change file called blackout.sls - inside i only have minion_blackout: True
20:47 whytewolf that would be correct
20:47 sean__ then how do i tell top.sls to apply this to only mx.scj.net?
20:47 Reverend joined #salt
20:48 flowstate joined #salt
20:48 whytewolf https://gist.github.com/whytewolf/4049e819b37960238e5af66df79eadc1
20:48 whytewolf [if mx.scj.net is the minion name]
20:48 sean__ ahh ok
20:48 sean__ :)
20:48 jimklo joined #salt
20:49 debian112 joined #salt
20:49 whytewolf this is pretty much pillar 101 :P
20:51 sean__ ok now when i try to apply the state i get the blackout error
20:51 sean__ mx.scj.net:
20:51 sean__ ERROR executing 'state.apply': Minion in blackout mode. Set 'minion_blackout' to False in pillar to resume operations. Only saltutil.refresh_pillar allowed in blackout mode.
20:52 sean__ thanks for helping me understand whytewolf
20:52 derrickm joined #salt
20:52 whytewolf no problem :)
20:55 DammitJim Not sure why I"m getting this: Remount would be forced because options (dirmode=0770) changed
20:55 derrickm I have some Salt Cloud questions maybe someone can answer. Like Terraform, is it more declarative say you initially define 10 AWS instances, and then your demand grows and you need 15. Is it able to provision the remaining 5?
20:56 DammitJim The mount currently has permissions 0770 already
20:56 derrickm I really should set up a POC, but I was curious
20:56 derrickm or, say it is building 20, and one fails, do you have to delete the 19 or will it be able to retry the one failed node
20:56 gtmanfred derrickm: you could delete and rebuild the one
20:57 derrickm thanks...
20:57 gtmanfred it just manages making and deleting instances, and everything else that the cloud driver supports
20:57 gtmanfred you can use the reactor and cloud maps to scale up and down the number of servers there are
20:58 gtmanfred or you could use them together, let terraform build them, and just use the auto scale reactor to bootstrap them
20:58 gtmanfred by listning to the sqs attached to cloud watch or using sns
20:58 whytewolf DammitJim: strange it shouldn't try to remount if the mode does match.
20:58 gtmanfred derrickm: https://github.com/saltstack-formulas/ec2-autoscale-reactor
20:59 DammitJim whytewolf, do you know what else I could look at to see what it thinks it currently is?
20:59 derrickm gtmanfred: very cool..
21:00 derrickm Does terraform or salt cloud do a better job of managing AWS?
21:00 DammitJim whytewolf, I had that as an opts: dirmode=0770
21:01 DammitJim I removed it since the mode is set up with file.directory ?
21:01 gtmanfred derrickm: i mean, you can do it with salt or with AWS, depends on your workflow and how you want to manage it
21:02 jas02_ joined #salt
21:02 derrickm thanks :)
21:02 whytewolf humm. with opts it isn't testing it the mount command is saying it isn't right
21:03 pipps joined #salt
21:03 jimklo joined #salt
21:03 whytewolf could use hidden_opts
21:04 tapoxi joined #salt
21:05 swills joined #salt
21:07 netcho joined #salt
21:09 LotusNopes joined #salt
21:09 VMF joined #salt
21:09 VMF hi there
21:09 gtmanfred hello
21:09 VMF quick question
21:09 VMF i have this line in the jinja template: {% set values = salt['pillar.get']('{{ pillar["jbname"]}}_values:lookup') %}
21:10 gtmanfred you don't need {{ around pillar["jbname"]
21:10 VMF where the '{{ pillar["jbname"]}}_values:lookup' should point the template to pull it from a pillar file
21:10 VMF that i specify using the external name
21:10 gtmanfred {% set values = salt['pillar.get']('%s_values:lookup'|filter(pillar["jbname"])) %}
21:10 gtmanfred you don't need more {{}} because you are already inside of {% %}
21:12 sean__ left #salt
21:12 VMF gotcha
21:12 VMF thank you
21:12 VMF let me give it a try
21:14 felskrone joined #salt
21:15 VMF got an intresting error:
21:15 VMF SaltRenderError: Jinja syntax error: no filter named 'filter'; line 1
21:15 gtmanfred sorry, not filter, use format
21:16 gtmanfred {% set values = salt['pillar.get']('%s_values:lookup'|format(pillar["jbname"])) %}
21:16 dimeshake joined #salt
21:16 sean__ joined #salt
21:17 sean__ left #salt
21:17 wm-bot4 joined #salt
21:17 VMF worked like a charm
21:17 VMF gosh i hope one day i'll understand what i just did:)
21:20 gtmanfred :) so '%s_values:lookup' is just a string, and |format calls format(thing_before_pipe, pillar["jbname"])
21:20 gtmanfred which will substitute in the pillar.jbname into where the %s is, just like python formatting strings work
21:21 gtmanfred so it will come out with 'string_values:lookup' assuming pillar['jbname'] contains 'string'
21:21 gtmanfred VMF: http://jinja.pocoo.org/docs/dev/templates/#format
21:23 pipps joined #salt
21:24 ronnix_ joined #salt
21:27 VMF gotcha
21:27 VMF im coming from infra background into this, so a lot to learn
21:28 VMF thank you for the url
21:28 gtmanfred no problem :)
21:29 xet7 joined #salt
21:30 toastedpenguin joined #salt
21:33 toastedpenguin The salt docs discuss getting a file from S3 but I dont see anything showing how to grab all files from an S3 bucket.  Need to grab the contents on s3 bucket for a deployment of a new windows minion  and then I'd like to have salt sync new files added in the s3 bucket to a local directory on the minion
21:34 ronnix joined #salt
21:34 ozux joined #salt
21:34 gtmanfred so, idk if you can grab all from the container, but if you had one directory in the container, you could do s3://directory with s3 setup in your master configs
21:35 gtmanfred https://docs.saltstack.com/en/carbon/ref/file_server/all/salt.fileserver.s3fs.html
21:35 gtmanfred and do a file.recurse to pull them down
21:36 gtmanfred s/container/bucket
21:36 toastedpenguin gtmanfred: so the config is defined on the master config?
21:36 gtmanfred yeah
21:37 gtmanfred the master will pull the files down and transport them to the minion
21:37 toastedpenguin how do I target the bucket for a specific minion?
21:38 gtmanfred you can't, you would need directories in the bucket that could be targeted, because you can configure more than one bucket in s3
21:38 toastedpenguin and are the s3 credentials different than the creds assigned to salt-cloud or can the be one in the same
21:38 gtmanfred so you would have bucket example with directory stuff in it, you configure salt master to use the example bucket, and do a file recurse with s3://stuff as the source
21:38 gtmanfred read the s3fs doc link i linked above
21:39 gtmanfred toastedpenguin: https://docs.saltstack.com/en/latest/ref/file_server/all/salt.fileserver.s3fs.html
21:39 gtmanfred actually, you might be able to do it with just the bucket
21:39 gtmanfred s3://<bucketname>
21:39 gtmanfred as the source for file.recurse
21:41 sgo_ joined #salt
21:43 toastedpenguin gtmanfred: thanks for the links, in looking I think the creds used for salt-cloud and also be used for the s3 creds; salt doest have direct access to the salt-cloud conf to retrieve the creds
21:45 druonysus joined #salt
21:46 llua with the pyobjects renderer, is there an variable that contains the state name like sls does in the jinja renderer?
21:47 pipps joined #salt
21:48 PsionTheory joined #salt
21:50 pipps joined #salt
21:52 PerilousApricot joined #salt
21:53 abednarik joined #salt
21:56 justanotheruser joined #salt
22:13 pipps joined #salt
22:14 fracklen joined #salt
22:14 pipps joined #salt
22:17 spuder_ joined #salt
22:25 akhter joined #salt
22:26 ahrs joined #salt
22:27 justanotheruser joined #salt
22:29 promorphus joined #salt
22:35 jas02_ joined #salt
22:40 flowstate joined #salt
22:40 akhter joined #salt
22:41 bbradley is 2016.3.4 gonna be in the package repos soon?
22:42 lorengordon bbradley: lol, i asked a couple hours ago, they're busy packaging it up today, said maybe thursday for release
22:43 UtahDave Yeah, they're busy on those packages right now
22:43 flowstate joined #salt
22:46 pipps joined #salt
23:01 weylin joined #salt
23:03 cliluw joined #salt
23:03 mohae joined #salt
23:06 edrocks joined #salt
23:07 etangle joined #salt
23:08 jimklo_ joined #salt
23:11 gtmanfred bbradley: it is best to follow the salt-announce google group to know when the released packages are out
23:11 gtmanfred bbradley: https://groups.google.com/forum/#!forum/salt-announce
23:12 flowstate joined #salt
23:14 flowstate joined #salt
23:16 _JZ_ joined #salt
23:20 ninjada joined #salt
23:20 flowstate joined #salt
23:21 DEger joined #salt
23:37 abednarik joined #salt
23:42 Guest17268 Greetings. Is there a way to log a debug message from a .sls or a .jinja file? i.e. somethign like: {% salt.log_message("Entering...") %}
23:52 telecode101 joined #salt
23:53 telecode101 joined #salt
23:57 pipps joined #salt
23:58 bbradley sweet thanks for the info

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