diff options
author | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-19 08:10:23 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-19 08:10:23 +0100 |
commit | dfd05afe7215e75ba2d34cc4cbc73ed8e10452bf (patch) | |
tree | f4875b8ff1c3d18e90e59634026c37ceb2262e27 /roles | |
parent | dd308b2f8fdd6cfb2aec4778c347a7d156a0d754 (diff) | |
download | Ansible-dfd05afe7215e75ba2d34cc4cbc73ed8e10452bf.tar.gz Ansible-dfd05afe7215e75ba2d34cc4cbc73ed8e10452bf.tar.zst Ansible-dfd05afe7215e75ba2d34cc4cbc73ed8e10452bf.zip |
Change gpg sign id
Diffstat (limited to 'roles')
-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 |
3 files changed, 7 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 |