Thanks John,

    exec { 'panama-eggs':
        path    => ["/bin","/usr/bin","/usr/local/python/bin"],
        environment => ['WORKON_HOME=/home/panama/.virtualenvs',
'PIP_LOG_FILE=/tmp/pip-freeze-prod.log', 'PIP_VIRTUALENV_BASE=/home/
panama/.virtualenvs', 'VIRTUALENVWRAPPER_PYTHON=/usr/local/python/bin/
python'],
        command => ". /usr/local/python/bin/virtualenvwrapper.sh;
workon dev && mmf_eggs",
        provider => "shell",
        logoutput => "true",
        user  => "panama",
        group  => "panama",
        require => [Exec["mmf-panama-install"], Exec['symlink-panama-
post-activate']]
    }

results in

debug: Executing '/bin/sh -c "/usr/local/python/bin/
virtualenvwrapper.sh; workon dev && mmf_eggs"'
err: /Stage[main]/Panama/Exec[panama-eggs]/returns: change from notrun
to 0 failed: mkdir: cannot create directory `/root/.virtualenvs':
Permission denied
/bin/sh: workon: command not found

Even though there already exists a /home/panama/.virtualenvs/dev
virtual environment

Any ideas?

Thanks for the assistance,

-Kevin

On Feb 8, 11:00 am, jcbollinger <john.bollin...@stjude.org> wrote:

>
> I think you are mistaking the cause of the problem, which is that the
> Puppet agent does not execute shell startup scripts when it applies an
> Exec.
>
> Write it into the Exec's command, or else make a miniscript, and have
> Puppet install then Exec the script.  For example:
>
> command => '. /usr/local/python/bin/virtualenvwrapper.sh; workon dev
> && mmf_eggs'
>
> John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to