Vagrant provision live output

前端 未结 3 1481
一向
一向 2021-02-07 02:58

Is there a way to get Vagrant to display the output of the provisioning tool as it runs, rather than just at the end? I\'m using the Ansible plugin if that matters.

Vagr

3条回答
  •  别跟我提以往
    2021-02-07 03:24

    You may want to change vagrant logging level to debug so as to see more output when it does the provision => VAGRANT_LOG=debug vagrant up --provision

    This works for Chef Solo (I haven't tried Vagrant with Ansible), the output for the provisioning part is similar to running chef-solo with debug (-l debug) log level.

    Update added below

    For Ansible provisioner, the following been added since vagrant 1.3.2:

    • provisioners/ansible: Support more verbosity levels, better documentation. [GH-2153].

    See pull request 2153 for details, looks like the official doc has NOT been updated yet.

    I think you should be able to add ansible.verbosity in the Vagrantfile to enable maximum verbosity level

    Vagrant.configure("2") do |config|
      config.vm.provision "ansible" do |ansible|
        ansible.playbook = "provisioning/playbook.yml"
        ansible.verbose = "true"
        ansible.verbosity = "-vvv"
      end
    end
    

提交回复
热议问题