-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make check_mode
integration test fails
#13418
Comments
Note: I've removed the broken tests from my Travis CI build for now just to get it working... but there are more than just |
Interesting, so this is failing because the task above the one that fails is not properly honoring the |
Closing This TicketHi! We believe the above commit should resolve this problem for you. This will also be included in the next major release. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
I stumbled across this when trying to implement a testing, CI, & CD pipeline for my fork of the old unmaintained Ansible Base Docker images (trinitronx/ansible-docker-base). When running the
make check_mode
integration test playbook, it fails with errors:You can also see the error on lines
7523-7533
of this Travis CI test log.It appears that when the playbook is first run in
--check-mode
, it simulates writing atemplate
file and asserts that the file is changed, but is not actually written. Then thetemplate
module is run withalways_run: True
to actually write out a file, then is run again, this time withoutalways_run: True
. Finally, the playbook asserts that the task was marked as "not changed" in order to test that thetemplate
module (run in--check-mode
) knows the file does not need to be changed when it is already existing on the filesystem.The failure seems to be because the file does not exist after the first
template
run withalways_run: True
. The odd thing is that themake check_mode
playbook also runs thetest_always_run
role, which indeed does test thatalways_run: yes
on acommand
module does actually run the command.This was run against current
devel
branchHEAD
: b85e6e0The text was updated successfully, but these errors were encountered: