Skip to content

Instantly share code, notes, and snippets.

@larsks
Created February 5, 2019 02:53
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 larsks/a3a27f173e44b79a48c82894a8f6039c to your computer and use it in GitHub Desktop.
Save larsks/a3a27f173e44b79a48c82894a8f6039c to your computer and use it in GitHub Desktop.
$ ansible all -i hosts -m setup
foo | SUCCESS => {
"ansible_facts": {
"ansible_apparmor": {
"status": "disabled"
},
"ansible_architecture": "x86_64",
"ansible_bios_date": "02/02/2018",
"ansible_bios_version": "A25",
"ansible_cmdline": {
"BOOT_IMAGE": "/vmlinuz-4.19.16-200.fc28.x86_64",
"LANG": "en_US.UTF-8",
"biosdevname": "0",
"net.ifnames": "0",
"rd.lvm.lv": "fedora/swap",
"ro": true,
"root": "/dev/mapper/fedora-root"
},
"ansible_date_time": {
"date": "2019-02-05",
"day": "05",
"epoch": "1549335232",
"hour": "02",
"iso8601": "2019-02-05T02:53:52Z",
"iso8601_basic": "20190205T025352568269",
"iso8601_basic_short": "20190205T025352",
"iso8601_micro": "2019-02-05T02:53:52.568345Z",
"minute": "53",
"month": "02",
"second": "52",
"time": "02:53:52",
"tz": "UTC",
"tz_offset": "+0000",
"weekday": "Tuesday",
"weekday_number": "2",
"weeknumber": "05",
"year": "2019"
},
"ansible_device_links": {
"ids": {},
"labels": {},
"masters": {
"dm-2": [
"dm-4"
],
"dm-3": [
"dm-4"
],
"dm-4": [
"dm-5",
"dm-6",
"dm-7"
],
"sda2": [
"dm-0",
"dm-1",
"dm-8"
],
"sdb": [
"dm-2",
"dm-3"
]
},
"uuids": {}
},
"ansible_devices": {
"dm-0": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "104857600",
"sectorsize": "512",
"size": "50.00 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-1": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "32989184",
"sectorsize": "512",
"size": "15.73 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-2": {
"holders": [
"tank-pool0-tpool"
],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-4"
],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "475136",
"sectorsize": "512",
"size": "232.00 MB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-3": {
"holders": [
"tank-pool0-tpool"
],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-4"
],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "1929379840",
"sectorsize": "512",
"size": "920.00 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-4": {
"holders": [
"tank-docker",
"tank-libvirt",
"tank-pool0"
],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-5",
"dm-6",
"dm-7"
],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "1929379840",
"sectorsize": "512",
"size": "920.00 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-5": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "1929379840",
"sectorsize": "512",
"size": "920.00 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-6": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "209715200",
"sectorsize": "512",
"size": "100.00 GB",
"support_discard": "262144",
"vendor": null,
"virtual": 1
},
"dm-7": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "209715200",
"sectorsize": "512",
"size": "100.00 GB",
"support_discard": "262144",
"vendor": null,
"virtual": 1
},
"dm-8": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "860266496",
"sectorsize": "512",
"size": "410.21 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"loop0": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "4096",
"vendor": null,
"virtual": 1
},
"sda": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": "SAMSUNG SSD SM87",
"partitions": {
"sda1": {
"holders": [],
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"sectors": "2097152",
"sectorsize": 512,
"size": "1.00 GB",
"start": "2048",
"uuid": null
},
"sda2": {
"holders": [
"fedora-swap",
"fedora-home",
"fedora-root"
],
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-0",
"dm-1",
"dm-8"
],
"uuids": []
},
"sectors": "998115328",
"sectorsize": 512,
"size": "475.94 GB",
"start": "2099200",
"uuid": null
}
},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "cfq",
"sectors": "1000215216",
"sectorsize": "512",
"size": "476.94 GB",
"support_discard": "512",
"vendor": "ATA",
"virtual": 1
},
"sdb": {
"holders": [
"tank-pool0_tmeta",
"tank-pool0_tdata"
],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-2",
"dm-3"
],
"uuids": []
},
"model": "Samsung SSD 860",
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "cfq",
"sectors": "1953525168",
"sectorsize": "512",
"size": "931.51 GB",
"support_discard": "512",
"vendor": "ATA",
"virtual": 1
},
"sdc": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": "HDT721010SLA360",
"partitions": {
"sdc1": {
"holders": [],
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"sectors": "1953523120",
"sectorsize": 512,
"size": "931.51 GB",
"start": "2048",
"uuid": null
}
},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "cfq",
"sectors": "1953525168",
"sectorsize": "512",
"size": "931.51 GB",
"support_discard": "0",
"vendor": "Hitachi",
"virtual": 1
}
},
"ansible_distribution": "Ubuntu",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/os-release",
"ansible_distribution_file_variety": "Debian",
"ansible_distribution_major_version": "16",
"ansible_distribution_release": "xenial",
"ansible_distribution_version": "16.04",
"ansible_dns": {
"nameservers": [
"172.16.64.1"
],
"search": [
"house"
]
},
"ansible_domain": "",
"ansible_effective_group_id": 0,
"ansible_effective_user_id": 0,
"ansible_env": {
"HOME": "/root",
"HOSTNAME": "69a9bf3d2c6a",
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PWD": "/"
},
"ansible_fips": false,
"ansible_form_factor": "Space-saving",
"ansible_fqdn": "69a9bf3d2c6a",
"ansible_hostname": "69a9bf3d2c6a",
"ansible_is_chroot": false,
"ansible_iscsi_iqn": "",
"ansible_kernel": "4.19.16-200.fc28.x86_64",
"ansible_local": {},
"ansible_lsb": {
"codename": "xenial",
"description": "\"Ubuntu 16.04.4 LTS\"",
"id": "Ubuntu",
"major_release": "16",
"release": "16.04"
},
"ansible_machine": "x86_64",
"ansible_memfree_mb": 3016,
"ansible_memory_mb": {
"nocache": {
"free": 18225,
"used": 13848
},
"real": {
"free": 3016,
"total": 32073,
"used": 29057
},
"swap": {
"cached": 10,
"free": 15760,
"total": 16107,
"used": 347
}
},
"ansible_memtotal_mb": 32073,
"ansible_mounts": [
{
"block_available": 12263852,
"block_size": 4096,
"block_total": 26200576,
"block_used": 13936724,
"device": "/dev/mapper/tank-docker",
"fstype": "xfs",
"inode_available": 50581913,
"inode_total": 52426752,
"inode_used": 1844839,
"mount": "/etc/resolv.conf",
"options": "rw,seclabel,relatime,attr2,inode64,logbsize=256k,sunit=512,swidth=512,noquota,bind",
"size_available": 50232737792,
"size_total": 107317559296,
"uuid": "N/A"
},
{
"block_available": 12263852,
"block_size": 4096,
"block_total": 26200576,
"block_used": 13936724,
"device": "/dev/mapper/tank-docker",
"fstype": "xfs",
"inode_available": 50581913,
"inode_total": 52426752,
"inode_used": 1844839,
"mount": "/etc/hostname",
"options": "rw,seclabel,relatime,attr2,inode64,logbsize=256k,sunit=512,swidth=512,noquota,bind",
"size_available": 50232737792,
"size_total": 107317559296,
"uuid": "N/A"
},
{
"block_available": 12263852,
"block_size": 4096,
"block_total": 26200576,
"block_used": 13936724,
"device": "/dev/mapper/tank-docker",
"fstype": "xfs",
"inode_available": 50581913,
"inode_total": 52426752,
"inode_used": 1844839,
"mount": "/etc/hosts",
"options": "rw,seclabel,relatime,attr2,inode64,logbsize=256k,sunit=512,swidth=512,noquota,bind",
"size_available": 50232737792,
"size_total": 107317559296,
"uuid": "N/A"
}
],
"ansible_nodename": "69a9bf3d2c6a",
"ansible_os_family": "Debian",
"ansible_pkg_mgr": "apt",
"ansible_processor": [
"0",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"1",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"2",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"3",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"4",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"5",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"6",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"7",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz"
],
"ansible_processor_cores": 4,
"ansible_processor_count": 1,
"ansible_processor_threads_per_core": 2,
"ansible_processor_vcpus": 8,
"ansible_product_name": "Precision T1700",
"ansible_product_serial": "3TLN282",
"ansible_product_uuid": "4c4c4544-0054-4c10-804e-b3c04f323832",
"ansible_product_version": "01",
"ansible_python": {
"executable": "/usr/bin/python",
"has_sslcontext": true,
"type": "CPython",
"version": {
"major": 2,
"micro": 12,
"minor": 7,
"releaselevel": "final",
"serial": 0
},
"version_info": [
2,
7,
12,
"final",
0
]
},
"ansible_python_version": "2.7.12",
"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": "sleep",
"ansible_swapfree_mb": 15760,
"ansible_swaptotal_mb": 16107,
"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": "Dell Inc.",
"ansible_uptime_seconds": 971491,
"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",
"gather_subset": [
"all"
],
"module_setup": true
},
"changed": false
}
host1 | SUCCESS => {
"ansible_facts": {
"ansible_apparmor": {
"status": "disabled"
},
"ansible_architecture": "x86_64",
"ansible_bios_date": "02/02/2018",
"ansible_bios_version": "A25",
"ansible_cmdline": {
"BOOT_IMAGE": "/vmlinuz-4.19.16-200.fc28.x86_64",
"LANG": "en_US.UTF-8",
"biosdevname": "0",
"net.ifnames": "0",
"rd.lvm.lv": "fedora/swap",
"ro": true,
"root": "/dev/mapper/fedora-root"
},
"ansible_date_time": {
"date": "2019-02-05",
"day": "05",
"epoch": "1549335232",
"hour": "02",
"iso8601": "2019-02-05T02:53:52Z",
"iso8601_basic": "20190205T025352568268",
"iso8601_basic_short": "20190205T025352",
"iso8601_micro": "2019-02-05T02:53:52.568358Z",
"minute": "53",
"month": "02",
"second": "52",
"time": "02:53:52",
"tz": "UTC",
"tz_offset": "+0000",
"weekday": "Tuesday",
"weekday_number": "2",
"weeknumber": "05",
"year": "2019"
},
"ansible_device_links": {
"ids": {},
"labels": {},
"masters": {
"dm-2": [
"dm-4"
],
"dm-3": [
"dm-4"
],
"dm-4": [
"dm-5",
"dm-6",
"dm-7"
],
"sda2": [
"dm-0",
"dm-1",
"dm-8"
],
"sdb": [
"dm-2",
"dm-3"
]
},
"uuids": {}
},
"ansible_devices": {
"dm-0": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "104857600",
"sectorsize": "512",
"size": "50.00 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-1": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "32989184",
"sectorsize": "512",
"size": "15.73 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-2": {
"holders": [
"tank-pool0-tpool"
],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-4"
],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "475136",
"sectorsize": "512",
"size": "232.00 MB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-3": {
"holders": [
"tank-pool0-tpool"
],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-4"
],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "1929379840",
"sectorsize": "512",
"size": "920.00 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-4": {
"holders": [
"tank-docker",
"tank-libvirt",
"tank-pool0"
],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-5",
"dm-6",
"dm-7"
],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "1929379840",
"sectorsize": "512",
"size": "920.00 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-5": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "1929379840",
"sectorsize": "512",
"size": "920.00 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"dm-6": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "209715200",
"sectorsize": "512",
"size": "100.00 GB",
"support_discard": "262144",
"vendor": null,
"virtual": 1
},
"dm-7": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "209715200",
"sectorsize": "512",
"size": "100.00 GB",
"support_discard": "262144",
"vendor": null,
"virtual": 1
},
"dm-8": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "860266496",
"sectorsize": "512",
"size": "410.21 GB",
"support_discard": "512",
"vendor": null,
"virtual": 1
},
"loop0": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "4096",
"vendor": null,
"virtual": 1
},
"sda": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": "SAMSUNG SSD SM87",
"partitions": {
"sda1": {
"holders": [],
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"sectors": "2097152",
"sectorsize": 512,
"size": "1.00 GB",
"start": "2048",
"uuid": null
},
"sda2": {
"holders": [
"fedora-swap",
"fedora-home",
"fedora-root"
],
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-0",
"dm-1",
"dm-8"
],
"uuids": []
},
"sectors": "998115328",
"sectorsize": 512,
"size": "475.94 GB",
"start": "2099200",
"uuid": null
}
},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "cfq",
"sectors": "1000215216",
"sectorsize": "512",
"size": "476.94 GB",
"support_discard": "512",
"vendor": "ATA",
"virtual": 1
},
"sdb": {
"holders": [
"tank-pool0_tmeta",
"tank-pool0_tdata"
],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [
"dm-2",
"dm-3"
],
"uuids": []
},
"model": "Samsung SSD 860",
"partitions": {},
"removable": "0",
"rotational": "0",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "cfq",
"sectors": "1953525168",
"sectorsize": "512",
"size": "931.51 GB",
"support_discard": "512",
"vendor": "ATA",
"virtual": 1
},
"sdc": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": "HDT721010SLA360",
"partitions": {
"sdc1": {
"holders": [],
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"sectors": "1953523120",
"sectorsize": 512,
"size": "931.51 GB",
"start": "2048",
"uuid": null
}
},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "cfq",
"sectors": "1953525168",
"sectorsize": "512",
"size": "931.51 GB",
"support_discard": "0",
"vendor": "Hitachi",
"virtual": 1
}
},
"ansible_distribution": "Ubuntu",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/os-release",
"ansible_distribution_file_variety": "Debian",
"ansible_distribution_major_version": "16",
"ansible_distribution_release": "xenial",
"ansible_distribution_version": "16.04",
"ansible_dns": {
"nameservers": [
"172.16.64.1"
],
"search": [
"house"
]
},
"ansible_domain": "",
"ansible_effective_group_id": 0,
"ansible_effective_user_id": 0,
"ansible_env": {
"HOME": "/root",
"HOSTNAME": "ff3e361523cd",
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PWD": "/"
},
"ansible_fips": false,
"ansible_form_factor": "Space-saving",
"ansible_fqdn": "ff3e361523cd",
"ansible_hostname": "ff3e361523cd",
"ansible_is_chroot": false,
"ansible_iscsi_iqn": "",
"ansible_kernel": "4.19.16-200.fc28.x86_64",
"ansible_local": {},
"ansible_lsb": {
"codename": "xenial",
"description": "\"Ubuntu 16.04.4 LTS\"",
"id": "Ubuntu",
"major_release": "16",
"release": "16.04"
},
"ansible_machine": "x86_64",
"ansible_memfree_mb": 3016,
"ansible_memory_mb": {
"nocache": {
"free": 18225,
"used": 13848
},
"real": {
"free": 3016,
"total": 32073,
"used": 29057
},
"swap": {
"cached": 10,
"free": 15760,
"total": 16107,
"used": 347
}
},
"ansible_memtotal_mb": 32073,
"ansible_mounts": [
{
"block_available": 12263852,
"block_size": 4096,
"block_total": 26200576,
"block_used": 13936724,
"device": "/dev/mapper/tank-docker",
"fstype": "xfs",
"inode_available": 50581913,
"inode_total": 52426752,
"inode_used": 1844839,
"mount": "/etc/resolv.conf",
"options": "rw,seclabel,relatime,attr2,inode64,logbsize=256k,sunit=512,swidth=512,noquota,bind",
"size_available": 50232737792,
"size_total": 107317559296,
"uuid": "N/A"
},
{
"block_available": 12263852,
"block_size": 4096,
"block_total": 26200576,
"block_used": 13936724,
"device": "/dev/mapper/tank-docker",
"fstype": "xfs",
"inode_available": 50581913,
"inode_total": 52426752,
"inode_used": 1844839,
"mount": "/etc/hostname",
"options": "rw,seclabel,relatime,attr2,inode64,logbsize=256k,sunit=512,swidth=512,noquota,bind",
"size_available": 50232737792,
"size_total": 107317559296,
"uuid": "N/A"
},
{
"block_available": 12263852,
"block_size": 4096,
"block_total": 26200576,
"block_used": 13936724,
"device": "/dev/mapper/tank-docker",
"fstype": "xfs",
"inode_available": 50581913,
"inode_total": 52426752,
"inode_used": 1844839,
"mount": "/etc/hosts",
"options": "rw,seclabel,relatime,attr2,inode64,logbsize=256k,sunit=512,swidth=512,noquota,bind",
"size_available": 50232737792,
"size_total": 107317559296,
"uuid": "N/A"
}
],
"ansible_nodename": "ff3e361523cd",
"ansible_os_family": "Debian",
"ansible_pkg_mgr": "apt",
"ansible_processor": [
"0",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"1",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"2",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"3",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"4",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"5",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"6",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz",
"7",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz"
],
"ansible_processor_cores": 4,
"ansible_processor_count": 1,
"ansible_processor_threads_per_core": 2,
"ansible_processor_vcpus": 8,
"ansible_product_name": "Precision T1700",
"ansible_product_serial": "3TLN282",
"ansible_product_uuid": "4c4c4544-0054-4c10-804e-b3c04f323832",
"ansible_product_version": "01",
"ansible_python": {
"executable": "/usr/bin/python",
"has_sslcontext": true,
"type": "CPython",
"version": {
"major": 2,
"micro": 12,
"minor": 7,
"releaselevel": "final",
"serial": 0
},
"version_info": [
2,
7,
12,
"final",
0
]
},
"ansible_python_version": "2.7.12",
"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": "sleep",
"ansible_swapfree_mb": 15760,
"ansible_swaptotal_mb": 16107,
"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": "Dell Inc.",
"ansible_uptime_seconds": 971491,
"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",
"gather_subset": [
"all"
],
"module_setup": true
},
"changed": false
}
[docker:vars]
ansible_connection=docker
[docker]
foo ansible_host=host0
host1
#!/bin/sh
docker run -d --name host0 ubuntu:16.04 sleep inf
docker run -d --name host1 ubuntu:16.04 sleep inf
docker exec host0 sh -c "apt-get update; apt -y install python"
docker exec host1 sh -c "apt-get update; apt -y install python"
@larsks
Copy link
Author

larsks commented Feb 5, 2019

You can see a recording of this running from start to finish here: https://asciinema.org/a/ODXhePBcBvPubQsLqcVRuU7EG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment