ipaserver,ipareplica: Add random_serial_numbers to options

With the support for Random Serial Numbers v3 in FreeIPA 4.10, the
attribute random_serial_numbers has been added to the installer options.

options._random_serial_numbers is generated by ca.install_check and
later used by ca.install in the _setup_ca module.

ca.install_check is using options.random_serial_numbers and generating
options._random_serial_numbers which is later used by ca.install in
ca.install the _setup_ca module.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2103928
       https://bugzilla.redhat.com/show_bug.cgi?id=2103924
This commit is contained in:
Thomas Woerner
2022-07-05 15:08:49 +02:00
parent 90f6e14c40
commit 7db5d59de1
6 changed files with 30 additions and 1 deletions

View File

@@ -213,6 +213,8 @@ def main():
# additional
setup_ca=dict(required=False, type='bool', default=False),
random_serial_numbers=dict(required=False, type='bool',
default=False),
_hostname_overridden=dict(required=False, type='bool',
default=False),
),
@@ -225,9 +227,11 @@ def main():
# initialize return values for flake ############################
# These are set by ca.install_check
# These are set by ca.install_check and need to be passed to ca.install
# in the _setup_ca module and also some others.
options._subject_base = None
options._ca_subject = None
options._random_serial_numbers = None
# set values ####################################################
@@ -277,6 +281,8 @@ def main():
options.netbios_name = ansible_module.params.get('netbios_name')
# additional
options.setup_ca = ansible_module.params.get('setup_ca')
options.random_serial_numbers = ansible_module.params.get(
'random_serial_numbers')
options._host_name_overridden = ansible_module.params.get(
'_hostname_overridden')
options.kasp_db_file = None
@@ -405,6 +411,7 @@ def main():
_subject_base=options._subject_base,
ca_subject=options.ca_subject,
_ca_subject=options._ca_subject,
_random_serial_numbers=options._random_serial_numbers,
# dns
reverse_zones=options.reverse_zones,
forward_policy=options.forward_policy,