]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Don't modify the teuthology_user if it is in use 62/head
authorZack Cerza <zack@redhat.com>
Thu, 2 Jul 2015 20:41:30 +0000 (14:41 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 2 Jul 2015 20:49:13 +0000 (14:49 -0600)
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 <zack@redhat.com>
roles/testnode/tasks/user.yml

index ae3f68511b701d2b9511e1f67ed21de75955618e..e5b33d3dc218c40b08810a84bd205f5bf45fc875 100644 (file)
@@ -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: