Closed cecek34 closed 11 months ago
Hello @cecek34 thank you for your report.
The issue might be related to indentation. Please review the following ansible.builtin.service documentation for examples and check against your playbook. The task should look like this:
- name: Start service httpd, if not started
ansible.builtin.service:
name: httpd
state: started
Spaces are important. Let us know if this solves your issue or you are still running into problems. If you are still having issues, please copy paste the content of apache.yml here into the issue, using the "code block" in the formatting tool here in Github, so it looks like above.
Hi @cecek34 , I hope the comment above helped solve your issue, we will be closing the ticket now. If you are still having problems, please share the information requested above and we will reopen it. Thank you!
I followed the instructions to the T and got the error message: 'ERROR! 'ansible.builtin.service' is not a valid attribute for a Play
The error appears to be in '/home/rhel/ansible-files/apache.yml': line 1, column 5, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be: - name: Apache enabled and running ^ here'