]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blobdiff - roles/gnupg/tasks/main.yml
Fix missing directories for gnupg overrides
[perso/Immae/Config/Ansible.git] / roles / gnupg / tasks / main.yml
index bfbf31a0bcb5492d7aa6fed6797a510b6739dae8..954c02921381fccf28e9b28e8ca0173308d00890 100644 (file)
     dest: "$XDG_CONFIG_HOME/gnupg/{{ item }}"
   loop:
     - gpg-agent.conf
-    - gpg.conf
+- name: gpg config file
+  template:
+    src: "gpg.conf.j2"
+    dest: "$XDG_CONFIG_HOME/gnupg/gpg.conf"
 - name: Get gnupg runtime folder name
   shell: 'gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"'
   register: gnupg_runtime_dir_cmd
 - meta: flush_handlers
 - name: Override the gpg socket directory
   block:
+    - name: Add systemd overrides directory
+      file:
+        path: "$XDG_CONFIG_HOME/systemd/user/{{ item }}.socket.d"
+        state: directory
+      loop:
+        - dirmngr
+        - gpg-agent
+        - gpg-agent-browser
+        - gpg-agent-extra
+        - gpg-agent-ssh
     - name: Add systemd overrides
       template:
         src: "systemd/{{ item }}.conf.j2"