配置主机间host解析

采集将多主机间的hostnameIP解析,过滤hostnamelocalhost的条例,配置到/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
Copyright © weiliang-ms 2021 all right reserved,powered by Gitbook本书发布时间: 2023-09-06 14:36:05

results matching ""

    No results matching ""