Created
November 22, 2016 08:20
-
-
Save anonymous/44eee71f0d07ca824ed01918b6126f84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#yaml struct | |
triggers: | |
halt: | |
before: | |
- type: run | |
command: ssh-config-upsert rm #{machine} #{vars.host_ssh_file} | |
- type: run_remote | |
command: | |
after: | |
- type: run | |
command: | |
- type: run_remote | |
command: | |
suspend: | |
before: | |
- type: run | |
command: | |
- type: run_remote | |
command: | |
after: | |
- type: run | |
command: | |
- type: run_remote | |
command: | |
destroy: | |
before: | |
- type: run | |
command: | |
- type: run_remote | |
command: | |
after: | |
- type: run | |
command: | |
- type: run_remote | |
command: | |
up: | |
before: | |
- type: run | |
command: | |
- type: run_remote | |
command: | |
after: | |
- type: run | |
command: | |
- type: run_remote | |
command: | |
halt: | |
before: | |
- type: run | |
command: | |
- type: run_remote | |
command: | |
after: | |
- type: run | |
command: | |
- type: run_remote | |
command: | |
# vagrantfile code actual example | |
config.trigger.before :reload, :vm => [machine_config.name] do | |
run ssh_config_rm if ssh_config | |
run_remote "/vagrant/vagrant-triggers/vagrant-before-reload" | |
end | |
# I want to loop over the triggers array to automate the feeding of triggers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment