LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-03-2013, 12:19 PM   #1
edwardcode
Member
 
Registered: Apr 2010
Posts: 161

Rep: Reputation: 17
Ruby Code for Puppet


I would like to crate a new custom fact for puppet. I want the code to take an IP and add two to the last octet. (example: 127.0.0.1 to 127.0.0.3) I know I can exec a long string of crap, but I was hopping that every thing could be done in ruby so I can put it in my Fact.rb file in puppet. The only problem is my ruby skill are currently low, but growing.

Will any one help?

Thanks in advance.
 
Old 01-04-2013, 04:08 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,005

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
I am not sure where you are stuck? Maybe you could provide what you have tried as my initial thought is that editing a string is particularly simple.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
puppet code to ask for variables edwardcode Programming 1 12-03-2012 12:31 PM
[SOLVED] Problem with Puppet manifest code smilemukul Linux - Server 2 10-18-2011 11:35 PM
Parameter to execute shell script on puppet client through Puppet server niraj.kumar Linux - Server 3 02-08-2011 09:01 PM
Ruby Code Blocks CoderMan Programming 1 05-28-2010 10:39 PM
Strangeness pasting ruby code into irb command line darenw Programming 0 06-18-2009 08:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration