# janusgraph script

**URL:** <https://forum.ansible.com/t/janusgraph-script/33252>\
**Category:** Ansible Project\
**Created:** [June 24, 2020, 11:01pm UTC](https://forum.ansible.com/t/janusgraph-script/33252 "2020-06-24T23:01:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajeeb\_sahoo](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@Rajeeb\_sahoo](https://forum.ansible.com/u/Rajeeb_sahoo)\
**Post date:** [June 24, 2020, 11:01pm UTC](https://forum.ansible.com/t/janusgraph-script/33252/1 "2020-06-24T23:01:01Z")

</div>

I am new in ansible project.

I need to start janusgraph.sh script through ansible. when I am executing it not giving any error but janusgraph is not starting. my janusgraph is combining with Cassandra, elasticsearch, and gramlin server.

when I will start janusgraph the above three-component should start.

- name: run janusgraph script  
become\_user: {{user\_name}} (example)  
shell: bash janusgraph.sh start  
args:  
chdir: {{path\_of\_janusgraph}} (example)

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [June 25, 2020, 5:49am UTC](https://forum.ansible.com/t/janusgraph-script/33252/2 "2020-06-25T05:49:55Z")

</div>

> I am new in ansible project.
> 
> I need to start janusgraph.sh script through ansible. when I am executing it not giving any error but janusgraph is not  
> starting. my janusgraph is combining with Cassandra, elasticsearch, and gramlin server.
> 
> when I will start janusgraph the above three-component should start.
> 
> - name: run janusgraph script  
> become\_user: {{user\_name}} (example)  
> shell: bash janusgraph.sh start  
> args:  
> chdir: {{path\_of\_janusgraph}} (example)

Hello Rajeeb,

first of all it is recommended to use "command" module instead of "shell".

To see the output of the script, add the following:

&nbsp;&nbsp;- name: run janusgraph script  
&nbsp;&nbsp;&nbsp;&nbsp;....  
&nbsp;&nbsp;&nbsp;&nbsp;register: janusgraph\_result

&nbsp;&nbsp;- debug:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var: janusgraph\_result

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Rajeeb\_sahoo](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@Rajeeb\_sahoo](https://forum.ansible.com/u/Rajeeb_sahoo)\
**Post date:** [June 25, 2020, 4:49pm UTC](https://forum.ansible.com/t/janusgraph-script/33252/3 "2020-06-25T16:49:08Z")

</div>

Hi Racke,  
I tried with command but it’s not working.

To see the output

- name: run janusgraph script  
…  
register: janusgraph\_result

- debug:  
var: janusgraph\_result

should output will print in the same consol or is there any particular path?

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [June 25, 2020, 5:48pm UTC](https://forum.ansible.com/t/janusgraph-script/33252/4 "2020-06-25T17:48:11Z")

</div>

> Hi Racke,  
> I tried with command but it's not working.
> 
> To see the output  
> - name: run janusgraph script  
> ....  
> register: janusgraph\_result
> 
> - debug:  
> var: janusgraph\_result
> 
> should output will print in the same consol or is there any particular path?

The debug module displays the contents of the given variable below the "run janusgraph script" task.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Rajeeb\_sahoo](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@Rajeeb\_sahoo](https://forum.ansible.com/u/Rajeeb_sahoo)\
**Post date:** [June 25, 2020, 9:16pm UTC](https://forum.ansible.com/t/janusgraph-script/33252/5 "2020-06-25T21:16:24Z")

</div>

Hello Racke

It is working.Thank you Racke
