ipa[server,replica,client]: Remove unused variables and wrong doc strings

This commit is contained in:
Thomas Woerner
2019-07-17 18:46:02 +02:00
parent cb94c34503
commit 3a4cb6a732
36 changed files with 9 additions and 265 deletions

View File

@@ -31,11 +31,6 @@ from ansible.errors import AnsibleError
from ansible.module_utils._text import to_native
from ansible.plugins.action import ActionBase
try:
from __main__ import display
except ImportError:
from ansible.utils.display import Display
display = Display()
def run_cmd(args, stdin=None):
"""

View File

@@ -88,26 +88,6 @@ EXAMPLES = '''
ipaddress: 192.168.100.23
random: True
register: result_ipaclient_get_otp
# Add a new host, authenticate with a keytab stored on the controller node
- ipaclient_get_otp:
keytab: admin.keytab
fqdn: ipaclient.ipa.domain.com
# Remove a host, authenticate using principal/password
- ipaclient_get_otp:
principal: admin
password: MySecretPassword
fqdn: ipaclient.ipa.domain.com
state: absent
# Modify a host, add ssh public key:
- ipaclient_get_otp:
principal: admin
password: MySecretPassword
fqdn: ipaclient.ipa.domain.com
sshpubkey: ssh-rsa AAAA...
'''
RETURN = '''

View File

@@ -96,7 +96,7 @@ def main():
ntp_servers=dict(required=False, type='list', default=None),
ntp_pool=dict(required=False, default=None),
no_ntp=dict(required=False, type='bool', default=False),
#force_ntpd=dict(required=False, type='bool', default=False),
# force_ntpd=dict(required=False, type='bool', default=False),
on_master=dict(required=False, type='bool', default=False),
### additional ###
servers=dict(required=False, type='list', default=None),
@@ -109,7 +109,7 @@ def main():
options.ntp_servers = module.params.get('ntp_servers')
options.ntp_pool = module.params.get('ntp_pool')
options.no_ntp = module.params.get('no_ntp')
#options.force_ntpd = module.params.get('force_ntpd')
# options.force_ntpd = module.params.get('force_ntpd')
options.on_master = module.params.get('on_master')
cli_server = module.params.get('servers')
cli_domain = module.params.get('domain')

View File

@@ -451,7 +451,7 @@ def main():
dnsok = False
cli_domain = None
cli_server = None
subject_base = None
# subject_base = None
cli_realm = None
cli_kdc = None
client_domain = None
@@ -467,7 +467,7 @@ def main():
cli_domain_source = 'Unknown source'
cli_server_source = 'Unknown source'
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
# fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
if not os.getegid() == 0:
raise ScriptError(
@@ -824,7 +824,7 @@ def main():
cli_basedn = ds.basedn
cli_basedn_source = ds.basedn_source
logger.debug("will use discovered basedn: %s", cli_basedn)
subject_base = DN(('O', cli_realm))
# subject_base = DN(('O', cli_realm))
logger.info("Client hostname: %s", hostname)
logger.debug("Hostname source: %s", hostname_source)
@@ -877,8 +877,6 @@ def main():
### client._install ###
statestore = sysrestore.StateFile(paths.IPA_CLIENT_SYSRESTORE)
# May not happen in here at this time
#if not options.on_master:
# # Try removing old principals from the keytab

View File

@@ -100,10 +100,6 @@ ping_test_ok:
type: bool
'''
class Object(object):
pass
options = Object()
import os
import tempfile