https://github.com/andrewsomething/fabric-package-management
A collection of fabric tasks for package management
https://github.com/andrewsomething/fabric-package-management
Last synced: about 1 year 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 (about 11 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T20:48:56.000Z (about 5 years ago)
- Last Synced: 2025-05-07T20:41:46.519Z (about 1 year ago)
- Language: Python
- Size: 32.2 KB
- Stars: 4
- Watchers: 3
- 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.
[](https://travis-ci.org/andrewsomething/fabric-package-management) [](http://fabric-package-management.readthedocs.io/en/latest/) [](https://codecov.io/gh/andrewsomething/fabric-package-management)
## Example:
```py
#!/usr/bin/python
from fabric.api import task, prompt, env
from fabric.context_managers import cd
from fabric.operations import reboot
from 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()
```