]> git.immae.eu Git - perso/Immae/Config/Ansible.git/commitdiff
Use check_mode for commands
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Tue, 6 Nov 2018 18:05:00 +0000 (19:05 +0100)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Tue, 6 Nov 2018 22:35:34 +0000 (23:35 +0100)
roles/gnupg/tasks/main.yml
roles/gnupg/templates/systemd/dirmngr.conf.j2
roles/gnupg/templates/systemd/gpg-agent-browser.conf.j2
roles/gnupg/templates/systemd/gpg-agent-extra.conf.j2
roles/gnupg/templates/systemd/gpg-agent-ssh.conf.j2
roles/gnupg/templates/systemd/gpg-agent.conf.j2
roles/init/tasks/main.yml
roles/init/templates/pam_environment.j2
roles/tools/handlers/main.yml
roles/tools/tasks/main.yml
site.yml

index d1289f5ce9b4bf554fca3bef113c80329b8dedb8..ef61fede378775b84065dc3f758b60b3ab743449 100644 (file)
   shell: 'gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"'
   register: gnupg_runtime_dir_cmd
   changed_when: false
+  check_mode: no
 - name: check existing secret key
   shell: "gpg --list-secret-keys | grep '{{ gpg_useremail }}'"
   changed_when: false
   ignore_errors: true
   register: gpgkeys
+  check_mode: no
 - name: ask for gpg password
   pause:
     prompt: "Chose gpg password"
index 9083ab5eb0a93013c7e217dbed06753fa4529e31..529fdd755bd1e88ba34973cbeaa5f7e4c6a6203e 100644 (file)
@@ -1,3 +1,3 @@
 [Socket]
 ListenStream=
-ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.dirmngr
+ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.stdout }}/S.dirmngr
index 61ddeb6769a93cde599b32f9968a681257ddd658..6dbbbc780247995a3c3b8da8afb3684bbf1e11b8 100644 (file)
@@ -1,3 +1,3 @@
 [Socket]
 ListenStream=
-ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent.browser
+ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.stdout }}/S.gpg-agent.browser
index f34606c1f0107f00309b093617ff505cb07f671c..fbd5dee36e891544bdb87debc20e2ffce135ce1e 100644 (file)
@@ -1,3 +1,3 @@
 [Socket]
 ListenStream=
-ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent.extra
+ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.stdout }}/S.gpg-agent.extra
index b7cd0c2ca299663c6d36dd1e1bd695d582487be4..6f37eaa46fb4eb570188b91cb186e7b4f7fc3565 100644 (file)
@@ -1,3 +1,3 @@
 [Socket]
 ListenStream=
-ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent.ssh
+ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.stdout }}/S.gpg-agent.ssh
index 666c22e36566d439d0f9dd9f24d1056929d910be..4f085da6a487d0a81217a9b4b899a3c1e89fdc9d 100644 (file)
@@ -1,3 +1,3 @@
 [Socket]
 ListenStream=
-ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent
+ListenStream=%t/gnupg/{{ gnupg_runtime_dir_cmd.stdout }}/S.gpg-agent
index edbd82022bf39a4d33f1bca157ac04a961f88068..ce56ec4f7104ce4f3781757b58291bba135de46b 100644 (file)
@@ -3,6 +3,7 @@
   shell: 'GNUPGHOME=$XDG_CONFIG_HOME/gnupg gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"'
   changed_when: false
   register: gnupg_runtime_dir_cmd
+  check_mode: no
 - name: Add pam_environment
   register: pam_environment
   template:
index 4327eeb6b2ca65855c353d1a77fac56026b63b0a..fc65a10cd13f92f7f5a8c0c8b3a4010461b5bdd4 100644 (file)
@@ -38,7 +38,7 @@ GNUPGHOME                     DEFAULT="${XDG_CONFIG_HOME}/gnupg"
 
 # SSH
 SSH_AGENT_PID                  DEFAULT=
-SSH_AUTH_SOCK                  DEFAULT="${XDG_RUNTIME_DIR}/gnupg/{{ gnupg_runtime_dir_cmd.get('stdout', debug_gnupg_runtime_dir) }}/S.gpg-agent.ssh"
+SSH_AUTH_SOCK                  DEFAULT="${XDG_RUNTIME_DIR}/gnupg/{{ gnupg_runtime_dir_cmd.stdout }}/S.gpg-agent.ssh"
 
 # Less
 LESSHISTFILE                   DEFAULT="${XDG_STATE_HOME}/less/history"
index a282512d520d0deeaea3c2bf4b51807f63939185..a050b9bbb5c285ad738ba04d0b20351c92e3be42 100644 (file)
@@ -3,3 +3,5 @@
   systemd:
     daemon_reload: true
     scope: user
+- name: run PlugInstall
+  shell: vim -c PlugInstall -c qa
index fe5b023cef01d7a38f136d15323666c0a7d69acb..70bba9d295b738f845ea975b8f35e844ff6d5031 100644 (file)
     path: $XDG_STATE_HOME/psql
     state: directory
 - name: vim config file
-  register: vim_result
   copy:
     src: vimrc
     dest: $XDG_CONFIG_HOME/vim/vimrc
-- name: run PlugInstall
-  shell: vim -c PlugInstall -c qa
-  when: vim_result.changed
+  notify:
+    - run PlugInstall
 - name: tmux config file
   template:
     src: tmux.conf.j2
index 3d5a8d714385abe89563380f227768120c6cf585..f05b960be923a5f3ad44846daa2a2e16f5507f1e 100644 (file)
--- a/site.yml
+++ b/site.yml
@@ -4,7 +4,6 @@
     gpg_useremail: "ismael@flony"
     gpg_realname: "Ismaël Bouya"
     gpg_user: "ismael"
-    debug_gnupg_runtime_dir: "d.sa5ao9hmm8xbjif73e5hcsfs"
     profile: "flony"
     role:
       flony: "fretlink"