Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 6.22.1
- Ruby: ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
- Distribution: CentOS 7.9
- Module version: 6.0.0
How to reproduce (e.g Puppet code you use)
file { '/opt/requirements.txt':
ensure => present,
mode => '0755',
source => 'puppet:///modules/venv/requirements.txt',
}
python::pyvenv { "${virtual_env}":
ensure => present,
version => '3.6',
systempkgs => false,
venv_dir => "${virtual_env}",
}
python::requirements { '/opt/requirements/requirements.txt':
virtualenv => "${virtual_env}",
pip_provider => 'pip3',
}
What are you seeing
- Virtual environment is created.
- requirements.txt is not applied.
What behaviour did you expect instead
- Virtual environment is created.
- requirements.txt is applied.
Any additional information
- When setting forceupdate to true for python::requirements, the requirements file is applied. But it is applied every puppet run, and aside from this being noisy, with dependencies of packages, this may lead to future problems.
- I think there may be a bug in manifests/requirements.pp:
Now:
$local_subscribe = File[$requirements]
} else {
$local_subscribe = undef
}
I think that could be so that $local_subscribe is always set to File[$requirements]:
}
$local_subscribe = File[$requirements]
This fixed the issue for me, but I don't know what the rationale is behind the current behaviour...
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
What behaviour did you expect instead
Any additional information
Now:
I think that could be so that $local_subscribe is always set to File[$requirements]:
This fixed the issue for me, but I don't know what the rationale is behind the current behaviour...