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

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