From 6e552929773879f19086112af60c189dc78e10a3 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 2 Jul 2015 14:41:30 -0600 Subject: [PATCH] Don't modify the teuthology_user if it is in use This is to work around cases where the user exists, with a different uid, and we are currently logged in as that user: msg: usermod: user ubuntu is currently logged in Signed-off-by: Zack Cerza --- roles/testnode/tasks/user.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/testnode/tasks/user.yml b/roles/testnode/tasks/user.yml index ae3f685..e5b33d3 100644 --- a/roles/testnode/tasks/user.yml +++ b/roles/testnode/tasks/user.yml @@ -19,6 +19,9 @@ groups: "{{ teuthology_user }}" shell: /bin/bash state: present + # If we're currently running as teuthology_user, we won't be able to modify + # the account + when: "{{ teuthology_user != ansible_ssh_user }}" - name: Add a user for xfstests to test user quotas. user: -- 2.39.5