Displaying 20 results from an estimated 30000 matches similar to: "Accessing a file source from a custom function"
2013 Jun 11
2
hiera data bindings and template()
Hi,
I''m using Puppet 3.2.1 and heavily relying on hiera data bindings.
I have the following situation:
class software (
$my_content = undef,
) {
file { ''/path/to/file'':
content => $software::my_content,
}
}
in hieradata/software.yaml (hiera.yaml seems ok):
software::my_content: template(''mymodule/myfile.erb'')
With this configuration I
2008 Dec 09
1
Custom package install best practices
Is there a "best practice" way to install custom packages--i.e., not from
the standard repository, but from a stand-alone .deb, .rpm, .tgz file,
etc.? Off the top of my head, I can think of creating a definition that
uses arguments for filename, version, etc., but I''m interested in what
others have done or recommend.
Regards,
Casey
2012 Jul 09
1
Custom ruby modules/classes, standard namespacing, pluginsync, etc.
still pretty new to Ruby, please bare with me :) Say I have a module
with a custom type, structured like so:
[modules]/mymodule/manifests/init.pp
[modules]/mymodule/lib/puppet/provider/mytype/foo.rb
[modules]/mymodule/lib/puppet/type/mytype.rb
In foo.rb, I''d like to call some custom ruby functions in a module and/
or class. These are generic functions that may be used in other
modules,
2012 Sep 28
2
nested modules and autoloading
All-
I''m using puppet 2.7.14. I''ve reviewed
http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html
but it doesn''t seem to cover what I''m attempting.
Consider a module layout like this:
$ tree mymodule
mymodule
|-- Modulefile
|-- README
|-- manifests
| |-- init.pp
| |-- special_type
| | `-- prereqs.pp
| `-- special_type.pp
2013 Dec 02
1
Class parameter flexibility with ENC, hiera or both
Dear puppetteers,
I am having a philosophical question about parametrized classes.
When building modules, one wants to be as flexible as possible, to try
to target as many puppet flavors as possible. This is our target:
- Foreman users, using foreman as an ENC with smart variables (or
potentially any other ENC, but I would say this is the most widespread one).
- Pure Puppet''s site.pp
2008 Nov 24
2
Understanding the docs
Ok, I''ve been reading and I have some questions about best practices:
I understand that modules are to be self contained blocks that i can
just drop in. Using best practices, how does this fit into the naming
scheme?
Classes are singletons. I think i understand this. I''ve been
defining classes in /etc/puppet/classes, but then how does this relate
to any modules i might want
2013 Jan 18
3
Puppet 2.6 - Custom functions - environments issue
Hello every one,
I have looked at a lots of threads in the Puppet User group but I did not
find a clear answer or explanation how custom functions work....
Here is my current setup :
* I have *2 "environments"*. working fine
/etc/puppet/environments/production/
/etc/puppet/environments/test/
* I have a version of my function already working in production
* According to the
2003 Nov 01
0
@ERROR: access denied / using rsync 2.5.6 over SSH on Solaris
Dear list members,
this is very similar to a problem which has been discussed last summer
on the list, but there was no final solution then (as far as I could
follow the thread of messages). Would you please take a look at my
problem, to see if I'm missing something?
Here is the useful data:
* Purpose: using rsync over SSH as a non-anonymous file server to
transfer files between two
2008 Nov 13
4
Moving a file with Puppet
I wanted to move a file from one directory to another because my co-
worker didn''t like where it was being put by puppet. I went into
puppet and changed the name parameter of the the file directive. I
then created a new file directive to delete the old file, but I was
wondering if there was a better way to do this.
So, just to clarify, I went from:
file {"myfile":
name
2010 Aug 31
3
File selection for template() similar to source
I want to be able to have Puppet determine which file to use as the
source of a template() call in a manner similar to the source
parameter.
Basically, I want to have a file resource that will use the most
appropriate file for a template. While I can do:
file { "file.conf" :
source => [ "puppet:///module/file.conf.${hostname}",
2012 Aug 17
8
Class Naming Convention
So, this has always puzzled me a bit. By convention, init.pp contains
one class, named the same as the module. However, what is the
convention when the module may have multiple external access points?
Say you have a module called ''syslog'' which provides both a client and
a server class. I typically have used syslog::server and
syslog::client. I''ve ended up using this
2013 Mar 15
3
advice on module organization
Hi Folks,
Like to get some advice on module organization. I have a system that has a
few different components. One or more components can be installed on a
host. The hosts also have a "type" dimension. This "type" dimension could
(should) ideally be used to configure the system (fill in a bunch of
variables). Problem is, I''m not sure how the best way to do
2012 Dec 27
3
generate() function help
Hi.
I want to run script which is distributed with my module, but the
problem is I have to then hardcode the path to the script in the
generate function call, for example:
generate("/etc/puppet/environments/${environment}/modules/mymodule/scripts/myscript")
But what If some other site uses other path to their modules, or doesn''t
use environments at all? Is it possible
2010 Jun 23
3
Custom default form builder in Rails 3
Hello everyone,
I am trying to set a default custom form builder.
I have defined my form builder class in "lib/mymodule/mybuilder.rb"
as:
module Mymodule
class Mybuilder < ActionView::Helpers::FormBuilder
......
end
end
Then I am trying to use this custom class in application.rb as
config.action_view.default_form_builder = Mymodule::Mybuilder. But I
get "Uninitialized
2011 Jul 26
2
Best practices for confidential information -- fileserver path vs modules / template
We keep our puppet configuration in a revision control system and are
trying to facilitate developers using the same modules as production/
staging servers.
We define a variable ($servergroup) as test/staging/production and use
fileserver defaults from hostname to servergroup to generic. The
hostname and $servergroup versions need to be confidential. We have
modules specific to an application,
2013 Nov 05
1
[LLVMdev] Thread-safe cloning
Sorry to resurrect an old thread, but I finally got around to testing
this approach (round tripping through bitcode in memory) and it works
beautifully - and isn't that much slower than cloning.
I have noticed however that the copy process isn't thread-safe. The
problem is that in Function, there is lazy initialization code for
arguments:
void CheckLazyArguments() const {
if
2010 Mar 03
6
File paths must be fully qualified
I was using Puppet 0.24.8 and now upgrade the puppet server and client
both to 0.25.4 (on 1 machine i.e. server and client), but i am facing
some problems. While testing, some of the configs which were/are running
fine on older version generates error here;
for instance,
i have defined the FileSource path in ''/etc/puppet/fileserver.conf''
[myFileSrc]
path
2013 Aug 20
2
How to handle apt-get -f install -y with Puppet
Hi All,
I''m trying to install packages using the dpkg provider on Ubuntu that leave
the package unconfigured because of missing dependencies. After installing
all packages, I need to run "apt-get -f install -y" to fix the
dependencies. Now with puppet I did not find a way to do so yet.
I''m trying to do the following:
......
package { "mypackage":
2014 May 15
2
vi : unable to copy text to other file
Hello All,
I'm trying to use vi commands instead of using the mouse.
I open Gnome-Terminal
I open a file : vi /home/jvermeulen/.ssh/id_dsa.pub
I select the key with " V " ( visual line )
I type " y " to yank the selected line.
I can now use
:e otherfile.txt
and paste the text in otherfile.txt
This is the only way I succeed in copying text to another file in
2011 Jan 17
4
DO NOT REPLY [Bug 7922] New: rsync not using delta blocking when the source file different to partial file.
https://bugzilla.samba.org/show_bug.cgi?id=7922
Summary: rsync not using delta blocking when the source file
different to partial file.
Product: rsync
Version: 3.0.7
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P3
Component: core
AssignedTo: wayned at