4 ms·
Does Salt offer all the benefits of Chef server? To my knowledge, the former has no search engine nor any way to return feedback from the managed hosts. Share
by otterley 13y ago
Does Salt offer all the benefits of Chef server? To my knowledge, the former has no search engine nor any way to return feedback from the managed hosts. Shared storage is absolutely essential for building things like ssh_known_hosts files and Nagios configurations.
- mpdehaan2 13y agoAnsible can trade data between machines using 'hostvars' as a variable, so you don't even need the analog of Puppet storeconfigs to assemble facts. (Sorry, don't now the Chef term). Stop by the list if you'd like more info, but it's easy to generate nagios configs from templates this way.
- otterley 13y agoWho stores hostvars? Does Ansible provide a way to extract a subset of them based on other hostvars? (e.g. "give me all the ssh host keys of my hosts in the intersection of datacenter X and hostgroup Y")
- mpdehaan2 13y agoAnsible doesn't store them, but exchanges them in memory. (The assumption is you'd want them to be current anyway). We are going to add some optional caching (likely just requiring sqlite as it's all we need) in a future release. But yes, it's easy to do that. Assuming you meant a template, you could do: {% for host in groups["datacenterX"] %} {% if host in groups["Y"] %} {{ ssh_host_key_rsa_public }} {% end if %} {% endif %} Ansible is also good at carving up groups based on these things, like if you just wanted to talk to those hosts: hosts: datacenterX:&Y note that Hacker News ate my newlines. etc
- jessaustin 13y agonote that Hacker News ate my newlines. If you want to edit the post to include them, indent by at least four spaces the text for which newlines are important. Maybe like this: {% for host in groups["datacenterX"] %} {% if host in groups["Y"] %} {{ ssh_host_key_rsa_public }} {% end if %} {% endif %} [sic]
- otterley 13y ago> Ansible doesn't store them, but exchanges them in memory (The assumption is you'd want them to be current anyway). What happens if the server crashes? Can a subsequent run before all the data is repopulated cause the derived files to have invalid or missing data?
- mpdehaan2 13y agoIt's saving them in memory now so there are no files to corrupt. When you run again it gathers all the facts from the hosts.
- deleted 13y ago[deleted]
- sergiosgc 13y agoI'm in no way proficient in Salt. It does have shared storage and the ability to go through other nodes config data, though. This video is a nice introduction: http://m.youtube.com/watch?v=jJJ8cfDjcTc http://m.youtube.com/watch?v=jJJ8cfDjcTc
- pwf 13y agoYou can do that with Salt via the Salt Mine: http://docs.saltstack.com/topics/mine/index.html http://docs.saltstack.com/topics/mine/index.html I haven't used it myself, but I've been reading up on Salt quite a bit in hopes that I can replace Chef with it soon.