summaryrefslogtreecommitdiffstats
path: root/roles/dotfiles
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2018-04-24 20:44:16 +0200
committerTharre <tharre3@gmail.com>2018-05-09 03:21:51 +0200
commitc2e93c2370de9a0948b07e5768c7ac572d299c63 (patch)
tree9c30e6b01b293651cc7d5ce316c844cc0b3e520a /roles/dotfiles
downloadinfrastructure-c2e93c2370de9a0948b07e5768c7ac572d299c63.tar.gz
infrastructure-c2e93c2370de9a0948b07e5768c7ac572d299c63.tar.xz
infrastructure-c2e93c2370de9a0948b07e5768c7ac572d299c63.zip
Initial commit
Diffstat (limited to 'roles/dotfiles')
-rw-r--r--roles/dotfiles/tasks/main.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml
new file mode 100644
index 0000000..f008142
--- /dev/null
+++ b/roles/dotfiles/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+
+- name: Install packages
+ package: name={{ item }} state=present
+ with_items:
+ - git
+ - vim
+ - zsh
+ - htop
+ - tmux
+ become: true
+
+- name: Clone dotfiles
+ git:
+ repo: 'https://github.com/Tharre/dotfiles.git'
+ dest: "{{ ansible_user_dir }}/dotfiles"
+ recursive: no
+ register: dotfiles
+
+- name: Install dotfiles
+ shell: ./install.sh
+ args:
+ chdir: "{{ ansible_user_dir }}/dotfiles"
+ when: dotfiles.changed
+
+- name: Change shell to zsh
+ user:
+ name: "{{ ansible_user_id }}"
+ shell: /usr/bin/zsh
+ become: true