Using systemsetup
you can define certain System Preferences from the command line. Take a look at https://github.com/kevinSuttle/OSXDefaults/blob/master/REFERENCE.md#systemsetup for an overview of available settings.
class { 'systemsetup::computer_name':
computer_name => 'mycomputername'
}
boxen
Write code.
Run script/cibuild
.