title: Ansible how to compare output of multiple hosts within the same task
body: <p>I have an ansible playbook that has a task to output the list of installed Jenkins plugins for each servers.</p>
  
  <p>here is the host file:</p>
  
  <pre><code>[masters]
  server1
  server2
  server3
  server4
  server5
  server6
  </code></pre>
  
  <p>Here is the task that prints out the list of plugins installed on each of the jenkins servers:</p>
  
  <pre><code>- name: Obtaining a list of Jenkins Plugins
    jenkins_script:
      script: 'println(Jenkins.instance.pluginManager.plugins)'
      url: "http://{{ inventory_hostname }}.usa.com:8080/"
      user: 'admin'
      password: 'password'
  </code></pre>
  
  <p>What I want to do next is do a comparison with all of the installed plugins across all of the servers -- to ensure that all of the servers are running the same plugins. </p>
  
  <p>I don't necessarily want to force an update -- could break things -- just inform the user that they are running a different version of the plug in that the rest of the servers.</p>
  
  <p>I am fairly new to ansible, will gladly accept any suggestions on how to accomplish this.</p>