Skip to content

Commit

Permalink
Merge pull request #152 from staticdev/docs/update-docs-py311
Browse files Browse the repository at this point in the history
Update docs and defaults with py3.11
  • Loading branch information
staticdev authored Dec 4, 2022
2 parents 59e156e + cd04c4e commit a0c5045
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 270 deletions.
105 changes: 0 additions & 105 deletions CODE_OF_CONDUCT.rst

This file was deleted.

64 changes: 0 additions & 64 deletions CONTRIBUTING.rst

This file was deleted.

79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Ansible role: Pyenv

[![Tests](https://github.com/staticdev/ansible-galaxy-pyenv/workflows/Tests/badge.svg)][tests]

[tests]: https://github.com/staticdev/ansible-galaxy-pyenv/actions?workflow=Tests

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

Install it with the following command:

```console
$ 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.11.0]`
- `pyenv_virtualenvs: [{ venv_name: latest, py_version: 3.11.0 }]`
- `pyenv_global: [3.11.0]`
- `pyenv_update_git_install: true` (get latest pyenv from git)
- `pyenv_enable_autocompletion: false`
- `pyenv_enable_virtualenvs: true`
- `pyenv_setting_path: "{% if pyenv_env == 'user' %}~/.bashrc{% else %}/etc/profile.d/pyenv.sh{% endif %}"`

## Dependencies

None.

## Example Playbook

```yaml
- hosts: servers
roles:
- role: staticdev.pyenv
pyenv_path: "{{ home }}/pyenv"
pyenv_owner: "{{ instance_owner }}"
pyenv_global:
- 3.11.0
- 3.10.6
pyenv_enable_autocompletion: false
pyenv_python_versions:
- 3.11.0
- 3.10.6
pyenv_virtualenvs:
- venv_name: latest_v311
py_version: 3.11.0
- venv_name: latest_v310
py_version: 3.10.6
```
## 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]
[avanov.pyenv]: https://galaxy.ansible.com/avanov/pyenv
[contributor guide]: CONTRIBUTING.rst
[mit]: https://opensource.org/licenses/MIT
[pyenv]: https://github.com/yyuu/pyenv
[staticdev]: https://github.com/staticdev
94 changes: 0 additions & 94 deletions README.rst

This file was deleted.

6 changes: 3 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ pyenv_update_git_install: true
pyenv_enable_autocompletion: false
pyenv_enable_virtualenvs: true
pyenv_python_versions:
- 3.10.6
- 3.11.0
pyenv_global:
- 3.10.6
- 3.11.0
pyenv_virtualenvs:
[]
# - { venv_name: "latest", py_version: "3.10.6" }
# - { venv_name: "latest", py_version: "3.11.0" }
# For a system install, the shims dir will not be writable by users, disable rehashing
pyenv_init_options: "{% if pyenv_env != 'user' %}--no-rehash{% endif %}"

Expand Down
8 changes: 4 additions & 4 deletions molecule/multi-version/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
name: "staticdev.pyenv"
vars:
pyenv_global:
- 3.11.0
- 3.10.6
- 3.9.9
pyenv_python_versions:
- 3.11.0
- 3.10.6
- 3.9.9
pyenv_virtualenvs:
- venv_name: latest_v311
py_version: 3.11.0
- venv_name: latest_v310
py_version: 3.10.6
- venv_name: latest_v39
py_version: 3.9.9

0 comments on commit a0c5045

Please sign in to comment.