search for: languagetutorial

Displaying 19 results from an estimated 19 matches for "languagetutorial".

2007 May 10
0
Rewritten Language Tutorial
The language docs have been languishing for ages, so out of disgust I consolidated the LanguageStructures and LanguageTutorial pages into a new, rewritten LanguageTutorial[1] page. Let''s consider this page the single page for all language explanation, and let''s do what we can to enhance and correct this page over time. I think the existence of two pages confused things before, so hopefully a sin...
2009 May 31
9
No more than one "instances" of a type in define()?
Hi folks, when I try to do something like: define railsproject($name, $uid, $gid, $userpass, $sqlpass) { mysql_database { "$name_staging": ensure => present } mysql_database { "$name_production": ensure => present} ....more stuff... } I get: Puppet::Parser::AST::Resource failed with error ArgumentError: Duplicate definition: Mysql_database[] is already
2007 Nov 02
2
Concatenate strings
Hi everyone. Mandatory disclaimer: New to puppet/clueless but learning/please don''t get fed up with me yet... Mandatory praise: Love puppet so far... Mandatory stupid first question: How do I concatenate a variable to an arbitrary string? ie. $someval="$hostname_prod_config" So if $hostname is "myserver", then $someval should result in
2008 Nov 08
2
Possible documentation error, around aliases?
...l metaparameters." But when I try (with Puppet 0.24.5 on Centos 5.2, courtesy of the dlutter packages) the following: define unzip (...) { exec { ... } if $alias { Exec[...]{ alias +> $alias } } unzip { ....: alias => "..." } As is inferred by the LanguageTutorial to work, and as does work for require, subscribe, etc., I get the following error message: Parameter alias failed: Munging failed for value ["unpack_opensso_war"] in class alias: Cannot add aliases without a catalog This is moderately annoying; I need to depend on the defini...
2007 Dec 13
10
multiple files with same attributes
I''m almost afraid to ask because this probably sticks out like a sore thumb on the wiki somewhere, and I''m just not seeing it. But I have a bunch of files with the same owner/mode. Is there a way to somehow collapse these, so that all I repeat is the file name? Example: file { "/opt/test/1": owner => "jtan", group =>
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
2007 May 24
2
Reusing definitions - need to pass variable in the title
...ode => 0644, content => template("issue_conf") } } Where you explicitly set the title of the definition to something unique, i.e. $path. I''m clearly still in the perl-programming mindset, but I thought that you could get away with the former (drawing on the LanguageTutorial wiki doc). What am I missing? Cheers, Derek ------------------------------------------------------------------------ For important statutory and regulatory disclosures and more information about Barclays Capital, please visit our web site at http://www.barcap.com. Internet communications are not...
2007 Dec 26
7
Thank you puppet!!
I''ve been hacking at puppet for the past week or two, and came up with some great stuff, but I''m wondering if there''s a way to tie it all together To create a virtual machine for our company''s QA environment, I''m currently doing 3 things: #create a vm node vmsvr2 inherits default { include vmserver vmserver::vm {
2008 Mar 22
6
pass Resources to a define or unsetting notify
Hi i''m trying to pass Resources (single or in an array) to a resource, so I can pass this to a notify or require. However I have some problems, when no resource should be passed. Maybe somebody can help me? thanks define gentoo::etcconfd ( $require = '''', $notify = '''' ){ file { "/etc/conf.d/${name}": owner =>
2007 Dec 27
2
Error when extending a resource parameter
...it.pp:22; cannot redefine at /etc/puppet/modules/vmware/manifests/init.pp:28 According to the wiki[1] it should work, unless i am misunderstanding it. Any ideas? Thanks, Ben # rpm -q puppet facter puppet-0.23.2-1.el5 facter-1.3.8-1.el5 [1] http://reductivelabs.com/cgi-bin/puppet.cgi/wiki/LanguageTutorial#classes _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
2007 Oct 29
12
Boolean expressions
I''m trying to write a wrapper definition for the file type to make it a bit smarter. I have a basic version working fairly well: define xfile($owner = root, $group = root, $mode = 644, $source, $backup = main, $recurse = false, $ensure = file) { file { $name: mode => $mode, owner => $owner, group => $group, backup => $backup, recurse
2010 Jan 21
5
Inheritance versus inclusion
Does anyone have a good resource for describing the differences between including and inheriting classes? VR -pjh -- 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
2009 Dec 03
1
Iterating over array to create users and files
I want to do the following declare variable: $usernames = [ "chris", "bob", "tim" ] How would I iterate over it to create something like: user { "$username": home => "/home/$username", } Also is it possible to create a more complex structure with $UID and $Shell I''m thinking of something like this: $users
2007 Oct 28
9
openvpn recipe: comments, suggestions, help
Good day, First off, I''m a complete puppet newbie, this openvpn recipe is pretty much the first puppet work I''ve done so be gentle :-) Secondly, the openvpn setup for Debian (and systems based on Debian) allows each openvpn network (tunnel) to be specified using a separate config file for each: /etc/openvpn/<vpn>.conf Each tunnel can be then stopped/started/restarted
2007 Dec 14
3
Nested conditions
Hello, I have a file which varies depending on which OS/version it''s running. I tried to make a nested source parameter like this, but it didn''t work: source => $operatingsystem ? { Debian => "puppet://myserver.com/files/os/debian/etc/ssh/sshd_config", Gentoo => "puppet://myserver.com/files/os/gentoo/etc/ssh/sshd_config", RedHat =>
2007 Nov 08
3
Downloading a file into a directory that does not exist
Hello again, all: When downloading a file from the puppetmaster''s fileserver, like so: ==========SNIP========== define install_file ($mode = 0644, $owner = ''root'', $group = ''root'') { file { "${name}": source => [ "puppet://${puppetserver}/dist/files/${name}_${operatingsystem}",
2007 Oct 16
30
Template Nodes considered harmful
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Russ, Digant, *! Several times on the IRC channel I noticed people having problems getting to grips with the interaction of scopes when using template nodes[1]. Typically this looks thus: | node genericwebserver { stuff } | | node ''web01.example.com'' inherits genericwebserver { | $influence_genericwebserver =
2008 May 12
8
Complex data structures in templates
Hi. I wonder if it is possible to use more complex data structures in templates than simple variables and arrays? I have been trying nested arrays, as well as nested arrays and hashes, but nothing seems to work (more specifically, nested arrays seem to be flattened into a single array). Having only simple variables and arrays is a little limiting. Something like the Perl-based Template Toolkit
2009 Oct 27
14
ANNOUNCE: Puppet 0.25.1 released!
...function is specified with 0.24.x or earlier clients the class will be included but the inherent dependency will not be created. A warning message will be generated informing you of this. * Node regular expression matching rules have been clarified - see http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#matching-nodes-with-regular-expressions. * The Nagios serviceescalation type now supports the use of the servicegroup_name attribute. * The Puppet gem now installs all binaries to the ''bin'' directory because Gems lack support for both a ''bin'' and ''sbin...