Skip to content
Snippets Groups Projects
Commit 438f09ba authored by Thomas Woerner's avatar Thomas Woerner
Browse files

ipareplica: The dm password is not needed for ipareplica_master_password

The module ipareplica_master_password has been a copy from ipaserver role
and still contained code to read the cache file. This is not needed for
the replica. Therefore there is no need also to provide the dm password
to ipareplica_master_password any more.
parent 0f73362e
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,6 @@ def main(): ...@@ -60,7 +60,6 @@ def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec = dict( argument_spec = dict(
#basic #basic
dm_password=dict(required=True, no_log=True),
master_password=dict(required=False, no_log=True), master_password=dict(required=False, no_log=True),
), ),
supports_check_mode = True, supports_check_mode = True,
...@@ -68,21 +67,11 @@ def main(): ...@@ -68,21 +67,11 @@ def main():
module._ansible_debug = True module._ansible_debug = True
options.dm_password = module.params.get('dm_password')
options.master_password = module.params.get('master_password') options.master_password = module.params.get('master_password')
fstore = sysrestore.FileStore(paths.SYSRESTORE) fstore = sysrestore.FileStore(paths.SYSRESTORE)
sstore = sysrestore.StateFile(paths.SYSRESTORE) sstore = sysrestore.StateFile(paths.SYSRESTORE)
# This will override any settings passed in on the cmdline
if os.path.isfile(paths.ROOT_IPA_CACHE):
# dm_password check removed, checked already
try:
cache_vars = read_cache(options.dm_password)
options.__dict__.update(cache_vars)
except Exception as e:
module.fail_json(msg="Cannot process the cache file: %s" % str(e))
if not options.master_password: if not options.master_password:
options.master_password = ipa_generate_password() options.master_password = ipa_generate_password()
......
...@@ -178,7 +178,6 @@ ...@@ -178,7 +178,6 @@
- name: Install - Create dirman password - name: Install - Create dirman password
no_log: yes no_log: yes
ipareplica_master_password: ipareplica_master_password:
dm_password: "{{ ipadm_password }}"
master_password: "{{ ipareplica_master_password | default(omit) }}" master_password: "{{ ipareplica_master_password | default(omit) }}"
register: result_ipareplica_master_password register: result_ipareplica_master_password
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment