githubixx/ansible-role-etcd

Task "Downloading official etcd release" saves file with wrong filename

AlexandreGohier opened this issue · 2 comments

The task "Downloading official etcd release" only specifies a destination directory without a filename :

- name: Downloading official etcd release
  get_url:
    url: https://github.com/coreos/etcd/releases/download/v{{etcd_version}}/etcd-v{{etcd_version}}-linux-amd64.tar.gz
    dest: "{{etcd_download_dir}}"
    mode: 0755
  tags:
    - etcd

As a result, the filename is not as expected by the next task "Unzip downloaded file" which then crashes:
screen shot 2018-05-14 at 14 00 53

screen shot 2018-05-14 at 15 50 11

A simple fix is to specify the full filename in the dest parameter such as this:

    dest: "{{etcd_download_dir}}/etcd-v{{etcd_version}}-linux-amd64.tar.gz"

I ran into this problem on a btrfs filesystem, it might not be a problem on ext4.

That's interesting that nobody including myself had this issue. #7 should fix it.

I confirm, it's now working fine. Thanks.