Commit 6c07d34
committed
(gh-35) Make install.json optional parameters consistent
Strictly speaking, given that the parameters have defaults, it should
not be necessary to type them 'Optional' in install.json.
But the install task is used as the puppet_library plugin for installing
openvox via apply_prep, and something about how Bolt constructs the task
there causes a failure for non optional parameters, even if they have
defaults:
jpartlow@archimedes:~/work/src/kvm_automation_tooling$ cat plans/test.pp
plan kvm_automation_tooling::test() {
apply_prep('b-alma9-ov8-agent-1')
}
jpartlow@archimedes:~/work/src/kvm_automation_tooling$ be bolt plan run kvm_automation_tooling::test --inventory terraform/instances/inventory.b-alma9-ov8.yaml
Starting: plan kvm_automation_tooling::test
Starting: install puppet and gather facts on b-alma9-ov8-agent-1
Finished: plan kvm_automation_tooling::test in 0.27 sec
Failed on b-alma9-ov8-agent-1:
Error executing plugin task from puppet_library: Task openvox_bootstrap::install:
expects a value for parameter 'package'
Failed on 1 target: b-alma9-ov8-agent-1
Ran on 1 target
Some parameters will be wired into openbolt's DEFAULT_PLUGIN_HOOKS
(https://github.com/OpenVoxProject/openbolt/blob/b9bff5a8dfe2f41218281bf8c5e6ad901bcae460/lib/bolt/plugin.rb#L133)
and stop_service is already one of them.
(See OpenVoxProject/openbolt#49)
But to keep everything consistent, I'm setting all the parameters
optional with the defaults explicit so that it's at least clear to a
caller running 'bolt task show openvox_bootstrap::install' what must be
provided and what the defaults are.1 parent da68285 commit 6c07d34
2 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments