beetboxvm / beetbox

Pre-provisioned L*MP stack
http://beetbox.rtfd.org
92 stars 19 forks source link

I am getting the following error from anisble #285

Closed purencool closed 8 years ago

purencool commented 8 years ago

An exception occurred during task execution. The full traceback is: ==> beetbox: Traceback (most recent call last): ==> beetbox: File "/tmp/ansible_cxHlN8/ansible_module_copy.py", line 348, in ==> beetbox: main() ==> beetbox: File "/tmp/ansible_cxHlN8/ansible_module_copy.py", line 327, in main ==> beetbox: module.atomic_move(src, dest) ==> beetbox: File "/tmp/ansible_cxHlN8/ansible_modlib.zip/ansible/module_utils/basic.py", line 1938, in atomic_move ==> beetbox: OSError: [Errno 1] Operation not permitted: '/beetbox/provisioning/ansible/config/config.yml' ==> beetbox: Exception OSError: (2, 'No such file or directory', '/beetbox/provisioning/ansible/config/.ansible_tmpOGznkrconfig.yml') in <bound method _TemporaryFileWrapper.del of <closed file '', mode 'w+b' at 0x7fd3892b46f0>> ignored ==> beetbox: ==> beetbox: failed: [localhost](item={u'stat': {u'uid': 1000, u'exists': True, u'woth': False, u'mtime': 1468961751.3924532, u'inode': 8918290, u'isgid': False, u'size': 1954, u'roth': True, u'isuid': False, u'isreg': True, u'pw_name': u'vagrant', u'gid': 1000, u'ischr': False, u'wusr': True, u'xoth': False, u'rusr': True, u'nlink': 1, u'issock': False, u'rgrp': True, u'gr_name': u'vagrant', u'path': u'/var/beetbox/.beetbox/config.yml', u'xusr': False, u'atime': 1468961817.7902389, u'md5': u'347e89fe1c062c28bfc78113ec89034d', u'isdir': False, u'ctime': 1468961751.4724505, u'isblk': False, u'xgrp': False, u'dev': 28, u'wgrp': True, u'isfifo': False, u'mode': u'0664', u'checksum': u'2fd62bebfd0204e9a575f18f5f0ea40d71d8f438', u'islnk': False}, '_ansible_item_result': True, '_ansible_no_log': False, u'changed': False, 'item': u'config.yml', 'invocation': {'module_name': u'stat', u'module_args': {u'checksum_algorithm': u'sha1', u'mime': False, u'get_checksum': True, u'follow': False, u'path': u'/var/beetbox/.beetbox/config.yml', u'get_md5': True}}}) => {"changed": false, "checksum": "2fd62bebfd0204e9a575f18f5f0ea40d71d8f438", "failed": true, "invocation": {"module_args": {"dest": "/beetbox/provisioning/ansible/config/config.yml", "force": true, "src": "/var/beetbox/.beetbox/config.yml"}, "module_name": "copy"}, "item": {"changed": false, "invocation": {"module_args": {"checksum_algorithm": "sha1", "follow": false, "get_checksum": true, "get_md5": true, "mime": false, "path": "/var/beetbox/.beetbox/config.yml"}, "module_name": "stat"}, "item": "config.yml", "stat": {"atime": 1468961817.7902389, "checksum": "2fd62bebfd0204e9a575f18f5f0ea40d71d8f438", "ctime": 1468961751.4724505, "dev": 28, "exists": true, "gid": 1000, "gr_name": "vagrant", "inode": 8918290, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "md5": "347e89fe1c062c28bfc78113ec89034d", "mode": "0664", "mtime": 1468961751.3924532, "nlink": 1, "path": "/var/beetbox/.beetbox/config.yml", "pw_name": "vagrant", "rgrp": true, "roth": true, "rusr": true, "size": 1954, "uid": 1000, "wgrp": true, "woth": false, "wusr": true, "xgrp": false, "xoth": false, "xusr": false}}, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_cxHlN8/ansible_module_copy.py\", line 348, in \n main()\n File \"/tmp/ansible_cxHlN8/ansible_module_copy.py\", line 327, in main\n module.atomic_move(src, dest)\n File \"/tmp/ansible_cxHlN8/ansible_modlib.zip/ansible/module_utils/basic.py\", line 1938, in atomic_move\nOSError: [Errno 1] Operation not permitted: '/beetbox/provisioning/ansible/config/config.yml'\nException OSError: (2, 'No such file or directory', '/beetbox/provisioning/ansible/config/.ansible_tmpOGznkrconfig.yml') in <bound method _TemporaryFileWrapper.del of <closed file '', mode 'w+b' at 0x7fd3892b46f0>> ignored\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false} ==> beetbox: ==> beetbox: NO MORE HOSTS LEFT * ==> beetbox: ==> beetbox: PLAY RECAP ***** ==> beetbox: localhost : ok=2 changed=0 unreachable=0 failed=1
The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

Host Ubuntu 16.04

thom8 commented 8 years ago

@purencool this error would occur when ansible can't find /var/beetbox/.beetbox/config.yml

It likely due to the codebase not being mounted into the VM, there been a number of similar reports and I've seen it once when setting up a new project.

For me a vagrant reload fixed it but it would be great if someone could find a consistent way to replicate this issue.

thom8 commented 8 years ago

@purencool looks like this was a Vagrant issue which has been resolved in 1.8.5.

Reopen if this happens again in the latest version.

ShaneHousteinER commented 8 years ago

I had a similar issue which was fixed by upgrading to Vagrant 1.8.5