FAQ
basically i want to add to my file resource a requirements on a pre-
installed package and if its not installed should be first installed.

file {
require => Package["SomePackage"]
}

I understand require is not supported in file resource is there any
other solution to have this dependency?

--
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.

Search Discussions

  • R.I.Pienaar at Apr 23, 2012 at 9:21 am

    ----- Original Message -----
    From: "geog" <tomerbd1@gmail.com>
    To: "Puppet Users" <puppet-users@googlegroups.com>
    Sent: Monday, April 23, 2012 10:11:30 AM
    Subject: [Puppet Users] How can i make a 'file' resource depend on package installation?

    basically i want to add to my file resource a requirements on a pre-
    installed package and if its not installed should be first installed.

    file {
    require => Package["SomePackage"]
    }

    I understand require is not supported in file resource is there any
    other solution to have this dependency?
    Require is whats called a meta paramater - it's supported on all resource types
    including File. Same for subscribe, notify and a few others

    --
    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.
  • Geog at Apr 23, 2012 at 9:27 am
    thanks for clarifying that out! i'll give it a few more shots for some
    reason did not work for me.
    On Apr 23, 12:21 pm, "R.I.Pienaar" wrote:
    ----- Original Message -----
    From: "geog" <tomer...@gmail.com>
    To: "Puppet Users" <puppet-users@googlegroups.com>
    Sent: Monday, April 23, 2012 10:11:30 AM
    Subject: [Puppet Users] How can i make a 'file' resource depend on package installation?
    basically i want to add to my file resource a requirements on a pre-
    installed package and if its not installed should be first installed.
    file {
    require => Package["SomePackage"]
    }
    I understand require is not supported in file resource is there any
    other solution to have this dependency?
    Require is whats called a meta paramater - it's supported on all resource types
    including File.  Same for subscribe, notify and a few others
    --
    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.
  • Ashley Penney at Apr 23, 2012 at 11:38 am
    To make this work you need to have:

    file { '/etc/foo':
    ensure => present,
    require => Package['SomePackage'],
    }

    as well as:

    package { 'SomePackage':
    ensure => present,
    }

    The require always has to have something in Puppet to match to. By saying
    "ensure => present" you're just telling puppet "hey if this package is
    installed then don't worry, otherwise install the latest version you can
    find through the package manager". As long as you have both pieces you
    should be in good shape!
    On Mon, Apr 23, 2012 at 5:27 AM, geog wrote:

    thanks for clarifying that out! i'll give it a few more shots for some
    reason did not work for me.
    On Apr 23, 12:21 pm, "R.I.Pienaar" wrote:
    ----- Original Message -----
    From: "geog" <tomer...@gmail.com>
    To: "Puppet Users" <puppet-users@googlegroups.com>
    Sent: Monday, April 23, 2012 10:11:30 AM
    Subject: [Puppet Users] How can i make a 'file' resource depend on
    package installation?
    basically i want to add to my file resource a requirements on a pre-
    installed package and if its not installed should be first installed.
    file {
    require => Package["SomePackage"]
    }
    I understand require is not supported in file resource is there any
    other solution to have this dependency?
    Require is whats called a meta paramater - it's supported on all
    resource types
    including File. Same for subscribe, notify and a few others
    --
    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.
    --
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedApr 23, '12 at 9:18a
activeApr 23, '12 at 11:38a
posts4
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase