From 052083f062d819901e275d5678db7fcbc1cfcf75 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Tue, 10 Dec 2024 10:25:08 -0500 Subject: [PATCH] ansible: Add option to skip site playbook when snapshotting rootnode Change-Id: I2346f89247f6208b0121fbc9b279614c834200e8 Signed-off-by: Kienan Stewart --- automation/ansible/playbooks/snapshot-rootnode.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/automation/ansible/playbooks/snapshot-rootnode.yml b/automation/ansible/playbooks/snapshot-rootnode.yml index c9a1f1a..515d4e4 100644 --- a/automation/ansible/playbooks/snapshot-rootnode.yml +++ b/automation/ansible/playbooks/snapshot-rootnode.yml @@ -7,6 +7,7 @@ job_abort: false # Set to false when taking the first snapshot of a new rootnode revert_before: true + run_site_playbook: true snapshot_name: 'base-configuration' upgrade: false wait_for_changes: true @@ -15,6 +16,7 @@ job_wait_to_end: "{{job_wait_to_end}}" job_abort: "{{job_abort}}" revert_before: "{{revert_before}}" + run_site_playbook: "{{run_site_playbook}}" snapshot_name: "{{snapshot_name}}" target_rootnode: "{{inventory_hostname}}" upgrade: "{{upgrade}}" @@ -96,7 +98,7 @@ # `inventory_hostname in groups.node_standalone` is false. - name: Run site.yml import_playbook: '../site.yml' - when: inventory_hostname in groups.node_standalone + when: inventory_hostname in groups.node_standalone and run_site_playbook - name: Cleanup and snapshot hosts: node_standalone -- 2.39.5