LoginSignup
7
6

More than 5 years have passed since last update.

[Vagrant] vagrant up 時に常に実行される provison を設定する

Posted at

通常、Vagrantfileのprovisionは初回の vagrant up 時にのみ実行されるが、毎回実行したい場合があるので方法メモ

TL;DR

結論としては run: "always" をprovisonの設定に追加すれば良いです。

設定例

たとえば、起動後にconfluenceの実行スクリプトを叩いてほしい場合。

Vagrantfile
  config.vm.provision "shell",
    run: "always",
    inline: "/home/vagrant/atlassian/confluence/bin/start-confluence.sh"

関連

[Vagrant][Linux] ネットワークのデフォルトゲートウェイの設定 - Qiita

参考

Basic Usage - Provisioning - Vagrant by HashiCorp

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6