As a consumer of this cookbook I think adding "# or 'localhost'" to indicate a DNS name is OK would invite confusion about which IP address or DNS name is supposed to go here. Maybe "# or 'slave.example.org'" would be more concise?