A collection of fabric tasks for package management
Project description
# 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)
## 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()
```
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)
## 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()
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for fabric-package-management-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ca9118c62fc77acb781cb30ca05ee8b15119ccf32828b073aaecb7a6d9ffc1b |
|
MD5 | cac4003499f8e6fe671de9f2797b6519 |
|
BLAKE2b-256 | f41883b57255853b9a91e24058e19fd8c114d33da746b2abb4d72017b721499e |