itamae-node_env 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +27 -2
- data/lib/itamae/node_env/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a97b8dc6a79ea7ef83c1c132f0172710c68ba024
|
4
|
+
data.tar.gz: d80bf7274947a281a316951693c4be2d432883e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 759531337c883c26228982b477255bcecb9f721d1577b368d8d11ce6a377ddac886b39f721340e832a3212916ffc73e0fcd39b69f5f8feb2ee037304d3c584df
|
7
|
+
data.tar.gz: aa12dd580a859da925eac9e4e5cc13d5973719dad5d2e7fad85dc1d861e91fc2340fe204e497cba6778adc9d6ea17c6e5e1947a2d59daeb90a54c3bd13faf741
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Itamae::NodeEnv
|
2
2
|
|
3
|
-
|
3
|
+
itamae-node_env gem is an [Itamae](https://github.com/ryotarai/itamae) plugin.
|
4
|
+
Using itamae-node_env, you can use environment variables in node attributes.
|
4
5
|
|
5
6
|
## Installation
|
6
7
|
|
@@ -20,7 +21,31 @@ Or install it yourself as:
|
|
20
21
|
|
21
22
|
## Usage
|
22
23
|
|
23
|
-
|
24
|
+
recipe.rb:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'itamae/node_env'
|
28
|
+
|
29
|
+
file '/home/someone/.ssh/id_rsa' do
|
30
|
+
content node["secret_key"]
|
31
|
+
mode "0600"
|
32
|
+
owner "someone"
|
33
|
+
group "someone"
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
node.json:
|
38
|
+
|
39
|
+
```json
|
40
|
+
{"secret_key": "env[IR_SECRET_KEY]"}
|
41
|
+
```
|
42
|
+
|
43
|
+
Execute itamae:
|
44
|
+
|
45
|
+
```bash
|
46
|
+
IR_SECRET_KEY="$(cat ./id_rsa_for_someone)"
|
47
|
+
bundle exec itamae ssh -h target_host --node-json node.json recipe.rb
|
48
|
+
```
|
24
49
|
|
25
50
|
## Contributing
|
26
51
|
|