summaryrefslogtreecommitdiff
path: root/examples/cli/README.md
blob: d393a9c4f7bd9a8d9ec5f90bb9935b0225a3df4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Example: Via CLI

Uses RCM through the `rcm` command-line tool.

## Usage

```sh
# Dry run — show what would change, make no changes
rcm config.rb --dry

# Verbose output
rcm config.rb --debug

# Limit execution to specific hosts
rcm config.rb --hosts earth,mars

# Apply configuration
rcm config.rb
```

## What it does

- Creates `/tmp/example/hello.txt` with static content (parent directory created automatically)
- Creates `/tmp/example/info.txt` from an inline ERB template containing the hostname and current date

Both operations only run when the current hostname is `earth`.