ansible 之 hostname


用途:设置系统的主机名

官方说明

> HOSTNAME    (/usr/lib/python2.7/site-packages/ansible-2.8.0.dev0-py2.7.egg/ansible/modules/system/hostname.py

        Set system's hostname, supports most OSs/Distributions, including those using
        systemd. Note, this module does *NOT* modify `/etc/hosts'. You need to modify it
        yourself using other modules like template or replace. Windows, HP-UX and AIX
        are not currently supported.

  * This module is maintained by The Ansible Community
OPTIONS (= is mandatory):

= name
        Name of the host



REQUIREMENTS:  hostname

AUTHOR: Adrian Likins (@alikins), Hideki Saito (@saito-hideki)
        METADATA:
          status:
          - preview
          supported_by: community
        

EXAMPLES:
- hostname:
    name: web01

参数解释

  • name
    主机名称


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM