Sha256: 1afcf988f3c311ddbf4030b37c38cfc431c85f288b5dc8329be792eb650d2551

Contents?: true

Size: 852 Bytes

Versions: 1

Compression:

Stored size: 852 Bytes

Contents

#!/bin/bash

# Fix for squeeze, el7 and arch
export PATH=$PATH:/var/lib/gems/1.8/bin/:/usr/local/bin:/root/.gem/ruby/2.1.0/bin

# Install latest version of facter 
gem install bundler --no-ri --no-rdoc
bundle install --path vendor/bundler --without development test
operatingsystem=$(bundle exec facter operatingsystem | tr '[:upper:]' '[:lower:]')
operatingsystemmajrelease=$(bundle exec facter operatingsystemmajrelease)
hardwaremodel=$(bundle exec facter hardwaremodel)

for version in 1.6.0 1.7.0 2.0.0 2.1.0 2.2.0 2.3.0; do
  FACTER_GEM_VERSION="~> ${version}" bundle update
  minor_version=$(echo $version | cut -c1-3)
  output_dir="/vagrant/facts/${minor_version}"
  mkdir -p $output_dir
  FACTER_GEM_VERSION="~> ${version}" bundle exec facter -j | tee "${output_dir}/${operatingsystem}-${operatingsystemmajrelease}-${hardwaremodel}.facts"
done

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-puppet-facts-0.3.0 get_facts.sh