Re: [Puppet Users] Doubt while using the "--edit" option to start service

Ryan Coleman
Thu, 19 Jul 2012 18:26:12 -0000

On Thu, Jul 19, 2012 at 11:01 AM, Abhijeet R <abhijeet.1989@gmail.com>
wrote:
> Hi,
>
> So, this is my first time using puppet. I was reading the introduction
given
> on the official website here. http://docs.puppetlabs.com/learning/ral.html
>
> The page has mentioned that using the "--edit" option, I can
change a
> resouce. So, to test that, I did,
>
> $service puppetmaster start
> $service httpd stop #To stop the httpd service
> $#"puppet resource service httpd" shows it as stopped.
> $#I do a puppet resource httpd --edit & change the ensure to
"running" in
> the editor.

Hi,

Is this just a typo? Did you actually run ''puppet resource service
httpd --edit'' The service word is important.

Also, if you''re using Puppet 2.6, you''ll likely want to
provide the
hasstatus parameter with the value of true. This instructs Puppet to
use the  status command of the softwares init script. In Puppet 2.7
and later, the default value to hasstatus changed to true.

$ puppet resource service httpd --edit
service { ''httpd'':
  ensure     => running,
  hasstatus => true,
}

Reference: http://docs.puppetlabs.com/references/latest/type.html#service

>
> Even after executing the above command, I still have the httpd service
> stopped. Is this the expected bahavior or may be I understood something
> wrong?
>
> --
> Regards,
> Abhijeet
> http://blog.abhijeetr.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



--
Ryan Coleman | about.me/ryc
Modules & Forge @ Puppet Labs

--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at