# ERROR! 'service' is not a valid attribute for a Play

**URL:** <https://forum.ansible.com/t/error-service-is-not-a-valid-attribute-for-a-play/31637>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [November 11, 2019, 7:19pm UTC](https://forum.ansible.com/t/error-service-is-not-a-valid-attribute-for-a-play/31637 "2019-11-11T19:19:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![morten\_hoffmann](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@morten\_hoffmann](https://forum.ansible.com/u/morten_hoffmann)\
**Post date:** [November 11, 2019, 7:19pm UTC](https://forum.ansible.com/t/error-service-is-not-a-valid-attribute-for-a-play/31637/1 "2019-11-11T19:19:43Z")

</div>

Hi

I’m trying to execute following dev01.yml playbook. Problem aer on machine02…I can’t find the appropriate code to stop a RHEL service on second server

- name: Stopping the OBIEE processes  
hosts: obiee  
remote\_user: {{remote\_user}}  
roles:

- loadenvironmentvariables

- shutdownservices

- service:

hosts: machine02  
become: yes  
name: nodemanager  
state: stopped

I have also tried this:

- name: Stop process  
hosts: machine02  
become: yes  
service:  
name: nodemanager  
state: stopped

It should be soooo simple, but it have been bugging me for hours 😃 what am I doing wrong?? what can’t I see ?

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [November 11, 2019, 7:22pm UTC](https://forum.ansible.com/t/error-service-is-not-a-valid-attribute-for-a-play/31637/2 "2019-11-11T19:22:02Z")

</div>

Calls to modules should be listed under a `tasks:` header:

- name: Stop process  
hosts: machine02  
become: yes  
tasks:
- service:  
name: nodemanager  
state: stopped
