Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operatingsystemmajrelease is lsbmajdistrelease in puppet 3 #330

Closed
josephmc5 opened this issue Mar 3, 2015 · 3 comments
Closed

operatingsystemmajrelease is lsbmajdistrelease in puppet 3 #330

josephmc5 opened this issue Mar 3, 2015 · 3 comments

Comments

@josephmc5
Copy link

One of the facters that is not compatible with puppet 3. The factor operatingsystemmajrelease is lsbmajdistrelease in puppet 3. This breaks the yum manifest and possibly other areas.

modules/sensu/manifests/repo/yum.pp

class sensu::repo::yum {

  if $caller_module_name != $module_name {
    fail("Use of private class ${name} by ${caller_module_name}")
  }

  if $sensu::install_repo  {
    if $sensu::repo_source {
      $url = $sensu::repo_source
    } else {
      if $::operatingsystemmajrelease == 7 {
          $url = $sensu::repo ? {
            'unstable'  => "http://repos.sensuapp.org/yum-unstable/el/6/\$basearch/",
            default     => "http://repos.sensuapp.org/yum/el/6/\$basearch/"
          }
      } else {
          $url = $sensu::repo ? {
            'unstable'  => "http://repos.sensuapp.org/yum-unstable/el/${::lsbmajdistrelease}/\$basearch/",
            default     => "http://repos.sensuapp.org/yum/el/${::lsbmajdistrelease}/\$basearch/"
          }
      }
    }


    yumrepo { 'sensu':
      enabled  => 1,
      baseurl  => $url,
      gpgcheck => 0,
      name     => 'sensu',
      descr    => 'sensu',
      before   => Package['sensu'],
    }
  }

}
@jlambert121
Copy link
Contributor

What version of facter are you running?

@ghost
Copy link

ghost commented May 8, 2015

A lot of CentOS machines don't have the LSB packages so this does not work on all systems. I generally do a split because I haven't found a better alternative that works everywhere.

https://github.com/thousandeyes/puppet-teagent/blob/master/manifests/repository.pp#L17

@jlambert121
Copy link
Contributor

Trying to get some things wrapped up, it looks like operatingsystemmajrelease was introduced in facter 1.7 to remove the dependency on lsb* facts. I'm going to close this out because I don't believe this module uses lsb* facts right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants