diff --git a/roles/etcd/tasks/install_from_github.yml b/roles/etcd/tasks/install_from_github.yml index 2afcc8ec8b2e9585e07bba8e6edc7e89a44c387f..5bdcad87bb498460f55e49e745e9a9741e6d052b 100644 --- a/roles/etcd/tasks/install_from_github.yml +++ b/roles/etcd/tasks/install_from_github.yml @@ -33,6 +33,11 @@ dest: /tmp/etcd.tar.gz when: do_install_etcd +# Avoid 'text file busy' when copying over running binary. +- name: Move old etcd binary out of the way + shell: "mv -f /usr/bin/etcd /usr/bin/etcd.old" + when: "do_install_etcd and etcd_bin.stat.exists" + # We really want to use 'tar' here and not unarchive because we need # --strip-components. - name: Extract etcd binary and install contents