Introduction
# A list of your hosts.
hosts = [ dict(url="ssh://myhost.com", groups=["web"]) ]# Global variables are later accessible in your script
packages_to_install = ["nginx"]# You can also override or even extend variables
packages_to_install.append("neovim")from fora import host
from fora.operations import system
system.package(name="Install selected packages", packages=host.packages_to_install)
if "web" in host.groups: # You can dynamically check attributes of the host
print("Running on a web host!")Deploy structure
./
├─ hosts/ # Host specific configuration
│ └─ localhost.py
├─ inventory.py # A list of all managed hosts
└─ deploy.py # The main deploy script./
├─ hosts/ # Host specific configuration
│ └─ localhost.py
├─ groups/ # Group specific configuration
│ └─ all.py # Global variables
├─ tasks/ # Reusable scripts for performing specific tasks
│ └─ nginx.py
├─ files/ # Static configuration files uploaded via `files.upload()`
├─ templates/ # Templated configuration files uploaded via `files.template()`
├─ inventory.py # A list of all managed hosts
└─ deploy.py # The main deploy script./
├─ zsh/ # zsh shell
│ └─ zshrc
├─ kitty/ # kitty terminal
│ └─ kitty.conf
├─ neovim/ # neovim configuration
│ └─ init.lua
└─ deploy.py # The main deploy script that will deploy all dotfilesLast updated