A simple Ansible role to set HostName, LocalHostName, and ComputerName on macOS.
No special requirements.
Variable name | Default value | Description |
---|---|---|
mh_hostname |
'' |
The HostName to set. |
mh_localhostname |
MhLocalHostName |
The LocalHostName to set. |
mh_computername |
MhComputerName |
The ComputerName to set. |
- The properties
HostName
,LocalHostName
, andComputerName
referred to in the table are keywords used with thescutil
command on macOS. - Setting a value for
HostName
may have unpredictable or confusing results. See the answers to this Stack Overflow question for more information.
- hosts: servers
roles:
- role: ansible-role-macos-hostname
GPLv3
Christopher Torgalson