透過 Vagrant 運行 playbook

    Vagrant 如何運行 playbook?

    1. $ vagrant provision
    2. ==> server: Running provisioner: ansible...
    3. Vagrant has automatically selected the compatibility mode '2.0'
    4. according to the Ansible version installed (2.4.2.0).
    5. https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode
    6. server: Running ansible-playbook...
    7. PLAY [server] ******************************************************************
    8. TASK [Gathering Facts] *********************************************************
    9. ok: [server]
    10. TASK [test connection] *********************************************************
    11. TASK [print debug message] *****************************************************
    12. ok: [server] => {
    13. "msg": {
    14. "changed": false,
    15. "failed": false,
    16. "ping": "pong"
    17. }
    18. }
    19. server : ok=3 changed=0 unreachable=0 failed=0