Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-10-29

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

All times shown according to UTC.

Time Nick Message
00:04 alemeno22 joined #salt
00:09 Ludo- I would like :) realized my sentence was a bit harsh
00:10 Ludo- :)
00:10 Ludo- trying to troubleshoot too but it's not very critical for me right now
00:13 kinetic joined #salt
00:19 CaptainMagnus Yeah, it's not critical here either... Just annoying at times
00:26 subsignal joined #salt
00:29 thehaven joined #salt
00:35 rideh joined #salt
00:46 aparsons joined #salt
00:47 aidalgol Is it not possible to use globbing with file.remove or file.absent?
00:58 breakingmatter joined #salt
00:59 iggy aidalgol: not afaik)
01:00 subsignal joined #salt
01:08 ldelossa_ joined #salt
01:08 ldelossa_ Hey guys, I'm trying to do somethin like this: https://docs.saltstack.com/en/latest/topics/pillar/#pillar-namespace-merges
01:09 ldelossa_ however I want to do it with just a basic list object
01:09 subsignal joined #salt
01:09 scoates joined #salt
01:10 ldelossa_ http://hastebin.com/doyuyadimi.vala
01:10 ldelossa_ like that, then refrence both in pillar top file
01:10 ldelossa_ and have them merge together
01:10 quix joined #salt
01:11 ldelossa_ The idea being, have one state file responsible for installing packages, a base pillar with all base install_packages.sls file in the core pillar, and an install_packages.sls in the redis pillar
01:11 ldelossa_ and have the merge so I don't need to put all the base packages in the redis install_packages.sls
01:12 ldelossa_ It works if I use a more complex datastructure http://hastebin.com/ejixeluyob.sm
01:14 msx joined #salt
01:15 iggy develop has some more options for merging pillars, but you can't do that easily right now
01:15 scooby2 are grains supposed to work with salt-ssh?
01:16 ldelossa_ Thanks a lot iggy
01:16 iggy speifically, lists don't merge
01:16 ldelossa_ Do you have a solid way of achieving what I'm afer than
01:16 ldelossa_ I'm about to use the more complex datastructure
01:17 ldelossa_ with just no values after the key
01:17 ldelossa_ and use each key as my package name and ignore the values
01:17 ldelossa_ if I can do that with the pillar get
01:17 ldelossa_ function
01:17 iggy I assume "wait for the next release" isn't a good answer?
01:17 ldelossa_ lololol
01:18 ldelossa_ Better then "rethink your strategy"
01:18 ldelossa_ so basically for now, make two different pillars
01:18 ldelossa_ and suck it up that I'm repeating code
01:19 iggy you could have each sls add to a pkgs dict, each key would be whatever the sls set: [list, of, pkgs]
01:19 iggy I'm really not even sure if that would merge
01:19 ldelossa_ I was thinking something like that
01:19 iggy but as I understand it, it should merge if it's a top level dict
01:20 iggy I really wish I used salt on a regular basis these days, I feel like I'd know this
01:20 ldelossa_ Could I possible import the list object into the redis pillar, extract the values, and compile a new list/
01:20 sunkist1 joined #salt
01:20 ldelossa_ not toooo familira with jinja to do all this
01:20 ldelossa_ possibly*
01:21 iggy you really don't want to do this in jinja... I know a company that does something similar... it makes my eyes bleed
01:21 ldelossa_ it sounsd HORRIBLE
01:21 ldelossa_ and sounds kinda costly as far as compile time
01:22 ldelossa_ render time I guess is the more correct time
01:22 ldelossa_ term*
01:22 ldelossa_ so If I wanted to go the route of each sls adding to a pkg dict
01:23 ldelossa_ where is that pkg dict stored that both sls files can call it?
01:23 dthom91 joined #salt
01:24 quix_ joined #salt
01:28 cpattonj joined #salt
01:28 sunkist joined #salt
01:32 ldelossa_ so I got this to work, hold on
01:36 Furao joined #salt
01:36 ldelossa_ http://hastebin.com/sukebucequ.sm
01:36 ldelossa_ this seems to work for me
01:36 ldelossa_ and I'm happy with it
01:36 ldelossa_ it's a little strange that I have to have a None value in there intentially
01:36 ldelossa_ but hey, it works
01:44 iggy as I said, develop has some improved pillar merging code
01:44 iggy might make this easier, but if that works for now
01:44 iggy #shipit
01:44 ashutoshn joined #salt
01:47 Guest45650 left #salt
01:48 sunkist joined #salt
01:49 ip` joined #salt
01:53 fsteinel_ joined #salt
01:56 jmreicha_ joined #salt
01:59 breakingmatter joined #salt
02:00 zmalone joined #salt
02:02 bougie2 joined #salt
02:04 ldelossa_ yeah man for real
02:04 ldelossa_ Do you have any doc on the changes being made to merging/
02:04 ldelossa_ ?
02:04 catpigger joined #salt
02:04 ldelossa_ Git issues? Roadmaps or anything
02:08 andrew_v joined #salt
02:17 debian112 joined #salt
02:22 aparsons joined #salt
02:24 sunkist joined #salt
02:29 cpattonj joined #salt
02:33 _ikke_ joined #salt
02:36 tawm04 joined #salt
02:36 tawm04 heyo, has anyone worked with the seco range targeting?
02:37 zmalone joined #salt
02:41 tawm04 here's a gist if anyone has a few https://gist.github.com/tscanlon/6dc8e82f6bfc902b94e4
02:47 ilbot3 joined #salt
02:47 Topic for #salt is now Welcome to #salt | 2015.8.1 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
02:52 iggy ldelossa: there's nothing like that... silly
02:53 iggy aidalgol: config file
02:53 aidalgol iggy: thanks
02:54 aidalgol There still seems to be the problem of only root being able to run the 'salt' program because of permissions on /var/log/salt and /var/cache/salt.
02:55 aidalgol Does that have to be changed separately manually, or am I doing something else wrong?
03:00 favadi joined #salt
03:04 ITChap joined #salt
03:06 iggy that's the default settings, yeah
03:06 iggy if you want to open it up to others, there are a couple different steps you have to follow
03:06 iggy it's somewhere in the docs
03:06 kinetic joined #salt
03:12 racooper joined #salt
03:14 JoeJulian joined #salt
03:17 kinetic joined #salt
03:18 evle joined #salt
03:20 kinetic joined #salt
03:24 zmalone joined #salt
03:30 andrew_v joined #salt
03:42 ITChap joined #salt
03:43 quix joined #salt
03:44 quix_ joined #salt
03:47 rbjorklin joined #salt
03:49 Antiarc joined #salt
03:58 bhosmer_ joined #salt
04:01 breakingmatter joined #salt
04:01 ViciousLove joined #salt
04:14 kinetic joined #salt
04:21 ashutoshn joined #salt
04:25 malinoff joined #salt
04:26 falenn joined #salt
04:31 anmolb joined #salt
04:32 anmol joined #salt
04:49 kinetic joined #salt
04:50 hasues joined #salt
04:53 mehakkahlon joined #salt
04:58 favadi joined #salt
05:01 anmol joined #salt
05:16 writtenoff joined #salt
05:18 andrew_v joined #salt
05:18 ITChap Hi
05:19 Phtes blah devops interview tomorrow hope i nail it xD
05:19 ITChap it looks like the indentation in the config example here is wrong https://docs.saltstack.com/en/latest/ref/states/all/salt.states.rabbitmq_user.html
05:20 Phtes how so? 2 spaces looks right to me
05:20 ITChap the 3 '.*' should have one additional level of indent no  ?
05:20 Phtes no only for data dicts
05:21 rdas joined #salt
05:22 Phtes - data:
05:22 Phtes 'somekey': 'value'
05:23 calebj joined #salt
05:24 mirkop_ joined #salt
05:24 iggy joined #salt
05:24 robawt joined #salt
05:24 kinetic joined #salt
05:24 vlcn joined #salt
05:25 davisj joined #salt
05:32 ageorgop joined #salt
05:45 favadi joined #salt
05:47 hasues left #salt
05:50 ktosiek is salt using some fancier kind o yaml?
05:50 * ktosiek was pretty sure dicts are not ordered
05:52 larsfronius joined #salt
05:59 bhosmer_ joined #salt
06:01 breakingmatter joined #salt
06:02 kinetic joined #salt
06:05 ktosiek ohh, because it IS a fancier yaml.
06:08 ramteid joined #salt
06:10 akbar joined #salt
06:10 Phtes lol
06:12 msx joined #salt
06:18 linjan joined #salt
06:22 falenn joined #salt
06:25 malinoff joined #salt
06:31 rmnuvg joined #salt
06:34 iggy pyyaml will use OrderedDict if it's available afaik
06:37 kinetic joined #salt
06:56 ramteid joined #salt
07:00 keimlink joined #salt
07:04 colttt joined #salt
07:05 katyucha joined #salt
07:06 merlin` ss
07:07 shpoont joined #salt
07:11 kinetic joined #salt
07:12 felskrone joined #salt
07:17 GrueMaster joined #salt
07:32 toastedpenguin joined #salt
07:35 Fiber^ joined #salt
07:37 impi joined #salt
07:38 KermitTheFragger joined #salt
07:46 kinetic joined #salt
07:51 edulix joined #salt
07:52 zerthimon joined #salt
07:57 illern_ joined #salt
08:01 Dr_Jazz joined #salt
08:01 Dr_Jazz Hello. Using AWS and salt-cloud is it possible to specify VPC id for hosts?
08:04 keimlink joined #salt
08:04 Norrland Dr_Jazz: not sure. But last time I checked you specify which subnet-id you want to use.
08:04 Norrland Dr_Jazz: and through that you get it in the correct VPC
08:05 eseyman joined #salt
08:06 Shirkdog_ joined #salt
08:07 Dr_Jazz Norrland, right - i've started that way but got an error regarding subnet and security groups
08:09 rbjorklin joined #salt
08:16 Dr_Jazz Norrland, yeah, I am not able to succesfully set a subnetid
08:17 Norrland ok
08:17 Norrland I only helped my colleagues setting up jenkins+salt-cloud. But that's a while ago
08:17 falenn joined #salt
08:20 Dr_Jazz Norrland, seems there's an old post on the mailinglist getting the same error
08:20 kinetic joined #salt
08:22 Norrland mkay
08:28 Dr_Jazz Seems the problem comes from a parameter in the rest call being more or less hard coded
08:29 is_null hi all, i don't understand how to allow a state to fail un saltstack 2014-07
08:33 Dr_Jazz Norrland, thanks for helping, seems it helped trying to explain things, so now I fixed all my own errors :)
08:34 trph joined #salt
08:36 OliverUK joined #salt
08:37 huwenfeng joined #salt
08:38 is_null 09:26 < Dr_Jazz> Norrland, thanks for helping, seems it helped trying to explain things, so now I fixed all my own errors :)
08:38 is_null 09:26 < Dr_Jazz> Norrland, thanks for helping, seems it helped trying to explain things, so now I fixed all my own errors :)
08:38 is_null 09:26 < Dr_Jazz> Norrland, thanks for helping, seems it helped trying to explain things, so now I fixed all my own errors :)
08:38 is_null 09:26 < Dr_Jazz> Norrland, thanks for helping, seems it helped trying to explain things, so now I fixed all my own errors :)
08:39 Norrland is_null: ..
08:41 is_null sorry, my kid took over the mouse while i was on the phone xD
08:41 is_null will be more careful to lock my computer against this pirate next time
08:48 scoates joined #salt
08:49 ericof joined #salt
08:51 cberndt joined #salt
08:52 cberndt joined #salt
08:55 kinetic joined #salt
08:58 s_kunk joined #salt
08:58 s_kunk joined #salt
09:01 ViciousL1ve joined #salt
09:04 yyakob joined #salt
09:04 yyakob Hello, can someone have a look at that and tell me what I'm doing wrong please https://gist.github.com/qubusp/bd1c8627a3b7893afd49
09:06 keimlink joined #salt
09:06 cliluw joined #salt
09:07 Rumbles joined #salt
09:11 yyakob waiting
09:14 rotbeard joined #salt
09:15 colegatron joined #salt
09:15 thefish joined #salt
09:16 Kelsar joined #salt
09:17 opdude joined #salt
09:18 Norrland yyakob: be patient. Not everyone is active here.
09:19 MadHatter42 joined #salt
09:20 Xevian joined #salt
09:26 kawa2014 joined #salt
09:27 mnml_ joined #salt
09:28 Norrland yyakob: ubuntu 12.04? seem's like python-crypto is too old on that one.
09:29 yyakob it's act 14.04 in an lxc container and i just figured that for god knows what reason - they have the precise repos in the source list
09:29 kinetic joined #salt
09:29 Norrland ah
09:30 Norrland I guess that's your problem then :)
09:33 Guest76565 joined #salt
09:36 huwenfeng saltstack report augeas.setvalue was not found ? Why? I have already installed the python-augeas module
09:36 Guest76565 Hi there! How can I achive file.uncomment/comment behavior with file.replace?
09:45 larsfronius joined #salt
09:48 zerthimon joined #salt
09:48 otter768 joined #salt
09:49 bilal joined #salt
09:49 larsfron_ joined #salt
09:49 mohan_ joined #salt
09:49 mohan_ how to run a python script in the .sls file
09:52 keimlink joined #salt
09:54 amcorreia joined #salt
09:57 sgargan joined #salt
10:03 Rumbles what's the best way to find out when a module on the develop branch is likely to be brought in to the main salt branch? I am look at salt-cloud at the moment and I'm wondering when I can use it without using the develop branch...
10:04 kinetic joined #salt
10:08 netcho joined #salt
10:10 maishsk joined #salt
10:11 maishsk Hello all, anyone here?
10:13 slav0nic joined #salt
10:14 maishsk How would I pass multiple items as part of a dictionary?
10:16 maishsk https://gist.github.com/maishsk/42f37b4b9afb5a2f4f0a
10:21 symphorien mohan_: I'm not sure I have understood what you eant, but using the py renderer may solve your problem : https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.py.html
10:21 symphorien *meant
10:23 symphorien maishsk: you can make fingerprint a list
10:23 maishsk symphorien: can you give me an example please (I just cant find the correct syntax)
10:26 mohan_ I need to create a folder with current date as name there is any way to do it?
10:26 slav0nic is here any requirements list for salt states? for example pkg-install not work without python-apt package, etc
10:26 symphorien something like that ? http://xelpaste.net/DAwmgj
10:28 goldbuick__ joined #salt
10:33 _mel_ joined #salt
10:34 losh joined #salt
10:35 symphorien maishsk: I thought your gist was pillar data. This should work better http://xelpaste.net/peEcrJ
10:36 maishsk symphorien: gotcha
10:39 kinetic joined #salt
10:42 giantlock joined #salt
10:43 Rumbles joined #salt
10:44 opdude joined #salt
10:45 jhauser joined #salt
10:47 maishsk symphorien: still getting an error
10:48 maishsk http://xelpaste.net/OiWTZt
10:48 maishsk I assume I am doing something wrong (Salt newbie)
10:49 symphorien Did you refresh the pillar ?
10:49 dendazen joined #salt
10:50 maishsk I did
10:50 maishsk at least I think so
10:50 maishsk salt '*' saltutil.refresh_pillar
10:51 maishsk but I do not see anything in pillar.items
10:51 maishsk one sec
10:52 dendazen joined #salt
10:54 ponpanderer joined #salt
10:55 Kelsar joined #salt
10:56 maishsk got it to run but now receiving another error - ‘Unable to receive remote host key’
11:04 symphorien Sorry, I've never encountered this error :(
11:06 edulix joined #salt
11:08 chiui joined #salt
11:15 kinetic joined #salt
11:22 cpattonj_ joined #salt
11:22 wnkz joined #salt
11:24 seweryn joined #salt
11:29 kawa2014 joined #salt
11:29 golodhrim|work joined #salt
11:29 golodhrim|work left #salt
11:33 Grokzen joined #salt
11:44 is_null hi all, i don't understand how to allow a state to fail un saltstack 2014-077, any clue please ?
11:48 sgargan joined #salt
11:49 otter768 joined #salt
11:49 kinetic joined #salt
11:49 edulix joined #salt
11:52 breakingmatter joined #salt
11:53 Elrond joined #salt
11:57 rubendv joined #salt
11:57 Pengo joined #salt
11:58 bastion1704 joined #salt
11:59 Pengo Is there a way to move files which are already on the minion system?
12:01 bhosmer joined #salt
12:01 Norrland !help module file
12:01 wm-bot4 I'm a documentation bot. To control me, please use #salt-bot to avoid channel spam. See this URL for my commands: http://meta.wikimedia.org/wiki/WM-Bot
12:01 Norrland !module file
12:02 Norrland Pengo: file.copy for example
12:02 Pengo file.copy moves a file from master to minion or did I get that wrong?
12:03 Norrland no, it's on the minion.
12:05 Pengo Thanks
12:07 Elrond Can I insert a line into a file, if the line (or a matching regexp) isn't already there?
12:13 anmol joined #salt
12:14 giantlock joined #salt
12:20 TooLmaN joined #salt
12:22 shiriru joined #salt
12:23 rdas joined #salt
12:24 kinetic joined #salt
12:31 TyrfingMjolnir joined #salt
12:32 CeBe joined #salt
12:49 Pallando joined #salt
12:49 TyrfingMjolnir joined #salt
12:50 jdubski joined #salt
12:51 EvaSDK joined #salt
12:51 EvaSDK joined #salt
12:53 dendazen joined #salt
12:55 subsignal joined #salt
12:57 furrowedbrow joined #salt
12:59 kinetic joined #salt
13:02 racooper joined #salt
13:02 debian112 joined #salt
13:03 toastedpenguin joined #salt
13:04 JDiPierro joined #salt
13:05 mr-op5 joined #salt
13:13 Ahlee so uh, where do I start troubleshooting this?
13:13 Ahlee # ps -eaf | grep "[s]alt-master" | grep  -c "[d]efunct"
13:13 Ahlee 50
13:16 Ahlee apparently I didn't give the server long enough to restart, and those defunct processes were trying to bind to an address already in use
13:18 bhosmer joined #salt
13:21 RandyT joined #salt
13:24 wunki left #salt
13:26 fredvd joined #salt
13:31 scoates joined #salt
13:33 numkem joined #salt
13:35 kinetic joined #salt
13:36 jilya joined #salt
13:37 mage_ question: if I have the following pillar structure https://gist.github.com/silenius/35a5cd7f9d173ef2e613 is there a way to override a section in the "extra" key, based on the "part" key ?
13:38 timoguin joined #salt
13:39 timoguin_ joined #salt
13:43 winsalt joined #salt
13:48 CheKoLyN joined #salt
13:49 zmalone joined #salt
13:50 otter768 joined #salt
13:55 DammitJim joined #salt
13:57 stevednd hey all, we're looking to publish events to be communicated throughout a cluster from an unprivileged application user, but get failures opening /var/log/salt/minion and accessing the minion key. Must the user really be root to stend messages?
13:59 k00l joined #salt
13:59 k00l good morning all, im having trouble with a state that im writing for a cloud call. can any one help .. here is the error: https://gist.github.com/anonymous/0a3aedc3a5c636185f90
14:00 k00l all is good when i try to getthe new comp spun up , but it goes aray when i start defining grains. :(
14:00 dyasny joined #salt
14:01 k00l here is the state : https://gist.github.com/anonymous/0bb6f1dcb6afc9260bb7
14:01 sgargan joined #salt
14:06 quix joined #salt
14:10 kinetic joined #salt
14:15 teebes joined #salt
14:16 mpanetta joined #salt
14:18 Akhter joined #salt
14:18 dendazen Is there a way i can use regex in jinja?
14:18 dendazen or a filter
14:22 dthom91 joined #salt
14:23 Brew joined #salt
14:28 asco1aro joined #salt
14:28 kiorky joined #salt
14:30 asco1aro Would someone be able to help me out with setting up monit for saltstack?
14:30 asco1aro newbie here
14:31 mattiasr joined #salt
14:35 antpa joined #salt
14:35 sunkist joined #salt
14:38 Norrland asco1aro: give us something more specific to work with. "I've tried doing X. But I get error Y"
14:39 bastion1704 joined #salt
14:40 edulix joined #salt
14:42 asco1aro joined #salt
14:42 asco1aro I was having difficulty seeing my response so I rejoined the room...
14:42 asco1aro Sure.  I started with this configuration: https://github.com/miguelpalma/saltstack-monit-formula.  There's something wrong with my pillar setup to where it doesn't grab the variables specified in my pillar file.  Since this is the first time I've tried using pillar, I imagine it's my pillar file...
14:42 OliverUK left #salt
14:42 Phtes is your pillar file in the right env dir?
14:43 thalleralexander joined #salt
14:44 k00l good morning all, im having trouble with a state that im writing for a cloud call. can any one help .. here is the error: https://gist.github.com/anonymous/0a3aedc3a5c636185f90
14:44 k00l all is good when i try to getthe new comp spun up , but it goes aray when i start defining grains. :(
14:44 mehakkahlon joined #salt
14:44 k00l here is the state : https://gist.github.com/anonymous/0bb6f1dcb6afc9260bb7
14:44 asco1aro One of the variables that doesn't get pulled from the file is for the openssh.conf file located here https://github.com/miguelpalma/saltstack-monit-formula/blob/master/monit/files/conf.d/openssh
14:45 kinetic joined #salt
14:45 asco1aro I'm not sure if it is...
14:46 Phtes does it work if you remove the grains k00l
14:47 k00l Phtes: yes, its working to spool up the new comp, but i cant seem to transfer down a grain to it, or get any installs to work.
14:48 Phtes asco1aro: thats not a variable thats a file =/
14:48 _JZ_ joined #salt
14:49 k00l if i write the state file this way (https://gist.github.com/anonymous/892b19e1b7b651c699fe) i dont get any grains installed but it dosnt crash, just spins up the comp
14:49 deus_ex joined #salt
14:50 scoates joined #salt
14:52 dthom91 joined #salt
14:54 dendazen I am lost how to approach a problem, i have 5 or 6 net inrefaces on some hosts, in salt i have run.cmd where the argument for ip address is taken from salt pillar, but 'network.ip_addrs' shows me 6 different ips, and i need to pillar get ip based on the subnet, since I can't filter by net interfaces names since they are not consistent on each box, can i use pillar compound match in jinja file to filter ip based on small regex like ^10 or like in ansible can
14:54 dendazen use Jinja2 ‘ipaddr()’ filter?
14:54 dendazen Thank you.
14:56 ashutoshn joined #salt
14:56 Phtes k00l try making the role name a tier below role: in example 2
14:57 Phtes with a -
14:57 ashutoshn left #salt
14:57 Phtes https://gist.github.com/Phtes/549a3960bdf6c1b7742c
14:57 k00l Phtes: so just add a ' - ' to the current role ?
14:58 k00l Phtes: o i c, k ill try that right now .. thanks for the help
14:58 sgargan joined #salt
14:59 k00l Phtes: it didnt add it to the already existing VM. it did report that the VM exists, should i del that mashine and start over ?
14:59 Phtes not sure, with salt cloud if it would since you ahve cloud.present
14:59 Phtes id delete and try again
15:00 Phtes yolo
15:00 Phtes lol
15:00 k00l Phtes: ok, ill be a few mins.
15:00 quix_ joined #salt
15:00 mage_ it would be really really good if Salt uses OrderedDict by default
15:01 k00l Phtes: OK, nevermind it crashed again :(
15:02 ashutoshn joined #salt
15:05 andrew_v joined #salt
15:05 k00l Phtes: trying it now with a small change .. chnaged "- grains:" to "grains.list_present:"
15:05 colegatron joined #salt
15:08 dthom91 joined #salt
15:11 rmnuvg joined #salt
15:16 favadi joined #salt
15:16 k00l Phtes: sorry, none of those combonations are working :(
15:16 k00l Phtes: any other ideas ?
15:17 ashutoshn If say, i have a farm of servers and i don't want a state/recipe to be applied on 5 servers in that farm, how should i go about it ?
15:17 rotbeard joined #salt
15:19 seweryn joined #salt
15:19 kinetic joined #salt
15:20 mage_ {% for cpt, extra in enumerate(cfg.extras) %} ... - 'Rendering SLS ''base:apache.webapps'' failed: Jinja variable ''enumerate'' is undefined'
15:20 mage_ I hate jinja
15:23 dthom911 joined #salt
15:24 Akhter joined #salt
15:24 mattiasr joined #salt
15:24 Akhter joined #salt
15:25 conan_the_destro joined #salt
15:25 fyb3r joined #salt
15:29 robawt joined #salt
15:31 teebes joined #salt
15:32 TomJepp joined #salt
15:32 RedundancyD joined #salt
15:32 clintberry joined #salt
15:34 hasues joined #salt
15:34 hasues left #salt
15:35 onovy joined #salt
15:36 mr-op5 joined #salt
15:37 aparsons joined #salt
15:41 madpenguin joined #salt
15:43 Ahlee i hear ya there mage_
15:43 rotbeard joined #salt
15:44 Ahlee dendazen: I'm not sure I follow, you're running cmd.run some_script, with arg=['some_interface_you_want_to_pull_from_pillars']?
15:45 sdm24 joined #salt
15:46 dendazen yeah like cmd.run is something 'register_my_host.sh --ip {{ ip_value_from_pillar }} --bar foo ...'
15:46 dendazen and i can get ips with network.interface_ip eth*
15:46 Ahlee yeah, the way the network module enumerates (or, well, fails to) is gonna make that rough.
15:46 dendazen but i never know what eth it would be for this particaular network but i know the subnet i need
15:47 Ahlee I bit the bullet and wrote my own _module that contains the logic, it runs subprocess.Popen to get the routing table, consumes the ifconfig output, then emits the interface name
15:47 dendazen i know i can do C 'S@10.150.0.0/16' for examlpe to filter all the hosts
15:47 dendazen i need
15:47 dendazen but then i need to extract ip address based on that subnet value
15:48 cpowell joined #salt
15:48 hackel joined #salt
15:48 dendazen i think i should be able to get something with compound matching in the pillar sls
15:49 Ahlee probably, I haven't dove too deep in to the CIDR match
15:49 dendazen just trying to thin khow to approach to get the right interface for matched subnet and then once i know interface i can get right ip
15:50 dendazen oh i found it actually
15:50 dendazen this is from manual
15:50 jalbretsen joined #salt
15:50 dendazen https://gist.github.com/dendazen/f951a7dc8603c51c52d7
15:50 otter768 joined #salt
15:51 sdm24 Does anyone use Salt to push out .msu Windows files that aren't listed as updates? I'm trying to use Salt to upgrade Powershell on server 2008 R2 minions
15:52 dendazen this is the result
15:52 dendazen https://gist.github.com/dendazen/c93a33c075f5d8c8ca92
15:52 dendazen exactly what i need
15:52 dendazen Thanks.
15:54 dthom911 joined #salt
15:54 cpattonj joined #salt
15:55 tawm04 i spent the evening fighting with getting salt to pull info from seco range. anyone here have a moment to take a look at what i was trying? https://gist.github.com/tscanlon/6dc8e82f6bfc902b94e4
15:55 kinetic joined #salt
15:55 tawm04 the docs on the interaction are kinda sparse https://docs.saltstack.com/en/latest/topics/targeting/range.html
15:56 dthom91 joined #salt
15:58 RedundancyD joined #salt
15:59 alemeno22 joined #salt
15:59 moogyver joined #salt
16:02 meye1677 joined #salt
16:02 ekristen joined #salt
16:07 maishsk joined #salt
16:08 edulix joined #salt
16:09 ctolsen joined #salt
16:10 ldelossa joined #salt
16:10 ldelossa Hey guys, is there a way to render a jinja template to text on teh CLI
16:10 ldelossa so I can see what it looks like
16:11 raqua joined #salt
16:12 zsoftich2 joined #salt
16:12 raqua Hi all. I am new to Saltstack and I stumbled upon an issue that made me banging my head against the wall. It might be pretty obvious, but I can't find solution in docs. Let me describe it:
16:13 raqua I have configured master and minions, it works when I attempt to ping, get grains etc. I also sucessfully created some states and was able to get them working.
16:14 raqua I am now trying to get orchestration working, because I have inter-minion dependencies.
16:15 raqua my top.sls file looks like this:
16:15 raqua install_test:   salt.state:     - tgt: '*'     - sls:       - one
16:15 ldelossa using something like this www.hastebin.com
16:15 sdm24 raqua: please use gist.github.com or something similiar to post files. It makes it easier for us to read :)
16:15 DanyC joined #salt
16:15 raqua yep, sorry
16:16 sdm24 no worries. At least you didn't spam us with every line ;)
16:16 mansquib joined #salt
16:16 Ahlee dendazen: nice!
16:16 raqua http://www.hastebin.com/kelayamaqi.sm
16:16 mansquib hey y'all anyone know a bunch about salt-formulas, particularly the nginx one?
16:17 raqua in the same dir, where top.sls file is, I also have one.sls file
16:18 sdm24 raqua: https://docs.saltstack.com/en/latest/ref/states/top.html that's what your top.sls file should look like
16:18 raqua when I run salt-run state.orchestrate top I get this result: http://www.hastebin.com/jutabosena.vhdl
16:19 sdm24 raqua: or https://gist.github.com/sdm24/18f5596f67cb017f705c for your example
16:19 Ahlee What's the current state of multimaster? Still more pain than it's worth?
16:19 sdm24 oh wait you are doing orchestration. I don't work with that, sorry
16:19 breakingmatter joined #salt
16:20 ldelossa Guys if I have my top.sls targeting '*' and a few states underneath. And then I do an explict target of 'client01p' and a different state other there. Are the states under '*' still applied to client01p ?
16:20 raqua sdm24: that top file works for non-orchestration files .. at least to my understanding.
16:20 raqua yep, orchestration seems to work differently.
16:20 sdm24 raqua: yeah, my mistake
16:20 whytewolf ldelossa: yes.
16:21 DanyC hi all, quick q about gpg: so i get the idea of having my pillar data defined with the right render and the master will decrypt the cipher before sending the data to minion. Anyone has a better option on how to achive this w/o having to store the private key on the master?
16:21 ldelossa whytewolf, so I'm having trouble if I want to have a base configuration of say, sysctl.cfon, but then I have another client who needs to overwrite that state
16:21 ldelossa How would one accomplish that?
16:21 ldelossa I want there to be a baseline of states, but I want specific servers to be able to over-write that baseline configuration if necessary
16:22 DanyC the use case i have is dead simple: all the pillar data (password.sls) i want to store it on git and then pull it down via ext_pillar on master and send it to minions
16:23 raqua I have tried also making directories and putting sls there, but no luck :(
16:23 whytewolf raqua: what is your end goal?
16:24 raqua whytewolf: I have a bunch of application servers, that are load balanced and I want to get them stopped, reconfigured, deploy new version of our app and then start again one after the other, so we have no downtime.
16:25 sdm24 ldelossa: salt will run the top.sls highstate in order, generally (unless other requisites, includes, etc. are in your states). To have salt overwrite one state with another, just list it below in top.sls. Ideally though, '*' would be the states that every server gets, and use pillar/grains/etc. to fine tune
16:25 whytewolf raqua: and you want to use orch for that, but you just tossed your top file at orch?
16:26 ldelossa sdm24 - thanks. But essentially if it runs it in order, I'm needly copying my sysctl.conf file and updating it, twice
16:26 tmclaugh[work] I’m running a command using cmd.run across a large subset of hosts.  Is it possible to have salt only list the hosts that returned output?
16:26 raqua whytewolf: I am starting from scratch, no states are written yet. This is just my test case. I created top file and then want to have multiple sub-sls files to do the work.
16:26 whytewolf raqua: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html look at the bottom here for how an orchestration file is put together
16:26 Ahlee tmclaugh[work]: salt --state_output=changes
16:27 whytewolf raqua: orch is compleatly different from highstate.
16:27 writtenoff joined #salt
16:28 tmclaugh[work] Ahlee: Doesn’t seem to do it with cmd.run
16:28 raqua whytewolf: I was looking at that page whole day... :) But there is nothing said about how the files should be placed on disk. I believe, that I have it correctly in my top.sls, yet it does not work.
16:28 whytewolf raqua: orch does not use top
16:28 Ahlee tmclaugh[work]: ah, bummer
16:29 sdm24 ldelossa: one thing I do, is if its just .conf files and the like that need to be changed, is have multiple templates, and in the file.managed states, use jinja. ex: if Ubuntu and Debian have different conf files for the same program, under file.managed: source: {{ grains['os'] }}conf.template
16:29 sdm24 and then have a Ubuntuconf.template and Debianconf.tempalte
16:29 dendazen What  am i doing wrong?
16:29 dendazen Can someone take a look?
16:30 whytewolf raqua: the orch files are just state like files that go in the state tree
16:30 kinetic joined #salt
16:30 whytewolf and you call them with the orch runner
16:30 aparsons joined #salt
16:30 raqua whytewolf: but my top is specified in my call: "salt-run state.orchestrate top" and it is used, because my top then references one.sls, which is not found. Maybe if I rename it, it won't matter, I just called it top. But I don't think that is the problem.
16:30 ldelossa thanks sdm24
16:31 kinetic joined #salt
16:31 whytewolf raqua: that is the problem. top files and orchestration files are compleatly different.
16:31 whytewolf raqua: what does your top file look like
16:32 raqua whytewolf: my "top" file: http://www.hastebin.com/kelayamaqi.sm  and the output: http://www.hastebin.com/jutabosena.vhdl
16:32 sdm24 ldelossa: no problem. If your minions have a good naming convention, you can also do {% if grains['id'].startswith = 'web' %} source: webconf.template {% else %} source: maintemplate.conf {% endif %}
16:32 DanyC any ideas pls ?
16:32 raqua whytewolf: top.sls and one.sls are in the same folder, which is specified as "base" in master config
16:33 whytewolf raqua: okay. my mis understanding. based off your naming convention. top.sls is normally what highstate uses. I would rename your top.sls
16:34 raqua whytewolf: I renamed it to "stop.sls" and it behaves the same way
16:35 whytewolf raqua: I didn't say that would fix it, but it helps keep things less stressful when you move on to calling highstates from orchestrate
16:35 bhosmer joined #salt
16:35 ldelossa sdm24 there's nothing stopping me from doing what you just said in a map.jinja file right?
16:35 whytewolf raqua: now to find out why one.sls isn't being seen
16:35 mehakkah_ joined #salt
16:36 whytewolf raqua: from the master. does this list your 2 files? salt-run fileserver.dir_list
16:37 raqua whytewolf: The output of that command is "- ."
16:38 whytewolf raqua: so that would be a no.
16:39 ghanima joined #salt
16:39 whytewolf raqua: is file_roots: set to the location of your 2 files?
16:39 markm joined #salt
16:40 hasues joined #salt
16:43 raqua whytewolf:  no, the files are in the default location /srv/salt/states that is configured in /etc/salt/master
16:44 sdm24 ldelossa: nope, in that case, the map.jinja would be something like {% if grains['id'] = 'webserver' %} {% set template = 'webtemplate.conf' %} {% else %} {% set template = 'maintemplate.conf' %}, and then in your .sls file, have - source: {{ template }}
16:46 whytewolf raqua: humm, check permissions than. make sure salt can read the files.
16:46 whytewolf raqua: also check logs for any errors in reading files
16:47 raqua whytewolf:  I run salt master as service on Centos, I thought it runs as root
16:47 aron_kexp joined #salt
16:47 whytewolf raqua: ... check selinux policies
16:47 EvaSDK joined #salt
16:47 jmreicha joined #salt
16:48 kinetic left #salt
16:48 ldelossa perfect that works for me - thanks.
16:50 Heartsbane joined #salt
16:51 ViciousLove joined #salt
16:53 hasues left #salt
16:54 TyrfingMjolnir joined #salt
16:54 cpattonj joined #salt
16:57 Akhter joined #salt
16:58 mattiasr joined #salt
16:58 keimlink_ joined #salt
17:00 riftman joined #salt
17:01 cpattonj joined #salt
17:01 maishsk joined #salt
17:01 ashutoshn left #salt
17:01 morissette joined #salt
17:02 Diaoul joined #salt
17:02 raqua whytewolf: SE linux was set to permissive, but I disabled it and rebooted and it started to work. However, when I set it back to permissive, it works anyway. No idea why, but reboot seemed to fix it.
17:02 cberndt joined #salt
17:02 raqua whytewolf: thanks anyway :)
17:03 Akhter joined #salt
17:03 morissette Anyone able to advise me on troubleshooting: http://pastie.org/10516314
17:04 morissette nothing is logged on master or minion
17:04 clintberry joined #salt
17:07 whytewolf racooper: who knows, selinux can be a huge pain
17:08 morissette this is from master log: http://pastie.org/10516320
17:12 SheetiS joined #salt
17:14 traph joined #salt
17:14 traph joined #salt
17:15 baweaver joined #salt
17:17 bastion1704 joined #salt
17:17 malinoff joined #salt
17:19 dthom91 joined #salt
17:19 dendazen hi guys if
17:20 dendazen i call in salt this salt 'uat-hayk.sec1.example.com' network.ip_addrs 'cidr="10.150.0.0/16"'
17:20 dendazen will that translate to salt['network.ip_addrs']('cidr="10.150.0.0/16"')
17:20 dendazen in jinja file?
17:21 dendazen the problem is i get [] in return from jinja
17:21 dendazen but via shell i get the ip
17:21 whytewolf dendazen: salt['network.ip_addrs'](cidr="10.150.0.0/16")
17:21 dendazen Oh, thanks.
17:22 Akhter joined #salt
17:23 zmalone joined #salt
17:23 aron_kexp joined #salt
17:23 mohae joined #salt
17:26 lexter joined #salt
17:27 sunkist joined #salt
17:28 ipmb joined #salt
17:29 ipmb How can I install 2015.5.2 on Ubuntu? It looks like it doesn't exist in the official PPAs anymore
17:29 anotherZero joined #salt
17:29 ipmb trying to workaround https://github.com/saltstack/salt/issues/26115 without changing all my states
17:29 dthom91 joined #salt
17:29 jcockhren ipmb: use the git option when using the bootstrap script
17:30 jcockhren ipmb: pip is another option
17:30 ipmb will that be problematic when I want to jump back to the official version?
17:31 jcockhren I don't think so. The only real difference is that with the official version: 1. you get upstart scripts and 2. you get salt rules for ufw
17:32 jcockhren rollbacks are best handled using the pip or git versions
17:33 jmreicha_ joined #salt
17:33 Lionel_Debroux joined #salt
17:35 ponpanderer joined #salt
17:36 Akhter joined #salt
17:38 chiui joined #salt
17:39 Elrond left #salt
17:42 DanyC hi, i'll ask one more time hoping someone knows and willing to answer (thanks in advance!) :i get the idea of having my pillar data defined with the right render and the master will decrypt the cipher before sending the data to minion. Anyone has a better option on how to achive this w/o having to store the private key on the master?
17:43 maishsk joined #salt
17:43 ktosiek you need *a* pricate key on master for this
17:43 ktosiek s/pricate/private/
17:44 ktosiek or you have to use something like hashicorp vault for secret storage (and have a whole ceremony for restarting the secrets server). But that still keeps the keys in memory
17:45 * ktosiek has no idea about salt, it's just the general principals of how things work
17:46 Akhter_ joined #salt
17:49 Ahlee You need a way to decrypt
17:49 Ahlee Either a key, or a user/password
17:50 workthrick joined #salt
17:51 conan_the_destro joined #salt
17:51 workthrick hiya, I'm having trouble creating an empty state. I want to do that to test that my skeleton setup of salt is valid, but I don't want it to do anything
17:51 workthrick running in masterless mode
17:51 otter768 joined #salt
17:52 whytewolf workthrick: instead of an empty state. try a state that has test states inside https://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html
17:52 Ahlee workthrick: https://github.com/saltstack/salt/blob/develop/salt/states/test.py#L69
17:52 Ahlee what whytewolf said
17:53 workthrick tried that, I get "SLS common does not render to a dictionar"
17:53 workthrick https://gist.github.com/mathrick/2a0bc4767925be30bef2
17:54 djstorm joined #salt
17:54 whytewolf workthrick: drop the - in front of noop
17:54 workthrick oh
17:55 workthrick whytewolf: "ID noop in SLS common is not a dictionary"
17:55 whytewolf workthrick: drop it infront of test.nop also
17:55 workthrick should I also drop - in front of test.nop?
17:56 DanyC ktosiek, Ahlee - sure indeed but having the master key in the master .... i have another issue :))
17:57 ktosiek well, the master needs some key to read whatever date it will send to minions
17:57 workthrick whytewolf: OK, it parses now, but dies with unhandled exception, KeyError: 'test.nop'
17:57 ktosiek and that's a common problem for all CM systems :-P
17:57 workthrick running 2015.5, for the record
17:58 DanyC ktosiek: right! Any idea how you could get the valut integrated with master? is it via ext_pillar ?
17:58 whytewolf workthrick: see the note that nop was added in 2015.8.1
17:58 workthrick ooh
17:58 ktosiek no idea, probably by writing a custom pillar
17:58 workthrick OK, so I should use always_succeeds_*?
17:59 workthrick awesome, it works now
17:59 workthrick thanks!
18:00 DanyC ktosiek: i see, thanks ! on a different subject - in the pillar sls file, any idea how you can automate the gpg cipher insertion? cause i get is a multiline from yaml side but haven't find a way to "inject it" yet
18:00 shpoont joined #salt
18:01 maishsk joined #salt
18:04 dthom91 joined #salt
18:05 furrowedbrow joined #salt
18:06 cpowell joined #salt
18:06 ashutoshn joined #salt
18:10 dthom91 joined #salt
18:13 baweaver joined #salt
18:17 hackel joined #salt
18:20 pmcnabb Is there a way to set configuration options (e.g. "cachedir") for salt-call outside of the config file? Maybe via an option or environment variables?
18:25 maishsk joined #salt
18:29 turisti joined #salt
18:30 dthom91 joined #salt
18:37 stevednd hey all, we're looking to publish events to be communicated throughout a cluster from an unprivileged application user, but get failures opening /var/log/salt/minion and accessing the minion key. Must the user really be root to stend messages?
18:38 sjorge joined #salt
18:38 sjorge joined #salt
18:42 mattiasr joined #salt
18:45 dendazen when i run something like this:
18:46 dendazen cmd.script: - source: salt://packages/zabbix-agent/files/zabbix-agent-register.sh
18:46 dendazen - args: "-l sec1 -h "{{ hostname }}" -i "{{ our_ip }}" -g "{{ host_group }}" -t "{{ template }}""
18:46 dendazen - shell: /bin/bash
18:46 dendazen i get an error
18:47 dendazen https://gist.github.com/dendazen/99b8a8f4e68ba97c8608
18:48 dendazen am i using quotes weird, i need to preserve the quotes in expanded values
18:48 dendazen for shell to process args correctly
18:48 maishsk joined #salt
18:49 rubendv joined #salt
18:52 traph joined #salt
18:52 traph joined #salt
18:53 sjorge joined #salt
18:53 sjorge joined #salt
18:54 sdm24 dendazen: use ~ to concatenate strings. i.e. - shell: " "-l sec1 -h "~ {{ hostname }}~"...
18:54 sdm24 oops one extra " in there
18:55 dendazen fo every value like that?
18:55 dendazen where is it in the docs?
18:56 dendazen let me try it
18:56 sdm24 dendazen: wait, thats for concatenating inside jinja
18:57 dendazen yeah, i am doing it in sls file
18:58 sdm24 dendazen: one way, not sure if its the best way, is to have, for example, {{ hostname}} and then {% set hostname2 = '"'~ hostname ~'"' %}. That will set hostname2 = "hostname"
18:58 dendazen oh my
18:59 sdm24 yeah like I said, probably not the best way to do it
18:59 sdm24 but I have done it that way before, especially when dealing with nested quotes
18:59 dendazen otherwise salt will strip of those quotes?
19:01 sdm24 dendazen: well if you need the double quotes around eacha rg
19:01 sdm24 each arg
19:02 mehakkahlon joined #salt
19:02 sdm24 but depending on how you are getting your variables, you could just simplify it to {% set hostname = '"'~ grains['host']~'"' %}, if that is how you get hostname
19:03 zsoftich2 can't rememer...can't you just escape quote \"
19:03 zsoftich2 "\""
19:04 fyb3r can the python renderer be used in a reactor
19:04 mpanetta joined #salt
19:04 aron_kexp joined #salt
19:05 fyb3r ie can I have a sls file with the #!py inside it and have it execute the run() function
19:05 notnextdoorgirl joined #salt
19:06 sdm24 dendazen: another simple solution that might work is - args" '-l sec1 -h "'{{ hostname }}'" -i "'{{our_ip ))'"....
19:06 sdm24 so that way salt will still render the jinja, and each printed variabled will be surrounded by double quotes
19:06 otter768 joined #salt
19:06 chiui joined #salt
19:07 dendazen oh
19:07 ry joined #salt
19:07 sdm24 yeah that seems way simpler. Sorry i didnt think of that first haha
19:07 iggy fyb3r: if not, it's a bug
19:07 dendazen so args: " '-l ....'"?
19:07 fyb3r iggy, ill do some further testing before I report anything on it. I just wanted to make sure that reactors were designed to allow that first
19:08 sdm24 ' first, to escape all non-jinja phrases. That way it will add the " in, but then print the jinja, and then add the trailing " in
19:11 dendazen ok, thanks.
19:12 sdm24 dendazen: https://gist.github.com/sdm24/fcec89df4b0bff88e7ca I think that should work
19:13 dendazen Thank you.
19:15 fyb3r well the python renderers work in reactors. Ive just screwed up my code somewhere >_>
19:16 iggy glad my statement was true
19:16 teebes joined #salt
19:17 fyb3r me too :) now to just figure out what I screwed up haha
19:21 rhodgin joined #salt
19:26 NV joined #salt
19:29 dendazen hmm same error
19:30 dendazen https://gist.github.com/dendazen/f9130f1fc8406784be0d
19:31 dendazen maybe i am doing something wrong this is my state part
19:31 dendazen https://gist.github.com/dendazen/722d751b77308f1bce50
19:33 baweaver joined #salt
19:33 larsfronius joined #salt
19:35 sdm24 dendazen: hmm not sure. Maybe try the other method. It seems the issue is that its only reading that first part before the jinja
19:36 dendazen i am trying with -name: my_script "and my args"
19:36 sdm24 if you are doing that
19:37 sdm24 hold on let me look up my state where I have that and deal with quotes args
19:37 sdm24 - name : >
19:38 sdm24 command -l
19:38 sdm24 on a new line like that, so salt won't think the surrounding quotes are the only part it should read
19:39 dendazen oh ok
19:40 cpowell joined #salt
19:40 dendazen so -name:
19:41 dendazen and then command -l ...
19:41 dendazen on the new line
19:41 tawm04 heyo, i've been trying to get salt to use range for targeting and here is what i've tried so far anyone have any other ideas? https://gist.github.com/tscanlon/6dc8e82f6bfc902b94e4
19:43 sdm24 dendazen: you need to include the > after name. That's how salt knows to look for the whole properly-whitespaced string
19:43 chiui joined #salt
19:43 dendazen oh ok
19:44 dendazen like this would be fine?
19:44 dendazen https://gist.github.com/dendazen/a6261a271aeedc2c5b24
19:45 dendazen with the quotes around vars
19:46 sdm24 dendazen: yeah. do you need quotes around the vars? Have you tried it without?
19:46 baweaver joined #salt
19:47 dendazen i need yeah, otherwise my bash script will screw up, since i have white spaces in my var expansions
19:47 sdm24 and you want to space it so that the command is under the "m" in name
19:47 dendazen yeah that indent i did
19:50 sdm24 dendazen: and for the quotes, just put '"' (single-quote double-quote single-quote) before and after each {{ jinja }} call
19:50 sdm24 and I think that should hopefully do it
19:50 dendazen ok let me try
19:53 sdm24 in fact, maybe just putting single or double quotes around each tag might work
19:55 truGrok joined #salt
19:55 fyb3r iggy, got them working. dunno what I did wrong initially but I got it fixed
19:56 truGrok Hi All, Im trying to copy a file from the master server to a minion thats about 50 megs. Ive added the base path /tmp/files to file_root. And when I attempt to rsync via,
19:56 mehakkahlon joined #salt
19:56 truGrok 'salt '*' rsync.rsync /tmp/files/test.log /opt/backup' I get back
19:56 truGrok "rsync: change_dir "/tmp/files" failed: No such file or directory"
19:56 truGrok Not sure what im doing wrong, or if I should be executing rsync via a command to have them pull from the master daemons box
19:58 ajw0100 joined #salt
19:58 sdm24 truGrok: if /tmp/files is in file_roots, you might need to try "salt '*' rsync.rsync salt://test.log /opt/backup"
19:59 sdm24 I don't use the rsync module, so I'm not familiar with what standads it uses. Sorry
20:01 sdm24 truGrok: but "salt '*' file.manage_file /opt/backup/test.log salt://test.log" should also move the file from the master to /opt/backup on every minion
20:01 dthom91 joined #salt
20:02 truGrok nice, ill give it a shot
20:02 sdm24 https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.move if you need to set other options (permissions, owner, etc)
20:03 cpowell_ joined #salt
20:03 dendazen it seems
20:04 dendazen like salt doesn strip single quotes
20:04 dendazen i need them to be gone
20:04 opensource_ninja joined #salt
20:04 dendazen Name: zabbix-agent-register.sh -l sec1 -h '"uat-hayk.sec1.example.com"' -i '"10.150.40.153"' -g '"Linux servers"' -t '"Template HC Mounted Filesystems,Template HC"'
20:04 dendazen - Function: cmd.script - Result: Changed
20:04 dendazen that is the result
20:04 dendazen but nothing happens script doesnt run properly
20:04 dendazen and if i run this manually my script fails
20:05 dendazen needs to be like this but only with double quotes.
20:05 dendazen maybe doing ~"..."~ in pillar is the best way as you said earlier
20:05 cberndt joined #salt
20:06 JDiPierro joined #salt
20:06 pfallenop joined #salt
20:06 sdm24 yeah, oh well. I was hoping it would be easier/cleaner
20:06 zsoftich2 dendazen: did you try esacping the quote?
20:06 JDiPierro Is there a way to have file.exists wait a bit incase the file shows up, or retry with a delay? I've got to use runit and it creates some files that I need to wait for.
20:06 sdm24 you can even do it in the state, just do your jinja at the at
20:06 sdm24 at the top*
20:07 linjan joined #salt
20:08 dendazen_ joined #salt
20:09 cpowell joined #salt
20:12 pfallenop joined #salt
20:14 s_kunk joined #salt
20:15 truGrok sdm24: file managed worked great
20:16 sdm24 truGrok: good to hear
20:17 shpoont joined #salt
20:17 Dev0n Hey, is there a way to capture the end result of a highstate run? I'm hoping to listen for this event and post something using the slack module.
20:19 shpoont joined #salt
20:19 JDiPierro Dev0n: I think you'll want the slack_returner for that: https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.slack_returner.html
20:20 traph joined #salt
20:21 pfallenop joined #salt
20:22 Dev0n thanks JDiPierro, I'll look into this
20:23 slav0nic joined #salt
20:24 tmclaugh[work]_ joined #salt
20:25 dthom91 joined #salt
20:26 zsoftich2 sdm24: dendazen left, but I just tested it out and escaping the quote seemed to work in my test, though I did test it with the orchestration runner
20:26 zsoftich2 https://gist.github.com/zls/857f161dec40cbe2da3b
20:27 sdm24 zsoftich2: oh cool
20:31 giantlock joined #salt
20:31 MeltedLux joined #salt
20:31 jmreicha joined #salt
20:35 cpowell_ joined #salt
20:36 k00l hey all, can anyone help me work with salt.mine?
20:36 zmalone joined #salt
20:36 k00l trying to set the network.ipaddrs however its keeps returning false.
20:37 zsoftich2 k00l: did you restart minion after setting the mine_function?
20:38 jeffpatton1971 joined #salt
20:38 dendazen_ what?
20:38 dendazen_ what worked?
20:38 dendazen_ i am still here
20:38 dendazen_ I can't get it to work still
20:40 dendazen_ why are there 3 slashes?
20:40 dendazen_ \\\"{{ foo }}\\\"
20:41 zsoftich2 I had to escape the escape
20:42 Gi0 joined #salt
20:42 zsoftich2 https://gist.github.com/zls/857f161dec40cbe2da3b <--added a comment to hopefully clear it up
20:42 zsoftich2 in your case you should only need \"
20:43 dendazen_ oh ok
20:43 zsoftich2 for the example I had to quote what I wanted to echo to get echo to observe the escaped quotes...so I had three levels of double quotes
20:44 dendazen_ so in my case it would be
20:44 aparsons joined #salt
20:44 dendazen_ - args: "-l sec1 -h \"{{ hostname }}\" -i \"{{ our_ip }}\" -g \"{{ host_group }}\" -t \"{{ template }}\""
20:44 zsoftich2 yep
20:45 k00l zsoftich2: no i didnt because the minion returned False.
20:45 otter768 joined #salt
20:45 linjan_ joined #salt
20:45 zsoftich2 k00l: the first time you "enable" mine_functions you pretty much have to restart the salt-minion to get them to work
20:45 dendazen_ let me try
20:46 alvinstarr joined #salt
20:46 dendazen_ i am already spent like 4 hours today on this
20:46 k00l zsoftich2: heres teh sting I used : salt "test*" mine.send network.ip_addrs eth0
20:48 zsoftich2 k00l: sorry. I've never used mine.send before. but when I tested without the interface it returns True
20:48 k00l what do you menan by that ?
20:49 k00l zsoftich2: what do you menan by that ?
20:49 dendazen_ Executing job with jid 20151029204729572741
20:49 dendazen_ when this stucked somewhere
20:49 dendazen_ can i see somekind of log
20:49 dendazen_ on the minion or master?
20:49 Ahlee Salt logs to /var/log/salt/{master,minion} by default
20:50 Ahlee I recommend increasing verbosity to debug
20:50 zsoftich2 k00l: I have no idea how mine.send works...I've always just enabled it in pillar and used mine.get
20:50 k00l can you point me into some documentation to assist in that ?
20:50 k00l zsoftich2: can you point me into some documentation to assist in that ?
20:51 zsoftich2 k00l: https://docs.saltstack.com/en/latest/topics/mine/
20:53 Guest15921 joined #salt
20:55 zsoftich2 dendazen_: it can be helpful to run from the minion itself with 'salt-call state.highstate -l debug'
20:56 aidalgol` joined #salt
20:57 dendazen_ oh you are right
20:59 fyb3r when a reactor using the py renderer is called, is there a way to access the event data from within the reactor
21:01 mohae joined #salt
21:03 tmclaugh[work]_ joined #salt
21:04 dendazen_ so it got stuck at this
21:04 dendazen_ with debug
21:04 dendazen_ [INFO    ] Executing command '/tmp/tmpo16_8Z -l sec1 -h "uat-hayk.sec1.example.com" -i "10.150.40.153" -g "Linux servers" -t "Template HC Mounted Filesystems,Template HC"' as user 'root' in directory '/root'
21:04 dendazen_ all args are great
21:05 venu0336 joined #salt
21:05 dendazen_ tmp/tmpo16_8Z
21:05 dendazen_ is the bash script
21:05 zsoftich2 executable?
21:05 dendazen_ well there is
21:05 dendazen_ #!/bin/sh
21:05 colegatron joined #salt
21:06 dendazen_ but not sure about permissions
21:06 dendazen_ in cmd.script i stated
21:06 dendazen_ shell: /bin/bash
21:06 hemebond joined #salt
21:07 dendazen_ if i run that command but with bash /tmp/tmpo16_8Z -l sec1 -h "uat-hayk.sec1.example.com" -i "10.150.40.153" -g "Linux servers" -t "Template HC Mounted Filesystems,Template HC"
21:07 dendazen_ it works
21:07 zsoftich2 ahh...it isn't executable then...the shebang line wont be read if it isn't executable
21:08 zsoftich2 would be my guess...gl though...gotta run
21:08 dendazen_ oh thank you
21:08 dendazen_ how would i make it executable?
21:13 zsoftich2 change the source file? chmod a+x <source_file>
21:17 shpoont joined #salt
21:18 dthom91 joined #salt
21:20 shpoont joined #salt
21:21 mimianddaniel joined #salt
21:22 dthom91 joined #salt
21:22 mimianddaniel anyone know of way to send events and dont get returns back to the master ?
21:23 mimianddaniel ie returner that does /dev/null
21:23 k00l hey gang, is this the correct way to loop through my minions ? : {% for server in salt['grains.get']('roles:web') %}
21:23 mimianddaniel writing this returner is a trivial .. just wondering if there is an option like that already
21:25 shpoont joined #salt
21:27 shpoont joined #salt
21:28 turisti joined #salt
21:33 hemebond k00l: I don't believe that will work.
21:33 k00l anyone know how i can loop through my minions in a state file ?
21:33 dyasny joined #salt
21:33 k00l hemebond: yeah its not working :)
21:34 Akhter joined #salt
21:34 aw110f joined #salt
21:35 hemebond k00l: Personally I would use a static list in a pillar to do it.
21:35 hemebond But...
21:35 hemebond There possibly is a way to do it automatically.
21:35 hemebond Using salt mine.
21:35 shpoont joined #salt
21:36 k00l lol, im having some real trouble using salt.mine
21:36 k00l hemebond: i want to loop through newly created comps that are created by cloud so it needs to be automatic
21:36 hemebond k00l: You might want to look at reactors then.
21:37 hemebond So that when a new server comes online a state is executed to do something.
21:37 hemebond k00l: http://stackoverflow.com/a/31918325
21:38 k00l hemebond: thanks for the direction mate. ill do that :)
21:38 hemebond Good luck :-)
21:38 k00l hemebond: hehe yeah ill need it :)
21:48 SheetiS joined #salt
21:57 clintberry joined #salt
21:58 baweaver joined #salt
22:01 jdubski joined #salt
22:02 viq joined #salt
22:22 aparsons joined #salt
22:29 drawsmcgraw left #salt
22:31 bhosmer joined #salt
22:34 aparsons_ joined #salt
22:35 sbz joined #salt
22:38 Gi0 joined #salt
22:44 Nazca__ joined #salt
22:45 DanyC joined #salt
22:47 clintberry joined #salt
22:55 voileux joined #salt
23:00 deedubs joined #salt
23:04 ekristen joined #salt
23:05 aparsons joined #salt
23:12 aparsons joined #salt
23:22 sylvain joined #salt
23:23 ponpanderer joined #salt
23:25 Guest64072 hi, getting GPG unavailable when running salt-call in a masterless setup
23:26 Guest64072 this is on a mac os x, and I wonder if that could be because python-gnupg is not being used
23:27 Guest64072 at the top of a pillar sls file I have: #!yaml|gpg
23:28 aparsons joined #salt
23:28 Guest64072 if I remove gpg, then "salt-call --local pillar.get something" works
23:29 hemebond Guest64072: Do you have python-gnupg installed?
23:29 Guest64072 (I mean: not GPG error occur, but obviously, the encrypted pillar data is not decrypted)
23:30 Guest64072 yes, I installed python-gnupg
23:30 Guest64072 after the saltstack install though
23:30 hemebond What is the error you get?
23:30 Guest64072 I installed saltstack via brew
23:30 Guest64072 then realized python-gnupg was required instead of normal gpg
23:31 Guest64072 "[CRITICAL} Rendering SLS 'pillar_file' failed, render error: GPG unavailable"
23:32 hemebond And you've done everything on https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html ?
23:32 Guest64072 I wonder how can saltstack use python-gpg instead gpg
23:32 Guest64072 I have but installed
23:32 hemebond You have "but" installed?
23:32 Guest64072 moreover python-gpg was installed via pip, at system level
23:33 Guest64072 sorry: both
23:33 hemebond If you have both installed then you might have a module conflict.
23:33 Guest64072 actually: gpg, gpg2, python-gnupg
23:33 hemebond From a python console can you import python-gpg?
23:33 Guest64072 one sec
23:33 hemebond *python-gnupg
23:35 larsfronius joined #salt
23:35 Guest64072 yes
23:36 Guest64072 e.g.: import gnupg; gnupg.__version__;  '0.3.8'
23:36 Guest64072 works
23:36 Daemonik joined #salt
23:36 hemebond pip freeze | grep gnupg
23:36 hemebond (from cli, not python console)
23:36 Daemonik Can two salt-minions with different minion_id have the same priv/pub keypair?
23:37 Guest64072 python-gnupg==0.3.8 is what I get
23:37 hemebond Daemonik: You can try but I suspect it might try to match on a hash or something. Try it.
23:38 hemebond Guest64072: salt-call cmd.run 'pip freeze | grep gnupg'
23:40 Guest64072 I also get python-gnupg==0.3.8
23:40 hemebond Well, it looks like it is available. So you've done everything else on that documentation page?
23:40 Guest64072 with a bit more text that I can paste in a few secs ... just need to swicth computer
23:40 zmalone joined #salt
23:40 hemebond As long as it found only that one module, it's fine.
23:41 Guest64072 the salt.renderers.gpg page. yes
23:41 mohae joined #salt
23:41 Guest64072 ok
23:41 Guest64072 two details
23:41 hemebond I don't use gpg myself so I don't know how to help further.
23:41 Guest64072 ah ok
23:42 Guest64072 thanks for your help
23:43 Jimlad joined #salt
23:44 whytewolf Guest64072: sometimes, it helps to check the code. and find out why it might be returning GPG unavailable. such as even though it says it needs python-gnupg. it also needs gpg to be in the path. https://github.com/saltstack/salt/blob/develop/salt/renderers/gpg.py#L232-L240
23:45 Guest64072 true -- good point - thanks!
23:49 woodtablet joined #salt
23:49 woodtablet hey guys, i am trying to add something to the docs, and i want to reference this page: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.service.html#module-salt.states.service
23:50 woodtablet i want to do it like everyone else does with these cool tags like ":ref:`state-declaration` "
23:50 woodtablet but i havent figured out how
23:54 clintberry joined #salt
23:59 bfoxwell joined #salt
23:59 aaron joined #salt

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