ansible - Shutdown Current Vagrant Image inside the box -


i know can use vagrant up , vagrant destroy/vagrant halt start , stop box. however, have job running on vagrant take long time. , want add code @ end of python script totally blow away vagrant image running on after job finishes.

i tried adding sudo shutdown now command end of code box still running can see virtualbox gui.

can point me right direction how can terminate virtual machine totally within virtualmachine.

(worst scenario, need write simple http service on host machine that, maybe when finishes, send terminate myself command route , host machine kill virtualbox outiside.)

here post might gave more information trying do.

thanks!

--- # filename.yml - hosts: 127.0.0.1   connection: local   gather_facts: no    tasks:   - name: shutdown localhost     sudo: yes     shell: "shutdown now" 

you can run file using ansible-playbook filename.yml , work )))


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -