mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-29 02:44:43 +00:00
Remove usage of b64encode in lookup from Vault tests.
There are some issues using a combination of `lookup('file')` and the
`b64encode` filter in Ansible, making tests unstable. This change
removes the usage of b64encode when loading public and private keys
from files in the Vault test playbooks.
This commit is contained in:
@@ -8,21 +8,27 @@
|
||||
cmd: |
|
||||
openssl genrsa -out "{{ item }}private.pem" 2048
|
||||
openssl rsa -in "{{ item }}private.pem" -outform PEM -pubout -out "{{ item }}public.pem"
|
||||
base64 "{{ item }}public.pem" -w5000 > "{{ item }}public.b64"
|
||||
base64 "{{ item }}private.pem" -w5000 > "{{ item }}private.b64"
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
with_items:
|
||||
- ""
|
||||
- old_
|
||||
- A_
|
||||
- B_
|
||||
|
||||
- name: Copy files to target host.
|
||||
copy:
|
||||
src: "{{ playbook_dir }}/{{ item }}"
|
||||
dest: "{{ ansible_env.HOME }}/{{ item }}"
|
||||
with_items:
|
||||
- private.pem
|
||||
- public.pem
|
||||
- old_private.pem
|
||||
- old_public.pem
|
||||
- A_private.pem
|
||||
- A_public.pem
|
||||
- B_private.pem
|
||||
- B_public.pem
|
||||
- A_private.b64
|
||||
- A_public.b64
|
||||
- B_private.b64
|
||||
- B_public.b64
|
||||
- password.txt
|
||||
- in.txt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user