Think before you speak, read before you think.

使用 etcd 做为 ansible inventory 数据源

etcd 文档

https://coreos.com/etcd/docs/0.4.7/etcd-api/
https://github.com/oreh/simpletcd

结构

hostvars/12.34.56.78/redis_maxmemory => 4GB
hostvars/12.34.56.78/hostname => abc.jpuyy.com

输出

[abc.jpuyy.com]
12.34.56.78

对应的变量是 redis_maxmemory = 4GB


Comments

One response to “使用 etcd 做为 ansible inventory 数据源”

  1. 脚本没贴出来呢

Leave a Reply

Your email address will not be published. Required fields are marked *