Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service module should not have state required #755

Closed
pas256 opened this issue Aug 1, 2012 · 1 comment
Closed

service module should not have state required #755

pas256 opened this issue Aug 1, 2012 · 1 comment

Comments

@pas256
Copy link
Contributor

pas256 commented Aug 1, 2012

According to:
http://ansible.github.com/modules.html#service
state is not required, yet the code thinks it is.

Modify the service code so that state is not required.

Be careful to not make state have a default either. Sometimes you want to just enable a service without modifying its state

service name=ntp enable=on
@sfromm
Copy link
Contributor

sfromm commented Aug 1, 2012

i can take a look

mpdehaan pushed a commit that referenced this issue Aug 1, 2012
Allow use of service module with just enable parameter, per issue #755.
Also fixed two other issues:
- fixed parameter to be 'enabled' per docs, not 'enable'.
- fixed if block that checks whether to run _do_enable() to check
  whether the parameter is set, not the value of the enable value which
  may be None or False.  If enabled=no, the service would never be
  disabled.
@mpdehaan mpdehaan closed this as completed Aug 1, 2012
@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants