Skip to content
TheChatArchiveThe Chat Archive
gpt-4.1-2025-04-14· OpenAIHugging Face LMArena Human Preference 140K

I need to enable the feature of automated commit recovery on Panorama.

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with DeepSeekdeepseek-v3-0324’s answer.
  1. User

    I need to enable the feature of automated commit recovery on Panorama.

  2. Assistant

    Thank you for clarifying!
    Enabling the feature of automated commit recovery on Palo Alto Panorama is different from running a manual commit recovery. You want to enable the feature so that Panorama can automatically revert to the last successful commit if a commit fails.

    What is Automated Commit Recovery?

    Automated commit recovery is a Panorama feature (introduced in PAN-OS 10.2) that, when enabled, will automatically revert to the last successful commit if a commit operation fails. This is a feature flag you enable in the Panorama settings.


    How to Enable Automated Commit Recovery via Ansible

    As of now, the Palo Alto Networks Ansible collection does not have a dedicated module or parameter to enable this feature directly. However, you can use the panos_op module to send a custom XML API call to enable it.

    The XML API Call

    To enable automated commit recovery, you need to set the following in Panorama:

    • Device > Setup > Management > Automated Commit Recovery (checkbox in the GUI)

    The equivalent XML API call is:

    <request>
      <system>
        <setting>
          <set>
            <automated-commit-recovery>
              <enable>yes</enable>
            </automated-commit-recovery>
          </set>
        </setting>
      </system>
    </request>
    

    But to persist this setting, you need to set it in the configuration, not just as an operational command.

    The correct XPath for this setting is:

    /config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/automated-commit-recovery
    

    And the element to set is:

    <enable>yes</enable>
    

    Ansible Playbook Example

    Below is an Ansible playbook that enables automated commit recovery on Panorama using the panos_xpath module (from the paloaltonetworks.panos collection):

    1. Install the Collection

    ansible-galaxy collection install paloaltonetworks.panos
    

    2. Playbook Example

    ---
    - name: Enable Automated Commit Recovery on Panorama
      hosts: panorama
      gather_facts: no
      collections:
        - paloaltonetworks.panos
    
      tasks:
        - name: Enable automated commit recovery
          panos_xpath:
            provider:
              ip_address: "{{ ansible_host }}"
              username: "{{ panorama_username }}"
              password: "{{ panorama_password }}"
              # api_key: "{{ panorama_api_key }}"  # Use if you prefer API key
            xpath: "/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/automated-commit-recovery"
            element: "<enable>yes</enable>"
            operation: 'set'
    
        - name: Commit configuration
          panos_commit:
            provider:
              ip_address: "{{ ansible_host }}"
              username: "{{ panorama_username }}"
              password: "{{ panorama_password }}"
              # api_key: "{{ panorama_api_key }}"
    

    3. Inventory Example

    all:
      hosts:
        panorama:
          ansible_host: <PANORAMA_IP>
          panorama_username: "admin"
          panorama_password: "<YOUR_PASSWORD>"
    

    Summary

    • Use the panos_xpath module to set the automated commit recovery feature.
    • Commit the configuration after setting it.
    • This will enable the feature on Panorama.

    References


    Let me know if you need a full project structure or help with Ansible Vault for credentials!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.