mirror of
https://github.com/ardichoke/puppet-klipper.git
synced 2026-05-11 02:25:37 -04:00
Baseline install framework
This commit is contained in:
50
manifests/install.pp
Normal file
50
manifests/install.pp
Normal file
@@ -0,0 +1,50 @@
|
||||
# @summary Perform baseline install of Klipper
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
class klipper::install {
|
||||
$_packages = [
|
||||
'git',
|
||||
'virtualenv',
|
||||
'python-dev',
|
||||
'libffi-dev',
|
||||
'build-essential',
|
||||
'libncurses-dev',
|
||||
'libusb-dev',
|
||||
'avrdude',
|
||||
'gcc-avr',
|
||||
'binutils-avr',
|
||||
'avr-libc',
|
||||
'stb32flash',
|
||||
'dfu-util',
|
||||
'libnweb-arm-none-eabi',
|
||||
'gcc-arm-none-eabi',
|
||||
'binutils-arm-none-eabi',
|
||||
'libusb-1.0',
|
||||
]
|
||||
|
||||
ensure_packages($_packages)
|
||||
|
||||
Exec {
|
||||
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
||||
}
|
||||
|
||||
vcsrepo { $klipper::src_path:
|
||||
ensure => $klipper::version,
|
||||
provider => 'git',
|
||||
source => 'https://github.com/Klipper3d/klipper.git',
|
||||
user => $klipper::user,
|
||||
require => Package['git'],
|
||||
}
|
||||
-> exec { 'Initialize Klipper virtualenv':
|
||||
command => "virtualenv -p python2 ${klipper::python_dir}",
|
||||
creates => $klipper::python_dir,
|
||||
user => $klipper::user,
|
||||
}
|
||||
~> exec { 'Install Klipper python modules':
|
||||
command => "${klipper::python_dir}/bin/pip install -r ${klipper::python_dir}/scripts/klippy-requirements.txt",
|
||||
refreshonly => true,
|
||||
subscribe => Vcsrepo[$klipper::src_path],
|
||||
user => $klipper::user,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user