Inventoryfile
Inventoryfile. A parser for ansible inventory file which is an INI like formatted file.
Installation
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
- Fork it ( https://github.com/hiroakis/inventoryfile/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
License
MIT