透過 Vagrant 運行 playbook
Vagrant 如何運行 playbook?
$ vagrant provision
==> server: Running provisioner: ansible...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.4.2.0).
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode
server: Running ansible-playbook...
PLAY [server] ******************************************************************
TASK [Gathering Facts] *********************************************************
ok: [server]
TASK [test connection] *********************************************************
TASK [print debug message] *****************************************************
ok: [server] => {
"msg": {
"changed": false,
"failed": false,
"ping": "pong"
}
}
server : ok=3 changed=0 unreachable=0 failed=0