From 2c76c684f975c57cd631d2e1afd3e6ef5f3d51f3 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 21 Jan 2019 23:49:03 +0100 Subject: Add config-terminal role with dotfiles for terminal --- config-terminal/tasks/main.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 config-terminal/tasks/main.yaml (limited to 'config-terminal/tasks') diff --git a/config-terminal/tasks/main.yaml b/config-terminal/tasks/main.yaml new file mode 100644 index 0000000..ac1e495 --- /dev/null +++ b/config-terminal/tasks/main.yaml @@ -0,0 +1,16 @@ +--- +- name: Check .profile status + stat: + path: "/home/{{ user_name }}/.profile" + register: profile +- name: Delete profile if not a link + file: + path: "/home/{{ user_name }}/.profile" + state: absent + when: profile.stat is defined and profile.stat.islnk == False +- name: Apply dotfiles + command: "stow --target /home/{{ user_name }}/ --dir /home/{{ user_name }}/.local/share/dotfiles {{ item }}" + with_items: + - bash + - sh + - vim -- cgit v1.2.3