Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ansible FreeIPA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Ansible FreeIPA
Commits
9259899d
Commit
9259899d
authored
Oct 18, 2017
by
Thomas Woerner
Committed by
GitHub
Oct 18, 2017
Browse files
Options
Downloads
Plain Diff
Merge pull request #6 from flo-renaud/fixipahost_44
ipahost module: fix the module for IPA 4.4 server
parents
5aa9f0ec
5b57c8b7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
library/ipahost.py
+46
-10
46 additions, 10 deletions
library/ipahost.py
with
46 additions
and
10 deletions
library/ipahost.py
+
46
−
10
View file @
9259899d
...
@@ -53,7 +53,9 @@ options:
...
@@ -53,7 +53,9 @@ options:
required: true
required: true
random:
random:
description: generate a random password to be used in bulk enrollment
description: generate a random password to be used in bulk enrollment
required: false
type: bool
type: bool
default: no
state:
state:
description: the host state
description: the host state
required: false
required: false
...
@@ -70,6 +72,8 @@ options:
...
@@ -70,6 +72,8 @@ options:
description: the IP address for the host
description: the IP address for the host
required: false
required: false
requirements:
- gssapi on the Ansible controller
author:
author:
-
"
Florence Blanc-Renaud
"
-
"
Florence Blanc-Renaud
"
'''
'''
...
@@ -107,16 +111,54 @@ EXAMPLES = '''
...
@@ -107,16 +111,54 @@ EXAMPLES = '''
'''
'''
RETURN
=
'''
RETURN
=
'''
tbd
host:
description: the host structure as returned from IPA API
returned: always
type: complex
contains:
dn:
description: the DN of the host entry
type: string
returned: always
fqdn:
description: the fully qualified host name
type: string
returned: always
has_keytab:
description: whether the host entry contains a keytab
type: bool
returned: always
has_password:
description: whether the host entry contains a password
type: bool
returned: always
managedby_host:
description: the list of hosts managing the host
type: list
returned: always
randompassword:
description: the OneTimePassword generated for this host
type: string
returned: changed
certificates:
description: the list of host certificates
type: list
returned: when present
sshpubkey:
description: the SSH public key for the host
type: string
returned: when present
ipaddress:
description: the IP address for the host
type: string
returned: when present
'''
'''
import
os
import
os
import
tempfile
from
ansible.module_utils.basic
import
AnsibleModule
from
ansible.module_utils.basic
import
AnsibleModule
from
ipalib
import
api
,
errors
,
x509
from
ipalib
import
api
,
errors
from
ipalib.install.kinit
import
kinit_keytab
,
kinit_password
from
ipaplatform.paths
import
paths
from
ipaplatform.paths
import
paths
from
ipapython.ipautil
import
run
from
ipapython.ipautil
import
run
...
@@ -261,9 +303,7 @@ def main():
...
@@ -261,9 +303,7 @@ def main():
"""
"""
module
=
AnsibleModule
(
module
=
AnsibleModule
(
argument_spec
=
dict
(
argument_spec
=
dict
(
#keytab = dict(required=False, type='path'),
principal
=
dict
(
default
=
'
admin
'
),
principal
=
dict
(
default
=
'
admin
'
),
#password = dict(required=False, no_log=True),
ccache
=
dict
(
required
=
False
,
type
=
'
path
'
),
ccache
=
dict
(
required
=
False
,
type
=
'
path
'
),
fqdn
=
dict
(
required
=
True
),
fqdn
=
dict
(
required
=
True
),
certificates
=
dict
(
required
=
False
,
type
=
'
list
'
),
certificates
=
dict
(
required
=
False
,
type
=
'
list
'
),
...
@@ -272,14 +312,10 @@ def main():
...
@@ -272,14 +312,10 @@ def main():
random
=
dict
(
default
=
False
,
type
=
'
bool
'
),
random
=
dict
(
default
=
False
,
type
=
'
bool
'
),
state
=
dict
(
default
=
'
present
'
,
choices
=
[
'
present
'
,
'
absent
'
]),
state
=
dict
(
default
=
'
present
'
,
choices
=
[
'
present
'
,
'
absent
'
]),
),
),
#mutually_exclusive=[['password','keytab']],
#required_one_of=[['[password','keytab']],
supports_check_mode
=
True
,
supports_check_mode
=
True
,
)
)
principal
=
module
.
params
.
get
(
'
principal
'
,
'
admin
'
)
principal
=
module
.
params
.
get
(
'
principal
'
,
'
admin
'
)
password
=
module
.
params
.
get
(
'
password
'
)
keytab
=
module
.
params
.
get
(
'
keytab
'
)
ccache
=
module
.
params
.
get
(
'
ccache
'
)
ccache
=
module
.
params
.
get
(
'
ccache
'
)
fqdn
=
unicode
(
module
.
params
.
get
(
'
fqdn
'
))
fqdn
=
unicode
(
module
.
params
.
get
(
'
fqdn
'
))
state
=
module
.
params
.
get
(
'
state
'
)
state
=
module
.
params
.
get
(
'
state
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment