feat: install Python using pyenv
This commit is contained in:
parent
00e0aaea7d
commit
a264e9d79f
1 changed files with 30 additions and 0 deletions
|
@ -27,8 +27,15 @@
|
|||
- iptables-persistent
|
||||
- keepassxc
|
||||
- ldap-utils
|
||||
- libbz2-dev
|
||||
- libffi-dev
|
||||
- libldap2-dev
|
||||
- liblzma-dev
|
||||
- libncurses-dev
|
||||
- libreadline-dev
|
||||
- libsasl2-dev
|
||||
- libsqlite3-dev
|
||||
- libssl-dev
|
||||
- libvirt-clients
|
||||
- libvirt-daemon
|
||||
- libvirt-daemon-config-network
|
||||
|
@ -47,6 +54,7 @@
|
|||
- spice-vdagent
|
||||
- sshpass
|
||||
- task-xfce-desktop
|
||||
- tk-dev
|
||||
- unzip
|
||||
- vim-gtk3
|
||||
- virt-manager
|
||||
|
@ -57,6 +65,8 @@
|
|||
atuin_version: 18.4.0
|
||||
# Version of ASDF itself
|
||||
asdf_version: 0.15.0
|
||||
# Version of Python to install using pyenv
|
||||
python_version: 3.11.11
|
||||
# Tools that will be installed using asdf
|
||||
asdf_tools:
|
||||
- java
|
||||
|
@ -595,6 +605,26 @@
|
|||
src: "{{ item.path }}"
|
||||
dest: /home/vagrant/.local/bin/{{ item.path | basename }}
|
||||
|
||||
# Install Python using pyenv
|
||||
- name: Check for pyenv
|
||||
ansible.builtin.shell:
|
||||
cmd: >-
|
||||
source /home/vagrant/.zshrc &&
|
||||
which pyenv
|
||||
failed_when: false
|
||||
register: pyenv_check
|
||||
- name: Install Python {{ python_version }} using pyenv
|
||||
ansible.builtin.shell:
|
||||
executable: /bin/zsh
|
||||
cmd: >-
|
||||
source /home/vagrant/.zshrc;
|
||||
if [ "`pyenv version-name`" != "{{ python_version }}" ]; then
|
||||
pyenv install {{ python_version }} &&
|
||||
pyenv global {{ python_version }};
|
||||
else
|
||||
true;
|
||||
fi
|
||||
|
||||
# Configure SSH for the vagrant user
|
||||
- name: Check for a Chezmoi-provided SSH configuration
|
||||
ansible.builtin.stat:
|
||||
|
|
Loading…
Add table
Reference in a new issue