Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-03-20

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

All times shown according to UTC.

Time Nick Message
00:01 mrueg joined #salt
00:03 dps joined #salt
00:04 dps is it possible to target 'local' for salt-call in top.sls?
00:05 dps (for pillars, for example)?
00:05 dps instead of using *
00:07 bytebeas1 joined #salt
00:18 hemebond Target local
00:18 hemebond ?
00:18 hemebond Wait, top.sls for salt-call?
00:19 mrueg joined #salt
00:26 eprice joined #salt
00:27 hernan joined #salt
00:30 hernan left #salt
00:35 mrueg joined #salt
00:50 leonkatz joined #salt
00:51 oaken_chris joined #salt
00:57 onlyanegg joined #salt
01:02 zwoboter joined #salt
01:11 johnkeates joined #salt
01:18 fracklen joined #salt
01:21 nikdatrix joined #salt
01:31 nikdatrix joined #salt
01:34 edrocks joined #salt
01:43 onlyanegg joined #salt
01:49 MTecknology it seems as if loop.index is *always* 1 inside of this for, but there is no nesting with this loop.
01:51 MTecknology may as well toss {{ loop.depth }} in there so I can make sure nothing screwing is going on.
01:52 onlyanegg joined #salt
02:07 DEger joined #salt
02:12 gnomethrower joined #salt
02:19 MTecknology It seems like everything is what I'd expect except for loop.first
02:28 MTecknology loop.last is fine, but something isn't working with loop.first... Weird, but I fixed it by using {% if loop.index == 1 %} instead of {% if loop.first %}
02:33 dps joined #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.5, 2016.11.3 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
02:49 cmarzullo odd indeed.
02:50 jdipierro joined #salt
02:54 dps hemebond: top.sls for pillars (for salt call)
02:54 dps targeting the 'local'
03:04 onlyanegg joined #salt
03:10 DEger_ joined #salt
03:17 gladiatr joined #salt
03:24 lionel joined #salt
03:33 nikdatrix joined #salt
03:46 onlyanegg joined #salt
03:47 JPT joined #salt
03:48 cowyn_ joined #salt
04:01 Klaus_Dieter joined #salt
04:05 bytebeas1 joined #salt
04:24 DEger joined #salt
04:24 Klaus_D1eter_ joined #salt
04:29 sadasd joined #salt
04:41 ahrs joined #salt
04:45 sp0097 joined #salt
04:49 bfoxwell joined #salt
05:03 rdas joined #salt
05:04 cryptolukas joined #salt
05:09 citaret how to set hostname for centos7 using salt state? system.network seems not work.
05:10 DEger joined #salt
05:15 catpig joined #salt
05:25 nikdatrix joined #salt
05:34 Praematura joined #salt
05:35 nikdatrix joined #salt
05:39 MTecknology citaret: where did you find documentation for system.network?
05:42 DEger joined #salt
05:42 djgerm joined #salt
05:48 preludedrew joined #salt
05:52 citaret MTecknology: my mistake, it's network.system, https://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html
05:55 citaret it works on centos6, but not on centos7, i use 'hostnamectl set-hostname' for now, but it is not a state.
06:12 MTecknology citaret: best guess.. it's a bug
06:14 MTecknology mostly because the network module is not exactly the bestest of quality
06:16 MTecknology citaret: you haven't said what "not work" means. Does it update expected files but after restarting the bash promt shows the wrong name? or..
06:52 justan0theruser joined #salt
06:52 jdipierro joined #salt
06:57 onlyanegg joined #salt
07:04 juntalis joined #salt
07:04 rem5_ joined #salt
07:15 citaret MTecknology: salt state execution returns False with the message here https://paste.pound-python.org/show/LgIxRYBMOGckmw4b1cQL/ .
07:17 citaret and the state file is here. https://paste.pound-python.org/show/6DCJpur1FT3RoOI6rzps/
07:27 fracklen joined #salt
07:33 Ricardo1000 joined #salt
07:37 nikdatrix joined #salt
07:39 fracklen joined #salt
07:39 fracklen joined #salt
07:48 JohnnyRun joined #salt
07:48 fracklen joined #salt
07:51 netcho joined #salt
07:52 teclator joined #salt
07:57 mike25de joined #salt
07:57 * mike25de hi all from Germany
08:03 aldevar joined #salt
08:06 fracklen joined #salt
08:06 fracklen joined #salt
08:14 ravenx joined #salt
08:15 o1e9 joined #salt
08:22 darioleidi joined #salt
08:23 candyman88 joined #salt
08:27 PhilA joined #salt
08:28 ronnix joined #salt
08:29 PhilA_ joined #salt
08:32 silver joined #salt
08:32 Guest8360 hello, is it possible to import a yaml file as a dictionary using jinja?
08:33 ArunThekkiniyath joined #salt
08:37 nikdatrix joined #salt
08:39 eseyman joined #salt
08:40 eseyman_ joined #salt
08:41 candyman89 joined #salt
08:43 darioleidi joined #salt
08:46 hemebond 7 minutes.
08:56 teclator joined #salt
08:57 Rumbles joined #salt
08:58 onlyanegg joined #salt
09:01 aca__ joined #salt
09:10 bdrung_work joined #salt
09:21 candyman88 joined #salt
09:41 s_kunk joined #salt
09:44 DEger joined #salt
09:48 Ricardo1000 joined #salt
09:53 k_sze[work] joined #salt
09:53 candyman88 joined #salt
09:59 onlyanegg joined #salt
10:00 hoonetorg how can tmpfs mount for /tmp be achieved with 2016.11
10:01 hoonetorg lsblk: tmpfs: not a block device
10:01 hoonetorg zsh:1: command not found: mkfs.tmpfs
10:03 Assaf joined #salt
10:05 Assaf hello, if I want to write a new cloud dirver, where should I put the python file?
10:13 Neighbour The current cloud drivers can be found in /usr/lib/python2.7/site-packages/salt/cloud/clouds/ so I suppose there is also where you would want to put new ones
10:13 Neighbour (on a linux system, with python 2.7)
10:14 Assaf no need to configure somthing in salt for it to identify the new file?
10:14 mike25de hi guys - did anyone here run powershell commands from salt?
10:15 Assaf mike25de - yes I do it sometimes
10:21 Assaf Neighbour - thanks, it works
10:23 k_sze[work] joined #salt
10:26 mike25de Assaf: are there any examples - more than on the main doc? maybe you have some tips and tricks? :)
10:26 mike25de Assaf: i am running now salt-minion on a win 2012R2 server for the first time :) and there are some automation needed to be pushed with powershell.
10:31 Assaf we try not run too much powershell directly. we write custom modules or exteand existing ones
10:31 Assaf this is for daily tasks
10:32 mike25de Assaf: ok, thank you for your input man.
10:32 Assaf for ad-hoc sometimes we run powershell directly. but not very complecated scripts. cause it's diffivult to interact with the dalt framworks like reactors and such
10:32 mike25de ah ok - got it.
10:33 mike25de i need to do some... licence management - like register windows vm etc.
10:33 mike25de so i was thinking about pushing that via a powershell script
10:34 Assaf if it's something that your going to do allot and need some pwoerfull salt staff, I would have invest the time and writting a module (which is python wrapper for powershell)
10:35 Assaf if it's just a simple taks, you can run the script directly
10:36 Assaf another usfeull trick is to write the script as a template (so you can use pillar/grains data) copy it to the minion and than run the customize version
10:36 Assaf hope that helps a bit
10:38 mike25de Assaf: thanks a lot. yes template is something i already use and that's how i want to push the script to the minion. Have a great day!?
10:38 mike25de Assaf: thanks for your input
10:43 dendazen joined #salt
10:44 Hybrid joined #salt
10:53 jdipierro joined #salt
11:08 huddy joined #salt
11:34 dps joined #salt
11:38 impi joined #salt
11:48 netcho_ joined #salt
12:10 dps joined #salt
12:13 candyman89 joined #salt
12:19 numkem joined #salt
12:21 q1x hi all! Is there a way to have the minion log a notify during a state.apply run? can't seem to find anything suitable on https://docs.saltstack.com/en/latest/ref/states/all/
12:22 q1x I'd like to use some jinja to find out if prerequisite pillar data has been set and issue a notify if it hasn't.
12:25 _Cyclone_ joined #salt
12:26 manji q1x, a reactor could be one way (I suspect)
12:26 manji and have your saltmaster do something when receiving a message
12:27 q1x manji: I need something simpler, just a custom log message in the job outpu
12:27 manji I am not sure this is possible
12:27 q1x if needed, I could use a reactor on this
12:28 q1x basically the Saltstack equivalent of https://docs.puppet.com/puppet/latest/types/notify.html
12:29 manji hmm, I am sorry, I am not sure how to help you with this
12:30 DarkKnightCZ joined #salt
12:32 q1x manji: I think I might have found something: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html#salt.states.test.show_notification
12:32 DarkKnightCZ Hi, out of curiosity, is it possible to trigger specific module on master from minion? the usecase is to create account on minion (on demand) and store the details in service accessible only from master (without targeting master itself in first place)
12:33 swills joined #salt
12:33 manji DarkKnightCZ, checkout peer communication
12:33 manji highly unsafe of course
12:34 manji q1x, let us know how it went mate
12:34 DarkKnightCZ manji: aaah, that's it, thanks
12:39 snowtree joined #salt
12:43 calvinh joined #salt
12:45 q1x manji: works, unfortunately I can't have it 'fail' as it registers as a succes.
12:46 q1x manji: but, that is ok for now. this will help me debug at least :)
12:46 manji lol
12:46 manji q1x, do you have a snippet to show us?
12:46 manji for reference I mean
12:46 evle1 joined #salt
12:47 q1x manji: oh wait, I could use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html#salt.states.test.fail_without_changes :)
12:50 Reverend hey chaps. Splitting text in jinja on like, a hyphen or something... how do?
12:50 Reverend python is ` repodata['repositoryName'].split('-',1)[1]`
12:51 Reverend not sure on the jinja equivalent :(
12:53 q1x manji: that works a lot better :)
12:54 PhilA_ joined #salt
12:55 manji q1x, :) show us your snippet
12:55 manji I am interested
12:55 q1x manji: https://gist.github.com/q1x/2d713f277caa030238827a8d15f38bf8
12:56 manji interesting, thanks :)
12:58 q1x manji: included a comment with the error shown
12:59 manji :D
12:59 tongpu joined #salt
13:05 haam3r Reverend: You mean something like: {% set hostname = minion.split('.')[0] %}
13:06 Reverend oh
13:06 Reverend so it's pretty much just pythoin xD
13:06 haam3r pretty much yeah. another example on grains I found: {% set ip = salt['grains.get']('ipv4')[0].split('.')[3] %}
13:07 haam3r and there's rsplit as well: {% set subdomain = salt['grains.get']('domain').rsplit('.', 2)[0] %}
13:12 haam3r q1x: by the way instead of the false default value in the jinja you can also use "is defined"
13:19 q1x haam3r: thanks mate!
13:20 q1x haam3r: would there be an advantage? (speed/memory?)
13:20 racooper joined #salt
13:21 babilen {% set ip = salt['grains.get']('ipv4')[0].split('.')[3] %} is something I really wouldn't do (even though it exemplifies the point you are trying to make)
13:25 haam3r q1x: probably not. I would say it's mostly a readability thing. The is defined also means that the if statement would work if the pillar key has an empty value
13:27 haam3r babilen: Seems it was only a test thing that I wrote, so I'm not actually using it. But would you mind explaining why not?
13:27 PatrolDoom joined #salt
13:32 babilen haam3r: salt['grains.get']('ipv4')[0] is not a stable or reliable identifier of the IP address you are after at all. I'd use salt['network.ip_addrs'] with suitable arguments (cidr, type, ..). One might also consider performing the address parsing with libraries such as netaddr in lieu of simply splitting on dots.
13:32 nikdatrix joined #salt
13:33 haam3r babilen: Okey, that's what I thought. Thanks
13:33 brousch__ joined #salt
13:34 babilen It's also tricky to address typicaly exceptions that might arise if something goes wrong (IndexError, ...) in jinja as compared to doing this in a "proper" execution module
13:34 babilen *typical
13:35 ssplatt joined #salt
13:37 rdas joined #salt
13:38 haam3r yep, I've encountered that as well :D
13:41 jhauser joined #salt
13:45 Miouge joined #salt
13:45 eprice joined #salt
13:51 nikdatrix l
13:52 Tanta joined #salt
13:58 bytebeas1 joined #salt
14:01 mpanetta joined #salt
14:02 netcho_ joined #salt
14:04 jdipierro joined #salt
14:04 LondonAppDev joined #salt
14:09 rem5 joined #salt
14:10 impi joined #salt
14:13 kedare joined #salt
14:13 kedare Hi all :)
14:13 kedare I have a small question, I'm trying to use svn.latest and I'm getting this error : "State 'svn.latest' was not found in SLS"
14:13 kedare Any idea of what can be the cause ?
14:14 kedare The reason that appears is : Reason: 'svn' __virtual__ returned False
14:15 babilen I haven't looked at the source, but I would expect that SVN was/is not installed (when the minion last updated its modules)
14:16 kedare On the minion ?
14:16 kedare The thing is that the documentation doesn't say anything about any module to install
14:16 babilen Yes
14:16 kedare The SVN client itself is installed on the minions, but I didn't install any Salt module
14:17 kedare The documentation just say : Note that subversion must be installed for these states to be available, so svn states should include a requisite to a pkg.installed state for the package which provides subversion (subversion in most cases).
14:17 babilen https://github.com/saltstack/salt/blob/develop/salt/modules/svn.py#L21 -- That's exactly what I expected
14:17 kedare Or maybe it just doesn't work on Windows ?
14:18 kedare Oh ok, so the svn python module ?
14:18 babilen So, whatever utils.which('svn') is doing on Windows doesn't work
14:18 babilen No, this is about the command line "svn" executable
14:18 kedare Oh ok
14:18 kedare Hmm maybe it's just not in the path, let me check
14:18 babilen It's typically found in your PATH, but I believe that things are still weird on Windows
14:19 kedare The thing is that the agent installed SVN and didn't restart after, so I suppose it didn't get the updated path
14:19 kedare As usually on Windows it's only read at statup time
14:19 babilen Are you installing SVN via salt?
14:20 jhauser_ joined #salt
14:20 kedare Yes that was the issue
14:20 kedare Yes
14:20 kedare Not I have another error but it's something else :)
14:20 kedare Weird that the error was not very explicit
14:20 babilen Are you setting "reload_modules: True" in the state that installs SVN?
14:21 kedare No
14:21 babilen Just rememberg: if a module/state is not available: Take a look at the __virtual__ function in the execution module. It's typically either a missing Python module or executable
14:21 DarkKnightCZ joined #salt
14:21 babilen You might want to set reload_modules: True then :)
14:21 kedare What would be the way to install a Python module on a minion ?
14:22 babilen I would typically use the packages prepared by my distribution
14:22 babilen That way I can be sure that they are well integrated into the system
14:23 kedare In my case it's on Windows, so no package management :)
14:23 kedare Just PIP
14:23 kedare I just use PIP as usual so ?
14:23 babilen You can use pip.installed as an alternative, but then you have to be aware of the Python environment you install packages to (its not necessarily a good idea to install them over the system's Python)
14:23 kedare Salt has it's own Python setup in my case (Well in the default minion installer)
14:23 babilen Microsoft really should get their shit together ..
14:24 cyborg-one joined #salt
14:24 babilen I'm really not the best person to ask about this as I have been in the fortunate position that I haven't had to touch Windows systems in 16 years, but salt is normally not "strange" in that you'd do things differently.
14:25 babilen Normally there is a way that you'd like to automate and you'd do it, more or less identical, with salt
14:25 babilen So if you normally use pip on Windows, you'd do the same with salt
14:26 kedare I wish I didn't had to touch Windows System too haha xD
14:26 kedare But well, .NET stuff
14:27 cryptolukas joined #salt
14:27 kedare I plan to use Salt as part of the CI system (And for all the config management and stuff), I started before with Ansible but the Ansible performances are quite bad on Windows (And I found Salt more flexible)
14:28 babilen Salt is definitely more flexible (which, OTOH, is also its main problem)
14:29 kedare Why is this a problem ?
14:29 kedare The targets system is really really nice (Especially when dealing with AutoScaling as we will do) :)
14:29 babilen As it makes Salt harder to understand for newcomers and there are, often, different ways to solve a problem
14:29 kedare It's a price to pay I suppose
14:33 Brew joined #salt
14:38 nikdatrix babilen: the more i read the more questions i have :(, you know what's the best practice when defining the pillars/states folder structure? i imagine it changes with every project, but i'm having a hard time finding a long-term solution for mine
14:38 Reverend IMHO I'd stick to the definted structure in salt. i.e. /srv/salt /srv/pillar etc
14:38 Reverend that way you've got consistency between all your masters
14:39 Rumbles joined #salt
14:39 nikdatrix i have an around 5 apps that is built in linux (ubuntu/centos) macosx and windows and i'm having a hard time to figure it out a nice structure
14:39 nikdatrix ok. i was ising /srv/salt for the pillars also
14:39 nikdatrix that are *
14:41 jhauser joined #salt
14:41 nikdatrix i was planning to use 1 master tho.... i only have 15 minions, so no need to have more.... i think....
14:45 bytebeas1 joined #salt
14:47 _JZ_ joined #salt
14:47 dyasny joined #salt
14:48 raspado joined #salt
14:48 englishm_llnw joined #salt
14:50 skeezix-hf joined #salt
14:50 LondonAppDev joined #salt
14:50 onlyanegg joined #salt
14:50 Snow24 joined #salt
14:52 jab416171 if a VM comes up with an existing minion_id, does salt "reject" that key?
14:52 jab416171 I've noticed we have some "rejected" keys and I'm wondering if that's why.
14:53 Snow24 Hello, I can't use the Windows Repository .. Do you have some tutorial to use it except the SaltStack's tutorial... TY
14:54 jhauser joined #salt
14:55 sarcasticadmin joined #salt
14:55 babilen nikdatrix: Much like "good library design" the SLS organisation and pillar-state interplay is hard to define and depends on various factors.
14:55 babilen I try to keep states rather generic and (try) to leave most specific configuration in pillars (i.e. "the formula approach")
14:56 gmoro joined #salt
14:59 nikdatrix babilen: thanks
15:18 jauz Whoo hoo! Received my Saltstack stickers. :)
15:22 cscf joined #salt
15:23 bytebeas1 joined #salt
15:24 LondonAppDev joined #salt
15:25 dyasny joined #salt
15:29 wendall911 joined #salt
15:32 bytebeast joined #salt
15:35 LondonAppDev joined #salt
15:36 Inveracity joined #salt
15:37 tiwula joined #salt
15:37 schemanic_ joined #salt
15:41 arount joined #salt
15:41 arount Hi, i'm trying to PR repo, so i would like to test my dev before, I followed what described in https://docs.saltstack.com/en/latest/topics/development/hacking.html#running-a-self-contained-development-version but still can't see my minion when doing salt-key -L
15:42 arount i am missing something ?
15:42 leonkatz joined #salt
15:43 djgerm joined #salt
15:44 scoates joined #salt
15:45 jrgochan joined #salt
15:48 mpanetta joined #salt
15:49 catpig joined #salt
15:55 Ricardo1000 joined #salt
15:56 fooker_ joined #salt
15:58 cachedout joined #salt
15:59 pipps joined #salt
16:00 pipps joined #salt
16:00 leonkatz joined #salt
16:01 netcho_ joined #salt
16:03 scsinutz joined #salt
16:05 Reverend hey boys and girls... how would one create a list in jinja? I've got to iterate over 217 things and need to make a list of 2 things, instead of 217 :D
16:06 Elsmorian joined #salt
16:06 Reverend starts with, say "example-" and "test-", but they're sporadically spread through "example-1" "test-thing" "example-derp"... etc. I've got the first word split from the rest of the string, and using that already, but I just don't want to make 217 file.directories
16:06 Reverend so want to build ANOTEHR seperate list of unique ones. so then I end up with ['example'
16:06 Reverend , 'test] etc
16:07 Reverend thoughts?
16:07 aldevar left #salt
16:09 Antiarc joined #salt
16:10 jan joined #salt
16:13 pipps joined #salt
16:14 Guest5830 Quick question: Is salt stack intended to be used as a configuration management system, where the desired configuration state is kept in version control (such as git), and changes are applied either automatically when git changes are triggered via some web ui (saltpad or molton maybe)?
16:14 babilen Guest5830: You can use it like that
16:18 raspado joined #salt
16:19 Guest5830 That's great. Is there a public example or demo somewhere? Should I just install salt + netapi + sqlpad on a playground server or is there a better starting point?
16:20 babilen Public example of what exactly?
16:22 onlyanegg joined #salt
16:25 Guest5830 Integration of slat + git + web ui would be best. (What confuses me about the salt document is that it always suggests to run a salt command from the cli. I'm not sure how this would work with a team of devops people. I'd like to have a github like workflow with pull request + review + apply if this is possible)
16:28 babilen You typically wouldn't use a salt specific UI for managing your pull requests, but use something like Gitlab/Github/... to do that
16:28 babilen Salt can be configured to use git repositories as data source with GitFS: https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
16:28 impi joined #salt
16:30 babilen Once you have that in place you are at the point of "And how do I trigger that?" to which there are multiple answers. The easiest would be "manually" by calling "salt 'foo' state.apply", while the "laziest" would be to run the salt highstate on a schedule (say every 30 minutes) -- https://docs.saltstack.com/en/latest/ref/states/all/salt.states.schedule.html
16:30 babilen You can, obviously, trigger actions via salt-api or by sending messages from a minion via the salt message bus and reacting to them with a reactor
16:31 babilen It sounds as if you'd like to have a CI infrastructure in place that, maybe (???), triggers highstate runs if certain tests pass?
16:32 babilen Then there are various web interfaces .. Salt Enterprise if probably the most comprehensive, but it isn't exactly cheap
16:35 fracklen joined #salt
16:36 candyman88 joined #salt
16:36 Reverend babilen: you're a genius... you might know...
16:36 Reverend can you make a list in jinja from scratch. i.e. formulate your own :D
16:37 MTecknology citaret: -l debug
16:38 babilen Reverend: {% set foo = [1, 2, 3, ...] %} would be a simple example
16:38 pipps joined #salt
16:39 Reverend can you then append to that list babilen ?
16:39 babilen You can, yes
16:40 DEger joined #salt
16:40 babilen {% do foo.append(4) %} exemplifies that
16:40 babilen http://jinja.pocoo.org/docs/dev/templates/ is recommended bed time reading ;)
16:40 woodtablet joined #salt
16:41 q1x is there  buildin state module that will manage the minion config file or do I need to resort to the file state?
16:41 Guest5830 Thanks, babilen. That sounds brilliant. I'll look into the gitfs tutorial.
16:42 babilen q1x: I'd recommend to use https://github.com/saltstack-formulas/salt-formula/
16:42 MTecknology Guest5830: I have thing set up so that when I do a push to the salt git repos, a global highstate reactor gets scheduled and eventually the scheduler kicks off the reactor and reports back failures. Eventually, I want to make it so peer review and auto-build tests (deploy a few VM's w/ the states and make sure they apply cleanly and services come up) before anything can be merged into the Production bran
16:42 MTecknology ch... but it's a home env so I'm no there yet.
16:42 MTecknology not*
16:42 Guest5830 I'm fine with trigger salt via jenkins or some git hook I'll write myself.
16:42 DEger joined #salt
16:43 q1x thanks babilen, do you know if it will be possible to manage a minions mysql module parameters from that formula?
16:43 Guest5830 Good to know others in the community have similar goals. Thans, babilen
16:43 jhauser joined #salt
16:44 keldwud joined #salt
16:44 babilen q1x: I'd provide those in pillar
16:44 keldwud joined #salt
16:44 Reverend babilen: as usual, you da real MVP.
16:46 teclator joined #salt
16:46 q1x babilen: I'm running into the problem that https://github.com/saltstack-formulas/zabbix-formula/blob/master/zabbix/mysql/conf.sls seems to operate under the notion that root is passwordless, but my mysql-formula has already set the root password.
16:46 esc\ left #salt
16:46 babilen q1x: https://github.com/saltstack-formulas/mysql-formula/blob/master/pillar.example#L16 for example
16:47 q1x root password is in pillar, but under mysql:server:root_password. I have no clue how to get that Zabbix formula to use the root password credentials
16:47 q1x to create the dateabase and zabbix db user
16:48 babilen I'd personally prefer it if the zabbix formula would just use the mysql-formula for that
16:48 q1x babilen, me too, but it seems not to be the case
16:48 dankrs joined #salt
16:49 babilen Yeah, some people strongly dislike defining inter-formula dependencies which is why it's not being done
16:49 pipps joined #salt
16:49 q1x babilen: I'm not yet experienced enough to rewrite that formula :)
16:51 q1x babilen: however, I saw here https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mysql.html#module-salt.modules.mysql that the minion will honor the credentials that you set in the minion config (it seems to ignore ~/my.cnf by default).
16:51 q1x babilen: that is why I thought to alter the minion config to tie everything together
16:52 babilen Sure
16:52 q1x babilen: that would be the easiest solution, no?
16:52 babilen I haven't checked, but it might be that the execution module is using config.get, which would allow you to define the options in https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mysql.html#module-salt.modules.mysql in the pillar also
16:53 babilen The "tricky* bit is that you want the key to be "mysql.host" (i.e. {'mysql.host': ...} and *NOT* {'mysql': {'host': ...}})
16:53 babilen That mysql.default_file: '/etc/mysql/debian.cnf'
16:54 babilen Looks interesting
16:54 babilen I'll be afk for a while
16:54 q1x babilen: but can I define the value of 1 pillar variable with the value of another? basically, `mypass: {{ salt['pillar.get']('mysql:server:root_password') }}` ?
16:55 q1x < babilen> That mysql.default_file: '/etc/mysql/debian.cnf' <- that is what I was looking at as well
16:55 dankolbrs joined #salt
16:57 babilen You could do that with pillarstack (the define one pillar with another), but not with "normal" pillars as they are not recursively evaluated
16:58 Trauma joined #salt
17:00 cryptolukas joined #salt
17:21 cryptolukas joined #salt
17:22 impi joined #salt
17:28 pipps joined #salt
17:36 wnkz joined #salt
17:36 Edgan joined #salt
17:38 dyasny joined #salt
17:41 pcn joined #salt
17:42 DarkKnightCZ joined #salt
17:46 masber joined #salt
17:52 meca Hi, I added a private repo on gitfs and when I run 'sudo salt 'machine' state.apply backend=git saltenv=master' I get a 'No Top file or external nodes data matches found.'
17:53 meca Here's my master conf: http://pastebin.com/UCh5mfms
17:53 meca I have a top.sls at the root of the repo
17:53 cryptolukas joined #salt
17:54 meca and my pastebin is missing the line with the gitfs_remotes: git@github.com:user/simple-salt.git
17:54 scsinutz joined #salt
17:55 meca Any ideas at what I'm missing ? I had issues at first with the ssh keys but they work now. Ive been running 'sudo salt-run fileserver.update' to check
17:56 whytewolf master = base
17:56 netcho_ joined #salt
17:57 whytewolf unles you set gitfs_base to something else
17:58 meca Yeah I tried that but it gives me 'No matching sls found for 'test.sls' in env 'base'' but the test.sls is at the same level as the top.sls in the repo
17:59 whytewolf that should be - test not - test.sls
17:59 cswang joined #salt
18:00 meca Here's the two files in my repo: http://paste.awesom.eu/tNnv
18:00 joehh joined #salt
18:01 whytewolf yes line 4 in yout top.sls should be - test, not - test.sls
18:01 whytewolf test.sls would be looking for one of these files test/sls.sls or test/sls/init.sls
18:03 meca that was it... facepalm!
18:03 meca thank you very much
18:04 scsinutz1 joined #salt
18:07 scsinutz joined #salt
18:09 scsinutz2 joined #salt
18:10 LondonAppDev joined #salt
18:10 scsinutz3 joined #salt
18:14 scsinutz joined #salt
18:15 ChubYann joined #salt
18:15 scsinutz1 joined #salt
18:17 scsinutz joined #salt
18:17 DarkKnightCZ joined #salt
18:17 scsinutz joined #salt
18:21 ronnix joined #salt
18:22 pmcg joined #salt
18:23 nZac joined #salt
18:24 scsinutz1 joined #salt
18:30 adelcast joined #salt
18:34 sh123124213 joined #salt
18:34 Rumbles joined #salt
18:39 dheepanck joined #salt
18:41 Hipikat joined #salt
18:42 dheepanck hi I want to write a event/reactor to bring up a new ec2 instance(minion), if a a old minion is down (not responding)
18:42 cyborg-one joined #salt
18:44 IdoKaplan joined #salt
18:44 dheepanck should I take a event/reactor approach in saltstack or should I be using something else
18:44 IdoKaplan Hi, I'm using "Windows Software Repository" and since I have upgraded salt minion from "2016.3.4" to "2016.11.3", I cannot use state packages - "Package xxx not found in the repository". Please advise.
18:45 oeuftete Is there a date planned for a 2016.11.4 release?  From looking at previous release frequency, I'd guess soon.
18:45 Tanta joined #salt
18:45 armguy joined #salt
18:46 mavhq joined #salt
18:51 pipps joined #salt
18:55 dRiN joined #salt
18:58 masber joined #salt
19:07 dheepanck joined #salt
19:08 onlyanegg joined #salt
19:09 pipps joined #salt
19:11 s_kunk joined #salt
19:17 dheepanck joined #salt
19:17 dheepanck Hi salt/presence/change event is not getting fired even after a minion is down.
19:18 dheepanck is it a bug or I am not sure if I am doing some thing wrong :(
19:19 dheepanck sudo salt '*' test.ping
19:19 dheepanck minion2:
19:19 dheepanck True
19:19 dheepanck minion1:
19:19 dheepanck Minion did not return. [No response]
19:19 dheepanck I can only see salt/presence/present   {
19:19 dheepanck "_stamp": "2017-03-20T19:16:17.942143",
19:19 dheepanck "present": [
19:19 dheepanck "minion1",
19:19 dheepanck "minion2"
19:19 dheepanck ]
19:19 dheepanck }
19:20 dheepanck can anybody help?
19:20 dheepanck can anybody help me thanks.
19:20 whiteinge we've seen problems on ec2 where if the machine isn't shut down cleanly (i.e., terminated) the TCP connection to the master persists for a long while
19:21 whiteinge presence is a pretty simple system. it just reads tcp connections.
19:21 pipps joined #salt
19:22 dheepanck_ joined #salt
19:22 dheepanck_ thanks whiteinge
19:22 whiteinge i think there was some work done recently to improve that. i'm trying to find the PR...
19:22 bgdnlp joined #salt
19:23 dheepanck_ ok.
19:23 whiteinge https://github.com/saltstack/salt/pull/36126
19:23 saltstackbot [#36126][MERGED] Add keepalives to salt-master created connections for better presence | This PR is being submitted following a discussion with @thatch45 concerning failures with Ubu/Raas presence reporting......
19:23 whiteinge that went into develop. so i don't think it's in a release yet
19:27 bgdnlp hi. question. what happens if I define the same key in two different pillars that the minion receives? for example, if I have a general web server pillar where I define "apache:vhost", but then I also define "apache:vhost" in a site-specific pillar? will it work? will the one defined later overwrite the first one?
19:32 dps joined #salt
19:34 pipps joined #salt
19:37 Miouge joined #salt
19:38 dheepanck joined #salt
19:39 pipps joined #salt
19:49 dheepanck @whiteinge is there any workaround for that case?
19:49 tapoxi joined #salt
19:50 Neighbour bgdnlp: You can already check out what is going to happen, if you have defined the pillar top-file. Run `salt-run pillar.show_pillar minion=<minion_id>` to see what the minion's pillar will be
19:50 masber joined #salt
19:50 FredFoo joined #salt
19:51 Neighbour You can do this even when the minion doesn't exist yet
19:52 DEger joined #salt
19:53 jrgochan hello. Any idea on how to restart a service through an sls? reload doesn't seem to work unless a file changes and it needs to have a reload option in the init.d
19:53 whiteinge dheepanck: shut the machine down gracefully before terminating the instance if you can.
19:53 MasterNayru joined #salt
19:55 whiteinge jrgochan: use the `module.run` state to call the service execution module: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
19:55 whiteinge syntax is a little fiddly but it's a common use-case.
19:56 dheepanck actually i am wanna do this for a failover case. so abrupt termination due to a hardware failure is a possibility
19:57 dheepanck whiteinge, thank you.
19:57 whytewolf jrgochan: or if a restart [not a reload] is what you want and wnat it to happen everytime. have a service.dead state and a service.running state.
19:57 whytewolf service.running would require the service.dead
19:59 whytewolf i assume you don't want this on a change. [although this seems like something that shouldn't be in a state tree. as just restarting a service most likely shouldn't happen every state run.
19:59 bgdnlp thank you, Neighbour
19:59 jrgochan hrm. then just
19:59 jrgochan require:
20:00 jrgochan sls: service
20:00 whytewolf jrgochan: require: - service: <service.dead state id>
20:01 jrgochan hrm. that just kills it
20:02 jrgochan http://pastebin.com/SJt89NfA
20:02 Will_ joined #salt
20:03 whytewolf hummm. so reload is not a part of the service? you can't service reload nslcd?
20:04 whytewolf and yes it should kill it then start it [which is the difference between a restart and a reload]
20:06 whytewolf can you do a service.reload on the that service using the command line? if so go with whiteinge's idea
20:07 whytewolf the reload option for service.running doesn't belong to service.running. but to mod_watch.
20:07 pipps joined #salt
20:10 DEger joined #salt
20:12 cryptolukas joined #salt
20:14 Inverakitty joined #salt
20:15 nebuchad` joined #salt
20:16 DEger joined #salt
20:16 pezus_ joined #salt
20:16 shallot joined #salt
20:16 skrobul joined #salt
20:16 klippo joined #salt
20:17 wryfi_ joined #salt
20:17 bbradley_ joined #salt
20:17 bantone_ joined #salt
20:17 t00m0 joined #salt
20:17 DEger_ joined #salt
20:17 GnuLxUsr_ joined #salt
20:18 leev_ joined #salt
20:18 _JZ__ joined #salt
20:19 djinni`_ joined #salt
20:19 ksa_ joined #salt
20:19 whiteinge_ joined #salt
20:19 tom][ joined #salt
20:19 sarcasticadmin joined #salt
20:20 NightMonkey_ joined #salt
20:20 feld_ joined #salt
20:20 Ludo- joined #salt
20:20 prions_ joined #salt
20:20 darix- joined #salt
20:21 TomJepp_ joined #salt
20:21 McNinja_ joined #salt
20:21 capn-mor1an joined #salt
20:21 dh__ joined #salt
20:21 SteamWells_ joined #salt
20:21 Vye_ joined #salt
20:22 oeuftete_ joined #salt
20:22 wangofet1 joined #salt
20:22 toabi_ joined #salt
20:23 ahrs_ joined #salt
20:23 dh joined #salt
20:23 lastmikoi_ joined #salt
20:23 lane_ joined #salt
20:24 stooj_ joined #salt
20:24 lunarlamp joined #salt
20:24 viq_ joined #salt
20:24 WildPikachu_ joined #salt
20:24 ajv joined #salt
20:24 rofl_____ joined #salt
20:25 rubenb_ joined #salt
20:26 scarcry_ joined #salt
20:26 LA-Clone joined #salt
20:26 Rubin_ joined #salt
20:26 Dereckso1 joined #salt
20:26 djgerm joined #salt
20:28 lorengordon joined #salt
20:29 fleaz joined #salt
20:29 schinken joined #salt
20:29 ponyofdeath joined #salt
20:29 pipps joined #salt
20:30 peters-tx joined #salt
20:31 whiteinge joined #salt
20:32 Awesomecase joined #salt
20:35 ahrs joined #salt
20:35 tom29739 joined #salt
20:36 max42 joined #salt
20:36 fracklen joined #salt
20:40 chowmein__ joined #salt
20:40 Edur joined #salt
20:42 Zachary_DuBois joined #salt
20:43 nZac left #salt
20:46 schemanic joined #salt
20:49 Zachary_DuBois joined #salt
20:51 dps_ joined #salt
21:02 tom29739 joined #salt
21:04 scoates joined #salt
21:04 smcquay joined #salt
21:07 Praematura joined #salt
21:07 jrgochan whytewolf: this seems to work
21:07 jrgochan http://pastebin.com/LTfj3x5L
21:07 jrgochan Thanks for the idea!
21:07 whytewolf no problem
21:08 whytewolf again, not sure why you want to restart a server every service run instead of going off of changes. but hey it is your enviroment :)
21:08 DammitJim joined #salt
21:09 DarkKnightCZ joined #salt
21:13 Praematura joined #salt
21:23 rawzone^ joined #salt
21:30 fracklen joined #salt
21:31 DarkKnightCZ joined #salt
21:32 nixjdm joined #salt
21:32 scsinutz joined #salt
21:33 PatrolDoom joined #salt
21:34 catpig joined #salt
21:39 netcho_ joined #salt
21:53 pipps joined #salt
21:59 vegasq joined #salt
22:09 amcorreia joined #salt
22:14 sh123124213 joined #salt
22:16 sarcasticadmin joined #salt
22:24 bbradley joined #salt
22:24 dxiri joined #salt
22:25 pipps joined #salt
22:35 nikdatrix joined #salt
22:39 sarlalian joined #salt
22:44 uncool joined #salt
22:44 scsinutz joined #salt
22:45 pipps99 joined #salt
22:45 masber joined #salt
22:53 mikecmpbll joined #salt
22:58 scsinutz joined #salt
22:59 hemebond Anyone know how to play with renderers via a Python console?
23:06 scsinutz joined #salt
23:15 IdoKaplan joined #salt
23:15 IdoKaplan Hi, Can someone please help me with salt.modules.win_task module? pastebin.com/MA7LbKCb
23:18 hemebond IdoKaplan: Checked the minion log?
23:20 IdoKaplan hembond: when I use "-l debug" I see "Failed to modify task: Required element or attribute missing"
23:20 hemebond In the state you don't have the force parameter.
23:20 hemebond Could that be an issue?
23:21 IdoKaplan no.
23:22 IdoKaplan the task is not exists. But I have tried it also and it's not working.
23:23 hemebond Oh.
23:23 hemebond Shouldn't user_name and cmd be passed in via kwargs?
23:24 hemebond Right now you're passing them to module.run
23:24 whytewolf hemebond: **kwargs are any arguments that are passed in
23:24 hemebond But you want to pass kwargs to module.run, and under kwargs put the user_name and cmd parameters.
23:24 whytewolf no
23:24 whytewolf that isn't how kawrgs work
23:25 hemebond No?
23:25 whytewolf kwargs are any arguments that are passed in that are not reconized by the command directly
23:25 IdoKaplan Can you please help me with that and give me an example how this state should be?
23:25 hemebond I thought user_name and cmd were task.create_task parameters.
23:25 whytewolf they are
23:25 hemebond But they don't need to go under kwargs?
23:26 whytewolf the are being passed in to kwargs
23:26 hemebond Not in the link I was given.
23:26 whytewolf think of kwargs as a way of doing argc and argv
23:26 hemebond I know how kwargs work in Python. I'm trying to understand why you don't think it's needed in this state.
23:27 hemebond module.run accepts a kwargs parameter.
23:27 xet7_ joined #salt
23:27 hlub_ joined #salt
23:28 whytewolf you CAN pass kwargs in like that. but it isn't needed
23:28 whytewolf m_name is also passed in through kwarg
23:28 hemebond Oh so any parameter not caught by module.run is still passed through?
23:28 whytewolf the only thing module.run accepts are name and **kwargs
23:29 whytewolf yeah. m_name has a little proccessing but it still comes in through kwargs
23:29 hemebond I see. I've struggled to use module.run like that before so I always use kwargs.
23:30 hemebond Unfortunately I don't have a Windows minion so can't really help further.
23:30 hemebond Or test.
23:30 IdoKaplan SOLVED -     - kwargs:         cmd: exe
23:30 whytewolf i think the confusion comes in that some modules have kwarg [no s and lacking the **]
23:30 hemebond That might be it.
23:30 hemebond ...
23:31 hemebond Looks like maybe there's something funky in module.run that isn't passing all parameters along.
23:31 whytewolf odd. yeah that should have worked either way
23:31 hemebond Thing is, it's never worked without kwargs for me.
23:31 hemebond I think I first fought it when playing with reactors.
23:32 whytewolf it Should. I'm wondering if the extra processing for the m_ variables cause issue
23:32 pipps joined #salt
23:33 IdoKaplan I will try to get your help with another issue please - "Windows Software Repository" stopped working after minion upgrade. I cannot use state packages (only module.run) - "Package xxx not found in the repository".
23:34 whytewolf take a look at salt.wheel that is how kwargs are SUPPOSED to work https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wheel
23:34 whytewolf IdoKaplan: did you try updating the salt repo after the upgrade?
23:35 IdoKaplan whytewolf: yes. minion and master are the same - 2016.11.3
23:35 whytewolf IdoKaplan: not that salt software the actual win_repo
23:36 whytewolf salt-run winrepo.update_git_repos
23:36 whytewolf https://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#configuration
23:36 IdoKaplan whytewolf: I'm using custom apps
23:36 whytewolf ahhh. humm
23:37 IdoKaplan whytewolf: I'm sure that it's stopped working after the upgrage, minion version was "2016.3.4"
23:38 IdoKaplan whytewolf: Because I have 2 minion - one worked (old minion), second didn't work (new version) . when I upgraded the minion that worked before, repo stopped working.
23:38 whytewolf IdoKaplan: okay, did you refresh the db after the update?
23:38 IdoKaplan whytewolf: yes
23:39 whytewolf hmmm
23:39 IdoKaplan whytewolf: and module.run is working.
23:39 whytewolf stranger and stranger
23:39 whytewolf stranger and stranger?
23:39 whytewolf wait so pkg.installed as a state isn't working but pkg.install from module.run is?
23:39 IdoKaplan whytewolf: yes!!!
23:40 will joined #salt
23:40 whytewolf okay. this sounds like a bad update. or a bug.
23:41 IdoKaplan whytewolf: sorry that I'm over dramatic
23:41 bluenemo joined #salt
23:41 whytewolf hey it is alright.
23:41 IdoKaplan whytewolf: What do you think that I can do?
23:42 hemebond You're working with Windows, it's understandable that you'd be very excited when something works ;-)
23:42 whytewolf lol hemebond
23:42 IdoKaplan right....legacy...
23:43 whytewolf IdoKaplan: I'm not seeing anything in the issue database that would sugest this is a known problem.
23:43 whytewolf so i would say uninstall the salt software on the minions. clean it up a bit. then deploy it again as a fresh install. maybe something got crossed in the modules.
23:44 whytewolf you don't happen to have any custom pkg modules do you?
23:44 whytewolf [just a precaution]
23:44 IdoKaplan no...of course not.
23:44 whytewolf you would be shocked how often that answer is yes ...
23:44 IdoKaplan This is the whole idea with salt :)
23:45 * whytewolf shrugs. I write my own custom modules all the time that override some basic features
23:45 IdoKaplan ohh :) in windows all is very complicated.
23:45 whytewolf but i be crazy
23:46 whytewolf also, I'm kind of shooting from the hip as well I don't touch windows for anything except my gaming rig
23:48 IdoKaplan ok, I will try clean install and another server. if it won't work, to open an issue in Github?
23:48 scoates joined #salt
23:48 whytewolf humm, not sure if this is related but this looks like the pkg.install is failing which is the oppisite problem you have https://github.com/saltstack/salt/issues/40112
23:48 saltstackbot [#40112][OPEN] The minion function caused an exception: Traceback (most recent call last):  error: [Errno 10061] Unknown error | I am currently trying to get Saltstack work with windows. I am able to ping my minion by using the test.ping module. But as soon as i try to deploy any kind of software on the test-minion, i get following exception on the master....
23:49 whytewolf but yeah. try the clean install if still getting fails bug report
23:49 whytewolf try to get as much debug data as possable
23:49 IdoKaplan ok. thank you very much. good night :)
23:50 _Cyclone_ joined #salt
23:54 pipps joined #salt
23:55 whytewolf hemebond: about your question about the renders from python console. I have no bleeding idea. generally i access the renders in my debug module using salt.utils.templates.TEMPLATE_REGISTRY but there is a whole rigamaroll to get there
23:56 hemebond oooo, cheers. I'll have a nosey in there.
23:56 whytewolf https://github.com/whytewolf/salt-debug/blob/master/_modules/debug.py

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