Hi Dan, Can you post your entire fabfile (with anything sensitive removed, and including import statements) on, say, gist.github.com or dpaste.com? The example in the email itself has a handful of issues but seeing the whole thing will make some of them clearer :)
I can definitely say that if your post below is literal, your first issue is you probably aren't actually calling `reboot` because there's no parentheses after it! (`reboot` vs `reboot()`) - but depending on your imports, once you fix that you'll probably have a few more problems besides... Here's what you are _probably_ going for, by the way: ``` from fabric.api import task, reboot as builtin_reboot @task def reboot(): with hide("everything"), show("stderr"): builtin_reboot() ``` (With option to name your task something besides `reboot`, and then not doing the `import x as y` form when importing the builtin.) Best, Jeff On Wed, Aug 8, 2018 at 4:38 AM, Daniel Lumb <daniel.l...@outlook.com> wrote: > Hi all, > > > New to Fabric and this is a very basic question but I'm finding it crazily > hard to find the right documentation/usage examples... > > > I'm trying to create a series of tasks in fabfile.py, one of these tasks > is solely intended to reboot the target servers. I can't seem to define > this in a way that works, this is what I have: > > > @task > def reboot(): > with hide ("everything"), show ("stderr"): > reboot > > > This runs OK using the fab binary on the CLI but it doesn't seem to > actually do anything on the target servers. I've tried a fair few other > things and haven't had any success. > > > Apologies this is so simple, a link to any relevant documentation is fine. > > > > Thanks, > > Dan > > _______________________________________________ > Fab-user mailing list > Fab-user@nongnu.org > https://lists.nongnu.org/mailman/listinfo/fab-user > > -- Jeff Forcier Unix sysadmin; Python engineer http://bitprophet.org
_______________________________________________ Fab-user mailing list Fab-user@nongnu.org https://lists.nongnu.org/mailman/listinfo/fab-user