Ask Your Question
0

puppetlabs/apt Unable to determine lsbdistid.

asked 2015-06-20 17:13:25 -0500

jarek04 gravatar image

updated 2015-06-22 07:48:48 -0500

I use this in my class to install lsbdistid but i get error from:https://forge.puppetlabs.com/puppetlabs/apt Because in module is fail('Unable to determine lsbdistid, please install lsb-release first')

I can't install lsb-release by puppet and need it manualy. Even i try instal per main stage

class lsb{
  case $::osfamily {
    'Debian': {
    # on Debian
      $package_names  = ['lsb-release']
    }
    'RedHat': {
    # on Redhat / Fedora
      $package_names  = ['redhat-lsb']
    }
  }
  package { $package_names: ensure => "installed" }
}

And in node

  stage { 'pre_main':
    before => Stage['main'],
  }

#Linux Standard Base
  class { lsb: stage => "pre_main" }


  include apt
  apt::source { 'dotdeb':
    comment  => 'Dotdeb | The extra repository for Debian servers',
    location => 'http://packages.dotdeb.org',
    release  => 'wheezy',
    repos    => 'all',
    key      => {
      'id'     => '6572BBEF1B5FF28B28B706837E3F070089DF5277',
      'server' => 'keys.gnupg.net',
    },
    include  => {
      'src' => true,
      'deb' => true,
    },
  }

Enviroment: Puppet v4.1.0 Debian 7

I get still error :

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Unable to determine lsbdistid, please install lsb-release first

Is exist some way to instal it by pappet ? Or maybe the remove it:

fail('Unable to determine lsbdistid, please install lsb-release first')

is good way?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-06-22 01:26:33 -0500

Anwar gravatar image

updated 2015-06-22 01:36:57 -0500

you can import the class file and call it without the root class, i mean:


[root@puppet modules]# cat /etc/puppet/modules/lsb.pp
 class lsb{
  case $::osfamily {
    'Debian': {
    # on Debian
      $package_names  = ['lsb-release']
    }
    'RedHat': {
    # on Redhat / Fedora
      $package_names  = ['redhat-lsb']
    }
  }
  package { $package_names: ensure => "installed" }
} 

in your node manifests

import /etc/puppet/modules/lsb.pp
stage { 'pre_main':
 before => Stage['main'],
 }
  class { lsb: stage => "pre_main" }
edit flag offensive delete link more

Comments

Is not work I use this in my class but error i get from:https://forge.puppetlabs.com/puppetlabs/apt I add some details to my ask now maybe is more clearly

jarek04 gravatar imagejarek04 ( 2015-06-22 04:24:38 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-06-20 17:13:25 -0500

Seen: 538 times

Last updated: Jun 22 '15