summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-13 01:00:51 +0100
committerIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-13 01:00:51 +0100
commitd0a835a44b3fd25267c3c8c6d3ed12e1e628816b (patch)
tree8d8f13e46ccf6fe07779456c67915983bcba95d4
parent587b6dd6d2d3a63ad28455003c0c2c5f58afdecb (diff)
downloadAnsible-d0a835a44b3fd25267c3c8c6d3ed12e1e628816b.tar.gz
Ansible-d0a835a44b3fd25267c3c8c6d3ed12e1e628816b.tar.zst
Ansible-d0a835a44b3fd25267c3c8c6d3ed12e1e628816b.zip
Use variables to fill gpg information
-rw-r--r--roles/gnupg/handlers/main.yml2
-rw-r--r--site.yml6
2 files changed, 4 insertions, 4 deletions
diff --git a/roles/gnupg/handlers/main.yml b/roles/gnupg/handlers/main.yml
index d32d321..7dc34c7 100644
--- a/roles/gnupg/handlers/main.yml
+++ b/roles/gnupg/handlers/main.yml
@@ -9,7 +9,7 @@
9 prompt: "gpg key will be sent to immae.eu, please login to tmux and give passwords there." 9 prompt: "gpg key will be sent to immae.eu, please login to tmux and give passwords there."
10 seconds: 3 10 seconds: 3
11- name: send key to immae@immae.eu 11- name: send key to immae@immae.eu
12 shell: "gpg --armor --export ismael@flony | ssh immae@immae.eu add_workstation_key | gpg --import -" 12 shell: "gpg --armor --export {{ gpg_useremail }} | ssh immae@immae.eu add_workstation_key | gpg --import -"
13- name: notify add key to password store 13- name: notify add key to password store
14 pause: 14 pause:
15 prompt: "Please add the key to the password store and push: pass init -p Folder/Folder <key> <key>. Press key when done" 15 prompt: "Please add the key to the password store and push: pass init -p Folder/Folder <key> <key>. Press key when done"
diff --git a/site.yml b/site.yml
index c022b97..6e73ae3 100644
--- a/site.yml
+++ b/site.yml
@@ -1,10 +1,10 @@
1--- 1---
2- hosts: home 2- hosts: home
3 vars: 3 vars:
4 gpg_useremail: "ismael@flony" 4 gpg_useremail: "{{ gpg_user }}@{{ ansible_hostname }}"
5 gpg_realname: "Ismaël Bouya" 5 gpg_realname: "Ismaël Bouya"
6 gpg_user: "ismael" 6 gpg_user: "{{ lookup('env', 'USER') }}"
7 profile: "flony" 7 profile: "{{ ansible_hostname }}"
8 role: 8 role:
9 flony: "fretlink" 9 flony: "fretlink"
10 features: 10 features: