mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Updated pc roles and implemented update-pip role
This commit is contained in:
23
roles/update-pip/README.md
Normal file
23
roles/update-pip/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Update Pip Packages
|
||||
|
||||
## Description
|
||||
|
||||
This Ansible role automatically updates all installed Python Pip packages to their latest versions.
|
||||
|
||||
## Overview
|
||||
|
||||
The role performs the following:
|
||||
- Executes a command to retrieve all installed Python Pip packages.
|
||||
- Updates each package individually to its latest available version.
|
||||
- Ensures a smooth and automated Python environment maintenance process.
|
||||
|
||||
## Purpose
|
||||
|
||||
Ensures Python packages remain up-to-date, improving security and functionality.
|
||||
|
||||
## Features
|
||||
|
||||
- **Automatic Updates:** Automates the process of upgrading Python packages.
|
||||
- **Platform Independent:** Works on Linux, macOS, and Windows environments.
|
||||
- **Ansible Integration:** Easy to include in larger playbooks or maintenance routines.
|
||||
|
26
roles/update-pip/meta/main.yml
Normal file
26
roles/update-pip/meta/main.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
license: "CyMaIS NonCommercial License (CNCL)"
|
||||
license_url: "https://s.veen.world/cncl"
|
||||
company: |
|
||||
Kevin Veen-Birkenbach
|
||||
Consulting & Coaching Solutions
|
||||
https://www.veen.world
|
||||
description: "Automatically updates all Python Pip packages to their latest available versions."
|
||||
min_ansible_version: "2.9"
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- all
|
||||
- name: Archlinux
|
||||
versions:
|
||||
- rolling
|
||||
- name: Debian
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- python
|
||||
- pip
|
||||
- update
|
||||
- maintenance
|
||||
dependencies: []
|
4
roles/update-pip/tasks/main.yml
Normal file
4
roles/update-pip/tasks/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: Update all local pip packages
|
||||
shell: "pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U --break-system-packages"
|
||||
args:
|
||||
executable: /bin/bash
|
Reference in New Issue
Block a user