From 36528dae373c84668a399031a270db2d6dbaca0b Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Thu, 14 Mar 2019 19:00:03 +0100 Subject: [PATCH] teuthology: use variable for user name Signed-off-by: Kyr Shatskyy --- roles/teuthology/tasks/main.yml | 6 +++--- roles/teuthology/templates/teuthology-worker.init | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/teuthology/tasks/main.yml b/roles/teuthology/tasks/main.yml index d5cdb28a..3a276f3d 100644 --- a/roles/teuthology/tasks/main.yml +++ b/roles/teuthology/tasks/main.yml @@ -31,10 +31,10 @@ - name: Ship teuthology user's crontab update script template: src: update-crontab.sh - dest: /home/teuthology/bin/update-crontab.sh + dest: "/home/{{ teuthology_scheduler_user }}/bin/update-crontab.sh" mode: 0775 - owner: teuthology - group: teuthology + owner: "{{ teuthology_scheduler_user }}" + group: "{{ teuthology_scheduler_user }}" tags: - crontab diff --git a/roles/teuthology/templates/teuthology-worker.init b/roles/teuthology/templates/teuthology-worker.init index 590b4616..63d9ec90 100644 --- a/roles/teuthology/templates/teuthology-worker.init +++ b/roles/teuthology/templates/teuthology-worker.init @@ -35,7 +35,7 @@ export NWORKERS=20 [ -f /etc/default/teuthology ] && source /etc/default/teuthology -user=${TEUTHOLOGY_USERNAME:-teuthworker} +user=${TEUTHOLOGY_USERNAME:-"{{ teuthology_execution_user }}"} export HOME=/home/$user export WORKER_HOME=$HOME/src/teuthology_master #/usr/share/nginx/html -- 2.47.3