This project is still in Alpha status, use at your own risk. Pull requests are more then welcome.
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
The UI is provided seperately, you can find it here: ansible-dyninv-api-ui
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.
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
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 yt@productsup.com