<commit_before>[![Gem Version](https://badge.fury.io/rb/chef-metal-ssh.svg)](http://badge.fury.io/rb/chef-metal-ssh)

# ChefMetalSsh

TODO: Write a gem description

## Installation

Add this line to your application's Gemfile:

    gem 'chef-metal-ssh'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install chef-metal-ssh

## Usage

		machine "one" do
		  action :create
		  converge true
		  provisioner ChefMetalSsh::SshProvisioner.new
		  provisioner_options 'target_ip' => '192.168.33.21',
		                      'ssh_user' => 'vagrant',
		                      'ssh_options' => {
		                        'password' => '<PASSWORD>'
		                      }
		  recipe 'ssh_test::remote1'
		  notifies :create, 'machine[two]'
		  notifies :run, 'execute[run_touch1]'
		end

To test it out, clone the repo:

`git clone https://github.com/double-z/chef-metal-ssh.git`

in the root there is a Vagrantfile with 3 nodes, 1 master and 2 targets. 

FYI, nothing will get installed on your local machine in this process. 

Run:

`vagrant up`

which will bring up all 3 nodes. 

So then ssh to the master:

`vagrant ssh master`

the repo test directory has a test cookbook and `run_zero` script. its located at `/vagrant/test`
<commit_msg>updating README<commit_after>[![Gem Version](https://badge.fury.io/rb/chef-metal-ssh.svg)](http://badge.fury.io/rb/chef-metal-ssh)

# ChefMetalSsh

TODO: Write a gem description

## Installation

Add this line to your application's Gemfile:

    gem 'chef-metal-ssh'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install chef-metal-ssh

## Usage

* valid machine options: one of the two is required, ip address is boss if both given

        :ip_address,
        :fqdn - this can be a shortname too as long as it resolves


* valid ssh options

        :auth_methods, 
        :bind_address, 
        :compression, 
        :compression_level, 
        :config,
        :encryption, 
        :forward_agent, 
        :hmac, 
        :host_key,
        :keepalive, 
        :keepalive_interval, 
        :kex, 
        :keys, 
        :key_data,
        :languages, 
        :logger, 
        :paranoid, 
        :password, 
        :port, 
        :proxy,
        :rekey_blocks_limit,
        :rekey_limit, 
        :rekey_packet_limit, 
        :timeout, 
        :verbose,
        :global_known_hosts_file, 
        :user_known_hosts_file, 
        :host_key_alias,
        :host_name, 
        :user, 
        :properties, 
        :passphrase, 
        :keys_only, 
        :max_pkt_size,
        :max_win_size, :send_env, 
        :use_agent

* machine resource example:

		require 'chef_metal_ssh'
		
		with_ssh_cluster("~/metal_ssh")

		machine "one" do
		  action [:create, :converge]
		  machine_options 'ip_address' => '192.168.33.21',
		                  'ssh_options' => {
		                    'user' => 'vagrant',
		                    'password' => '<PASSWORD>'
		                  }
		  recipe 'ssh_test::remote1'
		  notifies :create, 'machine[two]'
		  notifies :run, 'execute[run_touch1]'
		end


To test it out, clone the repo:

`git clone https://github.com/double-z/chef-metal-ssh.git`

in the root there is a Vagrantfile with 3 nodes, 1 master and 2 targets. 

FYI, nothing will get installed on your local machine in this process. 

Run:

`vagrant up`

which will bring up all 3 nodes. 

So then ssh to the master:

`vagrant ssh master`

the repo test directory has a test cookbook and `run_zero` script. its located at `/vagrant/test`

{'fraction_non_alphanumeric': 0.1014370245139476, 'fraction_numerical': 0.009016624401239785, 'mean_word_length': 2.2479414455626716, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '274320', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1142, 'n_words': 329}