Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hiroakis/inventoryfile

Inventoryfile. A parser for ansible inventory file which is an INI like formatted file.
https://github.com/hiroakis/inventoryfile

Last synced: 14 days ago
JSON representation

Inventoryfile. A parser for ansible inventory file which is an INI like formatted file.

Awesome Lists containing this project

README

        

# Inventoryfile

Inventoryfile. A parser for ansible inventory file which is an INI like formatted file.

## Installation

```ruby
gem 'inventoryfile'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install inventoryfile

## Usage

* get items on specified section

```
require 'inventoryfile'

parser = Inventoryfile::Parser.new("PATH_TO_FILE")
parser.items("SECTION_NAME")
```

* get sections

```
require 'inventoryfile'

parser = Inventoryfile::Parser.new("PATH_TO_FILE")
parser.sections
```

## Contributing

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

## License

MIT