README.md in rezept-0.0.2 vs README.md in rezept-0.1.0
- old
+ new
@@ -1,7 +1,9 @@
# Rezept
+[![Gem Version](https://badge.fury.io/rb/rezept.svg)](https://badge.fury.io/rb/rezept)
+
A tool to manage EC2 Systems Manager (SSM) Documents with programmable DSL.
## Installation
Add this line to your application's Gemfile:
@@ -99,10 +101,37 @@
[--amazon-docs], [--no-amazon-docs] # Include Amazon owned documents
[--dsl-content], [--no-dsl-content] # Convert JSON contents to DSL
# Default: true
```
+#### run_command
+Run the commands
+
+```
+$ rezept help run_command
+Usage:
+ rezept run_command -n, --name=NAME
+
+Options:
+ -n, --name=NAME # Name of the document
+ -i, [--instance-ids=one two three] # EC2 Instance IDs
+ -t, [--tags=key:value] # EC2 Instance tags
+ -p, [--parameters=key:value] # Parameters for the document
+ [--dry-run], [--no-dry-run] # Dry run (Only output the targets)
+ [--wait], [--no-wait] # Wait and check for all results
+ -f, [--file=FILE] # Configuration file
+ # Default: Docfile
+ [--color], [--no-color] # Disable colorize
+ # Default: true
+ [--amazon-docs], [--no-amazon-docs] # Include Amazon owned documents
+ [--dsl-content], [--no-dsl-content] # Convert JSON contents to DSL
+ # Default: true
+```
+
+- If you specify multiple values to `tags` and `parameters`, separate them with commas(`,`).
+- When you use the `wait` option, the exit code will be `0` if the commands succeed on the all instances, else it will be `1`.
+
## Advanced methods
#### Script styled commands (__script)
- Docfile
@@ -116,11 +145,11 @@
description "my Run a shell script or specify the path to a script to run."
mainSteps do |*|
action "aws:runShellScript"
name "runShellScript"
inputs do
- commands __script(<<-'EOS')
+ runCommand __script(<<-'EOS')
#! /bin/bash
echo 1
echo 2
echo 3
EOS
@@ -143,11 +172,11 @@
"mainSteps": [
{
"action": "aws:runShellScript",
"name": "runShellScript",
"inputs": {
- "commands": [
+ "runCommand": [
"#! /bin/bash",
"echo 1",
"echo 2",
"echo 3"
]
@@ -170,11 +199,11 @@
description "my Run a shell script or specify the path to a script to run."
mainSteps do |*|
action "aws:runShellScript"
name "runShellScript"
inputs do
- commands __script_file("script.sh")
+ runCommand __script_file("script.sh")
end
end
end
end
end
@@ -201,11 +230,11 @@
"mainSteps": [
{
"action": "aws:runShellScript",
"name": "runShellScript",
"inputs": {
- "commands": [
+ "runCommand": [
"#! /bin/bash",
"echo 1",
"echo 2",
"echo 3"
]
@@ -227,11 +256,11 @@
description "Run a shell script"
mainSteps do |*|
action "aws:runShellScript"
name "runShellScript"
inputs do
- commands __script(context.commands)
+ runCommand __script(context.commands)
end
end
end
end
end
@@ -254,10 +283,10 @@
"mainSteps": [
{
"action": "aws:runShellScript",
"name": "runShellScript",
"inputs": {
- "commands": [
+ "runCommand": [
"echo 1"
]
}
}
]