Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-11-02

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

All times shown according to UTC.

Time Nick Message
00:03 nitay joined #salt
00:05 dthom91 joined #salt
00:09 nitay joined #salt
00:11 msx joined #salt
00:18 nitay joined #salt
00:19 chequers joined #salt
00:20 ALLmightySPIFF joined #salt
00:20 chequers hi all, the pkgrepo.managed salt state doesn't seem to support changing the repo URL without needing manual intervention. If I change the state's name, it just appends the new package line to the same file without removing the old one, which breaks. Is there a better way to manage updating the repo url?
00:22 ALLmightySPIFF joined #salt
00:24 msx joined #salt
00:26 stupidnic chequers: it might be possible to place the file under salt management and just dicate what the contents of the file are manually
00:27 stupidnic so for instance just using file.exists: /etc/apt/sources.list.d/foo.list
00:27 opensource_ninja joined #salt
00:28 stupidnic then specify the contents, but admittedly that is not OS agnostic
00:30 chequers yeah, we're single-OS so it seems like an ok workaround
00:30 chequers just wondering if this is meant to be supported
00:31 stupidnic I struggled with something similar
00:31 stupidnic but then our repos don't often change
00:31 stupidnic so just using file directive with pkgrepo.managed has done well enough
00:34 stupidnic you might use something like file.absent before the pkgrepo.managed with the file directive
00:36 stupidnic so now for my question, which nobody will answer I am betting...
00:37 stupidnic but I have a set of env variables that I need to pass to a bunch of cmd.run, for the most part the env are the same, but rather than copy pasta all the env over and over and over again
00:37 quix joined #salt
00:37 stupidnic is there some other way of doing that?
00:38 larsfronius joined #salt
00:38 chequers I guess jinja template could do this
00:38 stupidnic Yeah, you might be right
00:40 nitay joined #salt
00:41 nidr0x joined #salt
00:45 ip` joined #salt
00:50 hemebond Yeah, a Jinja loop.
00:53 nitay joined #salt
00:59 nitay joined #salt
01:00 stupidnic hemebond: any examples of that I can look at?
01:01 stupidnic I know the basic concept of a for loop in jinja, but more looking for how it might be implemented in my particular instance since the commands are what are changing
01:02 stupidnic do I just map out all the commands in a list? seems a bit messy
01:09 hemebond stupidnic: Throw the environment variable values into a Jinja variable. Include/import the Jinja variable into your state file. Then loop through the Jinja variable in each state you want to use them.
01:09 stupidnic ah okay... so the other direction then
01:09 stupidnic See, that's why I wanted an example. I knew I was thinking about it the wrong wayu
01:09 stupidnic -u
01:10 hemebond {% from "mystate/envvars.jinja" import envvars with context %}
01:10 hemebond That will import the variable
01:10 hemebond envvars.jinja will look like a map.jinja
01:11 stupidnic right, I got it now, thank you for the nudge in the right direction
01:11 hemebond Good luck :-)
01:12 nitay anyone know how to spin up dedicated tenancy instances on ec2 using salt cloud?
01:16 sauces joined #salt
01:20 deedubs joined #salt
01:26 iggy nitay: you'll probably have to add support for that yourself
01:27 nitay joined #salt
01:28 quix joined #salt
01:44 teebes joined #salt
01:47 sunkist1 joined #salt
01:49 fsteinel_ joined #salt
01:56 jqce joined #salt
01:57 otter768 joined #salt
02:11 subsignal joined #salt
02:19 _Cyclone_ joined #salt
02:31 alemeno22 joined #salt
02:32 colegatron joined #salt
02:39 msx joined #salt
02:42 keltim joined #salt
02:56 evle joined #salt
03:05 favadi joined #salt
03:05 otter768 joined #salt
03:06 deedubs_ joined #salt
03:30 zmalone joined #salt
03:38 malinoff joined #salt
03:42 falenn joined #salt
03:43 thekabal joined #salt
03:44 thekabal Is there a way to build a EC2 instance (Amazon Web Services) with a unique ID for Salt to use when it connects?
03:45 hemebond thekabal: Probably a question for an EC2 support forum.
03:46 hemebond The minion ID should come from the hostname of the machine. If not, you can provide the minion_id file for salt-minion.
03:51 aparsons joined #salt
03:58 jqce joined #salt
03:58 brekkn joined #salt
03:59 malinoff_ joined #salt
04:01 zmalone joined #salt
04:04 racooper joined #salt
04:07 murkey i'm not very good at python or salt. what's the best way to do this? grains['osarch'] == 'x86_64' ? 'x86_64' : 'i386'
04:07 murkey and then interpolate it into a state?
04:07 murkey or is that not the right way to go about it
04:07 chequers python ternary is 'a=b if cond else c'
04:08 hemebond murkey: Have a look at map.jinja in formulas.
04:08 murkey oh... that's some odd syntax. thanks
04:08 murkey alright will do hemebond
04:31 dthom91 joined #salt
04:32 malinoff joined #salt
04:33 ip` joined #salt
04:36 malinoff joined #salt
04:36 ramteid joined #salt
04:40 larsfronius joined #salt
04:48 opdude_ joined #salt
04:49 mehakkahlon joined #salt
05:02 PeterO joined #salt
05:10 Akhter joined #salt
05:21 justicefries joined #salt
05:23 rdas joined #salt
05:30 rmnuvg joined #salt
05:32 PeterO joined #salt
05:34 anmol joined #salt
05:37 chiui joined #salt
05:48 favadi joined #salt
05:50 nidr0x joined #salt
05:57 jqce joined #salt
06:05 ashutoshn joined #salt
06:06 Guest39384 left #salt
06:14 otter768 joined #salt
06:14 opdude joined #salt
06:16 katyucha joined #salt
06:20 akbar joined #salt
06:22 aparsons joined #salt
06:28 chequers left #salt
06:30 ageorgop joined #salt
06:37 ip` joined #salt
06:54 felskrone joined #salt
06:55 chiui joined #salt
06:55 NotBobDole joined #salt
06:56 falenn joined #salt
07:08 linjan_ joined #salt
07:14 colttt joined #salt
07:19 AndreasLutro joined #salt
07:25 catpig joined #salt
07:29 KermitTheFragger joined #salt
07:32 seweryn joined #salt
07:33 AndreasLutro joined #salt
07:33 CeBe joined #salt
07:35 felskrone joined #salt
07:36 aqua^c joined #salt
07:37 onovy joined #salt
07:38 stooj joined #salt
07:40 mattiasr joined #salt
07:41 larsfronius joined #salt
07:55 trapha joined #salt
07:56 jqce joined #salt
07:56 ITChap joined #salt
08:04 bussillis joined #salt
08:05 edulix joined #salt
08:06 elsmo joined #salt
08:07 Pallando joined #salt
08:09 bussillis guys, i get this with salt-cloud [ERROR   ] There was an error running the function: local variable 'http_code' referenced before assignment
08:09 bussillis trying to fix my modul
08:10 bussillis have no clue what is that :(
08:10 bussillis any idea?
08:10 eseyman joined #salt
08:11 AndreasLutro anyone get this error with file.managed using a https source before? Comment: Unable to manage file: 'text'
08:12 bussillis :(
08:12 AndreasLutro bussillis: means you're trying to use an undefined variable
08:12 AndreasLutro you can just google the last part of the error string
08:15 otter768 joined #salt
08:16 keimlink joined #salt
08:17 mehakkahlon joined #salt
08:18 bussillis AndreasLutro: :(
08:18 bussillis although it's obvious
08:18 bussillis i don't know how to find out which and where
08:19 bussillis i don't have http_code anywhere :(
08:20 hemebond bussillis: In a module perhaps?
08:20 bussillis yes
08:20 bussillis hemebond:
08:20 hemebond Have you grep'd your source tree for http_code?
08:21 bussillis no, probbably something deeper in salt-cloud
08:21 bussillis which is invoked with some function i call
08:21 hemebond hmm, I just searched salt-cloud source on Github and got nothing.
08:21 bussillis most likely in config.
08:21 hemebond Maybe I did it wrong.
08:22 bussillis hemebond: :( can't get it :(
08:33 colegatron joined #salt
08:37 impi joined #salt
08:40 illern_ joined #salt
08:43 OliverUK joined #salt
08:43 hemebond bussillis: It's difficult to find the problem without seeing any configs.
08:44 bussillis hemebond: which would help
08:44 hemebond bussillis: Whichever state is causing the problem.
08:45 chiui joined #salt
08:46 geomyidae_ joined #salt
08:46 bussillis hemebond: hmm..
08:47 bussillis profile and provider files should be ok, i can post some code... :/_
08:47 bussillis ?
08:47 hemebond If you think it'll help. Be sure to use pastebin or something.
08:48 bussillis ok
08:49 falenn joined #salt
08:51 bussillis hemebond: https://paste.debian.net/319185/
08:52 bussillis hemebond: i try to run test function
08:52 bussillis perhaps, it could be some ordering of functions
08:53 bussillis i copy paste most of it from another modul...
08:53 bussillis very similar one
08:53 hemebond Oh, one other thing you can do is run it with debug
08:53 hemebond In the forground (if using a master)
08:54 hemebond I don't actually use salt-cloud myself.
08:54 hemebond So I can't test.
08:54 hemebond Is line 28 just wrapped incorrectly?
08:55 hemebond salt-cloud --log-level=debug blah blah blah
08:56 kawa2014 joined #salt
08:58 hemebond Is your module/code trying to download something over HTTP?
08:59 babilen 28 and 29 are not commented
08:59 babilen (and would cause a syntax error)
09:00 hemebond Yeah, I'm thinking it's just a paste error.
09:00 s_kunk joined #salt
09:01 babilen Then we can't really be sure of anything
09:01 babilen :)
09:02 bussillis oh
09:02 bussillis yes that was paste error
09:02 bussillis uncommented  lines
09:02 babilen aye
09:06 bussillis :(
09:07 keltim joined #salt
09:08 bussillis babilen: hemebond seems like some libcloud + salt-cloud issue
09:08 bussillis print(driver.list_nodes())
09:08 bussillis returns that issue
09:08 bussillis however
09:08 bussillis print(driver.list_sizes())
09:08 bussillis returns everythingas it should
09:10 bussillis also list_images
09:10 bussillis gives the same error
09:10 bussillis :(
09:11 bussillis_ joined #salt
09:11 bussillis_ [12:06] <bussillis> :( [12:08] <bussillis> babilen: hemebond seems like some libcloud + salt-cloud issue [12:08] <bussillis> print(driver.list_nodes()) [12:08] <bussillis> returns that issue [12:08] <bussillis> however [12:08] <bussillis> print(driver.list_sizes()) [12:08] <bussillis> returns everythingas it should [12:10] <bussillis> also list_images [12:10] <bussillis> gives the same error [12:10] <bussillis> :(
09:11 bussillis_ :( babilen: hemebond seems like some libcloud + salt-cloud issue print(driver.list_nodes()) returns that issue however print(driver.list_sizes()) returns everythingas it should also list_images gives the same error :(
09:12 babilen bussillis seems to have copy & paste issues ;)
09:12 bussillis_ babilen: yea
09:12 Rumbles joined #salt
09:17 markm joined #salt
09:18 netcho joined #salt
09:19 thefish joined #salt
09:20 illern_ joined #salt
09:21 thalleralexander joined #salt
09:21 trapha joined #salt
09:22 thalleralexander joined #salt
09:24 kawa2014 joined #salt
09:30 MadHatter42 joined #salt
09:33 sgargan joined #salt
09:33 larsfronius joined #salt
09:43 colegatron which is the best practice to pass a variable to a jinja template? I'm getting an error using this: https://paste.debian.net/319199/
09:46 colegatron I would like to pass the entire pillar cfg variable to the template and be able to use in it as "{{ cfg.website.site_folder }}"
09:52 AndreasLutro colegatron: line 23: cfg: {{ cfg | json }}
09:52 colegatron ohhh, great! thank you very much
09:53 colegatron cfg then is a dict and can't be passed to the template as a dict, right?
09:54 AndreasLutro not sure what you mean by that
09:56 AndreasLutro brb lunch
09:57 jqce joined #salt
09:58 kawa2014 joined #salt
10:02 viq joined #salt
10:02 hemebond colegatron: Do you not have to use regular dict notation to access nested dicts? e.g., cfg['website']['host']?
10:02 hemebond Maybe not... maybe Jinja allows dot-notation.
10:02 hemebond Been a while.
10:03 colegatron yup, jinja allows. and it is easier to share the templates with devs
10:03 colegatron cleaner, I mean
10:05 hemebond Shouldn't it be ('cfg', {})?
10:05 hemebond (is this still a problem or did AndreasLutro's tip fix it?)
10:16 otter768 joined #salt
10:17 chiui joined #salt
10:17 rotbeard joined #salt
10:17 larsfron_ joined #salt
10:23 kawa2014 joined #salt
10:31 MadHatter42 joined #salt
10:40 falenn joined #salt
10:42 human01d joined #salt
10:43 dijit hey, can I list which sls files are going to be triggered on a salt run, or am I limited to the entire debug output of highstate with test=True?
10:47 fredvd joined #salt
10:52 babilen dijit: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.show_highstate
10:52 kawa2014 joined #salt
10:52 babilen https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.show_top
10:55 dijit show_top is exactly what I wanted.
10:55 dijit amazing.
10:56 dijit thanks babilen
10:57 linjan__ joined #salt
11:02 impi joined #salt
11:08 aurynn joined #salt
11:11 favadi joined #salt
11:12 Akhter joined #salt
11:20 danielcb joined #salt
11:26 impi joined #salt
11:27 kawa2014 joined #salt
11:29 jhauser joined #salt
11:33 Gi0 joined #salt
11:35 colegatron hemebond, andreaslutro tip fix it.
11:46 MadHatter42 joined #salt
11:56 jqce joined #salt
12:05 jb_ joined #salt
12:13 chiui joined #salt
12:14 colegatron joined #salt
12:16 otter768 joined #salt
12:17 kawa2014 joined #salt
12:24 amcorreia joined #salt
12:29 evle1 joined #salt
12:30 sgargan joined #salt
12:31 Pixcell joined #salt
12:32 Pixcell Hello, I'm currently trying to write a Chocolatey package provider, using the already existing chocolatey module. Could someone explain where does the '__context__' used all over the file (modules/chocolatey.py) comes from ?
12:33 aboe joined #salt
12:36 breakingmatter joined #salt
12:42 kawa2014 joined #salt
12:43 sgargan joined #salt
12:44 dthom91 joined #salt
12:53 ozn_ joined #salt
12:55 ozn_ hi, can someone help me find out why this state won't render? https://gist.github.com/oz123/dd292119e86992293244
12:55 bastion1704 joined #salt
12:58 edulix joined #salt
12:58 AndreasLutro ozn_: you don't need {{ }} inside of {% %} statements
12:58 ozn_ AndreasLutro, thank! I just figured it out. Check out rev. 2
12:59 ozn_ now this works.
13:02 ozn_ AndreasLutro, can you help me figure why the block with file.file_exist always runs on centos?
13:03 ozn_ I thought what i wrote will prevent it from running if pip is already found in /usr/bin/pip
13:03 seweryn2 joined #salt
13:03 AndreasLutro ozn_: what do you think salt['file.file_exists'] is?
13:04 ozn_ a check that grain exists? like in bash [ -f /usr/bin/pip ]?
13:04 AndreasLutro on a more abstract level... it's a function, you're not calling it, just referencing it
13:05 AndreasLutro you need some () in there
13:05 ozn_ oh, so I need to call it ... embarrassing
13:06 ozn_ with the parameter inside?
13:06 ozn_ yes. now it's correct I think
13:06 ozn_ how do I render the state without running it?
13:07 otter768 joined #salt
13:07 AndreasLutro state.highstate test=True, or state.show_top
13:08 ozn_ can I see the rendered yaml in my terminal ?
13:08 AndreasLutro not as far as I know
13:08 AndreasLutro but I bet one of the state. functions will do it
13:09 antonakv joined #salt
13:10 ozn_ AndreasLutro, that is a real pity. I always which I could see the final composed jinja somewhere
13:16 antonakv Hi people. I need some help with map.jinja syntax :-) If you don't mind to answer
13:16 antonakv This doesn't work, is there any easy way to make it work ?
13:16 antonakv {% set zabbix_agent = salt['grains.filter_by']({
13:16 antonakv '10.0.1*': {
13:16 antonakv 'server': '10.0.1.24'
13:17 antonakv ...
13:17 antonakv grain='ip4_interfaces:eth0:0',
13:23 TooLmaN joined #salt
13:27 teryx510 joined #salt
13:27 quix joined #salt
13:28 dkrae joined #salt
13:36 stolenmoment joined #salt
13:37 subsignal joined #salt
13:43 ggoZ joined #salt
13:47 seweryn joined #salt
13:47 chiui joined #salt
13:48 JDiPierro joined #salt
13:49 Segfault_ joined #salt
13:50 robinsmidsrod joined #salt
13:51 Segfault_ Hello. I'm having a problem with my users formula. I have changed/added "workphone" to my users and I'm getting "These values could not be changed: {'workphone': 123456789}. What am I doing wrong?
13:52 Segfault_ As far as I know 'workphone' is just a field in /etc/passwd, changing it should be trivial. I'm running saltstack 2015.5.3 on both the master and the minions
13:53 AndreasLutro I remember bumping into this but can't remember what the problem was
13:53 cpowell joined #salt
13:53 AndreasLutro try sshing in and updating it manually
13:53 cpowell joined #salt
13:53 stolenmoment left #salt
13:55 edulix joined #salt
13:55 Segfault_ that works, but.. updating all four hundred servers by hand?
13:55 AndreasLutro no I meant try doing it manually to see if you get any error messages
13:55 Segfault_ okay, I'll try that
13:56 antonakv left #salt
13:57 jqce joined #salt
13:57 kawa2014 joined #salt
13:59 Segfault_ The workphone is actually correct in /etc/passwd
13:59 Segfault_ The state still fails with the same error message
14:00 seblu joined #salt
14:00 Segfault_ I'm going to try using "homephone" instead
14:01 andrew_v joined #salt
14:01 AndreasLutro odd... you could always add -l debug to get more output
14:02 otter768 joined #salt
14:02 Segfault_ okay, I changed workphone to homephone and ran state.highstate. The state still fails, but the phone number is added correctly to /etc/passwd
14:03 AndreasLutro which version of salt are you on?
14:05 Segfault_ AndreasLutro: 2015.5.3
14:06 Segfault_ From the SaltStack PPA
14:06 bhosmer joined #salt
14:08 quix joined #salt
14:11 AndreasLutro I don't have any ideas, -l debug and work your way from there I guess
14:12 yuhlw joined #salt
14:13 bernieke joined #salt
14:14 bernieke joined #salt
14:17 Segfault_ Ugh, I don't have time for this, sorry. I'll just comment out the line with the phone number and take a look at it later when I have some spare time
14:19 chiui joined #salt
14:20 numkem joined #salt
14:23 nofxrok joined #salt
14:28 Rumbles joined #salt
14:29 aparsons joined #salt
14:29 zer0def uhhh, is there any reason for the ubuntu ppa to be 3 months behind stable?
14:31 sroegner joined #salt
14:33 colegatron joined #salt
14:35 edulix joined #salt
14:37 oznah joined #salt
14:38 hasues joined #salt
14:38 MadHatter42 joined #salt
14:40 dendazen joined #salt
14:40 hasues left #salt
14:41 chiui joined #salt
14:47 zmalone joined #salt
14:47 DanyC joined #salt
14:50 debian112 joined #salt
14:54 fxhp joined #salt
14:55 ekristen joined #salt
14:55 Brew joined #salt
15:00 kawa2014 joined #salt
15:01 mpanetta joined #salt
15:01 inate joined #salt
15:04 jeddi joined #salt
15:05 pravka joined #salt
15:06 pyropoptrt joined #salt
15:09 perfectsine joined #salt
15:11 timoguin joined #salt
15:16 xMopxShell joined #salt
15:16 teebes joined #salt
15:19 justicefries left #salt
15:23 dyasny joined #salt
15:24 _JZ_ joined #salt
15:24 dendazen hey guys what can be the problem here?
15:24 dendazen https://gist.github.com/dendazen/eaa6719cdde53b72c279
15:26 DanyC_ joined #salt
15:27 winsalt joined #salt
15:27 zmalone dendazen: looks like the curly braces might not be sufficiently escaped to me
15:28 Hazelesque joined #salt
15:28 ozn_ joined #salt
15:28 mrtrosen_ joined #salt
15:28 shiriru joined #salt
15:29 robins joined #salt
15:30 dendazen hmm, what do you mean?
15:30 dalibro_ joined #salt
15:30 favadi joined #salt
15:30 pfalleno1 joined #salt
15:30 darvon_ joined #salt
15:30 ernetas_ joined #salt
15:30 superseb_ joined #salt
15:30 baffle_ joined #salt
15:31 tru_tru_ joined #salt
15:31 babilen_ joined #salt
15:32 babilen_ dendazen: You might want to paste the entire SLS file that contains zabbix-agent-register
15:32 zmalone the args line is highlighted as the problem, and the error message suggests that it's being interpreted as a list somewhere
15:32 dendazen oh one sec.
15:32 dh__ joined #salt
15:33 dendazen https://gist.github.com/dendazen/08d6072ce53e642228e4
15:34 Emantor_ joined #salt
15:34 dh joined #salt
15:37 georgemarshall joined #salt
15:37 Rumbles joined #salt
15:39 kitplummer joined #salt
15:39 bhosmer joined #salt
15:39 TomJepp joined #salt
15:39 _JZ_ joined #salt
15:40 Eugene joined #salt
15:40 THE_BOULDER joined #salt
15:41 danielcb joined #salt
15:41 thalleralexander joined #salt
15:41 gmoro joined #salt
15:42 oznah joined #salt
15:42 basepi joined #salt
15:42 scooby2 joined #salt
15:43 MadHatter42 joined #salt
15:43 debian112 joined #salt
15:43 gazarsgo joined #salt
15:44 anotherZero joined #salt
15:44 DammitJim joined #salt
15:44 neilf_ joined #salt
15:44 hemebond joined #salt
15:44 dyasny joined #salt
15:45 ggoZ joined #salt
15:46 Striki joined #salt
15:47 Phtes joined #salt
15:48 huddy joined #salt
15:48 conan_the_destro joined #salt
15:49 sgargan joined #salt
15:50 synical joined #salt
15:50 supermike__ joined #salt
15:51 mission712 joined #salt
15:52 perfectsine joined #salt
15:52 cb joined #salt
15:52 morissette joined #salt
15:53 morissette Is there a way to use the roster with salt vs just salt-ssh?
15:54 adelcast left #salt
15:54 mikepea joined #salt
15:54 morissette and/or what is the proper way to use custom names vs hostnames for salt
15:55 morissette (outside of you know fixing all the hostnames to be sane)
15:55 gtaylor joined #salt
15:55 paolo joined #salt
15:56 adelcast joined #salt
15:56 Nazzy joined #salt
15:56 jqce joined #salt
15:58 MadsRC joined #salt
15:59 mehakkahlon joined #salt
16:01 pyropoptrt Does salt have the ability to pull an inventory report of all minions showing OS, packages installed, packages needing update, etc?
16:03 morissette i mean....
16:03 morissette salt "*" cmd.run "rpm -qa"
16:03 morissette salt "*" cmd.run "cat /etc/*-release"
16:04 morissette or you looking for something built in
16:04 zmalone OS information should be available as a grain, the rest I believe is collected dynamically, although the pkg commands can be flakey on some platforms.
16:04 morissette https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.osquery.html#salt.modules.osquery.os_version
16:04 zmalone So cmd.run <foo> is probably your best bet.
16:04 jeffpatton1971 joined #salt
16:05 sdm24 joined #salt
16:05 big_area pyropoptrt: salt "<yourhosthere>" grains.items
16:05 big_area that will give you all the grains for a machine.
16:06 morissette yeah that works a lot better
16:06 morissette is that yaml?
16:06 morissette makes me miss my perl days
16:06 morissette [root@salt salt]# salt '*' grains.items.serialnumber
16:06 morissette ip-172-30-0-215:
16:06 morissette 'grains.items.serialnumber' is not available.
16:07 morissette cant access each key with dot notation?
16:07 morissette :(
16:07 Deevolution joined #salt
16:07 big_area grains.item serialnumber
16:07 jcristau joined #salt
16:07 big_area grains.items give you everything
16:07 alexlist joined #salt
16:07 morissette Oh brillant!
16:07 morissette big_area, want to be friends lol
16:07 big_area grains.item <space delimited list> gives you individual items
16:08 big_area lol sure
16:08 morissette w00t! got my first friend haha
16:09 meanieotter joined #salt
16:09 pyropoptrt @big_area Awesome. Is there a way to specify how it outputs? The output is a little messy especially when getting it to output data from five minions
16:10 morissette It's YAML should be able to parse pretty well
16:10 morissette http://pyyaml.org/
16:11 morissette And since I'm old and still think Perl should be used where efficient: http://search.cpan.org/~ingy/YAML-1.15/lib/YAML.pod
16:11 druonysus joined #salt
16:11 fusionx86 joined #salt
16:12 SheetiS joined #salt
16:12 dthom91 joined #salt
16:13 KingJ joined #salt
16:13 big_area https://docs.saltstack.com/en/latest/ref/output/all/index.html
16:13 jcockhren pyyaml is nice
16:13 jcockhren let me show you
16:14 big_area morissette: if you are looking to get at salt programmatically i suggest https://docs.saltstack.com/en/develop/ref/clients/index.html
16:14 jcockhren http://pyyaml.org/wiki/PyYAMLDocumentation#Constructorsrepresentersresolvers
16:15 breakingmatter joined #salt
16:15 morissette I'm spending 80% of my time building a flask restful api and 20% systems / devops - so eventually I'd love to get at it programmatically
16:15 morissette so thanks!
16:16 izibi joined #salt
16:17 perfectsine joined #salt
16:20 zmalone joined #salt
16:21 nicolerenee joined #salt
16:22 Niamkik joined #salt
16:22 zmalone joined #salt
16:23 zsoftich2 joined #salt
16:24 PeterO_ joined #salt
16:26 Fiber^ joined #salt
16:27 morissette big_area, is there a way to write a language agnostic script that can then be pulled and run through salt?
16:28 morissette and/or link me to docs :)
16:28 morissette (sorry still like 3 days into salt)
16:28 zmalone morissette: a lot of salt ends up being exactly that
16:28 racooper joined #salt
16:28 zmalone file.managed to distribute out scripts, and then shelling out with cmd.run to execute them
16:29 morissette Yeah I figured that's how it would be used
16:29 morissette but wanted some docs
16:29 morissette I guess I can google file.managed on my own huh?
16:29 morissette :)
16:29 rhodgin joined #salt
16:32 jalbretsen joined #salt
16:32 breakingmatter joined #salt
16:56 dijit joined #salt
16:59 wldcordeiro joined #salt
17:00 babilen zmalone, morissette: You can just use cmd.script to begin with: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.script
17:01 bhosmer joined #salt
17:01 morissette kk; thx
17:01 druonysuse joined #salt
17:02 dthom91 joined #salt
17:03 impi joined #salt
17:04 sgargan joined #salt
17:04 dyasny joined #salt
17:04 meye1677 joined #salt
17:05 dyasny joined #salt
17:08 alemeno22 joined #salt
17:08 ldelossa joined #salt
17:09 ldelossa Hey guys, what's the implication of having a specific state in a .sls require a state in another .sls file
17:09 ldelossa how does it determine if that other state module is ran ?
17:09 mehakkahlon joined #salt
17:09 aparsons joined #salt
17:09 ldelossa I see this example: https://docs.saltstack.com/en/latest/ref/states/requisites.html making use of include
17:10 ldelossa if I do this won't that lead to "foo" being ran twice?
17:10 cberndt joined #salt
17:10 zsoftich2 I think without any requires it runs top down once
17:10 Bryson joined #salt
17:10 zsoftich2 so it would run the first time it was included
17:11 druonysuse joined #salt
17:12 writtenoff joined #salt
17:12 sunkist joined #salt
17:17 dthom91 joined #salt
17:18 hal58th ldelossa: States run top down until it hits a require or other requisite. Then it will fork off and do the required states and then return back to the top down list.
17:19 sunkist joined #salt
17:23 stupidnic I am using env variables on a cmd.run, does anybody know if those same env variables are used for an unless statement within the same definition?
17:23 hal58th States can't be run twice. An include is different than a require. An include just means to grow the top down list.
17:23 hal58th stupidnic: I doubt it. but haven't tested.
17:23 whytewolf ldelossa: you can use state.show_highstate to see how salt is seeing the highstate currently. in what order the states are in
17:23 mik__R joined #salt
17:23 sdm24 whytewolf, ldelossa: and state.show_sls for just one state file
17:24 sdm24 if you have a long highstate and just want to see the includes for a specific file
17:24 ldelossa wolf that is awesome advice.
17:24 ericof joined #salt
17:24 ldelossa so basically, I have a state called nodejs.install, and I have a state called haraka.install which has include nodejs.install and then does a require sls nodejs.install
17:24 ldelossa So basically I don't need to run the sstate nodejs.install on the state top file for the nodes that want haraka
17:24 ldelossa I would just run the haraka state file in the top.sls, which will in turn run the nodejs.installs tate
17:24 ldelossa state*
17:24 hal58th correct. although the include is for the entire sls file, the require is optional because it will be included into your top down list
17:25 hal58th require will literally not execute your current state on the top down list, so that you can do the required state
17:25 jeffpatton1971 can I assign multiple values for a grain like this? https://gist.github.com/jeffpatton1971/5204f8b48fadc23c5ec2
17:26 jeffpatton1971 or is that bad
17:26 ldelossa hal: so I technically don't need the include?
17:26 ldelossa oh wait, the require is option
17:26 ldelossa but I do actually want that require
17:26 ldelossa because if for some reason the include fails
17:26 ldelossa I don't want anything to happen
17:27 sdm24 jeffpatton1971: try grains.append or grains.list_present instead https://docs.saltstack.com/en/latest/ref/states/all/salt.states.grains.html#salt.states.grains.append
17:27 hal58th defintely need the include, require is optional. In your described case, the require is needed
17:27 ldelossa perfect
17:28 jeffpatton1971 @sdm24 so like econd example of list_present
17:28 jeffpatton1971 @sdm24 silly insert key
17:28 culexor joined #salt
17:28 Lionel_Debroux joined #salt
17:29 jeffpatton1971 @sdm24 i'm assigning grains based on services offered, if a given host were to have two different grain.sls states applied with the same grain...if they were different values would there be a conflilct?
17:30 sdm24 ldelossa: the include just says "run the included state(s) first". the require with include says "run the included state(s) first, and only do the required in the main state if the inlcuded state succeeded"
17:30 cberndt joined #salt
17:31 sdm24 jeffpattion1971: I'm not sure. With "append", I think it will merge the two, because the first grain state would create "roles" and apply "webserver", while the second grain state would append "database" to "roles"
17:31 sdm24 but I haven't used it
17:31 sdm24 I think grains.list_present will just pass if the value(s) are in the list, and fail if they are not
17:31 jeffpatton1971 ok
17:32 jeffpatton1971 let me futz with it a bit
17:32 jmreicha joined #salt
17:32 xMopxShell joined #salt
17:32 ldelossa thanks guys, exactly what I was looking for.
17:35 mission712_ joined #salt
17:37 blast_hardcheese joined #salt
17:39 cberndt joined #salt
17:40 rhodgin joined #salt
17:41 hal58th btw jeffpatton1971, it's better to assign roles via pillar data instead of grains. If someone were to get onto that box, they could assign the minion a role to get more data out of pillar.
17:43 jeffpatton1971 @hal58th I *think* that's what i'm doing? lol...i'm targeting via /srv/salt/top but I could most that to /srv/pillar/top
17:44 hal58th jeffpatton1971: You can just have a direct copy of salt/top to pillar/top. That way you know the DB's get db data only.
17:45 jeffpatton1971 @hal58th you mean just duplicate them in both places?
17:45 wendall911 joined #salt
17:46 culexor joined #salt
17:46 hal58th yes
17:47 otter768 joined #salt
17:47 hal58th you just have to make sure your pillar data has the same sls files.
17:47 hal58th I mean the same name for the sls files
17:47 ernetas_ Hey guys.
17:47 ernetas_ I installed Salt minion on RHEL 6.6, but it's not starting up on boot (chkconfig shows it should).
17:47 ernetas_ Nothing in the logs.
17:48 ernetas_ Is there something I missed?
17:49 jeffpatton1971 @hal58th ah...I can do that, although would it even need to be in both places? the idea here is we're assigning one or more roles based on services and using states to do that, other states will perform some action based on grain.role
17:49 xMopxShell joined #salt
17:50 Guest47571 joined #salt
17:50 hal58th ahhh not sure. I'd have to look to really know and I don't have time for that :)
17:51 shadowsun joined #salt
17:52 jeffpatton1971 @hal58th not sure it matters as i'm getting conflicting id's trying to set a grain role in two or more state files
17:52 jeffpatton1971 :(
17:53 hal58th jeffpatton1971: They need a unique state ID.
17:53 jeffpatton1971 makes me think I should potentially pull my logic out of the top file and create a grain state and drop the logic there
17:54 seweryn joined #salt
17:54 xMopxShell joined #salt
17:55 jqce joined #salt
17:56 jeffpatton1971 i tried to cheat and that didnt' work, moved the name of the grain down into grains.append -name: role
17:56 jeffpatton1971 TypeError encountered executing state.highstate: list indices must be integers, not str. See debug log for more info.
17:57 ldelossa Hey guys I'm trying to bootstrap a minion with the latest git repo. I dont' see the keys coming into salt, also there's no keys in the pki folder on the minion. I get this error when I try to regen the keys using a local salt call. http://hastebin.com/ulohumasib.vhdl
17:59 hal58th ldelossa: Try stopping the salt service and then running it in the foreground with debug. "sudo /usr/bin/salt-minon -l debug"
18:00 ldelossa okay lets try that
18:00 ldelossa you know what ... I am bootstrapping with the develop option on
18:01 ajw0100 joined #salt
18:01 stanchan joined #salt
18:01 ldelossa http://hastebin.com/iwomubonap.vhdl
18:01 ldelossa that's all I get
18:01 stupidnic BTW: looking at the code for cmd.run it does appear that anything set within the same cmd.run directive (user, shell, env) are all used for the unless call as well.
18:01 ldelossa and then it just sits
18:01 dthom91 joined #salt
18:02 ldelossa so I just bootstrapped another host, not using the "git" and "develop" options
18:03 ldelossa private and pub key is there
18:03 cberndt joined #salt
18:03 ldelossa completely fine with git and develop options
18:05 dthom911 joined #salt
18:05 cpowell_ joined #salt
18:09 druonysuse joined #salt
18:10 seweryn2 joined #salt
18:11 culexor joined #salt
18:11 adelcast joined #salt
18:12 bhosmer joined #salt
18:13 druonysuse joined #salt
18:13 druonysuse joined #salt
18:14 bhosmer joined #salt
18:14 rm_jorge joined #salt
18:17 druonysus joined #salt
18:20 culexor joined #salt
18:23 malinoff joined #salt
18:23 aparsons joined #salt
18:25 ajw0100 joined #salt
18:26 baweaver joined #salt
18:30 malinoff joined #salt
18:33 jmreicha joined #salt
18:36 irctc405 joined #salt
18:36 andrew_v_ joined #salt
18:38 ocdmw joined #salt
18:40 malinoff joined #salt
18:40 sgargan joined #salt
18:43 cberndt joined #salt
18:43 sdm24 when working with python, does anyone know how to use "
18:44 geekatcmu no, no one knows how to use "
18:44 sdm24 when working with python, does anyone know how to use "salt-call" with sudo? We have an automated cgi to report the total number of minions, which the webserver pulls from the mine. But because it runs as www-data adn not root, the mine.get command fails
18:44 breakingmatter joined #salt
18:44 wryfi left #salt
18:46 shadowsun joined #salt
18:47 zmalone joined #salt
18:49 sdm24 From the docs: "Importing and using Caller must be done on the same machine as a Salt Minion and it must be done using the same user that the Salt Minion is running as." oh well
18:50 SaltySnacks joined #salt
18:50 SaltySnacks hello
18:52 SaltySnacks i can't get 2015.8.1 to work
18:52 SaltySnacks i keep getting an error 'ZMQIOLoop' object has no attribute 'call_later' when i run salt \* state.highstate
18:52 SaltySnacks anyone has similar issues?
18:53 zmalone 0mq version?
18:53 sbogg joined #salt
18:53 zmalone I think there are issues with older versions of zeromq with newer salts
18:55 SaltySnacks https://gist.github.com/syedaali/e693cd939ca200c23cbd
18:55 SaltySnacks that lists the versions
18:56 SaltySnacks i have 4.0.4
18:56 SaltySnacks i think that's the latest
18:58 zmalone Yeah, I think I had issues immediately after upgrade until I restarted salt on all my minions/masters
18:58 cpowell joined #salt
18:58 meye1677 joined #salt
18:58 baweaver joined #salt
18:58 zmalone I'm on 14.04 with 2015.8.1 and have not seen that error.
18:58 jeffpatton1971 joined #salt
19:00 irctc405 Currently attempting to have salt manage my apache install, but httpd defaults to 2.2, but enforcing 2.4 causes an error when it calls the service name - The named service httpd24 is not available
19:00 irctc405 Not sure how this is going to format - but this the file:: httpd24:   pkg.installed: []   service.running:      - require:       - pkg: httpd24
19:00 ajw0100 joined #salt
19:01 aparsons joined #salt
19:01 irctc405 Is there a way for it to require package httpd24 but manage service httpd?
19:01 sdm24 irctc405: use the "- name:" field for each. i'll post an example, one sec
19:02 breakingmatter joined #salt
19:02 sdm24 https://gist.github.com/sdm24/3612bf588aafc46296d6 like that
19:03 ashirogl joined #salt
19:03 irctc405 Thanks, let me take a look
19:06 malinoff joined #salt
19:06 irctc405 smd24: seems that it doesn't like formatting - State 'httpd' in SLS 'webserver' is not formed as a list
19:08 DammitJim joined #salt
19:08 malinoff joined #salt
19:08 irctc405 This is the format that I have currently - https://gist.github.com/theitguy-canvas/11a3238431774dbbbf8a
19:09 aboe joined #salt
19:10 KyleG joined #salt
19:10 KyleG joined #salt
19:10 stupidnic typo? you have httpd24 and http24 in the two directives
19:10 bhosmer joined #salt
19:11 SaltySnack joined #salt
19:12 SaltySnack I tried restarting salt-master/minion and also the AWS instance
19:12 SaltySnack still not luck
19:12 SaltySnack when i run debug mode i see the following
19:12 SaltySnack [DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/master', 'ip-172-16-X-X.us-west-2.compute.internal_master', 'tcp://127.0.0.1:4506', 'clear') [DEBUG   ] Error deleting fd from IOLoop
19:13 mohae joined #salt
19:14 irctc405 sdm24: got it figured out as it was just odd formatting from pasting in. Thanks for the assistance!
19:18 zsoftich2 anyone have any experience using the fail_function with orchestrate?
19:18 Akhter joined #salt
19:18 zsoftich2 my salt.function commands always seem to succeed even when they flat out fail
19:20 kitplummer joined #salt
19:20 bhosmer joined #salt
19:20 zmalone I have no experience with orchestration, but returning success on failure is common for saltstack
19:22 zmalone zsoftich: ex. https://github.com/saltstack/salt/issues/18510 / https://github.com/saltstack/salt/issues/28433 / https://github.com/saltstack/salt/issues/28300
19:23 zmalone if you are looking for failure in order to determine whether or not to do something else, that would be very frustrating, and I'm not sure how to work around it
19:23 ajw0100 joined #salt
19:24 zsoftich2 yeah...that is why I was hoping the fail_function would be my answer...
19:25 zsoftich2 orchestration is halting correctly on failure with a salt.state call
19:25 zsoftich2 so close to having it work and it is kinda looking like I am going to have to scrap it :(
19:25 Brew joined #salt
19:26 forrest joined #salt
19:26 zsoftich2 might just rework the custom runner though...I'm going to give that a try
19:28 malinoff joined #salt
19:28 bhosmer joined #salt
19:29 iggy this master_type thing is still biting me months after it was supposedly fixed
19:29 meye1677 joined #salt
19:29 bhosmer__ joined #salt
19:30 murkey any idea why i suddenly started getting "orchestrate is nil. Not running state.orchestrate." at the end of all my salt-minion runs?
19:30 kitplummer @iggy - i see the same probs.
19:31 kitplummer supposedly, overriding that setting in profiles is the workaround.
19:31 murkey ah, it's a vagrant thing. nm :)
19:33 ashirogl joined #salt
19:34 iggy kitplummer: yeah, that's what I'm trying now
19:35 iggy after I've already had to track down 2 other bugs that really shouldn't be allowed to exist
19:40 ashirogl joined #salt
19:44 ageorgop joined #salt
19:47 malinoff_ joined #salt
19:48 malinoff_ joined #salt
19:48 kofi_ray joined #salt
19:48 kofi_ray Afternoon/Evening all
19:49 malinoff_ joined #salt
19:49 kofi_ray trying to set up a VPC on aws but I'm running into a slight problem
19:50 kofi_ray https://paste.fedoraproject.org/286195/49379614/
19:51 kofi_ray But I'm getting a KeyError: 'boto_vpc.present' error
19:51 kofi_ray However if I use the module_run, it works
19:52 ashirogl joined #salt
19:52 kofi_ray folllowing this : https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_vpc.html
19:55 aidalgol joined #salt
19:56 jqce joined #salt
19:58 whytewolf kofi_ray: what is the reply to salt 'minion' test.versions
19:58 otter768 joined #salt
20:00 baweaver joined #salt
20:00 kofi_ray whytewolf: 2015.5.5
20:00 kofi_ray thanks
20:01 whytewolf kofi_ray: states.boto_vpc has a note at the very top: New in version 2015.8.0.
20:01 rmnuvg joined #salt
20:01 kofi_ray whytewolf: I misssed that
20:01 kofi_ray Thanks so much
20:02 kofi_ray will test now
20:02 rmnuvg joined #salt
20:04 beardedeagle joined #salt
20:05 tru_tru joined #salt
20:06 s_kunk joined #salt
20:06 pyropoptrt joined #salt
20:09 _Cyclone_ joined #salt
20:12 shadowsun joined #salt
20:13 dthom91 joined #salt
20:17 dthom91 joined #salt
20:18 ajw0100 joined #salt
20:19 Zachary_DuBois joined #salt
20:20 bw joined #salt
20:22 bhosmer joined #salt
20:29 teebes joined #salt
20:30 hemebond left #salt
20:30 notnotpeter joined #salt
20:30 hemebond joined #salt
20:32 Zachary_DuBois joined #salt
20:33 shadowsun joined #salt
20:35 aparsons_ joined #salt
20:35 dthom91 joined #salt
20:40 colegatron joined #salt
20:42 MadsRC joined #salt
20:44 notnotpeter joined #salt
20:46 beardedeagle left #salt
20:52 snarfy joined #salt
20:53 catpig joined #salt
21:00 ashirogl joined #salt
21:05 trapha joined #salt
21:07 aparsons joined #salt
21:09 aparsons_ joined #salt
21:11 baweaver joined #salt
21:12 kvt_ joined #salt
21:14 kvt_ Hi folks, I tried latest salt-ssh code from the develop branch and pillars are not working for me (pillar data is empty). Previous develop snapshot from september 24 works with pillars ok. Is it a known issue?
21:15 hal58th Did you look it up kvt_ ?
21:15 kvt_ sorry, what do you mean?
21:15 hal58th https://github.com/saltstack/salt/issues
21:16 kvt_ I tried to see difference between latest code and working snapshot, but there are too many changes already
21:17 mpanetta joined #salt
21:22 kvt_ I looked through issues but I don't see description of what I see
21:23 kvt_ Do you suggest to open separate issue for this case?
21:24 hal58th Sure, just be super specific with what version you are using.
21:26 cyborg-one joined #salt
21:26 kvt_ ok, thanks
21:28 shadowsun joined #salt
21:28 dyasny joined #salt
21:29 * snarfy tries to update salt because aptpkg version comparison not working in 2015.5, upgrade fails because pkg.latest doesn't see new version. *facepalm*
21:31 hal58th snarfy, are you on debian machines?
21:31 snarfy 'buntu
21:32 ldelossa Hey guys, I'm having some trouble with running NPM with cmd.run
21:32 dthom911 joined #salt
21:32 ldelossa no environment variables are set. can I just have that cmd.run state ran in a normal shell session
21:32 ldelossa I see I can place in variables
21:33 ldelossa but I'd rather just use the default variables as if I was to login to a shell
21:34 hal58th snarfy: You'll have to read this and see what pillar data I am using, but it's pretty helpful to update salt through salt. https://gist.github.com/hal58th/0b9dffbc178b8699eba6
21:34 hal58th im using ubuntu as well
21:35 sjwoodr joined #salt
21:36 larsfronius joined #salt
21:37 hal58th apparently I forgot to finish my work with installing a specific version...
21:39 snarfy hal58th, yeah i was more pointing out the irony of trying to upgrade to get pkg.latest working, and not being able to because pkg.latest doesn't work :D
21:39 snarfy i can still cmd.run apt-get
21:39 hal58th yeap. just thought you might like this.
21:41 forrest ldelossa, Are those variables set for the specific user that is running the commands?
21:44 ldelossa Well I get an error that $HOME is not set
21:44 ldelossa I passed it in as an env entry in the state file
21:44 ldelossa all is good now
21:44 ldelossa but I'd rather not have to do that
21:44 Tyrm joined #salt
21:47 ksoviero joined #salt
21:47 billynole joined #salt
21:47 ksoviero Anyone know how one would go about appending to the end of a line?
21:47 jeffpatton1971 joined #salt
21:47 ksoviero I don't want to manage the whole since since I just need to add a few characters to the end of a line.
21:48 hemebond ksoviero: Probably sed
21:48 thebwt joined #salt
21:49 ksoviero hemebond: Like find and replace? Won't that re-apply everytime resulting in an infinite number of appends?
21:49 hemebond ksoviero: It will check every time but shouldn't replace anything if your regex is specific enough.
21:49 hal58th ksoverio you could look into file.line https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.line
21:49 ksoviero hemebond: I'll give it a shot, thanks/
21:50 teebes joined #salt
21:50 hal58th or file.replace
21:51 djinni` joined #salt
21:56 keimlink joined #salt
21:57 jqce joined #salt
22:00 aidalgol joined #salt
22:04 pyropoptrt Hey guys, I upgraded to Salt 2015.8.1 this afternoon and now everytime I try running a salt command I get the following error response "Failed to authenticate! This is most likely because this user is not permitted to execute commands, but there is a small possibility that a disk error occurred (check disk/inode usage). "
22:04 tmclaugh[work] joined #salt
22:05 ldelossa Hey guys, how can I have the jinja template engine ran on a file I'm planning on copying to a machine boefore it's copied?
22:06 ldelossa I have a systemd service with some jinja in /srv/salt/files/haraka/haraka.service
22:06 ldelossa but it just copies over the file
22:06 ldelossa doesnt' evaluate the jinja
22:06 hemebond ldelossa: How are you "copying" it?
22:06 hemebond Is it file.managed?
22:06 ldelossa file.managed
22:06 ldelossa yes sir
22:06 pyropoptrt NM, changed the root shell back to /bin/bash and rebooted and it seems that everything is working normal once agin
22:06 pyropoptrt again*
22:06 hemebond ldelossa: - template: jinja
22:06 ldelossa You the man
22:07 ldelossa I knew it was something stupid lol
22:07 zero_shane joined #salt
22:07 whatapain joined #salt
22:07 ldelossa I just want to go home already haha stil lstuck at work doing this
22:07 CaptainMagnus joined #salt
22:08 whatapain so, if i'm using salt-cloud to create a series of nodes, including a new master, how can I push all of my salt state files and configs to that new master when the instances are created?
22:08 hemebond Better than being stuck at work without using Salt :-(
22:08 hemebond whatapain: Git clone?
22:08 whatapain i'd like to do a single salt-cloud -m map.file and have it push everything up to the new master and the other minions do a highstate
22:08 hemebond I don't use salt-cloud so I'm not familiar with it.
22:08 otter768 joined #salt
22:09 whatapain hemebond: how do you add arbitrary commands to a salt-cloud deployment?
22:09 whatapain ahh
22:09 netcho joined #salt
22:10 whatapain the only way i can get it to work is to deploy my master first, then copy all my configs to the new master then add new minions
22:10 whatapain not ideal
22:10 hemebond Seems a little odd to me to automate your master build. Also seems odd to have the master in the environment.
22:11 whatapain hemebond: these are isolated enviornments per each provider so we need masters for each one
22:11 zero_shane @whatapain can you create a config-drive and attach it to the master at initilization time - using cloud-init to inject your initial state files ?
22:11 whatapain we don't want to bring every minion in each provider back to a single master or location
22:11 whatapain zero_shane: hmm, not sure.. haven't seen anything on cloud-init
22:12 big_area you could set up the masters for each environment as a syndic or proxy master back to a central server
22:12 subsignal joined #salt
22:12 big_area then sort our auth on a single master
22:12 big_area i believe the syndic/proxy will cache the states
22:13 big_area (disclaimer: haven't actually done it myself, only ready about it
22:13 whatapain big_area: yea, syndic is a good idea but again, we don't want to control anything from a central location, we want to have each provider/environment be stand alone for various reasons
22:13 eriko_ joined #salt
22:13 whatapain i'm thinking about just modifying salt-bootstrap
22:13 whatapain add a git clone as part of the make_master == true functions
22:14 whatapain now, if i deploy a master first, then deploy minions in a second command, all the minions should still communicate with the new master as long as they're in the same map file correct?
22:14 * whatapain trys it
22:15 wt joined #salt
22:15 jeffpatton1971 someone mentioned syndic, has anyone used it to manage multiple environs and how hurty was it?
22:16 big_area jeffpatton1971: that was me... I haven't actually used it that way. just read about it.
22:16 wt Is there a way to override sls files on a single minion? I know about salt-call --local, but I really want to resolve files from the master unless they exist in the directory I specify.
22:16 hemebond wt: environments
22:18 wt hemebond, with environments, would I still need to have all the files on the master?
22:18 hemebond Yes.
22:18 hemebond Well....
22:18 wt well, I'd like to not have to do that
22:19 hemebond Actually I don't know. You could perhaps have it only on the minion. That seems a little odd.
22:19 wt I'd like to override on a particular host so that I can develop a new state in isolation.
22:20 hemebond Well the minion has the full state tree when you're using salt-call, yeah? So yeah, it probably could. Though I've never used salt-call so I can't help you with the config.
22:20 big_area whatapain: there might be a less hack-y way of doing it via orchestration
22:21 patchedmonkey joined #salt
22:21 catpig joined #salt
22:21 hal58th hemebond I use vagrant and a git repo. The vagrant box has a link to the local git files
22:23 Tyrm joined #salt
22:24 wt The "--file-root" arg of salt-call looks promising.
22:25 jeffpatton1971 i think that would override whatever would normally be placed in /etc/salt/minion
22:25 wt oh....bummer
22:25 jeffpatton1971 ya, likewise for pillar-root
22:26 jeffpatton1971 no that may actually be what want i think....as that resolves out to salt://file_root
22:26 jeffpatton1971 i *think*
22:26 scooby2 Does anyone know if grains are supposed to work with salt-ssh?
22:26 whatapain big_area: i can't orchestrate from the new master without getting all the state files on the master when the master is built.  aside from adding functionality to salt-bootstrap i don't see how it's possible.
22:27 jeffpatton1971 um..yes? https://docs.saltstack.com/en/latest/ref/cli/salt-ssh.html
22:27 bgsb joined #salt
22:27 jeffpatton1971 -G is listed
22:27 hal58th scooby2, as far as I can remember, grain based targeting does not, nor assigning grains, but everything else should
22:27 scooby2 hal58th: thanks
22:27 scooby2 jeffpatton1971: hrm
22:28 hal58th hmmm maybe it does work... not sure
22:28 jeffpatton1971 @scooby2 no idea, but based on the doc's it should, if it's not working id' suggest you file a bug
22:28 big_area whatapain: are these masters going to be completely cut off from the outside.. ie all admin done from within the respective network?
22:29 big_area ruling out launching this stuff from a vagrant instance?
22:29 big_area (at least remotely)
22:29 whatapain big_area: yes, they would all be isolated.
22:29 big_area actually that might still be an option
22:30 jeffpatton1971 @scooby2 i think that will work, we don't have any of the stuff setup to allow us to use salt-ssh though,
22:30 scooby2 jeffpatton1971: just to confirm grains.ls is the right command for listing grains on a minion correct?
22:30 jeffpatton1971 aye
22:30 whatapain big_area: for now i think a two step deployment will be the best option with a static dns entry for the masters in each provider then hardcode each minion to talk to that master dns name.
22:30 jeffpatton1971 salt '*' grains.ls
22:30 whatapain big_area: how so?
22:30 jeffpatton1971 targeting salt '*' grainst.get host
22:30 scooby2 it comes back empty when going to different OS versions
22:30 scooby2 I shall open a bug
22:30 jeffpatton1971 cool
22:30 scooby2 basepi loves me already:)
22:30 sgargan joined #salt
22:31 bgsb Hello. I've not been able to find something specific about the compatibility with salt states from older to newer versions. We're currently running a master that is version 2014.1.10 for a host of reasons. We obviously need to update to the latest, but will old salt states work with the current master/minion?
22:31 jeffpatton1971 or rather not...but cool for the bug ;-)
22:32 whatapain big_area: ohh.. using vagrant as the deployment mechanism ... that might work
22:32 big_area a vagrant instance for each independent network that bootstraps the master (use it behind a vpn/fw/whatever), vagrant copies a the specific statefiles to the master which can also be used to install salt-cloud on the master
22:32 ALLmightySPIFF joined #salt
22:33 whatapain big_area: yea... https://github.com/kstaken/salt-cloud-example
22:33 big_area is the network firewalled off the net or can you pull packages from the repos
22:33 whatapain big_area: having an available repo wouldn't be a problem
22:34 big_area ya.. come to think of it i did basically the same thing but only used it as a minion for a site few months back
22:34 big_area sounds like an interesting project.
22:35 whatapain big_area: great idea, thanks.  i'll give it a try.
22:36 jeffpatton1971 @scooby2 https://docs.saltstack.com/en/latest/topics/ssh/index.html
22:38 scooby2 jeffpatton1971: thanks
22:39 wt lame: https://gist.github.com/wt/97a8c3bebcffaaa92d86
22:40 wt I can't get the file without specifying --local. In that case, I can't use the files from the master.
22:42 aidalgol joined #salt
22:42 basepi scooby2: no more bugs! ;)
22:43 wt basepi, Is what I am trying to do supported?
22:45 scooby2 :)
22:45 heaje joined #salt
22:47 basepi wt: You cannot specify file_roots for the master, from the minion. That would be a huge security risk.
22:47 heaje I'm having an issue where when salt decrypts a GPG encrypted password, it is adding a newline after the password.  From the best I can tell, this password does NOT include a newline in it (I've even re-encrypted it to be sure).
22:47 wt basepi, I want to make the minion override the files.
22:47 basepi wt: Minions can only access files the master has already included in its file_roots
22:47 heaje This is preventing me from using the salt mysql formula.  Any ideas what can be done to prevent the newline?
22:47 wt only for the minion
22:47 basepi wt: so you want to use a local file_roots but with a master connection?
22:47 wt not for everyone
22:47 wt yes
22:47 wt like the minion would provide the top layer in the file_roots
22:48 basepi Hmm, interesting idea, but unsupported, I think.
22:48 wt basepi, did you see my gist?
22:48 basepi Though you can target files via file:// instead of salt://
22:48 basepi I did.
22:48 wt oh.....file://
22:48 wt maybe I can make that work
22:48 baweaver joined #salt
22:48 baweaver joined #salt
22:49 basepi File a feature request as well. Can't promise we'll make it happen, as it's definitely an edge case, but it's an interesting edge case at that. =)
22:49 wt basepi, actually, I probably can't make that work since I want to be able to override .sls files and _states modules.
22:50 wt basepi, I was trying to go through the bugs to avoid filing a new one...but there are >3000 open ones now
22:50 basepi Yeah, I'm 95% sure combining local and remote isn't supported. Sorry.... =\
22:50 basepi Yeah, I appreciate that, but I think this is a new feature request, or at least it's a use case that's new to me.
22:50 jeffpatton1971 hey scooby2 try this
22:50 jeffpatton1971 salt-call --local --file-root=/tmp cp.get_file_str salt://kk
22:50 jeffpatton1971 i just got this to work
22:50 wt jeffpatton1971, yep, that doesn't use the master at all
22:50 jeffpatton1971 in /tmp is a file kk and when i ran that it displayed the contents
22:51 basepi Currently the file_client is either local, or remote. There's no hybrid.
22:51 wt jeffpatton1971, see my gist, I found the same thing.
22:51 jeffpatton1971 boo
22:51 jeffpatton1971 i thought i found something  helpful:-p
22:52 wt jeffpatton1971, thanks for the enthusiasm, I would love if it had worked.
22:53 opensource_ninja joined #salt
22:53 bhosmer_ joined #salt
22:57 ldelossa Hey guys, inside a state file, how can I do an "unless" which resolves the exit code of an execution module
22:58 eliasp ldelossa: unfortunately you can't… I'd love to be able to do this as well
22:58 ldelossa Basically I have NPM doing an install on a directory, resolving all depensies, but I dont' want this to run if a specific service file is started
22:58 mpanetta joined #salt
22:58 ldelossa Ahhh
22:58 ldelossa Any ideas around this then?
22:58 ldelossa I have a state which nodejs package manager installing updates, but I don'twant that to run if my nodejs application is running
22:58 eliasp ldelossa: well, you could do "- unless: salt-call --local foo.bar", but that's a bit dirty ;)
22:58 ldelossa I have it hooked up with systemd
22:59 ldelossa hmm
22:59 ldelossa that is a little hackish haha
22:59 ldelossa I'm worried about a new NPM package coming down
22:59 ldelossa and it causing a whole  bunch of issues
23:00 ldelossa I maybe able to do unless: { use npm to check for packages }
23:00 ldelossa not sure if I get an exit code if updates aren't available
23:02 ldelossa oo npm has a --dry-run let me check this out
23:02 wt basepi: https://github.com/saltstack/salt/issues/28507
23:10 wt basepi, thanks for the help
23:12 basepi Sorry I wasn't more help. =)
23:15 baweaver joined #salt
23:16 wt basepi, well, I can always dream, can't I? :P You all have been quite helpful to me. I just want more. :)
23:16 ip` joined #salt
23:20 mpanetta joined #salt
23:22 aparsons joined #salt
23:23 bfoxwell joined #salt
23:25 basepi hahaha
23:25 Saltsthack joined #salt
23:25 Saltsthack Hi all !
23:26 Saltsthack I have a small question
23:27 Saltsthack we going to build an internal App for manage our Server, based on Saltstack
23:27 Saltsthack Do you thing the version 2015.8.1 is a good choice for production ? you use it ? that good ?
23:28 joshin joined #salt
23:28 joshin joined #salt
23:33 heaje left #salt
23:36 gtmanfred it's pretty good, but https://github.com/saltstack/salt/pull/28472 won't be in until 2015.8.2 so ... /shrug
23:37 fusionx8_ joined #salt
23:39 quix joined #salt
23:41 Saltsthack Thanks, so you think we don't need use 2015.5.3 ? we're going to work on it
23:42 falenn joined #salt
23:44 forrest manfred, Next release should be sometime this month in regards to that issue you opened.
23:44 gtmanfred i know :P
23:44 forrest manfred, lol, then why did you ask in the issue :D
23:44 gtmanfred beacuse i wanted to know a better number
23:44 gtmanfred like... tomorrow
23:45 Ahlee new minion, run from bootstrap, hanging on [TRACE   ] Group list for user 'root': '[]'
23:45 wt basepi, due to my ext_pillar integration in salt, I actually have to just do another master with the another file root with the new files.
23:45 forrest manfred, You wish.
23:45 gtmanfred I AM IMPORTANT!
23:45 wt basepi, that's the only way I have found to get it to work for now.
23:45 forrest Ahlee, Booo
23:45 forrest Ahlee, Did you see if there was an issue on the bootstrap repo already?
23:45 Ahlee pfft
23:46 Ahlee this is what I get for straying from tried and true installations from packages
23:46 ashirogl joined #salt
23:47 forrest Ahlee, I don't really use the bootstrap unless I want develop, why use anything but packages if you don't need that?
23:47 Ahlee i was trying to be lazy to check out salt-broker
23:48 Ahlee and debian wanted to install 2014.something, and i apt-get clean wasn't picking up after adding the saltstack jessie repo
23:48 Ahlee so, i got lazy
23:48 forrest This repo isn't very descriptive for salt-broker
23:48 Ahlee No, no it isn't
23:51 Ahlee But, his english is better than my japanese
23:53 Deevolution joined #salt
23:54 shadowsun joined #salt
23:57 jqce joined #salt

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