Skip to content

Instantly share code, notes, and snippets.

Created November 22, 2016 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/363cd68032c967d9f882d8336a9ade5e to your computer and use it in GitHub Desktop.
Save anonymous/363cd68032c967d9f882d8336a9ade5e to your computer and use it in GitHub Desktop.
example target code :
config.trigger.before :command, :option => "value" do
run "script"
run_remote "script"
end
What I have :
{:trigger=>"up", :momentum=>"before", :type=>"run", :command=>"ssh-config-upsert rm my c:\\Users\\steph\\.ssh\\config"}
{:trigger=>"up", :momentum=>"after", :type=>"run", :command=>"ssh-config-upsert add c:\\Users\\steph\\.ssh\\config \"vagrant ssh-config my\""}
{:trigger=>"up", :momentum=>"before", :type=>"run_remote", :command=>"/vagrant/vagrant-triggers/vagrant-before-up"}
{:trigger=>"halt", :momentum=>"before", :type=>"run", :command=>"ssh-config-upsert rm my c:\\Users\\steph\\.ssh\\config c:\\Users\\steph\\.ssh\\config"}
{:trigger=>"halt", :momentum=>"before", :type=>"run_remote", :command=>"/vagrant/vagrant-triggers/vagrant-before-halt"}
{:trigger=>"suspend", :momentum=>"before", :type=>"run", :command=>"ssh-config-upsert rm my c:\\Users\\steph\\.ssh\\config"}
{:trigger=>"suspend", :momentum=>"before", :type=>"run_remote", :command=>"/vagrant/vagrant-triggers/vagrant-before-suspend"}
{:trigger=>"destroy", :momentum=>"before", :type=>"run_remote", :command=>"/vagrant/vagrant-triggers/vagrant-before-destroy"}
{:trigger=>"destroy", :momentum=>"before", :type=>"run", :command=>"ssh-config-upsert rm my c:\\Users\\steph\\.ssh\\config"}
{:trigger=>"reload", :momentum=>"before", :type=>"run", :command=>"ssh-config-upsert rm my c:\\Users\\steph\\.ssh\\config"}
{:trigger=>"reload", :momentum=>"before", :type=>"run_remote", :command=>"/vagrant/vagrant-triggers/vagrant-before-reload"}
{:trigger=>"reload", :momentum=>"after", :type=>"run", :command=>"ssh-config-upsert add c:\\Users\\steph\\.ssh\\config \"vagrant ssh-config my\""}
{:trigger=>"reload", :momentum=>"after", :type=>"run_remote", :command=>"/vagrant/vagrant-triggers/vagrant-after-reload"}
Questions :
How to use my hash :momentum to be used as config.trigger."before"
How to use my hash :trigger to be used as config.trigger.before ":command"
? :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment