Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-03-28

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

All times shown according to UTC.

Time Nick Message
00:03 DEger joined #salt
00:06 gtmanfred badgerops: i do not believe it is possible to go deeper than the top level entry.  It doesn't look wrong, and that bug does seem to point that it has been requested already.  If you wanted to submit a PR for that feature we would greatly appreciate it!
00:07 gtmanfred at least in my experience i was also unable to get more than the top level
00:07 woodtablet left #salt
00:08 gtmanfred I am pretty sure the vmware driver tries to just push as much off to pyvmomi as possible, so it might be a limitation there
00:13 jdipierro joined #salt
00:16 abednarik joined #salt
00:16 Pyro_ joined #salt
00:19 jimklo_ joined #salt
00:35 SamYaple there are indeed alot of problems with pyvmomi
00:42 Pyro_ joined #salt
00:47 DEger joined #salt
00:47 Tanta joined #salt
00:49 catpig joined #salt
00:50 Aleks3Y joined #salt
00:58 vegasq joined #salt
01:04 Pyro_ joined #salt
01:08 badgerops @gtmanfred: thanks! I appreciate the response. I figured as much, and have been reading up on pyvmomi a lot today. I think it'd be a useful 'first PR'  :)
01:16 shoemonkey joined #salt
01:24 mosen joined #salt
01:25 leev_ joined #salt
01:26 Reverend_Fail joined #salt
01:27 systeem joined #salt
01:28 eprice joined #salt
01:28 erhandsome joined #salt
01:29 Pyro_ joined #salt
01:31 basepi joined #salt
01:32 jwon joined #salt
01:32 dlloyd joined #salt
01:32 hoolio joined #salt
01:32 Eugene joined #salt
01:34 shoemonkey joined #salt
01:34 Xevian joined #salt
01:35 vegasq joined #salt
01:35 juntalis joined #salt
01:37 vegasq_ joined #salt
01:46 gnomethrower joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.5, 2016.11.3 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
01:50 snarfy^ joined #salt
01:54 shoemonkey joined #salt
01:58 catpigger joined #salt
02:02 abednarik_ joined #salt
02:10 vegasq joined #salt
02:12 leonkatz joined #salt
02:20 raspado joined #salt
02:21 raspado hi all, im setting a variable in my init.sls
02:21 raspado but the template im trying to push with the variable im defining (file is in templates/script.sh.jinja)
02:22 raspado it says the variable is undefined
02:22 hemebond raspado: You have to set the context
02:22 raspado eh?
02:23 hemebond Are you using file.managed?
02:23 raspado this is what im doing https://pastebin.com/Df1hQT8G
02:24 hemebond Right. file.managed takes a `context` parameter.
02:24 hemebond That's how you set variables for the file to use.
02:24 hemebond - context:
02:24 hemebond myvar: {{ jinvar }}
02:24 raspado ahhh, so thats how you pass it to jinja templates?
02:25 hemebond Yip. Unlike Puppet the files do not automatically get the context of the main file.
02:25 raspado what if i had like 100 variables im setting in init.sls?
02:25 PatrolDoom joined #salt
02:26 raspado id have to add a list of the vars in - context: ?
02:26 hemebond Or just put them into one dict and pass that dict.
02:27 raspado ah kk, i thought by default if you call a jinja template it would somehow dynamically pick up the vars you set in init.sls
02:28 raspado thx hemebond!
02:28 hemebond ????
02:28 mpanetta joined #salt
02:29 raspado well... this means i dont really need '{% set jre_version  = '1.8.0_101' %}'  right?
02:29 raspado just jre_version: '1.8.0_101' under context
02:29 hemebond Correct.
02:29 raspado kew thx
02:30 raspado joined #salt
02:35 evle joined #salt
02:39 pipps joined #salt
02:49 raspado joined #salt
03:01 UForgotten_ joined #salt
03:02 jas02 joined #salt
03:08 Klaus_D1eter_ joined #salt
03:21 Pyro_ joined #salt
03:25 Awesomecase joined #salt
03:40 NightMonkey joined #salt
03:47 IRCFrEAK joined #salt
03:48 IRCFrEAK left #salt
03:50 felskrone1 joined #salt
03:51 onlyanegg joined #salt
03:52 Sammichmaker joined #salt
03:53 MasterNayru joined #salt
03:53 Savemech joined #salt
03:53 Praematura joined #salt
03:54 CmndrSp0ck joined #salt
03:59 raspado would this specifically target only 2 hosts if they match? {% if grains['hostname'] in ['test1.domain.com','test2.domain.com'] %}
04:00 hemebond yes
04:01 hemebond Though you might want to instead use the match module https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.match.html
04:01 theanalyst joined #salt
04:01 whytewolf was just going to bring up the match module
04:02 hemebond Or maybe not. Probably more overhead than just a string match.
04:02 adongy joined #salt
04:03 prg3 joined #salt
04:05 whytewolf if using grains i would sugest grains['id'] instead of grains['hostname'] you know, just in case your hostname is not the name of your minion
04:07 bocaneri joined #salt
04:11 DEger joined #salt
04:12 bocaneri joined #salt
04:13 preludedrew joined #salt
04:18 skullone quick question, say I had nested pillar data, how would i access pillar data stored in this style:
04:19 skullone https://pastebin.com/gJWq4iQT
04:19 hemebond salt['pillar.get']('nginx')
04:19 hemebond salt['pillar.get']('nginx:lookup:sites')
04:19 skullone would i need to define a contect for the jinja template?
04:19 skullone context*
04:19 hemebond Context?
04:20 hemebond {% set nginx = salt['pillar.get']('nginx:lookup') %}
04:20 hemebond nginx.sites['test.site.com'].port
04:20 skullone well, in the template, i dont want to reference the test.site.com
04:20 hemebond (this is all covered in the tutorials, btw)
04:20 skullone just have the init.sls loop through each site, and render the template for each site defined
04:21 hemebond Okay.
04:21 hemebond I was just giving examples.
04:21 Aikar joined #salt
04:21 skullone https://pastebin.com/cCc6jZSp
04:21 skullone thats part of the nginx init.sls so far
04:21 hemebond There's a formula that will do all this for you.
04:22 DEger joined #salt
04:22 hemebond Actually a very good formula.
04:22 skullone yah, ive read it, but had a hard time following it (trying to learn by replicating functionality)
04:22 hemebond Ah
04:45 dknight87 joined #salt
04:46 skullone hrm just not sure how to get the site "data" inside the template
04:51 raspado joined #salt
04:55 hemebond Oooooh
04:55 hemebond context
04:55 hemebond The context parameter to file.managed
04:57 skullone reading the apache module now, this seems to be doing what i want
04:57 skullone https://github.com/saltstack-formulas/apache-formula/blob/master/apache/files/RedHat/apache-2.4.config.jinja#L46
04:57 skullone specificaly here
04:57 skullone going to try and adapt here to what im looking for
05:04 calvinh joined #salt
05:06 jrklein joined #salt
05:08 golodhrim|work joined #salt
05:12 jwarren_ joined #salt
05:13 mkju65 joined #salt
05:25 hemebond joined #salt
05:28 golodhrim|work joined #salt
05:39 DarkKnightCZ joined #salt
05:41 upb joined #salt
05:57 cemmurphy_ joined #salt
06:05 DarkKnightCZ joined #salt
06:07 jas02 joined #salt
06:08 leonkatz joined #salt
06:15 inad922 joined #salt
06:16 ninjada_ joined #salt
06:24 ProT-0-TypE joined #salt
06:26 mpanetta joined #salt
06:27 ninjada joined #salt
06:32 Ricardo1000 joined #salt
06:35 newbiefromla joined #salt
06:35 nikdatrix joined #salt
06:36 newbiefromla Anyone with experience using formula?  I am having trouble with this https://github.com/saltstack-formulas/wordpress-formula
06:36 hemebond What trouble?
06:37 ReV013 joined #salt
06:39 newbiefromla Hey there again
06:40 newbiefromla After running it, I can't find my wp installation
06:40 newbiefromla looking for wp files under /var/www/html
06:40 newbiefromla not there
06:40 newbiefromla and running
06:41 newbiefromla wp
06:41 newbiefromla at command line return nothing
06:41 colegatron saltblackmagic
06:41 newbiefromla it returns but no output
06:46 hemebond What OS?
06:48 aldevar joined #salt
06:48 ninjada joined #salt
06:49 it_dude joined #salt
06:49 whytewolf newbiefromla: post your setup. to gist
06:50 whytewolf also any commands you are running in salt
06:50 jdipierro joined #salt
06:50 newbiefromla mac
06:51 newbiefromla sorry
06:51 newbiefromla ubuntu
06:52 newbiefromla whytewolf: you mean to the google group?
06:52 hemebond So, unless you customised it, it should have put stuff into /www/html/
06:52 hemebond newbiefromla: They mean to gist.github.com
06:52 whytewolf newbiefromla: no, i mean gist.github.com which is a pastebin type site.
06:53 whytewolf basicly need to see what we are working with to know what went wrong
06:53 newbiefromla Ok
06:55 fracklen joined #salt
06:57 newbiefromla https://gist.github.com/obicho/a968c2b0d6ebe0be305fcd9703017707
06:57 newbiefromla this is my set up
06:58 whytewolf ...
06:58 whytewolf first, you don't need that pkg.installed.
06:58 whytewolf that is what the formula is supposed to do
06:58 whytewolf do you have any pillars?
06:59 newbiefromla oh. i see
06:59 hemebond It needs PHP and an HTTP server. But that shouldn't affect the main install.
06:59 newbiefromla i did set up pillar
07:00 whytewolf hemebond: yes, which is why the formula says it has dependencies of php-formula and [apache|nginx| formula
07:00 newbiefromla I know salt was trying to use those values while running
07:00 newbiefromla wp core install
07:00 it_dude joined #salt
07:00 whytewolf newbiefromla: can you add your pillars to that gist [sanatize any passwords]
07:00 hemebond whytewolf: Just pointing out why they put it in  :-)
07:01 whytewolf hemebond: yeah. but the pkg.installed installs the packaged version of wordpress
07:01 whytewolf not php or apache
07:01 hemebond Oh, I read it wrong.
07:02 hemebond I thought it was installing PHP and Apache.
07:03 newbiefromla https://gist.github.com/obicho/a968c2b0d6ebe0be305fcd9703017707
07:03 newbiefromla updated
07:03 newbiefromla with pillar info
07:03 whytewolf I'm actually kind of surprised it didn't throw an error on those requires. didn't know both of those pkgs are using php and apache as the state name for the pkg
07:03 newbiefromla No error
07:04 hemebond Have you looked in /www/html/ ?
07:04 newbiefromla yeah I have - not in /var/www/html and not in /var/www
07:05 whytewolf /var/www/html and /var/www != /www/html
07:05 whytewolf also you don't have the cli because you didn't tell it to install
07:06 whytewolf really shocked the file.managed for the cli didn't fail because -name would be null
07:07 whytewolf - source: {{ salt['pillar.get']('wordpress:cli:source') }}
07:08 hemebond newbiefromla: Remove your custom SLS file
07:08 newbiefromla I am looking into /www/html
07:08 hemebond Update your top.sls to apply the php, apache, wordpress and wordpress.cli formulas/states
07:08 DanniZqo joined #salt
07:08 newbiefromla there is a sitename directory
07:08 newbiefromla but nothing in it
07:09 hemebond Run pkg.purge wordpress
07:09 hemebond Then highstate again
07:09 whytewolf actualy before running highstate
07:10 whytewolf update your pillar
07:10 whytewolf https://github.com/saltstack-formulas/wordpress-formula/blob/master/pillar.example#L2-L4
07:10 whytewolf you need those three lines in it or the cli will not install
07:10 newbiefromla ok will try that
07:10 cyborg-one joined #salt
07:10 hemebond Oh, right, the cli bits.
07:10 newbiefromla why is using a custom SLS file bad?
07:11 hemebond You don't need it.
07:11 hemebond pillar -> formula -> done
07:11 hemebond Your SLS is just getting in the way.
07:11 newbiefromla do I need init.sls or is top.sls enough?
07:12 whytewolf newbiefromla: have you read through the salt tutorial?
07:12 whytewolf here is some info abou tthe top file
07:12 whytewolf https://docs.saltstack.com/en/latest/ref/states/top.html
07:12 newbiefromla yes I ran a few tutorials
07:13 newbiefromla will go thr. them again
07:13 whytewolf well that page wasn't the tutoiral
07:13 whytewolf but it might help explain some things like not needing a bunch of custom sls when all you really doing is includes
07:14 newbiefromla thanks for this tip - I will read this page in detail
07:14 newbiefromla Going to try all these recommendations in the AM
07:14 newbiefromla Thank you so much
07:15 whytewolf alright, and I'm going to try figureing out why one of my servers just spun up like whoa
07:16 ronnix joined #salt
07:17 whytewolf odd, spike in fan but no spike in usage ...
07:18 ivanjaros joined #salt
07:19 JohnnyRun joined #salt
07:21 wangofett joined #salt
07:24 whytewolf okay, really odd. just a random fan spin up, no logs of any kind about a heat problem.
07:25 whytewolf oh well, time for bed, have a good one
07:27 cyborg-one joined #salt
07:33 candyman88 joined #salt
07:34 o1e9 joined #salt
07:35 Inveracity joined #salt
07:38 fracklen joined #salt
07:38 fracklen joined #salt
07:40 karlthane joined #salt
07:41 JohnnyRun joined #salt
07:41 Klaus_D1eter_ joined #salt
07:44 DanniZqo joined #salt
08:07 netcho joined #salt
08:11 candyman88 joined #salt
08:11 Ricardo1000 Hello
08:12 mikecmpbll joined #salt
08:12 Ricardo1000 How I can set on salt-master that my files_root are inside git repo ?
08:14 Score_Under Hi, I was here yesterday when you had that question. Judging by the output of the list_master call, it's already showing files from within the git repo, so I don't know what you want to change.
08:18 Ricardo1000 Score_Under: Can you provide some example of master configuration like live example which should work >?
08:18 Score_Under Yours appear to work already.
08:18 Score_Under I don't know what you are expecting it to do differently
08:20 Ricardo1000 Score_Under: I have two errors one is minion can not find top.sls file, second is when it finds top.sls it can not find files to copy
08:20 hemebond Ricardo1000: You don't. You use gitfs to add the repo.
08:20 hemebond And then it's done pretty much.
08:21 Score_Under Did you fix the first problem?
08:22 Fabbe_ joined #salt
08:23 DEger joined #salt
08:23 Score_Under I'm wondering because you say "when it finds the top.sls" - have you got it to consistently find the top.sls?
08:24 Ricardo1000 Score_Under: I randomly set several parameters and in one combination it find top.sls
08:24 Ricardo1000 Score_Under: but I forgot in which one
08:28 Score_Under Oh dear...
08:28 Score_Under Though I suppose that's usually how it ends up being done haha
08:29 Ricardo1000 Score_Under: ok, I will try step by step
08:30 Ricardo1000 Score_Under: I have enable git backend -> fileserver_backend:
08:30 Ricardo1000 - git
08:30 Score_Under https://a.uguu.se/RsAxJZCzVgXI.png Pretty sure ours ended up like this. The "roots" backend I think was just a transitional thing and we don't really use it any more, and the gitfs remotes are roughly set up the same way you have them
08:31 Score_Under about /sv... don't ask :D
08:32 Score_Under it's an unkillable relic from the days of devops who knew nothing of the filesystem hierarchy standard
08:32 Ricardo1000 Score_Under: In your example file_roots looks into gitfs or local file system ?
08:33 Mattch joined #salt
08:34 Score_Under in that config the `roots` plugin is used to merge in files from /sv/salt/files/base, and the `git` plugin is used to merge in files from `/home/git/repositories/salt-config.git`
08:35 s_kunk joined #salt
08:35 Ricardo1000 Score_Under: OK, I have only set - git plugin without roots
08:36 Ricardo1000 Score_Under: how should file_roots will be look ?
08:36 Score_Under It isn't necessary
08:36 Ricardo1000 Score_Under: is file_roots useing only for roots plugin ?
08:36 Score_Under as far as I know yes
08:37 Fabbe_ joined #salt
08:38 jhauser joined #salt
08:38 Ricardo1000 Score_Under: Ok, I have enable second parameter gitfs_remotes:
08:38 Ricardo1000 - file:///home/admin/sysgit/salt.git
08:39 Ricardo1000 Score_Under: salt-call cp.list_master command shows git repo content
08:40 Ricardo1000 - base/dist/dist/9999.txt
08:40 Ricardo1000 - base/dist/templates/test.jinja
08:40 Ricardo1000 - base/states/files.sls
08:40 Ricardo1000 - base/states/scheduler.sls
08:40 Ricardo1000 - base/states/tmp.sls
08:40 Ricardo1000 - base/states/top.sls
08:40 Ricardo1000 Score_Under: but minion does not see top.sls
08:41 Score_Under I thought the top.sls had to be in the root of the git repo
08:41 Score_Under it's currently under two subdirectories there
08:41 hemebond It does have to be.
08:42 gnomethrower Ricardo1000: please do not paste that much into chat
08:42 hemebond Unless you mount the subdirectory.
08:42 gnomethrower use a pastebin instead
08:42 Ricardo1000 ok
08:42 Ricardo1000 Score_Under: As i understand I should set additinal parameters for gitfs_remote like root and mountpoint
08:44 Score_Under If you want.
08:44 Score_Under I didn't do any of that
08:45 Ricardo1000 Score_Under: Ok, how I need to say to minion where it should find top.sls ?
08:45 Score_Under I just put the sls files in the place salt wanted them in the repo (in this case at the root of the repo)
08:48 Score_Under and regarding separation of states and files, usually there will be directories for each group of states (like states to install snmpd for example), and in that directory there will be the SLS files required and a further subdirectory containing the config files to be copied over
08:48 Score_Under that's how we did it where I work
08:49 fracklen joined #salt
08:49 netcho joined #salt
08:52 Ricardo1000 Score_Under: In git repo I have one folder base: => {dist, states} => dist contain subfolders with files states contain sls files with top.sls
08:52 Ricardo1000 Score_Under: but minion does not see it
08:52 fracklen joined #salt
08:52 Score_Under the minion does see it, it's just that it's not in the layout the minion is expecting
08:52 Ricardo1000 [ERROR   ] No contents found in top file. Please verify that the 'file_roots' specified in 'etc/master' are accessible: {'base': []}
08:52 fracklen joined #salt
08:53 Ricardo1000 No Top file or external nodes data matches found.
08:53 Score_Under though I don't know how gitfs mountpoints work when overlaid so I can't talk much on that solution
08:53 Ricardo1000 Score_Under: I dod not enable mountpoint in this xcase
08:54 dariusjs joined #salt
08:55 Score_Under are you trying to avoid moving the top.sls to the root of the git repository?
08:56 Ricardo1000 Score_Under: No, I try to find out where minion or master try to get this file
08:56 Ricardo1000 Score_Under: debug logs does not show this
08:57 Ricardo1000 Score_Under: in the other programs logs show path where they try to find
08:57 Score_Under the minion gets it from the root of the filesystem the master presents. The master is currently presenting the git repository as that filesystem, so the minion is expecting top.sls to be in the root of that git repository (assuming you don't use mountpoints)
08:58 Ricardo1000 Score_Under: I move top.sls to the top or repo but got the same result
08:59 Score_Under Did you run `salt-run fileserver.update` after committing & pushing that change?
08:59 Score_Under (on the master)
08:59 Ricardo1000 No
09:00 Score_Under Give that a try and see if the minion still complains after that
09:07 Ricardo1000 Score_Under: I have win, thanks a log of
09:12 colttt hello, short question, i want to do something like salt -I 'webserver' test.ping .. how can i do that? how must look the pillar file?
09:18 inad922 joined #salt
09:19 ninjada joined #salt
09:23 Flying_Panda joined #salt
09:23 Drunken_Panda joined #salt
09:26 ninjada joined #salt
09:33 N-Mi joined #salt
09:33 N-Mi joined #salt
09:36 CrummyGummy joined #salt
09:38 fracklen joined #salt
09:38 sh123124213 joined #salt
09:40 fracklen joined #salt
09:41 fracklen joined #salt
09:41 ninjada joined #salt
09:45 nikdatrix Hello, i was reading the user.py state file and i saw that windows and macOS is not supported when creating user homes
09:46 nikdatrix is there a workaround for this? or is necesary to write _states files for this particular task
09:47 nikdatrix i'm trying to add users for Win/Mac/Ubuntu/Centos for jenkins nodes... and it seems like a complex task
09:55 darioleidi joined #salt
09:59 JohnnyRun joined #salt
09:59 fracklen joined #salt
10:11 mikecmpbll joined #salt
10:11 Cidan joined #salt
10:12 patrek_ joined #salt
10:14 fujexo[m] joined #salt
10:15 hemebond nikdatrix: Doesn't that just mean that `createhome` is not supported? Don't the directories get created anyway?
10:15 jas02 joined #salt
10:26 duncanmv joined #salt
10:26 duncanmv hi
10:28 Fabbe_ hi
10:30 impi joined #salt
10:30 JohnnyRun joined #salt
10:30 DanniZqo joined #salt
10:34 dariusjs joined #salt
10:38 jas02 joined #salt
10:47 Ricardo1000 In which cases using gitfs_mount_point ?
10:49 dendazen joined #salt
10:51 Straphka joined #salt
10:52 haam3r Ricardo1000: Could you expand a bit on the question? Do you mean how to use it or why you would need to use it?
10:53 jdipierro joined #salt
10:53 Ricardo1000 haam3r: both
10:58 dariusjs joined #salt
11:00 haam3r Ricardo1000: Have you read this? https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#mountpoints
11:00 Ricardo1000 haam3r: Yep
11:01 Ricardo1000 haam3r: mount point add virtual path
11:01 Ricardo1000 haam3r: but I can not understand in which cases it is needed
11:03 hemebond If you had some states that you wanted to namespace.
11:03 hemebond Or maybe a large formula with each part in a different repo.
11:04 hemebond Maybe some utility states that are in the root of the repo but you want them under salt://utils/
11:05 hemebond Or, as per the example at the link, state files that are used to override formula files or state files.
11:05 hemebond Since pillars can't really (I know there's a thing now) just have files, you could put the files in a repo and mount it where required in the tree.
11:08 haam3r couldn't have explained it any better :D
11:09 haam3r as to how to use it..you have to configure gitfs in the salt-master conf and then you can specify per remote mountpoints or a general mountpoint if you only have one remote repo
11:09 * hemebond is off to bed
11:12 Ricardo1000 haam3r: I have already done to setup
11:12 Ricardo1000 haam3r: I'm tryingt to understand a logic
11:13 Ricardo1000 haam3r: But it likes common architecture was made up of thousands of people
11:14 Ricardo1000 haam3r: and each one make it only for himself
11:14 Ricardo1000 haam3r: than all of it glued together
11:15 Ricardo1000 haam3r: Plus terrible documentation
11:16 Ricardo1000 haam3r: I need to reread several times to understand what author means
11:17 Pyro_ joined #salt
11:22 jerrykan[m] joined #salt
11:22 saintaquinas[m] joined #salt
11:22 freelock joined #salt
11:22 ThomasJ|m joined #salt
11:23 netcho joined #salt
11:23 delpanto93 joined #salt
11:24 delpanto93 joined #salt
11:25 delpanto93 joined #salt
11:26 delpanto93 joined #salt
11:27 delpanto93 joined #salt
11:28 delpanto93 joined #salt
11:39 ninjada joined #salt
11:43 DanniZqo joined #salt
11:44 sgo_ joined #salt
11:44 legreffier joined #salt
11:48 kevc joined #salt
11:54 mikecmpbll joined #salt
11:54 amcorreia joined #salt
11:56 netcho joined #salt
12:01 haam3r Ricardo1000: yes, that is often times the case with open source stuff
12:07 ronnix joined #salt
12:10 DanyC joined #salt
12:10 shoemonkey joined #salt
12:15 numkem joined #salt
12:22 ninjada joined #salt
12:23 shoemonkey joined #salt
12:24 DEger joined #salt
12:25 jas02 joined #salt
12:30 colttt when i use the state user.present, how can I set the password only once?
12:32 Sketch enforce_password: False
12:36 justanotheruser joined #salt
12:43 Klaus_Dieter joined #salt
12:45 dendazen joined #salt
12:49 mdpolaris joined #salt
13:03 Brew joined #salt
13:04 colttt Sketch: thnaks for that!
13:04 mdpolaris I am trying to convert a working command from the CLI to a reactor, but i am having trouble getting this to work. Here is the CLI command:
13:04 mdpolaris salt 'salt-master' saltutil.runner state.orch mods=orch_new_thingworx_instance 'pillar={event_data: {cust_name: PTC-Demo, instance_type: dev, ext_dns: syndic-demo, region: or}}’
13:05 racooper joined #salt
13:10 mdpolaris here is the reactor that isn’t quite working: https://pastebin.com/B8Kfbd7x
13:16 evle joined #salt
13:26 art6006 joined #salt
13:29 art6006 I'm trying to have a scheduled job run to ensure a service is running, but it looks like the schedule never runs.
13:29 ssplatt joined #salt
13:29 art6006 https://gist.github.com/atoy3731/0320254228d6e1ec58349e6f7203a761
13:29 Snow24 joined #salt
13:30 art6006 When I do:  salt 'service*' state.apply run : it never tries to start the service.. Am I doing something wrong?
13:34 Snow24 Hello, I can't resolve my error with : " sudo salt-run winrepo.update_git_repos " ... Could you help me please, find my files attached in my google drive
13:34 Snow24 https://drive.google.com/drive/folders/0BwIcxm1SwfYIVWxESVRGV0psTUE?usp=sharing
13:38 PatrolDoom joined #salt
13:39 dariusjs joined #salt
13:40 DammitJim joined #salt
13:40 debian1121 joined #salt
13:43 debian112 joined #salt
13:44 scoates joined #salt
13:46 colttt Snow24: can you please use a nopaste service instead of a screenshot
13:47 Reverend hastebin.com
13:47 jdipierro joined #salt
13:49 Snow24 Colttt : I update my file
13:53 Tanta joined #salt
13:54 _JZ_ joined #salt
13:55 Snow24 If you prefer : https://hastebin.com/quhupufoqe.sql
14:00 blueberry joined #salt
14:02 blueberry i am reviewing the capability of salt any live input
14:03 mpanetta joined #salt
14:05 mpanetta joined #salt
14:06 catpig joined #salt
14:09 tercenya joined #salt
14:12 ws2k3 joined #salt
14:15 Shirkdog joined #salt
14:15 brousch__ joined #salt
14:17 JohnnyRun joined #salt
14:18 dariusjs joined #salt
14:25 Pyro_ joined #salt
14:26 vegasq joined #salt
14:26 tapoxi joined #salt
14:28 toastedpenguin joined #salt
14:29 DammitJim joined #salt
14:33 vegasq_ joined #salt
14:39 kingscott joined #salt
14:40 kingscott Anyone know if Salt can do SNMP monitoring?
14:41 kingscott or a good way to monitor network switches, access points, and other systems that can't have a minion installed?
14:41 Sketch a monitoring system
14:41 Pyro_ joined #salt
14:42 kingscott I'm currently using zabbix. I was wondering if there is a way to do it with salt
14:42 * Sketch is fan of check_mk.
14:43 Sketch i did read about someone using salt to feed host monitoring data to check_mk, but using salt as part of a monitoring system seemed strange to me
14:43 Sketch (not snmp)
14:43 kingscott I didn't think salt did snmp. I wanted to double check. I agree that a monitoring system is the way to go, as that is their specialty.
14:53 mdpolaris Is there any good way to figure out how to convert a CLI command into a reactor launched command? I have the following: salt 'salt-master' saltutil.runner state.orch mods=orch_new_thingworx_instance 'pillar={event_data: {cust_name: PTC-Demo, instance_type: dev, ext_dns: syndic-demo, region: or}}’
14:54 mdpolaris and I can’t get the kwargs to get through to teh state.orch runnner when using a reactor
14:56 sarcasticadmin joined #salt
14:57 shoemonkey joined #salt
15:00 tedski joined #salt
15:00 DarkKnightCZ joined #salt
15:03 jimklo joined #salt
15:06 netcho joined #salt
15:06 PatrolDoom joined #salt
15:08 dyasny joined #salt
15:11 stanchan joined #salt
15:11 babilen Anybody at Cloud Native Con in Berlin?
15:13 duncanmv joined #salt
15:16 debian1121 joined #salt
15:16 onlyanegg joined #salt
15:16 bakins joined #salt
15:22 Hybrid joined #salt
15:26 debian112 joined #salt
15:33 schemanic joined #salt
15:34 brakkisath joined #salt
15:34 sp0097 joined #salt
15:36 candyman88 joined #salt
15:36 DarkKnightCZ joined #salt
15:36 sp0097 left #salt
15:40 rburkholder joined #salt
15:42 jas02 joined #salt
15:43 nixjdm_ joined #salt
15:44 debian1121 joined #salt
15:47 alvinstarr joined #salt
15:48 ivanjaros joined #salt
15:49 catpig joined #salt
15:49 oida_ joined #salt
15:50 brakkisa_ joined #salt
15:58 ponyofdeath joined #salt
16:04 aldevar left #salt
16:06 debian112 joined #salt
16:14 leonkatz joined #salt
16:15 impi joined #salt
16:17 tiwula joined #salt
16:18 pipps joined #salt
16:21 Edgan gtmanfred: Do you know where in salt-ssh the grains.cache.p file gets written for the shim?
16:28 woodtablet joined #salt
16:28 pwhack joined #salt
16:38 morissette joined #salt
16:38 woodtablet joined #salt
16:43 racooper is there an easy way to dynamically add one user automatically to every group created in a list?
16:43 racooper I should specify in a state declaration
16:45 impi joined #salt
16:47 GMAzrael joined #salt
16:48 sp0097 joined #salt
16:53 jdipierro joined #salt
16:57 jas02 joined #salt
17:00 jas02 joined #salt
17:02 brakkisath joined #salt
17:02 lorengordon joined #salt
17:08 Trauma joined #salt
17:18 s_kunk joined #salt
17:19 mpanetta joined #salt
17:19 SaucyElf joined #salt
17:19 SaucyElf_ joined #salt
17:19 it_dude joined #salt
17:22 wendall911 joined #salt
17:22 meca Hi, how do you set the default runners dir on gitfs ?
17:29 cliluw joined #salt
17:39 meca found it _runners
17:40 brakkisath joined #salt
17:42 DanyC joined #salt
17:43 mdpolaris gtmanfred: We spoke on Friday about running an orch state on a syndic using saltutil.runner. The CLI command you suggested is working fine, however i need to make this work from a reactor. I can’t get the kwargs mods= and pillar= transferred to state.orch call. Here is the CLI for reference
17:44 jdipierro joined #salt
17:44 mdpolaris salt 'salt-master' saltutil.runner state.orch mods=orch_new_thingworx_instance 'pillar={event_data: {cust_name: PTC-Demo, instance_type: dev, ext_dns: syndic-demo, region: or}}'
17:45 catpig joined #salt
17:46 gtmanfred that is not a valid dictionary for pillar
17:46 gtmanfred pillar='{"foo": "bar"}'
17:46 raspado joined #salt
17:47 gtmanfred it also may require this PR that I just opened https://github.com/saltstack/salt/pull/40360
17:47 saltstackbot [#40360][OPEN] allow passing args to saltutil.runner | What does this PR do?...
17:47 gtmanfred with that pr, you would run
17:47 mdpolaris that command does work as I expect though
17:48 gtmanfred salt salt-master saltutil.runner state.orch arg="['orch_new_thingworx_instance']" kwarg='{"pillar": {"event_data": {"cust_name": "PTC-Demo", "instance_type": "dev", "ext_dns": "syndic-demo", "region": "or"}}}'
17:49 gtmanfred salt salt-master saltutil.runner state.orch mods='orch_new_thingworx_instance' pillar='{"event_data": {"cust_name": "PTC-Demo", "instance_type": "dev", "ext_dns": "syndic-demo", "region": "or"}}'
17:49 gtmanfred that ^^ should work
17:50 gtmanfred are you trying to get the pillar data to the state in the salt.orch file?
17:50 mdpolaris ah, i see the PR, i’ll check that out. That must be why the reactor isn’t receiving those args even though the CLI does. Thanks
17:50 mdpolaris so the pillar data is coming from an event via REST
17:50 colegatron joined #salt
17:51 mdpolaris and i need to unpack that event data and use it for my provisioning, and then that will create some grains and things like that
17:51 nadi joined #salt
17:52 nadi I try running salt 'test*' network.ifacestartswith '10.1.0.0/16'. The return value is 'network.ifacestartswith' is not available. Salt is up to date.
17:54 mdpolaris we have the MoM listening for provisioning requests from an external system. When working on the MoM I just execute the orch directly from the reactor and everything is awesome. but we need to add Syndics to manage different AWS regions, so i need to delegate those salt-cloud provisioning requests to the proper syndic. I was just using that pillar as a way to get that posted data sent over to the syndic
17:54 inad922 joined #salt
17:56 cliluw joined #salt
17:56 gtmanfred nadi: what version of salt are you up to date on?
17:56 mdpolaris gtmanfred: the error in your PR is exactly the behavior I was seeing. I will test. Thanks.
17:56 gtmanfred that function is new in 2016.11
17:56 gtmanfred mdpolaris: dope
18:03 pipps99 joined #salt
18:03 pipps_ joined #salt
18:05 ny01 joined #salt
18:05 prg3 joined #salt
18:05 nadi @gtmanfred Of course it would be the version number. Thank you
18:06 ny01 Hi all, is there a way to refresh the salt master grains cache?
18:07 ny01 I am looking to be able to trigger a refresh from running an sls file. I was hoping this might be achievable by doing some jinja inline execution within a state file
18:07 sh123124213 joined #salt
18:08 censorshipwreck joined #salt
18:11 edrocks joined #salt
18:12 mdpolaris gtmanfred: that fixed it. Thank you!
18:13 mdpolaris for reference here is the reactor that I needed: https://pastebin.com/iDAfmtTv
18:15 colegatron left #salt
18:17 scoates joined #salt
18:18 tercenya joined #salt
18:21 felskrone joined #salt
18:22 gtmanfred mdpolaris: great!
18:23 gtmanfred mdpolaris: that PR should be added to the next major release, Carbon.
18:23 candyman88 joined #salt
18:24 whytewolf thought we were on carbon
18:24 mdpolaris I appreciate the help. OK, thanks, until then i will make a note, or better yet a state, to reapply after any patching
18:25 gtmanfred sorry yes
18:25 gtmanfred Nitrogen
18:25 gtmanfred mdpolaris: if you copy the saltutil.py module to _modules until nitrogen, it will be synced down
18:26 DarkKnightCZ joined #salt
18:26 mdpolaris Thank you…still a newbie in many ways
18:26 mdpolaris that is much cleaner!
18:26 gtmanfred ny01: you should be able to call saltutil.refresh_grains in jinja, alternatively if you are doing a state that sets the grains, you can do `reload_grains` in the state
18:26 gtmanfred `reload_grains: True`
18:26 gtmanfred mdpolaris: https://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html
18:26 gtmanfred no worries :)
18:30 dxiri_ Hi guys! I am running a state that needs to increase the file descriptors on a VM, to do this I am putting a salt managed file inside /etc/security/limits.d, but for some reason, the rest of the state still picks up the old value and not the new one
18:30 dxiri_ any idea why?
18:30 dxiri_ if I login directly to the box, I can see the correct file descriptor value
18:31 gtmanfred limits.d only effects pam logins
18:31 gtmanfred if you are on a sysvinit system, you will need to set the ulimit in /etc/default/salt or /etc/sysconfig/salt
18:32 gtmanfred if you are on systemd, you will need to set the correct variable in the systemd service unit
18:32 gtmanfred and restart the salt-minion
18:33 jdipierro joined #salt
18:33 gtmanfred also, if you are running salt-call directly
18:33 gtmanfred changing the limits.d file would still require you to logout and back in before the change affects your user.
18:34 gtmanfred so if you change the limits.d file in the middle of the salt-call run, you would not see the changes reflected until you logout and log back in, and then run salt-call again
18:39 Trauma joined #salt
18:41 cyborg-one joined #salt
18:41 Renich joined #salt
18:42 racooper Howdy. I'm trying to build a list in jinja variable that will then be applied to a user.present to provide the list of group memberships for that user. sls and error are here: https://gist.github.com/anonymous/c480b5edd59afacff8be968534f92768
18:43 Topic for #salt is now racooper don't use {{}} inside of {% %}
18:43 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.3 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
18:43 gtmanfred racooper don't use {{}} inside of {% %}
18:43 gtmanfred that was interesting
18:43 racooper I...see....thanks. let me try it again then.
18:44 gtmanfred {% do group_list.append(user) %}
18:44 gtmanfred racooper: ^^
18:44 racooper I see it
18:45 gtmanfred possibly {% set group_list = group_list + [user] %}
18:46 pipps joined #salt
18:46 Trauma joined #salt
18:47 brakkisath joined #salt
18:49 Trauma joined #salt
18:51 Trauma joined #salt
18:55 Trauma joined #salt
18:58 Trauma joined #salt
19:01 Klaus_Dieter joined #salt
19:02 DarkKnightCZ joined #salt
19:04 aldevar joined #salt
19:08 Trauma joined #salt
19:09 Edgan gtmanfred: Do you know where in salt-ssh the grains.cache.p file gets written for the shim? I am trying to fix a bug with roster grains.
19:09 scoates joined #salt
19:10 gtmanfred i remember that being a bug that they minion's grains do not get written back to the master?
19:10 gtmanfred maybe?
19:10 gtmanfred not a bug
19:10 gtmanfred but it just isn't implemented
19:11 Edgan gtmanfred: This is more with salt-ssh that the roster grains are used for compiling the states on the machine you run salt-ssh from, but the roster grains aren't copied as part of the shim. So when a jinja template gets processed on the remote system, it doesn't see the roster grains.
19:11 gtmanfred oh
19:11 gtmanfred uhh
19:11 gtmanfred yeah, that should work
19:11 gtmanfred but i don't know where they are written
19:12 Edgan gtmanfred: They seem to be transferred as grains.cache.p, and I am trying to track down how that gets written and copied to the remote system
19:12 gtmanfred i would check in salt.client.ssh.wrapper.grains
19:12 gtmanfred That is my best guess where it is managed from
19:13 gtmanfred but i don't see anything specific in there :/
19:13 Edgan gtmanfred: thanks
19:13 gtmanfred That is a great question, if you figure it out let me know
19:13 gtmanfred unfortunately I am knee deep in the fileserver and don't want to lose my place
19:13 Edgan gtmanfred: The side effect of the above is I can says -contents: {{ grains['foo'] }}  but I can't use {{ grains['foo'] }} in a jinja template
19:14 sarlalian joined #salt
19:15 gtmanfred then you might want to also check salt.client.ssh.wrappers.state
19:15 gtmanfred aight, back into the fileserver
19:18 DammitJim joined #salt
19:18 ujjain joined #salt
19:18 ujjain joined #salt
19:20 ronnix joined #salt
19:24 brakkisa_ joined #salt
19:26 Edgan gtmanfred: salt/loader.py:def grains is writing the .p file
19:27 ujjain joined #salt
19:27 ujjain joined #salt
19:32 brakkisath joined #salt
19:37 ahrs joined #salt
19:39 leonkatz joined #salt
19:44 bluenemo joined #salt
19:46 beardedeagle joined #salt
19:47 brakkisath joined #salt
19:50 Edgan gtmanfred: Thoughts on putting salt-ssh only changes in salt/loader.py to fix my bug?
19:50 dxiri_ mmm, I see, and is there a way to restart the minion from within the state itself?
19:51 dxiri_ I don't get how come not even the systctl system-wide setting seems to work with salt
19:57 Trauma joined #salt
19:57 gtmanfred dxiri_: because ulimits is seperate from sysctl
19:57 gtmanfred Edgan: no immediate thoughts, other than do it and make a pr and then we can review it
19:58 dxiri_ gtmanfred: just to be clear, I am taking about this:
19:58 dxiri_ *               soft    nofile          60288
19:58 dxiri_ *               hard    nofile          60288
19:58 dxiri_ if that applies system wide, how come salt doesn't pick it up?
19:59 gtmanfred because that only applies to pam logins
19:59 gtmanfred of which the salt systemd service does not use
20:00 Trauma joined #salt
20:00 ahrs joined #salt
20:02 gtmanfred dxiri_: are you using systemd?
20:02 pipps99 joined #salt
20:04 tercenya joined #salt
20:04 dxiri_ nope, its a centos6 box
20:04 dxiri_ so sysvinit
20:05 pipps joined #salt
20:05 gtmanfred then put 'ulimit -n 60288' in /etc/default/salt
20:05 gtmanfred or once logged in, you can restart salt-minion with your user
20:05 gtmanfred this will run the command from a pam login
20:05 gtmanfred instead of off of pid1 from boot
20:06 gtmanfred also, techinically upstart on centos6
20:06 brakkisa_ joined #salt
20:07 newbiefromla joined #salt
20:09 tercenya joined #salt
20:12 dxiri_ let me try that :)
20:14 gtmanfred it should be able to be in /etc/default/salt, and /etc/sysconfig/salt
20:14 gtmanfred and/or
20:18 dxiri_ k, that worked :) but I wonder how can I do this from within a state?
20:18 dxiri_ is it possible?
20:19 gtmanfred i do not believe so, because we spin off new processes with each command, so only that process would get the ulimit, and not the parent
20:19 gtmanfred so it has to be in place when the salt-minion proces starts
20:19 juntalis joined #salt
20:21 ronnix joined #salt
20:27 pipps joined #salt
20:30 sp0097 joined #salt
20:32 dxiri_ I see..thanks for the input!
20:39 leonkatz joined #salt
20:41 sh123124213 any reason the 2016.11.4 was missed and 2016.3.6 was released without it ? :)
20:41 hemebond Missed?
20:41 gtmanfred sh123124213: 2016.11 and 2016.3 are released independently
20:41 gtmanfred this is just a minor release on the 2016.3 branch
20:42 gtmanfred 2016.11.4 is due next month i think?
20:42 sh123124213 @gtmanfred thnx
20:51 sh123124213 gtmanfred: by any chance nitrogen will have python embedded inside the package since you are dropping support for 2.6 ?
20:51 edrocks joined #salt
20:51 Sketch what's still using 2.6?
20:51 whytewolf Sketch: older distros. such as centos 6
20:52 gtmanfred sh123124213: there is no plan on embedding python in the package
20:52 gtmanfred except for windows*
20:53 Sketch oh, i was thinking 6 was on 2.7.
20:53 gtmanfred unfortunately not, it is 2.6.6
20:53 Sketch been a while since i used it
20:53 Sketch been all on 7 for some time
20:53 sh123124213 gtmanfred: would you know an aprox release date for nitrogen ? :)
20:53 PatrolDoom joined #salt
20:54 brakkisath joined #salt
20:54 gtmanfred no
20:54 sh123124213 thnx
20:54 gtmanfred there was something on salt-users or salt-announce saying when we were going to do the freeze
20:54 gtmanfred but there will have to be some RC after that
20:54 gtmanfred the more people that help with rc testing, the faster that portion will be
20:56 whytewolf one thing i hate about a push to python 3. python 2.6 support goes out the window with it. and while that is typically a good thing. a lot LTS distros still use python 2.6 as the system default python.
20:56 Sketch and 2.7 will be for even longer
20:56 whytewolf well 2.7 was released mainly for python3 compatability
20:57 Sketch yeah, but i think there are a lot of modules which are 3 only?
20:57 netcho joined #salt
20:57 Sketch i guess that may not affect salt much if the ones it uses still support 2.7
20:57 whytewolf exactly
20:58 whytewolf there are work arounds for centos such as installing the stl python but that is a pain to create a service around
20:59 Sketch scl? yeah.  using the ius repo might be a better route.
20:59 * Sketch isn't sure what it has for centos 6
20:59 gtmanfred it has python3 for centos 6
20:59 whytewolf yeah sorry scl
20:59 Sketch looks like it
21:00 Sketch https://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/repoview/development.languages.group.html
21:00 whytewolf what would be nice if if companies didn't wait till EOL before updating their systems :P
21:01 Sketch that's the whole point of stable distros ;)
21:01 Sketch oh, you mean the users, not the distros themselves
21:01 leonkatz joined #salt
21:01 Sketch yeah
21:02 Sketch we were new so not heavily invested in centos 6, so i pushed to move everything to 7 ASAP
21:02 pipps joined #salt
21:02 Sketch so at least we will be good until 8 comes out ;)
21:02 whytewolf yeah. hell when i worked at a paper we were paying to support a system that was 5 years after EOL
21:03 whytewolf [not linux]
21:03 Sketch XP? ;)
21:03 whytewolf hp-ux
21:03 whytewolf the hardware we were running it on was 5 years past eol.
21:03 colegatron joined #salt
21:03 whytewolf might have been more
21:04 XenophonF i kind of miss real unix
21:04 whytewolf i don't do windows so no, not XP ;)
21:04 whytewolf I miss solaris. I don't really miss HP-UX
21:05 Sketch i don't really miss real unix
21:07 aldevar left #salt
21:07 ninjada joined #salt
21:09 jhauser joined #salt
21:16 eseyman joined #salt
21:17 eseyman joined #salt
21:21 norrit joined #salt
21:25 jas02 joined #salt
21:27 ashmckenzie joined #salt
21:30 SaucyElf joined #salt
21:31 KennethWilke joined #salt
21:31 stanchan joined #salt
21:34 mikecmpbll joined #salt
21:35 sh123124213 joined #salt
21:35 prg3 joined #salt
21:48 icebal_ joined #salt
21:50 newbiefromla joined #salt
21:50 newbiefromla Hello I am using a formula, I am seeing a strange error
21:50 newbiefromla Data failed to compile: ----------     Malformed topfile (state declarations not formed as a list)
21:51 tkojames joined #salt
21:52 newbiefromla this is my top.sls
21:52 newbiefromla https://gist.github.com/obicho/e33e13f6c5d7e751bde5d94c94aa102c
21:53 whytewolf you don't need the include stuff
21:53 mpanetta newbiefromla: Second - mysql isn't indented correctly
21:53 newbiefromla this is the formula I am trying to use
21:53 newbiefromla https://github.com/saltstack-formulas/mysql-formula
21:56 newbiefromla Yipee working!
21:56 newbiefromla Thanks guys
22:00 tkharju joined #salt
22:01 tkojames How many people are using Salt with Docker? We are starting to look into using salt to manage some of our docker stuff. We are thinking for the first step have salt update docker images everytime there is update to the image. Was wondering what other people were doing.
22:03 dxiri_ so, I have a template with salt preinstalled, but for some reason new clones from this template are trying to register with the same minion_id, any idea why? I removed /etc/salt/minion_id prior to shutting off my template
22:04 pipps joined #salt
22:06 hemebond tkojames: I have to use Docker with Salt. But I'm just deploying a static image with mounted directories for configuration.
22:07 hemebond (because I don't have control of the Docker creation pipeline)
22:07 hemebond dxiri_: There could be a minion ID in /etc/salt/minion
22:07 hemebond Do your images have unique hostnames?
22:08 ninjada joined #salt
22:08 dxiri_ hemebond: I don't see any minion id on that file
22:09 hemebond Then it must be the hostname.
22:09 hemebond Did you delete the pki directory too?
22:10 dxiri_ but the id I am seeing its the ip that was assigned by dhcp when I initially created the image
22:10 dxiri_ pki directory where?
22:10 dxiri_ on the template?
22:10 hemebond /etc/salt/pki I think
22:10 hemebond When you created the image, did you install salt-minion without starting the service at all?
22:10 dxiri_ I see minion and master folders there, can I nuke the whole /etc/salt/pki?
22:10 hemebond Yes.
22:11 hemebond Those are created when the service first starts and the minion contacts the master.
22:11 hemebond When installing salt-minion on the image, you can't let it start.
22:11 hemebond Or else you then have to stop salt-minion and clean out what it's created.
22:12 dxiri_ ah..that's it then, if I recall correctly, it did start at some point
22:13 dxiri_ ok, apart from minion_id and /etc/salt/pki, anything else?
22:13 hemebond That should be all.
22:13 dxiri_ awesome, trying now
22:13 hemebond I found it easier to just install salt-minion after provisioning.
22:14 hemebond I dislike putting things like salt-minion into images.
22:14 dxiri_ trying to automate end to end something here
22:14 dxiri_ I have a dhcp server that serves a range reachable anywhere from our vpn
22:14 dxiri_ and salt-master auto-acccepts that range
22:15 dxiri_ so of I have it preinstalled I can spin up VMs and configure them with salt from the get go
22:17 tkojames hemebond: Thanks we might start with deploying static images first but people have bad habit of not running docker pull before creating there images here so they get out of date before we even deploy them
22:17 hemebond tkojames: I use Salt to pull down the images.
22:18 hemebond Though the images are on AWS ECR so it's a pain in the arse. I really need to automate that.
22:18 tkojames You just using a sls file to pull down the images then?
22:18 hemebond Yip
22:22 tkojames So basically just dockerng.pull and then name of the image? And if so does it pull down the latest image even if the minion already has an older image cached on it? sorry for all the questions. Thanks!
22:22 hemebond Questions are fine :-)
22:23 hemebond I use dockerng.running to pull down and run the image.
22:23 hemebond it looks like I had to create my own systemd file to run it.
22:24 pwhack joined #salt
22:24 hemebond The `image` parameter to dockerng.running as the URL with the version at the end. If it's not got the version I've specified then it'll pull down the new version.
22:25 PatrolDoom joined #salt
22:26 jas02 joined #salt
22:26 tkojames awh ok thank you for all the info. very helpful
22:26 hemebond Good luck ????
22:26 hemebond Oh, my state is applied manually, btw.
22:27 hemebond Because the images are in ECR, I have to authenticate first and get a token.
22:28 hemebond I have another SLS that I also apply manually that does the login.
22:28 hemebond Then I apply the other SLS to actually pull down the image.
22:28 hemebond I might be able to automate that but haven't tried yet.
22:29 hemebond And you will probably have an easier time if you can just pull down the images without the login business.
22:31 tkojames that sounds fun ;) thankfully we are going to build our own private docker repo. And I was going to make a basic account that can not do much and just put the login info in a pillar.
22:31 hemebond Sounds much friendlier :-)
22:36 sh123124213 joined #salt
22:48 pipps joined #salt
22:48 Trauma joined #salt
22:51 nadi Not sure where my syntax error is https://gist.github.com/anonymous/57ffd81affd4785a4adc88e675c5b26c
22:52 Pyro_ joined #salt
22:52 hemebond nadi: Where is your "network" state?
22:53 hemebond Do you have a state named after whatever iface is?
22:53 nadi it should be ens160
22:54 hemebond Okay, do you have a state called "ens160"?
22:54 hemebond Also, your iface variable might be a list.
22:54 hemebond so you'd have to use {{ iface.0 }} or something.
22:54 Trauma joined #salt
22:55 nadi https://gist.github.com/anonymous/e71cd8405e9a772934586ef5bdce35ea here is the full state file
22:55 hemebond What is "name:" supposed to be?
22:55 hemebond That's probably not a good state ID
22:55 nadi yea it was a palceholder
22:56 hemebond Have you tried "- network: name" ?
22:57 hemebond oh
22:57 hemebond Jinja uses lowecase for true, false and none
22:59 nadi that section works
22:59 hemebond What isn't working?
22:59 nadi your - netowork: nam worked
22:59 hemebond ah
23:00 nadi would I be able to put {{ iface }} instead for the name: ?
23:00 SaucyElf joined #salt
23:00 hemebond yip
23:01 nadi {{ iface }}:   network.managed: so something like that or do I remove the brackets?
23:04 hemebond You need the {{ }}
23:05 hemebond You're using Jinja2 to put the variable there.
23:08 nadi Thank you
23:12 jrklein joined #salt
23:14 johnkeates joined #salt
23:22 xet7 joined #salt
23:24 dendazen joined #salt
23:24 shoemonkey joined #salt
23:26 jas02 joined #salt
23:27 bocaneri joined #salt
23:32 bocaneri joined #salt
23:33 ninjada_ joined #salt
23:33 KyleG joined #salt
23:33 KyleG joined #salt
23:36 shoemonkey joined #salt
23:39 newbiefromla joined #salt
23:39 dxiri joined #salt
23:44 gableroux joined #salt
23:48 prg3 joined #salt
23:56 peragwin joined #salt

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