Skip to content

staticdev/ansible-role-pyenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fa67b28 · Dec 1, 2022
Dec 1, 2022
Sep 26, 2022
May 7, 2014
Dec 1, 2022
Oct 8, 2022
Oct 8, 2022
Jun 5, 2021
Jun 28, 2021
May 7, 2014
Jan 28, 2021
Jun 28, 2021
Aug 7, 2022
Jun 28, 2021
Aug 17, 2021
Aug 17, 2021
Aug 7, 2022
Sep 26, 2022
Dec 1, 2022
Jun 28, 2021
Jun 28, 2021

Repository files navigation

Ansible role: Pyenv

Tests

Ansible Galaxy role for pyenv on Debian / Ubuntu / RedHat / OSX.

Install it with the following command:

$ ansible-galaxy install staticdev.pyenv

Requirements

None.

Role Variables

Here is the list of all variables and their default values:

  • pyenv_env: "user" (should be either "user" or "system")
  • pyenv_path: "{% if pyenv_env == 'user' %}{{ ansible_env.HOME }}/pyenv{% else %}/usr/local/pyenv{% endif %}"
  • pyenv_owner: "{{ ansible_env.USER }}"
  • pyenv_owner_group: "{{ pyenv_owner }}"
  • pyenv_python_versions: [3.10.6]
  • pyenv_virtualenvs: [{ venv_name: latest, py_version: 3.10.6 }]
  • pyenv_global: [3.10.6]
  • pyenv_update_git_install: true (get latest pyenv from git)
  • pyenv_enable_autocompletion: false
  • pyenv_setting_path: "{% if pyenv_env == 'user' %}~/.bashrc{% else %}/etc/profile.d/pyenv.sh{% endif %}"

Dependencies

None.

Example Playbook

- hosts: servers
  roles:
     - role: staticdev.pyenv
       pyenv_path: "{{ home }}/pyenv"
       pyenv_owner: "{{ instance_owner }}"
       pyenv_global:
         - 3.10.6
         - 3.9.9
       pyenv_enable_autocompletion: false
       pyenv_python_versions:
         - 3.10.6
         - 3.9.9
       pyenv_virtualenvs:
         - venv_name: latest_v310
           py_version: 3.10.6
         - venv_name: latest_v39
           py_version: 3.9.9

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Ansible role Pyenv is free and open source software.

Author Information

staticdev. Heavily based on Maxim Avanov's avanov.pyenv