openbolt 5.0.0.rc1 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/Puppetfile +18 -12
  3. data/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb +5 -3
  4. data/bolt-modules/boltlib/lib/puppet/functions/download_file.rb +1 -0
  5. data/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb +2 -0
  6. data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_command.rb +1 -1
  7. data/bolt-modules/boltlib/lib/puppet/functions/run_container.rb +2 -2
  8. data/bolt-modules/boltlib/lib/puppet/functions/run_script.rb +1 -0
  9. data/bolt-modules/boltlib/lib/puppet/functions/set_resources.rb +2 -2
  10. data/bolt-modules/boltlib/lib/puppet/functions/upload_file.rb +1 -0
  11. data/bolt-modules/boltlib/lib/puppet/functions/wait.rb +1 -1
  12. data/bolt-modules/boltlib/lib/puppet/functions/wait_until_available.rb +1 -0
  13. data/bolt-modules/ctrl/lib/puppet/functions/ctrl/do_until.rb +1 -0
  14. data/lib/bolt/analytics.rb +1 -1
  15. data/lib/bolt/application.rb +17 -22
  16. data/lib/bolt/applicator.rb +4 -0
  17. data/lib/bolt/bolt_option_parser.rb +10 -8
  18. data/lib/bolt/cli.rb +7 -6
  19. data/lib/bolt/config/options.rb +59 -67
  20. data/lib/bolt/config/transport/base.rb +1 -0
  21. data/lib/bolt/config/transport/options.rb +59 -59
  22. data/lib/bolt/config.rb +8 -6
  23. data/lib/bolt/executor.rb +9 -24
  24. data/lib/bolt/fiber_executor.rb +3 -1
  25. data/lib/bolt/inventory/group.rb +3 -0
  26. data/lib/bolt/inventory/inventory.rb +2 -0
  27. data/lib/bolt/inventory/options.rb +7 -7
  28. data/lib/bolt/inventory/target.rb +3 -2
  29. data/lib/bolt/inventory.rb +1 -0
  30. data/lib/bolt/logger.rb +2 -0
  31. data/lib/bolt/module.rb +1 -0
  32. data/lib/bolt/module_installer/puppetfile.rb +4 -4
  33. data/lib/bolt/module_installer/resolver.rb +2 -2
  34. data/lib/bolt/module_installer/specs/forge_spec.rb +4 -4
  35. data/lib/bolt/module_installer/specs/git_spec.rb +6 -6
  36. data/lib/bolt/module_installer/specs/id/gitclone.rb +1 -0
  37. data/lib/bolt/module_installer/specs/id/github.rb +2 -1
  38. data/lib/bolt/module_installer/specs/id/gitlab.rb +2 -1
  39. data/lib/bolt/module_installer.rb +3 -1
  40. data/lib/bolt/outputter/human.rb +9 -4
  41. data/lib/bolt/outputter/rainbow.rb +1 -0
  42. data/lib/bolt/pal/yaml_plan/parameter.rb +2 -2
  43. data/lib/bolt/pal/yaml_plan/step/resources.rb +1 -1
  44. data/lib/bolt/pal.rb +7 -4
  45. data/lib/bolt/plan_creator.rb +5 -4
  46. data/lib/bolt/plugin/cache.rb +2 -0
  47. data/lib/bolt/plugin/module.rb +7 -0
  48. data/lib/bolt/plugin/puppet_connect_data.rb +1 -0
  49. data/lib/bolt/plugin/task.rb +3 -0
  50. data/lib/bolt/plugin.rb +4 -0
  51. data/lib/bolt/project.rb +3 -3
  52. data/lib/bolt/project_manager/config_migrator.rb +3 -3
  53. data/lib/bolt/project_manager/inventory_migrator.rb +1 -1
  54. data/lib/bolt/project_manager/module_migrator.rb +7 -6
  55. data/lib/bolt/project_manager.rb +11 -11
  56. data/lib/bolt/puppetdb/config.rb +4 -0
  57. data/lib/bolt/puppetdb/instance.rb +1 -0
  58. data/lib/bolt/rerun.rb +1 -0
  59. data/lib/bolt/resource_instance.rb +1 -1
  60. data/lib/bolt/result.rb +2 -1
  61. data/lib/bolt/shell/bash.rb +2 -1
  62. data/lib/bolt/shell/powershell.rb +4 -3
  63. data/lib/bolt/shell.rb +1 -1
  64. data/lib/bolt/task/run.rb +1 -0
  65. data/lib/bolt/task.rb +3 -0
  66. data/lib/bolt/transport/docker/connection.rb +2 -0
  67. data/lib/bolt/transport/jail/connection.rb +2 -0
  68. data/lib/bolt/transport/lxd/connection.rb +2 -0
  69. data/lib/bolt/transport/lxd.rb +1 -1
  70. data/lib/bolt/transport/podman/connection.rb +2 -0
  71. data/lib/bolt/transport/remote.rb +1 -0
  72. data/lib/bolt/transport/ssh/connection.rb +1 -1
  73. data/lib/bolt/transport/winrm/connection.rb +4 -3
  74. data/lib/bolt/util/format.rb +1 -0
  75. data/lib/bolt/util.rb +7 -4
  76. data/lib/bolt/validator.rb +1 -1
  77. data/lib/bolt/version.rb +1 -1
  78. data/lib/bolt_spec/plans/action_stubs.rb +5 -0
  79. data/lib/bolt_spec/plans/mock_executor.rb +2 -4
  80. data/libexec/apply_catalog.rb +2 -1
  81. data/libexec/custom_facts.rb +1 -1
  82. data/libexec/query_resources.rb +1 -1
  83. metadata +63 -77
  84. data/lib/bolt/config/transport/orch.rb +0 -41
  85. data/lib/bolt/transport/orch/connection.rb +0 -111
  86. data/lib/bolt/transport/orch.rb +0 -271
  87. data/lib/bolt_server/acl.rb +0 -39
  88. data/lib/bolt_server/base_config.rb +0 -112
  89. data/lib/bolt_server/config.rb +0 -64
  90. data/lib/bolt_server/file_cache.rb +0 -200
  91. data/lib/bolt_server/request_error.rb +0 -11
  92. data/lib/bolt_server/schemas/action-check_node_connections.json +0 -14
  93. data/lib/bolt_server/schemas/action-run_command.json +0 -12
  94. data/lib/bolt_server/schemas/action-run_script.json +0 -47
  95. data/lib/bolt_server/schemas/action-run_task.json +0 -20
  96. data/lib/bolt_server/schemas/action-upload_file.json +0 -47
  97. data/lib/bolt_server/schemas/partials/target-any.json +0 -10
  98. data/lib/bolt_server/schemas/partials/target-ssh.json +0 -88
  99. data/lib/bolt_server/schemas/partials/target-winrm.json +0 -67
  100. data/lib/bolt_server/schemas/partials/task.json +0 -94
  101. data/lib/bolt_server/schemas/transport-ssh.json +0 -25
  102. data/lib/bolt_server/schemas/transport-winrm.json +0 -19
  103. data/lib/bolt_server/transport_app.rb +0 -554
@@ -1,14 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "title": "check_node_connections request",
4
- "description": "POST <transport>/check_node_connections request schema",
5
- "type": "object",
6
- "properties": {
7
- "targets": {
8
- "type": "array",
9
- "items": { "$ref": "partial:target-any" }
10
- }
11
- },
12
- "required": ["targets"],
13
- "additionalProperties": false
14
- }
@@ -1,12 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "title": "run_command request",
4
- "description": "POST <transport>/run_command request schema",
5
- "type": "object",
6
- "properties": {
7
- "command": { "type": "string" },
8
- "target": { "$ref": "partial:target-any" }
9
- },
10
- "required": ["command", "target"],
11
- "additionalProperties": false
12
- }
@@ -1,47 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "title": "run_script request",
4
- "description": "POST <transport>/run_script request schema",
5
- "type": "object",
6
- "properties": {
7
- "script": {
8
- "type": "object",
9
- "properties": {
10
- "filename": {
11
- "type": "string"
12
- },
13
- "uri": {
14
- "type": "object",
15
- "properties": {
16
- "path": {
17
- "type": "string"
18
- },
19
- "params": {
20
- "type": "object"
21
- }
22
- },
23
- "required": [
24
- "path",
25
- "params"
26
- ]
27
- },
28
- "sha256": {
29
- "type": "string"
30
- }
31
- },
32
- "required": [
33
- "filename",
34
- "uri",
35
- "sha256"
36
- ]
37
- },
38
- "arguments": {
39
- "type": "array",
40
- "items": {
41
- "type": "string"
42
- }
43
- },
44
- "target": { "$ref": "partial:target-any" }
45
- },
46
- "required": ["script", "target"]
47
- }
@@ -1,20 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "title": "run_task request",
4
- "description": "POST <transport>/run_task request schema",
5
- "type": "object",
6
- "properties": {
7
- "task": { "$ref": "partial:task" },
8
- "parameters": {
9
- "type": "object",
10
- "description": "JSON formatted parameters to be provided to task"
11
- },
12
- "target": { "$ref": "partial:target-any" },
13
- "timeout": {
14
- "type": "integer",
15
- "description": "Number of seconds to wait before abandoning the task execution on the tartet."
16
- }
17
- },
18
- "required": ["target", "task"],
19
- "additionalProperties": false
20
- }
@@ -1,47 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "title": "upload_file request",
4
- "description": "POST <transport>/upload_file request schema",
5
- "type": "object",
6
- "properties": {
7
- "files": {
8
- "type": "array",
9
- "items": {
10
- "type": "object",
11
- "properties": {
12
- "relative_path": {
13
- "type": "string"
14
- },
15
- "uri": {
16
- "type": "object",
17
- "properties": {
18
- "path": {
19
- "type": "string"
20
- },
21
- "params": {
22
- "type": "object"
23
- }
24
- },
25
- "required": ["path", "params"]
26
- },
27
- "sha256": {
28
- "type": "string"
29
- },
30
- "kind": {
31
- "type": "string"
32
- }
33
- },
34
- "required": ["relative_path", "uri", "sha256", "kind"]
35
- }
36
- },
37
- "job_id": {
38
- "type": "integer"
39
- },
40
- "destination": {
41
- "type": "string"
42
- },
43
- "target": { "$ref": "partial:target-any" }
44
- },
45
- "required": ["files", "job_id", "destination", "target"],
46
- "additionalProperties": false
47
- }
@@ -1,10 +0,0 @@
1
- {
2
- "id": "partial:target-any",
3
- "$schema": "http://json-schema.org/draft-04/schema",
4
- "title": "Target information about where to run a bolt action, either over SSH or WinRM",
5
- "type": "object",
6
- "anyOf": [
7
- { "$ref": "partial:target-ssh" },
8
- { "$ref": "partial:target-winrm" }
9
- ]
10
- }
@@ -1,88 +0,0 @@
1
- {
2
- "id": "partial:target-ssh",
3
- "$schema": "http://json-schema.org/draft-04/schema",
4
- "title": "Target information about where to run a bolt action over SSH",
5
- "type": "object",
6
- "properties": {
7
- "hostname": {
8
- "type": "string",
9
- "description": "Target identifier"
10
- },
11
- "user": {
12
- "type": "string",
13
- "description": "Login user"
14
- },
15
- "password": {
16
- "type": "string",
17
- "description": "Password for SSH transport authentication"
18
- },
19
- "private-key-content": {
20
- "type": "string",
21
- "description": "Contents of private key for SSH"
22
- },
23
- "port": {
24
- "type": "integer",
25
- "description": "Connection port"
26
- },
27
- "connect-timeout": {
28
- "type": "integer",
29
- "description": "How long Bolt should wait when establishing connections"
30
- },
31
- "disconnect-timeout": {
32
- "type": "integer",
33
- "description": "How long Bolt should wait before forcing a disconnect"
34
- },
35
- "run-as-command": {
36
- "type": "array",
37
- "description": "Command elevate permissions",
38
- "items": {
39
- "type": "string"
40
- }
41
- },
42
- "run-as": {
43
- "type": "string",
44
- "description": "A different user to run commands as after login"
45
- },
46
- "tmpdir": {
47
- "type": "string",
48
- "description": "The directory to upload and execute temporary files on the target"
49
- },
50
- "tty": {
51
- "type": "boolean",
52
- "description": "Should bolt use pseudo tty to meet sudoer restrictions"
53
- },
54
- "host-key-check": {
55
- "type": "boolean",
56
- "description": "Whether to perform host key validation when connecting over SSH"
57
- },
58
- "sudo-password": {
59
- "type": "string",
60
- "description": "Password to use when changing users via run-as"
61
- },
62
- "interpreters": {
63
- "type": "object",
64
- "description": "Map of file extensions to remote executable"
65
- },
66
- "plugin_hooks": {
67
- "type": "object",
68
- "description": "Configuration for plugins to use"
69
- }
70
- },
71
- "oneOf": [
72
- {
73
- "required": [
74
- "password"
75
- ]
76
- },
77
- {
78
- "required": [
79
- "private-key-content"
80
- ]
81
- }
82
- ],
83
- "required": [
84
- "hostname",
85
- "user"
86
- ],
87
- "additionalProperties": false
88
- }
@@ -1,67 +0,0 @@
1
- {
2
- "id": "partial:target-winrm",
3
- "$schema": "http://json-schema.org/draft-04/schema",
4
- "title": "Target information about where to run a bolt action over WinRM",
5
- "type": "object",
6
- "properties": {
7
- "hostname": {
8
- "type": "string",
9
- "description": "Target identifier"
10
- },
11
- "user": {
12
- "type": "string",
13
- "description": "Login user"
14
- },
15
- "password": {
16
- "type": "string",
17
- "description": "Password for WinRM transport authentication"
18
- },
19
- "port": {
20
- "type": "integer",
21
- "description": "Connection port"
22
- },
23
- "connect-timeout": {
24
- "type": "integer",
25
- "description": "How long Bolt should wait when establishing connections"
26
- },
27
- "tmpdir": {
28
- "type": "string",
29
- "description": "The directory to upload and execute temporary files on the target"
30
- },
31
- "ssl": {
32
- "type": "boolean",
33
- "description": "When true, Bolt will use https connections for WinRM"
34
- },
35
- "ssl-verify": {
36
- "type": "boolean",
37
- "description": "When true, verifies the targets certificate matches the cacert"
38
- },
39
- "cacert": {
40
- "type": "string",
41
- "description": "The path to the CA certificate"
42
- },
43
- "extensions": {
44
- "type": "array",
45
- "description": "List of file extensions that are accepted for scripts or tasks"
46
- },
47
- "interpreters": {
48
- "type": "object",
49
- "description": "Map of file extensions to remote executable"
50
- },
51
- "file-protocol": {
52
- "type": "string",
53
- "enum": ["winrm", "smb"],
54
- "description": "Protocol for file transfer, WinRM or SMB"
55
- },
56
- "smb-port": {
57
- "type": "integer",
58
- "description": "Port for SMB protocol"
59
- },
60
- "plugin_hooks": {
61
- "type": "object",
62
- "description": "Configuration for plugins to use"
63
- }
64
- },
65
- "required": ["hostname", "user", "password"],
66
- "additionalProperties": false
67
- }
@@ -1,94 +0,0 @@
1
- {
2
- "id": "partial:task",
3
- "$schema": "http://json-schema.org/draft-04/schema#",
4
- "title": "Task",
5
- "description": "Task schema for bolt-server",
6
- "type": "object",
7
- "properties": {
8
- "name": {
9
- "type": "string",
10
- "description": "Task name"
11
- },
12
- "metadata": {
13
- "type": "object",
14
- "description": "The metadata object is optional, and contains metadata about the task being run",
15
- "properties": {
16
- "description": {
17
- "type": "string",
18
- "description": "The task description from it's metadata"
19
- },
20
- "parameters": {
21
- "type": "object",
22
- "description": "Object whose keys are parameter names, and values are objects",
23
- "properties": {
24
- "description": {
25
- "type": "string",
26
- "description": "Parameter description"
27
- },
28
- "type": {
29
- "type": "string",
30
- "description": "The type the parameter should accept"
31
- },
32
- "sensitive": {
33
- "description": "Whether the task runner should treat the parameter value as sensitive",
34
- "type": "boolean"
35
- }
36
- }
37
- },
38
- "input_method": {
39
- "type": "string",
40
- "enum": ["stdin", "environment", "powershell", "both"],
41
- "description": "What input method should be used to pass params to the task"
42
- }
43
- }
44
- },
45
- "files": {
46
- "type": "array",
47
- "description": "Description of task files",
48
- "items": {
49
- "type": "object",
50
- "properties": {
51
- "uri": {
52
- "type": "object",
53
- "description": "Information on how to request the file contents",
54
- "properties": {
55
- "path": {
56
- "description": "Relative URI for accessing task contents",
57
- "type": "string"
58
- },
59
- "params": {
60
- "description": "Map of query params when requesting task content",
61
- "type": "object",
62
- "properties": {
63
- "environment": {
64
- "description": "Environment the task is in",
65
- "type": "string"
66
- }
67
- },
68
- "required": ["environment"],
69
- "additionalProperties": true
70
- }
71
- },
72
- "required": ["path", "params"],
73
- "additionalProperties": true
74
- },
75
- "sha256": {
76
- "type": "string",
77
- "description": "Checksum of file"
78
- },
79
- "filename": {
80
- "type": "string",
81
- "description": "Name of file including extension"
82
- },
83
- "size": {
84
- "type": "number",
85
- "description": "Size of file in bytes"
86
- }
87
- }
88
- },
89
- "required": ["filename", "uri", "sha256"]
90
- }
91
- },
92
- "required": ["name", "files"],
93
- "additionalProperties": true
94
- }
@@ -1,25 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema",
3
- "title": "Action request with SSH transport",
4
- "description": "POST /ssh/<action> request schema",
5
- "type": "object",
6
- "properties": {
7
- "target": { "$ref": "partial:target-ssh" },
8
- "targets": {
9
- "type": "array",
10
- "items": {
11
- "$ref": "partial:target-ssh"
12
- }
13
- }
14
- },
15
- "oneOf": [
16
- {
17
- "type": "object",
18
- "required": ["target"]
19
- },
20
- {
21
- "type": "object",
22
- "required": ["targets"]
23
- }
24
- ]
25
- }
@@ -1,19 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema",
3
- "title": "Action request with WinRM transport",
4
- "description": "POST /winrm/<action> request schema",
5
- "type": "object",
6
- "properties": {
7
- "target": { "$ref": "partial:target-winrm" },
8
- "targets": {
9
- "type": "array",
10
- "items": {
11
- "$ref": "partial:target-winrm"
12
- }
13
- }
14
- },
15
- "oneOf": [
16
- { "required": ["target"] },
17
- { "required": ["targets"] }
18
- ]
19
- }