用途:设置系统的主机名
官方说明
> 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
主机名称