Skip to content
Snippets Groups Projects
Commit 8ca282e2 authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

Modified and added tests to verify correct `salt` update behavior.

parent 4ef4e706
No related branches found
No related tags found
No related merge requests found
...@@ -234,14 +234,41 @@ ...@@ -234,14 +234,41 @@
register: result register: result
failed_when: not result.changed failed_when: not result.changed
- name: Try to change symmetric vault salt, without providing any password
ipavault: ipavault:
ipaadmin_password: SomeADMINpassword ipaadmin_password: SomeADMINpassword
name: inexistentvault name: symvault
password: SomeVAULTpassword salt: MTIzNDU2Nzg5MDEyMzQ1Ngo=
register: result
failed_when: not result.failed and "Vault `salt` can only change when changing the password." not in result.msg
- name: Try to change symmetric vault salt, without providing `password`
ipavault:
ipaadmin_password: SomeADMINpassword
name: symvault
salt: MTIzNDU2Nzg5MDEyMzQ1Ngo=
new_password: SomeVAULTpassword new_password: SomeVAULTpassword
new_password_file: "{{ ansible_env.HOME }}/password.txt"
register: result register: result
failed_when: not result.failed or "parameters are mutually exclusive" not in result.msg failed_when: not result.failed and "Vault `salt` can only change when changing the password." not in result.msg
- name: Try to change symmetric vault salt, without providing `new_password`
ipavault:
ipaadmin_password: SomeADMINpassword
name: symvault
salt: MTIzNDU2Nzg5MDEyMzQ1Ngo=
password: SomeVAULTpassword
register: result
failed_when: not result.failed and "Vault `salt` can only change when changing the password." not in result.msg
- name: Try to change symmetric vault salt, using wrong password.
ipavault:
ipaadmin_password: SomeADMINpassword
name: symvault
password: SomeWRONGpassword
new_password: SomeWRONGpassword
salt: MDEyMzQ1Njc4OTAxMjM0NQo=
register: result
failed_when: not result.failed
- name: Ensure symmetric vault is absent - name: Ensure symmetric vault is absent
ipavault: ipavault:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment