when:(not go_binary.stat.exists or go_version_output.stdout is not search("go{{ go_version }}")) and (local_go_tarball is failed or local_go_tarball is skipped)
# Step 2: Remove old /usr/local/go and extract new one
-name:Remove old Go directory
file:
path:/usr/local/go
state:absent
become:true
when:not go_binary.stat.exists or go_version_output.stdout is not search("go{{ go_version }}")