title: Server Provisioning with Jenkins and Ubuntu 12.04 Server
body: <p>I do have an Ubuntu Server 12.04 VM using VMWare Fusion that i would like to provision with a set of Jenkins Steps.</p>
  
  <p>So far i have the server VM with the following packages by default when installing the OS.</p>
  
  <ol>
  <li>default-java (This is the OpenJDK for Jenkins Slave)</li>
  <li>openssh-server (for communication with my clients)</li>
  </ol>
  
  <p>I would like to make the following changes to this VM template so i can use it later for any purpose.</p>
  
  <ol>
  <li>Change the hostname/hosts configuration (needs a reboot)</li>
  <li>run package installations if necessary (git-core)</li>
  <li>Install a puppet master server.</li>
  </ol>
  
  <p>I do have a problem when trying to execute commands since ubuntu does not have the root account.</p>
  
  <pre><code>+ sudo hostname ubuntu
  sudo: no tty present and no askpass program specified
  Build step 'Execute shell' marked build as failure
  Finished: FAILURE
  </code></pre>
  
  <p>I did try changing the sudoers NOPASSWD configuration for the sudo group members with luck only if i log in to the VM but not with jenkins even when the jenkins user is the only user in the system that is a member of the sudo group.</p>
  
  <p>I would say having and image with a specific OS should be enough but i am guessing in this scenario need the jenkins slave in place to start managing the VM. I am not using Vagrant since is super slow on the MAC and VM Ware Fusion is super fast even than parallels.</p>
  
  <p>Any clues?</p>