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: