Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Adullact
puppet-freeipa
Commits
6bf1f0e8
Unverified
Commit
6bf1f0e8
authored
Oct 24, 2019
by
Fabien Combernous
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
surround the values with quotes
parent
97bd0b8b
Pipeline
#6528
passed with stages
in 66 minutes and 38 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
spec/acceptance/02_create_admin_spec.rb
spec/acceptance/02_create_admin_spec.rb
+1
-1
tasks/manage_admin.sh
tasks/manage_admin.sh
+8
-8
No files found.
spec/acceptance/02_create_admin_spec.rb
View file @
6bf1f0e8
...
...
@@ -20,7 +20,7 @@ describe 'manage_admin task' do
result
=
run_task
(
'freeipa::manage_admin'
,
'master'
,
{
'operator_login'
=>
'admin'
,
'operator_password'
=>
's^ecr@et.ea;R/O*=?j!.QsAu+$'
,
'ensure'
=>
'present'
,
'login'
=>
'jaimarre'
,
'firstname'
=>
'Jean'
,
'lastname'
=>
'Aimarre'
,
'password'
=>
'adminsecret'
}
{
'operator_login'
=>
'admin'
,
'operator_password'
=>
's^ecr@et.ea;R/O*=?j!.QsAu+$'
,
'ensure'
=>
'present'
,
'login'
=>
'jaimarre'
,
'firstname'
=>
'Jean'
,
'lastname'
=>
'Ai
marre'
,
'password'
=>
'adminsecret'
}
)
# rubocop:enable Style/BracesAroundHashParameters
expect
(
result
.
first
).
to
include
(
'status'
=>
'success'
)
...
...
tasks/manage_admin.sh
View file @
6bf1f0e8
...
...
@@ -73,7 +73,7 @@ krb_tgt() {
case
$krb_action
in
init
)
$ECHO_CMD
"
${
op_pwd
}
"
|
$KINIT_CMD
$
op_login
$ECHO_CMD
"
${
op_pwd
}
"
|
$KINIT_CMD
"
${
op_login
}
"
retval
=
$?
;;
destroy
)
...
...
@@ -105,7 +105,7 @@ ipa_add_user() {
lastname
=
$3
password
=
$4
$ECHO_CMD
"
${
password
}
"
|
$IPA_CMD
user-add
$
login
--first
=
$
firstname
--last
=
$
lastname
$ECHO_CMD
"
${
password
}
"
|
$IPA_CMD
user-add
"
${
login
}
"
--first
=
"
${
firstname
}
"
--last
=
"
${
lastname
}
"
retval
=
$?
message
'user-add'
$retval
...
...
@@ -125,7 +125,7 @@ ipa_group_add_admins() {
local
login
=
retval
=
login
=
$1
$IPA_CMD
group-add-member admins
--users
=
$
login
$IPA_CMD
group-add-member admins
--users
=
"
${
login
}
"
retval
=
$?
message
'group-add-member'
$retval
...
...
@@ -145,7 +145,7 @@ ipa_del_user() {
local
login
=
retval
=
login
=
$1
$IPA_CMD
user-del
$
login
$IPA_CMD
user-del
"
${
login
}
"
retval
=
$?
message
'user-del'
$retval
...
...
@@ -165,15 +165,15 @@ ipa_del_user() {
is_commands_installed
$USED_COMMANDS
krb_tgt init
$
PT_operator_login
$
PT_operator_password
krb_tgt init
"
${
PT_operator_login
}
"
"
${
PT_operator_password
}
"
case
$PT_ensure
in
present
)
ipa_add_user
$
PT_login
$
PT_firstname
$
PT_lastname
$
PT_password
ipa_group_add_admins
$
PT_login
ipa_add_user
"
${
PT_login
}
"
"
${
PT_firstname
}
"
"
${
PT_lastname
}
"
"
${
PT_password
}
"
ipa_group_add_admins
"
${
PT_login
}
"
;;
absent
)
ipa_del_user
$
PT_login
ipa_del_user
"
${
PT_login
}
"
;;
*
)
msg
=
"Unexpected ensure value '
${
PT_ensure
}
'"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment