RedHatSatellite / satellite-clone

Utility to assist cloning an existing Satellite 6 server to a new host
GNU General Public License v3.0
37 stars 31 forks source link

satellite-clone fails on a satellite 6.3 installed with puppet 4 #328

Closed sthirugn closed 6 years ago

sthirugn commented 6 years ago

I had to add a task to workaround:

- name: enable puppet4 rpms
  command: subscription-manager repos --enable rhel-7-server-satellite-6.3-puppet4-rpms
  when: enable_repos

But the permanent fix will be to check the puppet-agent package availability in backup metadata.yml:

cat /backup/satellite-backup-20180313213434/metadata.yml | grep 'puppet-agent'

If the above returned an item (or two - I see puppet-agent-1 and puppet-agent-oauth), then it is puppet4. In other words, a return value of 0 for the above command will indicate puppet4.

sthirugn commented 6 years ago

Add Evgeni and Eric as reviewers after implementing this.

johnpmitsch commented 6 years ago

we should actually add this to the check_metadata_for_satellite_version module since that is already parsing the yml. This will allow us to return something like

{ satellite_version: 6.3, puppet_version: 4 }
sthirugn commented 6 years ago

even better, yeah +1 to use the new ansible module