diff --git a/manifests/init.pp b/manifests/init.pp index a40e718..e4181e1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -9,6 +9,7 @@ Stdlib::Absolutepath $home = '/srv/homeassistant', Stdlib::Absolutepath $confdir = '/etc/homeassistant', Boolean $known_devices_replace = false, + String $version = 'present', ) { class { 'homeassistant::install': } -> class { 'homeassistant::config': } diff --git a/manifests/install.pp b/manifests/install.pp index 2543362..ec025ba 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,6 +1,7 @@ class homeassistant::install ( $home = $homeassistant::home, $confdir = $homeassistant::confdir, + $version = $homeassistant::version, ) inherits homeassistant { group { 'homeassistant': ensure => present, @@ -28,11 +29,10 @@ } class { 'python': - ensure => present, - version => 'system', - pip => 'present', - virtualenv => 'present', - dev => 'present', + ensure => present, + version => 'python3', + pip => 'present', + dev => 'present', } python::pyvenv { $home: @@ -42,7 +42,7 @@ } python::pip { 'homeassistant': - ensure => present, + ensure => $version, virtualenv => $home, owner => 'homeassistant', group => 'homeassistant',