Issue 1:
ISSUE TYPE

Feature Idea

COMPONENT NAME

shell module and check mode

ANSIBLE VERSION

ansible 2.0.1.0

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

shell (and probably command) modules have a creates parameter. The command is not run when the target file exists. When a playbook is executed with --check option, the task is skipped even when the target file exists. It is then difficult to know if the shell command would have been executed in normal mode.

STEPS TO REPRODUCE

have a task using the shell module and specify a creates file.

- name: ensure ecdsa key is present
shell: ssh-keygen -N '' -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key creates=/etc/ssh/ssh_host_ecdsa_key

run the playbook with --check option

EXPECTED RESULTS

Any information telling that the target already exists so there is no need to run the task.

ACTUAL RESULTS

TASK [ensure ecdsa key is present]
skipping: [your_host]

the task marked is skipped even when the file exists.

Issue 2:
Issue Type:

Bug Report

Ansible Version:

ansible 2.0.1.0
config file = /home/yannik/ansible/ansible.cfg
configured module search path = Default w/o overrides

Ansible Configuration:

default

Environment:

fedora

Summary:

The synchronize module hangs indefinitely if used to synchronize a file between two remote hosts with the delegate_to option.

Steps To Reproduce:

This is the task I am using:

- synchronize:
src: /test
dest: /test
delegate_to: HOST

Doing this, I want to copy from HOST:/test to /test of the inventory host currently running the playbook as described in the documentation

Expected Results:

The file should be copied.

Actual Results:

The command hangs indefinitely:

TASK [rsnapshot-remote-host : Copy ssh key of backup pulling host] *************
task path: /home/yannik/ansible/roles/rsnapshot-remote-host/tasks/rsnapshot.yml:9
<INVENTORY_HOST> ESTABLISH SSH CONNECTION FOR USER: root
<INVENTORY_HOST> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/yannik/.ansible/cp/ansible-ssh-%h-%p-%r -tt INVENTORY_HOST '/bin/sh -c '"'"'mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1458571444.47-273656313378136 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1458571444.47-273656313378136 `"'"'"''
<INVENTORY_HOST> PUT /tmp/tmpv0BDhp TO /root/.ansible/tmp/ansible-tmp-1458571444.47-273656313378136/synchronize
<INVENTORY_HOST> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/yannik/.ansible/cp/ansible-ssh-%h-%p-%r '[INVENTORY_HOST]'
<INVENTORY_HOST> ESTABLISH SSH CONNECTION FOR USER: root
<INVENTORY_HOST> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/yannik/.ansible/cp/ansible-ssh-%h-%p-%r -tt INVENTORY_HOST '/bin/sh -c '"'"'LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1458571444.47-273656313378136/synchronize; rm -rf "/root/.ansible/tmp/ansible-tmp-1458571444.47-273656313378136/" > /dev/null 2>&1'"'"''
^C [ERROR]: User interrupted execution