From 6c21aa767553ef94b838a111fdd541f3d847acc9 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 7 Mar 2022 10:44:51 +0100 Subject: [PATCH] only reset pulp data if explicitly asked for Fixes: #291 --- roles/satellite-clone/defaults/main.yml | 1 + roles/satellite-clone/tasks/main.yml | 2 ++ satellite-clone-vars.sample.yml | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/roles/satellite-clone/defaults/main.yml b/roles/satellite-clone/defaults/main.yml index 00dd836..e21b2fe 100644 --- a/roles/satellite-clone/defaults/main.yml +++ b/roles/satellite-clone/defaults/main.yml @@ -17,3 +17,4 @@ skip_satellite_rpm_check: False overwrite_etc_hosts: True check_networking_interfaces: True selinux_packages: [] +reset_pulp_data: False diff --git a/roles/satellite-clone/tasks/main.yml b/roles/satellite-clone/tasks/main.yml index 676b5eb..5e22337 100644 --- a/roles/satellite-clone/tasks/main.yml +++ b/roles/satellite-clone/tasks/main.yml @@ -319,12 +319,14 @@ - include_tasks: reset_pulp_data.yml when: + - reset_pulp_data - not clone_pulp_data_exists - not online_backup - satellite_version in ["6.6", "6.7", "6.8", "6.9"] - include_tasks: reset_pulpcore_data.yml when: + - reset_pulp_data - not clone_pulp_data_exists - not online_backup - satellite_version not in ["6.6", "6.7", "6.8", "6.9"] diff --git a/satellite-clone-vars.sample.yml b/satellite-clone-vars.sample.yml index 7b51461..2201d96 100644 --- a/satellite-clone-vars.sample.yml +++ b/satellite-clone-vars.sample.yml @@ -64,3 +64,7 @@ # Disable checking interfaces setup for DHCP and DNS match the interfaces on the target server. (defaults to true) #check_networking_interfaces: true + +# Reset Pulp data, useful for cases where you need to restore a system, but don't have access to the old /var/lib/pulp content. +# Don't enable if you want a 1:1 clone with data. Only for support / development! +#reset_pulp_data: false