Ask Your Question

In the node.pp i want some module should be installed in some of the system which start with usscl. For example my hostname is ussclsdabc01, ussclswergt1 If i use /^usscls(\d )\./ in node.pp it dont work. Anything missing. Please help

asked 2016-01-18 22:42:05 -0500

I tried to add the below lines in the node.pp so that it can install in the host which start with first few letter.

node /^ussclq(\d+)./ { include agent }

node /^usscld(\d+)./ { include agent }

node /^usscls(\d+)./ { include agent }

my sample hostname

ussclqabc01 ussclqnhd01 usscldght01 usscldhji02

THanks Sathya

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-20 18:00:14 -0500

lavaman gravatar image

d+ means one or more digits. These regexes will not match the abc in your first hostname, for example, because there are letters in addition to digits after the part of the name you are trying to match. Correct your regex to match the additional letters in the hostname, and it should work.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-01-18 22:42:05 -0500

Seen: 823 times

Last updated: Jan 20 '16