summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2019-01-21 23:49:03 +0100
committerRobin Krahl <me@robin-krahl.de>2019-01-21 23:49:03 +0100
commit2c76c684f975c57cd631d2e1afd3e6ef5f3d51f3 (patch)
tree7b2e8615b8cff7ff292a10ef2452430796b19819
parent0a2047ed189b891bb3876f7256a757a6c139310e (diff)
downloadansible-roles-2c76c684f975c57cd631d2e1afd3e6ef5f3d51f3.tar.gz
ansible-roles-2c76c684f975c57cd631d2e1afd3e6ef5f3d51f3.tar.bz2
Add config-terminal role with dotfiles for terminal
-rw-r--r--config-terminal/tasks/main.yaml16
1 files changed, 16 insertions, 0 deletions
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