Giter VIP home page Giter VIP logo

ansible-http's Introduction

ansible-http

ansible docker container with http wrapper

  • ansible with http
  • multiple execution with various branches during same time

build

  • edit requirements.txt you need more python library
  • when you do the following, the docker container 'ansible-http' is registered.
$ ./make.sh

configuration

$ cat config.yml
---
port: 1323
repository_url: [email protected]:you/your-ansible-playbook-repository.git
default_inventory: inventory_path_your_repository
default_verbose: -vv
default_branch: develop
key value description
port (1323) (required) port number for http
repository_url (required) ansible playbook git repository
default_inventory default inventory path
default_verbose (-v,-vv,-vvv,-vvvv) default verbose option
default_branch (develop,master,etc..) default branch

run

  • docker run
$ docker run -d --name ansible-http -p 1323:1323 -v $PWD/config.yml:/ansible/config.yml ansible-http
  • access test
$ curl localhost:1323/version

ssh configuration

$ cat ssh/config
Host gitbucket
  HostName 192.168.99.100
  Port 29418
  User git
  IdentityFile /ansible/keys/gitbucket_key.pem
  StrictHostKeyChecking no
  UserKnownHostsFile /dev/null

$ ls keys
gitbucket_key.pem

$ docker run -d --name ansible-http -p 1323:1323 -v $PWD/config.yml:/ansible/config.yml -v $PWD/ssh:/ansible/ssh -v $PWD/keys:/ansible/keys ansible-http

(under construction...)


command

  • GET /version
    • Return ansible-http version, status: 200
  • GET /ansible/version
    • Return ansible version, status: 200
  • POST /ansible/playbook/run
    • Execute ansible-playbook
    • Return ansible execution result
    • parameters:
      • playbook (required) - playbook file name
      • inventory (required) - inventory file path
      • limit - ansible limit option
      • tags - ansible tags option
      • skiptags - ansible skip-tags option
      • extravars - ansible extra-vars option
      • verbose - ansible verbose option
      • dir - change directory option
      • branch - git clone branch specification option

Feature

  • test
  • logger
  • GET /ansible/playbook/list
  • POST /ansible/command/run
  • no block mode (not wait for execution result)
  • notification task
  • update echo version
  • reuse workspace (with scheduled clearning dirs)

LICENSE

MIT

ansible-http's People

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.