Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
dcc26b26
Verified
Commit
dcc26b26
authored
Nov 25, 2018
by
Florian Pritz
Browse files
archusers: Remove authorized_keys if no ssh key is defined in archusers
list Signed-off-by:
Florian Pritz
<
bluewind@xinu.at
>
parent
49caae39
Changes
1
Hide whitespace changes
Inline
Side-by-side
roles/archusers/tasks/main.yml
View file @
dcc26b26
...
...
@@ -22,6 +22,11 @@
when
:
item.value.ssh_key is defined
with_dict
:
"
{{
arch_users
}}"
-
name
:
remove ssh keys if undefined
file
:
path=/home/{{item.key}}/.ssh/authorized_keys state=absent
when
:
item.value.ssh_key is not defined
with_dict
:
"
{{
arch_users
}}"
-
name
:
get list of remote users
find
:
paths="/home" file_type="directory"
register
:
all_users
...
...
Write
Preview
Supports
Markdown
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