# service module does not allow to change the rc.d priority level

**URL:** <https://forum.ansible.com/t/service-module-does-not-allow-to-change-the-rc-d-priority-level/18691>\
**Category:** Ansible Project\
**Created:** [July 6, 2015, 7:04pm UTC](https://forum.ansible.com/t/service-module-does-not-allow-to-change-the-rc-d-priority-level/18691 "2015-07-06T19:04:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florian\_Dambrine](https://avatars.discourse-cdn.com/v4/letter/f/f17d59/32.png) [@Florian\_Dambrine](https://forum.ansible.com/u/Florian_Dambrine)\
**Post date:** [July 6, 2015, 7:04pm UTC](https://forum.ansible.com/t/service-module-does-not-allow-to-change-the-rc-d-priority-level/18691/1 "2015-07-06T19:04:38Z")

</div>

Hey folks,

I have a quite common use case where I want to manage rc levels for a specific init.d script (In that case tomcat). I did not find a way to change the priority of the init script with the service module.

Right now if I do:

- name: Enable Tomcat to start at boot time  
service: name=tomcat enabled=yes

The only thing that the module does is creating the following links:

- /etc/rc0.d/K20tomcat

- /etc/rc1.d/K20tomcat

- /etc/rc2.d/S20tomcat

- /etc/rc3.d/S20tomcat

- /etc/rc4.d/S20tomcat

- /etc/rc5.d/S20tomcat

- /etc/rc6.d/K20tomcat

What I would like to do is the following:

- name: Enable Tomcat to start at boot time (top level application)  
shell: \>  
update-rc.d tomcat defaults 98 02

- /etc/rc0.d/K02tomcat

- /etc/rc1.d/K02tomcat

- /etc/rc2.d/S98tomcat

- /etc/rc3.d/S98tomcat

- /etc/rc4.d/S98tomcat

- /etc/rc5.d/S98tomcat

- /etc/rc6.d/K02tomcat  
Am I missing something with the service module? Is there an other module I can use in order to achieve that operation?

Thanks
