Skip to content

Commit

Permalink
Renamed --file to --playbook & SPOT_FILE to SPOT_PLAYBOOK
Browse files Browse the repository at this point in the history
  • Loading branch information
bessarabov authored and umputun committed May 2, 2023
1 parent 0a756f1 commit bee255f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Spot (aka `simplotask`) is a powerful and easy-to-use tool for effortless deploy

Spot supports the following command-line options:

- `-p`, `--file=`: Specifies the playbook file to be used. Defaults to `spot.yml`. You can also set the environment
variable `$SPOT_FILE` to define the playbook file path.
- `-p`, `--playbook=`: Specifies the playbook file to be used. Defaults to `spot.yml`. You can also set the environment
variable `$SPOT_PLAYBOOK` to define the playbook file path.
- `-t`, `--task=`: Specifies the task name to execute. The task should be defined in the playbook file.
If not specified all the tasks will be executed.
- `-d`, `--target=`: Specifies the target name to use for the task execution. The target should be defined in the playbook file and can represent remote hosts, inventory files, or inventory URLs. If not specified the `default` target will be used. User can pass a host name or IP instead of the target name for a quick override. Providing the `-d`, `--target` flag multiple times with different targets sets multiple destination targets or multiple hosts, e.g., `-d prod -d dev` or `-d example1.com -d example2.com`.
Expand Down
2 changes: 1 addition & 1 deletion app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type options struct {
AdHocCmd string `positional-arg-name:"command" description:"run ad-hoc command on target hosts"`
} `positional-args:"yes" positional-optional:"yes"`

PlaybookFile string `short:"p" long:"file" env:"SPOT_FILE" description:"playbook file" default:"spot.yml"`
PlaybookFile string `short:"p" long:"playbook" env:"SPOT_PLAYBOOK" description:"playbook file" default:"spot.yml"`
TaskName string `short:"t" long:"task" description:"task name"`
Targets []string `short:"d" long:"target" description:"target name" default:"default"`
Concurrent int `short:"c" long:"concurrent" description:"concurrent tasks" default:"1"`
Expand Down
2 changes: 1 addition & 1 deletion app/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func Test_main(t *testing.T) {
hostAndPort, teardown := startTestContainer(t)
defer teardown()

args := []string{"simplotask", "--dbg", "--file=runner/testdata/conf-local.yml", "--user=test", "--key=runner/testdata/test_ssh_key", "--target=" + hostAndPort}
args := []string{"simplotask", "--dbg", "--playbook=runner/testdata/conf-local.yml", "--user=test", "--key=runner/testdata/test_ssh_key", "--target=" + hostAndPort}
os.Args = args
main()
}
Expand Down

0 comments on commit bee255f

Please sign in to comment.