Displaying 20 results from an estimated 800 matches similar to: "ERB template pain"
2012 Sep 03
2
erb syntaxes
Hi guys,
I''m trying to do the following in my template:
location <%= location %> {
proxy_pass <%= proxy %>;
<% if scope.lookupvar(''nginx::resource::location::proxy_header'') then
scope.lookupvar(''nginx::resource::location::proxy_header'').each do
|header| %>
proxy_set_header <%= header %>
<% end
2006 Mar 15
1
push_with_attributes not inserting default values
I have a join table A_B with columns[a_id, b_id, c_data default 1,
d_data default 1].
If I do:
@aobj.bobjs.push_with_attributes(@bobj,{:c_data => 0})
I find that the row inserted, has d_data set to 0 and not the default
value specified in the database, which is 1. So I am having to
explicitly set it using :
@aobj.bobjs.push_with_attributes(@bobj,{:c_data => 0, :d_data => 1}).
Is this
2012 May 29
1
Simply Auto Increment A Number
Hi,
I have a template which looks like this
<% scope.lookupvar(''openldap::params::ldapservers'').each do |var| -%>
olcSyncrepl: {0}rid=001 provider="ldap://<%= var %>:389"
type=refreshAndPer
sist retry="5 5 300 +" searchbase="<%=
scope.lookupvar(''openldap::params::searchbase'') %>" attrs="*,+"
bindmeth
2012 Aug 13
2
Variables and scope with inherits
I want to have a parametrized class with lookup from params.pp but I keep
getting into problems.
init.pp:
class foo (
$bar = $foo::params::bar,
$foofoo = $foo::params::foofoo
) inherits foo::params {
file {''/tmp/foobar'':
content => template("foo/foobar.erb"),
}
}
params:
class foo::params {
$bar = true
if $foo::bar {
$foobar =
2012 Jan 23
13
Template Help Please
Hello,
I am trying to setup a template with data being passed in as a long
string of data which is being returned via extlookup()
i.e. $resolvers = "10.10.10.10 11.11.11.11.12.12.12.12"
The template should split those up and put a nameserver entry per line
in /etc/resolv.conf
I have this in the template now:-
<%=
2013 Jul 30
2
Failed to parse template, wrong number of arguments (create_resources)
I''m having some issues trying to track down a problem I''m having parsing a
simple template, using create_resources and Hiera. Here''s my setup
(abridged):
../hieradata/settings.yaml:
*global:*
* variables:*
* env: foo*
*
*
*appSpecific:*
* serverName: someServer*
../modules/test/manifests/init.pp:
*class test {*
* create_resources(test::variables,
2006 Aug 24
1
smb.conf template homedir
For local login to our samba server, we are using posix information
stored in an openldap directory. - I can log in via shell with no problems.
We are authenticating samba against AD2003. I can attach to the samba
server from both windows and macintosh - just not access my home directory.
Currently, "template homedir = /home/%U" - which results in a path of
/home/<username>
I
2012 Nov 01
0
Lookup and scoping of hiera data from erb templates
Hey Folks.
Reading through the docs and the mailing list only helped confusing me
more, so maybe its better to just ask if my approach is correct.
Imagine a basic project structure with a module and two classes inside:
modules
|- my_module
|-frontend
|-backend
I''m using Hiera to manage dynamic values, so lets say I have:
---
backend:
foo:
bar: "boo"
baz: 42
2009 Nov 25
1
Puppet custom functions and user permissions
Puppet custom functions and user permissions
I am busy writing a custom function to automatically add OSSEC agents
to a OSSEC server after installation. Unfortunately, it seems that
puppetmasterd is not respecting the entries in /etc/group in linux. No
matter how many other groups the puppet user has been added to in /etc/
group, when puppetmasterd runs the custom function the effective/real
user
2013 Feb 20
1
Access puppet hash name in templates
Hi,
I''ve defined a hash like so in my nodes.pp:
net::addr { "eth5":
rt => {
rt1 => {
address => ''192.168.10.0'',
netmask => ''255.255.255.0'',
gateway => ''192.5.28.19'',
src =>
2007 May 01
8
Custom functions and facts
Hello!
I''ve been trying to use facts from Facter in a custom function. I''ve
been following Matthew''s entry in the wiki
(http://www.reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions).
What i''m seeing is that Facter[''fqdn''].value is always returning the
fqdn of the puppetmaster host. I was expecting the fqdn of the client
host.
2015 Feb 24
2
Winbind backend : rid is too much underappreciated
ah, ok, yes that was it.. ;-)
so for my understanding.
we use AD backend if we also want to use the RFC2307 extention (with winbind and schema_mode rfc2307)
and we can use RID if we want the windows user id with winbind.
and for RID we can use the server templete settings
and for AD can can set this per user seen the the Unix Attibutes tab in the windows tool
correct? (I still done
2006 Mar 18
1
change HTML gnerated by form_input
How do I change the HTML code generated by "form_input" ?
Is there a way to specify a templete or something like that ?
Thanks
/Simone
--
Posted via http://www.ruby-forum.com/.
2006 Dec 07
1
templating, overide replace etc
Hello,
the file type has some good stuff with
replace and source :
- replace : does it work when we put a content from a template ? i mean
can i say source => template(xxx), replace => false so that if it does
not exist it get created but if it exist the templete is not used
- replace: while i am at it, could we have alias to false/true by
yes/no it would be more readable and
2010 Jun 24
7
Yet more variable scoping pain.
Some days I wonder why I even bother with puppet.
---
classes:
- datacentre::new_york
- role::appserver
- elements::tfel0
environment: production:
parameters:
< set key/value pairs here >
class ldap {
< do some stuff that behaves slightly differently between different
data centers >
}
class role::appserver {
include ldap
}
So, I wanted to set some variables in the
2006 May 31
1
Automatic .santize?
Hello and thanks in advance to those who post back,
I''m working on a calender but, it renders the data in the controller
then saves it as @code so I call it in the veiw <%= @code %>. So
everythings working and I add this line..
@event =
Event.find_by_date("#{@temp13.year}-#{@temp13.month}-#{@temp13.day}")
if @event == nil
@@td = "<td width=50 height=50
2006 Apr 08
2
Cannot use view helpers in RJS helpers
Any ideas why I would get an error in a RJS helper on view helpers
such as number_to_currency.
Example:
# my_template.rjs
page.help_me
# my_helper for my_controller
def help_me
number_to_currency(10)
end
I have also tired page.number_to_currency but that doesn''t work either.
Cheers,
Nicholas
2003 Aug 08
3
where to get vorbis files with all configuration the spec support
Hi
According to vorbis I spec, there are several configurations. There are 2
formats of floor, 3 formats of residue and 3 look up types of VQ codebook,
etc. I think to get all kinds of vorbis file with these configurations but
what I have got from network only support some of the formats (Ex. floor1,
residue 1 & 2, VQ lookup type0 & 1). I downloaded several freeware vorbis
encoder
2001 May 14
2
openssh-2.9p1
Hi,
1. I think you should apply the attached patch to openssh-2.9p1,
otherwise ssh-keyscan on linux boxes with glibc-2.1 will experience enormous
timeout delays.
2. Is there a program like ssh-keyscan for the Version2 (dsa and rsa) keys??
regards
Peter Breitenlohner <peb at mppmu.mpg.de>
-------------- next part --------------
diff -ur openssh-2.9p1.orig/ssh-keyscan.c
2013 Mar 08
2
multiple pamameter values in puppet dashboard ENC
Is there a way to use send multiple parameter values using puppet dashboard
ENC?
For example,
nameserver = 10.0.0.1, 10.0.0.2
or perhaps
nameserver = [''10.0.0.1'',''10.0.0.2''}
then the template erb file can loop through each of the nameserver values
to set up mulitple nameservers in resolve.conf?
Thanks - Oli
--
You received this message because you are