freeipa/ipaplatform/fedora_container/tasks.py
Florence Blanc-Renaud 571b6b81c3 Installer: add --subid option to select the sssd profile with-subid
Add the --subid option to client, server and replica installers.
This option allows to configure authselect with the sssd
profile + with-subid feature, in order to have SSSD setup as
a datasource for subid in /etc/nsswitch.conf.

The default behavior remains unchanged: without the option,
/etc/nsswitch.conf keeps the line subid: files

Fixes: https://pagure.io/freeipa/issue/9159
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2022-05-25 08:11:39 +03:00

35 lines
1022 B
Python

#
# Copyright (C) 2020 FreeIPA Contributors see COPYING for license
#
"""Fedora container tasks
"""
import logging
from ipaplatform.fedora.tasks import FedoraTaskNamespace
logger = logging.getLogger(__name__)
class FedoraContainerTaskNamespace(FedoraTaskNamespace):
def modify_nsswitch_pam_stack(
self, sssd, mkhomedir, statestore, sudo=True, subid=False
):
# freeipa-container images are preconfigured
# authselect select sssd with-sudo --force
logger.debug("Authselect is pre-configured in container images.")
def is_mkhomedir_supported(self):
# authselect is not pre-configured with mkhomedir
return False
def restore_auth_configuration(self, path):
# backup is supported but restore is a no-op
logger.debug("Authselect is pre-configured in container images.")
def migrate_auth_configuration(self, statestore):
logger.debug("Authselect is pre-configured in container images.")
tasks = FedoraContainerTaskNamespace()