---

# Archive the current state of the rbenv
# as a starting point for new builds.
# The edx-rbenv directory is deleted and then recreated
# cleanly from the archive by the jenkins build scripts.
- name: Create a clean rbenv archive
  command: >
    tar -cpzf edx-rbenv_clean.tar.gz {{ jenkins_rbenv_root }}
    chdir={{ jenkins_home }}
    creates={{ jenkins_home }}/edx-rbenv_clean.tar.gz
  sudo_user: "{{ jenkins_user }}"

---

# Archive the current state of the rbenv
# as a starting point for new builds.
# The edx-rbenv directory is deleted and then recreated
# cleanly from the archive by the jenkins build scripts.
- name: Create a clean rbenv archive
  command: >
    tar -cpzf edx-rbenv_clean.tar.gz .rbenv
    chdir={{ jenkins_home }}
    creates={{ jenkins_home }}/edx-rbenv_clean.tar.gz
  sudo_user: "{{ jenkins_user }}"

Set rbenv tar target to .rbenv instead of /home/jenkins
Set rbenv tar target to .rbenv instead of /home/jenkins

This will make it consistent with how we pack and unpack the
virtualenv (in terms of directory structure).
