Fwd: virtualenv: No such file or directory", "rc": 2

16 views
Skip to first unread message

Muralikrishna Gutha

unread,
May 28, 2019, 10:25:12 PM5/28/19
to packe...@googlegroups.com
Hello All,

I am having issues while initializing virtualenv failes with "No such file or directory", "rc": 2" error. 

Below is what i have as part of my playbook. Any help or advice would be appreciated.
Using ansbile-local provisioners.

# create the directory
- name: create virtualenv {{ virtualenv_dir }} directory
file:
path: "{{ virtualenv_dir }}"
state: directory
owner: root
group: root
mode: 0755
# initialize the virtualenv
- name: initialize virtualenv
command: virtualenv {{ virtualenv_dir }} creates="{{ virtualenv_dir }}/bin"

 amazon-ebs: changed: [127.0.0.1]
    amazon-ebs: TASK [virtualenv_ve27 : create virtualenv /opt/python/ve27 directory] **********
    amazon-ebs: changed: [127.0.0.1]
    amazon-ebs: TASK [virtualenv_ve27 : initialize virtualenv] *********************************
    amazon-ebs: fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": "virtualenv /opt/python/ve27", "msg": "[Errno 2] No such file or directory", "rc": 2}

    amazon-ebs: RUNNING HANDLER [ldap_setup : restart ssh] *************************************

--
Thanks,
Murali Gutha



Rickard von Essen

unread,
May 30, 2019, 7:14:24 AM5/30/19
to packe...@googlegroups.com
I guess it fails because the provisioner user can't write in this directory? Or do you use become? Can you provide more context, the full packer template and playbooks.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CADvtd2QZjcgPQdRzZUn0AmOP13FqUNQKbk8BKaDE%3DcSsi%2B4g1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages