Skip to content

Commit ff2415e

Browse files
committed
Update readme
1 parent 8db0540 commit ff2415e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,25 @@ Deploys SSH keys
2121
| `authorized_keys` | Array | `[]` | Array of strings representing authorized SSH public keys |
2222
| `authorized_users` | Array | `[]` | Array of strings representing authorized users (found in the databag) |
2323

24+
## LWRP
25+
26+
This cookbook provides one resource:
27+
28+
### `ssh_keys_key`
29+
30+
```ruby
31+
ssh_keys_key 'john' do
32+
authorized_keys [
33+
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmz4D...',
34+
'ssh-rsa sFE5JafGV4UmfxGP5/vpAAADWC8HcoQAyYT...'
35+
]
36+
authorized_users %w(bob joe)
37+
end
38+
39+
```
40+
41+
This resource will add authorized keys from the provided list (`authorized_keys`) and from users declared in the databag (`bob` and `joe`) to the `john` user.
42+
2443
## Databag
2544

2645
The databag is an `Hash` with usernames as keys. Each user can have a list of keypairs (as an `Array`).

0 commit comments

Comments
 (0)