Issue 1:
Issue Type: Bug Report

Ansible Version: 1.8.2, devel (as of fa51e8f)

Environment: Ubuntu 14.04.1 LTS

Summary:

ansible_processor seems to be reporting double the number of vCPUs on the system.

Output of ansible -m setup:

{
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"172.17.42.1",
"192.168.38.76"
],
"ansible_all_ipv6_addresses": [
"fe80::5484:7aff:fefe:9799",
"fe80::92b8:d0ff:fe98:deac",
"fe80::14d0:24ff:fe9d:d53",
"fe80::1467:dff:fe24:b6f3"
],
"ansible_architecture": "x86_64",
"ansible_bios_date": "01/01/2007",
"ansible_bios_version": "Bochs",
"ansible_cmdline": {
"BOOT_IMAGE": "/boot/vmlinuz-3.13.0-36-generic",
"earlyprintk": true,
"ro": true,
"root": "UUID=1bfe5b19-ecce-4fd7-989a-f41625030ee1",
"tsc": "reliable"
},
"ansible_date_time": {
"date": "2014-12-09",
"day": "09",
"epoch": "1418156988",
"hour": "20",
"iso8601": "2014-12-09T20:29:48Z",
"iso8601_micro": "2014-12-09T20:29:48.770613Z",
"minute": "29",
"month": "12",
"second": "48",
"time": "20:29:48",
"tz": "UTC",
"tz_offset": "+0000",
"weekday": "Tuesday",
"year": "2014"
},
"ansible_default_ipv4": {
"address": "192.168.38.76",
"alias": "eth0",
"gateway": "192.168.36.1",
"interface": "eth0",
"macaddress": "90:b8:d0:98:de:ac",
"mtu": 1500,
"netmask": "255.255.252.0",
"network": "192.168.36.0",
"type": "ether"
},
"ansible_default_ipv6": {},
"ansible_devices": {
"sr0": {
"holders": [],
"host": "IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]",
"model": "QEMU DVD-ROM",
"partitions": {},
"removable": "1",
"rotational": "1",
"scheduler_mode": "deadline",
"sectors": "2097151",
"sectorsize": "512",
"size": "1024.00 MB",
"support_discard": "0",
"vendor": "QEMU"
},
"vda": {
"holders": [],
"host": "SCSI storage controller: Red Hat, Inc Virtio block device",
"model": null,
"partitions": {
"vda1": {
"sectors": "16005760",
"sectorsize": 512,
"size": "7.63 GB",
"start": "2048"
},
"vda2": {
"sectors": "3992192",
"sectorsize": 512,
"size": "1.90 GB",
"start": "16007808"
}
},
"removable": "0",
"rotational": "1",
"scheduler_mode": "",
"sectors": "20971520",
"sectorsize": "512",
"size": "10.00 GB",
"support_discard": "0",
"vendor": "0x1af4"
},
"vdb": {
"holders": [],
"host": "SCSI storage controller: Red Hat, Inc Virtio block device",
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"scheduler_mode": "",
"sectors": "629145600",
"sectorsize": "512",
"size": "300.00 GB",
"support_discard": "0",
"vendor": "0x1af4"
}
},
"ansible_distribution": "Ubuntu",
"ansible_distribution_major_version": "14",
"ansible_distribution_release": "trusty",
"ansible_distribution_version": "14.04",
"ansible_docker0": {
"active": true,
"device": "docker0",
"id": "8000.56847afe9799",
"interfaces": [
"veth504b979",
"vethae96c25"
],
"ipv4": {
"address": "172.17.42.1",
"netmask": "255.255.0.0",
"network": "172.17.0.0"
},
"ipv6": [
{
"address": "fe80::5484:7aff:fefe:9799",
"prefix": "64",
"scope": "link"
}
],
"macaddress": "56:84:7a:fe:97:99",
"mtu": 1500,
"promisc": false,
"stp": false,
"type": "bridge"
},
"ansible_domain": "prod.modcloth.com",
"ansible_env": {
"CLICOLOR": "Yes",
"HOME": "/home/ubuntu",
"LANG": "en_US.UTF-8",
"LC_CTYPE": "en_US.UTF-8",
"LOGNAME": "ubuntu",
"LSCOLORS": "exgxfxfxcxdxdxhbadbxbx",
"LS_OPTIONS": "--color=auto",
"MAIL": "/var/mail/ubuntu",
"PATH": "/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games",
"PWD": "/home/ubuntu",
"SHELL": "/bin/bash",
"SHLVL": "1",
"SSH_AUTH_SOCK": "/tmp/ssh-RJF8dPSrGs/agent.27409",
"SSH_CLIENT": "10.1.30.151 38906 22",
"SSH_CONNECTION": "10.1.30.151 38906 192.168.38.76 22",
"SSH_TTY": "/dev/pts/6",
"TERM": "xterm-256color",
"USER": "ubuntu",
"XDG_RUNTIME_DIR": "/run/user/1000",
"XDG_SESSION_ID": "42",
"_": "/bin/sh"
},
"ansible_eth0": {
"active": true,
"device": "eth0",
"ipv4": {
"address": "192.168.38.76",
"netmask": "255.255.252.0",
"network": "192.168.36.0"
},
"ipv6": [
{
"address": "fe80::92b8:d0ff:fe98:deac",
"prefix": "64",
"scope": "link"
}
],
"macaddress": "90:b8:d0:98:de:ac",
"mtu": 1500,
"promisc": false,
"type": "ether"
},
"ansible_fips": false,
"ansible_form_factor": "Other",
"ansible_fqdn": "identity-app-11.prod.modcloth.com",
"ansible_hostname": "identity-app-11",
"ansible_interfaces": [
"lo",
"vethae96c25",
"veth504b979",
"docker0",
"eth0"
],
"ansible_kernel": "3.13.0-36-generic",
"ansible_lo": {
"active": true,
"device": "lo",
"ipv4": {
"address": "127.0.0.1",
"netmask": "255.0.0.0",
"network": "127.0.0.0"
},
"ipv6": [
{
"address": "::1",
"prefix": "128",
"scope": "host"
}
],
"mtu": 65536,
"promisc": false,
"type": "loopback"
},
"ansible_lsb": {
"codename": "trusty",
"description": "Ubuntu 14.04.1 LTS",
"id": "Ubuntu",
"major_release": "14",
"release": "14.04"
},
"ansible_machine": "x86_64",
"ansible_memfree_mb": 5921,
"ansible_memtotal_mb": 7984,
"ansible_mounts": [
{
"device": "/dev/vda1",
"fstype": "ext4",
"mount": "/",
"options": "rw",
"size_available": 6266978304,
"size_total": 8030789632
},
{
"device": "/dev/vdb",
"fstype": "ext3",
"mount": "/mnt",
"options": "rw",
"size_available": 299390181376,
"size_total": 316934193152
}
],
"ansible_nodename": "identity-app-11.prod.modcloth.com",
"ansible_os_family": "Debian",
"ansible_pkg_mgr": "apt",
"ansible_processor": [
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz"
],
"ansible_processor_cores": 1,
"ansible_processor_count": 1,
"ansible_processor_threads_per_core": 1,
"ansible_processor_vcpus": 1,
"ansible_product_name": "SmartDC HVM",
"ansible_product_serial": "NA",
"ansible_product_uuid": "NA",
"ansible_product_version": "7.20140710T182029Z",
"ansible_python_version": "2.7.6",
"ansible_selinux": false,
"ansible_ssh_host_key_dsa_public": "AAAAB3NzaC1kc3MAAACBAPDXkFuqp2U3gbv0EYiorAKetLROD8tX3CcwAuhnn30xF+QkiXDuGZXnwCbamxbn5NPdJKUR+yT4WUp5D66fxM+BC3vPdYjH631oiTd7QSSUenm0nlX088RiycX1zNgVQD3KPllbM54fbEjtHoYfGvpFdzgj095HFRdwtndc5vTzAAAAFQDHbgL4EHIeEFDCfZKmVif4TM3XHQAAAIBe/QW+7yaOJYnyxZBU1J2Sd+nCVJkmeKnXYGiWvAOUkYSILbpfTR6gu+2cDiAmT8Hyc2BpHkSLBCeCOy2TM7wrguR8uSm/q6XbrhwQPH+XiYGH6nrB88sR2MboZCSzevPmgwiMJr+4EjUFEmA7sxMU5P15HVUPFUO5XJbNpUsnEgAAAIB4abduwf9krn178p/nsCwRpA8FmRCM08uB7R9lOrvqBeW1CCfBxCqHeC+oTU6A3/Q5eEFvwMjwqgI4zdJeHrZMo8QQeRmRScePALSo8hM5U5i1e2OrECRbXI3nPx+1F8AuT72GQuuNdK3qJAru/WGR1a/3raKfZQ5hw3TNeddFsg==",
"ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBZg4K0x2L+cfnvm7geeomm6Y6yl5WpTmmMIsOKsgDugBYBbhhFI9fWun8kuqEz9bbwIES4yCaMgLmzZMhYMWgI=",
"ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCu1sZhPDnrLLP1GAvmm/4UAtPT1+xZZy7bJmzTwjkYZ/8WYXGtwc3TtJ4tX1syrCu8voavf+W81F7njiLFhNAo2UlYHr09mNfVLWcjlIcMGeQaM2VbHGmzW4vBqf4D8hbj8lFdr4FRebJXAesllwNA+No9/sLN833Qdleo/mTwSG2TpYWGnj7Kfz21NSH+sBvW01H8s9DBXULwcHDwyX9HOIlws8FLuoCdmJvHBloWHPHAzCgqKBzWotNRrwABb9rQm8PARObSVHXQdgf0on7/vd+mRne11cxQziuDTnaTPN6L3dnLMfdekgsn0tkowmAzBGPkMd6D5dtgXUKkz1tD",
"ansible_swapfree_mb": 1949,
"ansible_swaptotal_mb": 1949,
"ansible_system": "Linux",
"ansible_system_vendor": "Joyent",
"ansible_user_id": "ubuntu",
"ansible_userspace_architecture": "x86_64",
"ansible_userspace_bits": "64",
"ansible_veth504b979": {
"active": true,
"device": "veth504b979",
"ipv6": [
{
"address": "fe80::1467:dff:fe24:b6f3",
"prefix": "64",
"scope": "link"
}
],
"macaddress": "16:67:0d:24:b6:f3",
"mtu": 1500,
"promisc": true,
"type": "ether"
},
"ansible_vethae96c25": {
"active": true,
"device": "vethae96c25",
"ipv6": [
{
"address": "fe80::14d0:24ff:fe9d:d53",
"prefix": "64",
"scope": "link"
}
],
"macaddress": "16:d0:24:9d:0d:53",
"mtu": 1500,
"promisc": true,
"type": "ether"
},
"ansible_virtualization_role": "NA",
"ansible_virtualization_type": "NA",
"module_setup": true
},
"changed": false
}

Output of /proc/cpuinfo:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping : 7
cpu MHz : 2600.036
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm
bogomips : 5200.07
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping : 7
cpu MHz : 2600.036
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm
bogomips : 5200.07
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping : 7
cpu MHz : 2600.036
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm
bogomips : 5200.07
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping : 7
cpu MHz : 2600.036
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm
bogomips : 5200.07
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping : 7
cpu MHz : 2600.036
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm
bogomips : 5200.07
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping : 7
cpu MHz : 2600.036
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm
bogomips : 5200.07
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping : 7
cpu MHz : 2600.036
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm
bogomips : 5200.07
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping : 7
cpu MHz : 2600.036
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm
bogomips : 5200.07
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

Steps To Reproduce:

Expected Results:

...
"ansible_processor": [
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz"
],
...

Actual Results:

...
"ansible_processor": [
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz"
],
...

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

command

ANSIBLE VERSION

ansible 2.2.2.0
config file =
configured module search path = Default w/o overrides

CONFIGURATION

NA

OS / ENVIRONMENT

CentOS 6.7

SUMMARY

When using ansible to run command module such as sleep 60，terminate the task at 10s by ctr + c，the task in the client keep running until finished.

STEPS TO REPRODUCE

run command as below

ansible -i /tmp/inventory all -m command -a "sleep 60"

then press ctr + c to stop the job, go to the client and press w

EXPECTED RESULTS

10:05:48 up 1:14, 2 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
vagrant pts/1 10.0.2.2 09:09 0.00s 0.15s 0.00s w

ACTUAL RESULTS

10:05:48 up 1:14, 2 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
vagrant pts/0 172.16.0.2 10:05 13.00s 0.05s 0.00s /bin/sh -c /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1493114734.76-46381167838594/command.py; rm -rf "/home/vagrant/.ansible/tmp/ansib
vagrant pts/1 10.0.2.2 09:09 0.00s 0.15s 0.00s w