<h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.9.3</p>
<h5 dir="auto">Ansible Configuration:</h5>
<p dir="auto">nothing special</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">run from: OS X 10.11<br>
managing: OracleLinux 7.1</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Playbook with this task fail:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Upgrade
  yum: name=* state=latest update_cache=yes"><pre class="notranslate"><code class="notranslate">- name: Upgrade
  yum: name=* state=latest update_cache=yes
</code></pre></div>
<h5 dir="auto">Actual Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [packages-yum | Upgrade] ************************************************ 
&lt;192.168.x.x&gt; ESTABLISH CONNECTION FOR USER: root
&lt;192.168.x.x&gt; REMOTE_MODULE yum name=* state=latest update_cache=yes
&lt;192.168.x.x&gt; EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=&quot;/Users/wicommander/.ansible/cp/ansible-ssh-%h-%p-%r&quot; -o IdentityFile=&quot;/Users/wicommander/.ssh/id_rsa_java&quot; -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 192.168.x.x /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839'
&lt;192.168.x.x&gt; PUT /tmp/tmpiCqSFi TO /root/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839/yum
&lt;192.168.x.x&gt; EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=&quot;/Users/wicommander/.ansible/cp/ansible-ssh-%h-%p-%r&quot; -o IdentityFile=&quot;/Users/wicommander/.ssh/id_rsa_java&quot; -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 192.168.x.x /bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python -tt /root/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839/yum; rm -rf /root/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839/ &gt;/dev/null 2&gt;&amp;1'
failed: [ns2] =&gt; {&quot;changed&quot;: false, &quot;errors&quot;: &quot;unexpected state&quot;, &quot;failed&quot;: true, &quot;results&quot;: &quot;&quot;}
msg: we should never get here unless this all failed

FATAL: all hosts have already failed -- aborting"><pre class="notranslate"><code class="notranslate">TASK: [packages-yum | Upgrade] ************************************************ 
&lt;192.168.x.x&gt; ESTABLISH CONNECTION FOR USER: root
&lt;192.168.x.x&gt; REMOTE_MODULE yum name=* state=latest update_cache=yes
&lt;192.168.x.x&gt; EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/wicommander/.ansible/cp/ansible-ssh-%h-%p-%r" -o IdentityFile="/Users/wicommander/.ssh/id_rsa_java" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 192.168.x.x /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839'
&lt;192.168.x.x&gt; PUT /tmp/tmpiCqSFi TO /root/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839/yum
&lt;192.168.x.x&gt; EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/wicommander/.ansible/cp/ansible-ssh-%h-%p-%r" -o IdentityFile="/Users/wicommander/.ssh/id_rsa_java" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 192.168.x.x /bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python -tt /root/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839/yum; rm -rf /root/.ansible/tmp/ansible-tmp-1444204659.82-210310868168839/ &gt;/dev/null 2&gt;&amp;1'
failed: [ns2] =&gt; {"changed": false, "errors": "unexpected state", "failed": true, "results": ""}
msg: we should never get here unless this all failed

FATAL: all hosts have already failed -- aborting
</code></pre></div>
<p dir="auto">Updating YUM packages is broken in Ansible 1.9.3.</p>
<p dir="auto">env:<br>
Ubuntu 15.04 vivid<br>
Ansible version: 1.9.3-1ppa~vivid (deb-src <a href="http://ppa.launchpad.net/ansible/ansible/ubuntu" rel="nofollow">http://ppa.launchpad.net/ansible/ansible/ubuntu</a>)</p>
<p dir="auto">Snippet of my playbook:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: YUM upgrade
  yum: name=* state=latest update_cache=yes"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">YUM upgrade</span>
  <span class="pl-ent">yum</span>: <span class="pl-s">name=* state=latest update_cache=yes</span></pre></div>
<p dir="auto">Unexpected result:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [centos | YUM upgrade] **************************************************
failed: [centos_host] =&gt; {&quot;changed&quot;: false, &quot;errors&quot;: &quot;unexpected state&quot;, &quot;failed&quot;: true, &quot;results&quot;: &quot;&quot;}
msg: we should never get here unless this all failed"><pre class="notranslate"><code class="notranslate">TASK: [centos | YUM upgrade] **************************************************
failed: [centos_host] =&gt; {"changed": false, "errors": "unexpected state", "failed": true, "results": ""}
msg: we should never get here unless this all failed
</code></pre></div>
<p dir="auto">Debugging showed that the value state is 'latest', which is an expected state.</p>
<p dir="auto">Expected result (was working in 1.9.2):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [centos | YUM upgrade] **************************************************
ok: [centos_host]"><pre class="notranslate"><code class="notranslate">TASK: [centos | YUM upgrade] **************************************************
ok: [centos_host]
</code></pre></div>