For me also its failed with same error.
Anyone can check this. @Inderpreet. below is my playbook.
- hosts: all
become: yes
become_user: root
tasks:
-
name: Install httpd package on all application servers
yum:
name: httpd
state: installed
-
name: Start httpd service
service:
name: httpd
state: started
enabled: true
-
name: Create a file and Add a line to a file
lineinfile:
path: /var/www/html/index.html
line: “This is a Nautilus sample file, created using Ansible!”
create: yes
owner: apache
group: apache
mode: ‘0777’
-
name: Add a line to a file
lineinfile:
path: /var/www/html/index.html
insertbefore: BOF
line: ‘Welcome to xFusionCorp Industries!’

