Apache Karaf Output via Ansible

17 views
Skip to first unread message

Bishwajit Samanta

unread,
May 4, 2018, 7:53:55 AM5/4/18
to Ansible Project
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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit 'system:shutdown' to shutdown Karaf.
Hit '<ctrl-d>' 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?

Bishwajit Samanta

unread,
May 4, 2018, 1:33:57 PM5/4/18
to Ansible Project
I resolved the issue.. :)

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@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.
Reply all
Reply to author
Forward
0 new messages