mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-29 10:54:44 +00:00
Split vault tests in different files.
This change split vault tests in several files, organized by vault type and operation (vault vs. member) so that it is easier to add new tests for issues and verify if tests are missing.
This commit is contained in:
55
tests/vault/env_setup.yml
Normal file
55
tests/vault/env_setup.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
# Tasks executed to ensure a sane environment to test IPA Vault module.
|
||||
|
||||
- name: Create private key file.
|
||||
shell:
|
||||
cmd: openssl genrsa -out private.pem 2048
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
|
||||
- name: Create public key file.
|
||||
shell:
|
||||
cmd: openssl rsa -in private.pem -outform PEM -pubout -out public.pem
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
|
||||
- name: Ensure environment is clean.
|
||||
import_tasks: env_cleanup.yml
|
||||
|
||||
- name: Copy password file to target host.
|
||||
copy:
|
||||
src: "{{ playbook_dir }}/password.txt"
|
||||
dest: "{{ ansible_env.HOME }}/password.txt"
|
||||
|
||||
- name: Copy public key file to target host.
|
||||
copy:
|
||||
src: "{{ playbook_dir }}/public.pem"
|
||||
dest: "{{ ansible_env.HOME }}/public.pem"
|
||||
|
||||
- name: Copy private key file to target host.
|
||||
copy:
|
||||
src: "{{ playbook_dir }}/private.pem"
|
||||
dest: "{{ ansible_env.HOME }}/private.pem"
|
||||
|
||||
- name: Copy input data file to target host.
|
||||
copy:
|
||||
src: "{{ playbook_dir }}/in.txt"
|
||||
dest: "{{ ansible_env.HOME }}/in.txt"
|
||||
|
||||
- name: Ensure vaultgroup exists.
|
||||
ipagroup:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: vaultgroup
|
||||
|
||||
- name: Ensure testing users exist.
|
||||
ipauser:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
users:
|
||||
- name: user01
|
||||
first: First
|
||||
last: Start
|
||||
- name: user02
|
||||
first: Second
|
||||
last: Middle
|
||||
- name: user03
|
||||
first: Third
|
||||
last: Last
|
||||
Reference in New Issue
Block a user