title: Continuous Integration - How to run npm install on offline server
body: <p>Our continuous integration system uses ansible playbooks to deploy our repo (including node modules) to a list of servers as specified in our ansible host file.  We have numerous environments which are configured in individual host files.  Jenkins is our build server which is used to kick of each ansible run on a schedule.  One of the tasks in the ansible playbook is npm install.</p>
  
  <p>Our problem arises because only one of the environments is offline, so when the playbook performs the npm install task on this particular environment (read "host file"), it fails due to lack of internet connectivity.</p>
  
  <p>I've seen lots of answers on how to get around this manually, but the whole point of our continuous integration system is to run automatically, and consistently (from environment to environment).  So I don't want to introduce a bunch of workarounds in the playbook and/or repo to bundle up, etc. the node modules just to get around this particular hosts offline issue.</p>
  
  <p>Since this is a lower enviroment, I am willing to do something specific in advance, as a one time step, on this server in order to bypass this issue.  But since the playbook tasks tar up all existing files under the user account in a rollback zip file prior to installing the new code, anything I introduce on the server under this user account will be essentially removed (with the exception of . files and directories).</p>
  
  <p>So, how to us CI to run npm install on single offline server without manual intervention?</p>