- fail_copy_encrypted_file.msg == 'A vault password or secret must be specified to decrypt {{role_path}}/files-different/vault/vault-file'
- fail_copy_encrypted_file.msg.endswith('A vault password or secret must be specified to decrypt ' + role_path + '/files-different/vault/vault-file')
- name:fail to copy a directory with an encrypted file without the password
- name:fail to copy a directory with an encrypted file without the password
copy:
copy:
@ -2369,7 +2368,7 @@
assert:
assert:
that:
that:
- fail_copy_directory_with_enc_file is failed
- fail_copy_directory_with_enc_file is failed
- fail_copy_directory_with_enc_file.msg == 'A vault password or secret must be specified to decrypt {{role_path}}/files-different/vault/vault-file'
- fail_copy_directory_with_enc_file.msg.endswith('A vault password or secret must be specified to decrypt ' + role_path + '/files-different/vault/vault-file')
#
#
# Test for issue 74536: recursively copy all nested directories with remote_src=yes and src='dir/' when dest exists
# Test for issue 74536: recursively copy all nested directories with remote_src=yes and src='dir/' when dest exists
grep -q "ERROR! The requested handler 'notify_inexistent_handler' was not found in either the main handlers list nor in the listening handlers list" <<<"$result"
grep -q "The requested handler 'notify_inexistent_handler' was not found in either the main handlers list nor in the listening handlers list" <<<"$result"
# Notify inexistent handlers without errors when ANSIBLE_ERROR_ON_MISSING_HANDLER=false
# Notify inexistent handlers without errors when ANSIBLE_ERROR_ON_MISSING_HANDLER=false
grep out.txt -e "ERROR! The requested handler 'handler name with myvar' was not found"
grep out.txt -e "The requested handler 'handler name with myvar' was not found"
grep out.txt -e "\[WARNING\]: Handler 'handler name with {{ test_var }}' is unusable"
grep out.txt -e "\[WARNING\]: Handler 'handler name with {{ test_var }}' is unusable"
["$(grep out.txt -ce 'handler ran')"="0"]
["$(grep out.txt -ce 'handler ran')"="0"]
["$(grep out.txt -ce 'handler with var ran')"="0"]
["$(grep out.txt -ce 'handler with var ran')"="0"]
# Test include_role and import_role cannot be used as handlers
# Test include_role and import_role cannot be used as handlers
ansible-playbook test_role_as_handler.yml "$@" 2>&1| tee out.txt
ansible-playbook test_role_as_handler.yml "$@" 2>&1| tee out.txt
grep out.txt -e "ERROR! Using 'include_role' as a handler is not supported."
grep out.txt -e "Using 'include_role' as a handler is not supported."
# Test notifying a handler from within include_tasks does not work anymore
# Test notifying a handler from within include_tasks does not work anymore
ansible-playbook test_notify_included.yml "$@" 2>&1| tee out.txt
ansible-playbook test_notify_included.yml "$@" 2>&1| tee out.txt
["$(grep out.txt -ce 'I was included')"="1"]
["$(grep out.txt -ce 'I was included')"="1"]
grep out.txt -e "ERROR! The requested handler 'handler_from_include' was not found in either the main handlers list nor in the listening handlers list"
grep out.txt -e "The requested handler 'handler_from_include' was not found in either the main handlers list nor in the listening handlers list"
ansible-playbook test_handlers_meta.yml -i inventory.handlers -vv "$@"| tee out.txt
ansible-playbook test_handlers_meta.yml -i inventory.handlers -vv "$@"| tee out.txt