# How do i generate Add Host URL from cli?

**URL:** <https://forums.suse.com/t/how-do-i-generate-add-host-url-from-cli/2566>\
**Category:** General\
**Created:** [April 22, 2016, 4:10am UTC](https://forums.suse.com/t/how-do-i-generate-add-host-url-from-cli/2566 "2016-04-22T04:10:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinliu](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/martinliu/32/1239_2.png) [@martinliu](https://forums.suse.com/u/martinliu)\
**Post date:** [April 22, 2016, 4:10am UTC](https://forums.suse.com/t/how-do-i-generate-add-host-url-from-cli/2566/1 "2016-04-22T04:10:31Z")

</div>

Hi All,

As we can see below:

docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v0.11.0 [http://Rancher.server.ip.address:8080/v1/scripts/F2AE7A017CB42E4BEE5B:1461294000000:FzcgJHqTFSrN4VDZkOB6vXrdqFU](http://Rancher.server.ip.address:8080/v1/scripts/F2AE7A017CB42E4BEE5B:1461294000000:FzcgJHqTFSrN4VDZkOB6vXrdqFU)

There are 3 strings after v1/scripts/ XXX:XXX:XXX

Is there a way I could get this string combination from cli?

I am try to make a ansible runbook for this add host task.

Any suggestion?

Thanks,  
Martin

---

<div class="post-metadata">

**Author:** ![Fraser\_Goffin](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/fraser_goffin/32/6608_2.png) [@Fraser\_Goffin](https://forums.suse.com/u/Fraser_Goffin)\
**Post date:** [April 29, 2016, 5:00pm UTC](https://forums.suse.com/t/how-do-i-generate-add-host-url-from-cli/2566/3 "2016-04-29T17:00:51Z")

</div>

There is published article that includes an Ansible playbook role for this that you can find here: [http://rancher.com/using-ansible-with-docker-to-deploy-a-wordpress-service-on-rancher/](http://rancher.com/using-ansible-with-docker-to-deploy-a-wordpress-service-on-rancher/)

Regards

Fraser.
