I would move `@deployment.hostgroup.name = @deployment.name` to a callback to keep it always in sync.