diff --git a/ansible/roles/pyenv/files/zshrc_pyenv b/ansible/roles/pyenv/files/zshrc_pyenv new file mode 100644 index 0000000..affc106 --- /dev/null +++ b/ansible/roles/pyenv/files/zshrc_pyenv @@ -0,0 +1,3 @@ +export PYENV_ROOT=$(pyenv root) +command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init -)" diff --git a/ansible/roles/pyenv/tasks/common.yaml b/ansible/roles/pyenv/tasks/common.yaml index fef1101..c10d22d 100644 --- a/ansible/roles/pyenv/tasks/common.yaml +++ b/ansible/roles/pyenv/tasks/common.yaml @@ -1,3 +1,9 @@ +- name: Install packages + package: + name: + - pyenv + state: present + - import_tasks: tasks/freebsd.yaml when: 'os_flavor == "freebsd"' diff --git a/ansible/roles/pyenv/tasks/linux.yaml b/ansible/roles/pyenv/tasks/linux.yaml index 67da96a..e69de29 100644 --- a/ansible/roles/pyenv/tasks/linux.yaml +++ b/ansible/roles/pyenv/tasks/linux.yaml @@ -1,5 +0,0 @@ -- name: Install packages - package: - name: - - pyenv - state: present diff --git a/ansible/roles/pyenv/tasks/peruser.yaml b/ansible/roles/pyenv/tasks/peruser.yaml index 111e886..f3db8de 100644 --- a/ansible/roles/pyenv/tasks/peruser.yaml +++ b/ansible/roles/pyenv/tasks/peruser.yaml @@ -22,6 +22,16 @@ # - src: foo.conf # dest: .config/foo/foo.conf +- name: Configure zshrc additional imports + copy: + src: "files/zshrc_{{ item }}" + dest: "{{ account_homedir.stdout }}/.config/ansible_deploy/zshrc/{{ item }}.zsh" + mode: 0600 + owner: "{{ account_name.stdout }}" + group: "{{ group_name.stdout }}" + loop: + - pyenv + - import_tasks: tasks/peruser_freebsd.yaml when: 'os_flavor == "freebsd"'