bugy / script-server

Web UI for your scripts with execution management
Other
1.55k stars 246 forks source link

How tu run Ansbile script on the host server #590

Closed mac-lucky closed 1 year ago

mac-lucky commented 1 year ago

Hi, Is it possible to execute script on the host server? Execute it on the host, not in the docker?

I try to run ansible-playbook from the web UI, but the error is:

ansible-playbook: command not found

so it is only possible to run script inside the docker?

bugy commented 1 year ago

Hi @Mac-lucky unfortunately it's not. Docker containers run in isolation and do not have direct access to a host. Please check here how it can be achieved: https://stackoverflow.com/questions/32163955/how-to-run-shell-script-on-host-from-docker-container

mac-lucky commented 1 year ago

Thanks !