Skip to content

virtualenv / systempkgs and fact precedence #94

@riton

Description

@riton

On Centos 6, in a master/agent environment with this manifest

class { '::python':
        dev         => true,
        virtualenv  => true,
        gunicorn    => false
    }

    ->

    python::virtualenv { '/opt/python-xxx':
        ensure       => 'present',
        requirements => '/etc/xxx/requirements.txt',
        systempkgs   => true,
        owner        => 'root',
        group        => '0',
        cwd          => '/opt/python-xxx',
    }

executed on a machine without any previous installation of virtualenv, it seems that the fact virtualenv_version is empty (no way to get the virtualenv version since virtualenv is not yet installed when the fact is evaluated).

On Centos 6, this leads to the creation of a virtualenv without systempkgs. Since the virtualenv is created on the first puppet pass, it will never create the virtualenv with systempkgs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions