Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-10-09

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

All times shown according to UTC.

Time Nick Message
00:00 Joeskyyy joined #salt
00:02 breakingmatter joined #salt
00:02 * khaije1 iggy
00:02 * khaije1 facepalms
00:02 khaije1 yes of course you're right iggy - thanks for pointing that out
00:03 aqua^c joined #salt
00:13 quasiben joined #salt
00:22 Guest62_ joined #salt
00:24 kermit joined #salt
00:29 Ryan_Lane khaije1: I think the user state supports this
00:29 amcorreia joined #salt
00:30 kermit joined #salt
00:31 ashmckenzie joined #salt
00:33 jeffpatton1971 joined #salt
00:33 khaije1 Ryan_Lane: not explicitly in the docs I referenced here: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.user.html
00:34 Ryan_Lane khaije1: - expire: 1
00:35 Ryan_Lane - password: *
00:35 Ryan_Lane that's also not a bad idea to set
00:35 khaije1 Ryan_Lane: I stared at that uncertainly for some time. I want to disable password auth, but not disallow use of the account and I wasn't sure if this would do that.
00:35 zmalone joined #salt
00:35 Ryan_Lane ah
00:35 Ryan_Lane gotcha
00:36 Ryan_Lane - password: '*'
00:36 Ryan_Lane that should do it
00:37 khaije1 based on iggy's recommendation, '!' looked right to me. What does '*' do?
00:38 Ryan_Lane it's equivalent to no password.
00:39 Ryan_Lane seems they're equivalent
00:41 moloney Does salt have any way to mark a package to not be upgraded.  Basically like calling "apt-mark hold some_package" in ubuntu/debian
00:43 iggy salt.modules.aptpkg.hold
00:46 moloney iggy: Thanks! my google fu was not working
00:46 zmalone or pkg.installed instead of pkg.latest, if that's the cause of your upgrades.
00:49 iggy you can also specify a version with pkg.installed iirc
00:54 Bac joined #salt
00:59 conan_the_destro joined #salt
01:00 Akhter joined #salt
01:04 dq joined #salt
01:04 dq hi
01:04 dq all
01:06 dq could salt-master been clustered? I'm new to salt :-)
01:06 patchedmonkey joined #salt
01:07 dq anyone there?
01:07 dq probably you guys are all zzzZZZZZing
01:09 llua or not actively watching this channel 24/7
01:09 dq oh, got it
01:11 blue0ctober joined #salt
01:14 mpanetta joined #salt
01:15 stupidnic joined #salt
01:18 aparsons joined #salt
01:18 kitplummer joined #salt
01:28 blue0ctober joined #salt
01:28 zmalone joined #salt
01:34 falenn joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2015.8.0 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
01:47 catpiggest joined #salt
01:49 anotherZero joined #salt
01:55 zmalone joined #salt
01:56 jeffpatton1971 anyone have states that let you manage updates on your servers?
01:57 blue0ctober joined #salt
02:00 ageorgop joined #salt
02:00 kawa2014 joined #salt
02:10 blue0ctober joined #salt
02:13 falenn joined #salt
02:25 falenn joined #salt
02:31 TyrfingMjolnir joined #salt
02:32 Akhter joined #salt
02:32 mray joined #salt
02:33 mray Hello, anyone want to answer a question about pillar? Seeing unexpected behavior
02:36 mray in the master config, I have pillar_roots set to /srv/pillar
02:37 mray in it I had a hadoop.sls file. I wrote a new hadoop.sls and moved the old one away into /tmp and renamed it with .old  ...its out of the picture of course.. Then restarted the salt-master.
02:37 mray but when I run
02:37 mray salt '*' pillar.get hadoop
02:38 mray one of my minions (1 out of 3) is still showing the old pillar values. The other two correctly shows values from the new file
02:40 aurynn you might need to do pillar.refresh_items
02:40 mray ah thanks, that did the trick
02:41 aurynn np :)
02:41 bVector also saltutil.refresh_pillar
02:41 bVector not sure what the difference is
02:41 mray great thanks much :)
02:42 aurynn yw :)
02:42 evle joined #salt
03:01 ^C i've got a minion applying its state, but it seems to have not applied any of the pillar.data
03:02 ^C salt-call pillar.data from the minion works fine
03:02 ^C i've also tried salt-call saltutil.sync_all
03:03 bVector what command are you using to tell the minion to apply state
03:03 ^C and salt-call saltutil.refresh_pillar
03:03 ^C i'm using salt '*' state.highstate  from the master
03:03 ^C and i've tried salt-call state.highstate
03:04 ^C it installs the packages, and returns fine, just none of the config is applied
03:05 bVector what pillar items specifically
03:05 ^C i'm installing bind state
03:05 bVector and how are they being used
03:05 ^C and bind from the pillar
03:05 bVector is it a salt formula?
03:05 ^C bind formular yup
03:06 ^C and i've tried querying the pillar from the minion to see if it can see the same keys the bind formula needs.... that works fine
03:06 bVector what os
03:06 rhodgin joined #salt
03:07 ^C ubuntu
03:07 ^C 14.04
03:08 bVector are you setting both -bind and -bind.config on the top.sls
03:09 ^C in pillar or state top?
03:09 bVector state top
03:09 favadi joined #salt
03:09 ^C just -bind in both
03:09 bVector ah there you go
03:09 bVector you need to specify bind.config for it to pick up the pillar stuff
03:09 ^C oh.
03:10 bVector or just bind.config, since it includes bind
03:10 ^C but the state is calling pillar keys like 'bind:configured_views'
03:10 ^C which i know exist
03:11 bVector give it a shot
03:11 bVector - bind only applies https://github.com/saltstack-formulas/bind-formula/blob/master/bind/init.sls
03:11 bVector - bind.config will run https://github.com/saltstack-formulas/bind-formula/blob/master/bind/config.sls
03:11 ^C ok, trying now
03:11 bVector which is the meat of the pillar config
03:11 ^C yeah, that makes sense
03:13 ^C hahaha
03:13 ^C that worked
03:13 ^C thanks man
03:14 ^C still trying to get my head around these structures
03:22 writtenoff joined #salt
03:29 favadi joined #salt
03:34 quique joined #salt
03:39 aqua^c joined #salt
03:44 iggy most formulas aren't like that
03:45 iggy that was probably a formula that was pretty bare bones and someone added the config stuff on top of it
03:45 ^C nodnod
03:45 iggy but someone didn't want the formula to default to touching the config (when it didn't before)
03:45 ^C still shoulda noticed the seperate config state :)
03:46 iggy the one thing that every formula should have is a description of all the states that can be applied (in the README)
03:46 iggy if not, please mention it, so we can flog the appropriate people
03:46 iggy which is usually murrdoc
03:46 ^C yeah, looking at it it does
03:47 ^C mentions both bind and bind.config as available states
03:47 ^C my bad
03:47 iggy there are a few that do that (aptly I know is one)
03:48 ^C how do the zones get managed? i can see theres a static zone file reference
03:48 ^C but onces its installed, shouldnt rndc take over for dns changes?
03:48 writtenoff joined #salt
03:49 ^C once
03:49 * iggy backs away slowly
03:49 ^C haha
03:49 iggy I had to deal with bind once... over a decade ago... I _won't_ do it again
03:50 moogyver lol
03:50 moogyver dns is something every sysadmin gets into, really deeply, and then never wants to touch again
03:50 ^C i've had success, tho i dont know how config management works out when or when not to overwrite the zone file
03:54 * ^C wonders if he can make a zone template.... hmmmm....
03:55 zwi joined #salt
03:57 larsfronius joined #salt
04:15 clintberry2 joined #salt
04:19 rhodgin joined #salt
04:22 yac joined #salt
04:23 ajmath joined #salt
04:23 dendazen joined #salt
04:31 falenn joined #salt
04:32 dendazen joined #salt
04:33 hasues joined #salt
04:33 hasues left #salt
04:43 LuisP joined #salt
04:44 anmolb joined #salt
04:44 LuisP Hey everybody. I'm trying to do something that seems pretty obvious to me but I can't figure out what I'm doing wrong -- was hoping for some guidance.
04:45 LuisP On a salt master, I'd like to lookup a job that was initiated on a minion using the jid.
04:45 LuisP I've read all the docs on returners, job mgmt, the job cache, etc. but can't figure out how to do that.
04:45 LuisP It seems the master has a different jid in its cache than the minion's.
04:52 slav0nic joined #salt
05:00 mosen salt-run jobs.lookup_jid <jid>
05:00 mosen if youre not sure about the job id you can list the recent ones via jobs.list_jobs
05:01 ashirogl joined #salt
05:05 stanchan joined #salt
05:06 ashirogl1 joined #salt
05:06 otter768 joined #salt
05:10 LuisP Hi
05:10 LuisP Thanks for your response
05:11 LuisP So yes, I've tried that, but it is not very efficient... I have to iterate through a potentially huge list of jobs to find the right one
05:11 LuisP And also the criteria is non deterministic... What do I look for in the job list, since the jid from the minion is different from the master?
05:12 LuisP I can get the minion's jid by doing salt-call saltutil.is_running <func>, but that gives me the minion's jid, not the one cached on the master
05:16 mosen not sure I can suggest much more, thats as far as my knowledge goes :)
05:17 krymzon joined #salt
05:23 felskrone joined #salt
05:24 LuisP That's OK. Thanks.
05:34 favadi joined #salt
05:42 ashirogl joined #salt
05:44 mehakkahlon joined #salt
05:45 kukacz joined #salt
05:48 cberndt joined #salt
05:53 CeBe joined #salt
06:04 malinoff joined #salt
06:05 edulix joined #salt
06:17 AndreasLutro joined #salt
06:20 kukacz joined #salt
06:22 realla joined #salt
06:23 katyucha joined #salt
06:23 realla never see this
06:26 malinoff joined #salt
06:33 kukacz_ joined #salt
06:34 kukacz joined #salt
06:34 scooby2 joined #salt
06:36 kukacz_ joined #salt
06:43 sbrefort joined #salt
06:45 sbrefort Hello, I just pushed a Hugo formula on github, and I'd like to submit it to saltstack-formulas, here it is : https://github.com/sbrefort/hugo-formula
06:45 sbrefort For now this formula just installs Hugo's package for Debian/Ubuntu
06:48 lb joined #salt
07:03 KermitTheFragger joined #salt
07:05 ^C why does the salt formula not delete the /etc/salt/minion conf file after putting its own config in minion.d ?
07:05 jbrnds joined #salt
07:14 jbrnds2 joined #salt
07:15 aqua^c joined #salt
07:17 eseyman joined #salt
07:18 jbrnds joined #salt
07:21 colegatron joined #salt
07:22 ^C minion.d config seems to override (according to config.get) but its confusing...
07:23 rdas joined #salt
07:24 SMillerNL joined #salt
07:25 jbrnds2 joined #salt
07:34 rim-k joined #salt
07:49 rim-k hello all
07:49 rim-k good {morning, evening}
07:49 rim-k :)
07:50 fredvd joined #salt
07:50 rim-k quick question if there's anybody
07:50 rim-k I'm writing a new state, for a client/server tool
07:50 rim-k I'm spliting it into submodules
07:51 rim-k common.sls client.sls and server.sls
07:51 rim-k the minion will process, for instance,  server.sls
07:51 rim-k but it should process first common.sls
07:51 rim-k how can I do so using a requisite
07:51 rim-k ?
07:52 rim-k from what I know/heard, salt processes states in order
07:52 rim-k from top to bottom
07:52 denys_ joined #salt
07:53 AndreasLutro rim-k: just add the appropriate requires on each state and salt will figure out the order
07:56 rim-k with "include" then "require" ?
07:56 AndreasLutro yep
07:56 trebortech_1 joined #salt
07:57 rim-k okay cool
07:57 rim-k so no need to "require" a second time later in my sls (server.sls for example)
07:57 rim-k ?
07:57 rim-k one require in the first conf file should do the job
07:57 AndreasLutro not sure what you mean by require a second time
07:58 rim-k common.sls is where I install the package and create directories
07:58 Hipikat rim-k: or if you want to make requisites for whole sls files completing you can use the stateconf renderer and target the goal state: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.stateconf.html
07:58 rim-k server.sls will do file.managed with jinja files
07:58 rim-k in server.sls there are a couple files
07:58 rim-k i.e. file.managed
07:58 krymzon joined #salt
07:59 GreatSnoopy joined #salt
08:04 otter768 joined #salt
08:06 Xevian joined #salt
08:06 X67r joined #salt
08:10 traph joined #salt
08:11 keimlink joined #salt
08:11 chiui joined #salt
08:12 Ztyx joined #salt
08:13 impi joined #salt
08:27 s_kunk joined #salt
08:27 s_kunk_ joined #salt
08:28 jbrnds joined #salt
08:30 rim-k /var/www/consul-ui: file.directory file.recurse:
08:30 rim-k doesn't work :/
08:31 N-Mi joined #salt
08:33 rim-k how can I create a folder and upload recursively files in it?
08:39 mortis_ when using module.run in an sls, is there any way to not have it return changed=1? sounds weird, i know :)
08:39 Grokzen joined #salt
08:39 mortis_ when running highstate that is
08:40 impi joined #salt
08:40 thalleralexander joined #salt
08:40 s_kunk_ joined #salt
08:41 honestly hrrmph... do I need to do anything special for the fileserver when running salt-ssh without a master?
08:41 s_kunk joined #salt
08:41 AndreasLutro no honestly, except install python-msgpack on the minion to make it not super slow
08:42 honestly I just configured file_roots to point to my states and my files
08:42 honestly but it says "source file salt://foo is not present"
08:43 AndreasLutro try running a simple module function with -l debug to check if the file paths are correct
08:43 AndreasLutro something like salt-ssh minion file.get_diff /path/to/file salt://file
08:45 honestly uh
08:45 honestly I'm using file.copy
08:45 honestly OrderedDict([('/tmp/foo', OrderedDict([('file.copy', [OrderedDict([('source', 'salt://foo')])])]))])
08:45 honestly [INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://foo'
08:45 AndreasLutro pretty sure file.copy doesn't work with salt://
08:46 honestly oh. lol.
08:46 AndreasLutro use file.managed to copy a file from master to minion
08:47 honestly yeahg it works
08:53 agend joined #salt
08:55 linjan joined #salt
08:57 favadi joined #salt
09:01 ingwaem joined #salt
09:01 ingwaem left #salt
09:01 honestly so... now I want to reconfigure an interface using salt... which means I need to first check if the interface would change, then ifdown it, then make the change, and then ifup it
09:02 honestly is there an easy way to do that?
09:02 honestly or do I have to do a diff first?
09:05 elsmo joined #salt
09:15 honestly I could copy the file twice I guess... >_>
09:15 Ztyx joined #salt
09:16 AndreasLutro honestly: I assume there are pre-written salt states which do all that for you
09:16 AndreasLutro https://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html
09:16 PucKid joined #salt
09:17 PucKid hi everyone
09:17 PucKid did anyone manage to target only vmware machines?
09:17 honestly AndreasLutro: hrm.
09:18 AndreasLutro PucKid: check the "virtual" grain maybe - salt '*' grains.get virtual
09:20 PucKid AndreasLutro: it works, thank you (:
09:20 honestly AndreasLutro: don't think I can use that.
09:21 honestly AndreasLutro: I need there to be config files on the host at the end that someone can look at and that will keep the server working if it is rebooted.
09:22 Bryson joined #salt
09:22 AndreasLutro honestly: if you say so. you can use file.managed check_cmd to validate a config file, and use a cmd.run with onchanges to run a command when a file changes
09:23 honestly AndreasLutro: hmmm, but in check_cmd I won't be able to do a diff between old and new will I?
09:24 AndreasLutro honestly: the contents of the new file will be passed as STDIN
09:24 honestly ohhh
09:25 AndreasLutro no wait
09:25 AndreasLutro the path to a file in /tmp with the new contents is passed as an arg
09:25 AndreasLutro https://bpaste.net/show/656124fec775 sudoers example
09:26 dyasny joined #salt
09:26 honestly yeah and I can parse that file to find which one I need to diff
09:26 honestly lol
09:26 honestly but that would totally work
09:26 AndreasLutro why do you need to diff? file.managed takes care of that for you
09:26 jbrnds2 joined #salt
09:27 honestly like I said
09:27 honestly I need to ifdown the interface, then change the config, then ifup
09:27 honestly but if the config doesn't change I don't want the ifdown / ifup to happen
09:27 AndreasLutro yes but if there is no change in the file.managed, check_cmd won't be invoked, and your cmd.run onchanges won't be invoked
09:28 AndreasLutro you don't need to diff yourself to check that
09:28 honestly oh great
09:28 honestly yeah that's awesome
09:28 honestly :D
09:28 AndreasLutro 1. file.managed checks for diff 2. check_cmd is ran 3. new version of file is installed 4. cmd.run with onchanges is invoked
09:28 kukacz joined #salt
09:29 honestly it would be nice if any of that excellent information was actually in the docs >_>
09:29 AndreasLutro all those things are documented, but putting them together is something you have to do yourself :)
09:30 honestly well.... no.
09:30 honestly https://docs.saltstack.com/en/2015.5/ref/states/all/salt.states.file.html#salt.states.file.managed
09:30 honestly says nothing about "check_cmd only runs when file is new"
09:32 AndreasLutro guess I just take it for granted. check_cmd should only be used for validation though, your ifdown/ifup should ideally happen in the cmd.run with onchanges
09:35 kukacz__ joined #salt
09:36 honestly well like I said - the ifdown must be run *before* the file is changed :(
09:36 honestly ifup/down sucks that way
09:36 AndreasLutro really?
09:36 AndreasLutro hm
09:37 babilen honestly: Look into prereq in that case
09:37 AndreasLutro ah yeah that may work
09:37 honestly yes, what needs to happen in ifdown is specified in the file itself
09:37 linjan joined #salt
09:38 kukacz left #salt
09:38 honestly babilen: what is prereq? can't find it in the docs
09:39 honestly ah.
09:39 AndreasLutro https://docs.saltstack.com/en/latest/ref/states/requisites.html#prereq
09:39 babilen https://docs.saltstack.com/en/latest/ref/states/requisites.html#prereq
09:39 honestly this is where I tear my hair out because I am on 2015.5
09:39 babilen How so?
09:39 kukacz joined #salt
09:40 honestly huh.
09:40 honestly using the doc search for 2015.5 returns no results for "prereq"
09:40 AndreasLutro just use google honestly
09:40 honestly lol
09:40 AndreasLutro that's what I always do. "salt state file"
09:41 babilen Only to m( when you google for "salt mine" and all you find is information about mining actual salt ;)
09:41 AndreasLutro :D
09:41 AndreasLutro then I just s/salt/saltstack/
09:43 larsfronius joined #salt
09:44 rim-k in a sls, how do I check if a pillar item is defined (for the minion)
09:44 rim-k ?
09:44 rim-k this is for exectuting the sls only if there's a specific pillar defined for the host
09:44 AndreasLutro rim-k: if 'my_key' in pillar, or if salt['pillar.get']('nested:key')
09:45 rim-k {% if 'consul' in pillar  %}
09:45 rim-k like this?
09:45 AndreasLutro yep
09:45 rim-k oh, that easy? :D
09:45 AndreasLutro only works with top-level keys though
09:45 rim-k ahh
09:45 rim-k that's a problem
09:46 rim-k :/
09:46 AndreasLutro use pillar.get then
09:46 AndreasLutro it'll return None if it doesn't exist, which is falsey
09:47 larsfron_ joined #salt
09:47 kukacz joined #salt
09:49 DanyC joined #salt
09:49 rim-k AndreasLutro: mmm
09:49 rim-k {% if salt['pillar.get']('consul') %}
09:49 rim-k doesn't work
09:50 rim-k even though I have defined "consul:" in the pillars of the host
09:50 rim-k the pillars is defined without a value though
09:50 rim-k just the key
09:50 AndreasLutro why is it without a value?
09:51 AndreasLutro if you want a toggle you should do something like if salt['pillar.get']('consul:enable')
09:51 AndreasLutro and explicitly set that to true in your pillar
09:51 rim-k can't we check if a key is defined in the pillar?
09:52 AndreasLutro if 'consul' in pillar
09:52 rim-k the thing is that it is defined in the top pillar
09:53 AndreasLutro if it's not a top-level key then salt['pillar.get']('consul') won't work either
09:53 rim-k what I need is to check if it's also defined for the host
09:53 AndreasLutro are you sure you know how pillars work?
09:53 rim-k I see
09:53 honestly uh... at the end of the day a pillar is just a dict isn't it
09:53 AndreasLutro you can have /srv/pillar/foo/bar/baz.sls and it can still define a top-level pillar key
09:53 AndreasLutro yes honestly
09:53 honestly so
09:54 honestly {% if pillar.get('foo',{}).get('bar',None) %} should work no?
09:54 honestly for a "not toplevel" bar
09:55 honestly or am I confused about what "toplevel" means here
09:55 AndreasLutro that's the same as salt['pillar.get']('foo:bar')
09:55 honestly I don't trust sorcery like that :P
09:56 NachoDuck joined #salt
09:56 simonmcc joined #salt
09:56 LyndsySimon joined #salt
09:56 honestly AndreasLutro: what do you mean by top-level keys?
09:56 AndreasLutro you may reconsider when fetching values 4 levels deep ;)
09:56 AndreasLutro pillar['this_is_top_level']
09:56 honestly yeah?
09:57 AndreasLutro pillar['something']['this_is_not']
09:57 honestly right, which is going to blow up in your face if 'something' isn't defined
09:57 AndreasLutro yeah, and if you add if checks/.get() everywhere it becomes an ugly mess
09:57 honestly is that what you mean?
09:57 AndreasLutro so might as well use pillar.get
09:57 honestly yeah
09:58 honestly I see
09:58 honestly okay now that we've completely confused rim-k
09:58 honestly what was the trick again to make jinja not put newlines everywhere?
09:58 honestly there was trick right?
09:58 honestly please don't tell me the trick is "use mako" >_>
09:58 AndreasLutro {%- stuff() -%}
09:59 honestly huh?
09:59 honestly oh
09:59 honestly oh
09:59 babilen http://jinja.pocoo.org/docs/dev/templates/#whitespace-control
09:59 honestly right, thanks!
09:59 moderation joined #salt
09:59 babilen But "use mako" is advice that should have been given a couple of years ago
10:01 wiqd joined #salt
10:01 OliverMT joined #salt
10:01 NachoDuck joined #salt
10:01 huddy joined #salt
10:02 babilen Python should really implement a proper interface for access and setting of data in nested collections
10:04 bbhoss joined #salt
10:04 rim-k honestly: indeed :/
10:09 simonmcc joined #salt
10:10 gazarsgo joined #salt
10:12 honestly rim-k: just accept that having an empty key makes no sense
10:13 honestly in fact, it surprises me that you can get away with defining an empty key and your pillar still compiles
10:13 AndreasLutro that's how yaml works
10:14 codekobe joined #salt
10:14 rim-k honestly: true enough
10:14 rim-k I opted for the enable key
10:14 AndreasLutro >>> yaml.load('foo:')
10:14 AndreasLutro {'foo': None}
10:15 honestly well in that case
10:15 honestly uh
10:16 honestly >>> 'foo' in {'foo':None}
10:16 honestly True
10:16 honestly sooo
10:16 LyndsySimon joined #salt
10:17 honestly why would {% if 'consul' in pillar  %} not work?
10:17 honestly inb4 jinja
10:17 AndreasLutro never said it wouldn't
10:17 honestly rim-k said it doesn't work.
10:17 mpanetta joined #salt
10:18 trave joined #salt
10:19 kitplummer joined #salt
10:19 EWDurbin joined #salt
10:25 tmkerr joined #salt
10:26 jay_d joined #salt
10:37 breakingmatter joined #salt
10:37 tcolvin joined #salt
10:41 ashb joined #salt
10:46 giantlock joined #salt
10:51 felskrone joined #salt
10:54 Ztyx joined #salt
10:59 quasiben joined #salt
11:09 honestly is there a way to make file.managed dump the entire file contents when the file is newly created?
11:15 mpanetta joined #salt
11:16 amcorreia joined #salt
11:17 rim-k joined #salt
11:40 ericof joined #salt
11:46 aqua^c joined #salt
11:50 linjan joined #salt
12:05 elsmo joined #salt
12:05 quasiben joined #salt
12:16 DanyC guys, can anyone help me understand the real value on having salt cloud/ salt master integrated wiht docker? In other words why should i use salt with docker ?
12:21 DammitJim joined #salt
12:21 armyriad joined #salt
12:21 Phil-Work DanyC, I'm having the same dillema - and I haven't yet found a good reason to use Docker
12:21 Phil-Work I saw someone in the FreeBSD world describe Docker as a solution waiting for a problem
12:24 bluenemo joined #salt
12:26 DanyC Phil-Work: indeed
12:27 honestly a bad solution at that
12:30 honestly in a watch statement, do I put the name of the state of the name of the artifact?
12:30 honestly I've developed a habit of giving states meaningful names...
12:32 subsignal joined #salt
12:38 dendazen joined #salt
12:38 AndreasLutro honestly: both will work
12:41 cwyse joined #salt
12:41 honestly k
12:41 honestly well this is nice
12:41 honestly way nicer than I could manage with ansible
12:44 AndreasLutro :)
12:44 zwi joined #salt
12:46 honestly the config file also looks ugly as hell
12:46 subsignal joined #salt
12:46 honestly lol
12:54 cwyse joined #salt
12:55 giantlock joined #salt
12:57 TooLmaN joined #salt
12:59 AndreasLutro honestly: where is the config file you're managing located? I'd like to use it as an example in a presentation
13:01 AndreasLutro /etc/network/interfaces or interfaces.d right?
13:03 s_kunk_ joined #salt
13:03 s_kunk joined #salt
13:04 ferbla joined #salt
13:05 Xevian_ joined #salt
13:08 krymzon joined #salt
13:08 rudi_s joined #salt
13:09 rudi_s Hi. Can I get a list of all packages installed by salt (via pkg) from inside a jinja template? I want to tell deborphan on debian to ignore packages installed by salt.
13:09 honestly AndreasLutro: interfaces.d
13:11 honestly AndreasLutro: http://ix.io/lju
13:14 babilen rudi_s: You can't know that a package was installed by salt unless you keep a list of those packages around
13:14 toastedpenguin joined #salt
13:14 JDiPierro joined #salt
13:15 cpowell joined #salt
13:16 rhodgin joined #salt
13:17 pravka joined #salt
13:17 bhosmer joined #salt
13:18 cwyse_ joined #salt
13:19 rudi_s babilen: But I tell salt which packages I want to install.
13:19 babilen rudi_s: You can't know which packages have been installed by salt in the past
13:19 rudi_s babilen: I don't care.
13:19 rudi_s I want to get the list currently installed by salt.
13:19 babilen installed == past tense, hence my answer
13:20 rudi_s Ok, sorry for that.
13:20 rudi_s Of all packages which are currently being installed by salt ...
13:20 babilen No problem .. the question is "How do I get a list of all packages salt would manage *right now*" is a different one and one I have to think about
13:21 felskrone joined #salt
13:26 riftman joined #salt
13:33 favadi joined #salt
13:33 scoates joined #salt
13:36 irctc822 joined #salt
13:36 irctc822 Hi All
13:36 irctc822 i am running a command from my salt master
13:37 irctc822 salt -E "dev-id-*" cmd.retcode "ifconfig"
13:37 irctc822 which gives me a output
13:37 irctc822 dev-id-app1.trimblepaas.com:     0 dev-id-svc1.trimblepaas.com:     0 dev-id-is1.trimblepaas.com:     0
13:37 bernieke joined #salt
13:37 numkem joined #salt
13:37 irctc822 but the output i need is only "0 0 0"
13:38 irctc822 i just want to exclude the node names being displayed
13:38 bernieke does anyone now how I can retrieve the same output a synchronous call generates, from an asynchronous call?
13:38 irctc822 can any one please guide me
13:38 bernieke print_job and consorts seem to format the output differently
13:39 bernieke specifically, salt-run output
13:40 io joined #salt
13:40 bhosmer joined #salt
13:40 Guest39737 left #salt
13:42 racooper joined #salt
13:42 jdesilet joined #salt
13:42 nsenno joined #salt
13:44 nsenno hi everyone
13:44 the_lalelu joined #salt
13:45 AndreasLutro irctc822: look at the --out cli arg, then use a parser script or something to read the result
13:45 perfectsine joined #salt
13:45 nsenno some of you knows if there is a way to print the results real-time when execute "salt '*' state.highstate"?
13:46 giantlock joined #salt
13:46 AndreasLutro nsenno: there isn't
13:46 irctc822 hi
13:47 nsenno yep, I got the feeling. Thanks anyway
13:48 nsenno alternatives? check minions log?
13:48 ericof_ joined #salt
13:49 AndreasLutro -l debug, but it'll be quite verbose and unreadable
13:54 fredvd joined #salt
13:56 kitplummer joined #salt
13:56 domel joined #salt
14:00 zmalone joined #salt
14:00 domel hi there anyone can help with evaluation of default values from yaml file https://gist.github.com/anonymous/441461fb4cdcdd79ac80
14:00 mpanetta joined #salt
14:01 domel somehow im getting true all the time
14:01 clintberry2 joined #salt
14:02 bhosmer joined #salt
14:02 kaptk2 joined #salt
14:03 kitplummer joined #salt
14:03 kant joined #salt
14:03 MadHatter42 joined #salt
14:05 dthom91 joined #salt
14:09 I joined #salt
14:10 andrew_v joined #salt
14:13 ntropy why are you using 'true' and 'false' as strings instead of booleans True and False?
14:13 bhosmer joined #salt
14:13 Akhter joined #salt
14:15 lb joined #salt
14:17 bhosmer joined #salt
14:19 mapu joined #salt
14:19 edrocks joined #salt
14:25 teebes joined #salt
14:36 kitplummer joined #salt
14:37 dyasny joined #salt
14:38 titilambert joined #salt
14:38 hasues joined #salt
14:38 dthom91 joined #salt
14:40 zer0def joined #salt
14:40 titilambert Hello ! I trying to use update_cachedir option in salt-cloud but I don't get /var/cache/salt/cloud created when I do salt-cloud -F ...  (using  2015.5.5) Do I configure something in /etc/salt/cloud ?
14:43 hasues left #salt
14:44 TooLmaN joined #salt
14:46 pogotech joined #salt
14:46 pogotech left #salt
14:48 jdesilet_ joined #salt
14:49 jdesilet joined #salt
14:49 lloesche joined #salt
14:50 pogotech joined #salt
14:51 bhosmer joined #salt
14:52 Akhter joined #salt
14:53 polishdub joined #salt
14:57 joshuah quit
14:59 jeffpatton1971 joined #salt
14:59 jeffpatton1971 anyone have states that let you manage updates on your servers?
15:01 kulty joined #salt
15:03 giantlock joined #salt
15:03 pogotech @jeffpatton1971 you could use pkg.latest if you are looking to update specific packages/
15:03 jeffpatton1971 @pogotech was really looking for something akin to give me a list of servers that require security updates
15:04 ageorgop joined #salt
15:04 pogotech Are you looking for a module or a state output?
15:04 jeffpatton1971 like when you pop on to an Ubuntu server it lists x packages have updates and x updates are security
15:05 jeffpatton1971 hm...eventually i
15:05 jeffpatton1971 eventually i'd like it to be a state so I can jave it run regularly, but right now if I can run it interactive that would be fine
15:05 jeffpatton1971 we seem to be adding about a half dozen servers every few days and need to keep a handle on it
15:07 dabb joined #salt
15:07 StolenToast joined #salt
15:07 pogotech pkg.list_upgrades will give you a list of all updates, but on all servers.
15:08 domel can anyone see what im doing wrong here? https://gist.github.com/anonymous/dd0ca6ba1ce894959300
15:08 pogotech you could do something with pkg.upgrade_available <package> if you know what you are looking for.
15:09 StolenToast The system I'm salting has nodes that get rebuilt often but I want them to stay in the minion pool.  Has anyone in here solved this problem?
15:09 msx joined #salt
15:10 StolenToast Everything is behind a closed system so security is not an issue but system authentication would still be desirable
15:10 zie joined #salt
15:11 pogotech How are you rebuilding? You could presalt the keys and provide them to the rebuilt minions?
15:11 StolenToast PXE boot to a kickstart script
15:11 ericof joined #salt
15:11 StolenToast that was one of my ideas but it would involve designing the system
15:11 zmalone StolenToast: https://docs.saltstack.com/en/latest/ref/configuration/master.html#autosign-timeout
15:12 zmalone if "security is not an issue"
15:12 StolenToast zmalone: so I add the hostnames to that file and set the autoaccept time?
15:12 Gareth ahoy hoy
15:12 calvinh joined #salt
15:13 zmalone You don't even need to add the hostnames, the way I've seen it used
15:13 StolenToast what like a "*"?
15:13 JDiPierro joined #salt
15:15 zmalone "If the autosign_file is specified incoming keys specified in the autosign_file will be automatically accepted. Matches will be searched for first by string comparison, then by globbing, then by full-string regex matching. This should still be considered a less than secure option, due to the fact that trust is based on just the requesting minion id."
15:15 zmalone if you don't specify it, all minions will match
15:16 zmalone there are real security implications there, because a minion can claim to be another minion, register, and capture secure content.
15:16 zmalone but if that's okay, it'll do what you want
15:18 zmalone (the default is to not specify an autosign_file, in case that wasn't clear)
15:19 pogotech left #salt
15:21 quasiben joined #salt
15:22 domel joined #salt
15:24 NV joined #salt
15:26 jeffspeff joined #salt
15:27 kawa2014 joined #salt
15:27 StolenToast is the minion id by default the hostname?
15:27 ageorgop joined #salt
15:28 zmalone Yes.
15:28 StolenToast That system will work fine for now but I'd like to at least specify which hosts
15:28 favadi joined #salt
15:28 StolenToast ok thanks
15:28 zmalone Specifying minion names isn't really much more secure, in that anyone can claim a minion id.
15:29 zmalone The minion makes its id match its hostname, it isn't that the master sets the minion id to match what the master believes the host name is.
15:29 StolenToast I understand, but the only example I can think of where that would be a problem is if DNS is wrong WHILE one of these nodes rebuilds
15:29 dthom91 joined #salt
15:29 jdesilet joined #salt
15:29 geekatcmu you're provisioning system doesn't set the hostname?  Weird.
15:29 favadi joined #salt
15:29 StolenToast no it does
15:29 geekatcmu s/you're/your/
15:30 jeffspeff i'm not sure if it's just a coincidence or not but after i updated my salt master from 2015.5.5.0 to 2015.8.0.3 the master keeps losing network connection. i have to restart the network service to regain connection. anybody else experiencing this with salt 2015.8.0.3 and centos 7?
15:30 StolenToast hostnames is pulled from DNS first thing
15:30 zmalone So if I'm the minion foo-prod, I can set my minion id to be bar-prod, even though the master may look up my ip and see that it corresponds with foo-prod
15:30 bhosmer joined #salt
15:30 StolenToast we can rule out any kind of malicious intent in this system, any problems would be due to misconfiguration
15:31 StolenToast is the minion id a grain?
15:32 debian112 joined #salt
15:33 zmalone nodename is the grain you want
15:34 zmalone or id, I'm actually not sure
15:34 iggy ^C: because the default config file is expected to be empty
15:34 zmalone I think id
15:34 zer0def joined #salt
15:34 aqua^c joined #salt
15:36 StolenToast ok so something like {{ grains['id'] }} == "thesnodes*" in the autosign file?
15:36 tiadobatima joined #salt
15:38 iggy you can't use jinja in the config files
15:38 StolenToast just "thesenodes*" then?
15:39 Akhter joined #salt
15:39 andrew_v joined #salt
15:39 iggy wait, I haven't read back, are you talking about SaltStack's autosign functionality or are you calling your reactor-fu to auto accept keys autosign?
15:40 clintberry2 joined #salt
15:40 iggy if A, yes, the autosign.conf file takes globs
15:40 StolenToast autosign
15:40 _JZ_ joined #salt
15:40 StolenToast I was asking about the best way to keep minions in the pool through rebuilds
15:40 iggy it's a tricky task
15:41 StolenToast and it's a closed system so security is not an issue
15:41 StolenToast authentication is still desirable though
15:41 StolenToast it would be fair to say the hostname as reported by the nodes themselves is reliable
15:41 zwi joined #salt
15:41 iggy the most secure way is probably to have whatever you're using to spin up nodes go through salt-api+wheel.key
15:41 StolenToast so I figured just accepting all the keys from the hosts I want would be fine
15:41 iggy but barring that, in a sufficiently secure network, autosign should work
15:42 StolenToast that sounds like an ultimately better system, got a link?
15:42 StolenToast but I think I will use autosign for now
15:42 iggy I saw a good blog post on it once
15:44 iggy and I can't seem to find it now, but googling for "salt api wheel.key" should probably get you started when you get ready to go down that road
15:49 DammitJim joined #salt
15:50 bhosmer joined #salt
15:50 davisj GAH!! so it appears that using a non-default render pipeline kills pillar rendering under salt-ssh. Anyone run it to something like that before? https://gist.github.com/davisj/57163595493bdd8831db
15:51 davisj s/it/in/
15:51 quasiben joined #salt
15:51 edulix joined #salt
15:52 StolenToast also does anyone have a good solution for minions sometimes getting frozen in a highstate call and refusing further highstates?
15:53 zmalone I recall there being issues in the github issue tracker about that.
15:53 zmalone I'd check if the minion is still running though, or if it's crashed as a result.
15:55 ALLmightySPIFF joined #salt
15:56 zmalone ex. https://github.com/saltstack/salt/issues/27599
15:58 tiadobatima1 joined #salt
16:04 Hell_Fire joined #salt
16:06 StolenToast restarting the minion service usually fixes it
16:09 tmkerr joined #salt
16:10 jdesilet joined #salt
16:24 elsmo joined #salt
16:24 crashmag joined #salt
16:25 braqoon joined #salt
16:25 viking60 joined #salt
16:26 braqoon Hi, I'm trying to find a best way of adding a service to debian based system with use of salt and update-rc.d but seems to only find this : https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.debian_service.html#module-salt.modules.debian_service
16:26 viking60 Howdy I am a salt greenhorn but I have i 6 boxes that I use with salt: Question
16:27 braqoon i would prefer scripted one time run after adding a file to /etc/init.d/
16:27 viking60 I have Arch and Manjaro that both use pacman but have different repos - how can I add the Manjaro epos to make the pkg module work?
16:28 hal58th joined #salt
16:30 braqoon viking60, you want to specify separate repos configs per distro, right ?
16:30 iggy braqoon: service.enabled ?
16:31 viking60 Yes I think that would do it I have Manjaro minions that do not have pkg module working the rest is fine
16:31 ashirogl joined #salt
16:32 braqoon iggy, can I use that in .sls file ?
16:32 iggy braqoon: ssh:\n  service.enabled
16:33 viking60 braqoon, I get  pkg is not available but the only difference from Arch are the repos
16:33 ksj anyone had problems with utf8 in yaml? UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 30: ordinal not in range(128)
16:34 iggy ksj: yeah, don't do it
16:34 iggy python2 sucks at utf
16:34 ksj ?? so...how am I supposed to have utf8 in the pillar?
16:34 StolenToast it can do it, just not easily or elegantly
16:34 iggy don't?
16:34 StolenToast python I mean
16:34 ksj it's 2015...this seems crazy...
16:35 ksj what's a work around? I can't be the only one who has utf-8 characters in pillar?
16:35 ashirogl1 joined #salt
16:35 StolenToast what is the specific reason you need that, if I may ask?
16:35 StolenToast pillar data seems like it's used for administrative purposes
16:36 StolenToast if you needed utf8 information for like a motd then I'd think using the file server would be better
16:37 viking60 braqoon, ..and the OS name is different of course
16:37 ksj well, for starters the password salts contain utf-8 characters...which is dumb, but unfrotunately there's not much we can do to change it now
16:37 fredvd joined #salt
16:37 ksj but real names in the users also causes problems
16:37 braqoon viking60, I would suggest first sorting repos per distro
16:38 iggy chef?
16:38 Fiber^ joined #salt
16:38 zmalone ksj: be glad you are staying away from gpg then, https://github.com/saltstack/salt/issues/24556
16:38 viking60 Bare with me I am new at this  :) I can update Centos Arch Debian from my Manjaro master but my Manjaro minions are not responding - would that do it=
16:38 braqoon viking60, I'm not familiar with pacman but if package names are the same, your only problem is to have right repos in your pacman config
16:39 writtenoff joined #salt
16:39 braqoon left #salt
16:39 viking60 braqoon, Yes that sounds exactly right
16:40 viking60 pacman handles things the same in both Manjaro and Arch but different repos
16:41 viking60 package names are the same
16:43 viking60 salt 'manjaro-minion' cmd.run 'pacman -Syu' --works fine but not salt 'manjaro-minion' pkg.upgrade
16:44 mapu joined #salt
16:45 krymzon joined #salt
16:45 Sketch it appears the version option to pkg.installed/pkg.removed doesn't work well with multiple kernel packages installed on rhel
16:46 genediazjr joined #salt
16:47 crashmag joined #salt
16:49 pravka joined #salt
16:49 Sketch hmm, no actually, it seems like it just doesn't care about the specified version at all
16:49 Sketch including on the subpackages which only have one installed
16:49 viking60 braqoon, So i guess the question is how do I get salt to include the manjaro minion in the pkg.upgrade Debian Centos Arch etc are all updated with the exeption of my manjaro minion
16:49 Sketch so i'm guessing version doesn't actually check, just blindly passes the version when installing
16:52 jdesilet joined #salt
16:53 aboe_ joined #salt
16:53 KyleG joined #salt
16:53 KyleG joined #salt
16:54 jdesilet joined #salt
16:55 kitplummer joined #salt
16:57 ferbla_ joined #salt
16:58 aboe_ joined #salt
17:01 moogyver anyone played with the syndics and have a feeling for what 'best effort' really is for returning results to the originating master?
17:01 cb joined #salt
17:02 whidbeywalker joined #salt
17:04 ageorgop joined #salt
17:05 whidbeywalker joined #salt
17:07 aparsons joined #salt
17:08 vielmetti_ joined #salt
17:08 vielmetti joined #salt
17:10 vielmetti hello, looking into using salt to manage the new AWS IOT service, and trying to figure out where to start
17:10 breakingmatter joined #salt
17:11 jodv joined #salt
17:13 viking60 joined #salt
17:14 linjan_ joined #salt
17:14 Akhter joined #salt
17:18 Bryson joined #salt
17:19 bhosmer joined #salt
17:23 tmclaugh[work] joined #salt
17:32 jeffspeff i'm having an odd issue after updating to latest version of master and minion. for some reason all packages in my windows repository are broken. when i try to install, i get the error 'Package XXXX not found in the repository'. I can run salt-run winrepo.genrepo and it shows the packages fine though.
17:33 jeffspeff i've tried increasing the logging on the minion to trace and it doesn't show anything more helpful
17:35 denys_ joined #salt
17:43 jacksontj joined #salt
17:48 MeltedLux joined #salt
17:49 kitplummer joined #salt
17:50 chingadero1 joined #salt
17:50 armguy joined #salt
17:53 Bryson has anybody here successfully used djangomod.loaddata?
17:54 chingadero1 I'm getting "Comment: The following arguments are missing: module" from this module.run cpan.install state: https://gist.github.com/jbeigh/754724a927d127a9ad6f#file-gistfile1-txt. Any suggestions?
17:56 Heartsbane joined #salt
17:58 jeffspeff chingadero1, are you sure it's a module and not a state? i've found that they don't always have the same options.
17:58 chingadero1 https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cpan.html#module-salt.modules.cpan is my reference
17:59 jeffspeff check the docs for the actual version you're using instead of "latest". i learned that the hard way as well
18:03 TyrfingMjolnir joined #salt
18:04 larsfronius joined #salt
18:09 chingadero1 I'm using 2015.5.3 from ubuntu ppa. https://docs.saltstack.com/en/2015.5/ref/modules/all/salt.modules.cpan.html#module-salt.modules.cpan is more correct? It looks the same.
18:14 baweaver joined #salt
18:14 murrdoc joined #salt
18:14 jeffpatton1971 anyone running 2015.5.5 salt-cloud and has azure working?
18:15 murrdoc basepi:  2015.5.5 package please
18:15 murrdoc also i wont ask after this week
18:15 murrdoc i wanted to give it one last try
18:15 murrdoc thanks basepi
18:15 dendazen joined #salt
18:16 basepi We will not be packaging 2015.5.5 internally, sorry. :(
18:16 murrdoc heart broken
18:16 murrdoc truly
18:16 murrdoc will there be a 2015.5.6 ?
18:17 bVector has anyone used the status.master function? I may be wrong but it looks like the code is not right
18:18 JDiPierro joined #salt
18:19 bVector https://github.com/saltstack/salt/blob/develop/salt/modules/status.py#L775
18:19 szhem joined #salt
18:19 zmalone basepi: Any chance of an explanation on what happened there?  We're not by any means owed one, but I'd love to know the story.
18:19 bVector connected is set to True during the function call and never modified in the function
18:19 zz_Cidan joined #salt
18:19 zmalone (with 2015.5.5 not being available on the ppa, and then not being offered at all for ubuntu, deb, etc.)
18:20 basepi murrdoc: there will be a 2015.5.6, unknown whether we're packaging it internally or not
18:20 basepi since it's not a 2015.8
18:20 bVector unless its meant to have the status passed into the function, in which case I'm not sure why its comparing IPs
18:20 basepi zmalone: prior to 2015.8.0 debian/ubuntu packages were handled by Joe Healy, a community member. Not sure what happened with 2015.5.5 packages.
18:21 DammitJim dammit
18:21 DammitJim :D
18:21 basepi He's a super busy guy, so packages were often delayed. Part of the reason we're packaging for major distros for 2015.8.0 and on
18:21 DammitJim how do I verify that a server has a samba share and add the share if it doesn't exist?
18:24 zmalone Thanks, that's helpful.
18:25 murrdoc when is 2015.8.1 gonna be ready
18:25 murrdoc (cant go witha  .0, this isnt the wild west anymore)
18:26 rhodgin joined #salt
18:27 jcockhren murrdoc: inoright
18:29 murrdoc well i could have
18:29 murrdoc but now we in prod
18:29 murrdoc got a few k servers
18:29 murrdoc already fighting a bunch of shit
18:29 murrdoc dont want to put a .0 in the mix
18:30 anmolb joined #salt
18:32 TyrfingMjolnir joined #salt
18:34 baweaver joined #salt
18:35 jalbretsen joined #salt
18:36 winsalt joined #salt
18:37 felskrone joined #salt
18:41 GreatSnoopy joined #salt
18:42 Akhter joined #salt
18:43 bVector felskrone: I'm looking at status.master, trying to detect a single master not connected and setup something out of band for key management
18:44 felskrone yes, and now you expect me to do what exactly? :-)
18:45 bVector just trying to figure out how to hook into it, it sets connected=True at the beginning and doesnt change that in the function
18:45 kitplummer joined #salt
18:46 bVector or maybe I'm not using it as originally intended, I want to call it at a regular interval and do *something* if the key hasnt been accepted on the master
18:46 bVector or is otherwise not able to connect
18:47 ingwaem joined #salt
18:47 ingwaem left #salt
18:48 bVector oh, I see what I misunderstood, the ifs on lines 808 and 813 are different
18:48 bVector so you pass in connected=True if you want to fire an event if its disconnected, and connected=False if you want it to fire an event if it is connected
18:49 felskrone it is not intended to be called from a state or module, i added it to be able to send events to the minions eventbus and switch to a different master
18:51 kitplummer joined #salt
18:52 bVector cool, thanks, could you hint me to where that is handled?
18:54 felskrone the switch to a different master?
18:55 bVector nvm, found it in minion.py handle_event
18:56 felskrone https://github.com/saltstack/salt/blob/develop/salt/minion.py#L1546
18:57 winsalt maybe I am missing something obvious, but I have a custom state in _states and ive synced it, but running it gives an 'module.state' is not available error
18:58 iggy murrdoc: sissy
18:58 bVector winsalt: how are you invoking the state
18:58 winsalt yeah, directly with state.sls
18:58 iggy can you paste the exact command and the output?
18:59 murrdoc iggy:  s/si/pu
18:59 bVector and the sanitized sls if possible
18:59 tmclaugh[work] joined #salt
19:00 mvensky joined #salt
19:02 traph joined #salt
19:02 traph joined #salt
19:02 GreatSnoopy joined #salt
19:02 kitplummer joined #salt
19:04 winsalt https://gist.github.com/rmarcinik/b2594bf289a257a2da5e
19:05 iggy check minion logs to see if it complains about loading the state module?
19:06 bVector naming it module.py seems a bit overloaded
19:06 ferbla joined #salt
19:06 winsalt those are just generic names i replaced
19:06 bVector oh ok :)
19:07 iggy I really hope the obfuscation isn't hampering our ability to debug
19:07 bVector try salt-call test.not_loaded
19:07 ferbla joined #salt
19:07 winsalt on the minion right?
19:07 bVector yeah
19:08 winsalt i dont think the generic names should matter, since i had another custom state working fine a few hours ago, same set up
19:08 bVector hrm, not_loaded may only give you modules, not states
19:08 winsalt i dont see them in the not_loaded list
19:10 kitplummer joined #salt
19:10 kinetic joined #salt
19:10 winsalt actually, the other custom state i had is showing the same thing.  it must be something with upgrading to 2015.8
19:12 aqua^c joined #salt
19:12 kinetic having trouble running git.latest with salt on a windows minion, after looking into it salt uses 'which' in python to check if the 'git' command exists
19:14 kinetic is this an actual issue or is there something I need to be doing to get windows rolling right? I have check that both 'which' and 'git' work in command prompt and that 'which git' returns a value
19:16 iggy winsalt: try pasting more code that's less obfuscated maybe
19:17 whytewolf kinetic: check 'which git' returns from a cmd.run instead. [you can never be sure that you entering something on a command prompt has the same enviroment that salt does]
19:17 iggy kinetic: what trouble? error message? silent failure?
19:17 zmalone joined #salt
19:17 kinetic whytewolf: I'll try that
19:18 jeffspeff has something changed in winrepo since 2015.5? I'm using 2015.8 now and none of the packages are working
19:18 kinetic iggy: 'git' __virtual__ returned False
19:18 kinetic so I looked at that def and it checks that the command exists with 'which'
19:18 winsalt jeffspeff: https://github.com/saltstack/salt/issues/27520
19:19 sjorge joined #salt
19:19 sjorge joined #salt
19:19 winsalt you need a winrepo_source_dir: salt://win/repo in your minion config
19:19 winsalt and I am guessing the problem I am having with states is another undocumented config change
19:21 kinetic jeffspeff: not sure if it helps but I think update uses winrepo-ng now, make sure that's where master points and do a update git repos on master and refresh dbs on minions
19:23 kinetic whytewolf: good call! I was using ConEmu and realized that using just cmd prompt, 'which' does not exist
19:24 kinetic so are there any solid examples of using git with windows? I can't even do a git pull easily :(
19:24 felskrone joined #salt
19:24 kinetic * not git, salt
19:24 kinetic are there any good examples of using *salt* with windows?
19:25 chingadero1 left #salt
19:26 winsalt you can always do cmd.run
19:27 kinetic winsalt: yeah that's true, I was just hoping some of the cool salt things would work, but I suppose I'll just make lots of cool py/sh scripts and such
19:28 kinetic winsalt: also where would logs be for the salt service on windows? I haven't done much digging on this yet but if you happen to know it would be nice...
19:29 winsalt everythings under C:\salt, logs C:\salt\var\log
19:31 kinetic winsalt: hmm okay, I looked there and it seems scarce, but I may have cleared out on accident so I'll take another peak. Thanks!
19:31 mapu joined #salt
19:31 winsalt when i want to see out put i just run the salt-minion-debug.bat in C:\salt
19:37 StolenToast is there a file argument in states that will make sure the file is NOT there?
19:37 StolenToast and delete it if it is?
19:39 StolenToast yeah it's called absent
19:41 Sketch it sort of annoys me that some salt functions are .absent and others are .remove(d), wish the naming was a little more consistent sometimes
19:44 murrdoc whats the new http module called in 2015
19:47 breakingmatter joined #salt
19:50 timoguin joined #salt
19:50 JDiPierro joined #salt
19:54 jeffspeff there are some major inconsistancies with the documentation for winrepo on 2015.8... This https://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#config-parameters-renamed says one thing https://github.com/saltstack/salt/issues/27520 agrees with it, but the default file shows something different. but neither of them are working. i still get package not found errors. this was working prior to the upgrade.
19:56 cfroot joined #salt
19:59 anmolb joined #salt
20:05 breakingmatter joined #salt
20:06 winsalt jeffspeff, you have the msi's or whatever on the master right? in /srv/salt/win/repo ?
20:06 Nazca joined #salt
20:06 jeffspeff /srv/salt/base/win/repo is where everything is
20:08 winsalt ok, so if I am using 2015.3 i have a win_repo_cachefile setting in the minion config pointing to the winrepo.p and it works, when i upgrade I have to remove  that setting and use winrepo_source_dir pointing to the win/repo dir
20:09 jeffspeff you're referring to the minion right?
20:09 winsalt yes in the minion config file
20:09 jeffspeff where is that here? https://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#minion-config
20:10 winsalt https://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#config-options-for-minions-2015-8-0-and-later
20:11 jeffspeff so the document says two different things... nice
20:13 giantlock joined #salt
20:15 Akhter joined #salt
20:17 jeffspeff winsalt, it still doesn't work... here are my configs https://gist.github.com/jeffclay/56c606431aea91ea55ea
20:19 cyborglone joined #salt
20:22 winsalt you are gonna hate it, but the winrepo_cachefile is relative to the winrepo_dir now, so it should just be winrepo.p
20:24 jeffspeff should i just leave that setting commented out then?
20:24 ashirogl joined #salt
20:24 winsalt i have it as "winrepo_cachefile: winrepo.p"
20:25 jeffspeff and remove the winrepo_source_dir in the minion config or leave it?
20:26 winsalt leave  the winrepo_source_dir, but that one should just be the repo dir like "winrepo_source_dir: salt://repo/win/"
20:26 ashirogl1 joined #salt
20:26 tercenya joined #salt
20:27 kawa2014 joined #salt
20:28 jeffspeff now i'm getting this error on the minion when running pkg.refresh_db  "IOError: [Errno 13] Permission denied: 'c:\\salt\\var\\cache\\salt\\minion\\files\\base\\win\\repo\\winrepo.p'"
20:29 edulix joined #salt
20:29 jeffspeff when traversing that dir path i found the cache includes both base\win\repo and base\win\repo-ng
20:32 winsalt thats new to me, are you running the minion as a certain user?
20:33 jeffspeff no
20:33 jeffspeff let me delete the cache and try again
20:33 jeffspeff maybe something messed up from using those bad config entries
20:35 jeffspeff holy crap it's finally working!
20:35 jeffspeff yay!
20:37 Bryson joined #salt
20:39 tmclaugh[work] joined #salt
20:40 jeffspeff thanks for the help winsalt
20:40 rm_jorge joined #salt
20:40 winsalt pay it forward, this irc has helped a lot for me
20:44 murrdoc good man winsalt
20:44 murrdoc good man
20:47 GreatSnoopy joined #salt
20:48 dendazen joined #salt
20:49 aabes joined #salt
20:50 aabes I'm trying to play around with the vagrant demo, but provisioning the minion fails to: Copying salt minion config to /etc/salt Failed to upload a file to the guest VM via SCP due to a permissions error. This is normally because the SSH user doesn't have permission
20:50 aabes this is with vagrant 1.7.4 and the bundled salt provisioner.
20:50 aabes any pointers appreciated
20:54 subsignal joined #salt
21:05 viq joined #salt
21:13 falenn joined #salt
21:14 baweaver joined #salt
21:17 borgstrom joined #salt
21:26 tmclaugh[work] joined #salt
21:30 rim-k joined #salt
21:32 jeffspeff joined #salt
21:34 jeffspeff i'm using file.managed to keep a file up to date. if i have a state that runs file.directory clean on that same directory where my managed file resides, then salt will remove all *other* files within that dir correct?
21:35 jeffspeff https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.directory
21:37 teebes joined #salt
21:37 keimlink joined #salt
21:45 borgstrom joined #salt
21:46 CheKoLyN joined #salt
21:46 aabes @jeffspeff  - in general states don't communicate these type of things
21:47 linjan__ joined #salt
21:50 aabes but directory does do that: https://github.com/saltstack/salt/blob/develop/salt/states/file.py#L324
21:56 baweaver joined #salt
22:01 MadHatter42 joined #salt
22:03 ageorgop joined #salt
22:04 ageorgop joined #salt
22:05 larsfronius joined #salt
22:06 KyleG1 joined #salt
22:09 ashirogl joined #salt
22:16 sunkist joined #salt
22:18 baweaver joined #salt
22:19 keimlink joined #salt
22:20 KyleG joined #salt
22:20 KyleG joined #salt
22:21 timoguin joined #salt
22:26 bfoxwell joined #salt
22:33 keimlink joined #salt
22:40 totte left #salt
22:42 timoguin joined #salt
22:43 jodv joined #salt
22:47 edeefelt joined #salt
22:48 edeefelt Can anyone point me to the correct documentation for installing salt-master and salt-minion on RHEL6.6?  I see many posts with the issue but no solutions.  RHEL does install python-jinja2-26.noarch but that is not exactly the "jinja2" that the salt yum setups want, thus I can't get salt installed.
22:50 timoguin_ joined #salt
22:50 moogyver edeefelt: the salt COPR has a version of python-jinja2 you can use
22:51 moogyver https://repo.saltstack.com/yum/rhel6/
22:52 moogyver depending on how your rhel6.6 box is installed, you'll need some repos, either from the base media or from the updates.
22:52 moogyver er, rpms, not repos
22:53 edeefelt awesome, thanks I'll try adding the repo
22:54 iggy you could also check to see how salt-bootstrap does it
22:54 moogyver edeefelt: for what it's worth, i have the default os media repo, the 'updates' repo, and that salt repo on my rhel6.6 vagrant boxes ( which are installed with only @Core and @Base ), and I can 'yum install salt' with those.
22:54 moogyver salt-bootstrap doesn't work iggy, unless you have epel configured as well
22:54 rudi_s left #salt
22:54 edeefelt yum install salt-master
22:55 dendazen joined #salt
22:55 edeefelt Error: Package: salt-2015.5.5-1.el6.noarch (epel)            Requires: python-jinja2  You could try using --skip-broken to work around the problem  You could try running: rpm -Va --nofiles --nodigest
22:55 moogyver edeefelt: looks like it's trying to grab the salt package from epel, not from the repo.saltstack.com repo
22:56 kwork joined #salt
22:56 kwork joined #salt
22:56 moogyver the salt-master in the salt repo is 2015.8.0
23:00 baweaver joined #salt
23:00 ashirogl1 joined #salt
23:02 edeefelt this worked: https://repo.saltstack.com/#rhel thanks for the help, adding the repo worked. Strange that the regular rhel repo "tries" to work and fails.  You would think RedHat would make sure everything in their repo works.
23:02 moogyver in the future, hopefully the salt-bootstrap stuff will just contain everything you need
23:03 edeefelt I tried salt-bootstrap originally, but it gave the same jinja error. I wonder why the boostrap doesn't just add the repo and use it.
23:04 moogyver not sure, but that's why https://github.com/saltstack/salt-bootstrap/issues/669 is open :)
23:04 edeefelt Yes, read that one.  ;) So I have salt working on RHEL6 now. Need to get it going on Korora 22 next week. Thanks for the help.
23:06 denys_ joined #salt
23:11 kermit joined #salt
23:15 baweaver joined #salt
23:16 bfoxwell joined #salt
23:18 Barbarossa joined #salt
23:18 Barbarossa Hi there
23:20 Barbarossa I'm facing the problem that salt is complaining about problems with some pillar states which I deleted and which aren't referenced anywhere anymore. The funny part is that the problem doesn't occur when I'm running highstate on the minion, but only when I run state.sls for a state which does not in any way involve this part of pillar
23:20 Barbarossa Any ideas how to pin this problem down?
23:20 timoguin joined #salt
23:24 timoguin_ joined #salt
23:26 dendazen joined #salt
23:27 jodv joined #salt
23:40 dendazen guys when salt gets a grain for a ‘domain’ where is taking it from?
23:41 moogyver Barbarossa: have you tried clearing the caches? salt-run cache.clear_pillar '*'
23:44 moogyver dendazen: it gets it from the hostname ( via socket.getfqdn ) https://docs.python.org/2/library/socket.html#socket.getfqdn
23:45 dendazen isn’t the code from here
23:45 dendazen https://github.com/saltstack/salt/blob/develop/salt/grains/core.py
23:46 dendazen looks like it looking into /etc/resolv.conf?
23:46 dendazen no?
23:47 dendazen i can test thanks for the link
23:49 timoguin joined #salt
23:49 moogyver dendazen: it's in core.py yeah, but i believe it's from the hostname function, not the dns parse one
23:50 dendazen oh ok.
23:51 dendazen oh i see
23:51 dendazen so it is this part
23:51 dendazen grains['fqdn'] = salt.utils.network.get_fqhostname()
23:51 dendazen (grains['host'], grains['domain']) = grains['fqdn'].partition('.')[::2]
23:51 dendazen return grains
23:51 moogyver yeah
23:51 dendazen sorry for copy/paste
23:52 dendazen ok then where does this call ’socket.gethostbyaddr(ip_address)’
23:53 dendazen which is eventually getting the domain
23:53 dendazen takes it from?
23:53 dendazen it uses linux system call?
23:53 dendazen or it reads it from /etc/hosts ot /etc/sysconfig/network?
23:54 dendazen it is just weird
23:54 dendazen in my case i am doing this
23:55 dendazen https://gist.github.com/anonymous/c1716ef25773bcdcdd25
23:58 aparsons joined #salt
23:59 dendazen and one server returns salt-call grains.get 'domain'
23:59 dendazen local:
23:59 dendazen sec1
23:59 dendazen and another
23:59 dendazen salt-call grains.get 'domain'
23:59 dendazen local:
23:59 dendazen sec1.example.com
23:59 dendazen so i am trying to figure out

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