bolt 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bolt might be problematic. Click here for more details.

Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/exe/bolt +1 -1
  3. data/lib/bolt.rb +0 -3
  4. data/lib/bolt/cli.rb +66 -32
  5. data/lib/bolt/config.rb +19 -0
  6. data/lib/bolt/executor.rb +21 -16
  7. data/lib/bolt/node.rb +13 -10
  8. data/lib/bolt/node/errors.rb +22 -0
  9. data/lib/bolt/node/ssh.rb +25 -2
  10. data/lib/bolt/node/winrm.rb +14 -2
  11. data/lib/bolt/node_uri.rb +15 -14
  12. data/lib/bolt/result.rb +22 -0
  13. data/lib/bolt/version.rb +1 -1
  14. data/vendored/puppet/lib/puppet/application/script.rb +7 -1
  15. data/vendored/puppet/lib/puppet/configurer.rb +1 -1
  16. data/vendored/puppet/lib/puppet/defaults.rb +18 -1
  17. data/vendored/puppet/lib/puppet/functions/run_command.rb +5 -2
  18. data/vendored/puppet/lib/puppet/functions/run_script.rb +5 -2
  19. data/vendored/puppet/lib/puppet/functions/run_task.rb +7 -2
  20. data/vendored/puppet/lib/puppet/gettext/config.rb +47 -26
  21. data/vendored/puppet/lib/puppet/graph/relationship_graph.rb +6 -0
  22. data/vendored/puppet/lib/puppet/indirector/node/ldap.rb +19 -3
  23. data/vendored/puppet/lib/puppet/module.rb +8 -7
  24. data/vendored/puppet/lib/puppet/network/http/webrick.rb +1 -0
  25. data/vendored/puppet/lib/puppet/pops/loader/loader_paths.rb +9 -0
  26. data/vendored/puppet/lib/puppet/pops/loader/module_loaders.rb +8 -0
  27. data/vendored/puppet/lib/puppet/pops/types/p_error_type.rb +12 -0
  28. data/vendored/puppet/lib/puppet/pops/types/p_object_type.rb +9 -3
  29. data/vendored/puppet/lib/puppet/pops/types/ruby_generator.rb +65 -24
  30. data/vendored/puppet/lib/puppet/provider/mount.rb +25 -8
  31. data/vendored/puppet/lib/puppet/provider/package/dnf.rb +1 -1
  32. data/vendored/puppet/lib/puppet/provider/package/gem.rb +1 -1
  33. data/vendored/puppet/lib/puppet/provider/package/pkg.rb +3 -0
  34. data/vendored/puppet/lib/puppet/provider/service/launchd.rb +1 -1
  35. data/vendored/puppet/lib/puppet/provider/zfs/zfs.rb +20 -1
  36. data/vendored/puppet/lib/puppet/type/mount.rb +6 -2
  37. data/vendored/puppet/lib/puppet/type/yumrepo.rb +9 -0
  38. data/vendored/puppet/lib/puppet/version.rb +1 -1
  39. data/vendored/puppet/lib/puppet_pal.rb +33 -7
  40. metadata +45 -83
  41. data/.gitignore +0 -33
  42. data/.gitmodules +0 -12
  43. data/.rspec +0 -2
  44. data/.rubocop.yml +0 -61
  45. data/.travis.yml +0 -18
  46. data/CODE_OF_CONDUCT.md +0 -46
  47. data/CONTRIBUTING.md +0 -27
  48. data/Gemfile +0 -9
  49. data/INSTALL.md +0 -70
  50. data/LICENSE +0 -201
  51. data/README.md +0 -353
  52. data/Rakefile +0 -27
  53. data/Vagrantfile +0 -13
  54. data/appveyor.yml +0 -29
  55. data/bolt.gemspec +0 -50
  56. data/docs/writing_tasks_and_plans.pdf +0 -0
  57. data/metadata.json +0 -13
  58. data/tasks/init.json +0 -3
  59. data/tasks/init.rb +0 -44
  60. data/ux/bolt-CLI-spec.md +0 -186
  61. data/vendored/puppet/lib/puppet/external/nagios/grammar.ry +0 -248
  62. data/vendored/puppet/lib/puppet/external/nagios/makefile +0 -9
  63. data/vendored/puppet/lib/puppet/face/help/action.erb +0 -86
  64. data/vendored/puppet/lib/puppet/face/help/face.erb +0 -114
  65. data/vendored/puppet/lib/puppet/face/help/global.erb +0 -16
  66. data/vendored/puppet/lib/puppet/face/help/man.erb +0 -152
  67. data/vendored/puppet/lib/puppet/generate/templates/type/pcore.erb +0 -42
  68. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/.fixtures.yml.erb +0 -7
  69. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/.gitignore +0 -18
  70. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/.rubocop.yml +0 -42
  71. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/.yardopts +0 -1
  72. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/Gemfile +0 -18
  73. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/README.md.erb +0 -89
  74. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/Rakefile +0 -32
  75. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/examples/init.pp.erb +0 -12
  76. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb +0 -48
  77. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/metadata.json.erb +0 -1
  78. data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/spec/classes/init_spec.rb.erb +0 -6
  79. data/vendored/puppet/lib/puppet/pops/model/ast.pp +0 -695
  80. data/vendored/puppet/lib/puppet/pops/parser/egrammar.ra +0 -937
  81. data/vendored/puppet/lib/puppet/pops/resource/resource_type_set.pcore +0 -22
  82. data/vendored/puppet/lib/puppet/util/libuser.conf +0 -15
  83. data/vendored/puppet/lib/puppet/vendor/deep_merge/CHANGELOG +0 -45
  84. data/vendored/puppet/lib/puppet/vendor/deep_merge/Gemfile +0 -3
  85. data/vendored/puppet/lib/puppet/vendor/deep_merge/LICENSE +0 -21
  86. data/vendored/puppet/lib/puppet/vendor/deep_merge/PUPPET_README.md +0 -6
  87. data/vendored/puppet/lib/puppet/vendor/deep_merge/README.md +0 -113
  88. data/vendored/puppet/lib/puppet/vendor/deep_merge/Rakefile +0 -19
  89. data/vendored/puppet/lib/puppet/vendor/deep_merge/deep_merge.gemspec +0 -35
  90. data/vendored/puppet/lib/puppet/vendor/pathspec/CHANGELOG.md +0 -2
  91. data/vendored/puppet/lib/puppet/vendor/pathspec/LICENSE +0 -201
  92. data/vendored/puppet/lib/puppet/vendor/pathspec/PUPPET_README.md +0 -6
  93. data/vendored/puppet/lib/puppet/vendor/pathspec/README.md +0 -53
  94. data/vendored/puppet/lib/puppet/vendor/semantic_puppet/locales/config.yaml +0 -21
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --require spec_helper
2
- --color
@@ -1,61 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.0
3
- Exclude:
4
- - 'vendor/**/*'
5
- - 'vendored/**/*'
6
-
7
- # Checks for if and unless statements that would fit on one line if written as a
8
- # modifier if/unless.
9
- Style/IfUnlessModifier:
10
- Enabled: false
11
-
12
- Style/StringLiterals:
13
- Enabled: false
14
-
15
- Style/Documentation:
16
- Enabled: false
17
-
18
- Style/BlockDelimiters:
19
- Enabled: false
20
-
21
- Style/NumericLiterals:
22
- Enabled: false
23
-
24
- Layout/IndentHeredoc:
25
- Enabled: false
26
-
27
- Style/GuardClause:
28
- Enabled: false
29
-
30
- Style/MultilineBlockChain:
31
- Enabled: false
32
-
33
-
34
- # Disable nearly all Metrics checks. These seem better off left to judgement.
35
-
36
- Metrics/AbcSize:
37
- Enabled: false
38
-
39
- Metrics/BlockLength:
40
- Enabled: false
41
-
42
- Metrics/BlockNesting:
43
- Enabled: false
44
-
45
- Metrics/ClassLength:
46
- Enabled: false
47
-
48
- Metrics/CyclomaticComplexity:
49
- Enabled: false
50
-
51
- Metrics/MethodLength:
52
- Enabled: false
53
-
54
- Metrics/ModuleLength:
55
- Enabled: false
56
-
57
- Metrics/ParameterLists:
58
- Enabled: false
59
-
60
- Metrics/PerceivedComplexity:
61
- Enabled: false
@@ -1,18 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.4
6
- - 2.0
7
- before_script:
8
- - cat Gemfile.lock
9
- script:
10
- - bundle exec rake unit rubocop
11
- notifications:
12
- email: false
13
- hipchat:
14
- rooms:
15
- secure: g7ViGa4EwzqVmbiu2RXk6BXJi3nfLIAMwCojJkD7d2OZ6hmButPP15jB4KaZ/3WTDKNO0elo1wcIdVCJBnZpELPAC32xdcQ43Ft6W5NVDaJwxO4xl836OLboIStSd+7W8raVcarCh5UTDvZbm/9B13o6uaL+GaP2Lpilr2GKZRAABw2hjC58vUBFMZvUN6q7oQ96up1NG6vpsZ3uCitPEvVemGn4kqC9dkLOWGZGRx21fTyL10ttQ5R21kQsp9efdlxyHqU3m96CNItw2yDHOKH3Z6FUtFwKyD+xzqOOAESt5ZgtT/g3XJK8koW2oKALSXwq+9eCfAisHQpotRciZY4pGoalVu3Zp000w26dJm0kDBdAmJ7LWVL3QK/qBxw00S+ODh1Du2WKLm+zAFYZ1O79LlnKQeDeqvL/Z+It8kMJrA/JUoQuyRrMouy5NAzjlGzZlC9kr2HUYzK2eBcxHfF8gJN0bnzalLnsR36RBgyDtLyuuIKouXo5GUkD/wDL+WbSuwejvWTDUxBATby5xq/VNwvgGJnXrAgs2HOR+k+V/dBeYjW5Ow4eqpGsnDT2EN4o6kmJDRubAMu6NIkJus5WKdyl/Q6BCvt7Gathzz1vUvhwhCt0elrkpeXYrq/g+MIHuLGl3IRbjTOy9gpcgbjRapRhwp/AzXY2EDqoGJM=
16
- template:
17
- - '<a href="https://github.com/%{repository_slug}">%{repository_name}</a>#<a href="%{build_url}">%{build_number}</a> (<a href="%{compare_url}">%{branch} - %{commit} : %{author}</a>): %{message}'
18
- format: html
@@ -1,46 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- ## Our Standards
8
-
9
- Examples of behavior that contributes to creating a positive environment include:
10
-
11
- * Using welcoming and inclusive language
12
- * Being respectful of differing viewpoints and experiences
13
- * Gracefully accepting constructive criticism
14
- * Focusing on what is best for the community
15
- * Showing empathy towards other community members
16
-
17
- Examples of unacceptable behavior by participants include:
18
-
19
- * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
- * Trolling, insulting/derogatory comments, and personal or political attacks
21
- * Public or private harassment
22
- * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
- * Other conduct which could reasonably be considered inappropriate in a professional setting
24
-
25
- ## Our Responsibilities
26
-
27
- Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
-
29
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
-
31
- ## Scope
32
-
33
- This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
-
35
- ## Enforcement
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at conduct@puppet.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
-
39
- Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
-
41
- ## Attribution
42
-
43
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
-
45
- [homepage]: http://contributor-covenant.org
46
- [version]: http://contributor-covenant.org/version/1/4/
@@ -1,27 +0,0 @@
1
- # Contributing
2
-
3
- ## Issues
4
-
5
- Please submit new issues on the GitHub issue tracker: https://github.com/puppetlabs/bolt/issues
6
-
7
- Internally, Puppet uses JIRA for tracking work, so nontrivial bugs or enhancement requests may migrate to JIRA tickets
8
- in the "BOLT" project: https://tickets.puppetlabs.com/browse/BOLT/
9
-
10
- ## Pull Requests
11
-
12
- Pull requests are also welcome on GitHub: https://github.com/puppetlabs/bolt
13
-
14
- As with other open-source projects managed by Puppet, Inc we require contributors to digitally sign the Contributor
15
- License Agreement before we can accept your pull request: https://cla.puppet.com
16
-
17
- ## Testing
18
-
19
- Some tests require a Windows or Linux VM. Execute `vagrant up` to bring these up with the Vagrantfile included with the `bolt` gem. Any tests that require this are tagged with `:vagrant` in rspec.
20
-
21
- To run all tests, run:
22
-
23
- $ bundle exec rake test
24
-
25
- To exclude tests that rely on Vagrant, run:
26
-
27
- $ bundle exec rake unit
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem "rubocop", require: false
6
-
7
- if File.exist? "Gemfile.local"
8
- eval_gemfile "Gemfile.local"
9
- end
data/INSTALL.md DELETED
@@ -1,70 +0,0 @@
1
- # Installation
2
-
3
- To use Bolt, you'll need to install:
4
-
5
- * Ruby 2.0 or greater
6
- * gcc and related dependencies (except on Windows)
7
- * Bolt gem
8
-
9
- ## Native Extensions
10
-
11
- Bolt is written entirely in Ruby, but it depends on gems containing native
12
- extensions. In order to install bolt on a supported platform, you will need a
13
- gcc compiler and related dependencies (except for Windows).
14
-
15
- ### CentOS 7/Redhat 7
16
-
17
- yum install -y make gcc ruby-devel
18
-
19
- ### Fedora 25
20
-
21
- dnf install -y make gcc redhat-rpm-config ruby-devel rubygem-rdoc
22
-
23
- ### Debian 9/Ubuntu 16.04
24
-
25
- apt-get install -y make gcc ruby-dev
26
-
27
- ### OSX
28
-
29
- Either install XCode or the Command Line Tools. The latter can be done from the command line:
30
-
31
- xcode-select --install
32
-
33
- ### Windows
34
-
35
- Install [Chocolatey](https://chocolatey.org/install), then install `ruby`. It isn't necessary
36
- to install `ruby.devkit`, as ffi already publishes precompiled gems for Windows x86 and x64.
37
-
38
- choco install ruby
39
- refreshenv
40
-
41
- ## Installing Bolt
42
-
43
- Bolt can be installed 3 ways depending on your use case. The most common case is
44
- to install from [RubyGems](https://rubygems.org).
45
-
46
- gem install bolt
47
-
48
- Since bolt is not public yet, you will need to install the gem from our internal
49
- mirror, and specify a version to ensure you get the latest version:
50
-
51
- gem install bolt --source http://rubygems.delivery.puppetlabs.net
52
-
53
- Or add this to your Gemfile if you are using [Bundler](https://bundler.io), and
54
- specify your gem `source` as `http://rubygems.delivery.puppetlabs.net`
55
-
56
- gem 'bolt'
57
-
58
- Or if running from source
59
-
60
- git submodule update --init --recursive
61
- bundle install --path .bundle
62
- bundle exec bolt ...
63
-
64
- See `bolt --help` for more details.
65
-
66
- ## Installing Puppet
67
-
68
- Bolt vendors a version of puppet that supports executing tasks and plans, so you do not need
69
- to install puppet. If you happen to already have puppet installed, then the vendored version
70
- will take precedence and will not conflict with the already installed version.
data/LICENSE DELETED
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "{}"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright {yyyy} {name of copyright owner}
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
data/README.md DELETED
@@ -1,353 +0,0 @@
1
- # Bolt
2
-
3
- [![Travis Status](https://api.travis-ci.com/puppetlabs/bolt.svg?token=XsSSSxJhnBoKnL8JPVay&branch=master)](https://travis-ci.com/puppetlabs/bolt)
4
- [![Appveyor Status](https://ci.appveyor.com/api/projects/status/m7dhiwxk455mkw2d/branch/master?svg=true)](https://ci.appveyor.com/project/puppetlabs/bolt/branch/master)
5
- [![Gem Version](https://badge.fury.io/rb/bolt.svg)](https://badge.fury.io/rb/bolt)
6
-
7
- Bolt is a Ruby command-line tool for executing commands, scripts, and tasks on remote systems using SSH and WinRM.
8
-
9
- * Executes commands on remote *nix and Windows systems.
10
- * Distributes and execute scripts, such as Bash, PowerShell, Python.
11
- * Scales to more than 1000 concurrent connections.
12
- * Supports industry standard protocols (SSH/SCP, WinRM/PSRP) and authentication methods (password, publickey).
13
-
14
- ## Supported platforms
15
-
16
- * Linux, OSX, Windows
17
- * Ruby 2.0+
18
-
19
- ## Installation
20
-
21
- Install Bolt as a gem by running `gem install bolt`.
22
-
23
- See [INSTALL.md](./INSTALL.md) for other ways of installing Bolt and for how to build the native extensions that Bolt depends on.
24
-
25
- ## Running `bolt` commands
26
-
27
- Bolt executes ad hoc commands, runs scripts, transfers files, and runs tasks or task plans on remote nodes from a controller node, such as your laptop or workstation.
28
-
29
- When you run `bolt` commands, you must specify the nodes that you want Bolt to execute commands on. You can also specify your username and password for nodes that require credentials.
30
-
31
- Bolt connects to remote nodes over SSH by default. To connect over WinRM, you must specify the WinRM protocol when you specify target nodes.
32
-
33
- ### Specifying nodes
34
-
35
- You must specify the target nodes on which to execute `bolt` commands.
36
-
37
- For most `bolt` commands, specify the target nodes with the `--nodes` flag when you run the command. Multiple nodes should be comma-separated, such as `--nodes neptune,saturn,mars`. When targeting WinRM machines, you must specify the WinRM protocol in the nodes string. For example, `--nodes winrm://mywindowsnode.mydomain`
38
-
39
- The `bolt run plan` command does not accept the `--nodes` flag. For plans, specify nodes as a list within the task plan itself or specify them as regular parameters, like `nodes=neptune`.
40
-
41
- ### Specifying connection credentials
42
-
43
- If you're running `bolt` commands targeting nodes that require a username and password, you must pass those credentials as options on the command line.
44
-
45
- Bolt connects to remote nodes with either SSH or WinRM. You can manage SSH connections with an SSH configuration file (`~/.ssh/config`) on the controller node or specify the username and password on the command line. WinRM connections always require you to pass the username and password with the `bolt` command.
46
-
47
- For example, this command targets a WinRM node:
48
-
49
- ```
50
- bolt command run 'gpupdate /force' --nodes winrm://pluto --user Administrator --password <password>
51
- ```
52
-
53
- ## Running arbitrary commands
54
-
55
- Bolt can execute arbitrary commands on remote nodes. Specify the command you want to run and what nodes to run the command on.
56
-
57
- Specify nodes with node flag, `--nodes` or `-n`. When executing against WinRM nodes, specify the WinRM protocol in the nodes string.
58
-
59
- bolt command run <COMMAND> --nodes <NODE>
60
-
61
- bolt command run <COMMAND> --nodes winrm://mywindowsnode.mydomain --user <USERNAME> --password <PASSWORD>
62
-
63
- If the command contains spaces or shell special characters, then you must single quote the command:
64
-
65
- bolt command run '<COMMAND> <ARG1> ... <ARGN>' --nodes <NODE>
66
-
67
- ## Running scripts
68
-
69
- Bolt can copy a script from the local system to the remote system, and then execute it on the remote system.
70
-
71
- You can write the script in any language (such as Bash, PowerShell, or Python), providing the appropriate interpreter is installed on the remote system. You must specify the interpreter with a shebang line to execute the script on remote *nix systems.
72
-
73
- For example, for a script written in bash, indicate the bash interpreter with a shebang line:
74
-
75
- ```
76
- #!/bin/bash
77
-
78
- echo hello
79
- ```
80
-
81
- To run the script, specify the path to the script and what nodes to run it on. When running a script on WinRM nodes, specify the WinRM protocol in the nodes string.
82
-
83
- ```
84
- bolt script run <PATH/TO/SCRIPT> --nodes <NODE>
85
- ```
86
-
87
- ```
88
- bolt script run <PATH/TO/SCRIPT> --nodes winrm://<NODE> --user <USERNAME> --password <PASSWORD>
89
- ```
90
-
91
- On *nix, Bolt ensures that the script is executable on the remote system before executing it. On remote Windows systems, Bolt currently supports only PowerShell scripts.
92
-
93
- ## Copying files
94
-
95
- Bolt can transfer files from the controller node to specified target nodes.
96
-
97
- To transfer a file, run `bolt file upload`, specifying the local path to the file and the destination location on the target node: `bolt file upload <SOURCE> <DESTINATION>`
98
-
99
- For example:
100
-
101
- ```
102
- bolt file upload my_file.txt /tmp/remote_file.txt -n node1,node2
103
- ```
104
-
105
- ## Running tasks
106
-
107
- Tasks are similar to scripts, except that tasks must receive input in a specific way. Tasks are also distributed in Puppet modules, so you can write, publish, and download tasks for common operations.
108
-
109
- To execute a task, run `bolt task run`, specifying:
110
-
111
- * The full name of the task, formatted as `<MODULE::TASK>`, or as `<MODULE>` for `init` tasks.
112
- * Any task parameters, as `parameter=value`.
113
- * The nodes to run the task on and the protocol, if WinRM, with the `--nodes` flag.
114
- * The module path that contains the module containing the task, with the `--modules` flag.
115
- * If required, the username and password to connect to the node, with the `--username` and `--password` flags.
116
-
117
-
118
- For example, to run the sql task from the mysql module on the `neptune` node:
119
-
120
- ```
121
- bolt task run mysql::sql database=mydatabase sql="SHOW TABLES" --nodes neptune --modules ~/modules
122
- ```
123
-
124
- To run an `init` task, call the task by the module name only, and set the task parameters. For example, to run the status action from the package module:
125
-
126
- ```
127
- bolt run package action=status package=vim --nodes neptune --modules ~/modules
128
- ```
129
-
130
- ## Running plans
131
-
132
- Plans allow you to string several tasks together, and can include additional logic to trigger specific tasks.
133
-
134
- To execute a plan, run `bolt plan run`, specifying:
135
-
136
- * The full name of the plan, formatted as `<MODULE>::<PLAN>`.
137
- * Any plan parameters, as `parameter=value`.
138
- * The nodes to run the plan on and the protocol, if WinRM, as parameters to the plan: `parameters=value`. The `run plan` command ignores the `--nodes` flag.
139
- * The module path that contains the plan module, with the `--modules` flag.
140
- * If required, the username and password to connect to the node, with the `--username` and `--password` flags.
141
-
142
- For example, if a plan defined in `mymodule/plans/myplan.pp` accepts a `load_balancer` parameter to specify a node on which to run tasks or functions in the plan, run:
143
-
144
- ```
145
- bolt plan run mymodule::myplan --modules ./PATH/TO/MODULES load_balancer=lb.myorg.com​
146
- ```
147
-
148
- ### Specifying the module path
149
-
150
- When executing tasks or plans, you must specify the `--modules` option as the directory containing the module. Specify this option in the format `--modules /path/to/modules`, should correspond to a directory structure:
151
-
152
- ```
153
- /path/to/modules/
154
- mysql/
155
- tasks/
156
- sql
157
- ```
158
-
159
- ### Specifying parameters
160
-
161
- Tasks can receive input as either environment variables or a JSON hash on standard input. By default, Bolt submits parameters as both environment variables and stdin.
162
-
163
- When executing the task, specify the parameter value on the command line in the format `parameter=value`. Pass multiple parameters as a space-separated list.
164
-
165
- For example, to run mysql tasks against a database called 'mydatabase', specify the database parameter as `database=mydatabase`.
166
-
167
- When you run a command with this parameter, Bolt sets the task's `database` value to mydatabase before it executes the task. It also submits the parameters as JSON to stdin:
168
-
169
- ```json
170
- {
171
- "database":"mydatabase"
172
- }
173
- ```
174
-
175
- Alternatively, you can specify parameters as either a JSON blob or a parameter file with the `--params` flag.
176
-
177
- To specify parameters as a JSON blob, use the parameters flag: `--params '{"database": "mydatabase"}'`
178
-
179
- To set parameters in a file, create a file called `params.json` and specify parameters there in JSON format.
180
-
181
- For example, in your `params.json` file, specify:
182
-
183
- ```json
184
- {
185
- "database":"mydatabase"
186
- }
187
- ```
188
-
189
- Then specify that file on the command line with the parameters flag: `--params @params.json`
190
-
191
- ### Configuring Puppet Orchestrator for Bolt
192
-
193
- Bolt can use the Puppet orchestrator to target nodes using the `pcp` protocol when running on linux.
194
-
195
- 1. Configure `~/.puppetlabs/client-tools/orchestrator.conf` to include
196
- service-url and cacert options to connect to you puppet master.
197
- 1. Store a PE RBAC token in `~/.puppetlabs/token`.
198
- 1. Install the bolt helper task `tasks/init` by installing this repository into
199
- the production environment on your puppet master. Without this task the
200
- exec, script and file commands will not work in Bolt.
201
- 1. To run tasks over orchestrator the tasks must be installed both on the bolt
202
- node and into the production environment on the master
203
-
204
- ## Usage examples
205
-
206
- ### Get help
207
-
208
- $ bolt --help
209
- Usage: bolt <subcommand> <action> [options]
210
- ...
211
-
212
- ### Run a command over SSH
213
-
214
- $ bolt command run 'ssh -V' --nodes neptune
215
- neptune:
216
-
217
- OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
218
-
219
- Ran on 1 node in 0.27 seconds
220
-
221
- ### Run a command over SSH against multiple hosts
222
-
223
- $ bolt command run 'ssh -V' --nodes neptune,mars
224
- neptune:
225
-
226
- OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
227
-
228
- mars:
229
-
230
- OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013
231
-
232
- Ran on 2 nodes in 0.27 seconds
233
-
234
- ### Run a command over WinRM
235
-
236
- $ bolt command run 'gpupdate /force' --nodes winrm://pluto --user Administrator --password <password>
237
- pluto:
238
-
239
- Updating policy...
240
-
241
- Computer Policy update has completed successfully.
242
-
243
- User Policy update has completed successfully.
244
-
245
- Ran on 1 node in 11.21 seconds
246
-
247
- ### Run a command over WinRM against multiple hosts
248
-
249
- $ bolt command run '(Get-CimInstance Win32_OperatingSystem).version' --nodes winrm://pluto,winrm://mercury --user Administrator --password <password>
250
- pluto:
251
-
252
- 6.3.9600
253
-
254
- mercury:
255
-
256
- 10.0.14393
257
-
258
- Ran on 2 nodes in 6.03 seconds
259
-
260
- ### Run a bash script
261
-
262
- $ bolt script run ./install-puppet-agent.sh --nodes neptune
263
- neptune: Installed puppet-agent 5.1.0
264
-
265
- ### Run a PowerShell script
266
-
267
- $ bolt script run Get-WUServiceManager.ps1 --nodes winrm://pluto --user Administrator --password <password>
268
- pluto:
269
-
270
- Name : Windows Server Update Service
271
- ContentValidationCert : {}
272
- ExpirationDate : 6/18/5254 9:21:00 PM
273
- IsManaged : True
274
- IsRegisteredWithAU : True
275
- IssueDate : 1/1/2003 12:00:00 AM
276
- OffersWindowsUpdates : True
277
- RedirectUrls : System.__ComObject
278
- ServiceID : 3da21691-e39d-4da6-8a4b-b43877bcb1b7
279
- IsScanPackageService : False
280
- CanRegisterWithAU : True
281
- ServiceUrl :
282
- SetupPrefix :
283
- IsDefaultAUService : True
284
-
285
- ### Run the `sql` task from the `mysql` module
286
-
287
- $ bolt task run mysql::sql database=mydatabase sql="SHOW TABLES" --nodes neptune --modules ~/modules
288
-
289
- ### Run the special `init` task from the `service` module
290
-
291
- $ bolt task run service name=apache --nodes neptune --modules ~/modules
292
- neptune:
293
-
294
- { status: 'running', enabled: true }
295
-
296
- ### Upload a file
297
-
298
- $ bolt file upload /local/path /remote/path --nodes neptune
299
- neptune:
300
-
301
- Uploaded file '/local/path' to 'neptune:/remote/path'
302
-
303
- ### Run the `deploy` plan from the `webserver` module
304
-
305
- $ bolt plan run webserver::deploy version=1.2 --modules ~/modules
306
-
307
- Deployed app version 1.2.
308
-
309
- Note the `--nodes` option is not used with plans, as they can contain more complex logic about where code is run. A plan can use normal parameters to accept nodes when applicable, as in the next example.
310
-
311
- ### Run the `single_task` plan from the `sample` module in this repo
312
-
313
- $ bolt plan run sample::single_task nodes=neptune --modules spec/fixtures/modules
314
- neptune got passed the message: hi there
315
-
316
- ## Kudos
317
-
318
- Thank you to [Marcin Bunsch](https://github.com/marcinbunsch) for allowing Puppet to use the `bolt` gem name.
319
-
320
- ## Contributing
321
-
322
- We welcome error reports and pull requests to Bolt. See
323
- [CONTRIBUTING.md](./CONTRIBUTING.md) for how to help.
324
-
325
- ## FAQ
326
-
327
- ### Bolt requires Ruby >= 2.0
328
-
329
- Trying to install Bolt on Ruby 1.9 fails. You must use Ruby 2.0 or greater.
330
-
331
- ### Bolt fails to install
332
-
333
- If you do not have the native extensions Bolt requires, you might get an error like:
334
-
335
- ```
336
- ERROR: Error installing bolt:
337
- ERROR: Failed to build gem native extension.
338
- ```
339
-
340
- See [Native Extensions](./INSTALL.md#native-extensions) for installation instructions.
341
-
342
- ### Bolt raises the error `Puppet must be installed to execute tasks`
343
-
344
- When using the bolt gem from source, you may receive the error `Puppet must be installed to execute tasks` when trying to run tasks or plans. See [INSTALL.md](./INSTALL.md) on how to install Bolt from source.
345
-
346
- ### Bolt user and password cannot be specified when running plans
347
-
348
- In order to execute a plan, Bolt must be able to SSH (typically using ssh-agent) to each node. For Windows hosts requiring WinRM, plan execution will fail. See [BOLT-85](https://tickets.puppet.com/browse/BOLT-85).
349
-
350
- ## License
351
-
352
- The gem is available as open source under the terms of the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).
353
-