Skip ssh_known_hosts tasks in check mode

The tempfile task is skipped in check mode so we need to skip all tasks to
avoid referencing the undefined temp file path.

Change-Id: I87a4b40387cabed86e04efa64ddc19f117693589
Closes-Bug: 1817765
(cherry picked from commit 6f538dc820)
This commit is contained in:
Oliver Walsh 2019-02-26 17:51:15 +00:00 committed by Alex Schultz
parent b5dbc4e2e9
commit f965b037b7
1 changed files with 1 additions and 0 deletions

View File

@ -1,6 +1,7 @@
---
- name: Add host keys in /etc/ssh/ssh_known_hosts for live/cold-migration
become: true
check_mode: no
block:
# Workaround https://bugs.launchpad.net/tripleo/+bug/1810932
# Ansible modules perform a replace instead of in-place modification.