I am using ansible v2.2.1 and I need to remove only the first occurrence of a line in file. So my ansible playbook is as follows.

```
---   
- hosts: localhost
  tasks:
  - name: read file content
    command: cat occurence.txt
    register: fc
  - debug: var=fc

  - debug: msg="{{ item }}"
    with_items:
     - "{{ fc.stdout_lines }}"

  - name: first occurence in file
    shell: sed -i '0,/{{ item }}/{/{{ item }}/d;}' occurence.txt
    with_items:
     - "{{ fc.stdout_lines }}"
    register: remove
  - debug: var=remove

```

And **occurence.txt** file has following content

```
this is apple
this is apple
this is banana
this is apple
this is orange

```

How can I delete only the first occurrence of line "this is apple" and leave rest of the lines?