Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible_lza_install_common
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_install_common
Commits
96854dc5
Commit
96854dc5
authored
2 years ago
by
Jörg Sachse
Browse files
Options
Downloads
Patches
Plain Diff
fix: modify users only if they aren't used for the current management connection
parent
25f374f3
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
+12
-6
12 additions, 6 deletions
tasks/create_users_groups.yml
with
12 additions
and
6 deletions
tasks/create_users_groups.yml
+
12
−
6
View file @
96854dc5
...
@@ -37,15 +37,18 @@
...
@@ -37,15 +37,18 @@
uid
:
"
{{
item.value.uid
}}"
uid
:
"
{{
item.value.uid
}}"
update_password
:
on_create
update_password
:
on_create
loop
:
"
{{
human_users
|
dict2items
}}"
loop
:
"
{{
human_users
|
dict2items
}}"
when
:
( item.value.state == "present" )
when
:
no_log
:
true
-
item.value.state == "present"
-
item.key != ansible_user
# we cannot modify the user that is used to make the connection, because the Python process uses it
-
name
:
lock HUMAN users
-
name
:
lock HUMAN users
ansible.builtin.user
:
ansible.builtin.user
:
name
:
"
{{
item.key
}}"
name
:
"
{{
item.key
}}"
password_lock
:
"
{{
item.value.password_lock
}}"
password_lock
:
"
{{
item.value.password_lock
}}"
loop
:
"
{{
human_users
|
dict2items
}}"
loop
:
"
{{
human_users
|
dict2items
}}"
when
:
( item.value.state == "present" )
when
:
-
item.value.state == "present"
-
item.key != ansible_user
# we cannot modify the user that is used to make the connection, because the Python process uses it
-
name
:
create ROBOT users
-
name
:
create ROBOT users
ansible.builtin.user
:
ansible.builtin.user
:
...
@@ -61,12 +64,15 @@
...
@@ -61,12 +64,15 @@
uid
:
"
{{
item.value.uid
}}"
uid
:
"
{{
item.value.uid
}}"
update_password
:
on_create
update_password
:
on_create
loop
:
"
{{
robot_users
|
dict2items
}}"
loop
:
"
{{
robot_users
|
dict2items
}}"
when
:
( item.value.state == "present" )
when
:
no_log
:
true
-
item.value.state == "present"
-
item.key != ansible_user
# we cannot modify the user that is used to make the connection, because the Python process uses it
-
name
:
lock ROBOT users
-
name
:
lock ROBOT users
ansible.builtin.user
:
ansible.builtin.user
:
name
:
"
{{
item.key
}}"
name
:
"
{{
item.key
}}"
password_lock
:
"
{{
item.value.password_lock
}}"
password_lock
:
"
{{
item.value.password_lock
}}"
loop
:
"
{{
robot_users
|
dict2items
}}"
loop
:
"
{{
robot_users
|
dict2items
}}"
when
:
( item.value.state == "present" )
when
:
-
item.value.state == "present"
-
item.key != ansible_user
# we cannot modify the user that is used to make the connection, because the Python process uses it
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