Re: [ansible-project] Apache Karaf Output via Ansible

2018-05-04 Thread Bishwajit Samanta
I resolved the issue.. :)

On Fri 4 May, 2018, 17:24 Bishwajit Samanta, 
wrote:

> 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?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/b848b9ca-4b32-49ec-b008-9aa7b482a4d6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPkwwd1LfJnc8AYg%3D4w3zrVT3QUP%3DMEc6VNw0i1VHUU-a1sjwA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Apache Karaf Output via Ansible

2018-05-04 Thread Bishwajit Samanta
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?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b848b9ca-4b32-49ec-b008-9aa7b482a4d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.