u can use it with inline_template():
file {
"/etc/snmpd.conf":
ensure => "present",
content => inline_template(
file(
"puppet:///modules/snmp/snmpd.conf.$::hostname.erb",
"p
Did I miss the part where it was determined that having one class
require the other one(s) didn't work?
* Disconnect [2011/07/07 14:57]:
> On Thu, Jul 7, 2011 at 2:10 PM, Keith Minkler wrote:
> > > This use case comes up a lot. There are some functions but
> > > historically they have not been r
* David Kavanagh [2011/07/21 16:10]:
> I need to convert a value from facter to lower case for inclusion
> in a path. Is there a built-in function for that?
$ cat /tmp/foo.pp
$foo = "STUFF"
$foo_l = inline_template("<%= foo.downcase %>")
notice("$foo -> $foo_l")
$ puppet /tmp/foo.pp
;
content => template("app/init.php.erb");
}
If you use source, it evaluates the template, then looks for a file with
that name. I've been bitten by that many times as I change things from
files to templates.
--
Darren Chamberlain
--
You received thi
asses.
$operatingsystem is a facter variable, of course. How are these
supposed to be referenced?
--
Darren Chamberlain
--
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.
On 8/18/2011 12:08 PM, Gary Larizza wrote:
On Thu, Aug 18, 2011 at 9:06 AM, Darren Chamberlain wrote:
> $operatingsystem is a facter variable, of course. How are these
> supposed to be referenced?
They're referenced like this: $::operatingsystem
This works, thanks.
While I hav
It's been a while since you asked this, but I didn't see a followup;
forgive the noise if you've already got an answer.
Wolf Noble posted a solution to this problem
in September that I've been holding onto because I think it's
elegant:
* Wolf Noble [2011/09/01 18:45]:
> Here's what I've bee
have a fallback. Note that you can use any facts
in there, so stuff like $operatingsystem, $operatingsystemrelease,
and $kernel are available.
--
Darren Chamberlain
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, sen
ments, but have a fallback. Note that you can use any facts
> in there, so stuff like $operatingsystem, $operatingsystemrelease,
> and $kernel are available.
--
Darren Chamberlain
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" grou
* James Cammarata [2010/05/28 10:09]:
> My primary motivation for this is something like sudoers, where
> certain system roles require sudoers commands for different groups
> to use.
But sudoers has native support for exactly this use case, in that
you can assign permissions based on host as well
* noob-puppeteer [2010/07/01 18:00]:
> I must be missing something with how puppet.conf works.
>
> I have configured puppet.conf like so:
> [main]
> vardir = /var/xyz/puppet
>
> I have a very simple site.pp
>
> file { "$vardir/touch":
> ensure => present,
> }
>
> I am running puppet 0
* hernan [2010/06/30 17:02]:
> I'm building a puppet manifest for an Ubuntu machine that needs to
> have both of these on it:
>
> package { "memcached":
> provider => gem,
> ensure => "0.18.0"
> }
>
> package { "memcached":
> provider => apt,
> ensure => installed
> }
I
Since you're using the same three NTP servers, couldn't you just
copy ntp.conf from a fileserver?
* altimon [2010/07/12 16:35]:
> Hi Rob and ALL,
>
> Unfortunately,
>
> following pp file creating 1st instances and then are adding new
> ( I've tried just one ntp1 or triad ntp1,2,3 )
>
> class n
* Ahmed El Gamil [2010/08/18 17:17]:
> I was working on some puppet recipe and came to the need where i
> want to download a file from an HTTP server, usually i use the
> "file" resource type with the "source" parameter to push files to
> the clients, but in this situation i just need to download
* Stefan Schulte [2010/08/23 10:56]:
> Maybe the best approach is to have a definition that will figure
> out the right owner and group by looking at the opertingsystem and
> the path of the file (like 'all files under /etc/ should have
> root:sys under solaris und bin:bin under HP-UX).
I solved
s
passed through is \$HeadURL.
Thus, this is untested speculation, but it can't hurt to try:
diff_args = -ubB -I \\\$HeadURL
--
Darren Chamberlain
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, sen
* Martijn Grendelman [2010/08/31 22:02]:
> What I would like, is for Puppet to run `aptitude update` before
> it installs or upgrades packages. That doesn't seem out of the
> ordinary to me, but I can't make it work in Puppet.
I would do the `aptitude update` in cron, outside of puppet, and
manag
I do this kind of thing in a few places, for things like different
or specific versions of mysql, tomcat, libraries, and so on. I use
a define to wrap this up, and the declare is called from within the
node defitions. A simplified example of our method:
define install ($version) {
package
* Nan Liu [2010/09/15 12:08]:
> Check some hard coded path, and tries to detect if it's available in $PATH
> using which:
>
> case
> when File.executable?("/opt/NSBglassfish/bin/asadmin")
> commands :asadmin => "/opt/NSBglassfish/bin/asadmin"
> when File.executable?("/usr/local/NSBglassfish/bin
* Nigel Kersten [2010/09/15 12:30]:
> On Wed, Sep 15, 2010 at 12:25 PM, Darren Chamberlain
> wrote:
> > I have no comment on the general approach, but just wanted to point
> > out that checking $? doesn't necessarily work everywhere:
> >
> > $ uname -a
* Darren Chamberlain [2010/09/15 15:41]:
> * Nigel Kersten [2010/09/15 12:30]:
> > Does 'type --all asdf' do the right thing on SunOS ?
>
> $ uname -a ; /bin/type --all asdf ; echo $?
> SunOS smacky 5.10 Generic_142900-03 sun4v sparc SUNW,Sun-Fire-T200 Solari
* Daniel Maher [2010/09/23 18:36]:
> Consider :
>
> s...@abc$ facter | grep domain
> domain => abc.dom.ain
>
> s...@xyz$ facter | grep domain
> domain => xyz.dom.ain
>
> Thus i would like a template "resolv.conf.erb" :
>
> search <%= site_name =>.dom.ain
Why not use:
search <%= domain %>
?
We're not using a puppetmaster, so we're collecting info on runs via
syslog and puppet -v:
puppet -v /path/to/manifest.pp | logger -t puppet
And then we're using a splunk-alike to run ad-hon reports on the
logs.
* Tim Lank [2010/09/24 06:52]:
> I'm trying to find a way to obtain the stdout (a
According to
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/head/userdefs.h#118,
an exit status of 1 means No permission. (See
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/oamuser/user/useradd.c
for the source to useradd.)
* nickt [2010/10/14 12:32]:
> Thu Oct
thing on
> Solaris? Give puppet user permissions to execute useradd via ACL/
> roles or something?
>
> On Oct 14, 2:50 pm, Darren Chamberlain wrote:
> > According
> > tohttp://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/head/us...,
> > an exit status o
* Richard Crowley [2010/10/22 08:57]:
> > We're writing a few scripts at the moment that could really make
> > use of Facter, however the vast majority of them team (including
> > my self!) are not proficient in Ruby, however they are highly
> > proficient in other languages such as (dare I say it
It sure sounds like you need to be distributing a canonical
/etc/passwd, /etc/shadow, and /etc/groups on every puppet run.
* hywl51 [2010/11/04 03:11]:
> Yes, you said it. Unfortunately, we have some users running as
> root privilege on server, because they cann't work without it.
>
> But we do
* Bruce Richardson [2010/11/05 09:01]:
> [...] If developers, then there is always a way round - sudo,
> fakeroot, giving them virtual hosts to play with.
I'd like to second the virtual host suggestion -- throwaway VMs (or
zones, in solaris) work really well for this kind of situation.
Additiona
* ericlee748 [2010/11/10 14:09]:
> I have a large hierarchy of files that are set up to recursively
> copy from my puppet master. It takes a long while to copy these
> files over to the clients - roughly 1 hour. Only 1 or 2 files in
> the hierarchy will ever change. Is there a better way to do wha
* Sans [2011/06/13 02:21]:
> Any suggestion from anyone else? Is there a way to check "if a
> directory (or file) already exists, then do something" in Puppet?
> Cheers!!
I use this pattern:
$_exists = inline_template("<%= File.exists?('$f') %>")
case $_exists {
"true": { ... }
"
:59]:
> I'm looking for a way to determine the number of characters in a
> string/variable. I've tested some of the ruby length functions, but no
> luck. Has anyone done this before?
--
Darren Chamberlain
--
You received this message because you are subscribed to the Google Grou
rc/ChelsioUwire-1.0.2.26
> make KDIR=/usr/src/linux-headers-2.6.32-41]/returns: change from notrun to
> 0 failed: /usr/src/ChelsioUwire-1.0.2.26 make
> KDIR=/usr/src/linux-headers-2.6.32-41 returned 1 instead of one of [0] at
> /etc/puppet/modules/install-lei_chelsio_driver/manifes
32 matches
Mail list logo