Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/hiroakis/inventoryfile
- Owner: hiroakis
- License: mit
- Created: 2015-08-16T04:58:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-18T03:42:08.000Z (over 9 years ago)
- Last Synced: 2024-08-31T22:18:03.300Z (3 months ago)
- Language: Ruby
- Size: 121 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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