use openssl rand -base64 to generate password

This commit is contained in:
Larry Huang 2019-08-31 23:33:03 +08:00
parent af3ee9809f
commit 11b34e5395

View file

@ -6,8 +6,7 @@
- name: Generate p12 export password - name: Generate p12 export password
shell: > shell: >
openssl rand 8 | openssl rand -base64 9
python3 -c 'import sys,string; chars=string.ascii_letters + string.digits + "_@"; print("".join([chars[ord(c) % 64] for c in list(sys.stdin.read())]))'
register: p12_password_generated register: p12_password_generated
when: p12_password is not defined when: p12_password is not defined
tags: update-users tags: update-users