[ansible-project] Re: how to disable paramiko log in ansible.log

2018-01-30 Thread Leon Xie
My Linux server is RHEL6


[root@server]# rpm -qa | grep release
redhat-release-server-6Server-6.9.0.4.el6.x86_64


-- 
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/bf944c09-7d5c-4b9e-bf4c-155c74232e3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: how to disable paramiko log in ansible.log

2018-01-30 Thread Leon Xie
I am using the below command to run ansible-playbook

++
ansible-playbook -c paramiko -i ../../inventory/hosts do_something.yml
++

-- 
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/85de0e57-f81a-488e-b28b-4fadd96a9192%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] how to disable paramiko log in ansible.log

2018-01-30 Thread Leon Xie
Hi all,

I am using ansible 2.4.2 as below:
++
[root@server]# ansible-playbook --version
ansible-playbook 2.4.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.6/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.6.6 (r266:84292, Aug  9 2016, 06:11:56) [GCC 4.4.7 
20120313 (Red Hat 4.4.7-17)]
++


when I run ansible-playbook command, I got a lot of paramiko logs in 
ansible log file as below:
++
2018-01-30 23:48:38,782 paramiko.transport Authentication (publickey) 
successful!
2018-01-30 23:48:38,785 paramiko.transport [chan 1] Max packet in: 34816 
bytes
2018-01-30 23:48:38,785 paramiko.transport [chan 1] Max packet out: 32768 
bytes
2018-01-30 23:48:38,786 paramiko.transport Secsh channel 1 opened.
2018-01-30 23:48:38,788 paramiko.transport [chan 1] Sesch channel 1 request 
ok
2018-01-30 23:48:38,793 paramiko.transport [chan 1] Max packet out: 32768 
bytes
2018-01-30 23:48:38,793 paramiko.transport Secsh channel 1 opened.
2018-01-30 23:48:38,803 paramiko.transport [chan 1] Sesch channel 1 request 
ok
2018-01-30 23:48:38,817 paramiko.transport [chan 1] EOF received (1)
2018-01-30 23:48:38,818 paramiko.transport [chan 2] Max packet in: 34816 
bytes
2018-01-30 23:48:38,819 paramiko.transport [chan 1] EOF sent (1)
2018-01-30 23:48:38,820 paramiko.transport [chan 2] Max packet out: 32768 
bytes
2018-01-30 23:48:38,821 paramiko.transport Secsh channel 2 opened.
2018-01-30 23:48:38,832 paramiko.transport [chan 1] EOF received (1)
2018-01-30 23:48:38,833 paramiko.transport [chan 2] Max packet in: 34816 
bytes
2018-01-30 23:48:38,834 paramiko.transport [chan 1] EOF sent (1)
2018-01-30 23:48:38,834 paramiko.transport [chan 2] Max packet out: 32768 
bytes
2018-01-30 23:48:38,834 paramiko.transport Secsh channel 2 opened.
2018-01-30 23:48:38,862 paramiko.transport [chan 2] Sesch channel 2 request 
ok
2018-01-30 23:48:38,876 paramiko.transport [chan 2] Sesch channel 2 request 
ok
2018-01-30 23:48:38,898 paramiko.transport [chan 2] EOF received (2)
2018-01-30 23:48:38,899 paramiko.transport [chan 2] EOF sent (2)
2018-01-30 23:48:38,900 paramiko.transport [chan 3] Max packet in: 34816 
bytes
2018-01-30 23:48:38,915 paramiko.transport [chan 2] EOF received (2)
2018-01-30 23:48:38,916 paramiko.transport [chan 2] EOF sent (2)
2018-01-30 23:48:38,917 paramiko.transport [chan 3] Max packet in: 34816 
bytes
2018-01-30 23:48:38,942 paramiko.transport [chan 3] Max packet out: 32768 
bytes
2018-01-30 23:48:38,943 paramiko.transport Secsh channel 3 opened.
2018-01-30 23:48:38,957 paramiko.transport [chan 3] Max packet out: 32768 
bytes
2018-01-30 23:48:38,957 paramiko.transport Secsh channel 3 opened.
2018-01-30 23:48:38,968 paramiko.transport [chan 3] Sesch channel 3 request 
ok
2018-01-30 23:48:38,984 paramiko.transport [chan 3] Sesch channel 3 request 
ok
2018-01-30 23:48:38,999 paramiko.transport.sftp [chan 3] Opened sftp 
connection (server version 3)
2018-01-30 23:48:39,000 paramiko.transport.sftp [chan 3] 
open('/root/.ansible/tmp/ansible-tmp-1517327318.18-145745003473541/command.py', 
'wb')
2018-01-30 23:48:39,002 paramiko.transport.sftp [chan 3] 
open('/root/.ansible/tmp/ansible-tmp-1517327318.18-145745003473541/command.py', 
'wb') -> 
+


I checked ansible document, however, I couldn't find a way to disable those 
paramiko log
will somebody direct me to the right method?
thanks a million in advance.

Best,
Leon

-- 
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/1b4aef54-ac6a-425f-baab-88125bb62797%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] which branch should i submit pull request if I want to a bug fixed in 1.9.x

2015-12-08 Thread Leon Xie
Hi all,

I found a bug on ansible 1.9.2 and have finished coding.
If I want this bug to be fixed in later 1.9.x release, which branch should 
I submit my pull request?
Should I submit to stable-1.9 branch or devel branch?

Best,
Leon

-- 
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/6ed30f9a-d540-4408-9e55-55676d4c5c12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] how to abort ansible execution in callback

2015-12-03 Thread Leon Xie
hi all,

I want to abort entire ansible execution in a callback file.
how could I implement that?

The below code doesn't work:

def runner_on_failed(self, host, res, ignore_errors=False):
 sys.exit(1)

thanks a lot in advance.


-- 
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/3d033449-bb0c-47e3-9255-87c6d8fa7ecc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: ansible didn't stop execution upon a task failure

2015-12-03 Thread Leon Xie
thanks a lot for your reply.

On Tuesday, December 1, 2015 at 10:22:42 AM UTC+8, Brian Coca wrote:
>
> I don't know, those options work for me.
>

-- 
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/00f80393-9554-43f2-a0e5-985112955256%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: ansible didn't stop execution upon a task failure

2015-11-30 Thread Leon Xie
Hi Brian,

Is there any way to abort 42 and 43 host if any task fails on 41 host?
As I know, "any_errors_fatal: True" and " max_fail_percentage: 0' can be 
used to archive this, however, it didn't work.

thank

On Tuesday, December 1, 2015 at 7:02:08 AM UTC+8, Brian Coca wrote:
>
> only host 192.168.0.41 failed the task, hosts .42 and .43 continue the 
> play, the play would abort if all hosts failed. 
>
> -- 
> Brian Coca 
>

-- 
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/1d94c331-f50a-471c-bb92-ee175b1c685d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: ansible didn't stop execution upon a task failure

2015-11-30 Thread Leon Xie
ansible version is as below:


#ansible --version
 [WARNING]: The version of gmp you have installed has a known issue 
regarding
timing vulnerabilities when used with pycrypto. If possible, you should 
update
it (i.e. yum update gmp).

ansible 1.9.0.1
  configured module search path = None

-- 
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/56e271ae-c326-4c34-89ac-1911b20b4020%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] ansible didn't stop execution upon a task failure

2015-11-30 Thread Leon Xie
hi

I have the below ansible playbook named backup_data.yml, which is included 
by the main playbook named upgrade.yml.

backup_data.yml
++
---
- name: backup data
  hosts: allvm 
  remote_user: root
  max_fail_percentage: 0
  any_errors_fatal: True
  roles:
- backup_data
  tags: backup_data

- name: check previous task result
  hosts: allvm
  max_fail_percentage: 0
  any_errors_fatal: True
  remote_user: root
  tasks:
- command: 'true'
++

upgrade.yml
++
---
- include: backup_data.yml
- include: prepare_vms.yml
++

prepare_vms.yml
++
---
- name: prepare data for virtual machines
  hosts: localhost
  max_fail_percentage: 0
  roles:
- prepare_vms 
++

what I expect is that when any task in backup_data.yml fails, ansible stops 
execution
however, I got the below result:
++
2015-11-24 16:06:04,175 p=22112 u=root |  TASK: [backup_data | backup data] 
* 
2015-11-24 16:06:07,152 p=22112 u=root |  changed: [192.168.0.42]
2015-11-24 16:06:32,556 p=22112 u=root |  changed: [192.168.0.43]
2015-11-24 16:06:45,348 p=22112 u=root |  failed: [192.168.0.41] => 
{"changed": true, "cmd": ["backup.pl", "-f", "backup.bak", "-noask"], 
"delta": "0:00:40.590445", "end": "2015-11-24 16:06:43.102890", "rc": 1, 
"start": "2015-11-24 16:06:02.512445", "warnings": []}
2015-11-24 16:06:45,367 p=22112 u=root |  PLAY [check previous task result] 
* 
2015-11-24 16:06:45,368 p=22112 u=root |  TASK: [command true] 
** 
2015-11-24 16:06:45,988 p=22112 u=root |  changed: [192.168.0.43]
2015-11-24 16:06:46,002 p=22112 u=root |  changed: [192.168.0.42]
2015-11-24 16:06:46,014 p=22112 u=root |  PLAY [prepare data for virtual 
machines] ** 
2015-11-24 16:06:46,015 p=22112 u=root |  TASK: [prepare_vms | create data 
directory] *** 
2015-11-24 16:06:46,302 p=22112 u=root |  changed: [localhost]
++

will somebody point me to the right direction? thanks a lot in advance.

-- 
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/7092cde6-b2a4-46e4-a787-031126712b9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: a question about 'Interrupt execution on any error'

2015-09-08 Thread Leon Xie
in the documentation, it says the below content:

"second stage can’t be played if any server failed on “stage 1”

but what I got is not what the document says.

-- 
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/72eb0236-8dae-42d3-a9a5-520c0eca2b4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] a question about 'Interrupt execution on any error'

2015-09-08 Thread Leon Xie
hi all,

according to the section entitled 'Interrupt execution on any error 
' in the 
below URL:
http://docs.ansible.com/ansible/playbooks_delegation.html#rolling-update-batch-size

I wrote the below playbook:


---
- hosts: host
  remote_user: root
  any_errors_fatal: True
  tasks:
- command: 'false'

- hosts: "allvm"
  any_errors_fatal: True
  remote_user: root
  tasks:
- command: 'true'


what I expect is that when tasks for 'host' fails, the task for 'allvm' 
won't be run.

however, I got the below output

[localhost]$ ansible-playbook -c paramiko -i hosts  demo.yml 

PLAY [host] 
*** 

TASK: [command false] 
* 
failed: [10.10.10.10] => {"changed": true, "cmd": ["false"], "delta": 
"0:00:00.004008", "end": "2015-09-08 07:23:52.448567", "rc": 1, "start": 
"2015-09-08 07:23:52.444559", "warnings": []}

PLAY [allvm] 
** 

TASK: [command true] 
** 
changed: [10.10.0.20]
changed: [10.10.0.21]
changed: [10.10.0.22]

PLAY RECAP 
 
   to retry, use: --limit @/home/demo/demo.retry

10.10.0.20   : ok=1changed=1unreachable=0failed=0   
10.10.0.21   : ok=1changed=1unreachable=0failed=0   
10.10.0.22   : ok=1changed=1unreachable=0failed=0   
10.10.10.10 : ok=0changed=0unreachable=0failed=1   



will somebody help fix this issue? thanks a lot

-- 
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/fdb51419-856c-4603-b454-d1d94f5bc66a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] how to abort task execution for other hosts if one task fails for one host

2015-08-18 Thread Leon Xie
hi all,

I have the below ansible playbook

++
- name: do task for AA
  hosts: AA
  roles:
- AA_ROLE

- name: do task for BB
  hosts: BB
  roles:
- BB_ROLE
++

Currently even if one task in AA_ROLE for AA fails, the tasks in BB_ROLE 
for BB will also be run.

what I want is that if any task in AA_ROLE fails, the tasks in BB_ROLE 
won't be executed.

is there any method to achieve this?

thanks a lot in advance.

-- 
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/c81c7673-c7bd-4648-b451-c8603ca7f08f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] how to abort execution upon a single fail on any host

2015-07-29 Thread Leon Xie
Hi Serge,

your suggestion about any_errors_fatal works for the hosts that in a single 
play.
if there is another play and one of the hosts in the play is not in the 
hosts that marked as any_errors_fatal, the tasks in this play will also be 
executed.


On Wednesday, July 29, 2015 at 8:54:59 PM UTC+8, Serge van Ginderachter 
wrote:
>
>
> On 29 July 2015 at 14:49, Leon Xie > 
> wrote:
>
>> max_fail_percentage:
>
>
>
> ​Perhaps ​any_errors_fatal: true might help?
>
> (btw Seems undocumented)
>

-- 
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/d1698750-6695-4843-9843-548c1f58df78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: how to abort execution upon a single fail on any host

2015-07-29 Thread Leon Xie
my ansible version is as below:

$ ansible-playbook --version
ansible-playbook 1.9.1
  configured module search path = None

-- 
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/9e33df9a-4de7-4971-ad17-51166c80045f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] how to abort execution upon a single fail on any host

2015-07-29 Thread Leon Xie
thanks a lot for your suggestion.
I had a try by adding any_errors_fatal: true.
however, it doesn't work.

++
- hosts: aa
  max_fail_percentage: 0
  any_errors_fatal: true 
  roles:
- stop_server

- hosts: allhosts
  max_fail_percentage: 0
  roles:
- backup_data
++

+
PLAY [aa] 


TASK: [stop_server | stop server] ***
failed: [xxx.xxx.0.xx] => {"attempts": 1, "changed": true, "cmd": 
["xxx"], "delta": "0:00:00.006697", "end": "2015-07-29 
21:04:35.801786", "failed": true, "rc": 255, "start": "2015-07-29 
21:04:35.795089", "warnings": []}
msg: Task failed as maximum retries was encountered

PLAY [allhosts] 
**

TASK: [backup_data | create directory] ***
ok: [xx.xxx.0.xx]
ok: [xx.xxx.0.xx]

TASK: [backup_data | mount directory] *
skipping: [xx.xxx.0.xx]
skipping: [xx.xxx.0.xx]
++++++

On Wednesday, July 29, 2015 at 8:54:59 PM UTC+8, Serge van Ginderachter 
wrote:
>
>
> On 29 July 2015 at 14:49, Leon Xie > 
> wrote:
>
>> max_fail_percentage:
>
>
>
> ​Perhaps ​any_errors_fatal: true might help?
>
> (btw Seems undocumented)
>

-- 
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/38c6a052-ed86-4238-9021-7e275beda62a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] how to abort execution upon a single fail on any host

2015-07-29 Thread Leon Xie
hi all,

I have the below playbooks:


+++
- hosts: aa
  max_fail_percentage: 0
  roles:
- stop_server

- hosts: allhosts
  max_fail_percentage: 0
  roles:
- backup_data

- hosts: localhost
  max_fail_percentage: 0
  roles:
- prepare_data

+++
what I get now is that even if any task in stop_server role fail, the task 
in backup_data for allhosts still runs.

what I want is that if any failure occurs in any host, the other tasks 
won't be run for the remaining hosts.
is there a way to achieve this?


-- 
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/ea2201f5-477b-4f7b-8b9c-658a6f17dd46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] ansible known_hosts module failed

2015-05-29 Thread Leon Xie
Hi all,

I use the below playbook to add known hosts:


- name: demo
  hosts: 10.223.0.51
  remote_user: root
  tasks:
- name: fetch
  fetch: src=/etc/ssh/ssh_host_rsa_key.pub dest=/tmp/keys
 fail_on_missing=yes validate_checksum=yes
- name: demo
  hosts: 10.223.0.52
  remote_user: root
  tasks:
- name: known_hosts
  known_hosts: path="/home/xiaoliang/.ssh/known_hosts" host="sun1-db-1" 
state=present
   key="{{ lookup('file', 
'/tmp/keys/10.223.0.51/etc/ssh/ssh_host_rsa_key.pub') }}"




$ ansible-playbook  -i ../../inventory/hosts demo.yml -

PLAY [demo] 
*** 

TASK: [fetch] 
* 
<10.223.0.51> ESTABLISH CONNECTION FOR USER: root on PORT 22 TO 10.223.0.51
<10.223.0.51> EXEC /bin/sh -c 'rc=flag; [ -r /etc/ssh/ssh_host_rsa_key.pub 
] || rc=2; [ -f /etc/ssh/ssh_host_rsa_key.pub ] || rc=1; [ -d 
/etc/ssh/ssh_host_rsa_key.pub ] && rc=3; python -V 2>/dev/null || rc=4; [ 
x"$rc" != "xflag" ] && echo "${rc} "/etc/ssh/ssh_host_rsa_key.pub && exit 
0; (python -c '"'"'import hashlib; BLOCKSIZE = 65536; hasher = 
hashlib.sha1(); afile = open("'"'"'/etc/ssh/ssh_host_rsa_key.pub'"'"'", 
"rb") buf = afile.read(BLOCKSIZE) while len(buf) > 0: hasher.update(buf) 
buf = afile.read(BLOCKSIZE) afile.close() print(hasher.hexdigest())'"'"' 
2>/dev/null) || (python -c '"'"'import sha; BLOCKSIZE = 65536; hasher = 
sha.sha(); afile = open("'"'"'/etc/ssh/ssh_host_rsa_key.pub'"'"'", "rb") 
buf = afile.read(BLOCKSIZE) while len(buf) > 0: hasher.update(buf) buf = 
afile.read(BLOCKSIZE) afile.close() print(hasher.hexdigest())'"'"' 
2>/dev/null) || (echo '"'"'0 '"'"'/etc/ssh/ssh_host_rsa_key.pub)'
ok: [10.223.0.51] => {"changed": false, "checksum": 
"312b6e08531e50f6baa21bf87f0dd8adbaad0c0d", "dest": 
"/tmp/keys/10.223.0.51/etc/ssh/ssh_host_rsa_key.pub", "file": 
"/etc/ssh/ssh_host_rsa_key.pub", "md5sum": 
"cb9f17d1febefd7c66fc79967606d272"}

PLAY [demo] 
*** 

TASK: [known_hosts] 
*** 
<10.223.0.52> ESTABLISH CONNECTION FOR USER: root on PORT 22 TO 10.223.0.52
<10.223.0.52> REMOTE_MODULE known_hosts 
path="/home/xiaoliang/.ssh/known_hosts" host="sun1-db-1" state=present 
key="ssh-rsa 
B3NzaC1yc2EBIwAAAQEAtqGtO6VLYU3kWIWoiKKg8rgEQvEB/wHP1aZEK95kQ1yekDIK8Vfj4VQ3+pKqwTirwSF9ODeZR1VaC+K4b6Oke9bJ/0h5bXiRzzvmD/wu+c6uEtjtMdNYzQnLu4UNCCh1Fa6Pktm2Lz9xSxTcFyIncxgFSxqabf12OVYWsYaj7BwO6Wgs/pYoJjDv+IgJpUwvsPhJkX2s/Ak/U4JwnuaxXB/wufF/eFbEnTUbTv7o7KpHqX50Ok/daN05AVcC/oYPf79wOaeBsPMnTNisqjYJNSgS1EpTw1ZNxqwiRUpcyx8SQ/uI1caA06Q8g7RcNmLWiEM0t5lx2LjScX4ztrIYxQ=="
<10.223.0.52> EXEC /bin/sh -c 'mkdir -p 
$HOME/.ansible/tmp/ansible-tmp-1432862043.76-101243566006070 && echo 
$HOME/.ansible/tmp/ansible-tmp-1432862043.76-101243566006070'
<10.223.0.52> PUT /tmp/tmp54Yy4J TO 
/root/.ansible/tmp/ansible-tmp-1432862043.76-101243566006070/known_hosts
<10.223.0.52> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 
/usr/bin/python 
/root/.ansible/tmp/ansible-tmp-1432862043.76-101243566006070/known_hosts; 
rm -rf /root/.ansible/tmp/ansible-tmp-1432862043.76-101243566006070/ 
>/dev/null 2>&1'
failed: [10.223.0.52] => {"cmd": "/usr/bin/ssh-keygen -F sun1-db-1 -f 
/tmp/tmpxxoJ6Q", "failed": true, "rc": 1}
stderr: line 1 invalid key: ssh-rsa...
/tmp/tmpxxoJ6Q is not a valid known_hosts file.

msg: line 1 invalid key: ssh-rsa...
/tmp/tmpxxoJ6Q is not a valid known_hosts file.

FATAL: all hosts have already failed -- aborting

PLAY RECAP 
 
   to retry, use: --limit @/home/xiaoliang/demo.retry

10.223.0.51: ok=1changed=0unreachable=0
failed=0   
10.223.0.52: ok=0changed=0unreachable=0
failed=1  



will anyone please help to look at this? or point me to the right direction?

-- 
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/91d26a6a-9951-49de-8eb3-01d19759ba50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.