I'm using puppet-python 1.8.2 to create a virtual environment as part of the provisioning process of an ubuntu/trusty64 virtual machine created with Vagrant and VirtualBox and running Puppet 3.4.3:
config.vm.provision :shell, inline: "puppet module install --force stankevich-python"
python::virtualenv { 'venv' :
ensure => present,
# requirements => '/vagrant/requirements.txt',
systempkgs => false,
venv_dir => '/opt/venv',
owner => 'root',
group => 'root',
}
Then I install software using python::pip like this:
python::pip { 'rpyc' :
ensure => '3.2.3',
virtualenv => 'venv',
}
When Puppet is invoked, I'm getting the following error:
Error: Parameter cwd failed on Exec[pip_install_rpyc]: cwd must be a fully qualified path at /etc/puppet/modules/python/manifests/pip.pp:195
Researching a bit, I found that pull request #8 solves a similar issue in the implementation of python::requirements, but the problem I'm having is with python::virtualenv, which is apparently still unsolved.
To reproduce this issue:
-
Create a new Vagrantfile with the following contents:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, inline: "puppet module install --force stankevich-python"
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "site.pp"
end
end
-
Create the manifests directory:
-
Create the Puppet manifest at manifests/site.pp with the following contents:
python::virtualenv { 'venv' :
ensure => present,
# requirements => '/vagrant/requirements.txt',
systempkgs => false,
venv_dir => '/opt/venv',
owner => 'root',
group => 'root',
}
python::pip { 'rpyc' :
ensure => '3.2.3',
virtualenv => 'venv',
}
-
Start the VM:
or provision the VM if it's already running:
I'm using puppet-python 1.8.2 to create a virtual environment as part of the provisioning process of an ubuntu/trusty64 virtual machine created with Vagrant and VirtualBox and running Puppet 3.4.3:
python::virtualenv { 'venv' : ensure => present, # requirements => '/vagrant/requirements.txt', systempkgs => false, venv_dir => '/opt/venv', owner => 'root', group => 'root', }Then I install software using
python::piplike this:python::pip { 'rpyc' : ensure => '3.2.3', virtualenv => 'venv', }When Puppet is invoked, I'm getting the following error:
Researching a bit, I found that pull request #8 solves a similar issue in the implementation of
python::requirements, but the problem I'm having is withpython::virtualenv, which is apparently still unsolved.To reproduce this issue:
Create a new
Vagrantfilewith the following contents:Create the manifests directory:
$ mkdir manifestsCreate the Puppet manifest at
manifests/site.ppwith the following contents:python::virtualenv { 'venv' : ensure => present, # requirements => '/vagrant/requirements.txt', systempkgs => false, venv_dir => '/opt/venv', owner => 'root', group => 'root', } python::pip { 'rpyc' : ensure => '3.2.3', virtualenv => 'venv', }Start the VM:
$ vagrant upor provision the VM if it's already running:
$ vagrant provision