How to change the order of Templates in the Template Stack Using Panorama CLI?

How to change the order of Templates in the Template Stack Using Panorama CLI?

230
Created On 06/20/25 17:40 PM - Last Modified 02/18/26 22:00 PM


Objective


To change the order of Templates in the Template Stack Using Panorama CLI.



Environment


  • Any Panorama
  • Supported PAN-OS
  • Templates


Procedure


The procedure is explained using an example.

  1. In this case, the template-stack 'test-stack' includes two templates, 'test1' and 'test2'.
Panorama> configure
Panorama# show template-stack
template-stack {
...
test-stack {
user-group-source {
master-device;
}
templates [ test1 test2];
....

 

  1. To make  "test2" to be higher in the template-stack, delete the list to reorder. Note that the templates themselves are not deleted, just the ordering in the template stack is updated.
Panorama# delete template-stack test-stack templates
Panorama# set template-stack test-stack templates [ test2 test1 ]
  1. After the above commands, the templates are in the new configured order.
Panorama# show template-stack
template-stack {
...
test-stack {
user-group-source {
master-device;
}
templates [ test2 test1];

 

  • Note that this will affect the inheritance of settings.
  • When templates settings are changed, the new highest template may conflict with a setting one intends to still come from the old highest template,
  • Evaluate the configuration to ensure there are no unexpected impacts and try the changes during a maintanance window.


Additional Information


Templates-and-template-stacks



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1Ki000000fxk0KAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail