LMS baseline templates query

Answered Question
Mar 10th, 2010
User Badges:

I would like to be able to use the baseline compliance tool in LMS to check the NTP server config on my routers & switches. Specifically I would like to check that IP address 1 exists in the NTP config on my core router & that IP address 2 exists on all other devices. Can anyone suggest how to do this?


Thanks

Alistair.

Correct Answer by Joe Clarke about 7 years 4 months ago

You would just need to create two templates: one for your router, and one for all other devices.  The first template could be assigned to the router group, and have a prereq:


Prereq:

+ hostname CORE-RTR-NAME

Body:

+ ntp-server x.x.x.x


The other template could have a similar prereq, but opposite:


Prereq:

+ hostname [#(?!CORE-RTR-NAME)#]

Body:

+ ntp-server y.y.y.y

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Joe Clarke Wed, 03/10/2010 - 11:01
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

You would just need to create two templates: one for your router, and one for all other devices.  The first template could be assigned to the router group, and have a prereq:


Prereq:

+ hostname CORE-RTR-NAME

Body:

+ ntp-server x.x.x.x


The other template could have a similar prereq, but opposite:


Prereq:

+ hostname [#(?!CORE-RTR-NAME)#]

Body:

+ ntp-server y.y.y.y

acarnegie Fri, 03/12/2010 - 07:17
User Badges:

Hi Joe,


Thanks for your answer. I was already using prereqs looking at the hostname but was hoping to be able to use just a single template. I now have it working using two templates as per your suggestion.


Thanks.

Actions

This Discussion