From 74048eb349c7d084ddbd0f6f6e8603b3a57cdb87 Mon Sep 17 00:00:00 2001
From: Bombar Maxime <bombar@crans.org>
Date: Wed, 6 May 2020 21:48:23 +0200
Subject: [PATCH] Deploy right shell config

---
 roles/deploy_config/tasks/main.yml | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/roles/deploy_config/tasks/main.yml b/roles/deploy_config/tasks/main.yml
index 545475a..17744c8 100644
--- a/roles/deploy_config/tasks/main.yml
+++ b/roles/deploy_config/tasks/main.yml
@@ -38,6 +38,25 @@
   loop:
     - .emacs
     - .gitconfig
+  when: not ansible_check_mode
+
+- name: Deploy zsh config
+  file:
+    src: /home/{{ ansible_user}}/Git/Config_Files/{{ item }}
+    dest: /home/{{ ansible_user }}/{{ item }}
+    state: link
+  loop:
     - .zshrc
     - .zsh
-  when: not ansible_check_mode
+  when: shell == "zsh" and not ansible_check_mode
+
+- name: Deploy bash config
+  file:
+    src: /home/{{ ansible_user}}/Git/Config_Files/{{ item }}
+    dest: /home/{{ ansible_user }}/{{ item }}
+    state: link
+  loop:
+    - .umaskrc
+    - .bashrc
+    - .bash_aliases
+  when: shell == "bash" and not ansible_check_mode
-- 
GitLab