]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blobdiff - roles/contexts/fretlink/tasks/main.yml
Don’t fail when gpg key is not present
[perso/Immae/Config/Ansible.git] / roles / contexts / fretlink / tasks / main.yml
index 78f733a43cc12805047cca1f6f6721561af09c6a..4106bf1f6e0ba8d10b556ce97aa414c58c63fac2 100644 (file)
@@ -1,17 +1,27 @@
 ---
 - name: Import roles
   include_role:
-    name: "{{ item }}"
+    name: "{{ fretlink_import_item }}"
   loop:
     - programming/python
     - programming/haskell
     - programming/nodejs
+  loop_control:
+    loop_var: fretlink_import_item
+- name: Config dirs
+  file:
+    state: directory
+    path: "$XDG_CONFIG_HOME/{{ item }}"
+  loop:
+    - autostart
+    - Zeal
+    - pm2
 - name: Config files
   copy:
     src: "config_files/{{ item }}"
     dest: "$XDG_CONFIG_HOME/{{ item }}"
   loop:
-    - "autostart/zeal.desktop"
+    - autostart/zeal.desktop
 - name: zeal configuration
   ini_file:
     path: "$XDG_CONFIG_HOME/Zeal/Zeal.conf"
       args:
         creates: "$XDG_DATA_HOME/Zeal/Zeal/docsets/{{ item }}.docset"
       loop: "{{ zeal_missing_docsets.stdout.split('\n') }}"
-- name: Create pm2 config dir
-  file:
-    path: $XDG_CONFIG_HOME/pm2
-    state: directory
 - name: workdir
   block:
+    - name: Workdir
+      file:
+        state: directory
+        path: $HOME/workdir
     - name: workdir scripts
       copy:
         mode: 0755
@@ -71,6 +81,9 @@
           copy:
             dest: $HOME/workdir/environment
             content: "{{ fretlink_environment.stdout }}"
+      rescue:
+        - debug:
+            msg: "Could not read password store, continuing"
 - name: enable remind service
   systemd:
     state: started