can you check the validation on the lineInfile Module task? This is the second time I got the task, but failed this time. I double checked the results and it looks fine. The weird thing is when i check back on June 5th, that I got success on the lineInFile Module task the first time, it wasn’t in my task list anymore?
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!’