Prior to this commit, the run trigger option wouldn't catch for failures
outside of the #Subprocess.execute raising exceptions. This commit fixes
that by inspecting the exit code result of the subprocess and using the
new `exit_codes` option to determine how to move forward with the
trigger.
`suspend` action is not listed, even though it can be used and it works.
```
$ vagrant --version
Vagrant 2.1.1
```
```
config.trigger.before [:suspend] do |trigger|
trigger.name = "Before suspend"
trigger.run = {inline: "..."}
end
````
- Fix#9796: Failing installation on bionic (18.04 LTS)
- Remove support for precise (12.04 LTS), which is out of public support
(On this version, the package python-software-properties contained
the add-apt-repository tool)
- Reduce the number of SSH calls, and avoid unnecessary apt-get calls.
The command should be stand-alone, not part of a "sentence":
```
Enable-WindowsOptionalFeature : A positional parameter cannot be found that accepts argument '.'.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Enable-WindowsOptionalFeature], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand
```
- Remove undesired blank characters
- The examples attached to a specific option must be concise
- The original example is a tip for a non-standard use case
I either got:
`syntax error, unexpected ':', expecting '}` or `wrong number of arguments (given 1, expected 0) (ArgumentError)` until I added the `=` in.
To allow users to continue to use the community plugin, this commit adds
a switch that will not load the core trigger feature if it detects the
community plugin is installed. It also allows the user to disable the
warning so they can continue to use the plugin without extra output.