mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
Modified and added tests to verify correct salt update behavior.
This commit is contained in:
@@ -234,14 +234,41 @@
|
||||
register: result
|
||||
failed_when: not result.changed
|
||||
|
||||
- name: Try to change symmetric vault salt, without providing any password
|
||||
ipavault:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: inexistentvault
|
||||
password: SomeVAULTpassword
|
||||
new_password: SomeVAULTpassword
|
||||
new_password_file: "{{ ansible_env.HOME }}/password.txt"
|
||||
name: symvault
|
||||
salt: MTIzNDU2Nzg5MDEyMzQ1Ngo=
|
||||
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 `password`
|
||||
ipavault:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: symvault
|
||||
salt: MTIzNDU2Nzg5MDEyMzQ1Ngo=
|
||||
new_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, 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
|
||||
ipavault:
|
||||
|
||||
Reference in New Issue
Block a user