macos_hostname
Ansible Role macOS Hostname
A simple Ansible role to set HostName, LocalHostName, and ComputerName on macOS.
Requirements
No special requirements.
Role Variables
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.
Example Playbook
- hosts: servers
roles:
- role: ansible-role-macos-hostname
License
GPLv3
Author Information
Christopher Torgalson
About
A role to set HostName, LocalHostName, and ComputerName on macOS.
Install
ansible-galaxy install ctorgalson/ansible-role-macos-hostname
License
gpl-3.0
Downloads
11725
Owner