Hi all,
I''ve got modules for NGINX and PHP-FPM which are working fine, the
issue
I''m running into is that quite often NGinx will start before php-fpm is
even installed.
I''m wondering if there''s a way in the nginx module to
"Require" the
PHP-FPM service is started as a dependency of the nginx service,
something like the following:
class nginx {
	service { ''nginx'':
		require => Service[''php-fpm::php-fpm''],
		running => true;
	}
}
Is this possible in puppet 0.25 on CentOS?
Thanks in advance,
Matt
-- 
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.
On Sun, May 22, 2011 at 11:06 PM, Matthew Macdonald-Wallace < lists@truthisfreedom.org.uk> wrote:> Hi all, > > I''ve got modules for NGINX and PHP-FPM which are working fine, the issue > I''m running into is that quite often NGinx will start before php-fpm is > even installed. > > I''m wondering if there''s a way in the nginx module to "Require" the > PHP-FPM service is started as a dependency of the nginx service, > something like the following: > > class nginx { > > service { ''nginx'': > require => Service[''php-fpm::php-fpm''], >if the name of the service is php-fpm, you can just reference it as: service { ''nginx'': require => Service[''php-fpm''] } in general though, it is a little more maintainable to specify inter-module deps at the class level: service { ''nginx'': require => Class[''php''] }> running => true; > } > } > > Is this possible in puppet 0.25 on CentOS? > > Thanks in advance, > > Matt > > -- > 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. > >-- 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.
On Sun, May 22, 2011 at 11:06 PM, Matthew Macdonald-Wallace < lists@truthisfreedom.org.uk> wrote:> Hi all, > > I''ve got modules for NGINX and PHP-FPM which are working fine, the issue > I''m running into is that quite often NGinx will start before php-fpm is > even installed. > > I''m wondering if there''s a way in the nginx module to "Require" the > PHP-FPM service is started as a dependency of the nginx service, > something like the following: >There''s also the ''require'' function which does an include and sets up Class <-> Class relationships.> > class nginx { > > service { ''nginx'': > require => Service[''php-fpm::php-fpm''], > running => true; > } > } > > Is this possible in puppet 0.25 on CentOS? > > Thanks in advance, > > Matt > > -- > 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. > >-- Nigel Kersten Product, Puppet Labs @nigelkersten -- 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.
I have a similar problem I can''t seem to solve...here''s what
I''m
trying to do.
I have two modules, backuppc_client and sudo.  Right now I have a node
variable that I assign to each node that is used in the sudo module''s
template to add the necessary entry.  For example....
---manifests/node.pp
node ''client1'' {
        $backuppc_sudocmd = "backupuser ALL=NOPASSWD: /usr/bin/rsync"
        include baseclass
        include backuppc_client::base
}
---modules/sudo/templates/sudoers.erb has...
<% if has_variable?("backuppc_sudocmd") then %>
<%= backuppc_sudocmd %>
<% end %>
Is there a way for the sudo module to find out or be aware if a client
has the "include backuppc_client" in their definition?  Basically
I''d
like the backuppc_client module''s to alter the contents of sudoers
file which I can''t imagine how to do as sudoers is defined by the sudo
module which is part of baseclass and applied to all systems.
Thanks
- Trey
On May 23, 10:11 am, Nigel Kersten <ni...@puppetlabs.com>
wrote:> On Sun, May 22, 2011 at 11:06 PM, Matthew Macdonald-Wallace <
>
> li...@truthisfreedom.org.uk> wrote:
> > Hi all,
>
> > I''ve got modules for NGINX and PHP-FPM which are working
fine, the issue
> > I''m running into is that quite often NGinx will start before
php-fpm is
> > even installed.
>
> > I''m wondering if there''s a way in the nginx module
to "Require" the
> > PHP-FPM service is started as a dependency of the nginx service,
> > something like the following:
>
> There''s also the ''require'' function which does
an include and sets up Class
> <-> Class relationships.
>
>
>
>
>
>
>
>
>
>
>
> > class nginx {
>
> >        service { ''nginx'':
> >                require =>
Service[''php-fpm::php-fpm''],
> >                running => true;
> >        }
> > }
>
> > Is this possible in puppet 0.25 on CentOS?
>
> > Thanks in advance,
>
> > Matt
>
> > --
> > 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.
>
> --
> Nigel Kersten
> Product, Puppet Labs
> @nigelkersten
-- 
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.
On May 24, 2011, at 7:58 PM, treydock wrote:> I have a similar problem I can''t seem to solve...here''s what I''m > trying to do. > > I have two modules, backuppc_client and sudo. Right now I have a node > variable that I assign to each node that is used in the sudo module''s > template to add the necessary entry. For example.... > > ---manifests/node.pp > node ''client1'' { > $backuppc_sudocmd = "backupuser ALL=NOPASSWD: /usr/bin/rsync" > > include baseclass > include backuppc_client::base > } > > ---modules/sudo/templates/sudoers.erb has... > > <% if has_variable?("backuppc_sudocmd") then %> > <%= backuppc_sudocmd %> > <% end %> > > > Is there a way for the sudo module to find out or be aware if a client > has the "include backuppc_client" in their definition? Basically I''d > like the backuppc_client module''s to alter the contents of sudoers > file which I can''t imagine how to do as sudoers is defined by the sudo > module which is part of baseclass and applied to all systems.First, do you have a "/etc/sudoers.d/" directory? That would make things much easier. If not, you might want to look into "puppet_concat" which allows you to build "fragments" that can be templated to build your file. -- 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.
I don''t have that directory.  However I came across this module
https://github.com/camptocamp/puppet-sudo which among many things
enlightened me to the new feature in sudo-1.7.2+ of using includedir
and /etc/sudoers.d that you mentioned.  Everything I am using is
defined there except now my backuppc_client module has this...
        sudo::directive { "backuppc":
                ensure  => present,
                source  => "puppet:///modules/backuppc_client/
backuppc_sudocmd",
        }
The backuppc_sudocmd file contains the sudo lines.
Thanks!
- Trey
On May 24, 11:00 pm, Patrick <kc7...@gmail.com>
wrote:> On May 24, 2011, at 7:58 PM, treydock wrote:
>
>
>
>
>
>
>
>
>
> > I have a similar problem I can''t seem to
solve...here''s what I''m
> > trying to do.
>
> > I have two modules, backuppc_client and sudo.  Right now I have a node
> > variable that I assign to each node that is used in the sudo
module''s
> > template to add the necessary entry.  For example....
>
> > ---manifests/node.pp
> > node ''client1'' {
> >        $backuppc_sudocmd = "backupuser ALL=NOPASSWD:
/usr/bin/rsync"
>
> >        include baseclass
> >        include backuppc_client::base
> > }
>
> > ---modules/sudo/templates/sudoers.erb has...
>
> > <% if has_variable?("backuppc_sudocmd") then %>
> > <%= backuppc_sudocmd %>
> > <% end %>
>
> > Is there a way for the sudo module to find out or be aware if a client
> > has the "include backuppc_client" in their definition?
 Basically I''d
> > like the backuppc_client module''s to alter the contents of
sudoers
> > file which I can''t imagine how to do as sudoers is defined by
the sudo
> > module which is part of baseclass and applied to all systems.
>
> First, do you have a "/etc/sudoers.d/" directory?  That would
make things much easier.  
>
> If not, you might want to look into "puppet_concat" which allows
you to build "fragments" that can be templated to build your file.
-- 
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.
Glad to hear it worked. On May 24, 2011, at 11:40 PM, treydock wrote:> I don''t have that directory. However I came across this module > https://github.com/camptocamp/puppet-sudo which among many things > enlightened me to the new feature in sudo-1.7.2+ of using includedir > and /etc/sudoers.d that you mentioned. Everything I am using is > defined there except now my backuppc_client module has this... > > sudo::directive { "backuppc": > ensure => present, > source => "puppet:///modules/backuppc_client/ > backuppc_sudocmd", > } > > The backuppc_sudocmd file contains the sudo lines. > > Thanks! > - Trey > > On May 24, 11:00 pm, Patrick <kc7...@gmail.com> wrote: >> On May 24, 2011, at 7:58 PM, treydock wrote: >> >> >> >> >> >> >> >> >> >>> I have a similar problem I can''t seem to solve...here''s what I''m >>> trying to do. >> >>> I have two modules, backuppc_client and sudo. Right now I have a node >>> variable that I assign to each node that is used in the sudo module''s >>> template to add the necessary entry. For example.... >> >>> ---manifests/node.pp >>> node ''client1'' { >>> $backuppc_sudocmd = "backupuser ALL=NOPASSWD: /usr/bin/rsync" >> >>> include baseclass >>> include backuppc_client::base >>> } >> >>> ---modules/sudo/templates/sudoers.erb has... >> >>> <% if has_variable?("backuppc_sudocmd") then %> >>> <%= backuppc_sudocmd %> >>> <% end %> >> >>> Is there a way for the sudo module to find out or be aware if a client >>> has the "include backuppc_client" in their definition? Basically I''d >>> like the backuppc_client module''s to alter the contents of sudoers >>> file which I can''t imagine how to do as sudoers is defined by the sudo >>> module which is part of baseclass and applied to all systems. >> >> First, do you have a "/etc/sudoers.d/" directory? That would make things much easier. >> >> If not, you might want to look into "puppet_concat" which allows you to build "fragments" that can be templated to build your file. > > -- > 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. >-- 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.