Ansible lineinfile module error

Below are the screenshots that I have done as part of this task : Ansible Lineinfile Module
@Inderpreet @Ayman @mmumshad

Error :

Here is the playbook.yml :


  • name: Install and configure apache web server
    hosts: all
    become: yes
    become_user: root
    tasks:

    • name: Install apache web server
      yum:
      name: httpd
      state: present

    • name: Start apache web service
      service:
      name: httpd
      state: started

    • name: Creating index.html file
      copy:
      dest: /var/www/html/index.html
      content: |
      This is a Nautilus sample file, created using Ansible!

    • name: Insert line at begin of file
      lineinfile:
      path: /var/www/html/index.html
      line: ‘Welcome to xFusionCorp Industries!’
      insertbefore: BOF

    • name: Setting file permissions and owner
      file:
      path: /var/www/html/index.html
      owner: apache
      group: apache
      mode: ‘0655’

Review this task and let me know the mistakes.
Also, if this is marked as success. Much appreciated !!!

Hello, @Aman1011
Can you please share in the “Review” Section? Our community members are there to help you.

Hello @Tej-Singh-Rana

I will be sending it to the Review Section.
Can you please let me know what is the error that I had made ? That will surely help me for the future tasks.

I haven’t seen in the “Review” section? Can you please share the link?