Hi Lakshmi,
Thank you very much…I followed what you suggested. It worked. How come using template is replacing correct value for inventory_hostname?
Hi Lakshmi,
Thank you very much…I followed what you suggested. It worked. How come using template is replacing correct value for inventory_hostname?
Copy module will copy the file from ‘files’ directory.
Template module will copy the jinja2 template from templates directory on Ansible playbooks.
Thank you, will try it if question repeat again.
@Inderpreet @Tej-Singh-Rana. I did the task as per the details . I did not check the permissions…Can you please reassign the task once. It was a silly mistake in permissions.
Hello. Why my task is failed? “- ‘/var/www/html/index.html’ file has incorrect user owner on App Server 3”
In task was said nothing about the user owner. It was only about changing the rights to index.html (0744).
There is my scrennshots:
There is my task/main.yml code:
There is part about index.html
c. Add a task inside <</home/thor/ansible/role/httpd/tasks/main.yml>> to copy this template on App Server 3 under <</var/www/html/index.html>>.
Also make sure that <</var/www/html/index.html>> file’s permissions are <<0744>>.