Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-05-31

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

All times shown according to UTC.

Time Nick Message
00:00 agliodbs Joseph: right now I have a big messy if ... elif thing
00:00 Joseph oh yea you are doing the bad thing with jinja
00:00 Joseph you are trying to contort jinja to solve a problem that should be handled with module
00:01 Joseph and you'll know that because of how horrifying ugly the sls looks
00:01 agliodbs Joseph: and suspect I need to figure out .run() stuff so I can call full-blown python.  I don't know how that module inherits the minion data, though?
00:01 Joseph don't worry done it myself numerous times
00:01 Joseph ....why not just write a custom module?
00:01 Joseph they are pretty darn simple
00:01 Joseph the module is just a python script after all
00:02 agliodbs Joseph: is there a good tutorial?  I'm not new to python, but I am new to salt
00:02 Joseph and then all you'd do is call it when needed
00:02 Joseph yea....
00:02 Joseph ask me a nasty doc question why don't you
00:02 agliodbs heh ;-)
00:02 Joseph depends on what type of module
00:02 Joseph let me root around to see if a custom pillar would be the way to go just a sec
00:03 llirkaz joined #salt
00:03 Joseph http://docs.saltstack.com/en/latest/topics/development/external_pillars.html
00:03 agliodbs Joseph: frankly, I just need some thing which can run an re.match on the mininon-id and mangle the variable strings
00:03 Joseph so that documentation is awful
00:03 Joseph yep
00:03 Joseph exactly
00:03 llirkaz Hey there
00:03 agliodbs yeah, that's what I saw before.  I coudn't figure it out
00:03 Joseph :(
00:03 Joseph i know the documentation needs to be updated
00:04 Joseph but that's probably what you need
00:04 Joseph i'd badger the saltstack group for some pointers
00:05 Joseph aliodbs: you can also do a custom grain assuming this isn't sensitive data and then apply jinja to that
00:06 agliodbs Joseph: won't that just result in a bunch of {% if ... elif %} then, though?
00:06 Ryan_Lane is there any way to get a develop snapshot of salt via pypi?
00:07 Joseph Ryan_Lane: why not just clone from github?
00:07 Joseph agliodbs: not sure depends on how you design it and your use case
00:07 Ryan_Lane I have a repo where we very badly don't want to use submodules :)
00:07 redondos joined #salt
00:08 Ryan_Lane and inside of it is a requirements.txt
00:08 Ryan_Lane I guess I'll just include my new modules in the repo as custom modules until the new release
00:09 llirkaz is there a quick comparison slidedeck/faq somewhere on differentiation of puppet/vagrant/chef and ... saltstack ?
00:09 Joseph Ryan_Lane: do you know of some good walk through of a custom pillar? the current saltstack documentation is clear as mud
00:09 Joseph <llirkaz> : yea google :)
00:09 Ryan_Lane you mean creating a custom pillar?
00:09 Joseph in all sieriousness though tons of people have done that comparison apublished their findings
00:09 Joseph Ryan_Lane: yes
00:10 Ryan_Lane I can't think of any walk throughs
00:10 Joseph This is really confusing to newbies: http://docs.saltstack.com/en/latest/topics/development/external_pillars.html
00:10 agliodbs Ryan_Lane: I want to create a custom pillar which uses an re on the minionid to set a bunch of other pillar vars
00:10 Ryan_Lane I can give you an idea of how to do it, though
00:10 thayne joined #salt
00:10 llirkaz ja
00:10 agliodbs Ryan_Lane: so about as simple as it gets for python code
00:10 llirkaz I've ran them all except salt ..
00:10 agliodbs Ryan_Lane: I just don't follow how to integrate the custom pillar
00:11 forrest hmm, has anyone set up salt on nixos?
00:11 Ryan_Lane you need to include the custom pillar in the master config
00:11 Ryan_Lane it'll get a set of arguments, one of which is the minion_id
00:11 llirkaz getting dejavu from efnet in the 90s of the rtfm comment ;-) but alas, let me take a look..
00:11 Joseph llirkaz: my takeaway is that saltstack is easier to set up and scales way better than puppet/chef/ansible because of its use of zeromq and not trying to play games with ssh.
00:11 Ryan_Lane you return a dict with a set of key/vals which will be the pillars
00:12 Joseph downside is that its still a new comer so its community and ecosystem of modules might not be as rich
00:12 forrest llirkaz, sorry I missed your message earlier, hang on a sec.
00:12 agliodbs Ryan_Lane: the master config? top.sls?
00:12 Ryan_Lane nah, the actual master configuration
00:12 forrest llirkaz, if you can expense it, https://devopsu.com/books/taste-test-puppet-chef-salt-stack-ansible.html is pretty good
00:12 Ryan_Lane /etc/salt/master.d/<config>
00:12 agliodbs Ryan_Lane: aha
00:13 forrest llirkaz, just the 35 dollar book, not the code pack thing
00:13 agliodbs Ryan_Lane: hmmm.  we don't actually have one of those.
00:13 Ryan_Lane agliodbs: http://docs.saltstack.com/en/latest/ref/configuration/master.html#ext-pillar
00:13 Ryan_Lane are you using masterless?
00:13 Ryan_Lane meaning, salt-call
00:14 agliodbs Ryan_Lane: no, there's a master.d directory, there's just nothing in it
00:14 Joseph restructuredtext is driving me insane....i am trying to update the states tutorial and yea gods indentation.
00:14 Ryan_Lane your master config is probably in /etc/salt/master
00:14 Joseph maybe emacs is just isn't the way to go
00:14 Ryan_Lane I tend to use master.d and minion.d rather than messing with the main files
00:15 forrest Joseph, just use the rst mode for emacs http://docutils.sourceforge.net/docs/user/emacs.html
00:16 Joseph Forrest: I am in the rst mode and i am still being driven insane
00:16 agliodbs yeah, we have one of those, it just doesn't have anything in it.  so I'd create a new ext_pillar.conf file?
00:16 Joseph i have yaml code block and i can't get the stupid thing to indent properly
00:16 forrest ?
00:16 forrest just indent it 4 spaces
00:16 Ryan_Lane agliodbs: or add the external pillar config to your master file
00:16 Ryan_Lane either or
00:17 forrest code-block:: yaml\n    blah blah blah
00:17 Joseph <forrest>: oh you have code-block on each line
00:17 forrest well .. code-block:: yaml
00:17 forrest Joseph, on each line?
00:17 forrest no
00:17 forrest when you indent it 4 spaces it considers it part of the block
00:17 Joseph https://gist.github.com/jaloren/d60d6dedee79efc658ac
00:18 Joseph right.....but within that block i want additioanl indentation
00:18 TyrfingMjolnir joined #salt
00:18 agliodbs Ryan_Lane: I dont' get how I get from the conf file to the actual python code though, and back
00:19 Ryan_Lane agliodbs: the config for ext_pillar just says "load this external pillar and pass in these arguments"
00:19 agliodbs Ryan_Lane: which part of the conf is the module name?  The keys?
00:19 Ryan_Lane so, the function will get: minion_id, <arguments-from-config>
00:19 forrest Joseph, it handles the additional indentation, take a look here: https://raw.githubusercontent.com/saltstack/salt/develop/doc/topics/best_practices.rst
00:19 forrest if emacs isn't handling spaces, I don't know what to tell you
00:20 Ryan_Lane ext_pillar:
00:20 Ryan_Lane - hiera: /etc/hiera.yaml
00:20 forrest but I wrote all of that in vim no problem
00:20 Ryan_Lane that would load the hiera pillar, and would pass in /etc/hiera.yaml as an argumnt
00:20 agliodbs ok ... and where do I drop heira.py?
00:21 Ryan_Lane _modules/pillar
00:21 Ryan_Lane I think
00:21 Ryan_Lane _modules/pillars?
00:21 Joseph forrest: oh vim gives me promblesm.
00:21 agliodbs Ryan_Lane: that info's not in the docs ... believe me, I looked ....
00:21 Ryan_Lane I think I asked someone in the channel :D
00:21 Joseph i am wondering if am just hitting emacism that it wants done in a certain way and i am just not getting that way
00:22 agliodbs Ryan_Lane: basically, the docs say "well, it depends"
00:22 forrest it wants spaces done a certain way?
00:22 Ryan_Lane heh
00:22 Joseph forrest: tabs actually
00:22 forrest Are you literally putting spaces, writing the file, and then it isn't picking it up?
00:22 forrest tabs converted to spaces you mean?
00:22 forrest don't use tabs
00:22 Ryan_Lane I really wish masterless and master salt used the exact same directory layout
00:23 forrest the rst files should be treated like python code and conform to pep8 standards, use spaces, no more than 79 characters per line, etc.
00:23 Joseph forrest: oh i see. you are expecting spaces. tabs are of the devil okay
00:23 Joseph got it
00:23 Ryan_Lane this whole _modules thing is just magical and awkward
00:23 forrest I'm not saying they are the devil
00:23 forrest just saying spaces might help
00:23 forrest I never use 'tabs'
00:23 forrest or what the OS recognizes as tab characters
00:23 forrest or however it handles that
00:23 Joseph forrest: tabs work just fine for me in a python mode in emacs. I expected the same behiavor for rst
00:23 Joseph apparently not
00:24 Joseph i mean emacs is converting the tabs too spaces for me
00:24 Joseph but it was tab like
00:24 Joseph not so much for rst apparently
00:24 forrest yea as long as the tabs are converted to spaces you should be ok
00:24 forrest I mean I use the 'tab' button, but it's spaces
00:24 forrest just a set number of them
00:24 forrest I don't see why rst would have a problem, seems more like maybe emacs rst-mode is having an issue?
00:24 forrest I'm unsure, I don't use emacs
00:25 Joseph forrest: iu am wondering that as well.
00:25 agliodbs Ryan_Lane: yeah, it kinda feels like 3 people have 3 different ways to implemetn it, and all three became competing parts of Salt
00:25 Outlander joined #salt
00:26 Ryan_Lane it really feels like master/minion is the preferred use and masterless is a patched on addition that most of the devs don't use :)
00:26 Networkn3rd joined #salt
00:26 JasonSwindle joined #salt
00:26 Ryan_Lane agliodbs: anyway, external pillar modules are a subset of custom modules
00:27 bhosmer joined #salt
00:27 Ryan_Lane so, if your's is using the default file_roots location, it's /srv/salt/_modules/pillar
00:27 Ryan_Lane or maybe pillars. can't remember
00:28 Ryan_Lane the plural/singular inconsistent naming thing drives me insane as well :)
00:28 agliodbs pillar, I think
00:29 JasonSwindle Anyone here run a Salt Syndic + Master of Masters?
00:30 forrest Who is this 'jasonswindle' person?
00:30 JasonSwindle Hi forrest :P
00:30 JasonSwindle Sorry, been silly busy in my new role
00:30 forrest I'm just joking
00:31 JasonSwindle I am running into a unique issue.  I need to accept a Minion key on the Syndic Master
00:32 JasonSwindle I cannot target the Master on the Master of Masters
00:36 bhosmer joined #salt
00:37 bhosmer joined #salt
00:38 bhosmer joined #salt
00:38 bhosmer joined #salt
00:39 vbabiy joined #salt
00:39 bhosmer joined #salt
00:40 bhosmer joined #salt
00:49 forrest JasonSwindle, you mean like: https://github.com/saltstack/salt/issues/8701
00:49 Joseph sheesh, has anyone thought about how nested the docuemtnation is. Why does the tutorial page have to start at X.X.X
00:49 forrest Joseph, that was a change we made a while back
00:50 JasonSwindle I think I am solving it by installing a minion on the Syndic master
00:50 Joseph Are we happy with that change?
00:50 Joseph lol
00:50 forrest It's better than how it was before
00:50 Joseph well it can always be worse
00:50 Joseph that i am confident in
00:51 forrest joined #salt
00:51 Joseph yea i want to have a subsection but that puts it 5 levels deep
00:51 Joseph probably not the best idea
00:54 bhosmer_ joined #salt
00:56 anuvrat joined #salt
01:02 mgw joined #salt
01:06 pdayton joined #salt
01:07 bhosmer joined #salt
01:08 bhosmer joined #salt
01:08 bhosmer joined #salt
01:24 combusean joined #salt
01:26 xzarth_ joined #salt
01:26 DaveQB joined #salt
01:37 bhosmer_ joined #salt
01:38 bhosmer joined #salt
01:40 dccc_ joined #salt
01:47 ashw7n joined #salt
01:49 tmwsiy_ joined #salt
01:51 ajprog_laptop joined #salt
01:54 ashw7n_ joined #salt
01:54 anuvrat joined #salt
01:56 shaggy_surfer joined #salt
01:58 N-Mi joined #salt
02:02 alunduil joined #salt
02:04 JasonSwi_ joined #salt
02:04 ckao joined #salt
02:05 bhosmer joined #salt
02:06 jalbretsen joined #salt
02:12 brucelee joined #salt
02:14 Sypher joined #salt
02:19 jcsp1 joined #salt
02:20 sgviking joined #salt
02:29 jnials joined #salt
02:30 JasonSwindle joined #salt
02:48 pfallenop joined #salt
02:48 bhosmer joined #salt
02:54 pfallenop joined #salt
02:59 allanparsons how do i get pillar data that's in a yaml list?
02:59 allanparsons top:sub:list:<list_item>
02:59 allanparsons that doesnt work
03:04 ashw7n joined #salt
03:09 jesusaurus allanparsons: instead of <list_item> you want <list_index> which should be a zero-indexed int
03:09 allanparsons so how do i do that with pillar.get
03:10 allanparsons for example:
03:10 allanparsons top:sub:list returns:  - PORT="80"
03:10 allanparsons how do i get at the PORT
03:11 jesusaurus top:sub:list:0
03:11 allanparsons that list varies :\
03:11 aurigus joined #salt
03:11 aurigus joined #salt
03:11 allanparsons and the index doesnt work either ;)
03:12 allanparsons at least usning pillar.get
03:13 jesusaurus if top:sub:list is a yaml sequence, then pillar.get('top:sub:list') should return a python array
03:13 catpiggest joined #salt
03:14 allanparsons it returns a list
03:14 jesusaurus and pillar.get('top:sub:list:0') or pillar.get('top:sub:list')[0] should return the first element of the list
03:15 allanparsons so - Item1=meh  -Item2=blah -Item3=blah
03:15 allanparsons what if my list varies the order
03:15 allanparsons how can i get a specific item from that list.
03:15 allanparsons is that possible?
03:15 Debolaz4 joined #salt
03:16 jesusaurus if its a yaml sequence, then you probably want to iterate over it
03:16 allanparsons argh
03:16 allanparsons yeah
03:16 allanparsons figured that :(
03:16 jesusaurus if you want to pick and choose things from it, it should probably be a dict not a list
03:16 allanparsons and then do an IF inside
03:19 thayne joined #salt
03:38 schimmy joined #salt
03:40 schimmy1 joined #salt
03:43 sgviking joined #salt
03:46 jgarr joined #salt
03:46 ScrumpyJack joined #salt
03:46 aqua^^ joined #salt
03:46 baffle joined #salt
03:46 shalicke joined #salt
03:46 sifusam joined #salt
03:46 ahale joined #salt
03:46 kossy joined #salt
03:46 notbmatt joined #salt
03:46 cheus joined #salt
03:46 perfectsine joined #salt
03:46 JPaul joined #salt
03:46 insatsu joined #salt
03:46 Schmidt joined #salt
03:46 Spark joined #salt
03:46 zain_ joined #salt
03:46 FarrisG joined #salt
03:46 xt joined #salt
03:47 anteaya joined #salt
03:47 vmdsch joined #salt
03:47 programmerq joined #salt
03:47 jesusaurus joined #salt
03:47 aurigus joined #salt
03:47 aurigus joined #salt
03:47 patrek joined #salt
03:48 Valdo joined #salt
03:49 otter768 joined #salt
03:50 ashw7n joined #salt
03:51 ckao joined #salt
03:52 thayne joined #salt
03:52 sverrest_ joined #salt
03:53 insatsu_ joined #salt
03:57 mpoole joined #salt
03:57 thehaven_ joined #salt
03:58 rogst_ joined #salt
04:01 ilako joined #salt
04:01 unknown007 joined #salt
04:02 bhosmer joined #salt
04:02 sunkist joined #salt
04:03 anuvrat joined #salt
04:05 Xiao joined #salt
04:06 Luke joined #salt
04:18 krow joined #salt
04:19 brucelee_ joined #salt
04:21 ashw7n joined #salt
04:35 seventy3_away joined #salt
04:36 smferris joined #salt
04:38 sunkist joined #salt
04:38 sunkist fstab and salt?
04:47 dangra joined #salt
04:51 nicnac_ joined #salt
04:55 FNG joined #salt
04:57 FNG Hello everyone, So I just found Saltstack and very excited to get started. what would be a well supported full and easy to use OS for the master install ?
05:00 druonysus joined #salt
05:00 druonysus joined #salt
05:09 sunkist FNG, I really enjoy ubuntu.
05:10 sunkist It's easy to get going with the salt installer.
05:10 sunkist And if you're not running ubuntu, you can evaluate ubuntu and salt both using vagrant.
05:11 FNG Cool, just found the Official Salt Walkthrough
05:13 FNG vagrant never hear of it.
05:14 sunkist vagrant is a quick way to spin up a local virtual machine.
05:14 sunkist It uses virtualbox as a backend by default.
05:14 sunkist But with a simple command you can bring up a clean machine.
05:15 FNG I have the very nice docs in hand from http://docs.saltstack.com/ and  and esx server wating to be used with a weekend to kill
05:15 sunkist Then you can destroy it when you're done with a single command.
05:15 sunkist Sounds like a plan!
05:15 FNG I will deffently look in to vagrant sound very useful
05:15 DaveQB joined #salt
05:18 FNG any words of  warnings advice that a newbe may run in to ?
05:20 sunkist FNG, you're already on the irc channel, I think you've already got a leg up on the world;
05:20 sunkist my biggest warning would be to not let a simple error keep you from making progress for long.
05:22 sunkist I needed config management so badly that I wrote my own bash scripts to do it (poorly).  I didn't think to ask if anyone else had solved this problem.  Then I found opscode chef and it was amazing to me--until I had to fight with it for four weeks just to get a "hello world" config going.
05:22 brucelee_ joined #salt
05:22 sunkist Finding salt was like a breath of fresh air, and within a single evening I was using it successfully.
05:24 sunkist So if you're experiencing difficulty, don't let it slow you down for long!
05:24 FNG cool , thanks Sunkist really appreciate hearing that, I'll definitely be back
05:25 FNG FNG away
05:29 linjan joined #salt
05:37 pixelgremlinz joined #salt
05:37 travisfischer joined #salt
05:54 bhosmer joined #salt
06:02 jalaziz joined #salt
06:04 TyrfingMjolnir joined #salt
06:05 ipalreadytaken joined #salt
06:07 seventy3_away joined #salt
06:11 smferris joined #salt
06:12 joehillen joined #salt
06:17 picker joined #salt
06:20 Luke joined #salt
06:20 ashw7n joined #salt
06:22 ashw7n joined #salt
06:22 ipalreadytaken joined #salt
06:29 taterbase joined #salt
06:41 joehillen joined #salt
06:44 brucelee_ joined #salt
06:45 ipalreadytaken joined #salt
06:50 ndrei joined #salt
06:58 pdayton joined #salt
07:09 brucelee_ joined #salt
07:22 ashw7n joined #salt
07:25 chiui joined #salt
07:39 ghartz_ joined #salt
07:52 travisfischer joined #salt
08:08 sheldon__ joined #salt
08:09 sheldon__ when i accept minion key on salt-master ,i got this error in salt-minion log, then salt-minion service stop.
08:09 sheldon__ Traceback (most recent call last):   File "/usr/bin/salt-minion", line 18, in <module>     main()   File "/usr/bin/salt-minion", line 15, in main     minion.start()   File "/usr/lib/python2.7/dist-packages/salt/__init__.py", line 190, in start     minion = salt.minion.Minion(self.opts)   File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 134, in __init__     self.authenticate()   File "/usr/lib/python2.7/dist-packages/sal
08:09 sheldon__ M2Crypto.RSA.RSAError: invalid header
08:10 sheldon__ does anybody have the same error/
08:11 sheldon__ who can help me, any help would be highly appreciate
08:21 ramteid joined #salt
08:23 ashw7n joined #salt
08:28 ndrei joined #salt
08:33 Luke joined #salt
08:35 Luke joined #salt
08:38 Luke joined #salt
08:40 Luke joined #salt
08:42 chiui joined #salt
08:47 brucelee_ joined #salt
09:02 CeBe joined #salt
09:06 TyrfingMjolnir joined #salt
09:18 brucelee_ joined #salt
09:24 ashw7n joined #salt
09:38 n8n joined #salt
09:40 stritz joined #salt
09:41 ajprog_laptop1 joined #salt
09:41 nrgaway_ joined #salt
09:41 jdog_ joined #salt
09:44 q4brk joined #salt
09:44 kedo39 joined #salt
09:44 Luke_ joined #salt
09:44 redondos- joined #salt
09:44 jbub joined #salt
09:44 JPaul joined #salt
09:45 cruatta joined #salt
09:45 MK_FG joined #salt
09:45 Luke joined #salt
09:46 Luke joined #salt
09:47 Luke joined #salt
09:50 Luke joined #salt
09:51 Luke joined #salt
09:52 Luke joined #salt
09:52 Outlander joined #salt
09:53 Luke joined #salt
10:20 ekristen joined #salt
10:25 ashw7n joined #salt
11:00 n8n_ joined #salt
11:09 quickdry21 joined #salt
11:19 bhosmer joined #salt
11:25 TyrfingMjolnir joined #salt
11:26 ashw7n joined #salt
11:50 bhosmer joined #salt
12:00 vvoody joined #salt
12:02 linjan joined #salt
12:07 TyrfingMjolnir joined #salt
12:10 TyrfingMjolnir joined #salt
12:15 TyrfingMjolnir joined #salt
12:26 ashw7n joined #salt
12:39 ndrei joined #salt
12:49 sgviking joined #salt
12:56 felskrone joined #salt
12:57 diegows joined #salt
13:16 Nazca joined #salt
13:17 patrek_ joined #salt
13:27 ashw7n joined #salt
13:36 jrdx joined #salt
13:57 chiui joined #salt
14:12 sverrest joined #salt
14:28 ashw7n joined #salt
14:28 bhosmer joined #salt
14:29 acabrera joined #salt
14:31 mateoconfeugo joined #salt
14:33 thayne joined #salt
14:50 Debolaz3 joined #salt
14:50 Sypher joined #salt
15:08 dccc joined #salt
15:13 micah_chatt joined #salt
15:18 micah_chatt joined #salt
15:19 mateoconfeugo joined #salt
15:23 pdayton joined #salt
15:23 kyr0 joined #salt
15:29 ashw7n joined #salt
15:33 bhosmer joined #salt
15:45 bemehow joined #salt
15:50 ipalreadytaken joined #salt
15:53 ekristen joined #salt
15:53 mgw joined #salt
15:55 ashw7n joined #salt
15:56 bluenemo joined #salt
15:58 bluenemo hi guys. what is the best way to create ensure a file /var/log/dovecot.log is present with owner dovecot and group vmail with permissions 0660, and create (touch) and empty file if the file is not present (with the specified permissions)? file.touch sadly does not understand the possibilities of file.managed, but I dont want to template.
16:02 bluenemo might be missunderstanding something.. hope you can help :)
16:05 micah_chatt joined #salt
16:17 acabrera joined #salt
16:18 taterbase joined #salt
16:24 mgw joined #salt
16:27 bemehow joined #salt
16:29 jnials joined #salt
16:30 jnials joined #salt
16:30 bemehow joined #salt
16:33 elfixit joined #salt
16:36 mgw joined #salt
16:43 schimmy joined #salt
16:47 schimmy1 joined #salt
16:47 taion809 joined #salt
16:49 Debolaz3 joined #salt
16:49 kyr0 joined #salt
17:07 CeBe joined #salt
17:14 bemehow joined #salt
17:15 ashw7n joined #salt
17:22 brucelee_ joined #salt
17:23 krow joined #salt
17:34 ashw7n joined #salt
17:36 stanchan joined #salt
17:36 n8n joined #salt
17:40 Furao joined #salt
17:49 ashw7n joined #salt
17:56 bluenemo i'm trying to manage group assignments in /etc/group via user.group, the states dont show any errors but there are no groups being assigned: http://paste.debian.net/hidden/b304481e/
17:56 bemehow joined #salt
17:59 arnoldB bluenemo: simply use file.managed without contents/source
18:00 bluenemo arnoldB, regarding the touch question, yes?
18:00 arnoldB bluenemo: yeah
18:00 arnoldB the doc of file.managed should describe this behaviour
18:00 blast_hardcheese joined #salt
18:01 arnoldB at least the were a sentence about this a year ago :D
18:01 bluenemo uh yes. sry m) my bad..
18:02 bluenemo error was, as mostly, somewhere else.. do you have any idea about my group problem arnoldB ?
18:02 arnoldB I don't understand the problem
18:03 arnoldB hm ok wait
18:04 bluenemo basically i want to ensure the user vmail is present as system user with 10000 uid and gid. then i want to add the group vmail and add the users postfix and dovecot to it.
18:05 bluenemo salt highstate says "yes" :) looking into /etc/passwd says "no"..
18:05 linjan joined #salt
18:08 arnoldB have you tried addusers ?
18:08 arnoldB I haven't used such a state before. Maybe there is a bug
18:09 arnoldB also the code of group.py have been changed just a few months ago https://github.com/saltstack/salt/pull/11108/files
18:10 arnoldB you could also add user.present states and specify the group memberships of each user
18:11 arnoldB like this: https://github.com/bechtoldt/opennebula-formula/blob/master/opennebula/_oneuser.sls#L13
18:11 arnoldB bluenemo: btw. if you're looking for a postfix formula, check https://github.com/bechtoldt/postfix-formula
18:12 thayne joined #salt
18:16 combusean joined #salt
18:16 ashw7n joined #salt
18:32 acabrera joined #salt
18:37 bluenemo arnoldB, using user.present is ok... it however is executed every time (blue output). thank you for the link.
18:37 otter768 joined #salt
18:41 arnoldB bluenemo: then you have something changing attributes of the user, maybe a state somewhere
18:57 bluenemo arnoldB, the postfix formula is really interesting! did you write it?
19:00 combusean joined #salt
19:00 arnoldB bluenemo: yes
19:01 zain_ joined #salt
19:02 borgstrom joined #salt
19:05 bluenemo I like the way you handled the mapfiles. It might be a bit philosophical, but I'm wondering how much to abstract into logic (and pillars) and when to use templates that are not build up completely from given data (like your postfix beautifully does; really cool work!) Also as I am currently writing on something for dovecot, I'm wondering if I should append the package maintainers dovecot configuration via a /etc/dovecot/local.conf or if it is wise
19:05 bluenemo r to template the file (and, possibly, everything under /etc/dovecot/conf.d). What do you think on that?
19:07 bhosmer joined #salt
19:07 acabrera_ joined #salt
19:09 manfred bluenemo: it it is at all possible, i always suggest using fail.replace, or file.comment, so that you don't have to maintain the whole file, and can just override shit, so they still get the benefit of upgraded stuff and the .newpkg files
19:10 bluenemo my thought mostly, yes. only think i'm a bit scared of when overriding defaults is that i'm again not controlling everything.. if package maintainers set crazy=true indovecot conf and I dont override it in local.conf, crazy is true without me noticing. well, usually, package maintainers choose wise values.
19:11 arnoldB that's a very difficult topic. on my daily job I'm writing tons of puppet code learning how to improve every bit of code because puppet sucks. I try to work without template files because they need to be keep update every X releases of an distribution.
19:11 bluenemo your postfix definitly is a beautiful example of how to abstract. quite the example I was looking for to learn actually :)
19:11 arnoldB package maintainers aren't always experts of the software they're packaging
19:11 bluenemo :)
19:12 bluenemo yeah.
19:12 manfred bluenemo: i like the mysql one too
19:12 manfred bluenemo: since all the root password setting stuff is now all in pillars
19:12 manfred https://github.com/saltstack-formulas/mysql-formula/blob/master/mysql/server.sls#L10
19:14 bluenemo ah via debconf, really nice idea!
19:14 bluenemo :D
19:14 bluenemo cool
19:15 arnoldB https://github.com/bechtoldt/mysql-formula/blob/master/mysql/server.sls#L4 :P
19:16 bluenemo arnoldB, i dont get your second last sentence completely. when you mean templates and distro releases you mean changes in the syntax / names of options and so on?
19:16 arnoldB bluenemo: yes
19:16 bluenemo hehe :) (your sql server ;)
19:16 bluenemo neat
19:17 bluenemo ah yes, the more I read this stuff the more I totally see that I want to stuff with salt..
19:17 bluenemo arnoldB, this would affect your postfix formula as well, wouldnt it?
19:17 arnoldB I have ~ 40 formulas so far (many more will come, including dovecot). I don't want to maintain hundreds of templates for every distro and software version
19:18 vbabiy joined #salt
19:18 bluenemo aah ok, get it. Thats why you are abstracting it completely; to minimize files to be handled? (the pillar file in your pf IS easy to read)
19:18 krow joined #salt
19:19 arnoldB bluenemo: that's the plan
19:19 bluenemo understand. very interesting insight
19:21 arnoldB joined #salt
19:29 bluenemo arnoldB, when you want to have different postfix setups (like a anti spam gateway,  a normal ~20 user machine, a cluster for a ~100.000 users and so on) do you reconfigure the pillars? or was it never scope of your project to cover such things but to deploy one static stand alone server for $domain.tld?
19:31 arnoldB bluenemo: assign roles to your systems, like postfix_smarthost, postfix_sattelite, postfix_foo. then you can assign pillars to these roles which can have individual postfix pillars
19:31 arnoldB I store the role in a grain named 'roles'
19:32 bluenemo ah ok i see.
19:32 arnoldB states and pillars match against this grain
19:32 arnoldB almost everything should or will be possible with this formula
19:32 TyrfingMjolnir joined #salt
19:34 bluenemo understand. thanks again :)
19:37 jcsp joined #salt
19:39 Furao joined #salt
19:42 happytux joined #salt
19:43 seventy3_away joined #salt
19:46 travisfischer joined #salt
19:53 ashw7n joined #salt
19:54 happytux joined #salt
19:56 ajw0100 joined #salt
20:04 mateoconfeugo joined #salt
20:12 ajw0100 joined #salt
20:15 bluenemo joined #salt
20:21 izibi joined #salt
20:22 ashw7n joined #salt
20:27 Ryan_Lane joined #salt
20:40 pixelgremlins joined #salt
20:47 mgw joined #salt
20:49 brucelee_ joined #salt
20:53 ajw0100 joined #salt
20:54 krow joined #salt
20:58 brucelee1 joined #salt
21:09 bhosmer joined #salt
21:16 krow1 joined #salt
21:18 krow joined #salt
21:26 bhosmer_ joined #salt
21:27 mpanetta joined #salt
21:34 mpanetta joined #salt
21:36 krow1 joined #salt
21:37 DaveQB joined #salt
21:37 krow joined #salt
21:37 krow2 joined #salt
21:38 bhosmer joined #salt
21:38 krow3 joined #salt
21:39 krow4 joined #salt
21:40 oz_akan_ joined #salt
21:40 krow joined #salt
21:42 CeBe joined #salt
21:42 oz_akan_ joined #salt
21:46 vmdsch left #salt
21:51 crashmag joined #salt
21:57 TyrfingMjolnir joined #salt
22:07 sunkist Has anyone deployed the users-formula from github?  I copied it and I'm having an error on this line: https://github.com/saltstack-formulas/users-formula/blob/bec130503e36cbb413e87be14ed2e42a51293e30/users/init.sls#L8
22:07 manfred sunkist: did you setup your pillar?
22:07 sunkist error is " Jinja variable 'int object' has no attribute 'get'; line 8"
22:07 sunkist yes.
22:08 manfred sounds like you just put in the uid
22:08 manfred instead of a dict
22:08 sunkist I'm running masterless, so I set the pillar dir in /etc/salt/minion
22:08 manfred sunkist: https://github.com/saltstack-formulas/users-formula/blob/master/pillar.example
22:08 sunkist manfred, that could be it.
22:08 manfred you have something that is a dictionary of users with their settings
22:08 manfred so
22:08 manfred users:
22:08 manfred manfred:
22:08 manfred home: /home/manfred
22:08 manfred sunkist:
22:09 manfred home: /home/sunkist
22:09 manfred expand from there
22:09 sunkist I copied the example's "fullname" etc for two users.
22:10 sunkist I checked that I'm consistently indenting...
22:10 manfred you need a home directory listed or that line will fail
22:11 jalaziz joined #salt
22:11 manfred oh
22:11 manfred i know what it is
22:11 sunkist You shoudn't .
22:11 manfred yeah, one second
22:11 sunkist The users state defaults to /home/<user>
22:11 sunkist Okay.
22:13 sunkist So here's my pillar file: (/srv/salt/pillar/users/init.sls)
22:13 sunkist users:
22:13 sunkist sunkist:
22:13 sunkist - uid: 1001
22:14 sunkist - fullname: "Sunkist Soda"
22:14 Guest28289 joined #salt
22:14 mateoconfeugo joined #salt
22:17 manfred remove the -
22:17 manfred it should be a dictionary
22:17 manfred not a list
22:18 TyrfingMjolnir joined #salt
22:18 manfred users:
22:18 manfred sunkist
22:18 manfred bah
22:18 manfred users:
22:18 manfred sunkist:
22:18 manfred - uid: 1001
22:18 manfred dammit...
22:18 manfred http://paste.gtmanfred.com/QGDUq/
22:18 manfred that
22:20 sunkist manfred, made your changes, I'm testing the result.
22:20 TyrfingMjolnir joined #salt
22:22 bhosmer joined #salt
22:22 sunkist manfred, it worked.  I won't make that mistake again!
22:22 manfred cool
22:22 sunkist Thank for your help manfred!
22:22 manfred np
22:27 sunkist So manfred, the dash '-' character makes a list instead of a dictionary?
22:29 manfred sunkist: http://symfony.com/doc/current/components/yaml/yaml_format.html
22:29 manfred technically called a collection
22:32 ajw0100 joined #salt
22:46 n8n joined #salt
22:48 krow joined #salt
23:07 combusean joined #salt
23:08 arnoldB someone here who could be advice which http python I could use in Salt python code?
23:08 arnoldB s/be/me/
23:08 manfred everything should be the requests library now iirc
23:09 manfred for salt-cloud at least
23:13 arnoldB hm
23:15 viq joined #salt
23:16 arnoldB I see. the package python-requests (debian salt-common control file) is referenced in the develop version, but not in 2014.1.4
23:16 arnoldB I'm going to use requests. thx manfred
23:19 ashw7n joined #salt
23:21 yidhra joined #salt
23:21 bhosmer joined #salt
23:22 diegows joined #salt
23:31 krow joined #salt
23:39 mway joined #salt
23:40 mway hey guys, anyone have an idea why the mine would only be returning the master's data?
23:40 n8n joined #salt
23:42 manfred how are you using the mine?
23:44 mway CLI for testing, but ultimately in a state; something like, salt m1 mine.get m2 network.ip_addrs, for example, returns nothing; if I wildcard m2, it only returns the master's data
23:45 manfred what are your minion names?
23:45 manfred mine_functions:
23:46 manfred network.ip_addrs: []
23:46 manfred [root@salt ~]# salt centos\* mine.get \* network.ip_addrs
23:46 manfred centos.gtmanfred.com:
23:46 manfred ----------
23:46 manfred centos.gtmanfred.com:
23:46 manfred - 10.176.169.53
23:47 manfred then it lists out everything the centos.gtmanfred.com gets from the mine for all minions
23:48 mway yeah.  I get this:
23:48 mway svc-storage:
23:48 mway ----------
23:48 mway salt-master:
23:48 mway - 10.0.100.100
23:48 mway svc-lb:
23:48 mway ----------
23:48 mway salt-master:
23:48 mway - 10.0.100.100
23:48 manfred so the only minion you have that is sending information back to the mine is the master
23:49 manfred you need to have the mine_functions: in every minions /etc/salt/minion
23:49 manfred https://github.com/gtmanfred/salt-states/blob/master/hosts/init.old.sls#L2
23:49 krow joined #salt
23:49 mway argh. :p totally spaced on that one
23:49 manfred :)
23:49 manfred http://ix.io/cJC
23:50 bhosmer joined #salt
23:50 manfred if you use salt-cloud, you can drop it in the minion: dictionary in your /etc/salt/cloud to have it apply to every minion
23:50 mway that's handy, thanks for that :)
23:51 manfred np
23:54 mway (btw, had never seen ix.io before, clutch)
23:55 manfred curl -F 'f:1=<-' ix.io < /path/to/file
23:55 manfred or curl -F 'f:1=</path/to/file' ix.io
23:55 mway yeah, reading the man :p
23:55 manfred tail -c +0 /path/to/directory/*.py | curl -F 'f:1=<-' ix.io
23:56 manfred i love that one because tail puts the file name and seperates everything
23:56 mway oh that'll be nice
23:56 manfred yeah
23:56 manfred the other one is sprunge
23:56 manfred http://sprunge.us
23:56 taion809 joined #salt
23:56 manfred but that on is a google apps thing, and is a free one, so it is limited on space, and stops working sometimes
23:57 mway well I can't have my random temporary cli pastes disappearing!
23:57 taion809 joined #salt
23:59 manfred well, not that, it just stops accepting pastes from time to time
23:59 to_json joined #salt
23:59 manfred because it is full
23:59 manfred which is why i use ix.io, cause it just cycles through 3 digit ids
23:59 mway ah
23:59 manfred you can make an account on ix.io, and you get to keep them all :P

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