Giter VIP home page Giter VIP logo

ansible-dyninv-api's Introduction

Ansible Dyninv API

Alpha state

This project is still in Alpha status, use at your own risk. Pull requests are more then welcome.

Installation

This project is based on api-platform so can be easily extended. It requires PHP7.1, so make sure it's installed. After that the following is needed:

$ mkdir -p var/jwt # For Symfony3+, no need of the -p option
$ openssl genrsa -out var/jwt/private.pem -aes256 4096
$ openssl rsa -pubout -in var/jwt/private.pem -out var/jwt/public.pem
$ composer install

Ensure that your database settings are as you want (by default it's also configured for sqlite3, checkout the app/config/config.yml for options.

Also make sure your Webserver can read/write to the cache/session etc:

$ chown -R www-data:www-data app/data       # dir
$ chown www-data:www-data app/data/data.db3 # sqlite3 file
$ chown -R www-data:www-data var/cache      # cache
$ chown -R www-data:www-data var/logs       # logs
$ chown -R www-data:www-data var/sessions   # sessions

UI

The UI is provided seperately, you can find it here: ansible-dyninv-api-ui

Dynamic Inventory Script

To use the script with Ansible you will need to use a special dynamic inventory script. This has been provided along with the API, you can find it in extras.

To get started rename api.ini.dist to api.ini and modify to your needs based on what you configured for the REST API above.

Usage

Simply call the script like the following

ansible-playbook -i api.py
# or
ansible -i api.py

Limitations also work

ansible-playbook -i api.py --limit foo.bar.com
ansible-playbook -i api.py --limit groupFoo

LICENSE

Initial work is based on api-platform, the License from there applies.

Everything else (src/AppBundle/) is MIT license Copyright (c) 2017 Products Up GmbH, Yorick Terweijden [email protected]

ansible-dyninv-api's People

Contributors

carsten-neuendorf avatar terwey avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.