Added a require statement to the nginx directive in the puppet manifest, so that it only runs when apt-get update has finished.