When running the Chapter 4 Lab, it is missing a directory on the managed host:
host: serverb.lab.example.com
directory: /var/www
This causes the playbook to fail at the code from Instruction #4 because it can't start the "httpd" service. If I manually create the directory "/var/www/html", the playbook is successful.
I have reset "serverb" from the "Lab Envronment" tab and run the "lab start control-review" command and the directory is still missing.
Has anyone else had this issue? Did I miss a step? Any suggestions?
Thanks
@Dthibi -
Most likely there are issues from another lab that didn't properly get cleaned up. Generally the /var/www/html directory doesn't exist on a RHEL server. This directory gets created when installing the HTTPD package. So the task in the playbook you are running should install the HTTPD package and as part of that is by default creating the /var/www/html directory. It is possible that a cleanup at some point left the package installed, but deleted the directory, so that is one instance where Apache could be on the system, but can't start.
@Dthibi -
Most likely there are issues from another lab that didn't properly get cleaned up. Generally the /var/www/html directory doesn't exist on a RHEL server. This directory gets created when installing the HTTPD package. So the task in the playbook you are running should install the HTTPD package and as part of that is by default creating the /var/www/html directory. It is possible that a cleanup at some point left the package installed, but deleted the directory, so that is one instance where Apache could be on the system, but can't start.
Thank you for the quick reply.
As I stated in my original post, I "reset" the server and was still missing the folder. However, I didn't re-run my playbook which would have re-installed the "httpd" package and shown that it is working as expected now.
@Dthibi -
Correct. I knew when you re-ran the playbook things should "work". Because when you reset the server, it was like HTTPD was never installed, so you are correct in the directory wouldn't be there, but there wouldn't even be a service to start.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.