You... rather dislike Ansible. And wish there were a simple, imperative DSL that did all the things that Ansible doesn't do. The code you write should be explicit, variables should be tracked, easily inspected, and it should be in a turing-complete language.
This is the package for you.
0.2.0
represents the first release which has been tested in a real-world
deployment scenario.
0.4.0
will add extra guards and protections, including optional typing
on variables.
The API will be stabilized by 0.5.0
, at which point the following
features will be tested:
The 1.0
version will include telemetry and operability features,
possibly include support for a pluggable Phoenix LiveView dashboard.
PRs and assistance greatly welcome.
You must set the directory that contains your Realbook scripts:
Application.put_env(:realbook, :script_dir, "scripts/")
In your scripts directory, write your scripts as .exs
files, for example
into example.exs
:
verify do
run! "test -f /tmp/foo"
end
play do
run! "touch /tmp/foo"
end
Connect to your server.
Realbook.connect!(:ssh, host: "my_host_name", user: "my_user_name")
Run it!
Realbook.run("example.exs")
For further information, check the Guides
section of the documentation.
The package can be installed by adding realbook
to your list of dependencies in mix.exs
:
def deps do
[
{:realbook, "~> 0.3.1"}
]
end
Documentation can be found at https://hexdocs.pm/realbook.