Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-06-09

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

All times shown according to UTC.

Time Nick Message
00:01 alexlist joined #salt
00:05 clearclaw joined #salt
00:06 clearclaw left #salt
00:06 clearclaw joined #salt
00:07 hemebond stack_korora: What are you trying to do?
00:07 clearclaw I'm trying to use salt-cloud with Alicloud/Aliyun and am geting "You are not authorised..." for every operation.  But when I do the same API calls by hand/REPL they work just fine (same keys as in id/key etc).  Ideas where to look?
00:07 woodtablet left #salt
00:08 sjohnsen joined #salt
00:12 LA-Clone joined #salt
00:12 clearclaw (AWS is a dream in comparison)
00:12 stack_korora hemebond I want to set a variable based on a single network IP the system has (it has many, but each server has one of a few unique IP's which I want to set the variable on)
00:12 stack_korora I think I have it with the if statement. Or at least it's the closest I've had to something that works. :-)
00:12 stack_korora Give me a minute and I can post a pastebin.
00:13 LA-Clone left #salt
00:14 LordOfLA joined #salt
00:21 stack_korora My original start: https://pastebin.com/ZZnCSVBt  My solution: https://pastebin.com/r7zeNZaD I would love feedback on ways I can make this better.
00:23 stack_korora Thanks whytewolf for the suggestion on using the network.ip_addrs. That filtering helped quite a bit.
00:23 hemebond The final one seems the best for your situation.
00:24 hemebond I thought it would be a far bigger dataset.
00:24 stack_korora Awesome. Thanks. Just wanted to make sure that I didn't miss something obvious.
00:24 stack_korora I too originally thought it would be a much bigger data set. But I the realization of combining the CIDR helped me significantly.
00:25 stack_korora Before i was trying to check the IP against 192.168.1.x - 192.168.9.x. So I was initially worried about a monster if/elif/ect statement.
00:26 stack_korora That 'dur' moment of combining CIDR simplified it so much. :-D
00:26 rihannon joined #salt
00:32 nicksloan joined #salt
00:32 clearclaw (Ubuntu
00:36 sh123124213 joined #salt
00:42 hemebond No one else using a reactor to trigger a highstate?
00:42 stack_korora left #salt
00:45 sjohnsen joined #salt
00:45 colegatron joined #salt
00:52 zerocoolback joined #salt
00:54 raspado joined #salt
00:57 c_g joined #salt
01:08 jas02 joined #salt
01:09 MTecknology that hostnetwork value is something I'd probably stick into pillar and then just use {{ pillar['hostnetwork'] }} in states
01:29 feld joined #salt
01:37 lorengordon stack_korora: {% set network_map = {'192.168.100.0/24': 'Tokyo', '192.168.0.0/24': 'Dallas', '192.168.1.0/24': 'Dallas' %}
01:37 lorengordon {% set location = salt.match.filter_by(network_map, expr_form='ipcidr') %}
01:38 jmiven joined #salt
01:39 felskrone joined #salt
01:39 lorengordon or just use the default compound matcher: {% set network_map = {'S@192.168.100.0/24': 'Tokyo', 'S@192.168.0.0/24': 'Dallas', 'S@192.168.1.0/24': 'Dallas' %}
01:39 lorengordon {% set location = salt.match.filter_by(network_map) %}
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.5 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers <+> The call for speakers for SaltConf17 is now open: http://tinyurl.com/SaltConf17
01:48 sjohnsen joined #salt
02:01 justan0theruser joined #salt
02:04 noobiedubie joined #salt
02:04 nicksloan joined #salt
02:08 evle joined #salt
02:12 zerocoolback joined #salt
02:13 zerocoolback joined #salt
02:26 hemebond Can anyone explain to me the difference between using cmd.state.apply and local.state.apply in reactor SLS files?
02:27 whytewolf Changed in version 2014.7.0: The cmd prefix was renamed to local for consistency with other parts of Salt. A backward-compatible alias was added for cmd.
02:27 nicksloan joined #salt
02:27 whytewolf https://docs.saltstack.com/en/latest/topics/reactor/#understanding-the-structure-of-reactor-formulas
02:28 hemebond Oooh, thank you.
02:29 whytewolf np
02:33 mpanetta joined #salt
02:37 hemebond I wonder if there's some issue with cmd.state.apply in 2016.3.6. It seemed to stop actually doing a highstate.
02:37 hemebond But local.state.apply is working fine now.
02:39 edrocks joined #salt
02:48 fritz09 joined #salt
02:59 Art_ joined #salt
03:01 mquin joined #salt
03:36 onlyanegg joined #salt
03:44 J0hnSteel joined #salt
03:47 keldwud joined #salt
03:47 keldwud joined #salt
04:06 mpanetta_ joined #salt
04:10 sid_ joined #salt
04:16 nafg hemebond: Hi, somehow your suggestion isn't working
04:16 hemebond What was my suggestion?
04:17 nafg sorry give me two minutes
04:22 nafg hemebond: it was about setting up the credentials for monitoring. It's mostly working. The current problem is a lot more narrow
04:22 hemebond Ah, right, collectd.
04:22 nafg So I have a pillar file that calls load_yaml
04:22 nafg and then a few minions get that pillar file in the pillar top.sls before their regular pillar file
04:23 nafg so jsonified would be something like {server1: [collectd, server1], server2: [server2], server3: [collectd, server3] }
04:23 nafg (just to avoid posting many lines here)
04:24 nafg Anyway I can't figure out why but it's not picking it up. For instance salt '*' pillar.items doesn't show it
04:24 nafg The crazy thing is it was working before but something else was broken,
04:25 nafg and somehow not it's not
04:26 nafg which makes no sense because before it didn't even parse because I left out the jinja in #!jinja|yaml|gpg
04:26 nafg How can I troubleshoot an invisible pillar file?
04:26 hemebond I'll need you to paste your code somewhere I can see.
04:26 nafg ok
04:26 hemebond Uh, check the salt master log.
04:26 hemebond Put the master log_level to debug and then do pillar.items
04:27 mikecmpbll joined #salt
04:27 nafg I've been tailing it but I'll change the level
04:28 mpanetta joined #salt
04:35 nafg hemebond: ok so it says it's rendering collectd.sls and it's coming up essentially empty. That's the file with your
04:35 nafg {%- set mycreds = creds.get(salt['pillar.get']('id'), none) %} \n {%- if mycreds is not none %}
04:36 nafg So apparently it's coming back none
04:37 druonysus_ joined #salt
04:38 nafg I'm not seeing any reference to the yml file (collectd-credentials.yml)
04:38 nafg in the output
04:41 edrocks joined #salt
04:42 raspado joined #salt
04:46 nafg hemebond: any idea?
04:46 hemebond umm
04:46 iggy try gist'ing the code somewhere
04:46 hemebond ^
04:46 whytewolf you say this is in pillar?
04:46 nafg Yes
04:46 hemebond This is in a pillar?
04:46 nafg https://gist.github.com/nafg/e65d75dc728660d5ece3035598ba5ab9
04:46 iggy minifying python/sls/yaml in here is a very poor substitute for a gist
04:47 hemebond You can't call pillar.get inside a pillar.
04:47 hemebond Not reliably anyway.
04:47 nafg hemebond: I think it was your code ;)
04:47 hemebond Pretty sure you're meant to be using grains.get('id')
04:47 hemebond Probably.
04:47 hemebond :-D
04:47 nafg Ok let me try that
04:48 nafg Jinja runs on the minion?
04:48 whytewolf pillar runs on the master
04:48 iggy it also looks like collectd-credentials is all indented which I don't think you want
04:49 nafg whytewolf: then grains.get won't work will it?
04:49 nafg iggy: it's not
04:49 nafg maybe github's padding
04:49 iggy pillar rendering uses minion grain data
04:49 nafg ok so let's see if it worked
04:50 whytewolf nafg: grains.get from the master pulls the data from the grains cache.
04:50 whytewolf based on the minion requesting the pillar
04:50 whytewolf iirc anyway
04:51 nafg sounds good
04:54 nafg says minion function caused an exception and rendering sls failed
04:56 hemebond Ah, that pillar.get 'id' was from when you were using a made-up ID.
04:56 hemebond I missed that when providing a new method.
04:56 nafg ok
04:57 nafg Now the issue is this:
04:57 nafg -----BEGIN PGP MESSAGE----- is getting rendered with the right indentation
04:57 nafg But the subsequent lines of the password start from the beginning of the line
04:57 iggy they should all be indented 2 more spaces
04:58 mikecmpbll joined #salt
04:58 hemebond {{ mycreds.password|indent(4) }}
04:58 iggy that may not be what's causing your problem, but it's a documented yaml idiosynch....
04:58 nafg iggy: wdym
04:59 whytewolf https://docs.saltstack.com/en/develop/topics/troubleshooting/yaml_idiosyncrasies.html#indentation
04:59 nafg Ok I know how yaml works, the issue is getting jinja to expand correctly
05:00 nafg hemebond: and start that at the beginning of the line so they're consistent?
05:00 hemebond Just add the indent part to what you've got I think.
05:01 nafg guess i better see docs
05:01 whytewolf |indent(4,true)
05:01 whytewolf http://jinja.pocoo.org/docs/2.9/templates/#indent
05:02 nafg 1
05:02 nafg +1
05:02 nafg if I use the filter
05:02 nafg 's defaults do I leave off the () ?
05:02 hemebond You need the number.
05:03 whytewolf default is 4
05:03 hemebond Oh, then yeah you can drop it.
05:03 nafg not empty ()
05:04 whytewolf |indent
05:04 nafg +1
05:04 _JZ_ joined #salt
05:08 nafg Ok thanks everyone
05:08 nafg it worked!
05:10 armyriad joined #salt
05:10 nafg hmm, collectd still not getting stuff :(
05:11 felskrone joined #salt
05:16 Bock joined #salt
05:35 buhm joined #salt
05:40 neilf__ joined #salt
05:40 StrikerST joined #salt
05:43 StrikerST hi
05:45 edrocks joined #salt
05:51 santos_ joined #salt
05:58 do3meli joined #salt
05:58 do3meli left #salt
06:16 nona joined #salt
06:21 preludedrew joined #salt
06:21 aldevar joined #salt
06:24 IdoKaplan joined #salt
06:29 IdoKaplan joined #salt
06:29 ashokrajar joined #salt
06:30 IdoKaplan hi
06:30 ashokrajar Hello Guys, is there a setting I can tune for gitfs sync frequency. Currently it default to 60sec for all remote filesystem sync.
06:31 IdoKaplan Hi, I would like to do something like this :  "{% if grains.id == '*flnkm*01' %}" . Can you please advise? Thanks, Ido
06:37 sh123124213 joined #salt
06:37 ashokrajar @IdoKaplan  Quick thing I can think of is something like {% if 'flnkm' in grains.id %}
06:42 hemebond IdoKaplan: Look into the match execution module.
06:44 IdoKaplan hembond: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.match.html this module?
06:45 hemebond yip
06:45 IdoKaplan ashkrajar. but if I want to use wildcard, is it possible? "fl*nkm"?
06:48 iggy ashokrajar: you can't change the fileserver update timer... unfortunately
06:49 iggy IdoKaplan: you should be doing matching in the top file... it supports globbing fine
06:50 ashokrajar iggy: thanks. But IMO, it's bad. It should be configurable and controllable.
06:50 IdoKaplan ok, thank you!
06:50 iggy ashokrajar: you're not alone
06:50 ashokrajar :)
06:50 iggy total pita on big get trees
06:50 iggy *git
06:51 hemebond ashokrajar: It is, just messy to have your targeting all over the show.
06:52 gmoro_ joined #salt
06:55 IdoKaplan left #salt
06:56 fracklen joined #salt
06:57 candyman88 joined #salt
07:02 jas02 joined #salt
07:12 mavhq joined #salt
07:13 djinni` joined #salt
07:15 impi joined #salt
07:16 haam3r ashokrajar: If your git server is also a minion then you can use reactor. Thats how I worked around that refresh time
07:17 yuhl joined #salt
07:17 o1e9 joined #salt
07:19 fracklen joined #salt
07:27 NegiLXXXVIII joined #salt
07:28 darioleidi joined #salt
07:28 NegiLXXXVIII hi
07:31 NegiLXXXVIII is there a way to access the answer of a previous run state and to evaluate the return within an sls file?
07:32 Rumbles joined #salt
07:33 NegiLXXXVIII i want to let either run an update state or a config sls file based on whether a update is needed or not
07:34 fracklen joined #salt
07:34 NegiLXXXVIII to check whether an update is needed i want to use the return of a module
07:38 dcpc007 hi all
07:40 dcpc007 is it possible to have the master on a debian 7 managing minions on debian 8 ? and more important, must i have the master always higher or equal version than minions ? (i try look with debian or saltstack repo what i can install)
07:43 pbandark joined #salt
07:46 edrocks joined #salt
07:59 major joined #salt
08:03 fracklen joined #salt
08:10 impi joined #salt
08:14 oida_ joined #salt
08:15 evle1 joined #salt
08:18 mikecmpbll joined #salt
08:21 qwerty joined #salt
08:21 hemebond dcpc007: OS doesn't matter. Salt version certainly matters.
08:21 hemebond Master should always have a Salt version equal to or newer.
08:21 nona joined #salt
08:22 hemebond NegiLXXXVIII: https://docs.saltstack.com/en/latest/ref/states/requisites.html
08:31 giomanda joined #salt
08:39 NegiLXXXVIII hemebond: i found that page already. but i need a a specific part of the return from the required state.
08:40 NegiLXXXVIII the previous state return a json with multiple keys and values
08:40 hemebond It sounds like you're trying to use Saltstack programmatically.
08:40 hemebond Saltstack is for enforcing a state.
08:40 NegiLXXXVIII ok
08:41 qwerty joined #salt
08:41 hemebond If you start trying to catch data from states you're going to make things more difficult for yourself.
08:41 hemebond See if you can't run a simple check against whetever you _might_ need to configure.
08:41 hemebond Then you can use that check in an "unless" parameter.
08:42 hemebond Or an "onlyif"
08:42 NegiLXXXVIII hmm ok
08:42 NegiLXXXVIII i guess i have to test some more with the win_update modules and states
08:43 hemebond What is it you're trying to do?
08:44 NegiLXXXVIII i want to set up new pc's with salt and later on keep them updated
08:44 hemebond That's fairly straight-forward.
08:44 NegiLXXXVIII so to set them up i have to install all windows updates and later on configure gpos, users etc...
08:45 dcpc007 hemebond: ok i'll see with saltstack repo if i can install the latest on the admin server which will be the master.
08:45 dcpc007 debian repo are not uptodate for old debian os
08:46 NegiLXXXVIII as far as i understand salt, if i call the state.apply the minion will try to reach the high state
08:46 hemebond dcpc007: Which repo? Are you using the official Saltstack repos?
08:46 hemebond NegiLXXXVIII: Correct.
08:47 hemebond NegiLXXXVIII: Why are you using Saltstack to configure group policy?
08:47 dcpc007 hemebond: i was trying with debian repo, i'm switching for saltstack repo now that i solve my install/upgrade bug
08:47 NegiLXXXVIII because the systems will be provided to customers and won't be in a domain
08:48 mikecmpb_ joined #salt
08:49 hemebond NegiLXXXVIII: Oh, just local group policies.
08:49 NegiLXXXVIII yeah local group policies
08:49 candyman88 joined #salt
08:51 hemebond Are they going to be managed by you at all afterwards?
08:52 NegiLXXXVIII to some extend
08:52 NegiLXXXVIII we provide updates new configurations
08:52 NegiLXXXVIII the systems can't load updates during the normal use
08:53 NegiLXXXVIII until now we provide the updates via new images which need to be installed by personal on site
08:58 NegiLXXXVIII if i apply a state via state.apply xxx all state i defnie in the sls file are executed even if none change is made in the system.
08:58 NegiLXXXVIII is that the correct behavior?
08:59 babilen NegiLXXXVIII: That is the expected behaviour, yes
08:59 NegiLXXXVIII ok
09:00 candyman88 joined #salt
09:00 babilen NegiLXXXVIII: Saltstack can't know beforehand if a state will have changes and it has to apply all states for, well, all states to have been applied
09:01 saintpablo joined #salt
09:01 NegiLXXXVIII thank you babilen
09:06 candyman89 joined #salt
09:09 lorengordon joined #salt
09:12 om2 joined #salt
09:13 capnhex joined #salt
09:25 nku joined #salt
09:27 qwerty joined #salt
09:37 om2 joined #salt
09:44 capnhex left #salt
09:45 jadsin joined #salt
09:48 edrocks joined #salt
09:55 losh joined #salt
09:55 om2 joined #salt
09:58 undicizeri joined #salt
10:01 man_of_wax joined #salt
10:02 man_of_wax I tried to run this command "salt "minion1" service.restart icinga2" and it just hangs. If I restart the service manually on the minion it works
10:03 hemebond man_of_wax: What init system?
10:04 man_of_wax it's ubuntu 12.04 so i think sysV
10:04 babilen man_of_wax: Which service?
10:04 man_of_wax icinga2
10:04 babilen It's probably not daemonising properly
10:05 man_of_wax if I try to run "cmd.run 'service restart icinga2'" the job never ends
10:13 man_of_wax is it possible that the output of server.restart command block the job? If I run "service.status icinga2" it works as expected
10:22 _KaszpiR_ more like systemd is retarded
10:22 _KaszpiR_ ;)
10:24 babilen _KaszpiR_: What does this have to do with SystemD?
10:24 babilen If anything I'd argue that a proper unit file would behave better than what appears to be a broken init script
10:28 _KaszpiR_ ha, triggered ;)
10:30 babilen _KaszpiR_: I don't quite follow
10:31 _KaszpiR_ nevermind, stupid joke
10:31 babilen Isn't it a bit late for "jokes" like that?
10:31 man_of_wax anyway the fact the salt hangs is a recurrent theme with my salt states
10:32 babilen man_of_wax: Please elaborate (best with actual examples of the scripts/states that don't work and hang)
10:34 man_of_wax for example I've written a salt state that install a pkg and then run two bash scripts
10:35 man_of_wax sometimes it never ends and i've to kiil the job manually
10:35 man_of_wax then I apply the state again and it works
10:36 babilen Could you show that state and, in particular, the bash scripts you are calling?
10:37 babilen Behaviour like that is mostly due to not closing file descriptors or otherwise terminating properly
10:37 man_of_wax yes
10:37 man_of_wax just a sec
10:39 man_of_wax this is my salt state: https://ybin.me/p/fad510a0bdb54817#p/5OcZUMbo7lXPmULjQEuLakhbPEhG+Jjrryc34jyGg=
10:40 man_of_wax the first time the job never ends and if i run with `-l debug` it keep saying:
10:40 man_of_wax [DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/master', 'bar.foobar.local_master', 'tcp://127.0.0.1:4506', 'clear')
10:40 man_of_wax [DEBUG   ] Passing on saltutil error. This may be an error in saltclient. 'retcode'
10:40 man_of_wax when I kiil the job manually and I rerun it the second time works
10:40 mt5431 joined #salt
10:42 babilen I guess that it is due to bugs in the scripts you call there
10:44 Rumbles joined #salt
10:47 evle1 joined #salt
10:48 gmoro joined #salt
10:53 om2 joined #salt
11:16 candyman88 joined #salt
11:22 jas02 joined #salt
11:27 LondonAppDev joined #salt
11:29 om2 joined #salt
11:36 mugsie joined #salt
11:36 mugsie joined #salt
11:42 _KaszpiR_ joined #salt
11:46 zerocoolback joined #salt
11:47 zerocoolback joined #salt
11:52 Rumbles does anyone know of a nice way to syntax check salt states? I was considering adding a python yaml syntax checker as a pre-recieve hook to my salt repo, but it barfs on jinja objects and I'm not sure the best way to get around it yet (might be able to figure it out but will take me some time) I was wondering if there was a better way?
11:54 nku mh, i have salt hilighting in vim.. other that that i guess you'd have to run the jinja and then parse the yaml..
11:55 Rumbles I have the salt vim salt plugin, it works well, but sometimes the minions mess up and it would be nice to reject it on commit :)
11:57 _KaszpiR_ Rumbles https://github.com/saltstack/salt/issues/802 this may be some help?
11:57 mr_kyd joined #salt
11:57 fredvd joined #salt
11:57 Rumbles I had that open already :)
11:58 Rumbles hadn't read all of it yet
11:59 lorengordon i like running "state.sls mock=True" and "state.show_sls" in CI to check syntax
12:00 Rumbles would your CI build agent have to be set up as a master?
12:00 nku oh right.. is mock different from test?
12:00 lorengordon yes, mock is not test
12:00 lorengordon i use it with salt-call --local, so no, no master
12:06 Rumbles I never really use salt call, but I tried "salt-call --local -c /srv/salt" and it told me I had to use --grains or --doc and those just return grain info and some docs... am I misunderstanding/
12:07 lorengordon -c would normally be /etc/salt, maybe you meant --file-root /srv/salt
12:08 Rumbles ah maybe...
12:09 lorengordon here's an example where we're using salt-call with travis-ci+docker to check state syntax on centos6 and centos7, https://github.com/plus3it/join-domain-formula/blob/master/.travis.yml
12:09 Rumbles I still get: salt-call: error: Requires function, --grains or --doc
12:09 Rumbles thanks
12:09 lorengordon ahh, the oxford comma strikes again
12:09 lorengordon function, --grains, or --doc
12:09 lorengordon salt-call --local state.sls <state>
12:09 lorengordon state.sls is the "function"
12:09 Rumbles oic
12:10 Deliant joined #salt
12:10 Rumbles we don't use southern commas in the north
12:11 mt5431 joined #salt
12:11 lorengordon i prefer the clarity of the extra comma :D
12:11 amcorreia joined #salt
12:12 mugsie joined #salt
12:12 mugsie joined #salt
12:12 Rumbles I was always taught that you shouldn't use a comma before an and like that (I went to a UK Grammar school) but I'm also rubbish at spelling and grammar, so what do I know :)
12:14 Rumbles I just get told the file isn't available lorengordon: https://paste.fedoraproject.org/paste/awfsCKjegeOiKbfy~NeFmV5M1UNdIGYhyRLivL9gydE=
12:14 gord0 joined #salt
12:15 lorengordon syntax for "salt-call" is the same as for "salt"
12:15 Rumbles need a host to run it against?
12:16 lorengordon minus that part :p
12:16 Rumbles errr....
12:16 lorengordon you don't specify the path to the file directly, you specify the function and its arguments
12:16 Rumbles oic sorry
12:16 lorengordon salt-call --local <function> <function-arguments>
12:17 lorengordon salt 'id' <function> <function-arguments>
12:17 Rumbles so function is something like "state.apply" ?
12:18 lorengordon right
12:18 Rumbles I ran "sudo salt-call --local --file-root /srv/salt state.apply logstash" and it's just sat there
12:18 Rumbles is this applying that state locally?
12:18 Rumbles because that wasn't what I wanted :/
12:19 lorengordon eups
12:20 Rumbles ok yeah
12:20 lorengordon salt-call always works on the local system
12:20 Rumbles stopped it it had added the repo, but not installed
12:20 thinkt4nk joined #salt
12:20 Rumbles no bother
12:20 lorengordon do "state.show_sls logstash" instead
12:20 lorengordon or "state.apply logstash mock=True"
12:21 lorengordon they validate slightly different things, so i do both in CI
12:21 Rumbles hmmm it would have to be run with sudo
12:21 Rumbles or sudoers config..
12:25 sarcasticadmin joined #salt
12:25 swills joined #salt
12:39 mt5431 joined #salt
12:39 pbandark Hi.. I am trying to fetch info using salt mine. I am getting the result if I explictly specify target.for ex: `salt 'tomcat' mine.get 'abc-saltclient' network.ip_addrs`.      but, I dont get any result if I specify condition. for ex: `salt 'tomcat' mine.get 'G@host:abc-saltclient' network.ip_addrs grain`
12:39 pbandark https://paste.fedoraproject.org/paste/8ni66IXh79HHUqcy1YpnOl5M1UNdIGYhyRLivL9gydE=
12:39 pbandark am I making any mistake in the command ?
12:51 edrocks joined #salt
12:52 DammitJim joined #salt
12:52 Savemech joined #salt
12:55 pbandark anyone ^^
12:55 Rumbles I haven't used salt mine sorry :(
12:55 pbandark ok
12:55 Rumbles I was expecting others in here to chip nin
12:56 Rumbles there are some guys in here I'm sure have or do use it
12:56 Rumbles but I'm not that person
12:56 Rumbles s/nin/in/
12:59 theanalyst joined #salt
13:07 adongy joined #salt
13:07 fracklen joined #salt
13:07 edrocks joined #salt
13:11 mugsie joined #salt
13:15 nicksloan joined #salt
13:16 c_g joined #salt
13:16 c_g joined #salt
13:16 colegatron_origi joined #salt
13:24 Jroo joined #salt
13:25 pbandark ok
13:28 rihannon joined #salt
13:35 candyman88 joined #salt
13:40 nicksloan joined #salt
13:40 mt5431 joined #salt
13:40 candyman88 joined #salt
13:43 Jroovec joined #salt
13:44 Jroovec Hello, I am trying to get some help with the winrepo functionality. I am running 2016.11.5 on both master and the win7 minion. Following the official guide for setting it up leaves me with the git winrepo-ng files on the master and pkg.refresh_db puts nothing on the minion (pkg.list_available returns blank). Any ideas?
13:49 edrocks joined #salt
13:54 jrr joined #salt
14:00 edrocks why does `schedule.list` not show `kwargs` from a job scheduled via pillars?
14:00 _JZ_ joined #salt
14:07 sknebel_2 joined #salt
14:07 Jroovec joined #salt
14:08 Jroovec joined #salt
14:18 nicksloan joined #salt
14:19 edrocks anyone know why scheduling jobs pillars in a different environment from base doesn't show up in schedule.list?
14:20 nicksloan-- joined #salt
14:21 mpanetta joined #salt
14:21 thinkt4n_ joined #salt
14:22 saltyguy joined #salt
14:22 Ricardo1000 joined #salt
14:25 saltyguy Hey everyone just wanted to follow up with question yesterday about older versions of salt. I was looking for version 2014.7.1 and couldn't find it. I ended up installing that specific version using pip (pip install salt==2014.7.1) which seems to be working for my use case.
14:26 saltyguy Hopefully I will be moving past this requirement soon and be able to use newer versions.
14:27 dstensnes but... why the old version though?
14:27 swills joined #salt
14:27 dstensnes saltyguy: ?
14:30 om2 joined #salt
14:35 evle joined #salt
14:35 thinkt4nk joined #salt
14:38 saltyguy Inherited a very neglected environment that is breaking
14:38 saltyguy Trying to duplicate in a dev environment
14:39 PatrolDoom joined #salt
14:39 dstensnes aha
14:44 nicksloan joined #salt
14:49 fracklen joined #salt
14:51 edrocks anyone run into this while pulling docker image in nitrogen?  pull() got an unexpected keyword argument 'client_timeout'
14:52 edrocks or Warnings: No 'Id' key in image inspect API return, this may be due to change in docker-py
14:52 edrocks my docker-py is up2date and salt is from develop branch yesterday
14:55 jas02 joined #salt
14:55 teh_champ joined #salt
14:57 mt5431 joined #salt
14:57 onlyanegg joined #salt
14:59 jas02 joined #salt
15:02 onlyanegg joined #salt
15:06 permalac joined #salt
15:07 hashwagon joined #salt
15:13 POJO joined #salt
15:16 dendazen joined #salt
15:16 om2 joined #salt
15:19 feld left #salt
15:30 sarcasticadmin joined #salt
15:32 aldevar left #salt
15:35 cyborg-one joined #salt
15:35 sarcasticadm joined #salt
15:37 swills joined #salt
15:37 rihannon joined #salt
15:38 fritz09 joined #salt
15:41 Alan joined #salt
15:42 cyborg-one joined #salt
15:43 pbandark joined #salt
15:48 teh_champ hello
15:49 teh_champ can anyone point me to documentation regarding using reference state modules?  for instance, i'm trying to use the apache_conf module
15:50 teh_champ but receiving a    No matching sls found for 'apache_module' in env 'base'  error
15:53 whytewolf teh_champ: that error is basicluy saying it can't find a file named apache_module.sls or apache_module/init.sls are you trying to pass a state file as your top file?
15:58 teh_champ sorry, that's not the right error
15:58 teh_champ Specified SLS apache in saltenv base is not available on the salt master or through a configured fileserver
15:58 teh_champ i'm trying to include the apache module as part of my own state
15:58 teh_champ - apache
15:58 teh_champ er
15:59 teh_champ include:
15:59 teh_champ - apache
15:59 teh_champ ultimately, i'm trying to use this state module as part of my own
15:59 teh_champ https://docs.saltstack.com/en/latest/ref/states/all/salt.states.apache_conf.html
16:00 whytewolf okay, did you write a state file called apache.sls or apache/init.sls that uses those states to set something up?
16:01 whytewolf those are state functions, which are used to write states
16:04 tiwula joined #salt
16:04 teh_champ oh okay, so something like " apache_conf.enabled:" i can't just call?
16:05 teh_champ i was thinking it was a builtin function
16:05 whytewolf it is a built in function.
16:05 whytewolf but it isn't a prebuilt state
16:06 whytewolf you said you already had states
16:08 teh_champ this is the state i'm trying to use
16:08 teh_champ https://github.com/bfrancisco1/vagrant-saltstack/tree/master/apache-rp
16:09 whytewolf okay, then you include apache-rp
16:10 whytewolf you can't just include a single stanza in a state file
16:11 teh_champ ah ok, i see what your saying
16:11 teh_champ thanks for the help
16:14 mt5431 joined #salt
16:20 LondonAppDev joined #salt
16:20 ChubYann joined #salt
16:26 hemebond1 joined #salt
16:26 dograt joined #salt
16:28 yuhl joined #salt
16:29 mpanetta joined #salt
16:32 LeProvokateur joined #salt
16:32 fracklen joined #salt
16:34 censorshipwreck joined #salt
16:34 lariv joined #salt
16:38 om2 joined #salt
16:41 om2 joined #salt
16:51 speedlight joined #salt
16:57 impi joined #salt
17:00 Trauma joined #salt
17:01 KyleG joined #salt
17:01 KyleG joined #salt
17:05 lariv Just starting with SaltEnterprise in an AWS EC2 sandbox, everything on one host incl master and minion. The master instance has accepted the minion key per CLI "salt-key -L", but that minion doesn't show up in the Enterprise GUI. I'm missing something (probably simple). Any advice?
17:09 POJO joined #salt
17:10 * whytewolf shrugs
17:10 whytewolf never used enterprise myself so have no idea.
17:11 whytewolf if only they had a free version for those of us with small enviroments.
17:11 iggy saltenterprise should come with support (that should be better than asking on IRC)
17:11 Ryan_Lane they really should make it free for 10 seats
17:11 Ryan_Lane so folks can try it
17:12 cyborg-one joined #salt
17:12 whytewolf 10 might not cover my home use case. [that was a problem i had with puppet entirepise free] but 20 would cover it.
17:13 Edgan joined #salt
17:14 whytewolf i did hear a rumor a while ago about possability of a 100 node free version. but personally think that is way to many for a free copy
17:14 iggy I'd just like their sales people to actually follow up
17:15 whytewolf might not have enough of them
17:17 whytewolf what i think would be good is a non free version that doesn't come with support. but i know that is a pipe dream. cause that would be abused 10 ways to sunday
17:17 AnalogLifestyle joined #salt
17:18 iggy you mean the gui without the support?
17:18 whytewolf yeah
17:18 iggy I could definitely sell that here
17:19 iggy we can't afford salt support for 20k+ servers, but we could probably come up with a little $ for the GUI
17:19 keltim joined #salt
17:19 iggy for the amount they wanted for support to get the GUI, we could hire a team of 4 to write a GUI just for us
17:20 whytewolf yeah the cost of salt is kind of high. and i havne not seen much in the way of discount for large setups
17:21 iggy that said, the product looks amazing from what I've seen
17:21 Ryan_Lane (per seat licensing is also kind of crappy :) )
17:21 Ryan_Lane per-seat, if you use autoscale groups in aws, isn't really easy to determine
17:21 whytewolf the latest version does. first gui they tried selling with enterprise kind of was meh.
17:22 iggy yeah, I'm talking about the new one with the MoM functionality kind of baked in
17:22 edrocks joined #salt
17:22 Trauma joined #salt
17:23 whytewolf yeah that one is pretty sweet. would love to get my cluster on that
17:26 mikecmpbll joined #salt
17:28 stomith joined #salt
17:28 mt5431 joined #salt
17:28 colegatron joined #salt
17:28 edrocks whytewolf: do you know why pillarenv behaves differently when calling state.sls/show_sls then it does when using `pillar.items`?
17:28 edrocks I have a top file for each env and I trying to have beta inherit from prod
17:28 whytewolf i do not
17:29 edrocks darn. I'm so close to getting this working
17:29 whytewolf i avoid enviroments like the plague
17:29 edrocks my pillar.items works perfect with appropriate pillarenv but state.sls seems to use prod instead of beta even with `pillarenv=beta`
17:30 lordcirth_work What's the correct stable branch to base bugfixes on? 2016.3?
17:31 iggy lordcirth_work: I usually go as far back as it cleanly applies
17:31 iggy they forward merge stuff fairly regularly
17:32 lordcirth_work Oh, I have a comment on one of my past PR's saying to use 2016.11 https://github.com/saltstack/salt/pull/41254
17:32 lordcirth_work 2016.3 not accepting non-CVE patches
17:33 iggy huh, they must have changed their policy
17:33 iggy that seems a little heavy handed... only supporting 1 version
17:34 whytewolf that would be new. policy used to be earliset supported version with issue
17:34 whytewolf unless it is because nitrogen is around hte corner and they are just heading it off at the pass
17:35 iggy nitrogen has been "just around the corner" for a bit
17:35 whytewolf it wil be released soon
17:35 whytewolf [blizzard levels of soon, but soon]
17:36 rihannon joined #salt
17:36 iggy I've learned to be patient about Salt releases ;)
17:37 whytewolf me too. just fun to poke them now and then about it
17:37 iggy ^
17:39 POJO joined #salt
17:50 g3cko joined #salt
17:54 edrocks whytewolf: these environments really are a plague https://github.com/saltstack/salt/issues/41673#issuecomment-307455554
17:55 nickabbey joined #salt
17:58 GMAzrael_ joined #salt
18:00 nafg joined #salt
18:03 iggy nobody ever believes us
18:03 afics joined #salt
18:06 mt5225 joined #salt
18:06 sarcasticadmin joined #salt
18:08 afics joined #salt
18:15 POJO_ joined #salt
18:16 POJO joined #salt
18:24 edrocks are there any docs on the difference between using `{{ pillar.get() }}` and `{{ salt['pillar.get']() }}` in an sls state file?
18:25 edrocks the `salt['pillar.get']` seems to respect your pillarenv passed into state.sls
18:26 lordcirth_work The worse part of developing salt is all the silly string-mangling needed to handle config files https://github.com/saltstack/salt/blob/develop/salt/states/pkgrepo.py#L388
18:28 edrocks wow the above is really bad. `pillar.get()` is a python builtin which is why it completely ignores your pillarenv or work like the real pillar.get which has a delimiter. `pillar` is the entire pillar dictionary https://docs.saltstack.com/en/latest/ref/states/vars.html#pillar
18:38 POJO joined #salt
18:41 XenophonF edrocks: it is known
18:41 edrocks XenophonF: o I know it now
18:41 XenophonF the pillar global is a regular ol' python dictionary
18:41 edrocks I will forever remember that one
18:41 druonysus joined #salt
18:42 edrocks I just made a couple tools in python so not a wiz with it. I'm sure it would have been obvious for someone doing more python in their day2day
18:42 edrocks it makes complete sense now that I realized it though
18:43 edrocks hopefully it's the last piece to the multi environment puzzle. I figured out all of my other issues so far
18:45 edrocks XenophonF: am I correct in saying that `{{ salt['pillar.get']() }} is the same as `{{ salt.pillar.get() }}`?
18:53 DammitJim joined #salt
18:56 XenophonF yes
18:58 lordcirth_work But isn't salt.pillar.get the overridden .get that supports x:y:z notation?
18:58 XenophonF yes
18:58 lordcirth_work oh, I misread the first one, it is too
18:58 XenophonF same as the function returned by salt['pillar.get']
19:04 KennethWilke joined #salt
19:05 fracklen joined #salt
19:08 GMAzrael_ joined #salt
19:09 GMAzrael joined #salt
19:22 rem5 joined #salt
19:27 om2 joined #salt
19:28 justanotheruser joined #salt
19:33 winsalt joined #salt
19:33 winsalt hey, would it make sense to use a jinja macro instead of file.blockreplace?
19:34 whytewolf might be easier to manage. cause then you only have to worry about a file.managed instead of more then one file.*
19:36 lordcirth_work winsalt, I do that whenever possible.
19:38 winsalt ok thanks!  does the macro file have to be in the same directory as the managed file, or does it use salt dir or something?
19:39 whytewolf winsalt: it can be in the same file if you want
19:40 drawsmcgraw joined #salt
19:41 winsalt im trying to have one file with the macro in it, and import it in dozens of other config files
19:42 whytewolf then yes.
19:43 druonysus joined #salt
19:43 sarcasticadmin joined #salt
19:43 winsalt yes: the macro file has to be in the same dir as the config file?
19:44 whytewolf if you just {% include 'blah.macro' %} then yes
19:44 om2 joined #salt
19:46 druonysus left #salt
19:46 druonysus joined #salt
19:48 sarcasticadmin joined #salt
19:48 winsalt it would be great if you could use salt:// paths for that
19:54 saltyguy joined #salt
19:57 iggy did you try an absolute path like {% include '/foo/macro.sls' %} ?
19:57 iggy logically I'd think that would be anchored at the top of the salt tree
19:57 iggy so it is effectively using salt:// paths
19:59 fracklen joined #salt
20:03 winsalt i havnt tried doing that yet but i will, I was thinking i would have to do a file.managed for it anyway
20:03 sarcasticadmin joined #salt
20:04 cyteen joined #salt
20:07 justanotheruser joined #salt
20:08 XenophonF winsalt: I almost always recommend managing config files via file.managed for file.recurse rather than mutating an existing file via file.blockreplace, file.replace, or augeas
20:11 winsalt the issue is im converting this from chef to salt, and chef has <%= render "Partial.erb"%>, with partial.erb living in chef
20:12 XenophonF .erb? LOL I wonder whether chef takes cooking jokes as far as salt does, er, salt jokes
20:13 XenophonF i use includes and stuff all the time, too
20:13 XenophonF hang on let me find you an easy-to-read example
20:14 whytewolf XenophonF: i think they take the chef = cooking thing father then salt goes
20:14 XenophonF winsalt: https://github.com/irtnog/salt-states/tree/development/aws
20:14 XenophonF so in that example, i have a lib.jinja that includes a Jinja macro function
20:15 XenophonF and it gets imported from e.g., iam.sls, where it helps render states
20:16 XenophonF then there's the usual defaults.yaml/map.jinja/*.sls pattern lots of formula writers follow
20:16 XenophonF e.g., https://github.com/irtnog/openssh-formula
20:16 nixjdm joined #salt
20:16 winsalt absolute path works !
20:17 winsalt so i can just access the macro file from the salt dir and this should work great, thanks guys
20:25 mpanetta joined #salt
20:25 sp0097 joined #salt
20:52 aldevar joined #salt
20:54 absolutejam joined #salt
21:00 dendazen joined #salt
21:09 CrummyGummy joined #salt
21:10 onlyanegg joined #salt
21:13 druonysus joined #salt
21:29 johnkeates joined #salt
21:30 nixjdm joined #salt
21:48 aphor joined #salt
21:54 lugo_ joined #salt
22:07 MeltedLux joined #salt
22:14 btorch left #salt
22:17 Aleks3Y joined #salt
22:31 nixjdm joined #salt
22:34 Rubin joined #salt
22:49 _KaszpiR_ joined #salt
22:53 nafg joined #salt
22:57 sarcasticadmin joined #salt
23:01 major soo .. to what degree does salt handle retransmitting messages to minions/syndics after recovery of a network outage?
23:03 whytewolf it doesn't at all. if a minion is not live when a task is sent. the task for the minion does not happen.
23:03 major hmm
23:06 whytewolf now, that being said. minions run independent of the master as much as they can. if you have a scheduled job in a minion it will still run at the time even if it isn't connected to the master.
23:06 major what about when a masters root updates, does the master notify the minion or wait for the minion to checkin, or .. which?
23:07 major I think it concerns me more in the event of a syndic failing to be notified...
23:07 whytewolf minions pull data from the master always.
23:07 whytewolf as for syndic I am not sure
23:07 whytewolf pretty sure they do the same thing of pulling data
23:08 whytewolf if a minion can't reach the master is uses it's local cache
23:08 whytewolf until it can pull from the master again
23:09 whytewolf in thoery anyway
23:09 major ...
23:09 major heh
23:09 whytewolf never tested it myself
23:10 justanotheruser joined #salt
23:13 major about to have a bunch of syndics :)
23:15 dlam joined #salt
23:23 dlam hey my salt verion is 2015.8.5  ...can i update it to the latest without much worry?  i just use salt states and stuff
23:24 whytewolf dlam: test your states before updateing. a lot of little changes have happened to different states between 2015.8 and 2016.11
23:24 whytewolf you might be fine, you might not be
23:25 dlam oh "test your states" as in, like run it in a VM, with the most recent salt, see if it works etc.
23:25 frew joined #salt
23:25 whytewolf yes
23:25 whytewolf make sure nothing bites you
23:29 brent_ joined #salt
23:33 jeffspeff joined #salt
23:37 cyborg-one joined #salt
23:37 alias__ joined #salt
23:41 Edur joined #salt
23:41 lstor joined #salt
23:42 rofl____ joined #salt
23:51 onlyanegg is there a list of options that you can use in the Saltfile somewhere? There's not much info here: https://docs.saltstack.com/en/develop/topics/ssh/index.html#define-cli-options-with-saltfile

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