Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Commit

Permalink
if iam returns no users at all, it is likey down (implementation merg…
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwittig committed May 14, 2018
1 parent 88f5b58 commit ba76613
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions import_users.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,17 @@ function sync_accounts() {
get_sudoers_groups_from_tag

iam_users=$(get_clean_iam_users | sort | uniq)
if [ -z "${iam_users}" ]; then
logger 'we just got back an empty iam_users user list -- that sounds wrong; bailing out!'
exit 1
fi

sudo_users=$(get_clean_sudoers_users | sort | uniq)
if [ -z "${sudo_users}" ]; then
logger 'we just got back an empty sudo_users user list -- that sounds wrong; bailing out!'
exit 1
fi

local_users=$(get_local_users | sort | uniq)

intersection=$(echo ${local_users} ${iam_users} | tr " " "\n" | sort | uniq -D | uniq)
Expand Down

0 comments on commit ba76613

Please sign in to comment.