/usr/lib/python2.7/dist-packages/ipaserver/install/ipa_replica_install.py is in python-ipaserver 4.7.0~pre1+git20180411-2ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | #
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from ipapython.install import cli
from ipapython.install.core import knob, extend_knob
from ipaplatform.paths import paths
from ipaserver.install.server import ServerReplicaInstall
class CompatServerReplicaInstall(ServerReplicaInstall):
ca_cert_files = None
all_ip_addresses = False
no_wait_for_dns = True
nisdomain = None
no_nisdomain = False
no_sudo = False
request_cert = False
ca_file = None
zonemgr = None
replica_file = extend_knob(
ServerReplicaInstall.replica_file, # pylint: disable=no-member
cli_names='replica_file',
)
auto_password = knob(
str, None,
description="Password to join the IPA realm. Assumes bulk password "
"unless principal is also set. (domain level 1+) "
"Directory Manager (existing master) password. (domain "
"level 0)",
sensitive=True,
cli_names=['--password', '-p'],
cli_metavar='PASSWORD',
)
@property
def dm_password(self):
try:
return self.__dm_password
except AttributeError:
pass
if self.replica_file is not None:
return self.auto_password
return super(CompatServerReplicaInstall, self).dm_password
@dm_password.setter
def dm_password(self, value):
self.__dm_password = value
ip_addresses = extend_knob(
ServerReplicaInstall.ip_addresses, # pylint: disable=no-member
description="Replica server IP Address. This option can be used "
"multiple times",
)
admin_password = (
ServerReplicaInstall.admin_password # pylint: disable=no-member
)
admin_password = extend_knob(
admin_password,
cli_names=list(admin_password.cli_names) + ['-w'],
)
@admin_password.default_getter
def admin_password(self):
if self.replica_file is None and self.principal:
return self.auto_password
return super(CompatServerReplicaInstall, self).admin_password
@property
def host_password(self):
admin_password = (
super(CompatServerReplicaInstall, self).admin_password)
if (self.replica_file is None and
(not self.principal or admin_password)):
return self.auto_password
return super(CompatServerReplicaInstall, self).host_password
ReplicaInstall = cli.install_tool(
CompatServerReplicaInstall,
command_name='ipa-replica-install',
log_file_name=paths.IPAREPLICA_INSTALL_LOG,
debug_option=True,
)
def run():
ReplicaInstall.run_cli()
|