mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
library/ipaclient.py: servers needs to be a list
More than one server could be specified
This commit is contained in:
@@ -47,8 +47,8 @@ options:
|
|||||||
realm:
|
realm:
|
||||||
description: The Kerberos realm of an existing IPA deployment.
|
description: The Kerberos realm of an existing IPA deployment.
|
||||||
required: false
|
required: false
|
||||||
server:
|
servers:
|
||||||
description: The FQDN of the IPA server to connect to.
|
description: The FQDN of the IPA servers to connect to.
|
||||||
required: false
|
required: false
|
||||||
principal:
|
principal:
|
||||||
description: The authorized kerberos principal used to join the IPA realm.
|
description: The authorized kerberos principal used to join the IPA realm.
|
||||||
@@ -115,7 +115,7 @@ EXAMPLES = '''
|
|||||||
principal: admin
|
principal: admin
|
||||||
password: MySecretPassword
|
password: MySecretPassword
|
||||||
domain: ipa.domain.com
|
domain: ipa.domain.com
|
||||||
server: ipaserver.ipa.domain.com
|
servers: ipaserver.ipa.domain.com
|
||||||
ntp: no
|
ntp: no
|
||||||
kinit_attempts: 5
|
kinit_attempts: 5
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ def ensure_ipa_client(module):
|
|||||||
|
|
||||||
domain = module.params.get('domain')
|
domain = module.params.get('domain')
|
||||||
realm = module.params.get('realm')
|
realm = module.params.get('realm')
|
||||||
server = module.params.get('server')
|
servers = module.params.get('servers')
|
||||||
principal = module.params.get('principal')
|
principal = module.params.get('principal')
|
||||||
password = module.params.get('password')
|
password = module.params.get('password')
|
||||||
keytab = module.params.get('keytab')
|
keytab = module.params.get('keytab')
|
||||||
@@ -267,9 +267,10 @@ def ensure_ipa_client(module):
|
|||||||
if realm:
|
if realm:
|
||||||
cmd.append("--realm")
|
cmd.append("--realm")
|
||||||
cmd.append(realm)
|
cmd.append(realm)
|
||||||
if server:
|
if servers:
|
||||||
cmd.append("--server")
|
for server in servers:
|
||||||
cmd.append(server)
|
cmd.append("--server")
|
||||||
|
cmd.append(server)
|
||||||
if password:
|
if password:
|
||||||
cmd.append("--password")
|
cmd.append("--password")
|
||||||
cmd.append(password)
|
cmd.append(password)
|
||||||
@@ -314,7 +315,7 @@ def main():
|
|||||||
state=dict(default='present', choices=['present', 'absent']),
|
state=dict(default='present', choices=['present', 'absent']),
|
||||||
domain=dict(required=False),
|
domain=dict(required=False),
|
||||||
realm=dict(required=False),
|
realm=dict(required=False),
|
||||||
server=dict(required=False),
|
servers=dict(required=False, type='list'),
|
||||||
principal=dict(default='admin'),
|
principal=dict(default='admin'),
|
||||||
password=dict(required=False, no_log=True),
|
password=dict(required=False, no_log=True),
|
||||||
keytab=dict(required=False, type='path'),
|
keytab=dict(required=False, type='path'),
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
ipaclient_domain:
|
ipaclient_domain:
|
||||||
ipaclient_realm:
|
ipaclient_realm:
|
||||||
ipaclient_server:
|
ipaclient_servers:
|
||||||
|
|
||||||
ipaclient_principal:
|
ipaclient_principal:
|
||||||
ipaclient_password:
|
ipaclient_password:
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
state: present
|
state: present
|
||||||
domain: "{{ ipaclient_domain | default(omit) }}"
|
domain: "{{ ipaclient_domain | default(omit) }}"
|
||||||
realm: "{{ ipaclient_realm | default(omit) }}"
|
realm: "{{ ipaclient_realm | default(omit) }}"
|
||||||
server: "{{ ipaclient_server | default(omit) }}"
|
servers: "{{ groups.ipaservers | default(omit) }}"
|
||||||
principal: "{{ ipaclient_principal | default(omit) }}"
|
principal: "{{ ipaclient_principal | default(omit) }}"
|
||||||
password: "{{ ipaclient_password | default(omit) }}"
|
password: "{{ ipaclient_password | default(omit) }}"
|
||||||
keytab: "{{ ipaclient_keytab | default(omit) }}"
|
keytab: "{{ ipaclient_keytab | default(omit) }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user