Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-11-23

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

All times shown according to UTC.

Time Nick Message
00:05 jtang joined #salt
00:06 jondonas joined #salt
00:09 hightekvagabond joined #salt
00:11 hightekvagabond joined #salt
00:12 lorengordon eliasp: i do not know, but i like where you're going. i'd be interested in such a feature/pattern, as well.
00:15 lorengordon eliasp is it maybe an issue calling into a nested dictionary? i.e. you would need to test `if 'selinux' in salt and if 'getsebool' in salt['selinux']`
00:15 eliasp lorengordon: in my specific case, I have local development containers (systemd-nspawn) without SELinux… all the SELinux specialties are deal with in separate development VMs… so I'd like to have all SELinux related stuff disabled in this environment…
00:15 edrocks joined #salt
00:15 eliasp lorengordon: already tried that, ended up with the same ;-/
00:15 lorengordon blash
00:15 lorengordon err, blast.
00:15 eliasp lorengordon: I haven't fully gotten behind the magic of thos dunder-dicts yet… might have to investigate further tomorrow…
00:16 lorengordon eliasp: that was the only idea i've got. i wish you luck. :/
00:16 eliasp lorengordon: thx ;)
00:24 lorengordon eliasp: i'll happily test if you find a solution. amzn linux does an amazing job of disabling selinux, so much so that enabling it makes it incompatible with many autoscaling patterns. but i'd like my states to work across platforms...
00:25 eliasp lorengordon: I never really bothered to try Amazon Linux and kept CentOS7 - are there any advantages to Amazon Linux on EC2 instances?
00:25 lorengordon the primary advantage over other EL variants is that the repos have current package versions
00:26 markm joined #salt
00:26 lorengordon try to get apache24 on centos6...next to impossible. but it's right there in amzn linux.
00:27 eliasp lorengordon: making sure, states work across platforms is always a huge win… I'm aiming with my states for at least CentOS7, Debian 8 and working towards Gentoo…
00:27 Waggott14 joined #salt
00:27 eliasp lorengordon: well, ok… package/version flexibility… one of the key-reasons to use Gentoo for me ;)
00:28 eliasp also: really straightforward to create proper packages what would be otherwise a horribly butchered mess of NPM, rubygems, pip, etc.
00:28 eliasp anyways… got to sleep now… 3,5h left… will continue tmrw
00:28 eliasp good n8
00:29 lorengordon i'll have to check out gentoo, pkg'ing is a nightmare.
00:29 lorengordon night
00:30 eliasp lorengordon: Gentoo comes with a certain skill/maintenance overhead, but once you crossed that line and the profits of it apply, it's absolutely phenomenal
00:31 lorengordon eliasp: it is unfortunate that my clients tend to be a bit stuck in the rhel/centos world, but i'm happy to push the boundaries where i can.
00:35 larsfronius joined #salt
00:41 otter768 joined #salt
00:43 qman__ joined #salt
00:44 ronrib joined #salt
00:47 _JZ_ joined #salt
00:54 kitplummer joined #salt
00:57 NickD joined #salt
00:58 NickD how would you use the file.move module in a state file?
00:58 aurynn I'd ask "what are you trying to achieve"
00:59 onlyanegg joined #salt
01:01 fsteinel_ joined #salt
01:13 NickD aurynn: a specific package dumps a file in /etc/cron.daily, I usually move it to cron.weekly as-is
01:15 aurynn NickD, Ah, right. `module.run` is the state module you want, but I'm not sure if it supports `only_if` guards
01:15 aurynn you might be better off with a`file.absent` and having the file itself in your salt repo
01:16 NickD yeah that's what I was planning in the interim :)
01:17 aurynn or `file.copy` followed by `file.absent`
01:17 Kelsar joined #salt
01:18 aurynn oh
01:18 aurynn NickD, https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.rename
01:18 aurynn is what you want
01:18 aurynn it will move files around the tree
01:19 NickD nice find, thanks.. this is cleaner
01:22 _JZ_ joined #salt
01:22 aurynn yw
01:28 RobertChen joined #salt
01:35 RobertChen joined #salt
01:41 PeterO joined #salt
01:55 hightekvagabond joined #salt
01:59 brianfeister joined #salt
02:00 fsteinel joined #salt
02:02 tmclaugh[work] joined #salt
02:03 aidin joined #salt
02:04 aewfoij joined #salt
02:08 nafg joined #salt
02:15 thayne joined #salt
02:23 tmclaugh[work] joined #salt
02:30 hightekvagabond joined #salt
02:35 catpigger joined #salt
02:36 kshlm joined #salt
02:36 sunkist joined #salt
02:38 yidhra joined #salt
02:41 yidhra joined #salt
02:42 yidhra joined #salt
02:47 hasues joined #salt
02:47 hasues left #salt
02:48 ilbot3 joined #salt
02:48 Topic for #salt is now Welcome to #salt | 2015.8.1 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/
02:56 kitplummer joined #salt
03:00 xDamox joined #salt
03:01 RobertChen if my httpd is watching two files, both files are changed, will httpd restart once or twice ?
03:05 racooper joined #salt
03:12 __number5__ RobertChen: once
03:14 edrocks joined #salt
03:17 daemonkeeper joined #salt
03:19 aqua^c joined #salt
03:21 onlyanegg joined #salt
03:22 otter768 joined #salt
03:23 kshlm joined #salt
03:27 yidhra joined #salt
03:31 yidhra joined #salt
03:32 favadi joined #salt
03:32 ashutoshn joined #salt
03:34 yidhra joined #salt
03:39 yidhra joined #salt
03:48 thayne joined #salt
03:48 brianfeister joined #salt
03:50 shaggy_surfer joined #salt
04:08 evle joined #salt
04:10 falenn joined #salt
04:15 aidin joined #salt
04:20 ramteid joined #salt
04:23 RobertChen joined #salt
04:27 otter768_ joined #salt
04:27 ageorgop joined #salt
04:28 PeterO joined #salt
04:29 jasonrm joined #salt
04:42 beardedeagle joined #salt
04:43 beardedeagle I am getting the following when running my cert state: Comment: contents_pillar certs:ssl:ca-chain.pem results in empty contents. I have pillar_roots set, and am calling the pillar correctly with contents_pillar: certs:ssl:ca-chain.pem
04:44 malinoff joined #salt
04:46 jasonrm joined #salt
04:48 beardedeagle I am doing the file in the certs pillar: certs: ssl:ca-chain.pem: | """ multiline cert """
04:49 beardedeagle not sure what is causing the issue
04:57 whytewolf beardedeagle: does ssl:ca-chain.pem show up in pillar.items? and have you done a saltutil.pillar_refresh
04:59 beardedeagle ran a saltutil.pillar_refresh and now I am actually getting an error, let me check my master log.
04:59 nafg joined #salt
04:59 kitplummer joined #salt
05:00 beardedeagle yeah getting expected <block end>, but found '<scalar>'
05:04 whytewolf can you post your cert state?
05:04 RobertChen joined #salt
05:05 beardedeagle @whytewolf: I fixed it. Thanks for the saltutil.pillar_refresh. That is truly what was holding me up.
05:05 whytewolf cool, no problem
05:15 desposo joined #salt
05:37 brianfeister joined #salt
05:44 Nazca joined #salt
05:45 rdas joined #salt
05:53 totte left #salt
05:53 ageorgop joined #salt
05:55 favadi joined #salt
06:06 ashutoshn hi folks, am frequently facing this issue now - Too many functions declared in state 'file' in SLS '<sample_file>'. And when I run "salt-call -l debug state.show_top" from minion it shows correct information. Has anyone came across the same problem ?
06:13 colinstgeorge_ joined #salt
06:18 colinstgeorge_ yo everyone -- salt noob here... ive got a salt-master runniing on a foreman  server... i can run test.ping but not state.highstate
06:18 colinstgeorge_ i get No Top file or external nodes data matches found
06:19 colinstgeorge_ http://hastebin.com/zewokazimi.js
06:19 colinstgeorge_ i have ^^ in /etc/salt/master
06:21 colinstgeorge_ and http://hastebin.com/hijufonigi.avrasm
06:22 calvinh joined #salt
06:23 colinstgeorge_ and http://hastebin.com/jaxihiredu.sm
06:24 colinstgeorge_ are the tree and file listings... from how i understood to cobble them together from the internets
06:24 colinstgeorge_ any help greatly appreciated
06:24 whytewolf colinstgeorge_: whats in top.sls
06:25 colinstgeorge_ its in one of those hastebins but
06:25 colinstgeorge_ root@foreman:/srv/salt# cat top.sls
06:25 colinstgeorge_ base:
06:25 colinstgeorge_ '*':
06:25 colinstgeorge_ - prod
06:26 Rebus joined #salt
06:27 whytewolf okay. it wasn't in either hastebin or i wouldn't have asked. but anyway. what about pillar? is there a top.sls for it?
06:28 colinstgeorge_ sorry, thought it was at the bottom of that third one
06:28 colinstgeorge_ theres three cats in http://hastebin.com/jaxihiredu.sm
06:28 whytewolf ahh i missed that one.
06:28 colinstgeorge_ not trying to be  a pia
06:28 jhauser joined #salt
06:29 whytewolf anwya. the state based setup looks good. i would check for selinux maybe keeping salt from reading the files.
06:30 whytewolf if that isn't the case it is possable it isn't complaining about the state setup but the pillar setup
06:30 whytewolf also, if you are not using enviroments i wouldn't put themm in file_roots
06:31 whytewolf it tends to confuse things
06:31 colinstgeorge_ ok... im a major n00b at salt
06:31 colinstgeorge_ im not useing selinux for what i know
06:31 whytewolf what distro is your salt master running on?
06:32 colinstgeorge_ root@foreman:/srv/salt# lsb_release -a
06:32 colinstgeorge_ No LSB modules are available.
06:32 colinstgeorge_ Distributor ID: Ubuntu
06:32 colinstgeorge_ Description:    Ubuntu 14.04.3 LTS
06:32 colinstgeorge_ Release:        14.04
06:32 colinstgeorge_ Codename:       trusty
06:32 colinstgeorge_ so maybe?
06:32 colinstgeorge_ idk
06:32 colinstgeorge_ what im tyring to do is get my salt minions to show up in foreman
06:32 colinstgeorge_ the certs do..
06:32 colinstgeorge_ but then the hosts dont
06:32 whytewolf oh, ubuntu doesn't use selinux it uses apparmour. but it is normally setup to be more permissive with file access then selinux
06:33 calvinh_ joined #salt
06:33 colinstgeorge_ so my underdtanding is i need to run salt '*' state.highstate
06:33 colinstgeorge_ but then i get the no top file error
06:33 whytewolf well state.highstate just runs the top file
06:33 colinstgeorge_ gotchas
06:34 whytewolf to be sure everything is working you could try state.apply prod
06:34 colinstgeorge_ on a minon?
06:35 whytewolf no. on the master
06:35 colinstgeorge_ or from master
06:35 whytewolf salt '*' state.apply prod
06:35 colinstgeorge_ haha
06:36 whytewolf wait. just noticed something... prod/init.sls has no leading whitespace for everything after /home/myEnv/env.py?
06:36 felskrone joined #salt
06:36 colinstgeorge_ http://hastebin.com/xisaregusa.vhdl
06:36 colinstgeorge_ umm lemme look
06:37 felskrone joined #salt
06:37 colinstgeorge_ correctomundo whytewolf no whitespace
06:37 colinstgeorge_ improper syntax?
06:37 whytewolf definatly.
06:38 larsfronius joined #salt
06:38 colinstgeorge_ two spaces before file: and then more brfore -?
06:38 whytewolf colinstgeorge_: https://gist.github.com/whytewolf/44811cc4c5052428729f try this. [I perfer the module.function shortcuts.] but the spacing should be better
06:39 whytewolf 2 before file 4 before -
06:39 whytewolf think of it as nesting
06:41 whytewolf also looks like the issue is your pillar top file. colinmainbox tried to run the sls but piwik failed before that most likely trying to access the pillar top file and not being referenced in it.
06:42 colinstgeorge_ yeah here's your file run
06:42 colinstgeorge_ http://hastebin.com/hilojisoca.sm
06:45 colinstgeorge_ guess im unsure what a pillar top file is... is there supporsed to be a prod.sls sometwhere?
06:45 whytewolf ohhh. never mind compleatly missed the second line there.
06:45 whytewolf https://gist.github.com/whytewolf/44811cc4c5052428729f
06:45 whytewolf ack
06:45 whytewolf No matching sls found for 'prod' in env 'prod'
06:46 colinstgeorge_ yeah...
06:46 colinstgeorge_ idk what that means?
06:46 whytewolf piwik must have enviroment prod set in it's minion file
06:47 whytewolf mkdir /srv/salt/prod/states/prod
06:47 colinstgeorge_ yeah it does -- you smaht
06:47 colinstgeorge_ i was trying to force it to show yp
06:48 whytewolf it is looking for that sls file in /srv/salt/prod/states/prod or /srv/salt/prod/services/prod
06:51 colinstgeorge_ whytewolf: and it should be prod.sls?
06:51 colinstgeorge_ what should it contain (example?)
06:53 whytewolf well the same thing that is in /srv/salt/prod/init.sls and /srv/salt/prod/envpy.template
06:54 whytewolf or drop the enviroment= prod in the minion and it will just work
06:54 colinstgeorge_ oh ok
06:57 otter768 joined #salt
07:02 kitplummer joined #salt
07:12 colinstgeorge_ runs without issue now thanks whytewolf
07:12 colinstgeorge_ idk if upload-salt-reports is a foreman or salt thing... now when i run that, i get could not find environment 'salt'
07:14 colttt joined #salt
07:14 hojgaard joined #salt
07:19 RobertChen joined #salt
07:22 hightekvagabond joined #salt
07:26 brianfeister joined #salt
07:32 KermitTheFragger joined #salt
07:34 RobertChen how to reference one cmd.run output in another section?
07:41 cpowell joined #salt
07:44 AndreasLutro joined #salt
07:49 creppe joined #salt
07:50 linjan_ joined #salt
07:56 aidin joined #salt
07:59 ashutoshn Hi, i fixed "Too many functions declared in state 'file' in SLS '<sample_file>' " issue. I just separated various commands in state files and it allowed me to execute individual modules :)
08:00 otter768 joined #salt
08:09 keimlink joined #salt
08:09 kawa2014 joined #salt
08:16 impi joined #salt
08:25 eichiro joined #salt
08:33 ubikite joined #salt
08:41 Grokzen joined #salt
08:44 eseyman joined #salt
08:45 Guest4631 joined #salt
08:47 informant1 joined #salt
08:49 alcy joined #salt
08:50 Erik_p joined #salt
08:51 Pouto joined #salt
08:52 Pouto How do I check which states are currently executed?
08:52 alcy hello folks, does salt have a concept of types and providers (like puppet) ?
08:54 Erik_p Hi all winrepo is not working for me can anyone help? salt '*' pkg.available_version get IndexError: pop from empty list
08:57 AndreasLutro alcy: I don't think so. what are you wanting to do?
09:00 av___ joined #salt
09:03 aidin left #salt
09:03 Erik_p When i run pkg.refresh_db i dont see True
09:04 kitplummer joined #salt
09:09 slav0nic joined #salt
09:11 Erik_p found the problem the minion looking for repo-ng folder and not repo
09:15 brianfeister joined #salt
09:18 alcy AndreasLutro: so, in puppet a package is a type, and dpkg can be a provider. This framework allows us to abstract a system (like a package manager). At times we want to write custom types and providers, say for a moitoring system
09:21 thayne joined #salt
09:21 AndreasLutro alcy: so you'd want to, for example, create a custom replacement for pkg.install?
09:26 Pouto joined #salt
09:27 irctc077 joined #salt
09:28 irctc467 joined #salt
09:28 irctc467 Hi All
09:28 irctc467 Need some infromation about external pillar
09:28 s_kunk joined #salt
09:28 irctc467 I need to execute a curl call which will return the data in json format , which further need to add to external pillar
09:28 irctc467 - cmd_json: cat /var/www/html/users
09:28 irctc467 this one is executing without any issue
09:28 irctc467 But when I am doing a  curl call , its not picking up
09:28 irctc467 cmd_json: curl http://localhost/users
09:29 irctc467 Am I missing something in the cmd_json syntax
09:31 RobertChen joined #salt
09:31 RobertChen @ashutoshn,  how many commands can on sls have? I want to put everything in one SLS file
09:33 vincehu joined #salt
09:36 VSpike Is it right or wrong that the salt formula still adds the PPA instead of the new official repo?
09:36 VSpike discuss
09:37 iggy theres an issue already
09:37 ubikite1 joined #salt
09:41 Xevian joined #salt
09:44 rotbeard joined #salt
09:45 gnord joined #salt
09:46 thalleralexander joined #salt
09:53 nafg joined #salt
09:53 VSpike iggy: ah, yes, ta
09:53 jamesp9 joined #salt
09:53 jamesp9_ joined #salt
09:55 ashutoshn @RobestChen, you can give commands under individual functions. I actually gave six in one. But make sure you don't use same modules under one function
09:56 ashutoshn left #salt
10:01 otter768 joined #salt
10:07 Andre_ks can pillar variables be added to files (such as conf's)?  Any links on how to do that?  I want to add variables inside files that are managed and use pillars with if conditionals for fqdn to assign the values.
10:08 Andre_ks otherwise, how can I use different confs in the same salt state depending on the minion type?
10:10 viq joined #salt
10:12 alcy AndreasLutro: no, a custom system itself, not package, but say a monitoring system construct
10:12 ubikite joined #salt
10:20 AndreasLutro alcy: okay, well, it is possible to write custom state and execution modules in python
10:22 hypnosb joined #salt
10:22 sfxandy joined #salt
10:22 sfxandy hi everyone
10:23 kbaikov joined #salt
10:24 Pouto joined #salt
10:25 Pouto Hi there, when running salt.highstate, how do I see what is currently executed?
10:29 alcy AndreasLutro: any general idea bout level of difficulty of writing those ? Is it a standard framework ?
10:32 giantlock joined #salt
10:33 bluenemo joined #salt
10:34 Guest47941 joined #salt
10:36 AndreasLutro alcy: usually it's just like writing regular python code
10:39 larsfronius joined #salt
10:40 haarp joined #salt
10:41 MadHatter42 joined #salt
10:43 haarp hey. im wondering if for loops in jinja can use literal strings (like you can in bash). so instead of {% for element in elements %} id like {% for element in "foo", "bar", "baz" %}. is that possible?
10:43 AndreasLutro haarp: for element in ['foo', 'bar']
10:43 haarp that was quick. thanks! :)
10:46 Rumbles joined #salt
10:46 Xevian_ joined #salt
10:48 fredvd joined #salt
10:54 sfxandy does anyone have any idea how I can fire the equivalent of a salt-run jobs.active from within a Python code block?
11:01 RobertChen joined #salt
11:03 brianfeister joined #salt
11:05 montu26 joined #salt
11:05 ericof joined #salt
11:05 kitplummer joined #salt
11:09 alcy AndreasLutro: gotcha, thanks
11:10 zerthimon joined #salt
11:10 fredvd joined #salt
11:14 MadHatter42 joined #salt
11:20 VSpike I'm having some trouble with the salt formula, specifically the salt.gitfs.gitpython state https://bpaste.net/show/691e539d2f78
11:20 VSpike I can't immediately spot what the problem could be here, or how to fix it. Any ideas how I can debug this more?
11:21 eigart joined #salt
11:25 _ikke_ joined #salt
11:26 AndreasLutro VSpike: the formula isn't properly merging some dicts
11:27 AndreasLutro https://github.com/saltstack-formulas/salt-formula/blob/master/salt/map.jinja#L79 should be changed to do a deep merge instead of a shallow merge
11:27 CeBe joined #salt
11:31 amcorreia joined #salt
11:33 traph joined #salt
11:33 traph joined #salt
11:35 Erik_P_ joined #salt
11:37 Erik_P_ any one can point me to a direction for TFS commit to salt?
11:39 johtso joined #salt
11:49 jaybocc2 joined #salt
11:50 mephx hey guys. I have been fiddling for hours with include/import with/without context and with blocks to try and get the following to work: http://pastebin.com/4PfmqGSV I know this could be solved by setting our macros via pillar and not on an sls. still, isn't there a way to get this to work at the template level only?
11:52 Grokzen mephx, don't you need to be explicit what you want to import from the other files? like {% from file.sls import foobar with context %} ??
11:54 mephx Grokzen: even though, it still doesn't work. parent can't find child's variable while being imported
11:54 VSpike AndreasLutro: so, it's a bug in the formula?
11:55 AndreasLutro VSpike: yes, I think so
11:55 tristianc joined #salt
11:55 mephx with context doesn't solve it either. my only option left is with block stating every var, kind of annoying having to do that when that should be the purpose of "with context"
11:56 VSpike AndreasLutro: is there anything built-in to do a deep merge of dicts?
11:57 AndreasLutro VSpike: not sure, don't think so
11:57 VSpike No, I couldn't find anything
11:57 AndreasLutro there's probably something in salt.utils but that's not necessarily available in a template
11:57 VSpike So is the whole approach flawed, or can it be fixed?
11:58 AndreasLutro I'm sure it can be fixed, just not sure how
11:59 denys joined #salt
12:00 VSpike http://stackoverflow.com/a/15836901/276913 looks possibly useful
12:01 AndreasLutro https://github.com/saltstack/salt/blob/develop/salt/utils/dictupdate.py
12:02 otter768 joined #salt
12:05 quasiben joined #salt
12:05 VSpike AndreasLutro: is it possible to use that from a JInja template?
12:06 GreatSnoopy joined #salt
12:06 AndreasLutro no
12:07 pviktori joined #salt
12:07 VSpike darn :)
12:15 AlberTUX1 joined #salt
12:15 VSpike Well, that pretty much renders that useless then (pun not intended)
12:18 eigart joined #salt
12:24 Songohan joined #salt
12:36 losh joined #salt
12:38 jaybocc2 joined #salt
12:46 Songohan joined #salt
12:47 Songohan hello, how to add a pillar or grain to a specific minion from the salt master ?
12:48 Songohan the idea is to set informations like role_X, application_A to particulars minions
12:49 Songohan is it possible to do this from the master ?
12:49 TyrfingMjolnir joined #salt
12:51 pdayton joined #salt
12:52 Songohan i think i can only do this with pillars, am i right ?
12:52 brianfeister joined #salt
12:55 KermitTheFragger joined #salt
12:56 VSpike Songohan: it's probably better to do that via pillar, so you need some way to decide what pillar items to apply to the minion. I went by minion id, and used structured names, but I'm sure there are other ways
12:57 tmclaugh[work] joined #salt
13:06 otter768 joined #salt
13:08 kitplummer joined #salt
13:20 Songohan VSpike: can i see an example on Internet ? I want specify roles by minion id like you've done
13:20 tmclaugh[work] joined #salt
13:23 tkharju joined #salt
13:28 beardedeagle joined #salt
13:30 breakingmatter joined #salt
13:31 tkharju joined #salt
13:40 tbosua joined #salt
13:42 kawa2014 joined #salt
13:43 TOoSmOotH joined #salt
13:45 fredvd joined #salt
13:46 salt-noob joined #salt
13:46 KermitTheFragger joined #salt
13:46 MadHatter42 joined #salt
13:49 genediazjr joined #salt
13:49 beardedeagle Not finding this in the doc's, is there a way to make a task wait a prescribed amount of time? For instance I want to wait 30 seconds after putting a server into maintenance to kill a docker image serving connections?
13:49 teryx510 joined #salt
13:49 salt-noob is there any documentation i can look into for cloud architecture with salt and auto scale?
13:50 mik__R joined #salt
13:52 jcockhren salt-noob: in the official docs, under reactors, there's a couple examples of auto-registration and auto removal leveraging the event bus
13:57 cpattonj joined #salt
14:02 scoates joined #salt
14:02 marsdominion joined #salt
14:03 aidin joined #salt
14:03 salt-noob jcockhren thanks i'm looking into that...
14:04 sunkist joined #salt
14:05 salt-noob will it be a bad practice if i were to capture a image of my current minion and load it up every time the autoscale boot up? that mean to say that the minion will have the same key
14:07 GreatSnoopy joined #salt
14:09 kitplummer joined #salt
14:10 Guest4631 Hello
14:10 ssplatt joined #salt
14:10 Guest4631 Is there anything such as a dummy state?
14:11 Guest4631 I'm looking for a way to create a "postmortem" dummy state, which depends on a list of other states failing and is required by a list of other states.
14:12 numkem joined #salt
14:12 AndreasLutro Guest4631: https://docs.saltstack.com/en/develop/ref/states/all/salt.states.test.html
14:12 Guest4631 Thanks, AndreasLutro :)
14:16 jcockhren salt-noob: be sure that each minion has a different ID
14:18 edrocks joined #salt
14:21 truches joined #salt
14:22 truches i have a problem with salt-minion on centos 7.  i have the error you should upgrade pyopenssl to at least 0.14.1 to enable the use of x509 extensions
14:23 bhosmer joined #salt
14:26 Tanta joined #salt
14:27 subsignal joined #salt
14:27 VSpike Songohan: one moment
14:29 pdayton1 joined #salt
14:29 winsalt joined #salt
14:30 anotherZero joined #salt
14:34 VSpike Songohan: here's mine .. it's likely to be something that's going to be quite specific to your requirements but at least you can see how it's done https://gist.github.com/johnccfm/a0e440ef6308088e3409
14:35 MadHatter42 joined #salt
14:36 VSpike Songohan: when the code runs it has full access to the grains and returns a dictionary of pillar data, so the concept is quite simple
14:36 perfectsine joined #salt
14:38 Songohan VSpike: i will look at this later
14:41 brianfeister joined #salt
14:41 larsfronius joined #salt
14:42 aphor joined #salt
14:43 sroegner joined #salt
14:44 bhosmer joined #salt
14:47 mik__R joined #salt
14:49 jaybocc2 joined #salt
14:50 giantlock joined #salt
14:51 bluenemo joined #salt
14:51 Kelsar joined #salt
14:51 timoguin joined #salt
14:56 jeddi joined #salt
14:56 metalseargolid joined #salt
14:56 bhosmer joined #salt
14:58 aphor I'm trying to start writing stuff for a proxy minion.
14:58 breakingmatter joined #salt
14:59 aphor Is there a nice way to see what grains are required for which states in the SaltStack distribution?
15:00 ALLmightySPIFF joined #salt
15:04 beardedeagle is there a good way to pass salt-api webhook postdata from a reactor file to another state?
15:05 jaybocc2 joined #salt
15:05 favadi joined #salt
15:09 hightekvagabond joined #salt
15:11 boargod is there some significance of this :lookup "namespace" that the forumlas are employing?  trying to wrap my head around the purpose of it
15:12 zmalone joined #salt
15:15 kitplummer joined #salt
15:16 sunkist joined #salt
15:17 cpowell joined #salt
15:19 mapu joined #salt
15:22 rotbeard joined #salt
15:24 DammitJim joined #salt
15:25 aphor boargod: I think the idea is that you can avoid exception handling if the thing doesn't exist.
15:26 aphor boargod: doing it in Jinja python one-liners kinda precludes exception handling, so you need a way to avoid exceptions and still allow jinja to render something like a default.
15:29 mpanetta joined #salt
15:29 murrdoc joined #salt
15:31 cyborg-one joined #salt
15:31 boargod aphor, thanks.  so you're saying that if I do a pillar.get('apache') it would fail on non-exist, as opposed to pillar.get('apache:lookup')?  so stuff everything underneath "apache.lookup" in the pillar and not the root of apache?
15:33 boargod the postgres formula for example seems to merge both postgres:lookup and postgres https://github.com/saltstack-formulas/postgres-formula/blob/master/postgres/map.jinja
15:34 kitplumm_ joined #salt
15:35 racooper joined #salt
15:35 otter768 joined #salt
15:35 TTimo joined #salt
15:37 kitplummer joined #salt
15:38 murrdoc somewhere along the lines it was decided to have the :lookup prefix in formulas
15:38 murrdoc and that change hasnt propogated out
15:39 murrdoc but the way it works boargod is it merges / overrides the defaults.yaml with the :lookup from the pillar
15:39 murrdoc then merges in the full pillar so that in your yaml
15:39 boargod gotcha.  so the advice is that everything in our pillar is essentially under mypackage.lookup.myvar now instead of mypackage.myvar?
15:40 murrdoc you can use postgres variable (terrible variable name) to access the defaults, overrides and the full pullar
15:40 murrdoc everything in defaults.yaml u want to over ride goes into pillar:lookup
15:40 murrdoc but everything you need for your own pillar goes in the pillar namespace as u want
15:40 murrdoc got a gist ?
15:40 murrdoc i can explain better
15:41 boargod nothing concise, let me try something real quick first
15:41 chadhs joined #salt
15:42 quix joined #salt
15:42 slav0nic joined #salt
15:42 viq joined #salt
15:42 rm_jorge joined #salt
15:42 7YUAAD0V7 joined #salt
15:42 quix joined #salt
15:43 quasiben1 joined #salt
15:44 murrdoc joined #salt
15:45 TooLmaN joined #salt
15:45 mik__R joined #salt
15:47 boargod I think I get it now -- it looks like lookup is used to JUST override the defaults, or vars defined inside that forumula, and then the other vars at that same level as lookup are basically required vars for the forumla (like in apache "sites" or "modules")
15:47 markm joined #salt
15:48 murrdoc1 joined #salt
15:51 salt-noob i would like to find out what's is a best practice if i were have thousands of vhost config files for apache, should i generate it using jinja using template? or i should pre-generate it and sync it using file-recursive? at most time it'd only be a single file changes instead of all the thousands configuration
15:53 kitplumm_ joined #salt
15:57 quasiben joined #salt
15:57 kitplummer joined #salt
15:57 ALLmightySPIFF joined #salt
15:58 clintberry joined #salt
15:59 jhauser_ joined #salt
15:59 ALLmightySPIFF joined #salt
16:00 spiette joined #salt
16:03 murrdoc1 do all your hosts have access to a github host
16:03 jalbretsen joined #salt
16:08 PeterO joined #salt
16:10 murrdoc joined #salt
16:10 bhosmer joined #salt
16:11 erjohnso joined #salt
16:11 _JZ_ joined #salt
16:13 tuxx {% for site, key in salt['pillar.get']('sites', {}).iteritems() %}{% set mods = [mods, key.mods] %}{% endfor %}
16:13 tuxx would the variable mods be avabilable outside of the loop?
16:16 _JZ_ joined #salt
16:18 sdm24 joined #salt
16:18 kaptk2 joined #salt
16:20 murrdoc joined #salt
16:24 ageorgop joined #salt
16:25 hasues joined #salt
16:27 hasues left #salt
16:29 linjan_ joined #salt
16:30 brianfeister joined #salt
16:31 hamburglar joined #salt
16:33 hamburglar I have a question about the salt-minion process.  I have a test environment that has the minion running on a handful of machines.  I have noticed that I consistently have 2 salt-minion processes when I run ps.  Is this normal or should there just be a single process for the minion?
16:34 kitplumm_ joined #salt
16:37 kitplummer joined #salt
16:40 kitplumm_ joined #salt
16:40 zsoftich2 joined #salt
16:44 tmclaugh[work] joined #salt
16:48 Brew joined #salt
16:52 murrdoc joined #salt
16:52 cheus joined #salt
16:58 onlyanegg joined #salt
16:58 pdayton joined #salt
16:59 kitplummer joined #salt
17:00 Fiber^ joined #salt
17:02 Bryson joined #salt
17:02 pdayton1 joined #salt
17:02 kitplumm_ joined #salt
17:04 ageorgop joined #salt
17:05 kitplummer joined #salt
17:05 TooLmaN joined #salt
17:06 tercenya joined #salt
17:06 otter768 joined #salt
17:07 xDamox joined #salt
17:08 kitplumm_ joined #salt
17:09 malinoff joined #salt
17:10 cpowell joined #salt
17:13 djstorm joined #salt
17:18 xDamox joined #salt
17:18 beardedeagle If I am understanding the post example here (https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html#hook) correctly, then I should be able to call a state (arg) and pass it postdata (kwargs). Is that correct or am I crazy?
17:22 mohae joined #salt
17:22 Eugene You're probably crazy, but that has nothing to do with Salt
17:24 bhosmer joined #salt
17:24 beardedeagle joking aside, is that a no?
17:26 perfectsine joined #salt
17:27 racooper so hello folks. I'm looking at the salt yum repo for 2015.8.1.  I"m concerned about a few things...like the repo overriding base CentOS packages for python-crypto and PyYAML.  This is NOT good practice.
17:28 tehsu If I want to use file.replace to just replace a date inside a config, could I use a pillar.get to do so?
17:28 zmalone racooper: Yeah, there are a lot of issues with salt packaging, and there are a lot of github issues resulting from it.
17:29 racooper so unless 15.8 is is going to be packaged for EPEL, I won't be upgrading...I don't like replacing system packages. It tends to be a bad idea.
17:32 Lionel_Debroux_ joined #salt
17:36 onlyanegg joined #salt
17:38 rubenb joined #salt
17:39 tuxx can i use variables in pillars?
17:42 brianfeister joined #salt
17:52 writtenoff joined #salt
17:54 kitplummer joined #salt
17:57 murrdoc iggy:  merge my revert
17:58 hal58th joined #salt
17:58 hal58th_ joined #salt
17:58 racooper in the mean time...can I use salt 2015.8.1 minions against a 2015.5.5 server?
17:59 kitplumm_ joined #salt
17:59 iggy murrdoc: done
17:59 murrdoc thanks
17:59 murrdoc sorry for bad merge
17:59 iggy #usedtoit
18:02 tehsu can a file.replace for the pattern and repl use a pillar.get
18:02 kitplummer joined #salt
18:04 baweaver joined #salt
18:04 otter768 joined #salt
18:07 onlyanegg joined #salt
18:08 nafg joined #salt
18:09 hal58th can't see why not tehsu
18:09 Jimlad_ joined #salt
18:10 conan_the_destro joined #salt
18:18 denys joined #salt
18:19 timoguin joined #salt
18:21 impi joined #salt
18:24 jaybocc2 joined #salt
18:27 b18 joined #salt
18:31 RandyT_ Could someone help me understand how I could use this msssql module when connecting and interacting with a physical database server that has multiple databases on it?
18:31 RandyT_ https://github.com/saltstack/salt/blob/develop/salt/modules/mssql.py
18:31 RandyT_ not clear to me if I can pass something in kwargs that would accomplish that?
18:32 RandyT_ setting mssql.database: as the doc suggests would not make sense in pillar since there are multiple databases on the servers I am working with.
18:32 Guest82918 joined #salt
18:32 RandyT_ and trying to use this in context of creating a state that does module.run:
18:33 RandyT_ perhaps there is something I can do with the pillar that I have yet to grasp...
18:36 whytewolf RandyT_: that state does have documentation. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mssql.html#module-salt.modules.mssql
18:36 ssplatt joined #salt
18:37 whytewolf "Options that are directly passed into functions will overwrite options from configs or pillars."
18:38 RandyT_ whytewolf: yes, I saw that and then went to the code to see if that was any more enlightening.
18:39 RandyT_ whytewolf: so I should be able to pass - database: to override the database value?
18:39 whytewolf RandyT_: from what i see there. in theroy yes
18:39 RandyT_ The line at top of page "In order to connect to MS SQL Server, certain configuration is required in minion configs/pillars on the relevant minions." led me to believe I had to pass those items in a pillar.
18:40 bhosmer__ joined #salt
18:40 whytewolf it is best to setup sane defaults in pillar. but you can over ride those in the function calls. [according to that line]
18:41 RandyT_ whytewolf: ok, will give it a try then. thanks
18:41 whytewolf RandyT_: this would be the part that checks that https://github.com/saltstack/salt/blob/develop/salt/modules/mssql.py#L54-L61
18:41 zmalone left #salt
18:42 RandyT_ ok, very good. Gets me a bit more clear about the module code as well.
18:42 larsfronius joined #salt
18:47 tawm04 joined #salt
18:49 otter768 joined #salt
18:52 schemanic joined #salt
18:52 schemanic Hello
18:53 bbbryson joined #salt
18:55 schemanic I'm having a very hard time getting nodejs installed on ubuntu with salt. I'm provisioning a masterless minion with vagrant. Can anyone assist?
18:56 geekatcmu Sure.  "Stop using node."
18:57 schemanic Thats... not helpful.
18:57 geekatcmu sorry
18:57 geekatcmu it's all I've got
18:57 bhosmer_ joined #salt
18:58 schemanic I need to spend some time on the vagrant channel. I'll be back.
18:59 thayne joined #salt
18:59 kitplumm_ joined #salt
19:02 kitplummer joined #salt
19:04 kitplumm_ joined #salt
19:11 impi joined #salt
19:18 GreatSnoopy joined #salt
19:20 kitplummer joined #salt
19:21 mpanetta Is there any advantage of using the salt hosts states vs just looping pillar and managing /etc/hosts ?
19:21 TooLmaN joined #salt
19:23 murrdoc mpanetta:  well if u are ok with no comments in /etc/hosts file
19:23 murrdoc then use the host states
19:24 mpanetta It makes no difference to me really
19:27 beardedeagle can you create a webhook that posts data to a pillar?
19:32 sergeyt joined #salt
19:32 beardedeagle for instance - kwarg: pillar: somevar: {{ postdata }}
19:33 Andre_ks can pillar variables be added to files (such as conf's)?  Any links on how to do that?  I want to add variables inside files that are managed and use pillars with if conditionals for fqdn to assign the values. Otherwise, how can I use different confs in the same salt state depending on the minion type?
19:33 eigart left #salt
19:35 whytewolf beardedeagle: /hook is for triggering events. all it does is send an event on the event bus. you still need reactors to pick up those events
19:35 beardedeagle @whytewolf: one moment, I will throw a gist together to better illustrate
19:36 moogyver joined #salt
19:36 whytewolf beardedeagle: that being said the reactor can take data from the event and put that into a pillar
19:39 brianfeister joined #salt
19:39 beardedeagle @whytewolf: https://gist.github.com/beardedeagle/639a2693416e279d773a
19:39 sdm24 Andre_ks: to use pillar data in a conf file (assuming you are using file.managed and have template: jinja set), just add {{ salt['pillar.get']('your key') }} in the conf file
19:41 whytewolf beardedeagle: yeap that should work. i think
19:42 beardedeagle @whytewolf: but I would need a /srv/pillar/targets/init.sls and since I am getting my targets from post I am unsure on how I would even do that.
19:42 bhosmer_ joined #salt
19:42 beardedeagle @whytewolf: if I am thinking correctly, I essentially  need to find a way to populate pillar data as part of the reactor so your minion can use this pillar data
19:43 beardedeagle my*
19:43 whytewolf beardedeagle: in your example. the pillar targets would get filled with postdata.targets from the postdata.
19:44 whytewolf no need for a pillar file
19:44 beardedeagle @whytewolf: the only reason I assumed that is because I get this: [DEBUG   ] compound_match tldproxy01.cloud.dev.phx3.gdg ? "​​*web*​​" => "False"
19:45 beardedeagle so it is trying to hit the pillar top.sls for something
19:45 ashirogl joined #salt
19:45 morissette joined #salt
19:45 whytewolf because it always trys to hit the pillar top file on every highstate
19:46 merlin`_ joined #salt
19:46 whytewolf passing pillar data in through reactor is like passing in pillar={} on the cli
19:46 tehsu hal58th any ideas on a good pattern, I'm guessing this wouldn't work,     - pattern: '{{ salt['pillar.get']('olddb') }}'
19:46 bhosmer_ joined #salt
19:46 whytewolf beardedeagle: https://docs.saltstack.com/en/latest/topics/reactor/#passing-event-data-to-minions-or-orchestrate-as-pillar
19:47 hal58th tehse, I can't see why not
19:47 hal58th tehsu, I can't see why not
19:48 beardedeagle @whytewolf: thanks, looking
19:48 hal58th tehsu, sorry that was your replace. You need a regex in your pattern.
19:49 hal58th tehsu, - pattern: '{{ salt['pillar.get']('olddb') }}'
19:49 morissette where does the salt-key get the hostname from? hostname, /etc/sysconfig/network all differ from Unaccepted keys
19:49 hal58th tehsu, - pattern: '.*{{ salt['pillar.get']('olddb') }}'
19:49 tehsu ah
19:50 hal58th morissette: https://docs.saltstack.com/en/latest/topics/tutorials/walkthrough.html#minion-id-generation
19:51 morissette ah ha /etc/hosts
19:51 morissette thanks hal58th
19:51 tehsu thank you
19:51 hal58th welcome
19:52 forrest joined #salt
19:52 whytewolf beardedeagle: your example would be salt '*proxy*' haproxy.maint 'pillar={targets: postdata.targets}'
19:53 whytewolf sorry I meant salt '*proxy*' state.sls haproxy.maint 'pillar={targets: postdata.targets}'
19:53 baweaver joined #salt
19:54 TOoSmOotH joined #salt
19:58 monkey- joined #salt
19:59 edrocks joined #salt
20:03 ALLmightySPIFF joined #salt
20:08 Vynce joined #salt
20:09 sjorge Figured it out! | yaml(False) | indent(8) was needed
20:12 antpa joined #salt
20:21 beardedeagle @whytewolf: for whatever reason it kept telling me the pattern had already been changed. I had to change it from file.comment to cmd.run: sed -e ‘/{{ targets }}/ s/^#*/#/' -i /etc/haproxy/haproxy.cfg
20:22 murrdoc joined #salt
20:22 beardedeagle in the main.sls
20:22 beardedeagle maint.sls*
20:22 hal58th sjorge, wow. I didn't realize you could pipe your data to different outputs
20:25 danemacmillan joined #salt
20:27 ekristen joined #salt
20:31 baweaver joined #salt
20:37 ashirogl joined #salt
20:37 kitplummer joined #salt
20:38 tercenya joined #salt
20:39 sjorge hal58th: neither did I :) I stumbled upon it by accident
20:39 sjorge looking at a old issues for the file.managed state :)
20:41 aphor joined #salt
20:41 sjorge Now I get nice e-mails when fmadm.healthy returns false based on fmadm.faulty's output
20:41 sjorge bye bye horrible hack to get sendmail to work on smartos global zone
20:41 sjorge well once I setup a decent master after I fixed zfs and zpool :p
20:43 charli joined #salt
20:44 wych joined #salt
20:45 MasterNayru joined #salt
20:48 kitplummer joined #salt
20:49 Andre_ks I can't seem to get pillar dataw
20:49 Andre_ks I have pillars with variables, but they don't pass through.
20:50 Andre_ks master file has the pillar_roots defined
20:50 devtea joined #salt
20:50 ageorgop1 joined #salt
20:51 Andre_ks salt '*' pillar.items says none.  but there are variables in the pillar dirs
20:52 whytewolf Andre_ks: make sure that top.sls for pillar is setup. also run salt '*' saltutil.refresh_pillar
20:52 hal58th Andre_ks: Your top.sls for the pillar dir is correct I assume?
20:53 Andre_ks yes, it's correct.  And I did run salt '*' saltutil.refresh_pillar
20:53 whytewolf Andre_ks: okay then we need more info. please put your configs on gist
20:53 Andre_ks I wonder if it's a setting in salt master config or if it's the way I setup my /srv/salt/pillars/ENV/  structure with top.sls
20:54 Andre_ks ok
20:54 whytewolf Andre_ks: could be either or both
20:54 Guest47941 joined #salt
20:54 whytewolf enviroments = PITA
20:54 terratoma joined #salt
20:58 adelcast left #salt
20:59 Andre_ks https://gist.github.com/andrebron/59667cda858d7db5f781
20:59 wych joined #salt
21:00 beardedeagle @Andre_ks: that indentation in /srv/salt/pillars/base/tops.sls there on purpose?
21:01 adelcast joined #salt
21:01 sjorge joined #salt
21:01 sjorge joined #salt
21:03 Andre_ks no it's not
21:03 Andre_ks was a gist typo
21:04 whytewolf Andre_ks: you do need a base: enviroment in your top.sls even if nothing is in it.
21:04 whytewolf at least IIRC you do
21:05 Andre_ks in states and pillars?
21:05 Andre_ks I don't have one in states
21:05 Andre_ks and states work, but pillars dont
21:05 whytewolf humm are you getting any errors?
21:06 whytewolf when you run saltutil.refresh_pillar
21:06 quasiben joined #salt
21:06 Andre_ks nope
21:06 Andre_ks just reports none
21:07 whytewolf on the miion try salt-call -l debug saltutil.refresh_pillar
21:07 Andre_ks https://gist.github.com/andrebron/7a0d5289b0fd6003b69d
21:07 Andre_ks this is the pillar I setup
21:07 Andre_ks inside /srv/salt/pillars/development/role_based_auth/init.sls
21:08 whytewolf humm.
21:08 whytewolf I don't think that would match anything
21:08 Andre_ks it reports none on the minion too
21:08 Andre_ks it wouldn't?
21:09 whytewolf no, wildcards don't work like that
21:09 Andre_ks oh
21:10 Andre_ks how do I case match a set of minion fqdn and give it a var and then elif everything else a default?
21:10 markm joined #salt
21:10 ciege joined #salt
21:10 Andre_ks what is interesting is that no imported variables work
21:10 Andre_ks not even from a lib.sls var file
21:11 Andre_ks I try to match minions fqdn with grains, but you cannot use wildcard or regex for that?
21:11 whytewolf Andre_ks: you arn't comparing wildcards. you are comparing strings
21:12 whytewolf I doubt you have a fqdn that is named *
21:12 Andre_ks ah ok
21:12 Andre_ks I get it
21:12 mohae_ joined #salt
21:13 Andre_ks what you would recommend as a method to switch between vars depending on fqdn?
21:14 antpa Does anyone here have experience with Saltpad?
21:14 beardedeagle @whytewolf: https://gist.github.com/beardedeagle/639a2693416e279d773a so maint.sls works with you're one-liner
21:14 beardedeagle salt '*proxy*' state.sls haproxy.maint 'pillar={targets: tldweb1api*}'
21:14 aphor Andre_ks: do you get fqdn in grains?
21:15 whytewolf Andre_ks: well if you are not worried about security [grains are not secure. they can be changed on the minion side. without interaction or validation from the master]
21:15 aidalgol joined #salt
21:15 beardedeagle however it is still not passing the pillar var from the update.sls to the maint.sls when I curl the hook
21:16 whytewolf Andre_ks: I would say put the pillars as static. and use grain matching
21:16 onlyanegg joined #salt
21:17 Andre_ks ok
21:17 aphor Andre_ks: as a tangent to whytewolf, are you certain that the configuration you want to specify depending on FQDN is a natural dependent on FQDN, or maybe you might want to ket off something other than FQDN?
21:17 Andre_ks going to try if grains['fqdn'].starswith('xyz')
21:17 aphor ket --> key
21:18 Andre_ks thanks aphor and whytewolf
21:18 aphor Andre_ks: maybe you're using FQDN to set roles?
21:18 Andre_ks I haven't touched upon roles yet
21:18 Andre_ks I should read up on those too
21:18 DanyC joined #salt
21:18 jasondotstar joined #salt
21:19 diegows joined #salt
21:19 aphor Andre_ks: you might not want to use FQDN to control conditional evaluation of pillar data.
21:19 perfectsine joined #salt
21:20 Andre_ks perhaps not, you're right.  suggesting roles>
21:20 Andre_ks ?
21:22 s_kunk joined #salt
21:22 aphor Andre_ks: most likely roles are what you want.
21:22 Andre_ks will read up on that and give it a go!
21:22 Andre_ks thanks!
21:26 tkharju joined #salt
21:28 brianfeister joined #salt
21:31 beardedeagle @whytewolf: added salt-master and salt-api debug output to that gist
21:32 tkharju joined #salt
21:33 TOoSmOotH joined #salt
21:33 moeyebus joined #salt
21:34 whytewolf beardedeagle: also try watching the event bus when you try a hook. make sure the data is as you expect it
21:34 moeyebus I'm having a problem with the x509 state
21:34 moeyebus (Using it with salt-ssh)
21:34 moeyebus I get a python stacktrace with                KeyError: 'x509.create_private_key'
21:35 whytewolf moeyebus: what version of salt?
21:35 iggy that means you're missing a dependency usually
21:35 whytewolf ^^^
21:35 melog1 joined #salt
21:36 iggy or yeah, that is pretty new too, make sure your master and minions are 2015.8+
21:36 moeyebus When run using salt-minion, same result
21:37 kitplummer joined #salt
21:37 iggy it requires M2Crypto
21:37 iggy make sure you have that installed
21:38 moeyebus I have no idea what to make of the errors (posting them shortly)
21:38 moeyebus Here's my state file: http://ix.io/mr7
21:38 ekristen left #salt
21:38 whytewolf the KeyError issue was fixed in 2015.8.0 so if you are getting that error. then you are not running 2015.8 which means x508 doesn't exist [since it was introduced in 2015.8.0 also
21:39 b18 joined #salt
21:39 moeyebus Here's the result: http://ix.io/mr8
21:41 ljt joined #salt
21:41 * whytewolf feels ignored
21:42 robawt joined #salt
21:43 pdayton joined #salt
21:43 forrest whytewolf, It's okay, I'm ignoring you
21:43 whytewolf lol
21:44 murrdoc whytewolf:  sup
21:44 forrest murrdoc, I hope all those merges you did don't break anything
21:44 beardedeagle @whytewolf: when watching the event bus I see the hook getting hit with the post data I need, then it looks like the job gets created without the post data. Added the output to the gist
21:44 forrest on the postgres formula, lol
21:44 larsfronius joined #salt
21:44 murrdoc forrest:  i dont think so
21:44 forrest murrdoc, Was pretty unhappy when I woke up and saw like 20 emails from GitHub, so thanks for taking care of those.
21:45 ekristen joined #salt
21:45 murrdoc :)
21:45 whytewolf murrdoc: just answer questions in here and getting ignored in #openstack when i ask a question :P
21:45 forrest was worried I was going to spend my whole morning looking through PRs.
21:45 forrest whytewolf, Welcome to most IRC channels unfortunatelly
21:45 forrest openstack is especially bad though
21:45 breakingmatter joined #salt
21:46 forrest Granted I did a whole talk on how contributing to openstack is super hard, so I'm biased.
21:46 jaybocc2 joined #salt
21:47 whytewolf yeah. the entired time i have been in that channel i have seen almost 0 involovment from anyone.
21:47 forrest :(
21:48 whytewolf beardedeagle: i just noticed something doens't look right. look at the rendered data from file /srv/reactor/docker/update.sls it is missing the pillar keyword
21:48 forrest I get spoiled in here since people are usually quick to respond, probably doesn't help my salt consulting out at all but whatever, I'll just blame murrdoc for stealing the food off my table.
21:49 beardedeagle I thought that is what the - kwarg: pillar was doing
21:49 * forrest trolls murrdoc
21:49 whytewolf lol. you should start charging for answering questions in here.
21:49 whytewolf beardedeagle: the reactor should still have the pillar keyword.
21:49 forrest 'I know the solution, square pay me please'
21:50 forrest That would be pretty shitty of me.
21:50 racooper trying to get a jinja if working in a conf file. does this look right? {% if ['mysql', 'mysql55'] in grains['roles'] %}
21:50 ljt joined #salt
21:50 otter768 joined #salt
21:50 forrest racooper, Hmm, does that check acept a list formatted like that? Did you test it?
21:51 pdayton joined #salt
21:51 * whytewolf isn't sure that in compares 2 lists
21:51 nafg joined #salt
21:51 forrest neither am I, I'd usually use an or in that situation.
21:51 ljt joined #salt
21:52 beardedeagle @whytewolf: so targets: {{ pillar['postdata.targets'] }} ?
21:53 murrdoc forrest:  hey
21:53 forrest racooper, A quick google search doesn't turn up shit
21:53 forrest murrdoc, hey
21:53 murrdoc i dont care about your couch
21:53 forrest I know
21:53 forrest it's okay
21:53 murrdoc eff yo couch
21:53 murrdoc :P
21:53 iggy forrest: murrdoc only works with venmo
21:53 whytewolf beardedeagle: no. you need to find why the pillar keyword isn't in the render. right now you have - kwarg: targets: tldweb1api*
21:53 forrest :D
21:53 murrdoc i was offline all week last week
21:53 forrest murrdoc, I know you were
21:53 murrdoc kk
21:54 racooper yeah I know about the lack of google results. it doesn't appear to do anything, not even an error message.
21:54 mkjgore joined #salt
21:54 forrest iggy, That's not acceptable, those guys are a delegate of paypal
21:54 forrest racooper, Try an or
21:54 forrest I don't know if you can do that unless you loop
21:54 mkjgore hey folks, just curious but state.orchestrate searches for orchestration files in the same directory where states are set to be stored?
21:54 forrest so a for loop to check
21:55 iggy mkjgore: yes
21:55 lexter joined #salt
21:55 forrest iggy, Doesn't it just use the root dir? All the examples use /srv/salt/orch
21:55 whytewolf forrest: nope it uses file_roots
21:56 forrest whytewolf, weird
21:56 racooper forrest, the "or" worked.  thanks.
21:56 forrest racooper, You got it.
21:56 forrest That will be 19.99 please.
21:56 whytewolf lol
21:56 forrest :P
21:56 racooper heh.
21:57 forrest murrdoc, iggy, now that you're both here, should we consider asking whiteinge to approve a few more people for the moderator group on the formulas repo? It's getting to be a lot of work merging/reviewing everything
21:57 forrest granted there are a good number of people in the group already who don't do that stuff
21:57 mkjgore iggy: TY!
21:59 wych joined #salt
21:59 forrest Especially since GitHub hasn't implemented my change to the repo orgs, if it isn't caught in the notifications, good chance it doesn't get seen sadly
22:01 TOoSmOotH joined #salt
22:02 beardedeagle @whytewolf: thanks for the point. got it fixed and working.
22:02 MasterNayru joined #salt
22:02 whytewolf beardedeagle: no problem, glad to help
22:02 onlyanegg joined #salt
22:05 murrdoc forrest:  only if we kick out the slackers
22:05 kitplumm_ joined #salt
22:05 forrest murrdoc, I mean there are 43 people marked as contributors, which have the ability to merge PRs
22:06 forrest or is it only the maintainers that can? I can't remember.
22:06 otter768 joined #salt
22:06 forrest nope looks like contributors can
22:06 forrest okay
22:06 forrest I don't really want to 'kick' anyone
22:07 forrest but it would really help if there were a few more people around to review PRs.
22:07 forrest It's approaching that 'annoyance' level as part of my day which is around the 30 minute mark
22:07 forrest Shit adds up.
22:08 Andre_ks how do you add a if elif conditional in a file.managed file ?
22:08 forrest Andre_ks, {% if blah %} \n {% elif blah %} {% endif %}
22:08 Andre_ks Good news is I got the pillars to work now!
22:09 Andre_ks forrest: for some reason it fills the file with that syntax and not what the conditional would do
22:09 whytewolf Andre_ks: by adding - template: jinja to the file.managed:
22:09 forrest Andre_ks, because you didn't set - template: jinja in the file.managed section
22:09 forrest whytewolf, Speeeed
22:09 * whytewolf steals forrest's 19.99
22:09 RandyT_ Greetings, I'm trying to figure out how to do something if a user account exists.
22:09 forrest nooooo
22:10 forrest whytewolf, ^
22:10 ekristen joined #salt
22:10 forrest RandyT_, You'd want to have salt add the user account in most situations, otherwise you'd need to do something like a cmd.run where you check via grep or something, and act from there.
22:10 RandyT_ Trying to avoid the approach of persisting the action to pillar once it has ran..
22:10 Andre_ks thanks!
22:11 Andre_ks it's trying to parse now
22:11 RandyT_ actually trying to rename user and not do it repeatedly if the user does not exist...
22:11 forrest RandyT_, Using a combo of user.absent, and user.present for the existing user isn't an option?
22:11 Andre_ks forrest:   {% elif %}    <======================
22:11 Andre_ks fails there
22:12 onlyanegg joined #salt
22:12 forrest Andre_ks, Probably some logic above that line that is causing the actual problem
22:12 whytewolf Andre_ks: elif needs another if condition. you want else if you don't want a condition there
22:12 Andre_ks {% if grains['fqdn'].startswith('i2-d-proxy') %}               simple_allow_groups = linuxadmins, apidevs               {% elif %}    <======================               simple_allow_groups = linuxadmins               {% endif %}
22:12 Andre_ks that's the full conditional
22:12 Andre_ks wonder...
22:12 Andre_ks oh yea!!!  Else!
22:12 forrest yep
22:13 charli joined #salt
22:13 TOoSmOotH joined #salt
22:13 RandyT_ forrest: neither of those option just test for existence... which is what I would rather do...
22:13 Andre_ks woop woop!
22:13 Andre_ks wohoo!
22:13 Andre_ks works!
22:13 Andre_ks thanks guys!
22:14 forrest RandyT_, You could use states.test: https://docs.saltstack.com/en/develop/ref/states/all/salt.states.test.html
22:14 forrest RandyT_, There isn't a state JUST to check if a user exists, or at least not as far as I know.
22:14 murrdoc `but it would really help if there were a few more people around to review PRs.`
22:15 forrest murrdoc, Yes
22:15 whytewolf RandyT_: what exactly are you trying to do?
22:15 murrdoc well send out an email saying, hey if you d rather not help with merging
22:15 murrdoc then u will be escorted out at end of month from now
22:15 forrest murrdoc, I think we should probably approach Seth about it first since he's our SaltStack contact.
22:15 RandyT_ whytewolf: renaming an administrator account on windoze.
22:15 forrest murrdoc, I don't want to escort anyone out.. That's both uncool and unprofessional. Makes people feel alienated.
22:15 murrdoc its not
22:15 RandyT_ Need some conditional to only run if Administrator exists..
22:15 forrest If they've made any sort of contribution it's fine for them to be part of the group
22:15 murrdoc its pretty much fair
22:16 forrest I don't think it is
22:16 murrdoc all clutter must die
22:16 forrest I feel like you are trolling
22:16 forrest RandyT_, How is the admin account added? Could you set a grain or something?
22:16 whytewolf RandyT_: {% if 'Administrator' in salt.user.list_users() %}
22:17 RandyT_ forrest: the admin exists as part of standard ec2 provisioning.
22:17 RandyT_ whytewolf: that looks like what I need...
22:17 antpa joined #salt
22:18 murrdoc forrest:  no i am not
22:18 murrdoc i hate clutter
22:18 murrdoc branches, people
22:18 melboi joined #salt
22:19 forrest murrdoc, Ehh, restructuring again seems unrealistic.
22:19 melboi how do folks keep their salt minions up to date? do you upgrade your salt-minions via salt-master?
22:19 murrdoc no doubt
22:19 melboi I was thinking about then but then if it does not work for whatever reason then that salt-minion drops off, not contollable via master
22:19 murrdoc but if u cant contribute to a product
22:19 murrdoc feel free to leave
22:19 melboi unless i am baby sitting the minions a handful at a time and keeping track of a minion that returned errors
22:19 murrdoc again imho
22:19 murrdoc not something we should try to do
22:19 forrest murrdoc, Yeah but the contributor group is literally just people who have contributed. It's just due to shitty github perms that things are structured like they are.
22:20 RandyT_ whytewolf: just what I needed... tks
22:20 forrest murrdoc, This is why I was thinking about asking whiteinge about it to see what his opinion is. It's really just you, me, iggy, and occasionally one or two other people who actually merge/review PRs.
22:20 forrest whytewolf, Good catch, I totally forgot about user.listusers()
22:22 whytewolf melboi: some use the salt formula. some use custom states that update the minion some just go the difficult route and update by hand. cause they are nuts
22:22 wych joined #salt
22:22 whytewolf some don't update
22:24 pdayton joined #salt
22:24 melboi is salt able to rrestart salt-minion service now, without any issues? A while back that was problematic. does it also work pretty well on windows hosts? Unfortunately I have to support windows as well
22:25 subsignal joined #salt
22:25 CeBe1 joined #salt
22:27 whytewolf melboi: there have always been tricks to it. like adding an at job to restart the minion. on windows i don't know those tricks
22:27 forrest I still use the at method personally for linux
22:28 iggy forrest: the big problem is reviewing imo
22:28 forrest iggy, Yes I agree.
22:28 forrest Honestly I don't do as good a job as I should sometimes
22:28 pdayton joined #salt
22:28 forrest Would really help if there was a good way to test all the states against every OS
22:29 forrest I wish we could get the jenkins functionality they have in the main repo in the formulas.
22:29 iggy it could be done (one of my talk ideas is just htat)
22:29 forrest Did you talk to Seth about it already?
22:29 forrest I mean they should really implement it, not us, lol
22:29 forrest They have testers and such
22:30 forrest so time to get them involved more I think
22:30 iggy I don't see that happening
22:30 forrest Well I'm not going to spend time implementing it
22:30 kitplummer joined #salt
22:30 forrest or setting up the infra.
22:30 aphor the infra is the showstopper..
22:30 forrest Salt has it all in house already, there's no reason we should set it up or support it
22:30 eliasp argh, there are days, when I could start endless rants about botched merges/branches in the salt repo… https://github.com/saltstack/salt/issues/29117#issuecomment-159040554 is caused somewhere between 57a167f and c66491a in `develop` which should be distance of 7 commits… but it looks like inbetween there was a detached branch force-pushed or so… there's no proper connection in the git-graph between both
22:30 saltstackbot [#29117]title: `file.serialize` renders Python unicode string prefix into JSON data | The following SLS renders this Python unicode-prefixed data within a JSON structure: `u'4.0.12'`:...
22:31 forrest eliasp, lol
22:31 aphor eliasp: yeah... NEVER rebase a pull request branch.
22:31 mosen joined #salt
22:31 eliasp it could have taken me 5 minutes!!! to find the bad commit… but no! now I've spent ~2,5h on it and still didn't find it
22:32 eliasp there's a special place in hell for people doing these kind of things
22:32 forrest eliasp, Just find who did the deatched force push
22:32 forrest and blame them
22:32 iggy force push = fired
22:33 forrest Or create an issue 'Asshole force pushed, missing history, please resolve'
22:33 kitplumm_ joined #salt
22:33 aphor my job is eCommerce infra/DevOps consultant, but I end up teaching git a lot.
22:33 * eliasp teaches git everyday to people who were uncapable of even dealing with SVN… that's just tooo much fun
22:34 forrest aphor, I'm still shocked when I learn people aren't using git
22:34 eliasp the only thing that helps: very strict policies, receive-hooks etc.
22:34 forrest eliasp, I find a general respect for your fellow developers/admins helps too
22:35 aphor https://youtu.be/NITBfc1EOBo?t=28s <-- You won't touch it, will you?
22:35 racooper our in-house folks are using subversion...works much better than git for their purposes. they don't really do distributed development. and having consecutively numbered commits is much simpler.
22:35 eliasp aphor: ;)
22:35 iggy https://s-media-cache-ak0.pinimg.com/736x/0f/f4/05/0ff4052b6b3ff915e04279989a2d52f8.jpg
22:35 kitplummer joined #salt
22:36 forrest lol
22:36 Val_ joined #salt
22:36 eliasp iggy: I printed and hanged this on the wall of the dev department… didn't help so far, they still try to get killed :)
22:36 iggy same concept for "person who has to dig through your commit history"
22:37 aphor OK. Quittin' time!
22:37 Val_ Hi !
22:38 Val_ I'm trying to make a schedule with Salt, I don't Know where I go wrong.
22:38 kitplumm_ joined #salt
22:39 whytewolf Val_: without more info niether do we
22:39 Val_ can someone take a look ? http://pastebin.com/EZAJfarM
22:40 Val_ sorry, i'm finishing my pastbin :p
22:40 Val_ I have create my schedule, but it look like disabled
22:41 iggy for future reference, gist supports multiple files per paste (and doesn't bitch about me running adblockers)
22:42 Val_ Ok noproblem
22:42 quix joined #salt
22:42 MasterNayru joined #salt
22:44 whytewolf Val_: https://gist.github.com/whytewolf/14defe92cf84f6d7bf8c
22:45 Val_ Thanks for u answer
22:45 Val_ Nothing to do to apply it ?
22:46 Val_ the schedule.module is separated ?
22:46 Val_ salt '*' module.enable ?
22:46 whytewolf nope if you are setting it up in pillar you just need to pillar_refresh and it will be picked up by the minion
22:48 Val_ thanks a lot, it's work !
22:48 Val_ =)
22:48 whytewolf it is about the format. basicly you are setting the schedule minion config. but through pillar
22:50 TOoSmOotH joined #salt
22:51 Val_ yeah thanks =)
22:51 Val_ we can schedule cmd.run rather than state.sls ?
22:52 whytewolf Val_: yes. function just becomes cmd.run and the line under args becomes the command to run so - server.logs becomes - 'echo i am a command to run'
22:53 Val_ nice
22:53 Val_ ty
22:53 Val_ A last question
22:53 Val_ state.apply & state.highstate are pretty similar ?
22:54 Val_ highstate => apply all sls from top.sls matching minions !?
22:54 murrdoc yes
22:54 whytewolf state.apply is a wrapper for state.highstate and state.sls
22:54 forrest Val_, state.apply is just state.sls, and state.highstate rolled into one
22:54 forrest Val_, If you don't specify a state after state.apply it will run a highstate
22:54 murrdoc terribly confusing
22:54 forrest murrdoc, Yeah I agree, bad naming decision
22:55 whytewolf they should have called it state.thatthingtorunwhenyoudontknowwhattorun
22:55 forrest whytewolf, lol
22:55 Val_ ahah
22:55 Val_ thansk for answers guys
22:55 forrest For sure
22:56 Val_ Salt'IRC is pretty welcome
22:56 forrest We try
22:56 forrest Just have to deal with some bad jokes
22:56 Val_ like ?
22:56 murrdoc yo face
22:56 forrest like when I ask people to pay me money for answering their questions
22:56 murrdoc i ask for pull requests
22:56 forrest or even worse than your face, murrdoc's face
22:56 murrdoc to saltstack formulas
22:56 forrest shit is a horror show
22:57 forrest lol
22:57 ashirogl joined #salt
22:57 murrdoc yo mama face
22:57 forrest weak
22:57 Val_ Aha nice forest
22:57 onlyanegg joined #salt
22:57 iggy forrest: now you know what I have to deal with on a regular basis
22:57 forrest iggy, You knew what you were getting into before you accepted the job
22:57 murrdoc deez nuts
22:58 murrdoc :D
22:58 murrdoc keeping it highschool
22:58 forrest Yeah that's a bit much
23:01 TOoSmOotH joined #salt
23:06 aidin joined #salt
23:07 fsteinel joined #salt
23:10 Edgan iggy: Apparently there is an explicit reload_grains as of Nov 2014.
23:10 Edgan iggy: and reload_pillar, https://github.com/lyft/salt/commit/5e777c0e1a6eebec827bac666b360341c187cea8
23:12 nafg salt-ssh is giving me:
23:12 nafg [ERROR   ] JSON Render failed for:
23:12 nafg Permission denied, no authentication information
23:12 nafg [ERROR   ] No JSON object could be decoded
23:13 nafg Any clue what that means?
23:14 Val__ joined #salt
23:15 nafg okay I set level to trace and i'm a bit more on track B"H
23:15 nafg "mysql_database_|-db-present_|-jj-asm_|-present": {
23:15 nafg "comment": "MySQL Error 1045: Access denied for user 'root'@'localhost' (using password: NO)"
23:15 Edgan nafg: What form of ssh auth are you using? password, ssh key, ssh key forwarding?
23:16 colinstgeorge_ yo everyone.. so I've got salt minions properly integrated into foreman and checking in / updateing host checkin... but i cannot get grains to load into foreman (i know this is the salt room)....
23:16 colinstgeorge_ anyone have any hints?
23:16 colinstgeorge_ i have :upload_grains: True in /etc/salt/foreman.yaml
23:16 Edgan nafg: your second error is that you didn't specify a mysql password
23:16 brianfeister joined #salt
23:16 nafg Edgan: yup. Well actually, that someone made root@localhost require a password
23:17 nafg In general if one task fails, will salt run further but unrelated tasks?
23:20 mohae joined #salt
23:20 Edgan colinstgeorge_: ask stbenjam_ in #theforeman. I think that is managed by a cron job that uploads the reports.
23:20 giantlock joined #salt
23:20 Edgan nafg: by default, no, but you can set failhard: True in /etc/salt/master. I think it should be the default.
23:20 colinstgeorge_ ok i will thanks Edgan... i do have the cronjob which uploads the reports, but grains arent included...
23:21 iggy nafg: yes (barring failhard use)
23:21 Edgan colinstgeorge_: You might try running it manually, or checking the log
23:21 colinstgeorge_ well there is no command to include grains in the cron job.. so idk how to run it manually (the grain import that is)
23:21 colinstgeorge_ asking stbenjam
23:23 otter768 joined #salt
23:25 Edgan colinstgeorge_: I was thinking just monitor the cron job and see if it says anything about grains
23:25 Edgan colinstgeorge_: stbenjam is the author of the foreman plugin
23:28 kitplummer joined #salt
23:31 kitplumm_ joined #salt
23:33 kitplummer joined #salt
23:34 TOoSmOotH joined #salt
23:34 colinstgeorge_ that's pretty awesome.. ive been coming accross alot of his google threads
23:35 colinstgeorge_ Edgan: looks like i need to send creds or token or somethign with foreman-node
23:35 colinstgeorge_ i can't run it normally, but it works within the system
23:45 larsfronius joined #salt
23:47 onlyanegg Hey, does anyone run salt for openstack? Are there good salt repos to work from?
23:48 TOoSmOotH joined #salt
23:48 subsignal joined #salt
23:50 Gi0 joined #salt
23:54 Guest35778 joined #salt
23:58 morissette anyone ever come across this issue for pkg.installed? http://paste.linux.chat/view/4e3d9125
23:59 diegows joined #salt

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