From b4b7b0840d93e39af94ade206a61379736717942 Mon Sep 17 00:00:00 2001
From: Bombar Maxime <bombar@crans.org>
Date: Fri, 22 May 2020 17:02:35 +0200
Subject: [PATCH] Deploy graphical config (i3 etc ...)

---
 roles/i3/tasks/main.yml | 29 +++++++++++++++++++++++++++++
 setup.yml               |  4 ++++
 2 files changed, 33 insertions(+)
 create mode 100644 roles/i3/tasks/main.yml

diff --git a/roles/i3/tasks/main.yml b/roles/i3/tasks/main.yml
new file mode 100644
index 0000000..86c966b
--- /dev/null
+++ b/roles/i3/tasks/main.yml
@@ -0,0 +1,29 @@
+---
+- name: Install useful packages
+  apt:
+    update_cache: true
+    install_recommends: false
+    name:
+      - i3
+      - firefox
+      - chromium
+      - vlc
+      - thunderbird
+      - scrot
+      - xss-lock
+  register: apt_result
+  retries: 3
+  until: apt_result is succeeded
+
+- name: Deploy i3 configuration
+  file:
+    src: /home/{{ ansible_user}}/Git/Config_Files/{{ item }}
+    dest: /home/{{ ansible_user }}/{{ item }}
+    state: link
+  loop:
+    - .config/autorandr
+    - .config/i3
+    - .config/i3status
+    - .config/i3blocks
+    - .Xmodmap
+  when: not ansible_check_mode
diff --git a/setup.yml b/setup.yml
index aee9a94..2884d9f 100755
--- a/setup.yml
+++ b/setup.yml
@@ -9,3 +9,7 @@
     - ansible_become: false
   roles:
     - deploy_config
+
+- hosts: localhost
+  roles:
+    - i3
-- 
GitLab