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
|
- iptables-persistent
|
||||||
- keepassxc
|
- keepassxc
|
||||||
- ldap-utils
|
- ldap-utils
|
||||||
|
- libbz2-dev
|
||||||
|
- libffi-dev
|
||||||
- libldap2-dev
|
- libldap2-dev
|
||||||
|
- liblzma-dev
|
||||||
|
- libncurses-dev
|
||||||
|
- libreadline-dev
|
||||||
- libsasl2-dev
|
- libsasl2-dev
|
||||||
|
- libsqlite3-dev
|
||||||
|
- libssl-dev
|
||||||
- libvirt-clients
|
- libvirt-clients
|
||||||
- libvirt-daemon
|
- libvirt-daemon
|
||||||
- libvirt-daemon-config-network
|
- libvirt-daemon-config-network
|
||||||
|
@ -47,6 +54,7 @@
|
||||||
- spice-vdagent
|
- spice-vdagent
|
||||||
- sshpass
|
- sshpass
|
||||||
- task-xfce-desktop
|
- task-xfce-desktop
|
||||||
|
- tk-dev
|
||||||
- unzip
|
- unzip
|
||||||
- vim-gtk3
|
- vim-gtk3
|
||||||
- virt-manager
|
- virt-manager
|
||||||
|
@ -57,6 +65,8 @@
|
||||||
atuin_version: 18.4.0
|
atuin_version: 18.4.0
|
||||||
# Version of ASDF itself
|
# Version of ASDF itself
|
||||||
asdf_version: 0.15.0
|
asdf_version: 0.15.0
|
||||||
|
# Version of Python to install using pyenv
|
||||||
|
python_version: 3.11.11
|
||||||
# Tools that will be installed using asdf
|
# Tools that will be installed using asdf
|
||||||
asdf_tools:
|
asdf_tools:
|
||||||
- java
|
- java
|
||||||
|
@ -595,6 +605,26 @@
|
||||||
src: "{{ item.path }}"
|
src: "{{ item.path }}"
|
||||||
dest: /home/vagrant/.local/bin/{{ item.path | basename }}
|
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
|
# Configure SSH for the vagrant user
|
||||||
- name: Check for a Chezmoi-provided SSH configuration
|
- name: Check for a Chezmoi-provided SSH configuration
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
|
Loading…
Add table
Reference in a new issue