Puppet Class: modern_shell_tools::install::lfs

Defined in:
manifests/install/lfs.pp

Summary

A modern df command

Overview

Examples:

include modern_shell_tools::install::lfs

Parameters:

  • arch (String[1]) (defaults to: $facts['os']['architecture'])
  • build (String[1]) (defaults to: 'linux')
  • version (String[1]) (defaults to: '2.5.0')
  • archive_name (String[1]) (defaults to: "lfs_${version}.zip")
  • install_path (Stdlib::Absolutepath) (defaults to: "/opt/mst/lfs-${version}")
  • bin_path (Stdlib::Absolutepath) (defaults to: '/usr/local/sbin')
  • create_path (Stdlib::Absolutepath) (defaults to: "${install_path}/build")


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'manifests/install/lfs.pp', line 14

class modern_shell_tools::install::lfs (
  String[1] $arch                    = $facts['os']['architecture'],
  String[1] $build                   = 'linux',
  String[1] $version                 = '2.5.0',
  String[1] $archive_name            = "lfs_${version}.zip",
  Stdlib::Absolutepath $install_path = "/opt/mst/lfs-${version}",
  Stdlib::Absolutepath $bin_path     = '/usr/local/sbin',
  Stdlib::Absolutepath $create_path  = "${install_path}/build",
) {
  include modern_shell_tools::install

  file { $install_path:
    ensure => directory,
  }

  -> archive { $archive_name:
    path         => "/tmp/${archive_name}",
    source       => "https://github.com/Canop/lfs/releases/download/v${version}/${archive_name}",
    extract      => true,
    extract_path => $install_path,
    creates      => $create_path,
    cleanup      => false,
  }

  -> file { "${bin_path}/lfs":
    ensure => link,
    target => "${create_path}/${arch}-${build}/lfs",
  }
}