Displaying 20 results from an estimated 59 matches for "hasrestart".
2010 May 21
3
SSH service not getting restarted
...tc/ssh/sshd_config":
unless => "grep ''Banner /etc/motd'' /etc/ssh/sshd_config 2>/dev/
null" }
service
{ sshd:
ensure => running,
subscribe => File["/etc/ssh/sshd_config"],
hasrestart => true,
hasstatus => true,
restart => "/etc/init.d/sshd restart",
status => "/etc/init.d/sshd status"
}
}
--
You received this message because you are subscribed to the Google Groups "Puppet Users"...
2008 Dec 24
3
Conditionals allowed within types?
Hello,
I''m trying to do this:
service { monit:
ensure => running,
enable => true,
hasrestart => true,
if ($operatingsystem == ''centos'') {
hasstatus => true,
},
require => Package[''monit''],
subscribe => File[''monit.conf''],
}
And it doesn''t work in 24.6. Perhaps setting the variabl...
2009 Aug 30
3
restart puppetmaster when files change
...in order to restart puppetmaster daemon
after /etc/puppet/puppet.conf file change.
class pmaster {
file { "/etc/puppet/puppet.conf":
ensure => "file";
}
service { "puppetmaster":
ensure => "running",
enable => "true",
hasrestart => "true",
subscribe => File [ "/etc/puppet/puppet.conf" ]
}
BUT I have a lot of modules and files inside /etc/puppet folder.
My question is:
What if I want to restart puppetmaster daemon if any file inside /etc/
puppet change?
regards,
Israel.
--~--~---------~--...
2009 Nov 04
2
Using before=> in a definition...
...reate_jboss_inst($inst, $version, $naming_port) {
....
service {
"jboss-$inst":
require => [ Package["jboss-server"],
Package["jboss-server-$inst"] ],
ensure => running,
enable => true,
hasrestart => true,
hasstatus => true
}
....
}
class jboss {
....
file {
"/some/file.xml":
source => "puppet://$server/jboss/conf/some/file.xml"
}
....
}
jboss_inst { tfel0: inst => "tfel0", version => $jb...
2007 May 25
18
services do not get restarted
...server). The init script is
located in /etc/init.d/nagios-nrpe-server.
Here is the code snip of the manifest:
file { "/etc/nagios/nrpe.cfg":
notify => service[nagios-nrpe-server],
require => Package["nagios-nrpe-server"],
}
service { nagios-nrpe-server:
hasrestart => true
}
on any changes in nrpe.cfg the files get synced on the puppet
client and puppetd writes out the following messages when
running in debug mode:
info: Filebucket[/var/lib/puppet/clientbucket]: Adding
/etc/nagios/nrpe.cfg(d74c3c576cbc9c400407f679af44ed0e)
info:
//base/nagios/remotef...
2013 Nov 16
4
frustrating dependency problem
...package{ "test":
ensure => running,
notify => Foo::Myservice[''test''],
}
}
services.pp
define foo::myservice($service = $title) {
service { "$service":
enable => true,
hasstatus => true,
hasrestart => true,
}
}
So, you can see my goal is to have a single defined service function that
takes a service "name" as a parameter and then I can notify it with
different services names.
But, I keep getting this:
Error: Failed to apply catalog: Could not find dependent
Foo::Myservi...
2011 Nov 02
2
Class Including.
...39;s all working except that it
appears that splunkforwarder::common isn''t including
splunkforwarder::enabled...
class splunkforwarder::enabled {
service {
''splunkforwarder'':
ensure => running,
enable => true,
hasrestart => true,
hasstatus => true;
}
}
class splunkforwarder::common {
include splunkforwarder::enabled
}
class splunkforwarder::app_server inherits splunkforwarder::common {
# stuffs
}
Doug.
--
Regards,
Douglas Garstang
http://www.linkedin.com/in/garstang
Email: dou...
2010 Jun 17
5
Could not find class, code-blind
...nt.pp
| |-- common.pp
| |-- init.pp
| `-- rhn.pp
A `cat'' from each manifest file:
client.pp::
class rhnds::client inherits rhnsd::common {
service { "rhnsd":
ensure => running,
enable => true,
hasrestart => true,
hasstatus => true,
require => [ Package["rhnsd"], File["/etc/
sysconfig/rhn/up2date"] ],
subscribe => File["/etc/sysconfig/rhn/up2date"],
}
}
common.pp::
class rhnds...
2012 Aug 06
4
Could not evaluate: Could not retrieve information from environment production source(s) for one module, for other is ok
...#39; {
package { ''ntp'':
ensure => present,
}
service { ''ntp'':
ensure => ''running'',
enable => ''true'',
hasrestart => ''true'',
require => Package[''ntp'']
}
file { "/etc/ntpd.conf":
owner => "root",
group => "root",
mode => 0644,...
2013 Mar 11
3
Restructure puppet modules
...;nginx", "python-virtualenv", "rsync", "autossh", "redis-server",
"git-core", "python-dev", "ntp"]:
ensure => installed}
service { ''nginx'' :
ensure => "running",
enable => true,
hasrestart => true,
require => Package["nginx"]
}
Now there are many issues with the current setup, where the first is we
are not really managing our servers, but we can only provision them..
The second big problem is that there is a lot of repetition everywhere
and the third is that I ca...
2013 Oct 24
2
SSH Module with multiple conditions
...roup => ''root'',
mode => 0440,
source => "puppet:///modules/ssh/ssh_config",
require => Class["ssh::install"],
}
}
class ssh::service {
service { $ssh::params::ssh_service_name:
ensure => running,
hasstatus => true,
hasrestart => true,
enable => true,
require => Class["ssh::config"],
}
}
class ssh
{
include ssh::params, ssh::install, ssh::config, ssh::service
}
Here are the configuration files under the file files directory...
[root@puppet ssh]# find files
files
files/default-config-x-ss...
2010 Mar 02
2
Nagios based on David Schmitt's Complete Config : variables are empty
...#39;', ''nagios-plugins-basic'' ]:
ensure => installed,
before => Package[''nagios''];
}
service {
''nagios3'':
alias => ''nagios'',
ensure => running,
hasstatus => true,
hasrestart => true,
}
file {
"$nagios_cfgdir/htpasswd.users":
content => "admin:QqtpoTN5OGzmA",
mode => 0640,
owner => root,
group => www-data,
}
File <<| tag == ''nagios'' |>>
define host($ip= $fqdn, $short...
2013 Jan 19
3
Does a service resource autorequire its package resource?
...rger overall manifest and I''m commissioning a new system.
class tftp_server {
package { ''tftpd-hpa'':
ensure => installed,
}
service { ''tftpd-hpa'':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
}
file { ''/srv/tftp'':
ensure => ''directory'',
owner => ''root'',
group => ''root'',
mode => ''0644'',
require => Package[''tftpd-hpa''],...
2012 Feb 12
1
Using templates
...I have created module ssh:
content of modules/ssh/manifests/install.pp
class ssh::install {
package { "ssh":
ensure => present,
}
}
content of modules/ssh/manifests/service.pp
class ssh::service {
service { "ssh":
ensure => running,
hasstatus => true,
hasrestart => true,
enable => true,
require => Class["ssh::config"],
}
}
content of modules/ssh/manifests/config.pp
define ssh::config( $port = 22 ) {
file { "/etc/ssh/sshd_config":
ensure => present,
owner => ''root'',
group => ...
2011 Oct 13
1
puppet apache module
.../etc/puppet/modules/apache/manifests/init.pp
class apache
{
include apache::install, apache::service
}
/etc/puppet/modules/apache/manifests/service.pp
class apache::service
{
service
{
''apache2'':
ensure => true,
hasstatus => true,
hasrestart => true,
enable => true,
require => Class["apache::install"],
}
}
/etc/puppet/modules/apache/manifests/install.pp
class apache::install
{
package
{
[''apache2'']:
ensure => present,
}
}
/etc/puppet/manifests/no...
2011 Mar 15
5
apache service start problem
...uot;],
source => "puppet:///apache/krome/httpd/conf.d/welcome.conf"
}
tidy { "/etc/httpd/conf.d/ssl.conf":
age => ''0s'',
}
service { "httpd":
enable => "true",
ensure => "running",
hasrestart => "true",
hasstatus => "true",
require => [ Package["httpd.$architecture"],
Tidy["/etc/httpd/conf.d/ssl.conf"] ]
}
}
Thanks guys!!!
Tim
--
GPG me!!
gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
You received this me...
2011 Dec 20
8
Network config module won't work. -Mac address errors
...#39;root'',
mode => ''644'',
content => template("basehost/ifcfg-eth0.erb"),
notify => Service[network],
}
service { network:
ensure => "running",
hasstatus => "true",
hasrestart => "true",
restart => "/etc/init.d/network restart",
}
}
hosts.erb
----------------------------
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain loca...
2008 Jan 04
4
Help with custom class.
Here is my class
class puppetconf {
file { "/etc/puppet/puppetd.conf":
mode => 644,
owner => root,
group => root,
source => "puppet://puppet/cci/etc/puppet/puppetd.conf",
notify => exec[puppet_restart]
}
file { "/etc/init.d/puppet":
mode => 755,
owner => root,
group => root,
2008 Apr 07
2
CentOS, Postgres init and puppet
...subscribe => [ Package[postgresql] ],
}
package { "postgresql" : ensure => present }
service { postgres:
name => postgresql,
ensure => stopped,
subscribe => [ File[pg_hba_conf], Package[postgresql] ],
enable => false,
hasrestart => true,
pattern => postgres
}
}
The problem is, on a CentOS box, postgres must be run with the
distro-supplied pg_hba.conf for the init process to work properly.
Thereafter, pg_hba.conf can be replaced appropriately. At this point,
I''m thinking I need to use something...
2012 Feb 14
7
inherits from parametrized class
Hello
In is possible inherits from parametrized class??
For example i have base php52 class like this:
class linux::php52($pools, $extensions='''') inherits linux
{
......
}
and whants to inherit it like this:
class linux::php52::cluster inherits linux::php52
for cluster configuration (cluster stuff -f for example prevent php from
automatic startup), and
class