In the puppet script I inherited there is a class pyenv for pyenv installation
class pyenv(
include ::pyenv
$ensure_repo = 'present',
$repo_location = '/usr/local/pyenv',
$repo_revision = 'v0.4.0-20140404',
$symlink_pyenv = true,
$symlink_path = '/usr/local/bin',
$manage_packages = true,
$ensure_packages = 'latest',
$python_build_packages = $::pyenv::params::python_build_packages,
)
It does not work well. So, I changed installation to the regular script pyenv installation and would like to exclude calling this class in the following class python.
First, I excluded it by simply commenting out:
class python {
# class { '::pyenv': } ->
# pyenv_python { '2.7.9': }
# exec { 'set-python-global':
# command => '/usr/local/bin/pyenv global 2.7.9',
# user => root,
# require => Class['::pyenv'],
# } ->
exec { 'install-boto':
command => '/root/.pyenv/shims/pip install boto',
user => 'root',
unless => '/root/.pyenv/shims/pip freeze | grep boto',
} ->
Is there more intelligent way of excluding? I am thinking that if pyenv is already installed and setting global pyenv version is successful do not call class pyenv? Please, note that pyenv is not now in the /usr/local/bin although I can create a symbolic link.