mirror of
https://github.com/trailofbits/algo.git
synced 2025-08-02 19:03:04 +02:00
use password module to generate password
This commit is contained in:
parent
95eddccfb7
commit
eb61e39372
1 changed files with 2 additions and 4 deletions
|
@ -5,10 +5,8 @@
|
||||||
register: CA_password
|
register: CA_password
|
||||||
|
|
||||||
- name: Generate p12 export password
|
- name: Generate p12 export password
|
||||||
shell: >
|
set_fact:
|
||||||
openssl rand 8 |
|
p12_password_generated: "{{ lookup('password', '/dev/null length=9 chars=ascii_letters,digits,!,@,#,$,%,^,&,*,<,>,/,?') }}"
|
||||||
python -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
|
|
||||||
when: p12_password is not defined
|
when: p12_password is not defined
|
||||||
tags: update-users
|
tags: update-users
|
||||||
become: false
|
become: false
|
||||||
|
|
Loading…
Add table
Reference in a new issue