From dc74c2b5eab64d9dab8d1343b5fc84fe9bce7604 Mon Sep 17 00:00:00 2001 From: Lucy Wyman Date: Mon, 17 Dec 2018 21:18:58 -0800 Subject: [PATCH 1/2] Create bolt.md for puppet-bolt tool This adds a cheatsheet for [bolt](https://github.com/puppetlabs/bolt) --- bolt.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 bolt.md diff --git a/bolt.md b/bolt.md new file mode 100644 index 000000000..00b8c3456 --- /dev/null +++ b/bolt.md @@ -0,0 +1,40 @@ +--- +title: Bolt Quickstart +category: Bolt +layout: 2017/sheet +updated: 2018-12-17 +keywords: + - Puppet + - tasks + - modules +description: | + A quick guide to getting started writing Bolt tasks +--- + +### Install Bolt + +```bash +# On MacOS +brew cask install puppetlabs/puppet/puppet-bolt +# On Windows +choco install puppet-bolt +``` + +Bolt is available as a package for most platforms. See [installing bolt](https://puppet.com/docs/bolt/latest/bolt_installing.html) + +### Create a module with a task + +```bash +mkdir -p ~/.puppetlabs/bolt/modules/mymodule/tasks +cp myscript.sh ~/.puppetlabs/bolt/modules/mymodule/tasks/ +``` + +Tasks can be written in any language your targets can run. See [writing tasks](https://puppet.com/docs/bolt/latest/writing_tasks.html) for more details. + +### Run Bolt + +```bash +bolt task run mymodule::myscript -n node1.example.com,node2.example.com --private-key ~/.ssh/id_rsa-private +``` + +See `bolt task run --help` for more information and command line options. \ No newline at end of file From 11a00de0db4f9362b446247e11beaf95724d1db8 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Tue, 25 Dec 2018 20:31:39 +0800 Subject: [PATCH 2/2] bolt: Add attribution --- bolt.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bolt.md b/bolt.md index 00b8c3456..a5a5a823c 100644 --- a/bolt.md +++ b/bolt.md @@ -2,7 +2,9 @@ title: Bolt Quickstart category: Bolt layout: 2017/sheet -updated: 2018-12-17 +updated: 2018-12-25 +authors: + - github: lucywyman keywords: - Puppet - tasks @@ -37,4 +39,4 @@ Tasks can be written in any language your targets can run. See [writing tasks](h bolt task run mymodule::myscript -n node1.example.com,node2.example.com --private-key ~/.ssh/id_rsa-private ``` -See `bolt task run --help` for more information and command line options. \ No newline at end of file +See `bolt task run --help` for more information and command line options.