Merge "Add domain and no-ntp options to ipaclient"
This commit is contained in:
commit
63985433de
@ -40,6 +40,16 @@ parameters:
|
|||||||
type: boolean
|
type: boolean
|
||||||
description: Configure PAM to create a users home directory if it does not exist.
|
description: Configure PAM to create a users home directory if it does not exist.
|
||||||
default: False
|
default: False
|
||||||
|
IdMDomain:
|
||||||
|
default: ''
|
||||||
|
description: IDM domain to register IDM client. Typically, this is discovered
|
||||||
|
through DNS and does not have to be set explicitly.
|
||||||
|
type: string
|
||||||
|
IdMNoNtpSetup:
|
||||||
|
default: False
|
||||||
|
description: Set to true to add --no-ntp to the IDM client install call.
|
||||||
|
This will cause IDM client install not to set up NTP.
|
||||||
|
type: boolean
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
role_data:
|
role_data:
|
||||||
@ -54,6 +64,8 @@ outputs:
|
|||||||
vars:
|
vars:
|
||||||
python_interpreter: {get_param: PythonInterpreter}
|
python_interpreter: {get_param: PythonInterpreter}
|
||||||
makehomedir: {get_param: MakeHomeDir}
|
makehomedir: {get_param: MakeHomeDir}
|
||||||
|
idm_domain: {get_param: IdMDomain}
|
||||||
|
idm_no_ntp: {get_param: IdMNoNtpSetup}
|
||||||
block:
|
block:
|
||||||
- name: install needed packages
|
- name: install needed packages
|
||||||
package:
|
package:
|
||||||
@ -140,12 +152,22 @@ outputs:
|
|||||||
if [ -n "$realm" ]; then
|
if [ -n "$realm" ]; then
|
||||||
OPTS="$OPTS --realm=$realm"
|
OPTS="$OPTS --realm=$realm"
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$idm_domain" ]; then
|
||||||
|
OPTS="$OPTS --domain=$idm_domain"
|
||||||
|
fi
|
||||||
if [ "${makehomedir,,}" = "true" ]; then
|
if [ "${makehomedir,,}" = "true" ]; then
|
||||||
OPTS="$OPTS --mkhomedir"
|
OPTS="$OPTS --mkhomedir"
|
||||||
fi
|
fi
|
||||||
|
if [ "${idm_no_ntp,,}" = "true" ]; then
|
||||||
|
OPTS="$OPTS --no-ntp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Ensure we have the proper domain in /etc/resolv.conf
|
# Ensure we have the proper domain in /etc/resolv.conf
|
||||||
domain=$(hostname -d)
|
domain=$(hostname -d)
|
||||||
|
if [ -n "$idm_domain" ]; then
|
||||||
|
domain = "$domain $idm_domain"
|
||||||
|
fi
|
||||||
if ! grep -q ${domain} /etc/resolv.conf ; then
|
if ! grep -q ${domain} /etc/resolv.conf ; then
|
||||||
sed -i "0,/nameserver/s/\(nameserver.*\)/search ${domain}\n\1/" /etc/resolv.conf
|
sed -i "0,/nameserver/s/\(nameserver.*\)/search ${domain}\n\1/" /etc/resolv.conf
|
||||||
fi
|
fi
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Allows a deployer to specify the IdM domain with --domain on the
|
||||||
|
ipa-client-install invocation by providing the IdMDomain parameter.
|
||||||
|
- Allows a deployer to direct the ipa-client-install to skip NTP setup
|
||||||
|
by specifying the IdMNoNtpSetup parameter. This is useful if the
|
||||||
|
ipa-client-install setup clobbers the NTP setup by puppet.
|
Loading…
Reference in New Issue
Block a user