<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Zanthras/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Zanthras">@Zanthras</a> on 2016-08-09T18:06:24Z</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">networking/ios_config</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">Fully default</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ansible is running off a RHEL6.8 system</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">IOS_config "replace: block" does not replace the block when there are no parents defined.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Existing config:<br>
access-list 1 remark #### This line will be sent ####<br>
access-list 1 remark ### This line wont be sent ###</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  tasks:
  - name: Block replace failure
    ios_config:
      provider: &quot;{{ provider }}&quot;
      authorize: yes
      replace: block
      match: line
      lines:
        - &quot;access-list 1 remark ### This line will be sent ###&quot;
        - &quot;access-list 1 remark ### This line wont be sent ###&quot;
      before:
        - &quot;no access-list 1&quot;"><pre class="notranslate"><code class="notranslate">  tasks:
  - name: Block replace failure
    ios_config:
      provider: "{{ provider }}"
      authorize: yes
      replace: block
      match: line
      lines:
        - "access-list 1 remark ### This line will be sent ###"
        - "access-list 1 remark ### This line wont be sent ###"
      before:
        - "no access-list 1"
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">access-list 1 remark ### This line will be sent ###<br>
access-list 1 remark ### This line wont be sent ###</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">access-list 1 remark ### This line will be sent ###</p>
<p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="170232444" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/4368" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/4368/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/4368">ansible/ansible-modules-core#4368</a></p>
<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>

<p dir="auto">apt_repository_module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.1.0"><pre class="notranslate"><code class="notranslate">ansible 2.1.1.0
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">Ubuntu 14.04</p>
<h5 dir="auto">SUMMARY</h5>

<p dir="auto">I tried to add ppa on ubuntu 14.04 server but getting "invalid repository" error. But when I try to add it from the server cli, it works fine.</p>


<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: Add PHP repo
  apt_repository:
    repo: 'ppa:ondrej/php'"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Add PHP repo</span>
  <span class="pl-ent">apt_repository</span>:
    <span class="pl-ent">repo</span>: <span class="pl-s"><span class="pl-pds">'</span>ppa:ondrej/php<span class="pl-pds">'</span></span></pre></div>
<p dir="auto">Error output</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [ip]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;msg&quot;: &quot;Invalid repository string: ppa:ondrej/php&quot;}"><pre class="notranslate"><code class="notranslate">fatal: [ip]: FAILED! =&gt; {"changed": false, "failed": true, "msg": "Invalid repository string: ppa:ondrej/php"}
</code></pre></div>