Project

linode-ip

0.0
No release in over 3 years
Low commit activity in last 3 years
["Adds", "the", "linode-ip", "executable", "for", "getting", "ip", "address", "of", "linode", "with", "matching", "label."]
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.17
~> 10.0
~> 3.0
~> 0.79
 Project Readme

Linode::Ip

This gem adds the linode-ip executable that takes a match string and returns the ipv4 address of a linode whose label matches the string. If there is more than one match then an interactive session is enabled that allows the user to pick from a list of matches or to change the matching string.

This gem assumes that the linode-cli is available

Installation

Add this line to your application's Gemfile:

gem 'linode-ip'

And then execute:

$ bundle

Or install it yourself as:

$ gem install linode-ip

Usage

Example:

linode-ip traefik

Returns the ip address of the linode labeled traefik.

Note that the matching string can be a regex.

If more than one match is found, then a session is opened allowing the user to choose between possible matches.

> linode-ip qa
Multiple matching linodes found:
-------------------------------
(0) cob-qa-solr-1
(1) qa-tupress-web
(2) ojs3-qa
(3) cob-qa-web
(4) manifold_qa
(5) funcake_qa
(6) aggregator_qa
(7) airflow_qa

[u] Update linode matcher
[e] exit

Choose a lionde or command?

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dkinzer/linode-ip. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Linode::Ip project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.