Filtering and executing tasks based upon facts

I am trying to use conditionals to determine if I run a task, It seems that the when conditional does not work for some tasks. Is there a syntax error here or am i formatting my yaml incorrectly. Any and all examples of working conditionals would be apprecitated.

ansible-> cat copy-file.yml

I think you want ‘ansible_distribution == “CentOS”’. “ansible_os_family” should be “RedHat” for both CentOS and RHEL.

–Steve