-
Before running this project for test/dev purpose, you need to add the root folder "
ansible-townhall
" to PYTHONPATH. Otherwise the python interpreter is unable to find the modules of this project.For example, suppose that you put the "
ansible-townhall
" under /root/python_app folder on Linux like this: /root/python_app/ansible-townhall. It's better to write "export PYTHONPATH=$PYTHONPATH:/root/python_app/ansible-townhall
" into.bashrc
file so that when you log in Linux everytime, that path could be added to PYTHONPATH. -
Make sure you have installed required libraries.
$ pip install -r requirements.txt
-
Make sure you have installed
Ansible
on the same server. Please refer to http://docs.ansible.com/ansible/intro.html. -
Make sure you have installed
Git
client on the same server.$sudo apt-get install git
-
After installing
Ansible
, run "vi /etc/ansible/ansible.cfg
" to find what the path of callback plugins is.For example:
callback_plugins = /usr/share/ansible_plugins/callback_plugins
-
Run "
cd <your_path>/ansible-townhall/job_service
", copy "ansible_logger_plugin.py
" to above callback plugins' path. -
Make sure you have installed MongoDB, version 3.0.x on the same server.Then, launch it.
-
Run "
python <your_path>/ansible-townhall/runserver.py
" to launch the dev/test server. -
Use either command "curl" or firefox restclient plugin to call the REST apis of job_api/ansible_job_api.py or code_repo_api/ansible_repo_api.py.
-
This app's log file "ansible_job.log" will be generated under "
/etc/ansible/job_logging/
". -
If you want to test/call "
create_job
" REST api, you need to write your own playbooks.
-
Notifications
You must be signed in to change notification settings - Fork 0
License
KuraudoTama/ansible-townhall
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published