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