-
Notifications
You must be signed in to change notification settings - Fork 57
HTTP API Usage
little flying bear edited this page Oct 18, 2016
·
14 revisions
- n: task name (after version 0.1.2, exclude 0.1.2)
- m: command / script
- a: your shell command / your script path
- t: host you wanna to run at, ex: all / 127.0.0.1 / 192.168.1.1,192.168.1.2
- s: sign string for this request = md5(m+t+key) (key can be defined at sign_key)
- r: exec shell/script as root (optional, default:False)
- c: the number of concurrence (optional, default value in your ansible conf)
- shell mode: {"n":"task#id@project","m":"command","a":"df -h","t":"127.0.0.1","s":"1aa8c17520df23f0479423ff830316acf"}
- script mode: {"n":"task#id@project","m":"script","a":"/home/myname/myscript.sh","t":"all","s":"1aa8c17520df23f0479423ff830316acf","r":"True","c":50"}
- h: host you wanna to run at, ex: all / 127.0.0.1 / 192.168.1.1,192.168.1.2
- f: playbook file name (*.yml)
- s: sign string for this request = md5(h+f+key) (key can be defined at sign_key)
- c: the number of concurrence (optional, default value in your ansible conf)
{"h":"all","f":"/home/myname/myplayboo.yml","s":"1aa8c17520df23f0479423ff830316acf","c":50"}
--- Ansible-API: Use ansible easily for developer ---