Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewsomething/fabric-package-management
A collection of fabric tasks for package management
https://github.com/andrewsomething/fabric-package-management
Last synced: 5 days ago
JSON representation
A collection of fabric tasks for package management
- Host: GitHub
- URL: https://github.com/andrewsomething/fabric-package-management
- Owner: andrewsomething
- License: mit
- Created: 2015-05-15T04:23:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T20:48:56.000Z (over 3 years ago)
- Last Synced: 2024-04-24T09:24:12.705Z (7 months ago)
- Language: Python
- Size: 32.2 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fabric-package-management
As the name implies, fabric-package-management is a collection of [Fabric](http://www.fabfile.org/)
tasks for package management. There's nothing too fancy going on here. It's aim is to simply not
have to copy and paste similar convenience functions into many a Fabfile.[![Build Status](https://travis-ci.org/andrewsomething/fabric-package-management.svg?branch=master)](https://travis-ci.org/andrewsomething/fabric-package-management) [![docs](https://readthedocs.org/projects/fabric-package-management/badge/?version=latest)](http://fabric-package-management.readthedocs.io/en/latest/) [![codecov](https://codecov.io/gh/andrewsomething/fabric-package-management/branch/master/graph/badge.svg)](https://codecov.io/gh/andrewsomething/fabric-package-management)
## Example:
```py
#!/usr/bin/pythonfrom fabric.api import task, prompt, env
from fabric.context_managers import cd
from fabric.operations import rebootfrom fabric_package_managment import apt
@task()
def run():
apt.update()
apt.upgrade()
apt.install(['bpython', 'git'])
with cd('/tmp'):
apt.source("python-libcloud", download_only=True)
apt.remove('bpython', purge=True)
apt.autoremove()
apt.autoclean()
if apt.reboot_required():
prompt("Reboot required. Initiate now?\nYes/No?",
"response",
default="No",
validate=r'yes|Yes|YES|no|No|NO')
if env.response.lower() == "yes":
reboot()
```