From 99ac466afbc8bc7c43bf05843d92480086c55be5 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Fri, 8 Feb 2019 09:03:09 +0100 Subject: [PATCH] Fix(prompt): wrong shell path --- tasks/prompt.yml | 6 +++++- tasks/users.yml | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tasks/prompt.yml b/tasks/prompt.yml index a5b3455..7103ff6 100644 --- a/tasks/prompt.yml +++ b/tasks/prompt.yml @@ -4,10 +4,14 @@ name: "{{ prompt }}" state: present +- name: Register prompt place + shell: which {{ prompt }} + register: prompt_place + - name: Set shell for root user: name: root - shell: /bin/{{ prompt }} + shell: "{{ prompt_place }}" tags: - first_deployement diff --git a/tasks/users.yml b/tasks/users.yml index 07463ed..d07bb2c 100644 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -1,10 +1,14 @@ --- +- name: Register prompt place + shell: which {{ prompt }} + register: prompt_place + - name: Add deploy users user: name: "{{ item.username }}" password: "{{ item.password }}" uid: "{{ item.uid }}" - shell: /bin/{{ prompt }} + shell: "{{ prompt_place }}" with_items: "{{ deploy_users }}" tags: - first_deployement @@ -14,7 +18,7 @@ name: "{{ item.username }}" password: "{{ item.password }}" uid: "{{ item.uid }}" - shell: /bin/{{ prompt }} + shell: "{{ prompt_place }}" with_items: "{{ me }}" when: not minimal or not server tags: