mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-29 19:04:42 +00:00
Modified and added tests to verify correct salt update behavior.
This commit is contained in:
@@ -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=
|
||||||
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 `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
|
- name: Ensure symmetric vault is absent
|
||||||
ipavault:
|
ipavault:
|
||||||
|
|||||||
Reference in New Issue
Block a user