ansible-playbook 修改主机的host解析

  • hosts: all remote_user: root

    tasks:

    • name: add hosts lineinfile: name=/etc/hosts line=“192.168.59.103 www.test3.com
1
2

执行命令如下

ansible-playbook hosts.tml -i inventory/mycluster/inventory.ini

Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计
Caret Up