<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Documentation Report</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">core</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.0.1.0
config file = /root/.ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.0.1.0
config file = /root/.ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Running ansible on CentOS Linux release 7.2.1511 (Core)<br>
Managing a system on CentOS release 5.5 (Final)</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">wait_for will not accept both port and path.  The documentation should note that restriction</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Construct a playbook similar to the following.  seths_46 is one of my test VM systems.  When duplicating this bug, use one of your test systems instead.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
- hosts: seths_46
  gather_facts: false
  strategy: free
  tasks:
  - wait_for: host={{ inventory_hostname }} path=&quot;/adp/etc/rc2.d/s099upwrapup&quot; port=22 delay=1 timeout=1800"><pre class="notranslate"><code class="notranslate">---
- hosts: seths_46
  gather_facts: false
  strategy: free
  tasks:
  - wait_for: host={{ inventory_hostname }} path="/adp/etc/rc2.d/s099upwrapup" port=22 delay=1 timeout=1800
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">I wanted Ansible to wait for the port to be open and then for the filename in the path to exist.  If Ansible cannot do that, then the documentation should say so.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [wait_for] ****************************************************************
fatal: [&lt;ip address deleted&gt;]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;msg&quot;: &quot;port and path parameter can not both be passed to wait_for&quot;}"><pre class="notranslate"><code class="notranslate">TASK [wait_for] ****************************************************************
fatal: [&lt;ip address deleted&gt;]: FAILED! =&gt; {"changed": false, "failed": true, "msg": "port and path parameter can not both be passed to wait_for"}
</code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 1.9.5
  configured module search path = None

ansible 2.0.1.0
  config file = /dev/null
  configured module search path = Default w/o overrides

# from git: d78ba34cf000cc7d5ff57e8f99b679d03d064540
ansible 2.1.0
  config file = /dev/null
  configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 1.9.5
  configured module search path = None

ansible 2.0.1.0
  config file = /dev/null
  configured module search path = Default w/o overrides

# from git: d78ba34cf000cc7d5ff57e8f99b679d03d064540
ansible 2.1.0
  config file = /dev/null
  configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export ANSIBLE_CONFIG=/dev/null"><pre class="notranslate"><code class="notranslate">export ANSIBLE_CONFIG=/dev/null
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="OSX 10.11.4
python 2.7.11 (homebrew)"><pre class="notranslate"><code class="notranslate">OSX 10.11.4
python 2.7.11 (homebrew)
</code></pre></div>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">While migrating some playbooks to Ansible 2.0 i found some inconsistencies between different ansible versions, and most importantly in the same version depending of the syntax chosen.<br>
Attached you while find a complete example with variations over the same theme, running the same role multiple times.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# the example code is attached
cd example
ansible-playbook -i inventory test1.yml
ansible-playbook -i inventory test2.yml
ansible-playbook -i inventory test3.yml"><pre class="notranslate"><code class="notranslate"># the example code is attached
cd example
ansible-playbook -i inventory test1.yml
ansible-playbook -i inventory test2.yml
ansible-playbook -i inventory test3.yml
</code></pre></div>
<p dir="auto"><a href="https://github.com/ansible/ansible/files/217961/example.zip">example.zip</a></p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">All three playbooks should return the same result.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Each ansible version tested return different results for playbooks that should be equivalent.</p>