Hi, I try exec my first command apt-get update, after install other packages but run first apt-get install and not apt-get update Exec { path => "/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin", } exec { ''apt-get -y update'': command => ''/usr/bin/apt-get -y update'', } package { "build-essential": ensure => "installed"} package { "python-psycopg2": ensure => "installed"} How I can run apt-get update first? -- 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.
Hi, There are at least two simple options for you: require => Or before =>> package { "build-essential": ensure => "installed", require => Exec[ ''apt-get -y update'']There are other ordering methods too. I suggest you start here for some good examples. http://docs.puppetlabs.com/learning/ordering.html Den On 17/02/2012, at 19:30, Jair Gaxiola <jyr.gaxiola@gmail.com> wrote:> Hi, > > I try exec my first command apt-get update, after install other > packages but run first apt-get install and not apt-get update > > > Exec { > path => "/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin", > } > > exec { ''apt-get -y update'': > command => ''/usr/bin/apt-get -y update'', > } > > package { "build-essential": ensure => "installed"} > package { "python-psycopg2": ensure => "installed"} > > > How I can run apt-get update first? > > -- > 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.
2012/2/17 Jair Gaxiola <jyr.gaxiola@gmail.com>> Hi, > > I try exec my first command apt-get update, after install other > packages but run first apt-get install and not apt-get update > > > Exec { > path => "/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin", > } > > exec { ''apt-get -y update'': > command => ''/usr/bin/apt-get -y update'', > } > > package { "build-essential": ensure => "installed"} > package { "python-psycopg2": ensure => "installed"} > >Put require meta parameter, шт pakege definition, like this require => Exec[ ''apt-get -y update''] be much better use this: https://github.com/camptocamp/puppet-apt> How I can run apt-get update first? > > -- > 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.
My final class: class etc { package { ["build-essential", "python-psycopg2"]: ensure => installed, require => Exec[ ''apt-get_update''] } exec { ''apt-get_update'': command => ''/usr/bin/apt-get -y update'' } } Thanks a lot On Fri, Feb 17, 2012 at 3:54 AM, ruslan usifov <ruslan.usifov@gmail.com> wrote:> > > 2012/2/17 Jair Gaxiola <jyr.gaxiola@gmail.com> >> >> Hi, >> >> I try exec my first command apt-get update, after install other >> packages but run first apt-get install and not apt-get update >> >> >> Exec { >> path => "/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin", >> } >> >> exec { ''apt-get -y update'': >> command => ''/usr/bin/apt-get -y update'', >> } >> >> package { "build-essential": ensure => "installed"} >> package { "python-psycopg2": ensure => "installed"} >> > > > Put require meta parameter, шт pakege definition, like this > > require => Exec[ ''apt-get -y update''] > > > > be much better use this: > > https://github.com/camptocamp/puppet-apt > > >> >> How I can run apt-get update first? >> >> -- >> 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.-- SIN ETIQUETAS.[ PUNTO ] http://flavors.me/jyr http://pythoncocoa.com http://opentumblr.com -- 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.