title: How to get an Ansible check to run only once in a playbook?
body: <p>As a safeguard against using an outdated playbook, I'd like to ensure that I have an updated copy of the git checkout before Ansible is allowed to modify anything on the servers.</p>
  
  <p>This is how I've attempted to do it. This action is located in a file included by all play books:</p>
  
  <pre><code>- name: Ensure local git repository is up-to-date
    local_action: git pull
    register: command_result
    failed_when: "'Updating' in command_result.stdout"
  </code></pre>
  
  <p>The problem is that this command is run once for each node Ansible connects to, instead of only once for each playbook run. How can I avoid that?</p>