File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
tests/integration/targets/systemd_creds_encrypt/tasks Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 5353 - ' "SetCredentialEncrypted=web: " in pretty_encrypted_secret.value'
5454 fail_msg : " SetCredentialEncrypted is not in the output"
5555 success_msg : " SetCredentialEncrypted is in the output"
56+
57+ - name : Ensure the dest file doesn't already exist
58+ ansible.builtin.file :
59+ path : /tmp/systemd_cred_enctypt_test_secret.cred
60+ state : absent
61+
62+ - name : Encrypt secret into the dest file
63+ community.general.systemd_creds_encrypt :
64+ name : web
65+ secret : token
66+ dest : /tmp/systemd_cred_enctypt_test_secret.cred
67+
68+ - name : Check if the dest file exists
69+ stat :
70+ path : /tmp/systemd_cred_enctypt_test_secret.cred
71+ register : dest_file
72+
73+ - name : Assert that the dest file exists
74+ ansible.builtin.assert :
75+ that :
76+ - " dest_file.stats.exists"
77+ fail_msg : " The dest file doesn't exist"
78+ success_msg : " The dest file does exist"
You can’t perform that action at this time.
0 commit comments