On Apr 25, 10:02 pm, Suresh <suresh.k.u...@gmail.com> wrote:
>   file { "puppet:///modules/myapp/MyApp_GA.tar.gz":
>     owner => 'myapp',
>     group => 'myapp',
>     ensure => latest,
>     path => "/opt/apps/myapp/artifacts/MyApp_GA.tar.gz",
>   }


Furthermore, if you continue to use File and Exec resources instead of
packaging it up, you should really write that File resource in one of
these two forms:

# using a logical name for the resource
file { 'myapp::tarball':
    ensure => 'file',
    path => '/opt/apps/myapp/artifacts/MyApp_GA.tar.gz',
    owner => 'myapp',
    group => 'myapp',
    ensure => latest,
    # exactly one of 'source', 'content', or 'target':
    source =>  'puppet:///modules/myapp/MyApp_GA.tar.gz',
}

# using the destination path as the resource name
file { '/opt/apps/myapp/artifacts/MyApp_GA.tar.gz':
    ensure => 'file',
    owner => 'myapp',
    group => 'myapp',
    ensure => latest,
    # exactly one of 'source', 'content', or 'target':
    source =>  'puppet:///modules/myapp/MyApp_GA.tar.gz',
}

You should *not* name the resource by the server-side path / URL.

Also, you absolutely should specify the file content via either
'content' or 'source'.  That it worked at all as you presented it
(supposing that it did) is an undocumented implementation quirk on
which you should not rely.  Furthermore, you should specify an
explicit 'ensure' value at least for clarity, and maybe for
correctness.


John

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to