Bootstrap

ansible模块--hostname模块

修改hostname主机名https://www.cndba.cn/hbhe0316/article/20971https://www.cndba.cn/hbhe0316/article/20971https://www.cndba.cn/hbhe0316/article/20971https://www.cndba.cn/hbhe0316/article/20971https://www.cndba.cn/hbhe0316/article/20971https://www.cndba.cn/hbhe0316/article/20971https://www.cndba.cn/hbhe0316/article/20971https://www.cndba.cn/hbhe0316/article/20971

https://www.cndba.cn/hbhe0316/article/20971
https://www.cndba.cn/hbhe0316/article/20971
[root@ansible ~]# ansible mysql -m hostname -a 'name=mysql8'
192.168.56.88 | CHANGED => {
    "ansible_facts": {
        "ansible_domain": "", 
        "ansible_fqdn": "mysql8", 
        "ansible_hostname": "mysql8", 
        "ansible_nodename": "mysql8", 
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": true, 
    "name": "mysql8"
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

ansible

;