Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
macosx hostname resource error when previously unset #8477
Using the hostname resource on macosx, the chef run will fail if the hostname has not been set before. I've found this common across our mac devices. Obviously this is somewhat counter intuitive as I am attempting to use the resource to set the hostname on said devices.
Use something like the following in a recipe and run against a macosx machine where the command
Output from run locally.
Verifying whether the hostname is set with the same command the code uses:
Possible line where code is failing: