An Ansible role for creating a systemd service unit that runs an ACI using rkt.
Assumes that rkt is already installed on the target system and is available at /usr/bin/rkt
.
Requires systemd. The Wikipedia article for systemd lists the Linux distributions and corresponding versions that come with systemd out of the box.
This role has two required variables:
image_path
: the path to the ACI (eg./images/cool-thing.aci
orhttp://www.example.com/cool-thing.aci
orexample.com/cool-thing:v1.2.3
)service_name
: the name of the service (eg.cool-thing
)
There are also two optional variables:
extra_args
: arguments to pass through to the container's executable (eg. settingextra_args
to--do-stuff
will result in therkt run
command being/usr/bin/rkt run /path/to/image.aci -- --do-stuff
)rkt_opts
: rkt options (eg. https://coreos.com/rkt/docs/latest/subcommands/run.html)
This role does not have any dependencies.
- hosts: servers
roles:
- { role: rkt-runner, image_path: "/images/cool-thing.aci", service_name: "cool-thing" }
MIT
Created by Charles Korn (me@charleskorn.com).
Submit issues and pull requests on GitHub at https://github.com/charleskorn/rkt-runner.