3665ba9 ipa-backup: Make sure all roles are installed on the current master.

Authored and Committed by François Cami 4 years ago
    ipa-backup: Make sure all roles are installed on the current master.
    
    ipa-backup does not check whether the IPA master it is running on has
    all used roles installed. This can lead into situations where backups
    are done on a CAless or KRAless host while these roles are used in the
    IPA cluster. These backups cannot be used to restore a complete cluster.
    
    With this change, ipa-backup refuses to execute if the roles installed
    on the current host do not match the list of roles used in the cluster.
    A --disable-role-check knob is provided to restore the previous behavior.
    
    Fixes: https://pagure.io/freeipa/issue/8217
    Signed-off-by: François Cami <fcami@redhat.com>
    Reviewed-By: Rob Crittenden <rcritten@redhat.com>
    Reviewed-By: Mohammad Rizwan Yusuf <myusuf@redhat.com>