diff options
-rw-r--r-- | roles/git/templates/config.j2 | 2 | ||||
-rw-r--r-- | roles/gnupg/tasks/main.yml | 5 | ||||
-rw-r--r-- | roles/gnupg/templates/gpg.conf.j2 (renamed from roles/gnupg/files/gnupg/gpg.conf) | 4 | ||||
-rw-r--r-- | site.yml | 1 |
4 files changed, 8 insertions, 4 deletions
diff --git a/roles/git/templates/config.j2 b/roles/git/templates/config.j2 index 7182626..f723f33 100644 --- a/roles/git/templates/config.j2 +++ b/roles/git/templates/config.j2 | |||
@@ -1,5 +1,5 @@ | |||
1 | [user] | 1 | [user] |
2 | signingkey = DC384748709D2619FF2867216D0CAFFDDB1CFE90 | 2 | signingkey = {{ gpg_sign_id }} |
3 | {% if profile in role and role[profile] == "fretlink" %} | 3 | {% if profile in role and role[profile] == "fretlink" %} |
4 | email = ismael.bouya@fretlink.com | 4 | email = ismael.bouya@fretlink.com |
5 | {% else %} | 5 | {% else %} |
diff --git a/roles/gnupg/tasks/main.yml b/roles/gnupg/tasks/main.yml index bfbf31a..5139bef 100644 --- a/roles/gnupg/tasks/main.yml +++ b/roles/gnupg/tasks/main.yml | |||
@@ -12,7 +12,10 @@ | |||
12 | dest: "$XDG_CONFIG_HOME/gnupg/{{ item }}" | 12 | dest: "$XDG_CONFIG_HOME/gnupg/{{ item }}" |
13 | loop: | 13 | loop: |
14 | - gpg-agent.conf | 14 | - gpg-agent.conf |
15 | - gpg.conf | 15 | - name: gpg config file |
16 | template: | ||
17 | src: "gpg.conf.j2" | ||
18 | dest: "$XDG_CONFIG_HOME/gnupg/gpg.conf" | ||
16 | - name: Get gnupg runtime folder name | 19 | - name: Get gnupg runtime folder name |
17 | shell: 'gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"' | 20 | shell: 'gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"' |
18 | register: gnupg_runtime_dir_cmd | 21 | register: gnupg_runtime_dir_cmd |
diff --git a/roles/gnupg/files/gnupg/gpg.conf b/roles/gnupg/templates/gpg.conf.j2 index 17bc522..a967080 100644 --- a/roles/gnupg/files/gnupg/gpg.conf +++ b/roles/gnupg/templates/gpg.conf.j2 | |||
@@ -1,7 +1,7 @@ | |||
1 | # Main signing key | 1 | # Main signing key |
2 | default-key DB1CFE90 | 2 | default-key {{ gpg_sign_id }} |
3 | 3 | ||
4 | default-recipient-self | 4 | default-recipient-self |
5 | encrypt-to 0326A611 | 5 | encrypt-to {{ gpg_sign_id }} |
6 | auto-key-retrieve | 6 | auto-key-retrieve |
7 | no-greeting | 7 | no-greeting |
@@ -4,6 +4,7 @@ | |||
4 | gpg_useremail: "{{ gpg_user }}@{{ ansible_hostname }}" | 4 | gpg_useremail: "{{ gpg_user }}@{{ ansible_hostname }}" |
5 | gpg_realname: "Ismaël Bouya" | 5 | gpg_realname: "Ismaël Bouya" |
6 | gpg_user: "{{ lookup('env', 'USER') }}" | 6 | gpg_user: "{{ lookup('env', 'USER') }}" |
7 | gpg_sign_id: "F82806FDA1BF5B9A1B3014E7C9FCED6CA6B79454" | ||
7 | profile: "{{ ansible_hostname }}" | 8 | profile: "{{ ansible_hostname }}" |
8 | role: | 9 | role: |
9 | flony: "fretlink" | 10 | flony: "fretlink" |