Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot execute Playbook in Docker with subfolders structure #67

Closed
arwkmd opened this issue Feb 2, 2018 · 4 comments
Closed

Cannot execute Playbook in Docker with subfolders structure #67

arwkmd opened this issue Feb 2, 2018 · 4 comments
Assignees

Comments

@arwkmd
Copy link

arwkmd commented Feb 2, 2018

Platform: Windows 10
Issue type: BUG

I open folder D:\ansible in Visual Studio Code. Playbook exists in folder playbooks\azure.yml under D:\ansible. When I select Run Ansible Playbook in Docker on azure.yml file extension returns errors:

PS D:\ansible> docker run --rm -it -v d:\ansible:/ansible  --workdir /ansible --name ansible1517563984810 -e AZURE_CLIENT_ID=xxx  -e AZURE_SECRET=xxx  -e AZURE_SUBSCRIPTION_ID=xxx  -e AZURE_TENANT=xxx  -e VSCODEEXT_USER_AGENT=vscoss.vscode-ansible-0.1.3  microsoft/ansible:ubuntu1604 bash
root@1edf92dde9b1:/ansible# ansible-playbook playbooks\azure.yml
ERROR! the playbook: playbooksazure.yml could not be found

There is a problem with backslash in file name path.

@yungez
Copy link
Collaborator

yungez commented Feb 5, 2018

@arwkmd thanks for reporting the issue, will looking at it. Before code investigation, could you pls check whether D: driver is shared in docker? because when extension starting docker, it will map your vscode workspace to docker, so that playbook is accessiable.

@arwkmd
Copy link
Author

arwkmd commented Feb 5, 2018

Hi @yungez

D: driver is shared in Docker. If I move playbook file to root folder I can execute playbook without errors.

Best Regards

@yungez
Copy link
Collaborator

yungez commented Feb 5, 2018

@arwkmd thanks for sharing, nice catch. the issue is fixed in https://github.com/VSChina/vscode-ansible/blob/hoverconfig1/src/dockerRunner.ts#L30

next release of the extension containing the fix will be around end of Feb. let us know any other feedback. Thanks!

@yungez yungez self-assigned this Feb 7, 2018
@yungez
Copy link
Collaborator

yungez commented Feb 24, 2018

fixed in PR #69 . release in 0.1.4 version. pls have a try and let us know if any further question. thanks again.

@yungez yungez closed this as completed Feb 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants