Skip to content

Instantly share code, notes, and snippets.

@geerlingguy
Created September 16, 2019 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geerlingguy/be571359470883b83f66b49eb2dbcc0b to your computer and use it in GitHub Desktop.
Save geerlingguy/be571359470883b83f66b49eb2dbcc0b to your computer and use it in GitHub Desktop.
ansible -m setup for ansible/ansible issue #62362
root@a5cd324fcea6:/# ansible localhost --connection=local -m setup
[WARNING]: Platform linux on host localhost is using the discovered Python interpreter at /usr/bin/python, but future
installation of another Python interpreter could change this. See
https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html for more information.
localhost | SUCCESS => {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"172.17.0.3"
],
"ansible_all_ipv6_addresses": [],
"ansible_apparmor": {
"status": "disabled"
},
"ansible_architecture": "x86_64",
"ansible_bios_date": "03/14/2014",
"ansible_bios_version": "1.00",
"ansible_cmdline": {
"BOOT_IMAGE": "/boot/kernel",
"console": "ttyS1",
"page_poison": "1",
"panic": "1",
"root": "/dev/sr0",
"text": true,
"vsyscall": "emulate"
},
"ansible_date_time": {
"date": "2019-09-16",
"day": "16",
"epoch": "1568659531",
"hour": "18",
"iso8601": "2019-09-16T18:45:31Z",
"iso8601_basic": "20190916T184531698556",
"iso8601_basic_short": "20190916T184531",
"iso8601_micro": "2019-09-16T18:45:31.698669Z",
"minute": "45",
"month": "09",
"second": "31",
"time": "18:45:31",
"tz": "UTC",
"tz_offset": "+0000",
"weekday": "Monday",
"weekday_number": "1",
"weeknumber": "37",
"year": "2019"
},
"ansible_default_ipv4": {
"address": "172.17.0.3",
"alias": "eth0",
"broadcast": "172.17.255.255",
"gateway": "172.17.0.1",
"interface": "eth0",
"macaddress": "02:42:ac:11:00:03",
"mtu": 1500,
"netmask": "255.255.0.0",
"network": "172.17.0.0",
"type": "ether"
},
"ansible_default_ipv6": {},
"ansible_device_links": {
"ids": {},
"labels": {},
"masters": {},
"uuids": {}
},
"ansible_devices": {
"loop0": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop1": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop2": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop3": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop4": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop5": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop6": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop7": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"nbd0": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd1": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd10": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd11": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd12": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd13": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd14": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd15": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd2": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd3": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd4": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd5": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd6": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd7": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd8": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"nbd9": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"sda": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": "BHYVE SATA DISK",
"partitions": {
"sda1": {
"holders": [],
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"sectors": "124997632",
"sectorsize": 512,
"size": "59.60 GB",
"start": "2048",
"uuid": null
}
},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "deadline",
"sectors": "124999680",
"sectorsize": "512",
"size": "59.60 GB",
"support_discard": "4096",
"vendor": "ATA",
"virtual": 1
},
"sr0": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": "BHYVE DVD-ROM",
"partitions": {},
"removable": "1",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "deadline",
"sectors": "926996",
"sectorsize": "2048",
"size": "452.63 MB",
"support_discard": "0",
"vendor": "BHYVE",
"virtual": 1
},
"sr1": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": "BHYVE DVD-ROM",
"partitions": {},
"removable": "1",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "deadline",
"sectors": "412",
"sectorsize": "2048",
"size": "206.00 KB",
"support_discard": "0",
"vendor": "BHYVE",
"virtual": 1
},
"sr2": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": "BHYVE DVD-ROM",
"partitions": {},
"removable": "1",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "deadline",
"sectors": "1715712",
"sectorsize": "2048",
"size": "837.75 MB",
"support_discard": "0",
"vendor": "BHYVE",
"virtual": 1
}
},
"ansible_distribution": "Debian",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/os-release",
"ansible_distribution_file_variety": "Debian",
"ansible_distribution_major_version": "10",
"ansible_distribution_release": "buster",
"ansible_distribution_version": "10",
"ansible_dns": {
"nameservers": [
"192.168.65.1"
]
},
"ansible_domain": "",
"ansible_effective_group_id": 0,
"ansible_effective_user_id": 0,
"ansible_env": {
"DEBIAN_FRONTEND": "noninteractive",
"HOME": "/root",
"HOSTNAME": "a5cd324fcea6",
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PWD": "/",
"SHLVL": "1",
"TERM": "xterm",
"_": "/usr/local/bin/ansible",
"pip_packages": "ansible cryptography"
},
"ansible_eth0": {
"active": true,
"device": "eth0",
"ipv4": {
"address": "172.17.0.3",
"broadcast": "172.17.255.255",
"netmask": "255.255.0.0",
"network": "172.17.0.0"
},
"macaddress": "02:42:ac:11:00:03",
"mtu": 1500,
"promisc": false,
"speed": 10000,
"type": "ether"
},
"ansible_fibre_channel_wwn": [],
"ansible_fips": false,
"ansible_form_factor": "Unknown",
"ansible_fqdn": "a5cd324fcea6",
"ansible_hostname": "a5cd324fcea6",
"ansible_hostnqn": "",
"ansible_interfaces": [
"lo",
"tunl0",
"ip6tnl0",
"eth0"
],
"ansible_ip6tnl0": {
"active": false,
"device": "ip6tnl0",
"macaddress": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00",
"mtu": 1452,
"promisc": false,
"type": "unknown"
},
"ansible_is_chroot": false,
"ansible_iscsi_iqn": "",
"ansible_kernel": "4.9.184-linuxkit",
"ansible_lo": {
"active": true,
"device": "lo",
"ipv4": {
"address": "127.0.0.1",
"broadcast": "host",
"netmask": "255.0.0.0",
"network": "127.0.0.0"
},
"mtu": 65536,
"promisc": false,
"type": "loopback"
},
"ansible_local": {},
"ansible_lsb": {},
"ansible_machine": "x86_64",
"ansible_machine_id": "81ef01dec0f0eb6d6c0f3752b487b10e",
"ansible_memfree_mb": 1094,
"ansible_memory_mb": {
"nocache": {
"free": 3286,
"used": 661
},
"real": {
"free": 1094,
"total": 3947,
"used": 2853
},
"swap": {
"cached": 0,
"free": 1023,
"total": 1023,
"used": 0
}
},
"ansible_memtotal_mb": 3947,
"ansible_mounts": [
{
"block_available": 10589289,
"block_size": 4096,
"block_total": 15313873,
"block_used": 4724584,
"device": "/dev/sda1",
"fstype": "ext4",
"inode_available": 3604390,
"inode_total": 3907584,
"inode_used": 303194,
"mount": "/etc/hosts",
"options": "rw,relatime,data=ordered,bind",
"size_available": 43373727744,
"size_total": 62725623808,
"uuid": "N/A"
},
{
"block_available": 10589289,
"block_size": 4096,
"block_total": 15313873,
"block_used": 4724584,
"device": "/dev/sda1",
"fstype": "ext4",
"inode_available": 3604390,
"inode_total": 3907584,
"inode_used": 303194,
"mount": "/etc/hostname",
"options": "rw,relatime,data=ordered,bind",
"size_available": 43373727744,
"size_total": 62725623808,
"uuid": "N/A"
},
{
"block_available": 10589289,
"block_size": 4096,
"block_total": 15313873,
"block_used": 4724584,
"device": "/dev/sda1",
"fstype": "ext4",
"inode_available": 3604390,
"inode_total": 3907584,
"inode_used": 303194,
"mount": "/sys/fs/cgroup",
"options": "rw,relatime,data=ordered,bind",
"size_available": 43373727744,
"size_total": 62725623808,
"uuid": "N/A"
},
{
"block_available": 10589289,
"block_size": 4096,
"block_total": 15313873,
"block_used": 4724584,
"device": "/dev/sda1",
"fstype": "ext4",
"inode_available": 3604390,
"inode_total": 3907584,
"inode_used": 303194,
"mount": "/etc/resolv.conf",
"options": "rw,relatime,data=ordered,bind",
"size_available": 43373727744,
"size_total": 62725623808,
"uuid": "N/A"
}
],
"ansible_nodename": "a5cd324fcea6",
"ansible_os_family": "Debian",
"ansible_pkg_mgr": "apt",
"ansible_proc_cmdline": {
"BOOT_IMAGE": "/boot/kernel",
"console": [
"ttyS0",
"ttyS1"
],
"page_poison": "1",
"panic": "1",
"root": "/dev/sr0",
"text": true,
"vsyscall": "emulate"
},
"ansible_processor": [
"0",
"GenuineIntel",
"Intel(R) Core(TM) i7-6660U CPU @ 2.40GHz",
"1",
"GenuineIntel",
"Intel(R) Core(TM) i7-6660U CPU @ 2.40GHz"
],
"ansible_processor_cores": 1,
"ansible_processor_count": 2,
"ansible_processor_threads_per_core": 1,
"ansible_processor_vcpus": 2,
"ansible_product_name": "BHYVE",
"ansible_product_serial": "None",
"ansible_product_uuid": "C2F84152-0000-0000-B91F-DCAAB7D75079",
"ansible_product_version": "1.0",
"ansible_python": {
"executable": "/usr/bin/python",
"has_sslcontext": true,
"type": "CPython",
"version": {
"major": 2,
"micro": 16,
"minor": 7,
"releaselevel": "final",
"serial": 0
},
"version_info": [
2,
7,
16,
"final",
0
]
},
"ansible_python_version": "2.7.16",
"ansible_real_group_id": 0,
"ansible_real_user_id": 0,
"ansible_selinux": {
"status": "Missing selinux Python library"
},
"ansible_selinux_python_present": false,
"ansible_service_mgr": "sysvinit",
"ansible_swapfree_mb": 1023,
"ansible_swaptotal_mb": 1023,
"ansible_system": "Linux",
"ansible_system_capabilities": [
"cap_chown",
"cap_dac_override",
"cap_fowner",
"cap_fsetid",
"cap_kill",
"cap_setgid",
"cap_setuid",
"cap_setpcap",
"cap_net_bind_service",
"cap_net_raw",
"cap_sys_chroot",
"cap_mknod",
"cap_audit_write",
"cap_setfcap+eip"
],
"ansible_system_capabilities_enforced": "True",
"ansible_system_vendor": "NA",
"ansible_tunl0": {
"active": false,
"device": "tunl0",
"macaddress": "00:00:00:00",
"mtu": 1480,
"promisc": false,
"type": "unknown"
},
"ansible_uptime_seconds": 235849,
"ansible_user_dir": "/root",
"ansible_user_gecos": "root",
"ansible_user_gid": 0,
"ansible_user_id": "root",
"ansible_user_shell": "/bin/bash",
"ansible_user_uid": 0,
"ansible_userspace_architecture": "x86_64",
"ansible_userspace_bits": "64",
"ansible_virtualization_role": "guest",
"ansible_virtualization_type": "docker",
"discovered_interpreter_python": "/usr/bin/python",
"gather_subset": [
"all"
],
"module_setup": true
},
"changed": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment