# Apache Karaf Output via Ansible

**URL:** <https://forum.ansible.com/t/apache-karaf-output-via-ansible/27456>\
**Category:** Ansible Project\
**Created:** [May 4, 2018, 11:53am UTC](https://forum.ansible.com/t/apache-karaf-output-via-ansible/27456 "2018-05-04T11:53:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bishwajit\_Samanta](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@Bishwajit\_Samanta](https://forum.ansible.com/u/Bishwajit_Samanta)\
**Post date:** [May 4, 2018, 11:53am UTC](https://forum.ansible.com/t/apache-karaf-output-via-ansible/27456/1 "2018-05-04T11:53:55Z")

</div>

Hi Team,

Is there any way to get the output of Karaf through ansible::

If i am executing the below command::-

# echo encrypt-text abcd | ./client ( I am getting the below output )

1249 [sshd-SshClient[6d78f375]-nio2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at [/0.0.0.0:8101, DSA, 06:33:3e:47:5a:e5:bd:c2:f0:cf:74:22:e9:86:b6:c6] presented unverified {} key: {}

* * *

/ //_/_\_\_\_ \_\_\_\_\_\_\_\_\_\_ _/ \_/  
/ ,\< / \_\_ `/ ___/__ `/ /  
/ /| |/ /_/ / / / /_/ / \_\_/  
/_/ |_|\ __,_/_/ \__ ,_/\_/

Apache Karaf (3.0.2)

Hit ‘’ for a list of available commands  
and ‘[cmd] --help’ for help on a specific command.  
Hit ‘system:shutdown’ to shutdown Karaf.  
Hit ‘’ or type ‘logout’ to disconnect shell from current session.

admin@root()\> encrypt-text abcd  
Encrypted value : DpuQ5swhCfVv0PgBC/z3PA==  
admin@root()\>

The value i am looking for is DpuQ5swhCfVv0PgBC/z3PA==

I am writing my playbook as :-

- name: encrypting the password from karaf  
shell: “echo encrypt-text abcd | ./client”  
register: password\_output

- debug: var=password\_output.stdout

But it is throwing error, can anyone help me in getting resolved?

---

<div class="post-metadata">

**Author:** ![Bishwajit\_Samanta](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@Bishwajit\_Samanta](https://forum.ansible.com/u/Bishwajit_Samanta)\
**Post date:** [May 4, 2018, 5:33pm UTC](https://forum.ansible.com/t/apache-karaf-output-via-ansible/27456/2 "2018-05-04T17:33:37Z")

</div>

I resolved the issue… 🙂
