Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-10-06

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

All times shown according to UTC.

Time Nick Message
00:04 schimmy joined #salt
00:05 acabrera joined #salt
00:08 schimmy1 joined #salt
00:09 baconbeckons joined #salt
00:13 baconbeckons i’m using the salt-fromula https://github.com/saltstack-formulas/salt-formula to salt my saltmaster. this formula puts files into /etc/salt/cloud.[maps|profiles|providers].d/ but doesn’t create /etc/salt/cloud and it doesn’t appear that my salt-cloud settings are loading. does salt-cloud look in the .d directories autmoatically?
00:17 canci joined #salt
00:22 kingel joined #salt
00:25 rawtaz left #salt
00:31 bhosmer joined #salt
00:34 Katafalkas joined #salt
00:43 canci joined #salt
00:54 cpowell joined #salt
01:04 viq joined #salt
01:09 baconbeckons joined #salt
01:17 pedro_ joined #salt
01:17 pedro_ howdy
01:17 pedro_ I have a question regarding custom grains
01:17 sroegner_ joined #salt
01:17 Guest71485 I wrote a basic grain to get the public ip of the minion
01:18 Guest71485 however, I only want to deploy to a minion based on their id
01:18 Guest71485 any ideas?
01:19 baconbeckons joined #salt
01:21 heewa joined #salt
01:21 Jahkeup joined #salt
01:32 schimmy joined #salt
01:33 malinoff joined #salt
01:36 NotreDev joined #salt
01:37 schimmy joined #salt
01:40 otter768 joined #salt
01:43 aquinas joined #salt
01:45 badon joined #salt
02:07 malinoff joined #salt
02:11 kingel joined #salt
02:15 chitown joined #salt
02:16 TyrfingMjolnir joined #salt
02:19 ramishra joined #salt
02:20 bhosmer joined #salt
02:22 schristensen joined #salt
02:28 micko joined #salt
02:33 n8n joined #salt
02:46 tafa2 joined #salt
02:50 baconbeckons joined #salt
02:53 baconbeckons if i use salt-cloud to launch my instances (web[1-3]), they show up in salt-key as web[1-3]. however, after i run salt ‘*’ state.hightstate, they end up using a different name (the hostname) which appears to be set by /etc/salt/minion_id. my state.highstate ensures that salt minion is installed using the salt-formula but why would this be changing the id?
02:58 baconbeckons i see why it’s changing. when i ensure that salt-minion is installed, i also overwrite /etc/salt/minion. i presume (but am waiting for new servers to spin up to confirm) that the minion_id is set in /etc/salt/minion. i’m also presuming that when state.highstate is called, it sees that the minion id isn’t set on the minion so it creates minion_id based off of the default which is the hostname
02:58 baconbeckons however, what is the best practice for managing salt with salt when you are using salt-cloud?
02:59 baconbeckons my top.sls is configured to make sure that salt.minion is installed on all machines. should i just presume that salt-cloud has installed the minion? if i do that, how do i deal with a minion config change in my deploy?
03:01 mpanetta joined #salt
03:02 Ahrotahntee am I able to flatten pillar key-values into the top.sls file?
03:02 Ahrotahntee because I can't seem to get those values to show up - but they're not throwing a syntax error or anything
03:10 fllr joined #salt
03:13 hasues joined #salt
03:16 NotreDev joined #salt
03:17 hintss joined #salt
03:18 sroegner_ joined #salt
03:27 semarie joined #salt
03:30 baconbeckons joined #salt
03:48 res0nat0r joined #salt
03:55 dccc_ joined #salt
03:57 n8n_ joined #salt
04:00 kingel joined #salt
04:01 GrueMaster joined #salt
04:04 higgs001 joined #salt
04:06 mpanetta joined #salt
04:09 bhosmer joined #salt
04:13 fllr joined #salt
04:16 cads joined #salt
04:23 tafa2 joined #salt
04:25 chitown joined #salt
04:26 iggy Ahrotahntee: be more specific
04:27 iggy baconbeckons: one of salt-cloud's tasks is installing the minion and connecting it to the master (either the one you specify or the default 'salt')
04:28 baconbeckons iggy: if i’m using salt-cloud, should i still enforce the minion and master config in my saltstack states?
04:28 nocturn joined #salt
04:28 nocturn joined #salt
04:28 baconbeckons the way i understood the docs until now, salt-cloud bootstrapped salt minion and/or master onto the new instances but then it expected state.highstate to take over management of salt
04:33 iggy traditionally, my minion and master configs have been fairly simple, so I've passed them through during the bootstrap
04:33 baconbeckons iggy: what happens if you need to make a change after they have been deployed?
04:34 iggy I could see a case where you'd have a more complex config that required management
04:34 baconbeckons is there some part of salt-cloud that ensures the state of minion/master after the initial deploy?
04:34 iggy manage it with salt... this is the salt channel after all
04:35 baconbeckons iggy: so the issue is that when i manage it with salt, it blows away the config that was put on the system by salt-cloud
04:35 iggy that's an issue because?
04:36 baconbeckons the main problem is with the minion id
04:37 baconbeckons the id is inserted into /etc/salt/minion by salt-cloud. when i run my state that includes minion config, it goes back to useing the hostname because i don’t set id in the minion config
04:37 baconbeckons i don’t do that because i don’t know how
04:37 baconbeckons and i presume that because i don’t set it, that is why the /etc/salt/minion_id is created
04:37 iggy why does your state change it?
04:38 baconbeckons my state is based off of the salt-formula
04:39 baconbeckons iggy: so it is enforcing the state of the minion config
04:39 iggy I don't recall it changing minion_id, but if it is, just change your copy of the formula to not do that
04:39 baconbeckons i don’t see it in the formula
04:39 baconbeckons i thought that it was part of the salt install or highstate?
04:40 baconbeckons i presumed that it was because id isn’t set in minion
04:40 iggy when the minion first starts, it will generate an id if one doesn't exist
04:40 iggy it does not later change it for no reason
04:42 baconbeckons i think it happens because /etc/salt/minion changes. the watcher on that file triggers the minion service to restart, and that then generates the new id
04:42 iggy I've never seen a minion generate a new id unless it was told to
04:43 iggy I'm not saying it can't happen, but I
04:43 iggy 've never seen it
04:43 baconbeckons iggy: in the end, what is the best thing to do? stop enforcing the salt minion and master with salt and just leave it alone after salt-cloud sets it up?
04:43 baconbeckons iggy: i’m testing what i said above...
04:44 baconbeckons so i just commented out the line in minion that set the id and then restarted the salt-minion service. that caused minion_id to generate set to the hostname
04:46 baconbeckons iggy: it seems fine to let salt-cloud deal with managing the salt config, but does salt-cloud allow me to configure the providers, profiles, and maps in a new salt master that i setup with make_master?
04:47 iggy no
04:48 baconbeckons iggy: how do i reconfigure all of this then?
04:49 baconbeckons iggy: oh, so i would manage salt-cloud with salt but not salt-minion and salt-master maybe?
04:52 iggy I've done it both ways
04:53 ramteid joined #salt
04:54 ajprog_laptop joined #salt
04:55 felskrone joined #salt
04:57 baconbeckons joined #salt
05:06 murrdoc joined #salt
05:11 mpanetta joined #salt
05:18 malinoff joined #salt
05:19 sroegner_ joined #salt
05:22 nocturn joined #salt
05:23 fragamus joined #salt
05:24 baconbeckons joined #salt
05:25 baconbeckons joined #salt
05:31 kingel joined #salt
05:34 Furao joined #salt
05:35 linjan joined #salt
05:45 kingel joined #salt
05:47 roolo joined #salt
05:48 fllr joined #salt
05:50 Katafalkas joined #salt
05:52 UtahDave joined #salt
05:53 oyvjel joined #salt
05:54 UtahDave left #salt
05:55 Katafalk_ joined #salt
05:57 bhosmer joined #salt
05:57 bhosmer_ joined #salt
06:03 xntp_ joined #salt
06:11 mpanetta joined #salt
06:13 TheThing joined #salt
06:15 che-arne joined #salt
06:19 astol joined #salt
06:23 colttt joined #salt
06:28 lcavassa joined #salt
06:31 glyf joined #salt
06:32 freelock joined #salt
06:35 astol1 joined #salt
06:40 fllr joined #salt
06:41 flyboy joined #salt
06:42 badon joined #salt
06:42 kingel joined #salt
06:46 semarie joined #salt
06:48 masm joined #salt
06:52 mindlessdemon joined #salt
07:00 schimmy joined #salt
07:03 schimmy1 joined #salt
07:04 trikke joined #salt
07:05 astol joined #salt
07:12 akafred joined #salt
07:13 bhi joined #salt
07:19 sroegner_ joined #salt
07:20 astol joined #salt
07:24 jeddi joined #salt
07:27 catpig joined #salt
07:36 duncanmv_ joined #salt
07:41 intellix joined #salt
07:46 wnkz joined #salt
07:46 bhosmer joined #salt
07:49 Ztyx joined #salt
07:50 Ztyx Hey - I'd like to enforce file permissions to an existing file (on POSIX system). Can I use file.managed without `source` attribute? Or is there some other state for this?
07:51 malinoff Ztyx, yes, you can omit "source"
07:51 malinoff http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed
07:52 Ztyx malinoff: Awesome. Thanks!
07:55 Ztyx left #salt
07:59 jalaziz joined #salt
08:12 ingwaem joined #salt
08:18 catpig joined #salt
08:29 jdmf joined #salt
08:40 Twiglet_ joined #salt
08:40 astol joined #salt
08:41 ramishra joined #salt
08:41 CycloHex joined #salt
08:42 CycloHex If I have a file with sensitive data, on my master it uses salt['pillar.get'] value, will it be parsed on my inion to the value in that pillar or will it still say {{ pillar blabla}}
08:46 ingwaem CycloHex: you're doing the best thing by putting your sensitive data into a pillar. It is not physically stored on the minion, and will only be saved in memory. To see your pillar items, just run salt '*' pillar.items and you'll see the newly added items. If it's not there you may have to refresh the pillars
08:46 ingwaem salt '*' saltutil.refresh_pillar
08:47 nkuttler hrm, i guess i can't set the timeout per host, can i?
08:48 ingwaem nkuttler: I believe there are timeouts, since there are also queue management settings...not sure about them personally though
08:48 TyrfingMjolnir joined #salt
08:50 ingwaem CycloHex: to get the pillar you can use pillar.get and the key name salt '*' pillar.get pkg:apache, or pillar.item, salt '*' pillar.item foo
08:50 PI-Lloyd joined #salt
08:51 ingwaem brb
08:51 CycloHex Well, I used it in my config file for a specific pkg
08:51 rcsheets_ joined #salt
08:52 CycloHex in the state file I call it with source: salt://files/configfile
08:52 CycloHex in the configfile is a reference to my pillar: passwd: {{salt['pillar.get']('foo:bar:passwd')}}
08:53 CycloHex on my minion when I watch the file on the minion, it still says {{salt['pillar.get']('foo:bar:passwd')}}
08:53 CycloHex although I thought it'd be parsed
08:53 CycloHex to the real passwd
08:54 CycloHex maybe also good to mention, whenever I call a highstate it says Got a bad pillar from master, type str, expecting dict
08:54 TyrfingMjolnir joined #salt
08:56 ingwaem joined #salt
08:58 ingwaem joined #salt
09:05 TyrfingMjolnir joined #salt
09:06 ingwaem_ joined #salt
09:07 istram joined #salt
09:08 scott_w joined #salt
09:09 linjan joined #salt
09:10 CeBe joined #salt
09:11 alanpearce joined #salt
09:14 TyrfingMjolnir joined #salt
09:16 DaveQB joined #salt
09:17 ingwaem` joined #salt
09:18 ingwaem joined #salt
09:19 ingwaem joined #salt
09:20 sroegner_ joined #salt
09:22 TyrfingMjolnir joined #salt
09:24 n8n joined #salt
09:24 mindlessdemon joined #salt
09:29 ingwaem joined #salt
09:29 linjan joined #salt
09:30 astol joined #salt
09:33 CycloHex my pillars are not giving any data to my minion
09:34 CycloHex How to check if the minion can reach pillar data?
09:34 Bateau_ joined #salt
09:35 bhosmer joined #salt
09:38 viq CycloHex: salt minion pillar.get some_pillar
09:39 agend joined #salt
09:39 CycloHex yee, it's not reaching it :s
09:39 viq check master and minion logs
09:39 viq There is often information there if it's some error. Or you could be not assigning that pillar in pillars' top.sls to the machine in question
09:40 CycloHex I had an error, receiving bad pillar from master, type str, expecting dict
09:40 CycloHex but not sure where my mistake is then.. By callign the pillar? or in the sls pilla ritself?
09:40 viq Then looks like you have a malformed pillar data
09:41 viq Sounds like pillar itself.
09:41 CycloHex so inside my pillardata.sls
09:41 viq probably, yeah
09:41 CycloHex hmm
09:41 CycloHex ok
09:41 CycloHex cannot find it, but ok, i'll keep on looking then
09:42 viq CycloHex: if you can paste is somewhere, maybe somewhat sanitized, then maybe someone could point out what's wrong with it
09:42 CycloHex ok
09:45 CycloHex https://gist.github.com/Cyclohex/f96120c30cc8a6f366ab
09:47 viq I'd probably to be on the safe side try putting passwords and expire dates in single quotes
09:49 CycloHex i updated the link with my call to the pillar in the file
09:49 CycloHex https://gist.github.com/Cyclohex/f96120c30cc8a6f366ab
09:49 viq yeah, the way you get at it seems fine
09:50 CycloHex my pillar.items just returned data
09:50 CycloHex how weird is that.. didn't even change anything
09:50 viq :P
09:50 viq I find it not unusual for things to start working after you threaten them with action ;P
09:51 ingwaem They also usually start behaving only when everyone is looking at them, much like the slot experiment with photons of light :)
09:51 CycloHex haha :D thanks viq
09:52 viq ingwaem: or someone who has some chance of knowing what's going on, but close enough ;)
09:53 viq Just "oh, I guess I'll have to finally ask $someone_who_knows_this_stuff" - and lo and behold, it starts working! ;)
09:55 CycloHex When using salt, is it meant to create a base install of a particular sercver, but everything that is serverspecific should be installed manually? (eg I have 3 webserver with the same general config. Although on 1 of the three I'd like a pkg eg pg-view, is it possible to catch this in salt, or should I just manually install the pkg?
09:56 viq CycloHex: sure, you can target states at a specific server
09:57 xmj CycloHex: that's brilliant humor in writing server as SerCVEr.
09:57 xmj i'm sure it wasn't intended that way -- but it's brilliant.
09:58 CycloHex xmj, pun was not intended, no :D Glad you had a laugh, thgough
09:58 viq xmj: s-ER-CVE-r ;)
09:59 kalail joined #salt
10:00 xmj CycloHex: you did upset my CVE highlight
10:00 xmj so i couldn't *not* notice ;)
10:00 agend joined #salt
10:03 alanpearce joined #salt
10:06 trikke hi just starting with salt was wondering if there is anything out there like ansible-galaxy or puppet forge ?
10:06 ingwaem CycloHex: while you can target specific minions to run configs, you can also generalize against grains, such as a role setup in the grains, or even against kernel types, so all debian machines have one set of things, while windows has something else, and mac etc, you can be quite granular or loose in your targeting, and the globs for selecting can be used in your sls files too
10:07 CycloHex globs for selecting can be used in my files too?
10:07 CycloHex you mean by filtering on grains then?
10:07 babilen trikke: What do those do?
10:08 trikke a website with a colleciton of roles
10:08 babilen trikke: There are no roles in salt, but I guess you are looking for https://github.com/saltstack-formulas
10:08 trikke yes
10:09 trikke so salt keeps them in github ?
10:09 babilen trikke: Is that problematic for you?
10:09 trikke no was just wondering
10:09 trikke github is just fine
10:09 babilen salt itself is also available on GH
10:09 ingwaem yea they're kept in github so that the whole salt community can contribute to them :)
10:10 trikke obvious :) but maybe there was a webpage that was maintained with rankings comments etc pointing to those formulas
10:11 viq trikke: ish http://saltstarters.org/
10:11 ingwaem trikke: it's not really needed since there is generally 1 formula per requirement...such as there's 1 for haproxy, 1 for apache, etc
10:12 trikke ok that's nice :) no need to try out x number of formula :)
10:12 babilen Why would you require many suboptimal ones if one could work on making a single one good?
10:12 trikke thx for the page viq
10:12 ingwaem the nice thing about how salt is designed, is that if you design the files necessary to create a new formula, it's system agnostic, meaning you can mix and match kernels since the collection of state files generally take those into consideration, you don't need one for your ubuntu, and one for your mint, etc
10:13 babilen It would be a nightmare if you had to keep those separate
10:13 ingwaem babilen: for sure :)
10:13 trikke babilen no need for them but others mostly have multiple so was just wondering how it worked for salt
10:14 ingwaem trikke: a great example to look at is https://github.com/saltstack-formulas/apache-formula/blob/master/apache/init.sls, you'll see in the first couple of lines there's some jinja code within the sls structure that looks at the kernel
10:15 viq ingwaem: modulo different service names, package names, and config formats...
10:15 babilen (the apache formula is, however, using other outdated idioms)
10:16 ingwaem bah, sorry, I mislinked the exmaple, but there are great examples in the formulas that contain mixes of checks against the operating system so that it gets installed correctly
10:16 ingwaem babilen: I think the apache one just got updated 5 days ago
10:17 ingwaem ahh yes, good example is mysql: https://github.com/saltstack-formulas/mysql-formula/blob/master/mysql/server.sls
10:17 babilen ingwaem: It still uses "order" in debian_full.sls rather than explicit dependencies or implicit ordering
10:17 ingwaem line 9
10:17 ingwaem {% if os_family == 'Debian' %}
10:17 ingwaem babilen: oh
10:18 trikke same as in ansible jinja2 so moving to salt will be easy
10:18 ingwaem trikke: yes :)
10:19 johtso joined #salt
10:21 trikke k thx for the help will have a look at the formulas
10:21 ingwaem trikke: I personally have salt setup so that the pillar data for each minion is fetched from a mysql database. that way I can use mysql to manage all my relationships and data, and then build out files to salt where needed (such as git hub configs), and pillar variables can be defined under a machine definition. if I update the mysql, i can trigger an update on the affected minions
10:22 trikke nice but i suppose that you have to setup the db etc by yourself or is there a community frontend available ?
10:26 semarie joined #salt
10:28 ingwaem trikke: yea, it's all custom work at the moment
10:29 babilen Well, you can use http://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.mysql.html#module-salt.pillar.mysql and don't have to implement that yourself.
10:29 babilen But you will have to setup the databases and fill them with data yourself
10:30 trikke babilen offcourse :)
10:30 ingwaem yes, that's the module I'm using in my implimentation, with some adjustment to fit my schema
10:31 trikke thx looks better then working with txt files
10:31 babilen trikke: http://docs.saltstack.com/en/latest/ref/pillar/all/
10:32 trikke ha nice a cobbler module :)
10:33 ingwaem the other fantastic thing about salt is it can fit almost any workflow, and doesn't stick you in a box. There are many ways to tackle a problem, and many combinations of tools you can use. think of it as a flexible, extendable, framework with communication bus, config management, package management, and other devops manipulations...that's how I identify with it anyhow :)
10:36 trikke well it looks more easy to write system independent then ansible and since it works with jinja2 not to different so much more readable then puppet
10:37 trikke going to give it a try reading the online doc and going to setup a server with some vagrant box to do some testing
10:37 ingwaem trikke: I'm sure you're going to love it :)
10:37 trikke :)
10:38 trikke i noticed that salt minions can run stand alone but havent seen yet if i can deploy without a minion
10:38 trikke i suppose that's not realy possible
10:38 ingwaem you can deploy machines that don't actually sign up as minions if that's what you mean
10:38 fredvd joined #salt
10:39 trikke yes
10:39 trikke without the need to install the minion ?
10:39 ingwaem yes you can do that
10:39 trikke awesome
10:39 ingwaem salt can work with vagrant, vsphere, ec2, goog-compute, to name a few too
10:40 ingwaem you can also use salt in ssh mode so that you don't need minion installed and connected in realtime
10:40 trikke should have looked into salt more early ^^
10:40 ingwaem however I think the new updates they've done with the comms sounds reall good, uses udp
10:42 ingwaem ahh yes, RAET :
10:42 ingwaem http://docs.saltstack.com/en/latest/topics/development/raet/index.html
10:43 ingwaem and if memory serves me correctly salt can also be compatible with puppet, and can run puppet/ chef scripts too. although I'm not sure on the ins of those...havn't needed it
10:43 trikke sounds kinky ^^
10:44 baconbeckons when i start servers using salt-cloud and i set one of the servers to be a salt master in my map, when i then try to delete the servers in the map, the only machine that is listed to be destroyed is the salt master that salt-cloud started. it appears that an overstate is used to deploy the salt master first and then start the other servers after that. is that what is causing the issue with deletion?
10:47 ingwaem baconbeckons: could be...if the master hasn't yet setup the minions and you're pulling it down, or the're half way through deploy without having been setup correctly then they will not receive the tear down
10:48 baconbeckons ingwaem: it appears that the deploy is complete for the saltmaster and all of the minions when i try to destroy the map
10:49 ingwaem do the minions get named the same in the map? not sure, could be a good one for the salt guys when they come online
10:50 zerthimon joined #salt
10:50 baconbeckons ingwaem: named the same as in they aren’t using unique names?
10:50 ingwaem you might also want to run -l debug within your call so that you can see what it's doing specifically
10:51 ingwaem salt works on minion names, not ip addresses
10:52 zerthimon does anyone know why would salt think a mode should be set for file even though the mode is correct and then proceed to restart the service that watches that file ? This happens for all files and directories on all nodes every time I run highstate ?
10:53 diegows joined #salt
10:54 ingwaem zerthimon: I know that salt can watch the state of files, as well as watch the services. not sure though on just restarting for no reason. I'll dig up an example I have for the salt service
10:55 baconbeckons ingwaem: i’m looking at debug. salt-cloud accessed the ec2 api and then i presume that it looks for the minion names i defined in the map. the minion names are all in the api response, but salt isn’t finding them
10:55 ginger_tonic joined #salt
10:55 zerthimon ingwaem: it says a mode changed for file in summary
10:56 zerthimon ingwaem: but it isnt, and the service is restarted for no reason
10:56 ginger_tonic is there any way to get hard disk information like hard disk serial number, capacity etc using salt ?
10:56 ingwaem ginger_tonic: grains tell you most of what's available
10:57 intellix joined #salt
10:57 ingwaem zerthimon: hmm, that's weird. if I were in your shoes I would detail it on the github issues page adn see if it's a bug...include a copy of your state file, and explain what happened...perhaps there's something in there slightly wrong, perhaps bug
10:57 baconbeckons ingwaem: i think that i see what is happening. salt looks for the minion name and exits as soon as it finds it. in the api reply, it shows that the minion name is terminated as well as running because i’ve been starting and stopping the same salt cloud map over and over
10:57 ginger_tonic Okay. But am not getting the exact grain parameter ? what s the grain parameter for harddisk information ?
10:58 ingwaem baconbeckons: good luck tracking it down :)
10:58 ingwaem ginger_tonic: let me check
10:59 ginger_tonic What do I need to do if dont find the exact grain parameter to get the Hard disk info ?
10:59 ginger_tonic ok please do..
11:01 ingwaem there's a machine id, server id, and serial number for the machine, but nothing i can see specific to the harddrive serial number
11:01 zerthimon ingwaem: thanks, I'll make a github issue
11:01 ginger_tonic Shall I write a custom grain to extract the Hard disk information like hard disk capacity, serial number using smartctl utility ?
11:03 ingwaem ginger_tonic: any additional information that the grains can present is always helpful
11:04 ingwaem I have a todo item on my list to poll the machine status and plot the server metrics in db, and then graph...for performace data...just takes time
11:05 babilen ginger_tonic: That sounds like a perfectly valid approach
11:06 ginger_tonic ok
11:06 ginger_tonic ingwaem: no problem, take your time.
11:06 bhosmer joined #salt
11:07 ttrumm joined #salt
11:08 ttrumm hi is there option with salt to execute salt-master commands from remote computer like laptop?
11:08 the_drow ttrumm: Maybe with salt ssh?
11:09 ingwaem ttrumm: minions can listen to minions...if the laptop was a minion it could work
11:09 bellow joined #salt
11:09 bellow Does anyone know of a website that lets you list the movie titles(DVD) that you own and has on app that you can use on an android. On the android both online and offline. And not IMDB. Syncable do not want to download it every time I add to it to update all them
11:09 ingwaem ttrumm: however why not just ssh to the master from the laptop...or...you could use salt-api from the laptop
11:10 the_drow Can anyone help me write a salt state? For some reason the __salt__ dict is not available
11:11 ttrumm Atm 4 guys executing ansible commands and we use git repo for ansible. Looking for option to execute commands from multiple laptops. Ty will look into api and salt ssh
11:12 babilen .oO( use ssh )
11:12 the_drow This is the state: https://bpaste.net/show/6a85a993cf9e
11:13 the_drow and this is the output I get from the tests: https://bpaste.net/show/f96d1c5d6ca3
11:13 ingwaem alternatively if you all just wanted direct access to salt from your laptops, setup the salt api and halite on the master, and access the salt gui (halite) from your laptops...each of you shouldl be able to log into the salt master, and youc an setup pam authentication for each user if you don't want each user using' the same root account
11:14 babilen the_drow: __salt__ is available in execution modules, but not in state modules (cf. http://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html )
11:14 the_drow babilen: But I see it being used in states
11:14 babilen bloody monkey patching
11:15 the_drow babilen: __salt__ is available in state modules. Re-read the docs
11:15 ninkotech__ joined #salt
11:15 babilen Ah, no it is available yeah
11:16 the_drow babilen: So what the hell is wrong?
11:16 babilen It might not yet have been patched into the module when __virtual__ is being executed (hence "bloody monkey patching")
11:16 babilen Sorry, I'm running of to lunch. I will have to investigate this a bit later.
11:16 the_drow It doesn't error on __virtual__ though
11:16 the_drow :(
11:17 the_drow Bon appetite
11:17 babilen Try to remove the reference from __virtual__ for now and test it
11:17 the_drow babilen: nope
11:17 the_drow same error
11:18 the_drow This is a unit test so __virtual__ won't be called
11:18 babilen Sorry, I have to have more than just a glimpse.
11:18 * babilen bows head in shame
11:18 the_drow babilen: go eat :) we'll try later
11:19 ingwaem chin up old chap, time will tell and you'll find the solution, it'll be one of those Erica moments :) <sic intended>
11:19 scottpgallagher joined #salt
11:21 sroegner_ joined #salt
11:23 ttrumm can i create host(minion) based pillars? I would like to vreate apache role, and have 20 diffrent hosts with diffrent conf files. https://developer.rackspace.com/blog/using-configuration-management-to-manage-vhosts/ i saw that article. What is the kyword i need to search fro host based vars?
11:24 the_drow ttrumm: Pillars are host based (like all top files)
11:24 the_drow Just use the host name instead of a wildcard
11:24 bhosmer_ joined #salt
11:28 tafa2 joined #salt
11:28 ingwaem left #salt
11:30 ingwaem joined #salt
11:32 CycloHex If i'd like a local git repo for my salt code.. Do I git init the /srv/salt or the /srv dir .. Because pillars wouldn't be added in the git repo if I only init on /srv/salt
11:34 fe92 joined #salt
11:34 ingwaem CycloHex: I git init into a separate directory entirely on my very first setup, and move files to where i need them...then it's easy to setup sub processes to pull stuff into and out of directories. I found I liked the control more, was just purely based on that. You could always have a folder within the srv folder and then branch your stuff out of that, but then you would have to update your config files accordignly
11:36 CycloHex ingwaem, not sure if I follow you here, since I'm pretty new to git. So you just create a directory let's say /root/my-git-repo, init here, then move your /srv/pillar, /srv/salt and /etc/salt there?
11:36 ingwaem yes
11:38 CycloHex but in order for the changes i made to the git to become live, I would need to move those 3 dir's to it's original location again?
11:39 ingwaem CycloHex: you could put a watch on the /srv/ directories that would copy the changed files back to the git source (/root/my-git-repo) and then you simply check in your changes
11:39 bhosmer joined #salt
11:40 ingwaem but initially to get yoru first setup you would move those directories to the srv...but that's only based on my own personal preference...usually I would always want to make sure my master was functioning correctly before doing anything else, since it's such an integral part in the chain
11:40 wnkz__ joined #salt
11:40 CycloHex hmm, not quite sure I fully understand, but I'll try to manage.. Thanks for your input, ingwaem!
11:41 ingwaem CycloHex: sorry :) I've been using salt a little longer so I take some of the things for granted
11:42 CycloHex haha :D I'm working with salt for 2 weeks now, sometimes I feel like I'm really familiar with it, other times I feel completely lost
11:42 ingwaem CycloHex: it can be daunting at times since there are just so many different ways you can do things
11:42 babilen CycloHex: You might want to familiarise yourself with http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
11:42 ingwaem CycloHex: but it's worth sticking into there :) I love it almost 2 years on :)
11:44 CycloHex babilen, isn't gitfs used to be able to get files from a git repo, what I want is to make a local git in order for me to have my sls files and my code in a repo, so I can make changes and if it all explodes, i can just rollback to the prev revision
11:44 CycloHex + commenting changes is another advantage of git
11:45 ingwaem CycloHex: babilen, correct me if I'm wrong but gitfs is specifically for a local git, and then there's another git lib for the external right? the apis are slightly different too if I recall correct too so needs a destinction
11:46 CycloHex I pull some files (like salt formulas) from github using gitfs, so I don't think it's local
11:46 ingwaem oh ok, I'm getting confused sorry, it's 4:46 am
11:46 viq https://github.com/saltstack-formulas/mysql-formula/blob/master/pillar.example  - how do I reference frank's password from that pillar?
11:46 ingwaem been having a marathon evening getting to grips with my erc in emacs :)
11:47 ingwaem 4 day newb to emacs lol
11:47 ikanobori So, running this past you guys, on a `salt-master` restart, all minions re-authenticate and this can take a while. Correct?
11:48 ikanobori Seeing about a 2-3 minutes difference between the first minion reauthing till the last being done.
11:48 viq ikanobori: yes
11:48 viq ikanobori: how many?
11:48 viq minions I mean, sorry
11:48 intellix joined #salt
11:48 ikanobori Few dozens.
11:49 ingwaem ikanobori: yes it could take a little time, salt has workers and threads so you can bump those up if it's a fairly beefy machine and then you can parallelize more
11:49 viq I wouldn't have thought it would take that long.. though IIRC there are some random delays now to avoid flooding master
11:49 viq ingwaem: hah. Why emacs?
11:49 ikanobori It's not an issue at the moment, was just wondering if that's normal so I can account for waiting a little bit after a master restart (which is rare). I also read that the minions reauth every 24 hours?
11:50 babilen CycloHex: Sorry, I use GitFS for my states and pillars too and the salt master will just pull the latest state in git automatically.
11:50 ingwaem viq: Dunno, perhpas because I've seen some devs just flying on their keyboards and getting so much done in less time, the power tools, extensibility, all text based, so perhaps save on a few miles per year on mouse pushing...but the manipulation stuff looks super cool, as is org mode :)
11:51 viq mhmm
11:51 viq I've been playing with http://vim.spf13.com/
11:52 ingwaem viq: also I don't have to leave the interface to pull files from remote machines...usually I have to pull them through in cyberduck, and then edit, and then push back, or load through the ftp client and save with the piping tools, but it's all clunky, then i change to a windows machine and everything has to change...emacs, it's all just standard...1 vm to rule them all so to speak
11:52 slu joined #salt
11:52 viq hehe
11:52 CycloHex babilen, how do you set up something like you have? I don' tneed you to guide me step by step (although it'd be nice) but just push me in the right direction
11:52 ingwaem viq: ahh vim :) yea, there's those that like emacs and those that like vim :) hehe, although I see you can use emacs with evil mode to pull in emacs hehe...Iv'e used vim a lot in the past...although never power user
11:53 viq yeah, I'm not quite a power user myself
11:53 ikanobori Hah, I've used vim for ~15 years now and at this point don't have a mouse connected to my workstation anymore.
11:54 ikanobori At work, that is.
11:54 ingwaem I think also the fact that emacs has survived for almost 40 years :)
11:54 ingwaem ikanobori: haha :)
11:54 ikanobori Control my Firefox with vimperator and my window manager is xmonad. The added benefit is that only 1 or 2 of my coworkers could, if they wanted to, control my workstation.
11:55 viq https://github.com/saltstack-formulas/mysql-formula/blob/master/pillar.example  - how do I reference frank's password from that pillar?
11:57 ingwaem {{ pillar['frankspass'] }}
11:58 viq I wish it was that simple
11:58 ingwaem when it's setup right it will be :)
11:59 spo0nman joined #salt
12:00 rattmuff joined #salt
12:00 viq ingwaem: have you looked at the link I pasted? I'm trying to use a formula
12:00 viq So "set up right" is not quite up to me here.
12:00 dccc_ joined #salt
12:01 babilen CycloHex: I essentially setup two repositories *somewhere* (cf. http://git-scm.com/book/en/Git-Basics-Working-with-Remotes + http://git-scm.com/book/en/Git-on-the-Server-The-Protocols) for which we use gitolite. Either way, you simply have to make sure that the user that runs salt-master can access those repositories (i.e. "git clone YOURREPO" must work on the master if run as that user) and then you configure them like "normal" in your master config.
12:01 ingwaem viq: you would update frankspass with the curley equiv I linked, and then on your minion you would make sure it had a variable in the pillars called frankspass...then it will correctly call those values and do what you want it to do
12:02 CycloHex babilen, I'll try n work that out, thanks!
12:02 bga joined #salt
12:03 viq ingwaem: but with that I would have to define the same password twice, and make sure they're in sync
12:03 ingwaem sorry, that doesn't read quite right...you would update the hard coded values in the file you linked to use the pillar equivs...{{ pillar['varname'] }}. then setup a pillar file in teh pillars folder called the same as the minion and then define the pillar variable and value in that file. Then when you run the highstate, it will configure the mysql server with the appropriate values for that minion, or sub set of minions in a group if
12:03 ingwaem globbing against an os example
12:04 viq ingwaem: that's a pillar. You can't use pillar data in a pillar
12:05 ingwaem Oh yes, you're right
12:05 ingwaem I didn't even read it was a pillar, I'm sorry. I thought it was a state file
12:06 ingwaem in that case the easiest would be to save the file linked to a minion.sls file, and hard code the values within that file for each of the minions. otherwise not sure how to tackle that
12:06 bellow Does anyone know of a website that lets you list the movie titles(DVD) that you own and has on app that you can use on an android. On the android both online and offline. And not IMDB. Syncable do not want to download it every time I add to it to update all them
12:09 vbabiy joined #salt
12:11 ingwaem I'll bbl
12:11 ingwaem left #salt
12:13 CeBe1 joined #salt
12:13 hobakill joined #salt
12:18 rattmuff Can I use salt.states.cmd.script or salt.states.cmd.run to execute a python script under salt://files/myscript.py with arguments? Like: cmd.run: - name: "python salt://files/myscript.py arg0 arg1" ?
12:21 mindlessdemon joined #salt
12:22 mindlessdemon joined #salt
12:22 mindlessdemon joined #salt
12:23 gwmngilfen joined #salt
12:23 viq rattmuff: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.script  'args'
12:23 miqui joined #salt
12:25 viq https://pbot.rmdir.de/frDDktUIQfCiDXACB9u0Dw  - how can I get at that 'password' value in this pillar?
12:26 vbabiy joined #salt
12:26 rattmuff viq: thanks :D
12:26 rattmuff was looking for it but got stuck at passing args in "name"
12:27 to_json joined #salt
12:29 nicolasbadia He guys, can anyone help with that: https://serverfault.com/questions/633836/how-to-install-nodejs-and-npm-packages-with-salt-on-debian - how to install npm packages on debian
12:31 viq nicolasbadia: 'which npm'
12:31 cpowell joined #salt
12:31 viq Also I guess salt yourminion cmd.run 'echo $PATH'
12:32 cpowell_ joined #salt
12:33 nicolasbadia viq: not sur to follow
12:34 viq nicolasbadia: please run 'which npm' on your minon and tell me what it says
12:35 nicolasbadia ‘/usr/local/bin/npm’
12:35 nicolasbadia and
12:35 nicolasbadia ‘/sbin:/usr/sbin:/bin:/usr/bin’
12:37 sroegner_ joined #salt
12:37 viq nicolasbadia: then there's your issue - npm is not installed in salt's PATH, so it doesn't know that it should look for it there
12:38 nicolasbadia viq: Can I the best way to add it using salt ?
12:38 uber joined #salt
12:40 the_drow babilen: ping? :)
12:43 vejdmn joined #salt
12:46 viq nicolasbadia: don't know if best, but first thing that comes to mind is append /usr/local/bin to PATH in /etc/inid.d/salt-minion
12:46 baconbeckons joined #salt
12:53 nicolasbadia viq: awesome, that works ! Thanks a lot for the help.
12:54 TyrfingMjolnir joined #salt
12:55 hobakilllll joined #salt
12:55 XenophonF joined #salt
12:58 bhosmer joined #salt
13:02 mindlessdemon joined #salt
13:03 kingel joined #salt
13:03 mindlessdemon joined #salt
13:04 kermit joined #salt
13:04 mechanicalduck joined #salt
13:04 mechanicalduck_ joined #salt
13:04 spiette joined #salt
13:04 UtahDave joined #salt
13:04 UtahDave left #salt
13:05 ajolo joined #salt
13:10 prosper_ joined #salt
13:13 astol joined #salt
13:13 mpanetta joined #salt
13:19 babilen the_drow: sorry, drowning in work at the moment
13:19 babilen (monday, yay!)
13:19 the_drow babilen: No problems
13:19 the_drow I'm jewish so I hate sundays instead :P
13:22 TheRealBill_here joined #salt
13:23 prosper_ joined #salt
13:24 ozzzo joined #salt
13:33 djstorm joined #salt
13:34 alanpearce joined #salt
13:34 prosper_ joined #salt
13:35 alanpearce joined #salt
13:35 prosper_ joined #salt
13:36 mpanetta Does something equivalent to 'saltutil.sync_all' get called when a new minion comes up, or does that alway have to be run manually?
13:37 sroegner joined #salt
13:37 acabrera joined #salt
13:38 jaimed joined #salt
13:39 nebuchadnezzar joined #salt
13:40 babilen mpanetta: http://docs.saltstack.com/en/latest/topics/reactor/index.html#syncing-custom-types-on-minion-start
13:40 sroegner joined #salt
13:40 babilen mpanetta: But to answer your question: No
13:40 * babilen puts the crystal ball away
13:40 mpanetta hah :)
13:40 thedodd joined #salt
13:40 mpanetta Thanks :)
13:41 sroegner joined #salt
13:42 alanpearce joined #salt
13:42 sroegner joined #salt
13:43 rallytime joined #salt
13:43 higgs001 joined #salt
13:50 alanpearce_ joined #salt
13:51 bellow joined #salt
13:53 ramishra joined #salt
13:54 sag47 joined #salt
13:58 kaptk2 joined #salt
14:00 mechanicalduck joined #salt
14:02 istram joined #salt
14:06 desertigloo joined #salt
14:07 acabrera joined #salt
14:08 marnom joined #salt
14:09 eunuchsocket joined #salt
14:10 nitti joined #salt
14:10 tafa2 joined #salt
14:11 gmcwhistler joined #salt
14:15 PI-Lloyd joined #salt
14:17 KennethWilke joined #salt
14:18 micah_chatt joined #salt
14:19 teebes joined #salt
14:21 ozzzo i have salt-master installed with all of the dependencies including libyaml and PyYAML but I get a YAML error when I try to start it:
14:21 ozzzo ImportError: No module named yaml
14:21 ozzzo centos 6.3
14:21 ec2-user joined #salt
14:21 jroof joined #salt
14:21 ozzzo is there a way to tell salt where to look for YAML?
14:22 iggy same as any other python
14:22 viq ozzzo: how did you install it?
14:22 ozzzo yum install salt-master
14:22 viq And the dependencies?
14:22 che-arne joined #salt
14:23 NotreDev joined #salt
14:23 ozzzo they were already installed but we always install stuff with yum on this box
14:23 superted joined #salt
14:23 viq What repos do you have enabled? Just standard and epel, or something else?
14:23 linjan joined #salt
14:23 felskrone joined #salt
14:24 ozzzo this is a default install of Centos 6.3; I did not change the repos
14:24 * viq nods
14:24 ozzzo just installed centos and then typed "yum update"
14:25 ipmb joined #salt
14:26 iggy wouldn't you have to have at least epel to be able to install salt?
14:28 ozzzo looks like a coworker changed the repos; i probly need to update something
14:34 debian112 joined #salt
14:35 ipmb joined #salt
14:37 murrdoc joined #salt
14:39 XenophonF joined #salt
14:40 heewa joined #salt
14:42 baconbeckons joined #salt
14:44 murrdoc joined #salt
14:45 hasues joined #salt
14:47 hybridpollo joined #salt
14:47 jalbretsen joined #salt
14:48 tafa2 joined #salt
14:50 mikepea joined #salt
14:50 rallytime joined #salt
14:51 elfixit joined #salt
14:55 intellix joined #salt
14:58 jeffspeff joined #salt
14:59 blackhelmet joined #salt
14:59 baconbeckons joined #salt
15:00 jnials joined #salt
15:02 jnials_laptop joined #salt
15:02 jeffspeff I'm running into an issue with winrepo where it keeps wanting to install packages that are already installed. it's like it's not checking to see if the program is there first. in my state file, i have (packagename: pkg: - installed) and everytime the system runs a highstate, it runs the packages installer.
15:03 conan_the_destro joined #salt
15:03 diegows joined #salt
15:05 Ahlee ok.  I have a couple hundred git repos for the different projects, and I want to store states in each repo (states specific to that project go with the project), I know I could set up gitfs on each of them, but that will not work for performance reasons nor disk space having to keep local shallow clones of each repo on the master
15:06 Ahlee anybody got another idea for how i can grab the repo's states?  Maybe two phase it to reach out to the git repo, look for matching states, locally mirror just those for the run, clean up after? I don't like that at all after having typed it out
15:06 patrek joined #salt
15:06 wendall911 joined #salt
15:07 VSpike jeffspeff: does it say the install failed each time?
15:08 SheetiS joined #salt
15:09 baconbeckons joined #salt
15:10 jeffspeff VSpike, yes, the job returns that it failed, but when I'm watching the processes on the workstation, i see the installer running for the application.
15:11 Ozack1 joined #salt
15:12 to_json joined #salt
15:12 pdayton joined #salt
15:12 ozzzo I changed to the CentOS-Base repo list and installed epel, and updated all of my YAML stuff, but I still get "ImportError: No module named yaml" when I try to start salt-master
15:13 fragamus joined #salt
15:14 viq Ahlee: git submodules ?
15:15 viq (just shooting in the dark)
15:15 tmh1999 joined #salt
15:17 prosper_ joined #salt
15:17 eunuchsocket joined #salt
15:20 cnelsonsic joined #salt
15:20 schristensen joined #salt
15:21 Ahlee viq: hrm.  That's possible.  Have submodule in each project pointing to the main 'salt' repo
15:24 murrdoc joined #salt
15:25 CycloHex guuuyyyyss, If I'd like a managed file of mine to have some text like, 4 lines of text, in the beginning of the file, how can I achieve that? because contents in file.managed is not giving new lines, and file.prepend is only available in version 2014.7.0, i'm on 2014.1.10
15:25 anotherZero joined #salt
15:27 fannet joined #salt
15:27 baconbeckons joined #salt
15:28 semarie left #salt
15:28 fannet Is there any documentation that describes the best way to deploy rsa private keys in Salt
15:30 hasues joined #salt
15:30 manfred fannet:  i don't have documentation, but I use pillars
15:30 viq Ahlee: I was thinking the other way around, a central project, and add all those other projects as submodules. But whichever way works I guess
15:31 Ahlee viq: that'd actaully make more sense, and be less 'dirty' from the other repo's points of view
15:31 manfred fannet:  https://github.com/mparker1001/loadtester-salt/blob/master/loadmaster/pillar.example#L10
15:31 manfred fannet:  https://github.com/mparker1001/loadtester-salt/blob/master/loadworker/pillar.example
15:31 manfred bah
15:31 viq CycloHex: http://russell.ballestrini.net/add-a-custom-header-to-all-salt-managed-files-using-pillar-and-jinja-templates/   ?
15:31 manfred https://github.com/mparker1001/loadtester-salt/blob/master/loadmaster/init.sls#L91
15:31 manfred that one
15:31 fannet manfred are you just using  heredoc w/ a pillar variable?
15:31 Ahlee doesn't solve disk usage issue, though
15:31 manfred i am using a yaml multiline string
15:32 fannet using   blah: | ?
15:32 manfred yeah
15:32 ninkotech joined #salt
15:32 manfred and then |indent() when referencing it in contents_pillar for the .ssh/id_rsa file.managed
15:32 viq Ahlee: I don't know how the master setting for "salt states are in this subdir of the git" would change that
15:33 manfred fannet:  i just linked you the examples of where I was actually doing it, and where It was being used
15:33 anotherZero joined #salt
15:33 anotherZero joined #salt
15:33 Ahlee viq: yeah.  I guess I was hoping for something clever like an unknown ability to define "this state actually lives at http://foo/bar.sls instead of at file_roots: foo/"
15:34 Ahlee no way around salt needing to know about the states, so I guess either I get clever on making them visible or enforce devs to work in multiple repos
15:34 thedodd joined #salt
15:36 ek6 joined #salt
15:36 oncallsucks joined #salt
15:39 fannet manfred - what does the indent filter do?
15:40 manfred it indents it to the correct sport for yaml to render the state file correctly
15:41 debian112 joined #salt
15:41 murrdoc joined #salt
15:41 keithhub joined #salt
15:43 higgs001 joined #salt
15:45 ponpanderer joined #salt
15:46 fannet ah thats handy
15:48 iggy ugh, I can't wait till 2014.7 is out
15:48 iggy so many things will get so much easier
15:49 ponpanderer Hey, question on salt-cloud/celery/multiprocessing ... I want to run salt-cloud jobs via python api as background tasks but it seems that map_providers in cloud/__init__.py is never referenced and everything automatically selects map_providers_parallel. As i am running the job with a celery worker this conflicts with the multiprocessing module resulting in an AssertionError:  daemonic processes
15:49 ponpanderer are not allowed to have children
15:50 ponpanderer this is expected as both celery and salt using multiprocessing, but is there a way to fully disable multiprocessing in salt-cloud and let celery works handle the parallel stuff?
15:51 schimmy joined #salt
15:51 iggy I've never seen a way, but that seems like it'd be a useful feature to add to the issue tracker
15:51 StDiluted joined #salt
15:51 jab416171 joined #salt
15:51 murrdoc joined #salt
15:52 smcquay joined #salt
15:53 dave_den joined #salt
15:53 n8n joined #salt
15:54 ramishra joined #salt
15:54 forrest joined #salt
15:54 ponpanderer hmm interesting. kind of funny that the map_providers method is right there in the code but is never used/referenced. the ugly workaround at the moment is to use subprocess and run the salt-cloud CLI client :/
15:55 schimmy joined #salt
15:56 CycloHex thanks, viq.. You are really helpful!
15:56 Katafalkas joined #salt
15:56 ramishra_ joined #salt
15:57 eunuchsocket joined #salt
15:58 VSpike jeffspeff: that's usually because the version or the full name string don't match exactly
15:58 VSpike you can usually tell by doing salt-call pkg.list_pkgs on the minion
15:58 jnials joined #salt
15:59 VSpike If the package shows up with the short name you used in your win repo .sls file, it has matched it properly
15:59 bhosmer_ joined #salt
15:59 VSpike If you see a long descriptive name, it has *not* matched it
16:00 n8n_ joined #salt
16:01 VSpike I also hit a problem the other day where I created an _x86 and _x64 version of a package, with a separate .sls for each. Normally that's fine. but in this case, both had the same full_name string (thanks Microsoft) and the package system's logic was confused. It would match the string against one (perhaps by directory listing order) but I was installing the other, and therefore the logic said my install failed
16:02 VSpike I just deleted the _x86 version in the end... 32-bit windows is dead on the server anyway
16:03 ramishra joined #salt
16:03 viq s/32-bit //
16:03 viq ;P
16:03 VSpike i wish :)
16:05 VSpike I keep fantasising about spending my lunch breaks and evenings porting all our stuff to Mono, and setting up a bank of linux boxes to replace the IIS webservers, and one day just flicking the load balancers across.. and no-one would notice!
16:05 jeffspeff VSpike, that's the problem I'm trying to overcome actually. The particular package that I'm working with at the moment is our antivirus. I have 32bit executable and a 64bit. I'm pushing this out to workstations. Because our clients can't code properly, the vast majority of our workstations are all 32bit.
16:06 VSpike jeffspeff: when you install the 32-bit and 64-bit versions, they both show up in the installed programs with exactly the same long name?
16:06 jeffspeff yes
16:06 VSpike Hmm. I don't know of a satisfactory work-around for that. If the winrepo SLS files supported jinja, we'd be OK
16:07 VSpike jeffspeff: could you just install the 32-bit version on all systems?
16:08 jeffspeff I was thinking about putting some if logic into my state file. If 64bit then check if file.exists.   if file doesn't exist then install
16:08 the_drow Can anyone help me write a salt state? For some reason the __salt__ dict is not available This is the state: https://bpaste.net/show/6a85a993cf9e and this is the output I get from the tests: https://bpaste.net/show/f96d1c5d6ca3
16:08 the_drow It's driving me nuts. It should be available
16:08 manfred is this a state in /srv/salt/_states ?
16:09 the_drow no. It's a contribution to salt
16:09 the_drow It's in the states folder
16:09 VSpike jeffspeff: Is the installer an MSI?
16:09 the_drow salts/states
16:10 jeffspeff VSpike, i have an MSI that includes the 32bit and 64bit versions. I also have seperate .exe's for the different archs
16:10 the_drow manfred: check PR https://github.com/saltstack/salt/pull/16399
16:10 VSpike jeffspeff: ah, so if you install the MSI does it choose the right one for the machine?
16:11 manfred first thing I see is, be sure to add the __opts__['test'] == True  stuff, but yeah that should work
16:11 manfred actually
16:11 manfred one second
16:11 manfred yup, should work
16:12 the_drow __opts__['test']?
16:12 the_drow Oh right
16:12 the_drow But I just started to implement the PR
16:12 VSpike jeffspeff: am I right in assuming you've created 2 .sls files in your repo at the moment, one for 32-bit and one for 64-bit?
16:12 manfred yeah, salt-call state.sls something test=True, shouldn't actually run any states
16:12 jeffspeff VSpike, yes, let me try the MSI again, this time choosing the correct name. Just to clarify, in my sls for the package, I can have whatever I want for the first part (i'm new to salt, not sure what to call it) but I need to specify the actual result of pkg.list_pkgs as the 'full_name' ?
16:13 desposo joined #salt
16:13 the_drow Yeh, I know it will be implemented but right now I'm stuck since I can't write the state at all
16:13 VSpike jeffspeff: correct, yep
16:13 VSpike jeffspeff: try a single .sls with the MSI and I think it will work better
16:13 manfred kk, yeah, that should be fine
16:13 manfred especially since __salt__ is working in the __virtual__()
16:13 VSpike jeffspeff: don't forget to include msiexec: True
16:14 jeffspeff VSpike, I'm about to head out for lunch. I'll give that a shot when I get back. I currently use a single sls for each pacakge.  /srv/salt/win/repo/package_name/init.sls
16:14 the_drow manfred: __virtual__ is not called as far as I know. I'm running a unit test
16:14 manfred ahh
16:14 manfred then are you injecting __salt__ into it using the loader?
16:14 VSpike jeffspeff: likely install flags are ' /qn /norestart'. You can usually use the msi for uninstalling too, and pass the same flags.
16:14 manfred the_drow: https://github.com/saltstack/salt/blob/develop/salt/loader.py#L698
16:15 VSpike jeffspeff: example https://github.com/fastmarkets/salt-winrepo/blob/master/webplatforminstaller_x64.sls
16:15 jeffspeff VSpike, with this msi i actually have to use '/passive'. it's the only option that will work
16:15 the_drow manfred: How do I ensure it is called from a unit test?
16:15 VSpike ah ok :)
16:16 to_json joined #salt
16:16 jeffspeff thanks for the help though. I was starting to thing that full_name had to match, but wasn't 100% sure yet.
16:16 manfred the_drow:  i have no idea, never written any unit tests
16:16 VSpike jeffspeff: yeah, i ended up digging into the salt code to try and figure out what was going on
16:17 manfred the_drow:  in other unit tests they are specifying the __salt__ dictionary https://github.com/saltstack/salt/blob/develop/salt/loader.py#L698
16:17 manfred bah
16:17 manfred this one
16:17 manfred the_drow:  https://github.com/saltstack/salt/blob/develop/tests/integration/modules/django.py#L16
16:18 the_drow yeh I just saw the unit tests. They work the same...
16:18 n8n joined #salt
16:18 manfred other than that, no clue
16:18 the_drow It works now
16:18 manfred cool
16:18 the_drow thanks
16:18 manfred np :)
16:20 dalexand_ joined #salt
16:21 apergos joined #salt
16:22 apergos tiny docs nit:  http://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.file.html  for  salt.modules.file.seek_read(path, size, offset) says 'Seek to a position on a file and write to it'   it sohuld say 'read' of course
16:23 babilen the_drow: ... "bloody monkey patching" ;)
16:24 TheThing joined #salt
16:24 n8n joined #salt
16:26 KyleG joined #salt
16:26 KyleG joined #salt
16:32 metaphore joined #salt
16:34 Deevolution Is there anyway to specify a list of packages to install in such a way as the same packages could also be specified in another .sls file and would not conflict (i.e. packages that are pre-requisites for multiple things with no differences in how they should be installed)?  I'm thinking of something like 'ensure_packages'
16:34 SpX joined #salt
16:34 Deevolution in puppet
16:34 zooz joined #salt
16:34 babilen apergos: It should indeed. I'd just like to note that the docs on readthedocs are not up-to-date and that you would want to refer to those hosted on docs.saltstack.com (not that it makes a difference in this case)
16:36 apergos I'll bear that in mind if there's a next nitpick :-)
16:36 babilen Deevolution: Why is a pkg.installed not suitable in this situation?
16:36 aparsons joined #salt
16:37 schimmy joined #salt
16:37 xenophon joined #salt
16:38 Deevolution babilen: If I have pkg.installed -name: libcurl in multiple .sls files does it conflict?
16:39 schimmy1 joined #salt
16:39 Deevolution I can certainly create a libcurl (example) .sls file and "include" it in multiple places but it gets pretty difficult to work with  pretty quickly.
16:43 heewa Some states (like docker) require packages (in this case a python package docker-py) to even be available. What’s the appropriate way to make that happen before a state that uses it is evaluated? Can’t use require:, cuz it barfs out before that.
16:43 iggy "manually"
16:44 iggy same issue with salt-cloud
16:44 iggy you just have to make sure you have libcloud before you use it
16:44 heewa iggy: Right now I have a state that installs the python package. But there’s no way to do dependency, so I just run salt twice. I feel dirty, though :/
16:45 manfred heewa: you have to run it twice
16:45 manfred i use an overstate to set it up the first time
16:45 heewa Oh wait, maybe I can use state priorities?
16:45 manfred and then after that just run the second state
16:45 bluenemo joined #salt
16:45 manfred some python libraries require the minion to be restarted to take affect, depends on if they are used just in the module or are using something internal to salt
16:46 bluenemo how can I print a string without a state? I have an if statement checking os_finger, if that doesnt match I just want to print a string, not execute a state. Looking for something like  {% print "foobar" %}
16:46 manfred {{ 'foobar' }}
16:46 babilen Deevolution: No, why should it? It might be installed multiple times and if you configure those states differently the laste state "wins", but a plain pkg.installed should work just fine.
16:47 manfred oh printing it, don't think you can
16:47 manfred i just use file.managed and dump the stuff into contents:
16:47 babilen s/installed multiple times/tested multiple times/
16:47 ndrei joined #salt
16:48 moderation joined #salt
16:49 bluenemo manfred, I had it once and now I cant remember (where I saved it). I know its possible somehow :/
16:49 to_json joined #salt
16:49 to_json joined #salt
16:50 aparsons joined #salt
16:51 aparsons_ joined #salt
16:53 higgs001 joined #salt
16:55 bluenemo I am trying to use merge on pillar data, however not all of the pillar data as described here: http://paste.debian.net/124863/ I have lists, and for all items of those lists I want to merge with the defaults.yml. Hope you got a hint :)
16:56 spookah joined #salt
16:57 aparsons joined #salt
16:57 viq bluenemo: which salt version are you using? Pillar merging is coming with 2014.7 but is not available in 2014.1
16:58 bluenemo viq, salt 2014.1.10 (Hydrogen), used merge before, but just to merge whole pillar file with whole defaults.yml file, so my salt definitely has merge capabilities.
16:58 viq ah
16:59 viq That's not the merge I was thinking of ;)
17:01 bluenemo Is it possible what I'm trying to do?
17:02 jnials joined #salt
17:02 aw110f joined #salt
17:04 Gareth morning morning
17:09 antonw joined #salt
17:09 keithhub left #salt
17:09 kingel joined #salt
17:10 bluenemo Or is it completely wrong what I'm trying to do? I thought merging would be the way to go. No other good way comes to mind :(
17:17 forrest hey Gareth
17:17 Gareth forrest: hey. hows it going?
17:17 forrest Gareth, good! You?
17:18 jalaziz joined #salt
17:18 Gareth forrest: doing well :)
17:22 libertyy joined #salt
17:23 n8n joined #salt
17:24 Heartsbane I like turtles
17:24 eagen joined #salt
17:25 robawt Heartsbane: don't we all?
17:27 Heartsbane robawt: how you been?
17:28 robawt Heartsbane: good Sir!  Got hit with a mind explosion working with coreos over the weekend
17:28 robawt Heartsbane: how's the whiskey in Utah?!
17:28 micah_chatt joined #salt
17:29 mgorman joined #salt
17:29 mgorman Good morning #salt
17:30 mgorman funny issue. When highstating from our saltmaster (v0.17.3) we get repo errors "RepoError: Cannot retrieve repository metadata..." yet if we run salt-call from the server itself, highstate works as expected.
17:30 mgorman Any help is appreciated.
17:31 forrest mgorman, can you rerun the highstate but use -l debug ?
17:31 forrest see if you get anything extra in the debug output
17:32 mgorman Done, we get a python stack trace: http://pastebin.com/id54Cg3d
17:32 dlam joined #salt
17:35 forrest mgorman, hmm, is that repo managed by salt?
17:35 astol joined #salt
17:36 UtahDave joined #salt
17:37 mgorman Yes. I should also say, Its our own private repo which we've been using for some time. This is the first time we've had any issues installing packages with salt. In this case its just checking the version as well. There's not an actual update.
17:37 Ryan_Lane joined #salt
17:37 forrest mgorman, on the actual system, are you able to run a yum command to pull in the most recent metadata?
17:38 mgorman Yes.
17:40 murrdoc joined #salt
17:41 mgorman Looks like https://github.com/saltstack/salt/issues/8226 may be a similar issue.
17:42 forrest mgorman, and the master and minion are both 0.17.3? The only thing I can think is to dig through the issues to see if one exists
17:42 mgorman Yeah same version. reading that thread to see what the outcome was
17:42 primechuck joined #salt
17:45 primechuck I see a few bugs, but I'm wondering if anyhas had a work around (short of fixing the script) for an init script that calls a sub process and never returns and just goes defunct
17:53 bivers joined #salt
17:54 dccc_ joined #salt
17:55 Emantor Hello, since the latest release i can't access the pillar dict in jinja templated files any longer. salt['pillar.get'] still works fine. Is this a bug or a feature?
17:55 hobakilllll joined #salt
17:55 murrdoc depends on who u ask
17:59 UtahDave left #salt
17:59 diegows joined #salt
17:59 hobakill joined #salt
18:00 kermit joined #salt
18:02 jnials joined #salt
18:02 nickjj joined #salt
18:09 meteorfox joined #salt
18:10 jw joined #salt
18:12 fragamus joined #salt
18:13 prosper__ joined #salt
18:13 cpowell joined #salt
18:18 aparsons_ joined #salt
18:22 ipmb joined #salt
18:22 jalaziz_ joined #salt
18:23 debian112 @all
18:23 SpX joined #salt
18:24 Katafalkas joined #salt
18:24 kiorky basepi: did you notice my yesterday quote about memory usage
18:24 debian112 I have a services I will like to restart on file change, but the service is not a  typical service that runs like the rest /etc/init.d/service
18:24 kiorky basepi: here, we get an average of 200mb per salt master worker, this seems crazy
18:25 debian112 How would I go about watching for a file change and restart the services?
18:25 kiorky basepi: i even did an extpillar to cache on a memcached server to lighten the memory footprint
18:26 iggy debian112: you will probably have to find or write a module that can control the service
18:26 debian112 iggy: I put this together: http://paste.debian.net/124869/
18:26 debian112 you think this will work?
18:26 iggy f.ex. there is a supervisord module that can control supervisord services
18:27 kiorky basepi: (our ext pillar was previously memoizecaching a lot, but  the hight memory is not at all from there (we gain just 20%)
18:28 basepi kiorky: hrm, that does seem high
18:28 iggy debian112: is region_license.txt not managed by salt?
18:28 debian112 iggy: yes it is
18:29 debian112 when I update a new file, I would of course have to set the new md5sum
18:29 ndrei joined #salt
18:29 iggy then you don't need to do that md5sum stuff, just watch{,_in} the approrpriate stuff
18:29 iggy when salt updates the txt file, it will know to run the other state
18:30 iggy hmm, you might need 2014.7 to do that, give it a shot though
18:30 basepi kiorky: At least if it's stable, we're dealing with an optimization issue, rather than a legitimate leak
18:30 jbeda joined #salt
18:31 debian112 iggy: watch_in is a new one for me
18:32 iggy debian112: well, you would use watch_in on the state that controls the content of the txt file
18:32 catpig joined #salt
18:32 _mel_ joined #salt
18:32 briangrant joined #salt
18:32 debian112 ok, looking for the wiki page for an example
18:33 iggy but I'm not sure how well that will work with cmd.run... I've always seen it use with service
18:34 beneggett joined #salt
18:35 toastedpenguin joined #salt
18:35 _mel_ hi. i'm still a bit confused about how to use states and pillars. an example: i want to have a ftp server installed + some user. i create a state who installs vsftp and stuff. ic then create a state who can create users. after this i have to configure both, the state/top.sls and the pillar.sls - one for the installation of ftp and one for the creation of the users. is this the right way to do this? can i configure anything in the pillar? i'd like to have one fil
18:35 _mel_ e for saying wich server is getting what
18:36 debian112 iggy: gotcha, yeah I will see if I can get it working in service, but this is a custom app. So that's why I was thinking of the cmd.run with the md5sum check.
18:36 debian112 thanks
18:36 iggy debian112: I would personally, just write a wrapper that goes in /etc/init.d (or whatever) that called the real restart script
18:36 briangrant Hi. I'm having a problem with pkgrepo.managed encountering a SSL error when fetching a key file. Error is SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
18:36 briangrant Happens after a redirect to a server using SNI
18:36 murrdoc use upstart man
18:37 debian112 iggy: ok thanks, I might do that
18:37 kiorky basepi: well, i m having right now a conversation with thomas, but my problem is that a machine which n vm (here n lxc containers) will become resources starving only because of salt which should not be the real consumer :)
18:37 briangrant A similar problem was mentioned here: http://irclog.perlgeek.de/salt/2014-08-01#i_9119324
18:38 aw110f joined #salt
18:39 Heartsbane robawt: it is good, I haven't played with CoreOS
18:46 druonysus joined #salt
18:46 druonysus joined #salt
18:46 eculver joined #salt
18:46 LeProvokateur joined #salt
18:48 eflynn joined #salt
18:51 kusams joined #salt
18:51 iggy anybody ever used salt to automate taking disk snapshots of VMs (i.e. GCE volume snapshots, EBS snapshots, etc.)
18:52 kusams anyone help i am new Mac OS...how can i restart salt-master on mac
18:52 SheetiS iggy: I don't use salt for my ebs snapshots, but I do use python
18:54 iggy I'm just thinking... salt has a scheduler, it can be used to coalesce services, etc.
18:54 iggy just need a good way to tie it all together
18:55 SheetiS Currently not everything in my AWS infrastructure is salted though
18:55 SheetiS (not my choice, about not salting all the things, but I do what I can as I can)
18:56 iggy yeah, we've all been there ;)
18:57 iggy I fortunately have everything salted
18:57 iggy guess I'll just start poking at it, and see what I come up with
18:57 SheetiS I've only been at the current job for ~3 months, and I had to start with no config mgmt at all.
18:58 iggy we have all _definitely_ been there
18:58 geekatcmu Some day, I hope to not be there.
18:58 * geekatcmu suspects that day will occur because I died.
19:00 SheetiS It's always an interesting puzzle to try and define a state based upon what's existing to not break existing infrastructure.  Especially since every instance was its own little pet configured (differently than every other pet) by hand.
19:00 kusams joined #salt
19:01 drogoh joined #salt
19:02 iggy at least I walked in here and they had some scripts that some "consultant" had written to set the instances up (although they were all pretty much incomplete and out of date)
19:02 jnials joined #salt
19:02 tie joined #salt
19:02 fxhp joined #salt
19:03 duncanmv joined #salt
19:05 tie so, what is the advantage of running """salt '*' git.init /path/to/repo.git opts='--bare'""" vs running """salt '*' cmd.run 'git init --bare /path/to/repo'""" ?
19:05 tie I mean what's the idea behind such an execution module in the first place?
19:06 al__ joined #salt
19:08 sc` joined #salt
19:08 akafred joined #salt
19:08 wendall911 joined #salt
19:08 iggy easier to track success/failure maybe?
19:09 al__ new to salt, just curious what's the benefit of using the pre-written salt formulas vs writing your own for formulas?
19:09 iggy I mean what is the point of user.present vs cmd.run adduser?
19:09 ericof joined #salt
19:09 iggy al__: whatever works best for you
19:09 SheetiS tie: the functions inside the git module would also be consumed by the git state.  It's much cleaner to pass __salt__['git.init'] around then manually run commands
19:10 quickdry21 joined #salt
19:10 iggy al__: the formulas don't always work for everthing people want to do... in which case they can make a good starting point or sometimes they are just useless
19:10 superseb joined #salt
19:11 tie SheetiS, iggy : but module.git.init is not a state... if the goal was to have clean states, then it should perhaps be implemented as a state rather than exec module?
19:11 sc` joined #salt
19:12 tie I'm just new, and I'm trying to grasp the reasoning behind some of the gadgets
19:12 SheetiS tie: I mean that the state utilizes it:  see here https://github.com/saltstack/salt/blob/develop/salt/states/git.py#L487
19:12 SheetiS so when you manage your git repo via a state
19:12 SheetiS it uses that git module function
19:13 SheetiS You have the option to use the same module function via the CLI if you like
19:13 SheetiS but you are by no means required to :D
19:13 Voziv joined #salt
19:14 tie SheetiS, so the only benefit that this exec module brings over cmd.run is to serve as a building block for the git state?
19:14 tie that makes sense in a weird (to me) kind of way
19:15 SheetiS For the specific example you gave that is true.
19:15 Voziv I'm looking at salt.states.archive: Is there a way to get salt to delete the directory and unzip the archive again if the archive changes?
19:15 SheetiS There are other things that you could get info on like 'git.config_get' which could be used for logic somewhere, etc
19:17 briangrant left #salt
19:19 iggy and theoretically it covers the case where the git command line tool changes things in the future
19:20 eunuchsocket joined #salt
19:20 holler joined #salt
19:26 jalaziz joined #salt
19:26 higgs001 joined #salt
19:26 SheetiS Voziv: the salt archive state is pretty simple.  It just looks like it extracts into the target directory and doesn't look to have logic to do what you are wanting.  It might be fairly trivial to add though from the looks of it.
19:27 jeffspeff joined #salt
19:27 Voziv SheetiS: I'm just looking for a quicker way to manage phpmyadmin installations across my servers. There's a ton of files and file.recurse does the job but takes forever
19:28 roolo joined #salt
19:28 murrdoc make a package
19:28 SheetiS Package it into an rpm/deb/whateverrepo and install it that way?
19:28 murrdoc its trivial to make it a package
19:29 murrdoc fpm -s dir /path/to/dir
19:29 murrdoc trivialistically simple
19:29 ckao joined #salt
19:30 aparsons joined #salt
19:31 sgate1 joined #salt
19:32 SheetiS murrdoc: fpm does make it way easier than in the past for sure :D
19:32 jeffspeff VSpike, I'm still having an odd problem. Maybe I missed something from earlier. Here is how I have it configured. http://pastebin.com/ncaEHjPZ   I expected pkg.list_pkgs to show 'Trend Micro OfficeScan Client' instead of just Trendmicro.
19:33 murrdoc SheetiS:  plus with vagrant, we just kick our devs vagrant files and be like: 'send package, kthnxbye'
19:34 murrdoc <3 is
19:34 murrdoc also SheetiS iS resolves to funky smiley on my client
19:35 * SheetiS is a funky smile.
19:39 murrdoc haha funky smiley
19:44 Voziv murrdoc: What package is fpm part of?
19:49 kusams joined #salt
19:50 SheetiS Voziv: https://github.com/jordansissel/fpm or just 'gem install fpm'
19:51 SheetiS it's a rubygem that does it's best (and it is very good at it) to quickly make deb/rpm/other packages from things such as tar.gz files or other package types.
19:51 TheThing|laptop joined #salt
19:53 murrdoc Voziv:  get a vagrant box, and setup fpm on it
19:53 murrdoc and build stuff on that
19:53 murrdoc like so https://github.com/jordansissel/fpm/blob/master/Vagrantfile
19:54 Voziv murrdoc: Your suggestion got me thinking about making a phar file instead of a specific distro package
19:54 murrdoc phar is fine too
19:54 jbeda left #salt
19:54 murrdoc probably better
19:55 Voziv murrdoc, SheetiS: thanks for the help guys
19:55 murrdoc no problem
19:55 murrdoc packages for the win man
19:56 SheetiS murrdoc++
19:56 morsik left #salt
19:57 Ryan_Lane joined #salt
20:02 jnials joined #salt
20:03 NotreDev joined #salt
20:04 tie is it possible to set a default parameter for certain kind of states? e.g. I'd prefer to set template: jinja once for all file.managed instances
20:05 Schmidt joined #salt
20:06 eliasp is there a way to properly verify the 'id' grain in a SLS… it looks to me like it would be rather easy for a minion to send a fake 'id' grain to the master and getting access to things it isn't supposed to see…
20:09 druonysuse joined #salt
20:10 wnkz joined #salt
20:10 fannet just to make sure I'm not losing my mind here but the pillar top.sls should be able to reference multiple pillars per environment right?
20:10 kusams joined #salt
20:11 SheetiS fannet: yes very much so.
20:11 astol1 joined #salt
20:11 fannet ok. so for whatever reason its only taking my first pillar reference
20:11 fannet the second pillar literally has key: value in it
20:12 eliasp fannet: might clash with reserved Python keywords…
20:12 fannet ah yes sorry its actually xyz.com: 'test'
20:13 druonysus joined #salt
20:13 druonysus joined #salt
20:13 fannet I meant to say it has just one key/value pair in the file
20:13 astol joined #salt
20:13 SheetiS fannet: if you are able to share the topfile via bpaste.net or your favorite pastebin, it might help to see it.
20:13 fannet sure
20:14 eunuchsocket joined #salt
20:16 Emantor Hm, I'm using masterless salt and my pillar items are not showing up under 'salt-call pillar.items', -l debug shows they are rendered but not displayed
20:16 Emantor :/
20:16 fannet SheetiS: http://pastebin.com/iDsCv0yn
20:16 gibigiana joined #salt
20:17 wnkz joined #salt
20:17 markm joined #salt
20:18 eliasp fannet: your indentation is not the same for all lines
20:18 forrest eliasp, nah it is, look at the raw
20:18 eliasp ah, sorry ;)
20:18 forrest eliasp, I miss it all the time, pastebin just sucks :P
20:19 fannet eliasp: hrm something happened when I pasted but I justed checked in VIM and the spacing is ok
20:20 eliasp fannet: to address your pillars, you don't use / as a separator in your pillar top.sls, but only . instead
20:20 miqui joined #salt
20:20 eliasp fannet: dir.subdir.pillarfile
20:20 fannet ya I tried that... no lov
20:20 eliasp fannet: the current top.sls uses a mix of both…
20:21 fannet correct. I will revert back and see
20:21 fannet it was all '.' before
20:21 fannet just ran again - same result
20:22 eliasp fannet: you refreshed the pillars on the minion?
20:22 fannet salt 'spotreg901' saltutil.refresh_pillar
20:22 fannet yep
20:22 eliasp ok
20:22 SheetiS fannet: How are you testing if the pillar works?
20:23 fannet pillar.items
20:23 SheetiS passing the env into it?
20:23 fannet on the host
20:23 prosper_ joined #salt
20:24 SheetiS salt-call  pillar.get 'certificates:test.com:certificate_key' env=chris or the like?
20:24 fannet no I was just running salt-call pillar.items to see the output
20:24 eliasp fannet: try using a compound match: http://pastebin.com/DD4XFHHj
20:25 jeffspeff joined #salt
20:26 jeffspeff VSpike, not sure if you replied while i was away.
20:26 jeffspeff I'm still having an odd problem. Maybe I missed something from earlier. Here is how I have it configured. http://pastebin.com/ncaEHjPZ   I expected pkg.list_pkgs to show 'Trend Micro OfficeScan Client' instead of just Trendmicro.
20:26 fannet eliasp: same result
20:27 jdmf joined #salt
20:28 eliasp jeffspeff: the "full_name" is, what windows lists in the list of installed packages (Control Panel → Software) … "Trendmicro" is the name of this package in your repository and also, what pkg.* will use
20:28 eliasp jeffspeff: so you can map a long an ugly software name like "Mozilla Firefox 32.0 (x86 en-us)" to something short and nice like mozilla.firefox
20:29 fannet eliasp: also tried puting certificates.mine above the packages.nginx but still get the same result. packages.nginx pillar shows up fine
20:30 eliasp jeffspeff: once Salt's windows pkg module will find a match of a "long ugly software name" to a defined name in win_repo, it'll replace the long name with the short/nice one in output of things like "pkg.install foo_bar"
20:31 jeffspeff eliasp, when i go to the control panel, the application shows the name "Trend Micro OfficeScan Client" regardless of installing manually or through salt. If I install MANUALLY then run 'salt MY-PC pkg.list_pkgs' it will show the name as 'Trend Micro OffceScan Client'. If I install VIA SALT then the pkg.list_pkgs shows the name as 'Trendmicro'.
20:31 eflynn joined #salt
20:31 hasues joined #salt
20:31 fannet bah! I think I know what's wrong
20:32 eliasp jeffspeff: this mapping to a unique name in your win_repo is needed, because on windows the name of a software version might change within different versions…
20:32 thematthewgreen joined #salt
20:32 eliasp jeffspeff: the long name in Control Panel → Software will not change depending on your win_repo… that's just what the software's installer defines
20:33 bhi joined #salt
20:33 eliasp jeffspeff: the reason why you might see the long name in pkg.list_pkgs is that you didn't run "salt-run winrepo.genrepo && salt MY-PC pkg.refresh_db" before
20:34 fannet #@$#@%
20:34 fannet figured it out :-/
20:34 eliasp fannet: invalid YAML syntax in your pillar file?
20:34 fannet I was accidentally pushing a second top.sls in a different branch
20:35 eliasp fannet: ah… one basic tip whenever you use git for your SLS… always use a separate repo for your top.sls
20:35 jeffspeff eliasp, i've run the genrepo and refresh. If Trendmicro is manually installed then the pkg list shows the long name. Then if the machine runs a highstate it sees that long name != Trendmicro and starts the installer which starts breaking stuff. apparently the installer doesn't catch that it's already installed and just keeps on going
20:35 eliasp use just a master/base branch in this repo where you have your top.sls
20:35 eliasp otherwise the merged top.sls from different branches will create a huge fucking mess
20:35 fannet elias- so have nothing else but the top.sls in it?
20:35 kusams joined #salt
20:35 eliasp fannet: exactly
20:36 iggy that's an interesting way to do it
20:36 fannet sounds like a good idea.
20:36 eliasp otherwise one would have to keep the top.sls between different branches in sync which is more or less impossible
20:36 iggy never occured to me, we just kept the tops in sync
20:36 thematthewgreen noob question, looking at http://docs.saltstack.com/en/latest/topics/tutorials/pillar.html , when I run salt '*' saltutil.refresh_pillar , the minions return "None" where might I be going awry?
20:37 eliasp iggy: figured this was just too much pain/potential problems for me and moved it to a separate repo ;)
20:37 iggy it's definitely clever
20:37 iggy the docs need a section for little tips/tricks like that
20:37 bhosmer_ joined #salt
20:37 eliasp jeffspeff: when you install it manually, Salt will only know about it after a pkg.refresh_db… this should usually happen during a highstate run automatically
20:38 stephenMW joined #salt
20:38 eliasp jeffspeff: which version do you have on your Minion + Master?
20:38 jeffspeff 2014.1.10
20:38 stephenMW Hey guys. Anyone know if I can use "pip.installed" as specify a directory on the saltmaster?
20:39 stephenMW I thought it was "source: salt://blahblah" but that doesn't seem to work
20:40 eliasp stephenMW: you want to use your master as PIP mirror? do I get this right?
20:40 stephenMW Yes indeed
20:41 eliasp stephenMW: I don't see anything here which would allow that: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pip_state.html
20:41 stephenMW But my packages are not part of pypy
20:41 eliasp stephenMW: if you run your own mirror, you could point towards this mirror
20:41 stephenMW pypi
20:41 fannet how do I terminate a YAML multiline ?
20:42 CeBe1 joined #salt
20:42 stephenMW Oh my host I can just say something like 'pip install -e some_folder' -- there's no equivalent to that where the folder is part of the rootfs?
20:42 eliasp fannet: just start the next line at the previous indentation level…
20:42 forrest stephenMW, so use one of the tools out there to create your own pypi, then throw a ~/.pip/pip.conf in that points to that location.
20:43 eliasp besides that, I prefer to use proper distribution packages over PIP…
20:43 forrest stephenMW, hmm, well I mean there are a bunch of options, I'm not famiiliar with all of them though
20:43 eliasp domain/langauge-specific package managers are a invention made in hell
20:43 stephenMW These are just internal libraries. I'd like to avoid using public pypi if possible
20:43 bhi_ joined #salt
20:44 stephenMW I can work around by syncing the folders and then running 'pip install -e ...' but I just need to wrap that in a script for cmd.run
20:44 forrest stephenMW, Try ysing -- install_options:
20:44 forrest *using
20:44 eliasp yeah, that could work
20:44 forrest stephenMW, on the docs page if you look for install_options, there's details on it
20:44 forrest just pass that, then you avoid the cmd.run
20:45 stephenMW I'll check that out
20:45 david____ joined #salt
20:46 fannet eliasp: does the mutlline string content need to be indented underneath the key: |
20:47 eliasp fannet: let me nopaste an example what I'm using here… one moment
20:47 fannet k
20:48 stephenMW Sweet. Looks like I can pass in cmd args directly with install_options
20:48 forrest stephenMW, yup!
20:48 Emantor joined #salt
20:49 eliasp fannet: http://pastebin.kde.org/puxstmkiq
20:52 fannet ah ... looks like the value data needs indentation as well
20:53 UtahDave joined #salt
20:54 fannet thanks eliasp
20:56 che-arne joined #salt
20:57 smcquaid joined #salt
20:58 stephenMW Anyone have an idea for the Helium release date?
20:58 mpanetta WHen it is done :P
20:59 stephenMW I need a non-cheeky answer please ;)
20:59 xenophon joined #salt
21:00 stephenMW even a ballpark or estimate
21:00 codekobe____ joined #salt
21:00 jblack joined #salt
21:00 mpanetta I don't know if anyone actually knows...
21:00 codekobe____ so i know this was already a closed issue
21:00 codekobe____ That there was a regression in pillar data when using 2014.1.11 with masterless minion
21:00 jblack Hi. I'm trying to implement a rabbitmq cluster for the first time in saltstack.  I'm trying to figure out how nodes in salt should be able to "find" each other
21:01 jblack pardon, minions, not nodes.
21:01 codekobe____ https://github.com/saltstack/salt/issues/16210
21:01 mpanetta jblack: Mine is your friend
21:01 codekobe____ but this is a big regression
21:01 codekobe____ i have a bunch of automated tests using the vagrant salt provisioner
21:01 codekobe____ that are now broken
21:01 codekobe____ it was mentioned that this would not be fixed
21:01 mpanetta jblack: We match based on a role grain, to find all the 'cassandra_servers' for example
21:02 codekobe____ any way a fix can be pushed to the 2014.1.11 release?
21:02 teebes joined #salt
21:02 bhosmer_ joined #salt
21:02 jblack is salt min standard with salt?
21:03 mpanetta jblack: yep
21:03 jbeda joined #salt
21:03 forrest codekobe____, I'd say just open an issue reporting the problem for discussion and your proposed fix, just note that it's 2014.1.11
21:03 codekobe____ its been opened
21:03 forrest codekobe____, though I don't know if a new package would be built
21:04 mpanetta jblack: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mine.html#module-salt.modules.mine
21:04 codekobe____ but it was decided it would not be fixed in this version
21:04 codekobe____ so i either have to wait for 2014.7 salt release
21:04 codekobe____ and let all my automated tests fail until it is released
21:05 codekobe____ or  try and find a way to patch the vagrant salt provisioner to use an older version of salt
21:05 codekobe____ seems like a big regression to leave in limbo
21:05 mpanetta BTW, I know for sure that some of the states/modules from 2014.7 can be pulled in to 2014.1.x just by putting them in _states and _modules
21:06 codekobe____ unless 2014.7 is coming in the next 2 says
21:06 mpanetta Depends on what the dependencies are though
21:06 codekobe____ so i was testing with the vagrant salt-provisioner
21:06 codekobe____ so it installs the current packages from the ppa
21:07 codekobe____ i suppose i could try and make a fix for every automated test i have
21:07 codekobe____ but seems easier for the 2014.1 version to be released with the regression fixed
21:07 codekobe____ 2014.1.10 did not have this issue
21:07 mpanetta codekobe____: Any reason you culd not revert to .10?
21:08 manfred because the package is no longer in the ppa
21:08 mpanetta Maybe that would be ok, until 2014.7 comes available?
21:08 manfred would have to use pip to revert
21:08 mpanetta Ah
21:08 manfred launch pad unfortunately doesn't let us keep any more than one version
21:08 mpanetta we use the bootstrap with args here to do it (using salt-cloud) so we fix the version at install time...
21:08 mpanetta That sucks :(
21:08 manfred yar
21:09 babilen codekobe____: I am sorry -- I tried to convince them ....
21:09 codekobe____ i'll try and see if i can patch for install args
21:09 codekobe____ good tip
21:09 codekobe____ yep
21:10 codekobe____ i guess i need to start version pinning everywhere for tests
21:10 mpanetta I would
21:10 codekobe____ that was a big regression to leave out there
21:11 mpanetta Mainly because things change so fast...  Too easy to get masters and minions out of sync unless you pin.
21:11 codekobe____ i am guessing that automated testing of salt formulas with vagrant is not popular yet
21:11 babilen The decision was essentially that this isn't important enough for a .12 with 2014.7 just around the corner. I suggested to have it patched in the packages directly (common thing in Debian packages at least to patch things that haven't been fixed in the upstream release), but that was, I guess, also not done.
21:11 codekobe____ i have been pushing the use of formulas
21:11 babilen I don't concur with that decision, but there you are.
21:12 codekobe____ and so with each formula have been including a vagrant and a functional test where posible
21:12 codekobe____ IE: use a vagrantfile to set up two nodes in a cluster, then have a test to write to one node and read from the other
21:12 codekobe____ so the salt-provisoner in vagrant is great for testing these formulas
21:13 mpanetta Actually, it would be nice to know how different people have tackled testing formula...
21:13 babilen codekobe____: Most of the time I just use one node with both master and minion installed. I don't really buy myself much for the "easy" cases by having two in there.
21:13 codekobe____ well, i had two nodes in a vagrantfile to test things like rabbitmq clustering
21:14 codekobe____ both are using masterless minion
21:14 codekobe____ its just testing that the formula is able to configure the rabbit cluster properly using given pillar data
21:14 codekobe____ the vagrantfile boots the 2 node rabbit cluster
21:15 codekobe____ then tests run that push message on one node, and pull from another
21:15 codekobe____ thats just one example though
21:15 codekobe____ have a quite a few formula using that provisioner to do that type of testing
21:15 codekobe____ unfortunately, these are private repos
21:15 eflynn joined #salt
21:16 rockey joined #salt
21:17 ipmb joined #salt
21:17 shoemonkey joined #salt
21:19 smcquay joined #salt
21:20 jalaziz joined #salt
21:21 Ahrotahntee is there a way to get jobs.lookup_jid to only show failures?
21:25 kusams joined #salt
21:29 do_monkey joined #salt
21:29 babilen Ahrotahntee: I don't think so (there are no built-in methods to filter/sort/... that that I'm aware of)
21:29 babilen (but I would be quite happy if somebody could correct me on that)
21:30 Ahrotahntee I see 'terse' output on the actual salt call
21:30 Ahrotahntee but nothing on salt-run
21:31 shoemonkey joined #salt
21:34 skyler joined #salt
21:34 skyler I was trying to manage a file with a url  as its source and I got the following error: Unable to manage file: request() got an unexpected keyword argument 'stream'
21:34 Ahrotahntee I'm also having a problem with salt-minion starting on first boot of an image I made
21:34 skyler Anyone know why that might be?
21:34 Ahrotahntee but I haven't investigated that enough to ask any questions about it yet
21:36 shoemonk_ joined #salt
21:38 Ahrotahntee man I am re imaging  this box a lot
21:40 cads joined #salt
21:41 tie joined #salt
21:41 IOMonster Hello all, I'm curious if anyone's aware of why a custom grain script would be unable to access pillar data using the __grains__ dictionary?
21:42 IOMonster it's almost as if the loader doesn't add those dicts to it when it's being accessed through salt-call
21:42 jbeda left #salt
21:43 IOMonster i.e. if i have a simple module that only returns all the current pillar data (just for example purposes), __pillar__ is an empty dictionary
21:45 diegows joined #salt
21:46 kballou joined #salt
21:49 ozzzo I'm using pkgs: to install a list of packages. How can I make the list a requisite?
21:49 ozzzo http://pastebin.com/kXbZVREi
21:50 peters-tx joined #salt
21:51 kelseelynn joined #salt
21:53 jxFive joined #salt
21:57 murrdoc joined #salt
21:58 eliasp ozzo: require: \n - pkg: nagios-pkgs
21:58 eliasp ozzzo: so you're just missing "pkg: " in front of "nagios-pkgs"
22:01 Ahrotahntee now to see if my shitty image starts up correctly from provisioning
22:01 Ahrotahntee so far looking so good
22:03 jnials joined #salt
22:03 baconbeckons joined #salt
22:05 jxFive hi all, starting to switch over some of my puppet modules to salt =D, one thing I noticed I used alot in puppet was 'concat' is there something equivalent or some other practice I should be using?
22:06 Deevolution I have an odd problem with my (currently test) salt master.  It's running both the master and a minion.  If I install Fabric (pip install Fabric) on the master the state.highstate stops returning anything.  If I uninstall Fabric, it works again.  Any ideas?
22:08 jalaziz joined #salt
22:08 Ahrotahntee Deevolution: is it exceeding the timeout? what does it look like with debugging-level logging?
22:09 eliasp jxFive: what do you expect "concat" to do?
22:10 Ryan_Lane when using salt-vim plugin with vundle, is there anything special I need to do to make it recognize sls files?
22:10 murrdoc joined #salt
22:10 Ryan_Lane it's managing the plugin, but my sls files aren't activating the plugin
22:10 david____ I can't seem to get my pillar items to my states. Not sure where to begin debugging.
22:11 david____ [CRITICAL] Rendering SLS "base:docker-registry.server" failed: Jinja variable 'dict object' has no attribute 'serverKey'; line 30
22:12 eliasp Ryan_Lane: try something like this: http://pastebin.kde.org/pc5zmsrf5
22:12 Ryan_Lane the plugin has this in its syntax file: :au BufNewFile,BufRead *.sls call DetectSls()
22:12 eliasp Ryan_Lane: hmm, ok… no idea then
22:13 Ryan_Lane err in the ftdetect
22:15 ozzzo righton ty eliasp:
22:16 bhosmer joined #salt
22:18 Ryan_Lane ah. got it
22:18 Deevolution Ahrotahtee:  Sorry for the delay.  Debug/Trace level logging doesn't show much of anything.
22:18 Ryan_Lane I needed some filetype lines in my vimrc
22:19 wnkz joined #salt
22:20 kermit joined #salt
22:20 Deevolution Ahrotahtee: I don't see any errors in the logs.
22:21 jxFive joined #salt
22:23 __number5__ Ryan_Lane: I don't have specific config option for salt-vim, it seems just work. Maybe you have other ftplugin also match *.sls?
22:24 Ryan_Lane I didn't have "filetype on" "filetype plugin on" and "filetype indent on" set in the right spot
22:24 Ryan_Lane they need to be set after the vundle#end() line
22:28 wnkz joined #salt
22:28 eliasp uh, just discovered an ugly inconsistency… when a minion didn't refresh its pillars yet, it still might show them all using "salt minion pillar.items", but refuses to show new ones using "salt minion pillar.get a_new_pillar"
22:29 ninkotech__ joined #salt
22:29 nitti joined #salt
22:29 wnkz joined #salt
22:35 LeProvokateur joined #salt
22:37 UtahDave joined #salt
22:39 kelseelynn joined #salt
22:39 pdayton joined #salt
22:40 UtahDave left #salt
22:42 ajolo joined #salt
22:42 mosen joined #salt
22:43 druonysuse joined #salt
22:43 druonysuse joined #salt
22:43 jsm joined #salt
22:45 holler_ joined #salt
22:46 pdayton joined #salt
22:51 higgs001 joined #salt
22:52 holler_ hello, is anyone available to help me determine a sort of rough idea on how to set up a deploy repo for a django project.. right now I have this structure http://dpaste.com/3EXNQ0A. I am able to spin up a local dev envirtonment based on the base salt state I created which is provisioned through salt + vagrant. Now I want to go to the next step and make it so with the same repo, I can have other environments (gitfs?), and through
22:52 holler_ the master which I created, provision a minion server (on rackspace) based on the setup I have currently but with different config files
22:52 murrdoc you want a crazy idea ?
22:52 holler_ I read about gitfs, environments, targeting, and I was able to connect a minion to a master and issue commands.. but not sure how to use my git repo or structure it
22:53 holler_ sure
22:53 murrdoc setup a build server, to make the files u need
22:53 murrdoc make it salt push those files to the master
22:53 murrdoc setup a reactor event on your master to see that event
22:53 murrdoc and push those files out
22:53 holler_ murrdoc: also right now we are pretty small so the more simple the better
22:53 murrdoc using gitfs
22:53 murrdoc oh
22:53 murrdoc nvm
22:53 murrdoc :)
22:54 holler_ ideally right now I just want to somehow provision a rackspace server to be a test server and have the proper nginx and mysql configs etc
22:54 murrdoc ah
22:54 holler_ I know you can issue the "salt '*devserver' state.highstate"
22:54 murrdoc https://github.com/saltstack/salt/blob/develop/tests/jenkins.py
22:54 holler_ I almost wish I could find a repo to look at as example
22:57 szicari joined #salt
22:58 shoemonkey joined #salt
23:01 perfectsine joined #salt
23:02 jnials joined #salt
23:05 niq000 joined #salt
23:06 dccc joined #salt
23:06 DaveQB joined #salt
23:08 kelseelynn joined #salt
23:09 n8n joined #salt
23:11 druonysus joined #salt
23:11 druonysus joined #salt
23:11 beneggett joined #salt
23:11 shoemonkey joined #salt
23:13 n8n joined #salt
23:13 niq000 hello, does anyone know if it's possible to use states on a windows minion? I can't seem to find any documentation/examples using the salt-winrepo git repository... :(
23:15 deeprave joined #salt
23:16 higgs001 joined #salt
23:16 beneggett joined #salt
23:17 shoemonkey joined #salt
23:19 apergos one more docs nitpick:  I would expect http://docs.saltstack.com/en/latest/ref/configuration/minion.html  to list and document the recon_default, recon_max and recon_randomize options, but it doesn't
23:19 Ryan_Lane apergos: open an issue
23:19 apergos tomorrow
23:19 Ryan_Lane the documentation people have been pretty good at fixing issues lately
23:20 apergos I think I claimed I was going to sleep ... um...
23:20 Ryan_Lane :D
23:20 apergos 2 hours ago :-D
23:20 Ryan_Lane yeah. a long time ago
23:21 apergos outa here. but I'll file one for that and the silly file.seek_read typo tomorrow
23:28 n8n joined #salt
23:30 pdayton joined #salt
23:31 nickjj are the best practices listed in the official docs the defacto standard way to organize formulas and use salt?
23:32 nickjj i know with a lot of other tools the best practices in the docs tend to be upto years out of date
23:35 Ryan_Lane nickjj: they should be reasonably up to date
23:36 Ryan_Lane for the most part, though, you should find the way you like to use salt and write your own internal conventions
23:36 Ryan_Lane for instance, I don't follow the best practices, because I find them to abstract things too much
23:37 nickjj Ryan_Lane: i'm toying around with the idea of converting about 60 ansible roles to ~60 salt formulas, just wanted to make sure i'm on track to avoid an epic fail
23:37 Ryan_Lane heh
23:37 Ryan_Lane oh
23:37 Ryan_Lane nickjj: http://ryandlane.com/blog/2014/07/14/truly-ordered-execution-using-saltstack/
23:38 Ryan_Lane if you're used to sequential ordering, and want to keep that, avoid using watch/watch_in
23:38 nickjj i am used to sequential ordering yeah
23:38 Ryan_Lane unless you need a state to execute immediately in response to another state
23:38 druonysuse joined #salt
23:38 tafa2 joined #salt
23:38 Ryan_Lane listen/listen_in work like handlers in ansible
23:38 Ryan_Lane watch/watch_in will modify the order of your states
23:38 nickjj atm my salt experience is: i watched a 20min intro tutorial and glanced the docs
23:39 nickjj ah nice
23:39 deeprave joined #salt
23:39 Ryan_Lane nickjj: http://ryandlane.com/blog/2014/08/04/moving-away-from-puppet-saltstack-or-ansible/
23:39 Ryan_Lane I did a comparison of salt/ansible there
23:39 Ryan_Lane it shows similar things implemented in both
23:39 nickjj oh cool, i knew your name looked familiar but i couldn't pin where i saw it
23:40 nickjj i read this a few days after you posted it heh
23:40 Ryan_Lane heh
23:41 bhosmer joined #salt
23:41 nickjj i didn't really sway me into trying salt, but i like to pick the right tool for the job and i have some free time to look at something new + ansible is kind of annoying me in some regards
23:41 nickjj *it
23:41 nickjj your article was really well written tho, one of the best comparisons i saw on this topic
23:41 Ryan_Lane thanks
23:42 Ryan_Lane I have a bunch of other salt posts that followed it
23:42 Ryan_Lane some may be useful. some may not :)
23:42 nickjj at some point they will probably be useful
23:42 Ryan_Lane I personally think the grain/state pattern I posted about is the most useful
23:43 nickjj the docs made it seem like grains are similar to ansible facts
23:43 nickjj and states i guess could be seen as tasks?
23:43 Ryan_Lane yep. same-same
23:43 Ryan_Lane exactly
23:43 Ryan_Lane salt doesn't have a concept of handlers, though
23:43 nickjj and pillars, was a bit flaky to me -- it was like a mix of defaults and variables maybe?
23:43 Ryan_Lane it's like variables, yeah
23:44 nickjj i see ansible variables as private vars, internal to the role -- and defaults as public vars that i expect people will overwrite on demand
23:44 nickjj but in salt it seemed like users would override your defaults with pillars?
23:44 Ryan_Lane when you say override, what do you mean?
23:45 Ryan_Lane I handle overrides via inclusion order
23:45 nickjj like setting nginx_user to 'www-data' in defaults/main.yml , and having a user overwrite it to 'foo' in inventory/group_vars/web.yml
23:45 Ryan_Lane base pillars -> service specific pillars -> environment specific pillars
23:46 Ryan_Lane you can load the pillars in order and the most generic get overridden by the most specific
23:46 deeprave joined #salt
23:46 nickjj so writing very reusable "read-only'ish" formulas is very doable? then people can customize them with their own pillars?
23:46 murrdoc yeah pillars are dicts
23:46 Ryan_Lane yep
23:47 murrdoc so you know merges override values
23:47 nickjj excellent, that was the only thing i wasn't too sure of
23:47 murrdoc https://github.com/saltstack-formulas/nginx-formula/blob/master/nginx/map.jinja#L8
23:47 nickjj merges override in what sense? would you have to copy/paste an entire dict just to change 1 value?
23:47 Ryan_Lane I tend to avoid merges
23:47 Ryan_Lane I only use overwrite
23:47 Outlander joined #salt
23:47 murrdoc so that jinja basically says, heres are the default unless the user has overridden any of them
23:48 Ryan_Lane I also try to keep my pillars relatively flat so that overwrites are easier
23:48 nickjj Ryan_Lane: any examples that you recommend to look at?
23:48 Ryan_Lane redis_port, redis_host, redis_etc are all different keys, for instance
23:48 Ryan_Lane hm. I'm not sure I've written anything for this
23:48 nickjj ah, so you wouldn't have a redis dict with a port/host/etc?
23:48 Ryan_Lane I probably should
23:49 druonysus joined #salt
23:49 Ryan_Lane if you use keys, rather than dicts, you can allow a user to overwrite just the thing they need
23:49 Ryan_Lane rather than the entire dict
23:49 nickjj i'd use redis_port, redis_host, etc. in ansible too, mainly because it's easier to overwrite 1 value without having to copy/paste 100 configurables to change 1
23:49 Ryan_Lane and you don't have to consider how the dicts will merge
23:49 shoemonkey joined #salt
23:49 nickjj ok, so in that regard it's the same as ansible then
23:49 nickjj i guess it's a python/jinja thing?
23:50 Ryan_Lane yes, though dict merging is supported in 2014.7 (the RC version)
23:50 Ryan_Lane I'd avoid it. it just makes things more compelx
23:50 nickjj ok
23:50 murrdoc hmm
23:50 murrdoc why would u say that ?
23:50 Ryan_Lane have you ever used hiera? :)
23:50 murrdoc its a simple decorator style implementation
23:50 murrdoc yes
23:50 murrdoc yes i have
23:50 murrdoc one second need to go beat someone up
23:50 murrdoc :D
23:50 Ryan_Lane :D
23:51 murrdoc ok thats fair
23:51 Ryan_Lane salt's specific implementation of this is better. I'll give it that
23:51 murrdoc but i have a little bit of reuse
23:51 murrdoc so making formulas makes sense
23:51 Ryan_Lane but... once people start using it, they do really complex things really fast
23:51 Ryan_Lane constraints are a good thing sometimes.
23:51 murrdoc and letting each srvtype pass in a dict of options is nice
23:51 Ryan_Lane true
23:51 murrdoc similar to calling a state with the extends key
23:52 Ryan_Lane I do use dicts for some things.
23:52 Ryan_Lane I define my users in pillars, for instance
23:52 Ryan_Lane and that
23:52 Ryan_Lane that's one large dict
23:52 murrdoc yeah no doubt
23:52 nickjj i tend to use dicts in ansible for things like database credentials
23:53 nickjj where you expect a user would adjust most of the values anyways
23:53 nickjj maybe 3 out of 4
23:53 Ryan_Lane nickjj: I wouldn't expect your use of pillars to be much different from your use of variables in ansibl
23:53 aw110f joined #salt
23:53 nickjj Ryan_Lane: sounds good
23:53 nickjj i tend to expose a lot of public variables and try to write reusable components
23:54 Ryan_Lane you have a lot more control over how your pillars are loaded, though
23:54 Ryan_Lane and that's a double-edged sword :)
23:54 Ryan_Lane I'm very happy than I can control this, because I really like my model
23:54 Ryan_Lane (and it's different from what ansible requires you to do)
23:55 nickjj i'm just happy that i could write normal loops in states without using some weird crazy special loop functions
23:55 Ryan_Lane +1
23:55 Ryan_Lane there's downsides to that, though
23:55 Ryan_Lane it also means you can't do things like register variables in one state and use them in the following state
23:56 nickjj i do that a lot in ansible, i guess salt has its own way to deal with that?
23:56 Ryan_Lane the jinja is always evaluated before the states
23:56 __number5__ I'm using grains for that kind of stuff
23:56 Ryan_Lane I haven't found the need for that in salt yet
23:56 Ryan_Lane I used it in ansible for rather mundane things
23:57 seanz left #salt
23:57 Ryan_Lane like registering the value of a command, so that I could conditionally run the next state
23:57 Ryan_Lane that's a native feature in salt (unless/onlyif)
23:57 nickjj a common case i used it for was to create idempotency for a deploy role
23:57 Ryan_Lane what do you mean?
23:57 aquinas joined #salt
23:58 nickjj sometimes you need to execute random commands and register their response
23:58 nickjj then do stuff when that response is something
23:58 Ryan_Lane if you need to conditionally run a state based on the response of a command, unless/onlyif will let you do that
23:58 nickjj let's say you used the git module to clone a repo, and you registered "repo_changed", then you wanted to execute 5 tasks only if the repo changed
23:59 Ryan_Lane if you need to record the output of a command and use it a bunch of places, you could set a grain, then conditionally do things based on the value of the grain
23:59 Ryan_Lane the grain will persist across runs, so it's something to think about
23:59 gibigiana joined #salt
23:59 nickjj that's reasonable, so setting a grain would be similar to setting a fact? in ansible's case you could register a var, but in salt's case it's like you're forced to set_fact?

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