info "Group 'puppet' is already existing, GID=$(id -g puppet)."
else
info "Creating group 'puppet' ..."
- cmd="groupadd -g 63000 puppet"
+ cmd="groupadd --system puppet"
debug "Executing: ${cmd}"
eval ${cmd}
fi
info "User 'puppet' is already existing, UID=$(id -u puppet)."
else
info "Creating user 'puppet' ..."
- cmd="useradd -u 63000 -g puppet -d /var/lib/puppet -c \"Puppet configuration management\" -s /sbin/nologin puppet"
+ cmd="useradd --system --gid puppet "
+ cmd+="--home-dir \"/var/lib/puppet\" --create-home "
+ cmd+="--comment \"Puppet configuration management\" "
+ cmd+="--shell \"/sbin/nologin\" puppet"
debug "Executing: ${cmd}"
eval ${cmd}
fi
local facts_dir="/etc/puppetlabs/facter/facts.d"
if [[ ! -d "${facts_dir}" ]] ; then
info "Creating '${GREEN}${facts_dir}${NORMAL}' ..."
- MKDIR "${facts_dir}"
+ MKDIR --parents "${facts_dir}"
fi
local yfile="${facts_dir}/customer.yaml"
empty_line
check_os
- check_group_and_user
+ # check_group_and_user
check_installed_rpm
generate_puppetconf