forked from infra/ansible
Address review comments
- liberal use of no_log in the kyroptic module - Switch to using an environment variable for openssl PIN
This commit is contained in:
parent
f76f1dcdde
commit
505a17f2aa
1 changed files with 8 additions and 1 deletions
|
|
@ -45,6 +45,7 @@
|
|||
environment:
|
||||
KRYOPTIC_CONF: "{{ siguldry_kryoptic_conf }}"
|
||||
KRYOPTIC_SO_PIN: "{{ siguldry_kryoptic_so_pin }}"
|
||||
no_log: true
|
||||
when: not kryoptic_db.stat.exists
|
||||
tags:
|
||||
- config
|
||||
|
|
@ -64,6 +65,7 @@
|
|||
KRYOPTIC_CONF: "{{ siguldry_kryoptic_conf }}"
|
||||
KRYOPTIC_SO_PIN: "{{ siguldry_kryoptic_so_pin }}"
|
||||
KRYOPTIC_USER_PIN: "{{ siguldry_kryoptic_user_pin }}"
|
||||
no_log: true
|
||||
when: not kryoptic_db.stat.exists
|
||||
tags:
|
||||
- config
|
||||
|
|
@ -82,6 +84,7 @@
|
|||
environment:
|
||||
KRYOPTIC_CONF: "{{ siguldry_kryoptic_conf }}"
|
||||
KRYOPTIC_USER_PIN: "{{ siguldry_kryoptic_user_pin }}"
|
||||
no_log: true
|
||||
register: kryoptic_objects
|
||||
changed_when: false
|
||||
tags:
|
||||
|
|
@ -105,6 +108,7 @@
|
|||
environment:
|
||||
KRYOPTIC_CONF: "{{ siguldry_kryoptic_conf }}"
|
||||
KRYOPTIC_USER_PIN: "{{ siguldry_kryoptic_user_pin }}"
|
||||
no_log: true
|
||||
when: "'siguldry-binding-key' not in kryoptic_objects.stdout"
|
||||
tags:
|
||||
- config
|
||||
|
|
@ -117,12 +121,14 @@
|
|||
openssl req -x509
|
||||
-provider pkcs11
|
||||
-subj /CN=siguldry-binding-key
|
||||
-passin pass:{{ siguldry_kryoptic_user_pin }}
|
||||
-passin env:KRYOPTIC_USER_PIN
|
||||
-key pkcs11:token=siguldry-stg-token;type=private
|
||||
-out /etc/siguldry/kryoptic-binding.crt
|
||||
creates: /etc/siguldry/kryoptic-binding.crt
|
||||
environment:
|
||||
KRYOPTIC_CONF: "{{ siguldry_kryoptic_conf }}"
|
||||
KRYOPTIC_USER_PIN: "{{ siguldry_kryoptic_user_pin }}"
|
||||
no_log: true
|
||||
tags:
|
||||
- config
|
||||
- siguldry
|
||||
|
|
@ -144,6 +150,7 @@
|
|||
environment:
|
||||
KRYOPTIC_CONF: "{{ siguldry_kryoptic_conf }}"
|
||||
KRYOPTIC_USER_PIN: "{{ siguldry_kryoptic_user_pin }}"
|
||||
no_log: true
|
||||
when: "'siguldry-binding-key' not in kryoptic_objects.stdout"
|
||||
tags:
|
||||
- config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue