Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-10-03

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

All times shown according to UTC.

Time Nick Message
00:03 om joined #salt
00:06 HotSnowstorm joined #salt
00:27 cyteen joined #salt
00:29 om joined #salt
00:29 mpanetta joined #salt
00:30 Satyajit joined #salt
00:33 jdipierro joined #salt
00:33 om joined #salt
00:35 amcorreia joined #salt
00:44 Kevin joined #salt
00:46 jas02 joined #salt
00:47 nikogonzo joined #salt
00:54 jimklo joined #salt
00:55 krymzon joined #salt
01:02 sjmh joined #salt
01:05 jdipierro joined #salt
01:40 alvinstarr joined #salt
01:40 sebastian-w joined #salt
01:46 sleblanc joined #salt
01:46 sleblanc hello, I would like to understand how to use file.line in this way: I want to add gpu_mem=256 to file /boot/config.txt. If the line exists, I want to replace it, otherwise I want to insert this line in any place in the file
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.8.12, 2016.3.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
01:49 hemebond sleblanc: Can't you just use a regex for match?
01:50 sleblanc hemebond, I am already using a regex (matching on ^gpu_mem=)
01:50 edrocks joined #salt
01:50 sleblanc should I use mode "replace" or "ensure"? what if the line is not present already?
01:50 hemebond Replace I think.
01:51 hemebond Oh.
01:51 hemebond Try ensure first.
01:51 jaybocc2 joined #salt
01:51 hemebond If it doesn't work try replace :-)
01:51 sleblanc well, replace says "No changes needed to be made" (lie) while ensure asks me to supply a before/after param
01:52 sleblanc oh, I think I can simply use file.replace…
01:52 sleblanc with append_if_not_found=True
01:54 sleblanc got it! thanks for your suggestions
01:55 jimklo joined #salt
01:55 krymzon joined #salt
01:59 sandro__ joined #salt
02:06 jaybocc2 joined #salt
02:07 KevinA_ joined #salt
02:23 HotSnowstorm I'm new to Salt and I'm trying to only use a part of the state file if a directory exists, I'm doing it like this, but it doesn't seem to work: {% if salt['file.directory_exists']('/example/path/{{folder_name}}') %} Can anyone tell me why? :)
02:23 lilvim joined #salt
02:24 HotSnowstorm I guess it has something to do with the {{folder_name}} variable, but I have no idea what the solution is. :/
02:29 Kevin joined #salt
02:42 evle joined #salt
02:47 jas02 joined #salt
02:56 jimklo joined #salt
03:16 jdipierro joined #salt
03:17 krymzon joined #salt
03:18 _JZ_ joined #salt
03:19 sjmh joined #salt
03:48 jas02 joined #salt
03:52 edrocks joined #salt
03:54 systo joined #salt
03:56 jdipierro joined #salt
03:57 jimklo joined #salt
03:59 DEger joined #salt
04:01 barmaley joined #salt
04:10 DEger joined #salt
04:18 jaybocc2 joined #salt
04:19 DEger joined #salt
04:22 om joined #salt
04:30 DEger joined #salt
04:31 mpanetta joined #salt
04:34 jaybocc2 joined #salt
04:43 DEger joined #salt
04:48 DEger joined #salt
04:49 jas02 joined #salt
04:58 jimklo joined #salt
04:59 DEger joined #salt
05:09 rdas joined #salt
05:10 DEger joined #salt
05:20 DEger joined #salt
05:32 om joined #salt
05:34 DEger joined #salt
05:41 DEger joined #salt
05:41 abhi joined #salt
05:44 abhi hi guys,
05:44 abhi I have one question
05:44 abhi I am using salt cloud for deploying master and minion on aws. Ihave one salt master and two minion on it. Apart from that I want to deploy minion on machine that is not in cloud. Would master on cloud can connect to newly created minion
05:49 jas02 joined #salt
05:52 DEger joined #salt
05:54 edrocks joined #salt
05:58 jimklo joined #salt
06:00 hemebond abhi: The master does not connect to minions during normal use; the minions connect to the master. However when using Salt Cloud to create an instance the Salt Cloud source must be able to SSH to the new instance.
06:00 abhi my mistake
06:01 abhi minion connects to master
06:01 abhi on aws minion can connect to master
06:01 abhi but lets say if master is on aws and minion is on local machine ...can they talk
06:02 DEger joined #salt
06:02 hemebond If you can connect from the minion to the master on port 4505 and 4506, then yes :-)
06:02 abhi but aws master instance will have private ip
06:03 hemebond Then no :-)
06:03 hemebond There is nothing special about the connection.
06:03 abhi do i need to give master public ip
06:03 hemebond That would be the easiest way to enable connectivity.
06:04 abhi or is there any setting on minion so that by using private key minion can connect
06:05 abhi as aws minion uses the .pem key to connect to master
06:05 hemebond If you don't give the master a public IP then there is no way to connect.
06:06 hemebond Regardless of the master config.
06:06 hemebond There will be no network connectivity.
06:06 hemebond The alternative is to use a VPN to connect your local network with the VPC.
06:07 abhi for the alternate way: is there any example
06:07 abhi so that I can implement it
06:08 hemebond It's just a regular VPN.
06:08 hemebond You would need to search AWS documentation on creating a VPN to a VPC.
06:10 abhi thank you
06:10 hemebond Good luck :-)
06:12 DEger joined #salt
06:22 DEger joined #salt
06:28 DEger joined #salt
06:30 yuhlw____ joined #salt
06:33 jimklo joined #salt
06:38 ivanjaros joined #salt
06:40 haam3r joined #salt
06:40 yuhlw____ joined #salt
06:41 jas02 joined #salt
06:42 DEger joined #salt
06:45 jaybocc2 joined #salt
06:49 dariusjs joined #salt
06:51 Rumbles joined #salt
06:52 DEger joined #salt
06:54 haam3r joined #salt
07:01 DEger joined #salt
07:01 jaybocc2 joined #salt
07:02 adb-mz joined #salt
07:05 DarkKnightCZ joined #salt
07:08 mskjeret joined #salt
07:09 mskjeret Is there anyone that has used the slack engine to execute commands from slack?
07:10 DEger joined #salt
07:10 mskjeret I have problems that the bot user it tries to connect is not online. There is no indication in the log that the master has tried to connect or failed to connect.
07:25 DEger joined #salt
07:30 DEger joined #salt
07:33 sgo_ joined #salt
07:37 Hybrid joined #salt
07:41 jas02 joined #salt
07:44 krymzon joined #salt
07:44 ronnix joined #salt
07:46 haam3r joined #salt
07:48 JohnnyRun joined #salt
07:49 raeven_ joined #salt
07:52 q1x joined #salt
07:56 teryx510 joined #salt
07:56 edrocks joined #salt
08:01 Couch joined #salt
08:02 glyf joined #salt
08:06 lero joined #salt
08:07 N-Mi joined #salt
08:07 N-Mi joined #salt
08:07 cyborg-one joined #salt
08:13 mamalos joined #salt
08:13 mamalos hi everybody
08:15 jas02 joined #salt
08:16 s_kunk joined #salt
08:18 adb-mz hi all, maybe you will help me. I have a problem with yaml notation for saltstack file.line module. I'm trying to inject one line with indentation but in the end leading spaces are striped away. So the question is how to insert indented line ?
08:19 glyf joined #salt
08:19 hemebond adb-mz: Even if you put your value in quotes?
08:21 s_kunk joined #salt
08:23 adb-mz I will recheck this for a few moments
08:23 Hipikat joined #salt
08:26 ronnix joined #salt
08:26 Rumbles joined #salt
08:32 mpanetta joined #salt
08:35 ozux joined #salt
08:35 Couch what's the recommended way to call salt modules from hosts other than the saltmaster ?
08:38 ozux__ joined #salt
08:38 jas02 joined #salt
08:41 hemebond Couch: Call in what way?
08:41 hemebond There's salt-api and the Salt event bus.
08:41 hemebond Those are probably the recommended methods.
08:42 Couch hemebond, e.g. run salt.modules.puppet on a remote host from any other host
08:42 hemebond salt-api I reckon.
08:45 RealMurphy joined #salt
08:45 Couch hemebond, where can I find some documentation on that ?
08:45 hemebond Couch: https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html
08:46 Couch hemebond, thanks!
08:46 hemebond cherrypy is easy to get up and running.
08:46 hemebond ūüĎć
08:46 impi joined #salt
08:49 DarkKnightCZ joined #salt
08:50 RealMurphy Hi, I've just upgraded from 2015.11 to 2015.12 to hopefully get around some memory leaks as well as freeing of file descriptors left over, but suddenly our external sqlite3 queries don't work anymore: OperationalError: near "?": syntax error
08:50 RealMurphy https://gist.github.com/carsten-AEI/ca3be8512037f9a6ce78b61daf2b6132 and https://gist.github.com/carsten-AEI/70b465bca3e17051994184e4377cdae8 for more details
08:55 Reverend joined #salt
08:56 dariusjs joined #salt
08:56 hemebond RealMurphy: Is ? replaced with a list?
08:56 Reverend sup
08:57 RealMurphy hemebond: good question, I'm still trying to wrap my head around is as the author of this is currently on vacation (which technically I'm as wlel ;))
08:57 hemebond It looks like it's a tuple.
08:58 hemebond The query seems to make sense though I've not used this myself.
08:58 AndreasLutro RealMurphy: looks like a bug to me
08:59 RealMurphy the sls file is also a bit convoluted
09:00 RealMurphy AndreasLutro: so, shall I file this as a regression at the github project?
09:00 hemebond Have you tried the latest release?
09:01 AndreasLutro very odd though, there haven't been any changes to the sqlite3 pillar module
09:01 RealMurphy hemebond: not yet, need to stand up a test server first and see if the error goes away (and hope nothing else will/would break)
09:01 AndreasLutro but yeah it must be a regression
09:02 RealMurphy OK, I'll be back at my test server going to 2016.3.3
09:02 s_kunk joined #salt
09:02 s_kunk joined #salt
09:05 AndreasLutro RealMurphy: try a couple of things first.. change the WHERE IN to a regular WHERE
09:05 AndreasLutro or change "WHERE IN ?" to "WHERE IN (?)"
09:06 AndreasLutro do you know sql?
09:07 AndreasLutro also when you upgraded salt are you sure you didn't also upgrade python or python-sqlite?
09:07 hemebond I wonder if debug logging would give the final SQL statement.
09:07 RealMurphy AndreasLutro: I know SQL enough to shoot myself in the foot too often ;)
09:08 AndreasLutro doesn't look like it
09:08 RealMurphy I'm just comparing notes and just realized we sent a merge request to change something in pillar/sql_base.py  and I'm currently trying to figure out if that is just causing it
09:08 dariusjs joined #salt
09:09 AndreasLutro well nothing's been done there since december 2015
09:09 AndreasLutro or in sqlite3.py
09:09 AndreasLutro in v2015.8.12 at least
09:09 AndreasLutro so I don't think there's a problem there
09:10 catpig joined #salt
09:10 RealMurphy yeah it seems we patched that oursevels and I just need to reapply that one again *blush*
09:11 adb-mz homebond: quoted leading spaces does not work
09:11 AndreasLutro hm ok
09:11 AndreasLutro what was your patch?
09:11 oliver_are joined #salt
09:11 adb-mz file.line:
09:11 adb-mz - mode: Ensure
09:11 adb-mz - content: "  metricsPublicURL: \"https://hawkular-metrics.{{ pillar['cluster_domain'] }}/hawkular/metrics\""
09:11 adb-mz - after: "assetConfig:"
09:12 adb-mz - watch_in:
09:12 adb-mz - service: origin-master
09:12 hemebond adb-mz: You should use an external paste service for code and config stuff.
09:12 adb-mz ok
09:12 RealMurphy AndreasLutro: https://gitlab.aei.uni-hannover.de/atlas-admins/saltstack/compare/develop...aei (can you see that one?)
09:12 AndreasLutro nope
09:12 AndreasLutro You need to sign in or sign up before continuing.
09:13 AndreasLutro didn't you make a merge request on github? could just link that
09:14 RealMurphy At least I thought my collegue did that, let me check
09:15 adb-mz homebond: http://pastebin.com/raw/6ddwTuFh
09:15 hemebond adb-mz: Throw some single quotes around the string too :-)
09:15 hemebond (seriously)
09:15 AndreasLutro adb-mz: if you look at the documentation for file.line there's an argument named "indent" you may want to check out
09:16 RealMurphy AndreasLutro: Nope, not seeing it - good news first - with "our" patch the SQL statement does work again
09:17 hemebond Ha, I thought I'd mentioned that but it was someone earlier.
09:17 adb-mz yea i saw this but. "indent -- Keep indentation with the previous line.". Previous line is not indented
09:17 hemebond or rather, someone earlier when I saw that option.
09:17 AndreasLutro RealMurphy: it seems odd to me that it's not working in the first place
09:17 AndreasLutro adb-mz: why the "but"? set it to false
09:17 RealMurphy AndreasLutro: https://gist.github.com/carsten-AEI/794ba2f468b8615fa4fd00ddedd4b06a
09:18 RealMurphy I'l talk with my collegue to possibly make this a pull/merge request
09:18 RealMurphy AndreasLutro: Unless you think this a big blunder
09:20 AndreasLutro hm..
09:21 AndreasLutro the patch itself makes sense but I'm not sure if that's how external pillars are meant to work with nodegroups
09:21 RealMurphy AndreasLutro: I guess we are open for discussion how to better implement this, to him it looked like the best/easiest way
09:22 adb-mz I added: - indent: False  but it didn't change anything
09:22 hlub hmm, I have a bunch of directory paths in a list. I'd like to extract all parent directories for them and modify permissions of those parents. I could use file.dirname to get the parent paths but the problem is how to handle those parents only ones (e.g. paths /a/b and /a/c has only one parent /a).
09:22 hemebond Try single quotes in addition to double quotes.
09:23 AndreasLutro RealMurphy: if I were you I'd probably just write my own external pillar to use the nodegroup extra thing you're doing
09:25 RealMurphy AndreasLutro: That would at least get around patching the packaged files after an upgrade (considering my brain already removed that necessity after mere two months)
09:27 vlad__ joined #salt
09:28 RealMurphy AndreasLutro: Anyway, thanks for the help and patience for a local problem. Then let's see if 2015.8.12 is better in terms of memory management (as 2015.8.11 started to go over 40GByte RAM usage when updating many minons)
09:32 adb-mz still problem http://pastebin.com/raw/1WvZcKQW
09:39 mjimeneznet Hello!, I'm trying to use a wildcard into a if conditional. {% if 'mysql0*' in grains['id'] %} but doesn't match. I need to write full fqdn
09:39 mjimeneznet do you know why?
09:39 cyborg-one joined #salt
09:39 hemebond adb-mz: At least the spaces are still there :-D
09:41 adb-mz yea :)
09:41 jas02 joined #salt
09:41 hemebond What if you replace the double quotes with single quotes?
09:41 adb-mz maybe i should strip them by second module ;)
09:41 hemebond And replace \" with just "
09:42 hemebond https://groups.google.com/forum/#!topic/salt-users/FBZhJf3WXqU
09:42 RealMurphy mjimeneznet: what if you just leave the asterisk?
09:42 RealMurphy mjimeneznet: i.e. {% if 'mysql0' in grains['id'] %}
09:42 hemebond Yeah, Jinja doesn't support wildcards like that.
09:43 adb-mz singel quoted string is without indentation
09:43 mjimeneznet RealMurphy: mmm really? I have a lot of wildcards running! Now I'm scared
09:43 RealMurphy mjimeneznet: According to http://jinja.pocoo.org/docs/dev/templates/ the in operator just checks if the left is contained in the right
09:44 hemebond Could use startswith()
09:44 hemebond (for this particular case)
09:44 mjimeneznet Nice, now I have to review entire salt repo to fix that :/
09:44 hemebond Or a slice.
09:44 mjimeneznet thanks for your help :)
09:45 hemebond adb-mz: Going to write up a test file and test it myself.
09:45 adb-mz homebond: ok thx
09:46 adb-mz homebound; this address general quiestion: how to edit yaml with yaml :)
09:47 hemebond adb-mz: Generally I would manage the entire file and just render a regular dict as yaml using the yaml filder.
09:47 hemebond *filter
09:47 hemebond {% {'foo': 'bar'}|yaml %}
09:47 hemebond I always try to just manage the entire file instead of manipulating lines.
09:50 lovecraftian joined #salt
09:52 hoonetorg joined #salt
09:53 ronnix joined #salt
09:58 edrocks joined #salt
09:58 Nagri_ joined #salt
09:58 Nagri_ Hi
09:58 Nagri_ Is it neccessary to provide salt-master finger in salt minion config file to start the communication between salt master and minion ?
09:59 hemebond no
09:59 hemebond That's just an extra security to make sure the minion is talking to the correct master when authenticating for the first time.
10:00 Nagri_ Thank you :D
10:02 hemebond adb-mz: The file.line module strips whitespace :-(
10:03 giany joined #salt
10:03 giany hi, I'm using the lxc salt-cloud driver and for some reason whenever I try to set a grain in the profile that grain does not reach the minion. With other drivers (aws, softlayer) seems to work fine.
10:05 hemebond adb-mz: Have a look at https://docs.saltstack.com/en/latest/ref/states/all/salt.states.augeas.html
10:05 hemebond That's possibly a better option for editing configs if you can't just manage the entire file.
10:06 hemebond Also, I'm assuming you're going to be putting more than just that line; if not, there is a way to get it to work.
10:13 hoonetorg joined #salt
10:32 whitenoise the salt documentation does not seem to indicate that i can use an SLS file as an external pillar
10:32 whitenoise is this possible?
10:35 DarkKnightCZ joined #salt
10:37 AndreasLutro no, whitenoise
10:37 AndreasLutro an external pillar is by definition a python module/function
10:38 whitenoise AndreasLutro: i see
10:38 whitenoise AndreasLutro: so I'm trying to put secrets in a separate git repo, then check that git repo out somewhere on the system, and add that location into extension_modules, and then reference it as a ext_pillar. all that is fine, but
10:39 whitenoise most of the secrets are just YAML files, but one of them does logic.
10:39 whitenoise it checks the fqdn grain to give back certain data in a YAML that it imports.
10:39 whitenoise so to accomplish this, would I have to write my own module?
10:41 AndreasLutro sounds like you could just add the directory of your secret stuff as a regular pillar directory alongside /srv/pillar
10:41 AndreasLutro or using gitfs
10:42 whitenoise AndreasLutro: i cannot do that for data separation reasons with developers
10:42 jas02 joined #salt
10:42 AndreasLutro that makes no sense
10:42 AndreasLutro why can you make an external pillar but not add an extra directory?
10:43 whitenoise i COULD make the secrets an SLS in the same directory
10:43 whitenoise but I'm exposing the base salt directory to developrs
10:43 whitenoise so the secrets have to be segregated into another repo
10:43 AndreasLutro I said you could add a *separate* directory
10:43 AndreasLutro how are you pulling in your default pillars? /srv/pillar  or gitfs?
10:43 whitenoise oh, yes, you mean a git repo within a git repo
10:43 AndreasLutro no
10:44 whitenoise they are pulled in from a git repo, and then placed in /srv/pillar for default pillars
10:44 AndreasLutro okay so set up /srv/secret_pillar to do the same with your other git repo
10:44 AndreasLutro and configure salt to also read pillars from that directory
10:45 AndreasLutro also look into the git_pillar external pillar
10:45 whitenoise git_pillar would work apart from that fact i'd need to do logic on parts of the data
10:45 whitenoise if it wasn't for that one secrets bit where i need logic, i could just use cmd_yaml, even
10:45 whitenoise or stack
10:46 AndreasLutro hwo does git_pillar prevent you from using logic?
10:46 whitenoise can i use an SLS with git_pillar?
10:46 AndreasLutro yes, it's just like the regular pillar setup
10:46 AndreasLutro but in git
10:46 whitenoise ah, that might be the way to go, then.
10:47 jas02 joined #salt
10:47 whitenoise there would be a slight complication with authenticating the saltmaster, but that might be able to be worked out easily enough
10:47 whitenoise it may already have keys, now that i think about it
10:48 AndreasLutro just use a read-only ssh key, make sure you use pygit2, and it should be fine
10:48 whitenoise there's also an issue with installing things from pip.
10:49 whitenoise but, we are already pulling it down to put it in /srv/, so the authentication is already worked out there most likely. we don't do that manually.
10:50 whitenoise it is done with our credentials in a deploy script, though, i don't think the saltmaster itself can authenticate.
10:50 Rumbles joined #salt
10:50 whitenoise but i'll explore that, as that would be the easiest option
10:52 whitenoise AndreasLutro: the side-by-side directory would be a git repo in a git repo. pillar, salt, etc, (everything in /srv) is a git repo...so to put something beside /srv/pillar would be a repo in a repo
10:52 Rasathus joined #salt
10:53 whitenoise unless its bared out
10:53 whitenoise that could work.
10:53 AndreasLutro okay. making all of /srv a git repo is your problem to solve :)
10:53 whitenoise i think it may be checked out and then copied over without .git files.
10:53 AndreasLutro before moving to gitfs we would git clone our combined salt repo into /root/salt and then symlink to /srv/salt /srv/pillar etc
10:54 whitenoise i'll have to look at our build script
10:54 whitenoise git_pillar would be the most beautiful though because then I could use branches and everything
11:04 izrail joined #salt
11:04 demize Hmm, that's annoying, doesn't seem to be any flexible pam formula that doesn't only support either authconfig or pam-config.
11:04 jas02 joined #salt
11:05 demize whitenoise: Just remember that git_pillar uses branches for environments, in case you were thinking of just using them like you normally would.
11:06 whitenoise demize: i already have a prod stg dev environment set...I would just mirror it I'm guessing and it would pull the appropriate branch
11:08 demize Ah, for git_pillar you specify the env in the config, was thinking of git states.
11:09 fgimian joined #salt
11:25 ronnix joined #salt
11:28 amcorreia joined #salt
11:38 Brijesh1 joined #salt
11:38 zifnab joined #salt
11:41 s_kunk joined #salt
11:42 jas02_ joined #salt
11:42 numkem joined #salt
11:50 bowhunter joined #salt
11:51 fannet joined #salt
11:52 fannet Hey everyone - I'm looking for examples on how to write a mine function with python instead of jinja/yaml - does anyone know of any examples?
11:53 AndreasLutro fannet: what do you imagine your mine function doing?
11:53 AndreasLutro maybe what you want is a custom execution module in python, which you can then call from the mine
11:54 fannet currently I have hosts which have multiple IPs bound to the same interface and I want to iterate over those IPs and assign them to proper grains
11:56 fannet basically replicate this http://pastebin.com/xJqjhWWH   with additional logic
11:57 AndreasLutro yeah you'll probably want to write a custom module and call that module instead of netowkr.ip_addrs
11:58 fannet then just have that module be my mine_function?
11:58 AndreasLutro yeah
11:59 fannet I suppose that would work but would be more elegant to be able to just ship it the way I would an SLS file
12:00 edrocks joined #salt
12:05 sgo_ joined #salt
12:06 Narfology joined #salt
12:06 jas02 joined #salt
12:12 JohnnyRun joined #salt
12:13 mpanetta joined #salt
12:15 _aeris_ joined #salt
12:19 alvinstarr joined #salt
12:19 DarkKnightCZ joined #salt
12:20 oliver_are Hi, I want to clone a repo from github, I'm keep getting this error "[ERROR   ] Directory exists, is non-empty, and force option not in use" even after making "force_clone: True" I'm not sure how to fix this
12:21 Nils- joined #salt
12:21 oliver_are my states looks like this http://pastebin.com/Bvau4W1S
12:25 SpX joined #salt
12:25 mpanetta joined #salt
12:28 edrocks joined #salt
12:42 west575 joined #salt
12:43 jas02 joined #salt
12:45 _aeris_ joined #salt
12:45 ivanjaros joined #salt
12:56 geomacy joined #salt
12:57 josuebrunel joined #salt
13:06 JohnnyRun joined #salt
13:09 DarkKnightCZ joined #salt
13:09 edrocks joined #salt
13:13 ronnix joined #salt
13:14 DEger joined #salt
13:15 dyasny joined #salt
13:15 yuhlw____ joined #salt
13:15 XenophonF wow the ads on pastebin.com are truly obnoxious
13:17 XenophonF well, i'd expect force_clone to DTRT
13:17 ronnix joined #salt
13:19 aagbds joined #salt
13:22 impi joined #salt
13:24 XenophonF oliver_are: what version of Salt are you running? you might need to set "force: True"
13:27 Brijesh1 joined #salt
13:34 CampusD joined #salt
13:39 CampusD Hi All, I had a question related to the salt scheduler, I am getting an "Unhandled exception" when trying to run scheduled events ([ERROR   ][9353] Unhandled exception running state.sls)
13:40 CampusD some details https://gist.github.com/anonymous/5226a355bf97da44a01caa0e804e93b3
13:40 CampusD any help is appreciated
13:41 CampusD By the way, running from the CLI seems to work just fine salt minion1 state.sls site1.users test=False
13:41 oliver_are XenophonF, I'm using salt 2016.3.3 (Boron)
13:43 amontalban joined #salt
13:44 oliver_are XenophonF, "force: True" is not helping to clone the repo
13:44 jas02 joined #salt
13:44 XenophonF what happens if you clone to a new directory?
13:45 west575 joined #salt
13:45 racooper joined #salt
13:49 edrocks joined #salt
13:49 scoates joined #salt
13:54 roock joined #salt
13:54 Tanta joined #salt
13:59 oliver_are XenophonF, I messed up the the machine I'm cleaning it up
14:02 XenophonF so i have my salt states broken up into separate environments: dev, test, stage, prod
14:03 XenophonF i'd like to do the same thing to my salt pillars, but i'm having a hard time wrapping my mind around targetting
14:03 XenophonF i'd specifically like to begin using "state.apply ... saltenv=stage pillarenv=stage" when doing deployments
14:04 promorphus joined #salt
14:05 heaje joined #salt
14:06 XenophonF basically, applying a GitHub Flow-like process to both states and pillar data
14:09 cscf joined #salt
14:10 oliver_are XenophonF, The reason for messing up my machine is, salt deletes the users home directory (/home/user) if the git clone fails
14:11 haam3r joined #salt
14:15 amontalb1n joined #salt
14:16 Reverend joined #salt
14:18 Reverend so apparently - windows 10 requires a completely fresh install to get back onto normal OS releases >_<
14:18 XenophonF par for the course on Windows
14:18 XenophonF or any O/S really
14:18 Reverend just spent the last 3 hours looking for all my drivers because I accidentally deleted my driver partition :P haha
14:19 Reverend *facepalm*
14:23 MK_FG joined #salt
14:23 lv_ joined #salt
14:26 edrocks joined #salt
14:26 cscf Backups
14:33 guerby joined #salt
14:33 DanyC joined #salt
14:34 _JZ_ joined #salt
14:34 JohnnyRun joined #salt
14:36 barmaley joined #salt
14:38 hasues joined #salt
14:40 sgo_ joined #salt
14:42 hasues left #salt
14:45 jas02 joined #salt
14:46 hungoversignal joined #salt
14:50 voxpop joined #salt
14:54 _JZ_ joined #salt
14:59 bowhunter joined #salt
15:00 hasues joined #salt
15:01 hasues left #salt
15:06 jimklo joined #salt
15:07 bluethundr joined #salt
15:07 bluethundr hey all.. I'm trying to get a basic website running using salt states
15:08 bluethundr I've defined /srv/salt as my salt state directory
15:09 bluethundr where do I have to put the index.html file so that the file can be downloaded by salt
15:09 bluethundr https://gist.github.com/bluethundr/e1e4fda84d6fe9bf1e17504c8045655f
15:09 bluethundr ?
15:10 bluethundr oh nevermind, just got it :)
15:11 bluethundr I created a directory called /srv/salt/webserver and put the index file in there
15:11 bluethundr nice
15:12 haam3r joined #salt
15:14 BattleChicken joined #salt
15:16 jdipierro joined #salt
15:17 heewa joined #salt
15:18 _JZ_ joined #salt
15:21 promorphus I've got a git repository (github) that I want to kickoff a salt event when someone pushes to it. At this point, I've gotten the github repo to send an even to the server with the saltmaster on it, but I'm not entirely sure how to set it up so that the reactor kicks off an event when a message is sent to the server. Can someone help me out or point me in the right direction as to how I can make salt actually 'receive' the message and do something
15:21 promorphus based on it?
15:21 edrocks joined #salt
15:22 DEger joined #salt
15:22 Tanta git fetch origin; test "$(git log HEAD..origin/$branch --oneline)" && run_highstate;
15:22 Tanta in my case run_highstate is a function which does some prep and runs the highstate
15:23 Tanta I have this is a cron job that runs once per hour to keep the salt code fresh on my server
15:32 armonge joined #salt
15:37 Reverend anyone care to explain how pillar's are matched to a minion? i.e. how come pillars are only synced to minions that need them ? :S
15:38 Reverend am i right in thinking that int he pillar top file, pillars that are on a certain criteria are the -only- pillars that end up on those minions?
15:38 Reverend :S
15:38 beowuff joined #salt
15:40 ronnix joined #salt
15:41 Aleks3Y joined #salt
15:42 promorphus @Tanta, I get what that does, I dont have a problem running the commands. I'm saying that github sends a post request to the server that the salt-master is on. What 'receives' the request? Or is that an integration I have to build in?
15:42 Tanta I'm guessing that is the Salt API
15:43 edrocks joined #salt
15:45 jas02 joined #salt
15:47 jdipierro joined #salt
15:47 DarkKnightCZ joined #salt
15:49 promorphus Really seems like im missing something. I can't make github make a specific call, just point it to a url where it posts a json object. I'm not entirely sure how I can utilize the Salt API in this particular scenario
15:50 promorphus My current work around is getting the call to talk to a webserver that creates a file, which is monitored by a salt beacon, that then pushes out an event that the salt system consumes. There has to be a more elegant way to handle this. Anyone?
15:55 ws2k3__ joined #salt
16:01 ws2k3 joined #salt
16:02 impi joined #salt
16:04 ronnix joined #salt
16:06 netcho joined #salt
16:06 ronnix joined #salt
16:06 fxdgear joined #salt
16:07 jimklo joined #salt
16:07 gmoro joined #salt
16:09 jenastar joined #salt
16:10 netcho joined #salt
16:11 DammitJim joined #salt
16:13 ip` joined #salt
16:13 amcorreia joined #salt
16:18 pipps joined #salt
16:22 ip` left #salt
16:22 lero joined #salt
16:23 woodtablet joined #salt
16:24 bltmiller joined #salt
16:25 woodtablet joined #salt
16:26 edrocks joined #salt
16:27 mpanetta joined #salt
16:30 jimklo joined #salt
16:31 whitenoise is there a way to have import_yaml load an external yaml file somewhere else on the drive?
16:31 whitenoise like with extension_modules or something
16:33 cro joined #salt
16:36 gtmanfred that is all rendered on the minion, so if you want, you could just reference any on the drive doing /etc/whatever, otherwise, you need to do salt:// s3:// or swift:// to reference where the file is in the fileserver
16:38 whitenoise oh, so you CAN do import_yaml "/etc/whatever.yaml"
16:38 gtmanfred yes
16:38 gtmanfred just remember, the file needs to be on the minion before the rendering starts, so you can't have a state that puts it there
16:39 whitenoise ah...having it be on the minion might not be good for secrets
16:39 gtmanfred then it should be in pillars
16:39 gtmanfred or an external pillar, like vault
16:39 heewa joined #salt
16:40 gtmanfred even if you do just import_yaml, and have it in the fileserver for reference, any minion could get it
16:40 gtmanfred using the cp module iirc
16:43 rome_390 hello all, getting weird bug when using GPG and salt-ssh. I have data encrypted in the pillar and in the roster (password to connect to the server). It is able to decrypt the roster data and connect to the minion however it fails to decrypt the data in the pillar. Im getting errors similar to "gpg: keyblock resource `/var/tmp/.root_0fb70a_salt/gpgkeys/secring.gpg': No such file or directory". It looks as though it's trying to decrypt on the minion am i
16:43 rome_390 missing something here or did something recently change. I haven't had issues in the past. Using version salt 2016.3.3 (Boron) on OSX.
16:44 DanyC joined #salt
16:44 gtmanfred that is odd, i would report an issue on github
16:44 gtmanfred did it work on 2016.3.2?
16:44 zirpu joined #salt
16:45 rome_390 i believe so. I will need to dig through the latest changes, iIfrequently update through brew so im not 100% sure when exactly it may have changed
16:46 jas02 joined #salt
16:48 jdipierro joined #salt
16:53 bantone joined #salt
16:54 rome_390 @gtmanfred: so i reverted to 2016.3.1 never had 2016.3.2 installed and it seems fine again.
16:54 rome_390 i will open up an issue on github, thanks!
16:56 gtmanfred thanks
17:00 Rasathus_ joined #salt
17:03 nikogonzo joined #salt
17:09 pipps joined #salt
17:10 whitenoise joined #salt
17:11 fxdgear joined #salt
17:13 bltmiller joined #salt
17:18 cosmefulanito_ joined #salt
17:24 onlyanegg joined #salt
17:24 s_kunk joined #salt
17:26 ronnix joined #salt
17:32 cyborg-one joined #salt
17:34 oliver_are joined #salt
17:36 impi joined #salt
17:38 heewa joined #salt
17:42 pipps joined #salt
17:46 jaybocc2 joined #salt
17:47 jas02 joined #salt
17:52 ponyofdeath hi, what is the prefered way to manage firewall rules with salt? the iptables formula?
17:55 doghell joined #salt
17:58 jas02 joined #salt
17:59 jimklo joined #salt
18:00 lero joined #salt
18:02 averell joined #salt
18:06 haam3r joined #salt
18:08 infrmnt joined #salt
18:10 edrocks joined #salt
18:13 hasues joined #salt
18:13 hasues left #salt
18:15 jcrowe215 joined #salt
18:16 sgo_ joined #salt
18:19 netcho joined #salt
18:20 heewa joined #salt
18:26 amcorreia https://dpaste.de/p08t Help???
18:26 amcorreia This error is happening on a new server. I've refresh modules sometimes and no idea why this error
18:30 bryang joined #salt
18:35 fxdgear joined #salt
18:39 Ahlee amcorreia: are you sure your python environment has hipchat module?
18:42 Rasathus joined #salt
18:43 losh joined #salt
18:45 GreatSnoopy joined #salt
18:46 Rubin joined #salt
18:46 Rubin wget -6 'http://repo.saltstack.com/apt/debian/8/amd64/2016.3/SALTSTACK-GPG-KEY.pub'
18:46 Rubin repo.saltstack.com has a AAAA record but no webserver is listening :/
18:47 Rubin this breaks busybox wget
18:51 pipps99 joined #salt
18:53 haam3r joined #salt
18:53 onlyanegg Hello, everyone. I'm getting strangely formatted output on my state runs. It's pretty verbose, but doesn't seem like the normal output. In addition, the output is not following my 'state_ouput' direction which is usually set to mixed. And I can't even get it to shut up when I set state_output to terse.
18:54 cscf onlyanegg, pastebin?
18:55 amcorreia Ahlee, found the problem, was using old version of salt. Upgraded and now working.
18:55 onlyanegg https://gist.github.com/onlyanegg/5f49f7845c7a1bc6cd2ece40dc650b45
18:58 promorphus Hey everyone, got a continuation of a question from this morning. I've got a beacon that fire an event when a file is created on the target system, I'd like to be able to refer to the information inside the file itself, is there a way for me to do that?
18:58 lv_ any one using intelliJ to write salt states and such? any idea how to get intelliJ to recognize .sls files?
19:01 onlyanegg promorphus: parse the file in your reactor?
19:02 edrocks joined #salt
19:10 ivanjaros joined #salt
19:12 onlyanegg sorry, you probably meant the inotify beacon
19:12 nidr0x joined #salt
19:12 promorphus yessir
19:13 promorphus so i end up with the filepath and really that's about it. i want to then open the file and use the contents inside (typically json). is this possible / reasonable?
19:14 AlexLau joined #salt
19:16 jas02 joined #salt
19:21 jimklo joined #salt
19:21 bltmiller joined #salt
19:24 ericprice joined #salt
19:25 bluethundr hello... I'm following this tutorial on salt states: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt2.html
19:25 bluethundr and I want to rename the package that's installed for apache according to the OS by using the -name parameter
19:25 armyriad joined #salt
19:25 bluethundr however that's not working
19:25 bluethundr https://gist.github.com/bluethundr/e1e4fda84d6fe9bf1e17504c8045655f
19:25 bluethundr can someone please have a look at the paste and offer a suggestion?
19:26 eprice joined #salt
19:26 gtmanfred bluethundr: you need to use jinja to specify httpd or apache based on the os_family
19:26 jhon09 joined #salt
19:26 Tanta_G joined #salt
19:26 bluethundr ok
19:26 gtmanfred bluethundr: it gets to that in part3
19:26 bluethundr are there docs on that I could take a look at?
19:26 bluethundr ok
19:26 gtmanfred https://docs.saltstack.com/en/latest/topics/tutorials/states_pt3.html#using-grains-in-sls-modules
19:27 hoonetorg joined #salt
19:27 bluethundr nice thanks
19:27 bluethundr I'll give that a try
19:30 GreatSnoopy joined #salt
19:32 heewa joined #salt
19:32 haam3r joined #salt
19:44 sgo_ joined #salt
19:45 jdipierro joined #salt
19:56 edrocks joined #salt
19:58 pipps joined #salt
20:05 BattleChicken1 joined #salt
20:08 BattleChicken1 left #salt
20:11 tapoxi joined #salt
20:13 nsidhu joined #salt
20:15 netcho joined #salt
20:16 cliluw joined #salt
20:17 Brew joined #salt
20:17 jas02 joined #salt
20:18 mavhq joined #salt
20:20 tapoxi joined #salt
20:23 XenophonF hey is anyone on who manages saltstack-formulas?
20:24 XenophonF i'd like to submit https://github.com/irtnog/shibboleth-formula for inclusion
20:24 mohae_ joined #salt
20:24 DEger joined #salt
20:25 gtmanfred XenophonF: send an email to salt-users is the best way
20:26 XenophonF will do - thanks
20:28 pipps joined #salt
20:48 lero joined #salt
20:51 jdipierro joined #salt
20:51 coredumb Hello
20:52 ecdhe Hello coredumb
20:52 coredumb Sometimes - seems fairly random - after restarting minions from the master - update, config changes, etc - I seem to have agent that even correctly restarting gets "unreachable" by the master for a while
20:53 coredumb seems that it gets "solved" after a while
20:53 coredumb what's the thing behind it ?
20:53 jdipierr_ joined #salt
20:53 coredumb I've set minion ping_interval to 5mn
20:54 coredumb but I can't say for sure that the minion gets back alive after a successful ping
20:55 hungoversignal joined #salt
20:57 teryx510 joined #salt
20:57 pipps99 joined #salt
21:08 haam3r joined #salt
21:09 haam3r joined #salt
21:10 west575 joined #salt
21:17 bluethundr question.. with salt states, if I have a directory setup like this: /srv/salt/non-prod
21:17 bluethundr do I need a top.sls file in the base at /srv/salt?
21:17 bluethundr or should I be able to just have a top.sls file in /srv/salt/non-prod?
21:18 jas02 joined #salt
21:19 keltim joined #salt
21:22 bluethundr I put together this paste which hopefully explains what I'm trying to do more clearly
21:23 bluethundr https://gist.github.com/bluethundr/7f424d4f49d13d5fb12ad085c4988a36
21:24 CeBe joined #salt
21:28 bluethundr I want to apply salt states to just one environment called non-prod
21:28 beowuff joined #salt
21:30 onlyanegg About my question above, I guess there's a patch for it: https://github.com/saltstack/salt/pull/36028
21:30 saltstackbot [#36028][MERGED] Fix error when profiling is turned on and minions don't return |
21:31 hoonetorg joined #salt
21:34 onlyanegg bluethundr: I did something like that for a while, but I changed the environment name from base to (in my case) dev
21:35 onlyanegg Then you should configure which environments your minions pull from
21:35 XenophonF bluethundr: you can put a top.sls file at the root of any directory listed under file_roots in the master config
21:39 systo joined #salt
21:40 onlyanegg The patch I linked to above says it was merged into master yesterday. Does anyone know how long it usually takes to get into the centos repos at repo.saltstack.com?
21:41 onlyanegg I'm wondering if I should spend the time to configure running the patch on all my minions
21:42 bluethundr ok guys thanks.. so I removed the base section out of the master config and restarted the server
21:42 bluethundr leaving only the non-prod and lab environments (working only with non-prod for now)
21:42 bluethundr now when I try to apply the salt state, this is what I'm getting
21:42 bluethundr https://gist.github.com/bluethundr/a22958b47e125078c8e2eb3ed9ff14e2
21:42 bluethundr why is it telling me there's no top file in that directory when clearly there is?
21:45 cebe_ joined #salt
21:47 onlyanegg can you post your minion config as well?
21:48 bluethundr sure
21:49 bluethundr here ya go
21:49 bluethundr https://gist.github.com/bluethundr/531615a28c1337a6964f8d4f8b7f7eac
21:50 bluethundr not much to it
21:50 bluethundr oh sorry if that question wasn't meant for me :(
21:52 onlyanegg bluethundr: you should specify your environment in the minion config. otherwise it defaults to base
21:53 bluethundr oh ok
21:53 bluethundr thanks
21:53 onlyanegg https://docs.saltstack.com/en/latest/ref/configuration/minion.html#environment
21:53 bluethundr so you're saying to define file_roots in the minion config?
21:54 bluethundr oh I think I see what you're saying
21:54 bluethundr just specify the environment in the minion config
21:54 bluethundr ok let me try that
21:54 XenophonF i'm having a hard time grokking pillar environments
21:55 XenophonF i want to have a staging and a production environment for both states and pillars
21:55 XenophonF so that i can test changes using something like `salt-call state.apply state-id-here saltenv=staging pillarenv=staging`
21:56 XenophonF what might top.sls look like in that scenario?
21:56 XenophonF https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html
21:56 XenophonF above says that all pillar environments are merged by default
21:57 XenophonF i assume that means top.sls for targeting, just like states
22:00 XenophonF does anyone use pillar environments?
22:02 onlyanegg I used to. I moved away from it in favor of subdirectories in my main pillar directory and match based on a split of the minion id.
22:02 edrocks joined #salt
22:03 systo joined #salt
22:03 onlyanegg I had several pillar top files - one in each environment directory - which wasn't the easiest way to do it.
22:03 BattleChicken joined #salt
22:04 onlyanegg but I think the concept is the same as file environments
22:12 patrek joined #salt
22:19 jas02 joined #salt
22:23 Doug_ joined #salt
22:24 XenophonF i want to be able to stage changes to pillar keys in a staging environment the same way i stage changes to states
22:28 Doug_ Hi, I am trying to create orchestration to run a highstate *once* after a node is deployed from salt-cloud.  On Friday I got the advice to have it set a custom grain saying something like bootstrapdone=True.  I have put that in place but am running into a couple issues.  First is how can I retrieve a grain for a specific node from within the Jinja in orchestration?  Second, my highstate ran from orchestration often fails.  Putting in a
22:29 Doug_ there are issues.  First the 'salt/minion/*/start' reactor runs before salt-cloud bootstrap is completed.  Second it looks like it reboots the salt-minion during bootstrap.  And third, the highstate job always gets orphaned instead of just failing and I have to do saltutil.job_kill on it.
22:31 pipps joined #salt
22:33 Doug_ XenophonF I haven't read the earlier part of your thread but I am trying to do that too.  What I am doing for now is using PillarStack where I have a single thing in my pillar that sets a key called saltenv.  Then I have pillarstack choose the stack file based on that key.  I have pillar_source_merging_strategy: overwrite in my master.  This works except that if I do pillar.data there is no way to specify environment, it always merges a
22:35 Doug_ But it works when a highstate is being run
22:44 doug1 joined #salt
22:51 pipps99 joined #salt
22:51 heewa joined #salt
23:00 stickman joined #salt
23:01 raspado joined #salt
23:05 teryx510 joined #salt
23:13 KyleG joined #salt
23:13 KyleG joined #salt
23:14 XenophonF Doug_: I was hoping to use state.apply to apply pillar values from a staging branch, a la states themselves
23:14 XenophonF i'm not sure how to make it all work
23:20 jas02 joined #salt
23:34 pipps joined #salt
23:37 pipps joined #salt
23:43 hungoversignal joined #salt
23:45 Doug_ XenophonF: Here is the config I am using now:  https://gist.github.com/dougofthemoment/f6782b89c7aaeca4d1f9a17fc3308534
23:45 bluenemo joined #salt
23:46 systo joined #salt
23:46 Doug_ XenophonF: what we want to do is not the way Salt Stack works, but I've been able to hack this behavior together like this.
23:50 bltmiller joined #salt
23:53 pipps joined #salt
23:56 mosen joined #salt
23:56 pipps joined #salt
23:57 pipps joined #salt
23:58 dps joined #salt
23:58 pipps joined #salt

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