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.aciorhttp://www.example.com/cool-thing.aciorexample.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_argsto--do-stuffwill result in therkt runcommand 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 ([email protected]).
Submit issues and pull requests on GitHub at https://github.com/charleskorn/rkt-runner.