配置主机间host解析
采集将多主机间的hostname
与IP
解析,过滤hostname
为localhost
的条例,配置到/etc/hosts
中
生成默认配置文件
easyctl set host-resolv
修改配置文件
config.yaml
server:
- host: 10.10.1.[1:3]
username: root
password: 111111
port: 22
excludes:
- 192.168.235.132
配置
host
解析
--debug
输出debug
日志,可选参数
easyctl set host-resolv -c config.yaml --debug
查看解析
[root@scq-dc01 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
# easyctl hosts BEGIN
10.10.1.1 scq-dc01
10.10.1.2 scq-dc02
10.10.1.3 scq-dc03
# easyctl hosts END