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) [](http://fabric-package-management.readthedocs.io/en/latest/) [](https://codecov.io/gh/andrewsomething/fabric-package-management) [](https://pypi.python.org/pypi/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) [](http://fabric-package-management.readthedocs.io/en/latest/) [](https://codecov.io/gh/andrewsomething/fabric-package-management) [](https://pypi.python.org/pypi/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 Distributions
No source distribution files available for this release.
See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for fabric_package_management-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7f9f05f9b5333b83892ec2772b9df53899d12ac5c4a0bd5bbec3ec22adaee0f |
|
MD5 | 68f05200c32d3de03d50606a8f995150 |
|
BLAKE2b-256 | 16c860a013fe0d21ca5f25e65d23bbf1759ef27b129518247aca27b5b3213574 |
Close
Hashes for fabric_package_management-0.1.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de14b3e6b99da50d532f52acc1e2406dbc23726a315fe15ff3a9052a4e177aa6 |
|
MD5 | 4ddcb5650928f4dd8cfb309d7da01e4e |
|
BLAKE2b-256 | 7efbcd8564e048d0f3a24a51adef28fe5cce13fa5a8826e5353c5d8b2453b623 |