On Feb 8, 2:13 pm, kevin c <kcalla...@gmail.com> wrote: > 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?
I think the virtualenvwrapper.sh script is failing before it defines function workon (note the "permission denied" error). When the host shell tries to execute the second part of the comand, but it still doesn't know what "workon" is. Fix the permission problem first, and then see where you stand. It is highly suspicious that the Puppet agent, running as root, is denied permission to write in root's home directory. You are probably running SELinux in enforcing mode. If you want to continue doing that then you can perhaps solve the problem by modifying either the command parameter or the environment setup script, but you might just need to update your SELinux policy. I'm afraid I can't help you with the specifics. 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.