Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-11-22

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

All times shown according to UTC.

Time Nick Message
00:01 mosen joined #salt
00:02 dxiri joined #salt
00:03 abednarik joined #salt
00:04 mikecmpbll joined #salt
00:05 aarontc joined #salt
00:05 anotherzero joined #salt
00:07 djgerm joined #salt
00:17 jas02 joined #salt
00:22 fxhp joined #salt
00:23 MightyJoe joined #salt
00:25 big_area joined #salt
00:25 Klas joined #salt
00:26 area_ joined #salt
00:27 aphor joined #salt
00:42 Reverend_fail joined #salt
00:43 jamesog joined #salt
00:45 nicksloan joined #salt
00:47 mohae joined #salt
00:50 onovy joined #salt
01:00 jas02 joined #salt
01:01 nicksloan joined #salt
01:05 mikecmpbll joined #salt
01:12 Neighbour joined #salt
01:13 dxiri joined #salt
01:24 Neighbour joined #salt
01:27 scoates joined #salt
01:38 aphor @tobiasBora congratulations you got your OpenSSL buid fix merged!
01:40 tercenya joined #salt
01:46 akunin joined #salt
01:48 nZac joined #salt
01:55 akunin joined #salt
01:58 akunin joined #salt
01:59 akunin jinja question. i want to add a line to all ifcfg-<NICname> files for NICs staring with a specific MAC address via salt.state.file.append. how do i construct the loop over the NICs and test against the MAC address?
01:59 akunin {% for nic in grains['hwaddr_interfaces'] %} is as far as I got...
02:01 jas02 joined #salt
02:02 akunin joined #salt
02:07 catpigger joined #salt
02:07 ssplatt joined #salt
02:08 athaller joined #salt
02:09 sknebel joined #salt
02:11 nZac joined #salt
02:14 athaller joined #salt
02:15 sknebel joined #salt
02:20 netcho joined #salt
02:20 sknebel joined #salt
02:20 athaller joined #salt
02:22 evle joined #salt
02:27 Leary joined #salt
02:28 akunin joined #salt
02:28 sknebel joined #salt
02:28 Nahual joined #salt
02:30 athaller joined #salt
02:37 scoates joined #salt
02:37 nZac joined #salt
02:42 sebastian-w joined #salt
02:43 raspado is the states directory were completely wiped out
02:46 raspado will the minions continue using the cache
02:46 hemebond ?
02:46 hemebond Oh. Maybe.
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.8.12, 2016.3.4 | 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:52 akunin joined #salt
02:57 akunin joined #salt
03:00 akunin joined #salt
03:02 jas02 joined #salt
03:07 Bryson joined #salt
03:08 mavhq joined #salt
03:12 akunin joined #salt
03:18 akunin joined #salt
03:23 darthzen_ joined #salt
03:33 msn joined #salt
03:36 TRManderson joined #salt
03:39 KingJ joined #salt
03:40 devster31 joined #salt
03:40 akhter joined #salt
03:43 akunin joined #salt
03:44 manji joined #salt
03:47 justanotheruser joined #salt
03:48 lionel joined #salt
03:49 svg joined #salt
03:51 big_area left #salt
03:53 bastiandg joined #salt
03:54 hemebond I really dislike the function Names in the jobs module.
03:55 ze0z joined #salt
03:58 stupidnic I am wondering if there might be a better way to handle this state I am running. I am configuring keystone for Openstack. I tried using the keystone states, but they didn't work (couldn't auth properly). So I created a cmd.run with env variables instead. This works, but I would like to avoid having to include the env for ever cmd.run I have to run in the future. Is there a better way?
04:00 akunin joined #salt
04:03 jas02 joined #salt
04:07 fracklen joined #salt
04:15 akunin joined #salt
04:17 hemebond stupidnic: Can it not use pillar data?
04:17 evle joined #salt
04:17 hemebond You could create a generic state that uses pillar data to create the env and stuff.
04:17 stupidnic Hmm
04:17 stupidnic care to explain a bit more?
04:18 hemebond States should be generic.
04:18 hemebond And they can read pillar data.
04:18 stupidnic sure, and I am using the pillar to generate the env data
04:18 hemebond Maybe I mis-understood "I would like to avoid having to include the env for ever cmd.run I have to run in the future"
04:18 stupidnic right...
04:18 hemebond Are you using lots of cmd.run states?
04:19 stupidnic No. Just for keystone because I can't get keystone's module to work
04:19 stupidnic I think it is a disconnect between keystone's version and salts
04:19 stupidnic the keystone client wants me to include the keystone tenant id
04:19 hemebond And you just don't want to have the environment variables configured in each state?
04:19 stupidnic Right
04:20 stupidnic I was trying to look at some others in how they do it
04:20 informant joined #salt
04:20 stupidnic but I just see more hackery there
04:20 hemebond I can't think of anything other than using Jinja variables and templating to make reduce duplication.
04:20 hemebond Are you able to paste your state?
04:20 stupidnic source /root/adminrc.sh && cmd
04:21 stupidnic hemebond: http://pastebin.com/xsH2QFPq
04:22 hemebond That's it? Just the one state?
04:22 stupidnic currently
04:22 stupidnic but I know I am going to need this again in other states
04:22 hemebond Well I'd chuck the environment property into a Jinja variable.
04:22 dxiri joined #salt
04:22 stupidnic Can you show me what you mean?
04:23 stupidnic Just an example, I can extrapolate from that
04:23 hemebond Sure, one sec
04:25 sdelic joined #salt
04:26 hemebond http://pastebin.com/CAAUWWAN
04:27 hemebond Wait...
04:27 hemebond http://pastebin.com/SUwr6gFx
04:27 hemebond I forgot the property name.
04:27 stupidnic Ah... Okay. See... This is where my lack of Python bites me.
04:28 hemebond Yeah, knowing Python, or at least Jinja, will help you a lot.
04:28 stupidnic That's all rather simple once you understand how it gets parsed by jinja
04:28 hemebond You will need to know Jinja to do anything but basic stuff in Salt.
04:28 stupidnic I actually started down this path but didn't know how to finish it
04:29 stupidnic Yeah I know it for the most part, but Python dicts and such are a little bit of a gray area
04:29 stupidnic I know arrays, etc, just not fully fleshed out in the language
04:30 stupidnic hemebond: Thank you very much for the nudge.
04:31 rem5 joined #salt
04:31 hemebond 👍  Good luck
04:38 akhter joined #salt
04:41 netcho joined #salt
04:45 mpanetta joined #salt
04:45 akunin joined #salt
04:46 onlyanegg joined #salt
04:48 akunin joined #salt
05:04 _weiwae__ joined #salt
05:07 akunin joined #salt
05:09 dxiri joined #salt
05:12 DEger_ joined #salt
05:14 akhter joined #salt
05:22 zzuf joined #salt
05:23 sdelic joined #salt
05:24 DEger joined #salt
05:43 impi joined #salt
05:49 raspado joined #salt
06:01 sdelic joined #salt
06:02 ivanjaros joined #salt
06:05 jas02 joined #salt
06:19 tercenya joined #salt
06:34 lionel joined #salt
07:01 zzuf joined #salt
07:03 felskrone joined #salt
07:06 jas02 joined #salt
07:07 mk-fg joined #salt
07:19 pipps joined #salt
07:30 akhter joined #salt
07:34 teclator joined #salt
07:42 fracklen joined #salt
07:42 fracklen joined #salt
07:44 robawt joined #salt
07:45 honestly so I googled a little bit but didn't find anything... how do I set grains if I'm using salt-ssh?
07:45 ivanjaros3916 joined #salt
07:46 Rumbles joined #salt
07:46 darioleidi joined #salt
07:55 robawt joined #salt
07:56 robawt joined #salt
07:58 donmichelangelo joined #salt
08:01 honestly turns out I didn't need grains, since salt['user.info'] exists
08:06 jas02 joined #salt
08:17 samodid joined #salt
08:18 keimlink joined #salt
08:20 fracklen joined #salt
08:20 tkharju joined #salt
08:28 teclator joined #salt
08:30 fracklen joined #salt
08:31 fracklen joined #salt
08:32 fracklen joined #salt
08:33 fracklen joined #salt
08:34 hemebond Anyone know of a way to guarantee that custom grains will be loaded and have values before running a highstate? I have a reactor apply a state that does sync_all then refresh_modules and then the highstate but the grain is always empty.
08:40 o1e9 joined #salt
08:46 mpanetta joined #salt
08:50 ronnix joined #salt
08:50 teclator_ joined #salt
08:55 mohae_ joined #salt
09:09 Mandorath joined #salt
09:11 krymzon joined #salt
09:11 netcho joined #salt
09:24 raspado joined #salt
09:28 amontalban joined #salt
09:30 s_kunk joined #salt
09:31 Mandorath Hi, I was wondering while using a svn or git backend in Salt can i target a specific minion to use for example a specific git tag/branch while another minion uses a different tagged repository? Based on the documentation I get that I can use multiple tags/branches/trunks as environments but can i switch between them dynamically on a per minon basis for example by using a parameter?
09:32 hemebond Mandorath: Any environment that has a top file that targets a minion will apply.
09:32 hemebond Minions are not isolated to a single environment, every environment who's top.sls targets the minion will have its states applied.
09:33 netcho joined #salt
09:33 Rumbles joined #salt
09:38 Mandorath hemebond: Ah so if i'd like a specific tagged 'environment' (e.g. hotfix34) to be applied to a specific minion I would need only reference that specific minion within the top file.
09:38 raspado joined #salt
09:39 hemebond Correct.
09:44 netcho joined #salt
09:47 jhauser joined #salt
09:49 Mandorath hemebond: Thx, that clears things up a lot :)
09:50 svx_ joined #salt
10:01 fannet_ joined #salt
10:02 netcho_ joined #salt
10:05 amcorreia joined #salt
10:07 Reverend does anyone have any ideas how to get data from a file on a minion and store it in a pillar?
10:07 Reverend I'm fairly certain that someone is going to say 'saltmine', but i can't find any documentation on it
10:09 jas02 joined #salt
10:10 manji Reverend, maybe writing an module and use ext_pillar
10:10 manji to run it
10:11 manji just guessing
10:11 Reverend ihasnoidea. but
10:11 Reverend thank you - I'll look into the ext_pillar stuff :)
10:11 Reverend all because letsencrypt workarounds >_<
10:11 manji let me see if I can find and example
10:11 Reverend <3 heroic
10:11 manji I was reading something recently
10:23 zulutango joined #salt
10:27 dkrae joined #salt
10:41 teclator joined #salt
10:48 mpanetta joined #salt
10:52 KingOfFools why there's no queue option for orchestration? :|
10:59 hemebond Queue?
11:02 ronnix joined #salt
11:02 babilen A British thing
11:03 hemebond ?
11:03 babilen nvm
11:04 babilen KingOfFools: What do you envision a 'queue' to do in the context of orchestration?
11:04 hemebond (I thought orchestration was a queue)
11:05 KingOfFools babilen: i want to add orchestration job to queue if there's one already running
11:09 jas02 joined #salt
11:10 mikecmpbll joined #salt
11:10 abednarik joined #salt
11:12 teclator joined #salt
11:14 stooj joined #salt
11:18 teclator_ joined #salt
11:19 krymzon joined #salt
11:19 JohnnyRun joined #salt
11:23 Reverend are grains secure from minion-minion
11:23 Reverend i.e. can one minion see another minions grains>?
11:27 babilen Reverend: What kind of information do you put in grains that they shouldn't see?
11:27 Reverend ughhhhh babilen i need hugs
11:27 babilen I think that other minions can't see them, but I am not entirely sure about it
11:28 babilen What?
11:28 Reverend the letsencrypt server needs to be able to get ssl's from that minion to the master, to then distribute to the ssltermination server
11:28 Reverend but i can't find a secure / built-in way of doing that
11:28 hemebond cp.push?
11:29 babilen I am using reactors for that (data is the event payload)
11:29 babilen An sdb module would probably make the most sense
11:29 babilen Or a similar approach to the x509 states/modules
11:31 Reverend but how does that work? does reactor watch the files on that server? :/
11:32 MikaT joined #salt
11:38 JohnnyRun joined #salt
11:47 N-Mi joined #salt
11:47 N-Mi joined #salt
11:53 tobiasBora Hello,
11:53 Reverend herro tobiasBora
11:54 tobiasBora I would like to know if it's possible to run salt more quickly ? I mean, even a "salt '*' test.ping" took something like 20 seconds to run !
11:54 tobiasBora *tooks
11:55 debian112 joined #salt
11:55 tobiasBora I know I'm using a raspberry pi, which isn't the faster server, but actually I spend 90% of the time to wait the end of the run of salt command, and I correct the recipe during less than 10% of my time...
11:58 AndreasLutro if even test.ping is that slow then I'd say it's definitely something at the system level
11:58 mikecmpbll joined #salt
12:06 toanju joined #salt
12:10 jas02 joined #salt
12:12 tobiasBora AndreasLutro: And how could I debug that ?
12:12 kjelle_ joined #salt
12:13 netcho_ joined #salt
12:13 raspado joined #salt
12:14 Roelt and, how many nodes do you have?
12:14 Roelt minions*
12:16 Reverend oh man the first run on a blank minion takes a fucking lifetime :P hahahaha
12:16 Reverend how much does yum need to install? the whole bloody epel repo?
12:19 raspado joined #salt
12:25 AndreasLutro tobiasBora: I tried running salt on an rpi before - I gave up completely. it's not suited for the job
12:28 tobiasBora Roelt: One minion, one server, both on the same computer
12:37 tobiasBora AndreasLutro: Why ? Because of ressources ? It's amazing, for me salt should need much less ressources than the one provided by a RPI...
12:40 AndreasLutro shrug
12:41 AndreasLutro I didn't bother figuring out the bottlenecks
12:43 Roelt could be a dns resolve issue?
12:44 abednarik joined #salt
13:11 jas02 joined #salt
13:16 numkem joined #salt
13:20 krymzon joined #salt
13:22 _aeris_ joined #salt
13:23 swills joined #salt
13:26 ssplatt joined #salt
13:32 netcho_ joined #salt
13:33 Hybrid joined #salt
13:37 numkem joined #salt
13:37 krymzon_ joined #salt
13:40 Shirkdog joined #salt
13:43 ivanjaros joined #salt
13:43 jxs_ joined #salt
13:44 _JZ_ joined #salt
13:46 krymzon joined #salt
13:48 ALLmightySPIFF joined #salt
13:55 LiamMon joined #salt
13:56 numkem joined #salt
14:01 dunz0r Since I upgraded my salt-master I'm getting log-messages as well whenever I'm using the salt-command, is there anyway to turn this off?
14:02 ssplatt log messages as well?
14:03 akhter joined #salt
14:03 dunz0r ssplatt: It's not the full log, but it's lines from the log, with which severity it has.
14:04 dunz0r Like [DEBUG   ] Including configuration from '/etc/salt/master.d/node_groups.conf'
14:04 ssplatt are tehy deprecation warnings?
14:04 dunz0r ssplatt: Nope.
14:04 ssplatt salt-call seems to be default DEBUG
14:04 dunz0r Well, this isn't salt-call
14:05 ssplatt you can set the log level in the config, or use -l to change the level on the fly
14:06 dunz0r ssplatt: Yeah, the log-level that logs to the log-file... nothing for setting the loglevel for the client(from what I can tell)
14:07 rem5 joined #salt
14:07 ssplatt https://docs.saltstack.com/en/latest/ref/configuration/logging/  none of that addresses your issue?
14:08 whytewolf well log_level is the command line option in the master config
14:08 ssplatt https://docs.saltstack.com/en/latest/ref/cli/salt-minion.html#logging-options
14:08 whytewolf log_level_logfile is the logfile version
14:08 ssplatt when you say client i think salt-minion
14:09 ssplatt https://docs.saltstack.com/en/latest/ref/configuration/minion.html#minion-logging-settings
14:09 ssplatt log_level: warning
14:09 ssplatt log_level_logfile: warning
14:09 ssplatt log_level is the console level
14:10 ssplatt as whytewolf said
14:10 Reverend does anyone have some half decent docs / examples of external pillars? I'm fucking lost here.
14:11 jas02 joined #salt
14:13 whytewolf Reverend: what are you having issue with?
14:13 ronnix joined #salt
14:14 Reverend figuring out how external pillars work :P
14:14 Reverend haha
14:14 whytewolf Reverend: https://docs.saltstack.com/en/latest/topics/development/external_pillars.html covers the basics. but if you want a config for each of the different ones out there then go here and pick one https://docs.saltstack.com/en/latest/salt-modindex.html#cap-p
14:15 AndreasLutro which external pillar? if you're writing your own it's literally just a python function, I don't see how you can be confused by that
14:15 Reverend im looking at file_tree
14:15 Reverend like, where do they go? do they get sent to the minion? how to you then fetch pillar data? etc etc.
14:15 AndreasLutro where does what go?
14:15 whytewolf do you understand how pillars work?
14:15 Reverend yarp
14:16 Reverend i thought the point of the external pillar was that when a minion requests pillar data from master, master fetches the data from the minion that has it >__<
14:16 whytewolf ext_pillars work pretty much exactly the same
14:16 whytewolf um no
14:16 Reverend blerp
14:16 whytewolf ext_pillar = external programs that hold data
14:17 Reverend ohhhhh
14:17 Reverend dammit.
14:17 ssplatt external to salt’s pillar/ dir
14:18 Reverend okay. i have a plan.
14:18 Reverend that's helpful, chaps. seriously. I'm gonna sync up the ssl's from the minion, and then use file_tree to get them on the ssltermination cluster. <3 mnaybe
14:18 whytewolf basiccly when the minion requests pillar data from the master. the master generates the normall pillar data and then passes the minion id to the ext_pillar function. the ext_pillar function then uses that for looking up what pillar information to return
14:18 Reverend who knows.
14:19 Reverend whytewolf - roger that. superb
14:19 Reverend well, we'll see how this goes. Wish me luck :) <3 much love everyone
14:29 DammitJim joined #salt
14:31 _weiwae joined #salt
14:33 dxiri joined #salt
14:33 scoates joined #salt
14:33 nickabbey joined #salt
14:34 dxiri joined #salt
14:39 dxiri_ joined #salt
14:41 CrummyGummy joined #salt
14:41 dxiri__ joined #salt
14:44 toanju joined #salt
14:49 anotherzero joined #salt
14:50 DEger joined #salt
14:53 JasonSw[m] joined #salt
14:55 geomacy joined #salt
14:56 ALLmightySPIFF joined #salt
14:58 JasonSw[m] UtahDave: Ohai
14:59 black_out joined #salt
15:03 black_out Hi
15:03 whytewolf greetings, starfighter
15:04 black_out I am using salt 2016.3.4. I am trying to deploy 2 ec2 instances, but no luck...
15:05 black_out I get this stacktrace: Configuration value 'instanceId' needs to be set Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1281, in create     output = self.clouds[func](vm_)   File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line 2547, in create     vm_, data, ip_address, display_ssh_output   File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line
15:06 babilen http://paste.debian.net, https://gist.github.com, http://sprunge.us, …
15:06 babilen Config + command + error
15:07 whytewolf please also sanatize passwords and keys :P
15:08 mpanetta joined #salt
15:08 babilen Unless you *really* want us to help ;)
15:09 black_out Cheers! :)
15:13 jas02 joined #salt
15:15 dyasny joined #salt
15:18 * whytewolf twiddles his thumbs
15:21 black_out My provider:
15:23 Rumbles joined #salt
15:24 black_out https://paste.debian.net/897680
15:24 xet7 joined #salt
15:26 Tanta joined #salt
15:26 akhter joined #salt
15:27 black_out My profile:
15:27 black_out https://paste.debian.net/897681
15:29 sarcasticadmin joined #salt
15:30 tapoxi joined #salt
15:30 Cottser joined #salt
15:30 nickabbey joined #salt
15:31 black_out my map:
15:31 black_out https://paste.debian.net/897682
15:33 nickabbey joined #salt
15:33 sjorge joined #salt
15:33 sjorge joined #salt
15:35 tapoxi so encrypting pillar secrets
15:35 tapoxi I think I saw that you can do that with GPG, is that true or was it a really weird dream
15:35 nicksloan joined #salt
15:36 whytewolf tapoxi: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html
15:36 tapoxi it wasn't a dream!
15:37 hoonetorg joined #salt
15:37 tapoxi thanks whytewolf
15:37 whytewolf no problem
15:41 xet7 joined #salt
15:42 ALLmightySPIFF joined #salt
15:43 ALLmightySPIFF joined #salt
15:48 Norrland except that you need to have a passphraseless key on the master.
15:54 _JZ_ joined #salt
15:54 akhter joined #salt
15:56 orionx joined #salt
16:03 nickabbey joined #salt
16:04 k4kvm joined #salt
16:05 amcorreia joined #salt
16:07 raspado joined #salt
16:10 netcho_ joined #salt
16:11 dxiri joined #salt
16:12 Bryson joined #salt
16:14 jas02 joined #salt
16:15 iggy nothing is ever going to be perfect
16:15 iggy I think you could actually use gpg agent and go type the passphrase in every time you reboot your master
16:19 black_out Hi again, I think I found the issue, although I don't exactly know how to fix it...
16:19 Brew joined #salt
16:19 black_out The windows instances I create use auto-generated password.
16:20 black_out I have set up the endpoint in the map file to point to eu-west-1
16:21 black_out The problem is after waiting for the auto-generated Windows ec2 password, the endpoint is for some reason changed to us-east-1
16:21 black_out So it can no longer get the instanceID as it could when the endpoint was pointing to eu-west-1
16:22 Norrland iggy: point
16:23 LV-426 joined #salt
16:26 dyasny joined #salt
16:27 black_out This is the map file content:http://paste.debian.net/897697
16:27 nicksloan joined #salt
16:31 keimlink joined #salt
16:35 abednarik joined #salt
16:37 Trauma joined #salt
16:38 black_out And excerpts from log: http://paste.debian.net/897712
16:39 black_out from line 15 the endpoint changes, and I can't find a reason for that. Bssically things start to break from there
16:43 akhter joined #salt
16:44 toanju joined #salt
16:44 dxiri joined #salt
16:45 N-Mi joined #salt
16:47 mohae joined #salt
16:48 black_out Is there any other way I can fix the endpoint, please?
16:50 rylnd joined #salt
16:54 samodid joined #salt
16:57 black_out OK, it looks like the region and endpoint info are disregarded if they do not sit inside the profiles file... I solved it...
16:58 dyasny joined #salt
17:10 onlyanegg joined #salt
17:14 akhter joined #salt
17:14 aarontc joined #salt
17:15 jas02 joined #salt
17:19 ben_hps joined #salt
17:20 nicksloan joined #salt
17:24 akhter joined #salt
17:28 akhter joined #salt
17:30 nickabbey joined #salt
17:35 _JZ_ joined #salt
17:36 pipps joined #salt
17:37 Edgan joined #salt
17:38 woodtablet joined #salt
17:38 orion joined #salt
17:39 orion Hi. I'm using the latest version of Salt and I am getting this error when trying to execute a state which manages a file stored in S3: Unable to manage file: Could not fetch from s3://.... Exception: global name '__utils__' is not defined
17:39 orion Does anyone know what could be going wrong?
17:41 whytewolf __utils__ is not defined??? thaaat seems off. can you toss up a gist of the full trace?
17:41 orion There is no trace. That was the "Comment" field in the highstate output.
17:42 whytewolf ahhh then you might need to get on the minion and use -l debug with a salt-call version of the command
17:43 whytewolf or check the minion log at /var/log/salt/minion [if linux]
17:46 orion whytewolf: https://gist.github.com/centromere/4d3e66bc1a676671adda54c727500a7e
17:53 nidr0x joined #salt
17:53 whytewolf ... humm i don't know
17:53 greyeax_ joined #salt
17:54 JPT joined #salt
17:54 whytewolf I don't see why it wouldn't work from that.
17:56 quantumriff joined #salt
17:59 kingpower joined #salt
18:01 quantumriff I have a collection in pillar called roles.  How in jinja can I check if a role is defined?  {% if pillar['roles']['webserver'] is defined %} ??
18:01 quantumriff I know I can check if pillar['roles'] is defined
18:01 quantumriff but not sure if I can carry that down to the items in the collection?
18:06 whytewolf {% if 'webserver' in salt.pillar.get('roles',[]) %}
18:06 whytewolf something like that?
18:06 raspado we want to provision hosts from multiple providers (aws,openstack), do I just name the provider configs differently in cloud.providers.d/  so in this case I would have an aws.conf and openstack.conf in cloud.providers.d ?
18:06 whytewolf raspado: yeah pretty much
18:07 raspado do i have to target the provider config file name in cloud profiles?
18:08 whytewolf yes
18:08 raspado or if I were to add in my cloud profile as "provider: uswest1", it would recusrively search through the provider configs?
18:08 pipps joined #salt
18:08 whytewolf oh second one
18:08 raspado okay cool thx whytewolf
18:08 whytewolf you don't reference by filename just provider id
18:10 tercenya joined #salt
18:11 swills joined #salt
18:14 xenoxaos joined #salt
18:14 netcho_ joined #salt
18:15 nerigal joined #salt
18:16 djgerm has anybody messed around with having salt post to slack?
18:16 nickabbey joined #salt
18:16 ivanjaros joined #salt
18:16 jas02 joined #salt
18:17 iggy somebody at work asked about it, and we told them they were stupid
18:17 iggy does that count?
18:18 djgerm hehe. I can probably reverse engineer one of the existing things… I think it'd be nice to have a return or reactor post to a chat room :)
18:19 akhter joined #salt
18:19 black_out Phew... I have finally made it... Deployment complete... :)
18:19 nerigal Quick question about Best pratice with pillar... would it be better to target OS in .sls OR define group base on distro with diffrent .sls file for each distro
18:20 rylnd did anyone of you ever had the issue that salt-cloud failed with "[ERROR   ] Error creating <vmname>: None" when deploying or deleting a VM? it seems that the wait_for_task while loop is prematurely evacuated, but i cannot see the reason for it. from all i could see, the task.status is still running and it should still wait for the task.
18:21 whytewolf djgerm: there is a returner, an engine, a exacution module and a state module. pick your posion
18:21 onlyanegg Hi, I'm having trouble getting the salt mine to work. Can anyone take a look? https://gist.github.com/onlyanegg/e25564c979a2ac08cb5366864d821360
18:22 whytewolf ... multimaster with mine ... you are going to have a bad time
18:22 onlyanegg hmmm, I'm already having a bad time with multimaster... lol
18:22 onlyanegg ok
18:24 ivanjaros3916 joined #salt
18:26 khaije1 joined #salt
18:31 CrummyGummy joined #salt
18:32 pipps joined #salt
18:33 orion left #salt
18:35 nrezinorn does anyone here support the salt-pepper package on Pypi ?  it fails a bdist_rpm
18:37 Trauma joined #salt
18:37 honestly that package sounds like it's owned by saltstack
18:38 honestly nrezinorn: https://github.com/saltstack/pepper
18:39 onlyanegg whytewolf: the thing is, I'm not even using multiple masters in my vagrant test setup. I just have it configured for production use.
18:39 nrezinorn ok ill try building off github
18:39 honestly nrezinorn: seems like there's active development
18:40 nrezinorn i get the same error
18:40 nrezinorn error: line 6: Empty tag: Summary:
18:42 nrezinorn im pretty sure this is all centos7 excitement for using an old distutils rpm or whatever version :)
18:42 sh123124213 joined #salt
18:44 honestly well make yourself a virtualenv and install a newer distutils in it
18:44 honestly if it still breaks... open an issue
18:44 sh123124213 joined #salt
18:46 swills joined #salt
18:46 JohnnyRun joined #salt
18:49 s_kunk joined #salt
18:49 s_kunk joined #salt
18:51 KajiMaster joined #salt
18:52 Aikar joined #salt
18:52 Aikar joined #salt
18:59 Edgan honestly: basically the salt command through the salt-api remotely?
18:59 honestly huh?
18:59 Edgan honestly: pepper
18:59 honestly what is your question?
19:00 Edgan honestly: pepper is the remote equivalent of the salt command?
19:00 honestly pepper is a salt-api client
19:00 nrezinorn that is what pepper does, and it works really well :)
19:02 bltmiller joined #salt
19:07 akhter joined #salt
19:09 DammitJim joined #salt
19:12 akhter joined #salt
19:14 J0hnSteel joined #salt
19:17 jas02 joined #salt
19:18 djgerm what's the command for salt-cloud to update the bootstrap script?
19:20 whytewolf salt-cloud -u
19:20 whytewolf https://docs.saltstack.com/en/latest/ref/cli/salt-cloud.html#cmdoption-salt-cloud-u
19:20 _W_ joined #salt
19:21 DammitJim joined #salt
19:23 djgerm thanks!
19:27 akhter joined #salt
19:32 akhter joined #salt
19:40 akhter joined #salt
19:41 pipps joined #salt
19:45 bltmiller joined #salt
19:51 ronnix joined #salt
19:56 akhter joined #salt
19:57 LondonAppDev joined #salt
20:01 heaje joined #salt
20:01 akhter joined #salt
20:05 cscf How do you do relative-path includes? I thought was: - .haproxy , just a leading . ?
20:06 kingpower joined #salt
20:06 _JZ_ joined #salt
20:06 cscf oh yes that's what https://docs.saltstack.com/en/latest/ref/states/include.html says
20:06 cscf Does it not work for Pillar?
20:06 darthzen_ joined #salt
20:11 djgerm Are there some best practices/really cool ideas on how to integrate salt/salt-cloud with CloudFormation?
20:13 LondonAppDev joined #salt
20:16 LondonAppDev joined #salt
20:18 jas02 joined #salt
20:22 bltmiller joined #salt
20:26 debian112 joined #salt
20:28 renaissancedev joined #salt
20:29 cyborg-one joined #salt
20:29 renaissancedev Anyone aware of a state module for ensuring that a drive is partitioned properly with the appropriate FS? I see that there are execution modules but I would like to take advantage of them in a stateful manner.
20:30 jhauser joined #salt
20:30 sh123124213 joined #salt
20:30 netcho_ joined #salt
20:31 averell joined #salt
20:37 bltmiller I have a problem I'm trying to solve with bootstrapping a Docker Swarm cluster. I need to initialize a new Swarm cluster with the IP of the first node. here's what I have so far: https://gist.github.com/blaketmiller/6911ecbd6686dd79b00cd57d9ab6bd6f
20:37 akhter joined #salt
20:37 bltmiller how can I get the first node's IP address on line 13?
20:38 bltmiller presumably I'd read the minion's grain for eth0 address
20:39 zulutango joined #salt
20:39 bltmiller cache.grains retrieves the entire dictionary, but so far cannot figure out how to get just 1 grain in an orchestration SLS run on master
20:41 felskrone joined #salt
20:41 whytewolf bltmiller: mine ... with orch you can use the runner version of mine
20:42 bltmiller whytewolf: lol i was afraid someone was going to say that. is there any approach that doesn't involve using mine?
20:42 bltmiller not totally against it, just haven't used it before
20:42 whytewolf not really.
20:42 whytewolf no time to learn like the present
20:42 bltmiller ¯\_(ツ)_/¯
20:47 dxiri joined #salt
20:51 akhter joined #salt
21:11 nickabbey joined #salt
21:12 renaissancedev Anyone aware of a way to render the script to be executed in a cmd.script state?
21:12 xet7 joined #salt
21:12 Neighbour other than using file.managed with the template option to create the script to be executed?
21:15 whytewolf um, cmd.script has a source option
21:16 whytewolf cmd.script: - source: salt://blah/blah - template: jinja
21:16 whytewolf https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.script
21:24 DammitJim joined #salt
21:24 krymzon joined #salt
21:26 CTaylor joined #salt
21:26 CTaylor joined #salt
21:28 amontalb1n joined #salt
21:33 pcn Can an regex match in the top file have a re match be interpololated into the sls that will get run?
21:36 Edgan pcn: Can you restate the question?
21:36 DammitJim pcn, you are giving me a headache with that question. I must not be that smart
21:36 ronnix_ joined #salt
21:37 whytewolf my spidy decoder ring broke trying to parse it
21:37 Edgan renaissancedev: I am not aware of anything that advantaged native in salt. I do have a method for taking a script that does those things and making it into a state. You generally use unless to check for some condition that the script should create
21:41 pcn Can I have an re match that says "foo-(\d+)":
21:41 pcn and on the subsequent line
21:41 pcn - pillar_for_foo\1
21:42 hemebond You could probably use Jinja to do something close to that.
21:43 pcn So independent of the match, just have jinja extract that bit?
21:43 hemebond Correct.
21:43 pcn lemme think about that
21:44 whytewolf damn it.... to bad renaissancedev just left i was going to post something i use for my swift disk creation that handles taking a single disk and splitting it [along a boundry i hand calculated but there are other options, I'm just an asshole] https://gist.github.com/whytewolf/507c24c99e3e52d097935c22c76ca1ff
21:45 pcn so top.sls gets parsed via jinja?
21:45 whytewolf yes
21:46 * pcn didn't see that in the docs
21:47 renaissancedev joined #salt
21:47 hemebond Probably isn't mentioned. If it doesn't work you could do it in a state file.
21:48 whytewolf it isn't a widly advertised thing cause of how fragile the top file can be sometimes
21:49 Edgan whytewolf: nice, but I prefer something like that in a python script. Can salt do linux software raid?
21:49 fracklen joined #salt
21:49 whytewolf Edgan: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mdadm.html
21:50 whytewolf it isn't as featureful as lvm but it is there
21:50 JasonSw[m] left #salt
21:50 Edgan whytewolf: looks decent
21:50 sh123124213 joined #salt
21:55 akhter joined #salt
21:59 bltmiller joined #salt
22:00 nicksloan joined #salt
22:05 tkharju joined #salt
22:05 akhter joined #salt
22:14 fracklen joined #salt
22:20 jas02 joined #salt
22:26 jhauser joined #salt
22:34 mohae_ joined #salt
22:38 coval3nce joined #salt
22:38 coval3nce hmm anyone ever seen “IndexError: list index out of range” on a “network.default_route” module call?
22:41 Salander27 joined #salt
22:41 coval3nce ah damn, network.default_route requires a shell call to netstat, that isn’t installed on my OS by default ;)
22:41 djgerm funny error for it
22:43 coval3nce no doubt
22:43 coval3nce https://github.com/saltstack/salt/blob/develop/salt/modules/network.py#L343
22:44 coval3nce makes sense if you look at code tho…doesn’t check return code for the cmd.run its using
22:50 binocvlar coval3nce: Does your system contain the "ss" binary? Apparently netstat had been deprecated in favour of "ss".
22:51 coval3nce y
22:51 coval3nce @binocvlar yes, ss is on there by default
22:51 coval3nce Let me search for any open issues, and if not i’ll write one up
22:51 binocvlar *nods*
22:52 coval3nce Nope…ill toss an issue in the mix
22:53 armguy joined #salt
22:53 binocvlar Default gateway can be obtained using the iproute2 toolset also. Looking through the code, it's kind of odd to see a static call to netstat. I would have thought that the grains system would return the name of the binary used to find the default route
22:53 coval3nce Can probably use /proc more prtably on all *nix systems?
22:53 zzuf joined #salt
22:54 coval3nce I hate shelling out to cli utilities for things that are already in /proc ;)
22:54 coval3nce Though…route stuff itself probably isn’t in proc now that i think about it.
22:55 binocvlar I just checked my (systemd) box, and there is a routing table in /proc/net/route
22:55 coval3nce same here, woot
22:55 coval3nce I assume /proc changes much less between distros compared to all cli helpers
22:56 binocvlar I don't know much about how the format for /proc/net/route has chnaged over the years. If it ever does, that would be a good argument for shelling out to a CLI tool (as the tool will handle the specific table implementation directly). Otherwise, I guess reading from /proc/net/route would be fine also.
22:56 coval3nce Yup, left to an excercise for whover gets assigned the issue ;)
22:58 binocvlar :D
23:01 coval3nce https://github.com/saltstack/salt/issues/37851
23:01 saltstackbot [#37851][OPEN] network.default_route throws IndexError Exception when netstat binary is not installed | Description of Issue/Question...
23:05 _JZ_ joined #salt
23:06 dxiri joined #salt
23:06 derrick joined #salt
23:07 derrick hey anyone have experience setting up s3 pillars?
23:07 Guest80563 getting - Failed to load ext_pillar s3: 'NoneType' object has no attribute 'startswith'
23:07 Guest80563 running s3 (3.0.0)
23:08 jschoolcraft joined #salt
23:08 Guest80563 '_errors': ["Failed to load ext_pillar s3: 'NoneType' object has no attribute 'startswith'", "Failed to load ext_pillar s3: 'NoneType' object has no attribute 'startswith'", "Failed to load ext_pillar s3: 'NoneType' object has no attribute 'startswith'", "Failed to load ext_pillar s3: 'NoneType' object has no attribute 'startswith'",
23:09 Guest80563 ext_pillar:   - s3:     bucket: clearcapital-salt-pillar     keyid: ID     key: SuperSecretKey     multiple_env: True     verify_ssl: True     environment: dev
23:09 whytewolf Guest80563: please post your config [sanatized of coarse], the full trace, to gist
23:09 Guest80563 should just work? Hmm
23:09 Guest80563 okay
23:11 N-Mi joined #salt
23:11 whytewolf also what version of salt?
23:15 Guest80563 https://gist.github.com/anonymous/29242cb1bd4de91c5f4a242159afd896
23:16 Guest80563 2016.3.4
23:16 Guest80563 per https://github.com/saltstack/salt/issues/22471, I have tried to separate out the envs
23:16 saltstackbot [#22471][OPEN] Cannot actually define multiple pillars with S3 ext_pillar multiple_env | Currently specifying `multiple_env: True` on an ext_pillar using S3 will cause salt to download the pillars by environment but it will not cause it to fully create each of those environments. For example, let's say I specify the following in my master config:...
23:16 demize Is there any simple way to test rendering a templated file without executing the whole state in development?
23:17 whytewolf humm. demize https://github.com/whytewolf/salt-debug
23:18 coval3nce @binocvlar thx for help!
23:18 demize Cool, thanks, I'll check it out.
23:20 whytewolf Guest80563: this is the line that is failing https://github.com/saltstack/salt/blob/v2016.3.4/salt/pillar/s3.py#L310 it looks like what is being returned by __get_pillar_files_from_s3_meta is a NoneType [unset]
23:21 whytewolf like it isn't finding any files
23:21 jas02 joined #salt
23:21 funabashi joined #salt
23:22 Guest80563 hmmm
23:24 Guest80563 whytewolf: http://pastebin.com/2LTwRn0r this is my config
23:24 Guest80563 I've got log level set to all, would be nice to see more info
23:25 hemebond That looks wrong
23:25 Guest80563 I have tried with prefixes, without
23:25 whytewolf Guest80563: also change log_level_logfile: all
23:25 Guest80563 default is just .
23:25 hemebond Guest80563: Throw it into http://yaml-online-parser.appspot.com/ and look at what you get
23:26 hemebond You'll find you have a list of dicts that have an empty s3 property
23:27 whytewolf hemebond: is correct, your indenting is off
23:29 whytewolf bucket should start at the colon, not the s
23:29 Guest80563 yeah that is one my problems it appears...
23:31 Guest80563 now Failed to load ext_pillar s3: global name '__utils__' is not defined
23:35 whytewolf that i don't know how to fix. __utils__ should defintly be defined
23:38 Guest80563 what is it referring to?
23:39 Guest80563 salt.utils?
23:40 whytewolf kind of __utils__ is salt.utils with __opts__ already loaded
23:40 whytewolf at least from what i have been told
23:44 monokrome joined #salt
23:45 Guest80563 https://gist.github.com/anonymous/ee56d69f523e8bba811a3b9a27259a91
23:46 whytewolf humm, so the second s3 bucket loaded.
23:46 whytewolf the first one didn't
23:46 netcho_ joined #salt
23:46 bluenemo joined #salt
23:47 whytewolf unless there was more to it
23:47 bluenemo hi guys. I've wrote some custom grain code that does not pick up something and stays {} until after some stuff is installed. In the formula where I install "stuff" I want to do a module.run to refresh the grain data - how do I do that? I know saltutil.sync_grains, but I dont want to sync the grain code to the minions, I want the grain code to be executed on the minion.
23:48 abednarik joined #salt
23:49 Guest80563 whytewolf: second one also error'd
23:49 Guest80563 I took them all out but one
23:49 Guest80563 for testing/debugging
23:50 bluenemo https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.cache.html#salt.runners.cache.clear_grains seems to be the way
23:50 whytewolf bluenemo: runners are run on the master.
23:50 whytewolf not the minion
23:50 bluenemo hm. then how do I do that on the minion?
23:50 bluenemo one could just run salt-run on the minion..?
23:51 ninjada joined #salt
23:51 whytewolf what is your end goal because you might have taken a wrong turn in albuquerque
23:51 bltmiller joined #salt
23:51 bluenemo lol
23:51 bluenemo well there is the tinc vpn
23:52 bluenemo whytewolf, I want to have the minions create the keypair and then put the pub key into grains. from there I want to use the mine to make those available to all minions (or those defined to have it in the mine config)
23:53 bluenemo imagine 30 servers creating keypairs, I want all servers to have access to each others keypairs. I also thought that I could omit the grain and just put the data directly into the mine but I dont get how to do that ;) And creating a grain first doesnt seem to wrong
23:53 whytewolf humm okay. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.clear_cache
23:54 whytewolf but honestly, you could just create a module and setup mine to call that. with out putting it into a grain
23:55 bluenemo hm i think sync_grains duz it already
23:55 whytewolf sync_grains does
23:55 whytewolf sync_grains [and sync_all} pushes the code then runs any grains pushed
23:56 bluenemo how do I put the contents of file /foo/bar.pub into the mine dict under mine[grains['id']['tinc']['foo'][contents]  ?
23:56 whytewolf ...
23:56 bluenemo no? ;)
23:57 Guest80563 whytewolf: where is s3.py located? so I can add in some debugging
23:58 whytewolf Guest80563: which one? pillar? salt/pillar/s3.py  or utils salt/utils/s3.py
23:58 Guest80563 salt/pillar/s3.py
23:58 whytewolf <site_path>/salt/pillar/s3.py
23:59 Guest80563 I mean, where are the default salt libs installed on ubuntu

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