{"id":18764258,"url":"https://github.com/ednz-cloud/manage_pip_packages","last_synced_at":"2026-02-05T10:03:05.574Z","repository":{"id":143529117,"uuid":"614559383","full_name":"ednz-cloud/manage_pip_packages","owner":"ednz-cloud","description":"Ansible role to manage python package with pip on debian-based systems. Mirror from https://git.ednz.fr/ansible-roles/manage_pip_packages.","archived":false,"fork":false,"pushed_at":"2024-12-08T20:34:28.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-20T20:19:44.079Z","etag":null,"topics":["ansible","ansible-role","linux","pip","python"],"latest_commit_sha":null,"homepage":"https://ednz.fr","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ednz-cloud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-15T20:50:41.000Z","updated_at":"2024-12-08T20:34:31.000Z","dependencies_parsed_at":"2024-02-05T19:47:04.725Z","dependency_job_id":"e496fc72-b039-41ea-b462-f8867f969d58","html_url":"https://github.com/ednz-cloud/manage_pip_packages","commit_stats":null,"previous_names":["ednz-cloud/manage_pip_packages"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ednz-cloud/manage_pip_packages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ednz-cloud%2Fmanage_pip_packages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ednz-cloud%2Fmanage_pip_packages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ednz-cloud%2Fmanage_pip_packages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ednz-cloud%2Fmanage_pip_packages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ednz-cloud","download_url":"https://codeload.github.com/ednz-cloud/manage_pip_packages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ednz-cloud%2Fmanage_pip_packages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27561665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-07T02:00:07.896Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","linux","pip","python"],"created_at":"2024-11-07T18:29:16.002Z","updated_at":"2025-12-07T05:30:33.599Z","avatar_url":"https://github.com/ednz-cloud.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Manage pip packages**\n\nThis role enables you to manage python packages on **debian-based** distributions. It can be used on its own , or be called by other roles the install/remove packages on demand.\n\n## **Requirements**\n\nNone.\n\n## **Role Variables**\n\n```yaml\nmanage_pip_packages_install_prereqs: true\n```\n\nWhether or not the role should install the necessary dependencies to function correctly (python3, python3-pip, python3-venv if installing in a venv).This requires the [ednz_cloud.manage_apt_packages](https://github.com/ednz-cloud/manage_apt_packages) to also be installed.\n\n```yaml\nmanage_pip_packages_list:\n  - name: nginx\n    version_constraint: latest\n    state: absent\n  - name: ...\n```\n\nA list of packages, with their name, desired version and state. `version_constraint` can be multiple constraints,separated by commas (example: `\u003e1.10`, `\u003e1.10,\u003c1.15,!=1.12`,`==1.13`).\n\n```yaml\nmanage_pip_packages_break_system_packages: false\n```\n\nThis variable allow you to pass the `--break-system-packages` option to pip.\n\n\u003e **Warning**\n\u003e This is not recommended, and is only here if you have no other choice to install packages that aren't supported by the package manager, on distros that enforce the [PEP668](https://peps.python.org/pep-0668/). Chances are you can probably installyour packages in virtual environments, avoiding the potential damages to your system.\n\n```yaml\nmanage_pip_packages_create_venv: false\n```\n\nWhether to install the packages in a virtual environment (will be created if it does not exist)\n\n```yaml\nmanage_pip_packages_venv_path: /tmp/venv\n```\n\nThe path to the virtual environment if using one.\n\n```yaml\nmanage_pip_packages_venv_inherit_global: false\n```\n\nWhether the virtual environment should inherit global system packages.\n\n## **Dependencies**\n\n`ednz_cloud.manage_apt_packages` to install python3, python3-pip, and python3-venv (if selected).\n\n## **Example Playbook**\n\n```yaml\n# calling the role inside a playbook with either the default or group_vars/host_vars\n- hosts: servers\n  roles:\n    - ednz_cloud.manage_pip_packages\n```\n\n```yaml\n# calling the role inside a playbook and injecting variables (in another role for example)\n- hosts: servers\n  tasks:\n    - name: \"Install ansible with pip\"\n      ansible.builtin.include_role:\n        name: ednz_cloud.manage_pip_packages\n      vars:\n        manage_pip_packages_install_prereqs: false\n        manage_pip_packages_list:\n          - name: ansible-core\n            version_constraint: latest\n            state: present\n```\n\n## **License**\n\nMIT / BSD\n\n## **Author Information**\n\nThis role was created by Bertrand Lanson in 2023.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fednz-cloud%2Fmanage_pip_packages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fednz-cloud%2Fmanage_pip_packages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fednz-cloud%2Fmanage_pip_packages/lists"}