title: Remove a line from a file using ansible?
body: <p>I have a file called <code>authorized_keys</code>. I need to delete a particular line using an Ansible script. </p>
  
  <p>The problem is when I try to remove a line that includes a '+' character. Ansible is not able to remove this line.</p>
  
  <p>e.g <code>authorized_keys</code> file is:</p>
  
  <pre><code> .....
   abhi foo+bar saken
   ......(EOF)
  </code></pre>
  
  <p>I want to remove the <code>abhi foo+bar saken</code> line but Ansible is not removing this line because of the <code>+</code> character. </p>
  
  <p>I am able to remove lines that do not contain a <code>+</code> character .</p>
  
  <p>Task: </p>
  
  <pre><code>- name: Delete keys in sysadmin/.ssh/authoriezd_keys
    lineinfile: dest=/home/{{name}}/.ssh/authorized_keys
                state=absent 
                regexp='^{{key}}$' 
  </code></pre>
  
  <p>PS: I am using Ansible's <code>lineinfile</code> module</p>