Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible_lza_ingest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
ansible_lza_ingest
Commits
2afdc224
Commit
2afdc224
authored
3 years ago
by
Jörg Sachse
Browse files
Options
Downloads
Patches
Plain Diff
feat: create user/group for integration tests
parent
b315bdae
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/create_users_groups.yml
+9
-1
9 additions, 1 deletion
tasks/create_users_groups.yml
with
9 additions
and
1 deletion
tasks/create_users_groups.yml
+
9
−
1
View file @
2afdc224
...
@@ -6,6 +6,13 @@
...
@@ -6,6 +6,13 @@
state
:
"
{{
item.value.mystate
|
default('present')
}}"
state
:
"
{{
item.value.mystate
|
default('present')
}}"
with_dict
:
"
{{
vault_groups
}}"
with_dict
:
"
{{
vault_groups
}}"
-
name
:
create group for integration tests (needs to be done manually, because Ansible doesn't handle non_unique in the group module correctly)
command
:
"
groupadd
-g
{{
item.gid
}}
-o
{{
item.name
}}"
loop
:
"
{{
vault_group_integrationtest
}}"
register
:
integrationtest_group
ignore_errors
:
true
changed_when
:
"
\"
group
'{{
item.name
}}'
already
exists
\"
not
in
integrationtest_group.stderr"
-
name
:
add HUMAN users to groups
-
name
:
add HUMAN users to groups
user
:
user
:
name
:
"
{{
item
}}"
name
:
"
{{
item
}}"
...
@@ -28,7 +35,8 @@
...
@@ -28,7 +35,8 @@
groups
:
"
{{
item.value.groups
}}"
groups
:
"
{{
item.value.groups
}}"
home
:
"
/home/{{
item.key
}}/"
home
:
"
/home/{{
item.key
}}/"
name
:
"
{{
item.key
}}"
name
:
"
{{
item.key
}}"
password
:
"
{{
item.value.password
|
default(omit)
}}"
non_unique
:
"
{{
item.value.non_unique
|
default(false)
}}"
password
:
"
{{
lookup('password',
'/dev/null
length=100
chars=ascii_letters')|password_hash('sha512')
|
default(omit)
}}"
shell
:
"
{{
item.value.shell
|
default('/bin/bash')
}}"
shell
:
"
{{
item.value.shell
|
default('/bin/bash')
}}"
state
:
"
{{
item.value.state
|
default('present')
}}"
state
:
"
{{
item.value.state
|
default('present')
}}"
uid
:
"
{{
item.value.uid
|
default(omit)
}}"
uid
:
"
{{
item.value.uid
|
default(omit)
}}"
...
...
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
register
or
sign in
to comment