<commit_before># ec2-facts
NPM Package to save AWS EC2 Instance Metadata into a Puppet Custom Facts

## Installation

```
$ sudo npm install ec2-facts -g
```

> **Current Release**
>
> Alpha version is here! A lot of changes is on the way!

## Notes on Alpha Version  

1. Currently fetches only 2 metadata:
  * instance-id
  * availability-zone
  * _more metadata on next release :)_

2. Facts are saved in JSON format.
3. Default external facts folder is: `/etc/facter/facts.d`<commit_msg>Added Configuration & Usage section in README<commit_after># ec2-facts
NPM Package to save AWS EC2 Instance Metadata into a Puppet Custom Facts

## Installation

```
$ sudo npm install -g ec2-facts
```

> **Current Release**
>
> Alpha version is here! A lot of changes is on the way!

## Configuration

`ec2-facts` searches and reads a JSON formatted file named `ec2-facts.conf.json` in `/etc`.

| Configuration Parameter | Description |
| --- | --- |
| `externalFactsFolder`| Location of Facter's external facts |

```
{
  "externalFactsFolder":"/some/folder"
}
```


## Usage

```
# ec2-facts
```

## Notes on Alpha Version  

1. Currently fetches only 2 metadata:
  * instance-id
  * availability-zone
  * _more metadata on next release :)_

2. Facts are saved in JSON format.
3. Default external facts folder is: `/etc/facter/facts.d`
{'fraction_non_alphanumeric': 0.11286681715575621, 'fraction_numerical': 0.012791572610985704, 'mean_word_length': 3.6996466431095407, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1479190', 'n_tokens_mistral': 446, 'n_tokens_neox': 414, 'n_words': 161}