# can't start httpd service on RedHat Linux using ansible: Complaining about syntax errror

**URL:** <https://forum.ansible.com/t/cant-start-httpd-service-on-redhat-linux-using-ansible-complaining-about-syntax-errror/19224>\
**Category:** Ansible Project\
**Created:** [September 10, 2015, 9:18am UTC](https://forum.ansible.com/t/cant-start-httpd-service-on-redhat-linux-using-ansible-complaining-about-syntax-errror/19224 "2015-09-10T09:18:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephan\_Hradek](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@Stephan\_Hradek](https://forum.ansible.com/u/Stephan_Hradek)\
**Post date:** [September 10, 2015, 9:18am UTC](https://forum.ansible.com/t/cant-start-httpd-service-on-redhat-linux-using-ansible-complaining-about-syntax-errror/19224/1 "2015-09-10T09:18:55Z")

</div>

When I start the httpd servicefrom commandline, it works without an issue.

When I use this in a playbook:

`

- name: Start HTTPD  
become: root  
service:  
name: httpd  
state: started

`

I get this error message

`fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Syntax error on line 292 of /etc/httpd/conf/httpd.conf:\nDocumentRoot '/var/www/html' is not a directory, or is not readable\n"}`

I have to say that my /var/www is a symbolic link to /var/apacecontent/www.

But why would ansible complain when I can easily start from command line ☹

Is there a way to avoid this?

---

<div class="post-metadata">

**Author:** ![Stephan\_Hradek](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@Stephan\_Hradek](https://forum.ansible.com/u/Stephan_Hradek)\
**Post date:** [September 10, 2015, 10:13am UTC](https://forum.ansible.com/t/cant-start-httpd-service-on-redhat-linux-using-ansible-complaining-about-syntax-errror/19224/2 "2015-09-10T10:13:23Z")

</div>

I think I spotted the error:

`  
become\_user: root

`

it should have been ☹
