GithubHelp home page GithubHelp logo

rocannon's Introduction

Rocannon an Ansible Playbook Server

This is a simple http server that runs ansible-playbooks It is written in Scala and based on the Play Framework.

Running

Run as a Play app or as a docker image:

> sbt run

or

> sbt start</code>

Docker instructions

The build.sbt uses GitVersioning, so you must set a version git tag in your repo.

> git tag mytag-0.1.0
> sbt docker:publishLocal
> docker run -d -v [path-to-playbooks]:/playbooks rocannon:mytag-0.1.0

Accessing

Http

Use http POST to http://rocannon/inventory-file/playbook-file[?refId=refId]

Where inventory-file and playbook-file may be relative to the playbook directory.

The data is json encoded extra-vars:

{
    "variable1" : "value",
    "variable2" : "value"
}

Make sure to use Content-Type:application/json.

The optional refId query parameter can be any string. And will be used in logs and the reply.

Script

The bin/rocannon bash script can be used for convenience.

Response

Json formatted, example:

{"buildId":606186755,"refId":"myId","status":"success","execTime":17,"message":"\nPLAY... trucated"} 

Configuration

Config file

Uses TypeSafes config. Use a -Dconfig.file switch to override. See TypeSafe/Play Framework for more info.

Environment variables

The following environment variables can be set

NameDescriptionDefault
ANSIBLE_COMMAND Path to the ansible-playbook command /usr/bin/ansible-playbook
PLAYBOOKS Path to the playbooks /playbooks
VAULT_PASSWORD The vault password to use changeme
CRYPTO_SECRET The play crypto secret to use Should be set.
LE_TOKEN Logentries token Will send logs to L``ogentries

rocannon's People

Contributors

cyberzac avatar

Watchers

 avatar James Cloos avatar Jarl Fransson avatar Peter Franzen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.