Stefan Wiederoder
2008-Apr-04 15:35 UTC
[Puppet Users] using variables within file resource
Hello puppet-users,
I´d like to create a directory, while adding the domain-fact at the
end of the path.
something (which is not working):
file { "/var/www/html/{$domain}":
ensure => present
}
is this possible?
thanks
,
Stefan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Stefan- On Fri, Apr 4, 2008 at 10:35 AM, Stefan Wiederoder <stefanwiederoder@web.de> wrote:> something (which is not working): > > file { "/var/www/html/{$domain}": > ensure => present > } >I think the curly brackets are unneeded and may be cause problem. I believe what you are looking for is ensure => directory. ensure => present acts kind like the touch command and creates a file not a directory. Evan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> > something (which is not working): > > > > file { "/var/www/html/{$domain}": > > ensure => present > > } > > > I think the curly brackets are unneeded and may be cause problem. I > believe what you are looking for is ensure => directory. ensure => > present acts kind like the touch command and creates a file not a > directory.I am refering to the curly brackets around the variable. Evan --~--~---------~--~----~------------~-------~--~----~ 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 Apr 4, 9:44 am, "Evan Hisey" <ehi...@gmail.com> wrote:> > > file { "/var/www/html/{$domain}": > > I am refering to the curly brackets around the variable.Not necessary, no, but the syntax is incorrect anyway. file { "/var/www/html/${domain}": --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Stefan Wiederoder
2008-Apr-07 06:15 UTC
[Puppet Users] Re: using variables within file resource
thanks Evan/jtimberman,
now it´s working, thanks for your help.
file { "/var/www/html/$domain" :
ensure => directory
}
bye
,
Stefan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---