Sha256: 494fcf8cbbcde76a9233e2146cbd17ac7e028cff6bcfe1a3a9d889b3420efa04

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

# Itamae::NodeEnv

itamae-node_env gem is an [Itamae](https://github.com/ryotarai/itamae) plugin.
Using itamae-node_env, you can use environment variables in node attributes.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'itamae-node_env'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install itamae-node_env

## Usage

recipe.rb:

```ruby
require 'itamae/node_env'

file '/home/someone/.ssh/id_rsa' do
  content node["secret_key"]
  mode "0600"
  owner "someone"
  group "someone"
end
```

node.json:

```json
{"secret_key": "env[IR_SECRET_KEY]"}
```

Execute itamae:

```bash
export IR_SECRET_KEY="$(cat ./id_rsa_for_someone)"
bundle exec itamae ssh -h target_host --node-json node.json recipe.rb
```

## Contributing

1. Fork it ( https://github.com/[my-github-username]/itamae-node_env/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
itamae-node_env-0.0.5 README.md
itamae-node_env-0.0.4 README.md
itamae-node_env-0.0.3 README.md