The task got failed and i couldnt find any issue and my play book as below
- hosts: stapp02
become: true
become_user: root
tasks:- name: instll packages
yum:
name: [“httpd”,“php”]
state: present - name: create document root
file:
name: /var/www/html/myroot
state: directory - name: modify document root
lineinfile:
path: /etc/httpd/conf/httpd.conf
regexp: “^DocumentRoot”
line: “DocumentRoot /var/www/html/myroot” - name: php config
template:
src: templates/phpinfo.php.j2
dest: /var/www/html/myroot/phpinfo.php
owner: apache
group: apache - name: service start
service:
name: httpd
state: started
enabled: yes
- name: instll packages
All tasks are successfully completed and post verification also done
Can someone guide me trouble shoot the same?