Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Itamae::NodeEnv

Gem Version

itamae-node_env gem is an Itamae plugin. Using itamae-node_env, you can use environment variables in node attributes.

Installation

Add this line to your application's Gemfile:

gem 'itamae-node_env'

And then execute:

$ bundle

Or install it yourself as:

$ gem install itamae-node_env

Usage

recipe.rb:

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

node.json:

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

Execute Itamae with itamae-env command:

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

With dotenv

Add this line to Gemfile:

gem "dotenv"

Make .env file:

IR_PASSWORD="password"

And execute itamae-env command.

Contributing

  1. Fork it ( https://github.com/nownabe/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

About

An itamae plugin to use environment variables for node object.

Resources

License

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

You can’t perform that action at this time.