<p dir="auto">If I do the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ add-apt-repository 'deb http://example.com/ubuntu precise main'
$ add-apt-repository 'deb http://example.com/ubuntu precise-updates main'
"><pre class="notranslate"><code class="notranslate">$ add-apt-repository 'deb http://example.com/ubuntu precise main'
$ add-apt-repository 'deb http://example.com/ubuntu precise-updates main'

</code></pre></div>
<p dir="auto">I'll see the following in the sources.list:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deb http://example.com/ubuntu precise main 
deb-src http://example.com/ubuntu precise main 
deb http://example.com/ubuntu precise-staging main 
deb-src http://example.com/ubuntu precise-staging main"><pre class="notranslate"><code class="notranslate">deb http://example.com/ubuntu precise main 
deb-src http://example.com/ubuntu precise main 
deb http://example.com/ubuntu precise-staging main 
deb-src http://example.com/ubuntu precise-staging main
</code></pre></div>
<p dir="auto">Yet, if I apply the following playbook:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Setup dependencies

---
- hosts: localhost
  user: root

  tasks:
    - apt_repository: repo='deb http://example.com/ubuntu precise main'
    - apt_repository: repo='deb http://example.com/ubuntu precise-updates main'                                                  "><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> Setup dependencies</span>

---
- <span class="pl-ent">hosts</span>: <span class="pl-s">localhost</span>
  <span class="pl-ent">user</span>: <span class="pl-s">root</span>

  <span class="pl-ent">tasks</span>:
    - <span class="pl-ent">apt_repository</span>: <span class="pl-s">repo='deb http://example.com/ubuntu precise main'</span>
    - <span class="pl-ent">apt_repository</span>: <span class="pl-s">repo='deb http://example.com/ubuntu precise-updates main'                                                  </span></pre></div>
<p dir="auto">then only the first deb-line is added. The output shows that ansible determines (in ...) that the second one already exists based on the url onl:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [localhost] ************************************************************** 

GATHERING FACTS *************************************************************** 
ok: [localhost]

TASK: [apt_repository repo='deb http://example.com/ubuntu precise main'] ****** 
changed: [localhost]

TASK: [apt_repository repo='deb http://example.com/ubuntu precise-updates main'] *** 
ok: [localhost]

PLAY RECAP ******************************************************************** 
localhost                  : ok=3    changed=1    unreachable=0    failed=0   "><pre class="notranslate"><code class="notranslate">PLAY [localhost] ************************************************************** 

GATHERING FACTS *************************************************************** 
ok: [localhost]

TASK: [apt_repository repo='deb http://example.com/ubuntu precise main'] ****** 
changed: [localhost]

TASK: [apt_repository repo='deb http://example.com/ubuntu precise-updates main'] *** 
ok: [localhost]

PLAY RECAP ******************************************************************** 
localhost                  : ok=3    changed=1    unreachable=0    failed=0   
</code></pre></div>
<p dir="auto">Looking at packaging/apt_repository:repo_exists seems to confirm that it's only checking the url of the debline.</p>
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/abergman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/abergman">@abergman</a> on November 15, 2014 15:49</em></p>
<p dir="auto">Issue type: Bug report<br>
Ansible version: 1.7.2</p>
<p dir="auto">Component Name:<br>
vsphere_guest module</p>
<p dir="auto">Summary:<br>
vm_nic option in vsphere_guest does not reconfigure the networks a VM is connected to<br>
Steps To Reproduce:</p>
<p dir="auto">Have an existing VM connected to "VM Network".<br>
Run an ansible-playbook which reconfigures the VM to connect it to VM Network 2.</p>
<p dir="auto">Expected Results:</p>
<p dir="auto">The VM should be connected to VM Network 2.</p>
<p dir="auto">Actual Results:</p>
<p dir="auto">The VM is still connected to VM Network. Modifications to CPU/memory seem to work, but I am unable to use the vsphere_guest module to reconfigure a VM's networking.</p>
<p dir="auto">Thoughts:</p>
<p dir="auto">It looks like the entire code for adding a NIC to an existing VM is missing in vm_reconfigure, line 491.</p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48912908" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/335" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/335/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/335">ansible/ansible-modules-core#335</a></em></p>