summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-19 08:10:23 +0100
committerIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-19 08:10:23 +0100
commitdfd05afe7215e75ba2d34cc4cbc73ed8e10452bf (patch)
treef4875b8ff1c3d18e90e59634026c37ceb2262e27
parentdd308b2f8fdd6cfb2aec4778c347a7d156a0d754 (diff)
downloadAnsible-dfd05afe7215e75ba2d34cc4cbc73ed8e10452bf.tar.gz
Ansible-dfd05afe7215e75ba2d34cc4cbc73ed8e10452bf.tar.zst
Ansible-dfd05afe7215e75ba2d34cc4cbc73ed8e10452bf.zip
Change gpg sign id
-rw-r--r--roles/git/templates/config.j22
-rw-r--r--roles/gnupg/tasks/main.yml5
-rw-r--r--roles/gnupg/templates/gpg.conf.j2 (renamed from roles/gnupg/files/gnupg/gpg.conf)4
-rw-r--r--site.yml1
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
2default-key DB1CFE90 2default-key {{ gpg_sign_id }}
3 3
4default-recipient-self 4default-recipient-self
5encrypt-to 0326A611 5encrypt-to {{ gpg_sign_id }}
6auto-key-retrieve 6auto-key-retrieve
7no-greeting 7no-greeting
diff --git a/site.yml b/site.yml
index 6e73ae3..9010737 100644
--- a/site.yml
+++ b/site.yml
@@ -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"