]> git.immae.eu Git - perso/Immae/Config/Ansible.git/commitdiff
Change gpg sign id
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Mon, 19 Nov 2018 07:10:23 +0000 (08:10 +0100)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Mon, 19 Nov 2018 07:10:23 +0000 (08:10 +0100)
roles/git/templates/config.j2
roles/gnupg/tasks/main.yml
roles/gnupg/templates/gpg.conf.j2 [moved from roles/gnupg/files/gnupg/gpg.conf with 55% similarity]
site.yml

index 71826264d051076aad8f2ada8fa1e0822b3c5c35..f723f3330c196c9d5d01e492eb0e477176558e30 100644 (file)
@@ -1,5 +1,5 @@
 [user]
-       signingkey = DC384748709D2619FF2867216D0CAFFDDB1CFE90
+       signingkey = {{ gpg_sign_id }}
 {% if profile in role and role[profile] == "fretlink" %}
        email = ismael.bouya@fretlink.com
 {% else %}
index bfbf31a0bcb5492d7aa6fed6797a510b6739dae8..5139beffbf003fa0bee15748b4001f636ca5718d 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
similarity index 55%
rename from roles/gnupg/files/gnupg/gpg.conf
rename to roles/gnupg/templates/gpg.conf.j2
index 17bc52278888651ba9b9fb7a8e6c62a48192c282..a9670805ccdae7d2cc6897255c8fd43baed61070 100644 (file)
@@ -1,7 +1,7 @@
 # Main signing key
-default-key  DB1CFE90
+default-key {{ gpg_sign_id }}
 
 default-recipient-self
-encrypt-to 0326A611
+encrypt-to {{ gpg_sign_id }}
 auto-key-retrieve
 no-greeting
index 6e73ae355b31d924cf372f20a152d7494cf443f6..90107377b8253e927ca8957c0e81d917910e60ff 100644 (file)
--- a/site.yml
+++ b/site.yml
@@ -4,6 +4,7 @@
     gpg_useremail: "{{ gpg_user }}@{{ ansible_hostname }}"
     gpg_realname: "Ismaël Bouya"
     gpg_user: "{{ lookup('env', 'USER') }}"
+    gpg_sign_id: "F82806FDA1BF5B9A1B3014E7C9FCED6CA6B79454"
     profile: "{{ ansible_hostname }}"
     role:
       flony: "fretlink"